Gas well foam drainage system optimization method, device and equipment based on machine learning and medium
Through machine learning-based methods, the parameters related to gas well dynamic and static characteristics and daily gas volume are screened, the data set is constructed and the prediction model is trained, and the bubble discharge agent usage and cycle are optimized, which solves the problem of experience relying on gas well bubble discharge system and improves gas well production capacity.
Patent Information
- Application Number
- CN202510827956.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-20
AI Technical Summary
In the existing technology, the bubble discharge filling system of gas wells relies heavily on work experience, resulting in the inability to effectively eliminate effusion at the bottom of the well, affecting the gas well production capacity.
Through a machine learning-based method, the parameters related to the dynamic and static characteristics of the gas well are screened and the parameters related to the daily gas volume of the gas well are constructed, the training set and the test set are divided, and the daily gas volume prediction model of the bubble exhaust wells is trained, and the daily filling amount, filling period and dilution ratio range of the bubble exhaust agent are determined, and the parameters are optimized to maximize the prediction of the daily gas volume.
An intelligent determination of the bubble drainage and filling system for gas wells has been realized, which has improved the efficiency of bubble drainage system analysis and optimization decision-making, and ensured the effective performance of gas well production capacity.
Smart Images

Figure CN120337797A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optimization of gas well foam drainage systems, and in particular to a method, device, equipment and medium for optimizing gas well foam drainage systems based on machine learning. Background Art
[0002] Foam drainage gas production is a process method that injects surfactants (foaming agents) into the well, generates low-density water-containing foam by the agitation of the natural gas flow, and carries it from the bottom of the well to the ground with the gas flow, so as to carry the bottom-hole liquid to the ground and achieve the purpose of removing the bottom-hole liquid. In the foam drainage system, the most important parameters are the daily injection volume of the foam drainage agent, the injection period, and the dilution ratio.
[0003] At present, the conventional foam drainage system optimization scheme mainly determines the foam drainage injection system based on the recommended concentration of foam drainage, combined with the calculation results of the gas well water production and the bottom-hole liquid volume. The corresponding analysis workload is large, and the calculation and adjustment work rely on historical experience. If the corresponding system control is unreasonable, the bottom-hole liquid cannot be effectively removed, which will seriously affect the discharge of the bottom-hole liquid and restrict the gas well productivity. Therefore, the present invention provides a method for optimizing the gas well foam drainage system based on machine learning to solve the above problems. Summary of the Invention
[0004] By providing a method, device, equipment and medium for optimizing the gas well foam drainage system based on machine learning, the present invention solves the technical problem that the gas well foam drainage injection system in the prior art seriously depends on work experience, and realizes the technical effect of intelligently determining the gas well foam drainage injection system.
[0005] In a first aspect, the present invention provides a method for optimizing the gas well foam drainage system based on machine learning, and the method includes: Screen the production parameters of the foam drainage gas well, the gas reservoir parameters of the foam drainage gas well, and the basic well parameters based on the correlation between the dynamic and static characteristics of the foam drainage gas well and the daily gas production to obtain an associated data set; Divide the associated data set into a training set and a test set; Train the daily gas production prediction model of the foam drainage gas well based on the training set, and verify the daily gas production prediction model of the foam drainage gas well with the test set. When the preset training requirements are met, output the daily gas production prediction model of the foam drainage gas well; Determine the range of the daily injection volume of the foam drainage agent, the range of the injection period, and the range of the dilution ratio of the foam drainage gas well; Construct several groups of optimization parameters according to the range of the daily injection volume of the foam drainage agent, the range of the injection period, and the range of the dilution ratio of the foam drainage gas well, and input the optimization parameters into the daily gas production prediction model of the foam drainage gas well to obtain the predicted daily gas production corresponding to the optimization parameters, where a group of optimization parameters includes a daily injection volume of the foam drainage agent, an injection period, and a dilution ratio; With the goal of maximizing the predicted daily gas production, several groups of optimization parameters are screened to obtain the optimal optimization parameters.
[0006] Furthermore, based on the correlation between the dynamic and static characteristics of foam drainage wells and the daily gas production, the production parameters of foam drainage wells, the reservoir parameters of foam drainage wells, and the basic well parameters are screened to obtain an associated dataset, including: Construct a basic dataset with the production parameters of foam drainage wells, the reservoir parameters of foam drainage wells, and the basic well parameters; Based on the Pearson correlation analysis method, the parameters in the basic dataset are screened to obtain the parameters related to the daily gas production of foam drainage wells; According to the parameters related to the daily gas production of foam drainage wells, construct an associated dataset.
[0007] Furthermore, based on the associated dataset, divide the training set and the test set, including: According to the data information dimension, splice the parameters in the associated dataset to obtain a wide data table at each dimension level; According to the correlation between the wide data table and the daily gas production of foam drainage wells, organize the wide data table; Based on the organized wide data table, divide the training set and the test set.
[0008] Furthermore, based on the training set, train the prediction model for the daily gas production of foam drainage wells, and verify the prediction model for the daily gas production of foam drainage wells with the test set. When the preset training requirements are met, output the prediction model for the daily gas production of foam drainage wells, including: Based on the training set, construct a prediction model for the daily gas production of foam drainage wells, where the prediction model for the daily gas production of foam drainage wells predicts the gas production of foam drainage wells according to the time series; Use DILATE as the loss function of the prediction model for the daily gas production of foam drainage wells, and use Adam as the optimizer of the prediction model for the daily gas production of foam drainage wells; When DILATE reaches the preset application requirements, input the test set into the prediction model for the daily gas production of foam drainage wells. When the preset training requirements are met, output the prediction model for the daily gas production of foam drainage wells.
[0009] Furthermore, determine the daily injection volume range, injection cycle range, and dilution ratio range of the foam drainage agent for foam drainage wells, including: According to the effective concentration range of the foam drainage agent of the foam drainage well and the daily water production of the foam drainage well, determine the daily injection volume range of the foam drainage agent of the foam drainage well; According to the performance of the injection equipment used in the foam drainage well, determine the injection cycle range and the dilution ratio range.
[0010] Further, aiming at maximizing the predicted daily gas production, several groups of optimization parameters are screened to obtain the optimal optimization parameters, including: Aiming at maximizing the predicted daily gas production, the optimization parameters corresponding to the maximum predicted daily gas production are screened from several groups of optimization parameters. If there is only one group of optimization parameters corresponding to the maximum predicted daily gas production, this group of optimization parameters is taken as the optimal optimization parameters; If there are two or more groups of optimization parameters corresponding to the maximum predicted daily gas production, aiming at the lowest cost, the optimization parameters with the lowest cost are screened from several groups of optimization parameters corresponding to the maximum predicted daily gas production; If there is only one group of optimization parameters with the lowest cost, this group of optimization parameters is taken as the optimal optimization parameters; If there are two or more groups of optimization parameters with the lowest cost, aiming at the minimum on-site additional workload, the optimal optimization parameters are screened from several groups of optimization parameters with the lowest cost.
[0011] Further, the method further includes: Determining the deviation value according to the optimal optimization parameters of the foam drainage well; When the deviation value is greater than the preset threshold, the daily gas production prediction model of the foam drainage well is updated.
[0012] In a second aspect, the present invention provides an optimization device for the foam drainage system of a gas well based on machine learning. The device includes: A basic data screening module, configured to screen the production parameters of the foam drainage well, the reservoir parameters of the foam drainage well, and the basic well parameters based on the correlation between the dynamic and static characteristics of the foam drainage well and the daily gas production to obtain an associated data set; A partitioning module, configured to partition a training set and a test set based on the associated data set; A model training module, configured to train the daily gas production prediction model of the foam drainage well based on the training set and verify the daily gas production prediction model of the foam drainage well with the test set. When the preset training requirements are met, the daily gas production prediction model of the foam drainage well is output; A range determination module, configured to determine the daily foam drainage agent injection amount range, the injection cycle range, and the dilution ratio range of the foam drainage well; A prediction module, configured to construct several groups of optimization parameters according to the daily foam drainage agent injection amount range, the injection cycle range, and the dilution ratio range of the foam drainage well, and input the optimization parameters into the daily gas production prediction model of the foam drainage well to obtain the predicted daily gas production corresponding to the optimization parameters, where a group of optimization parameters includes a daily foam drainage agent injection amount, an injection cycle, and a dilution ratio; An optimal parameter screening module, configured to screen several groups of optimization parameters aiming at maximizing the predicted daily gas production to obtain the optimal optimization parameters.
[0013] In a third aspect, the present invention provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute to implement the gas well foam drainage regime optimization method provided in the first aspect.
[0014] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, enabling the electronic device to execute and implement the gas well foam drainage regime optimization method based on machine learning provided in the first aspect.
[0015] One or more technical solutions provided in the present invention have at least the following technical effects or advantages: The present invention realizes online, near real-time, and dynamic determination of injection-production working regimes through a data-driven approach, effectively solving the contradictions that the workload of foam drainage gas well regime analysis is large, the timeliness is low, and the low coverage of gas well differential characteristics affects the gas well productivity, effectively improving the analysis and optimization decision-making efficiency of the foam drainage well regime, and helping to effectively exert the productivity of foam drainage gas wells.
[0016] The present invention uses easily obtainable parameters to build a model, determines the data usage logic for different data dimension characteristics during model building, ensures the effective play of the role of data, guarantees the effective learning of different data information characteristics, and avoids the influence of subjective factors on the results.
[0017] When setting boundary conditions, the present invention fully considers the adaptability of the agent in the region and the on-site equipment situation, ensuring that the formed recommended results can be effectively implemented.
[0018] Under the condition of multi-objective optimization, the present invention comprehensively considers the constraint conditions of different objective parameters and determines the targeted output logic, avoiding the ambiguity problem of the output results and ensuring the uniqueness of the results. The present invention establishes a targeted algorithm performance guarantee mechanism, determines a targeted monitoring mechanism from two aspects of algorithm operation stability and effectiveness, and determines the corresponding algorithm self-optimization and self-iteration to ensure the continuous and effective operation of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 It is a schematic flowchart of the gas well foam drainage regime optimization method based on machine learning provided by the present invention; Figure 2 Schematic flow chart of another gas well foam drainage system optimization method provided by the present invention; Figure 3 Schematic structural diagram of a gas well foam drainage system optimization device provided by the present invention. Detailed implementation manners
[0021] In the embodiments of the present invention, by providing a gas well foam drainage system optimization method based on machine learning, the technical problem in the prior art that the foam drainage injection system of gas wells seriously depends on work experience is solved.
[0022] The technical solution of the present invention for solving the above technical problem has the following general idea: A gas well foam drainage system optimization method based on machine learning, the method includes: screening production parameters of foam drainage gas wells, gas reservoir parameters of foam drainage gas wells, and basic well parameters based on the correlation between dynamic and static characteristics of foam drainage gas wells and daily gas production to obtain an associated data set; dividing the associated data set into a training set and a test set; training a daily gas production prediction model for foam drainage gas wells based on the training set, and validating the daily gas production prediction model for foam drainage gas wells with the test set, and when the preset training requirements are met, outputting the daily gas production prediction model for foam drainage gas wells; determining the daily foam drainage agent injection volume range, injection cycle range, and dilution ratio range of the foam drainage gas well; constructing several groups of optimization parameters according to the daily foam drainage agent injection volume range, injection cycle range, and dilution ratio range of the foam drainage gas well, and inputting the optimization parameters into the daily gas production prediction model for foam drainage gas wells to obtain the predicted daily gas production corresponding to the optimization parameters, wherein one group of optimization parameters includes a daily foam drainage agent injection volume, an injection cycle, and a dilution ratio; screening several groups of optimization parameters with the goal of maximizing the predicted daily gas production to obtain the optimal optimization parameters.
[0023] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings of the specification and specific implementation manners.
[0024] First, it should be noted that the term "and / or" appearing in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0025] Foam drainage gas production is a process method in which a surfactant (foaming agent) is injected into a gas well, and low-density water-containing foam is generated by the agitation of the natural gas flow and carried from the bottom of the well to the ground with the gas flow, so as to carry the bottom-hole liquid to the ground and achieve the purpose of removing the bottom-hole liquid.
[0026] The present invention provides as Figure 1The shown machine learning-based optimization method for the foam drainage system of gas wells includes steps S11 - S16: Step S11, screen the production parameters of foam drainage gas wells, the reservoir parameters of foam drainage gas wells, and the basic well parameters based on the correlation between the dynamic and static characteristics of foam drainage gas wells and the daily gas production to obtain an associated dataset.
[0027] Specifically, it includes: constructing a basic dataset with the production parameters of foam drainage gas wells, the reservoir parameters of foam drainage gas wells, and the basic well parameters; screening the parameters in the basic dataset based on the Pearson correlation analysis method to obtain the parameters related to the daily gas production of foam drainage gas wells; constructing an associated dataset according to the parameters related to the daily gas production of foam drainage gas wells.
[0028] The production parameters of foam drainage gas wells can include gas well production data, foam drainage process system, etc.; the reservoir parameters of foam drainage gas wells can include EUR, porosity, permeability, and saturation, etc.; the basic well parameters can include wellbore structure and tubing string structure.
[0029] The Pearson Correlation Coefficient is a statistical index that measures the strength and direction of the linear relationship between two variables.
[0030] Based on the Pearson correlation coefficient, it can be measured which of the above parameters are related to the daily gas production of foam drainage gas wells, and the parameters related to the daily gas production of foam drainage gas wells are collected to obtain an associated dataset.
[0031] The associated dataset can include: daily gas production, daily water production, gas-water ratio, tubing head pressure, casing pressure, transmission pressure, wellhead temperature, cumulative production days of gas wells, cumulative gas production, cumulative water production, cumulative implementation duration of foam drainage, daily injection volume of foam drainage agent, injection cycle, dilution ratio, type of foam drainage agent; well type, mid-depth of reservoir, inner diameter of casing, outer diameter of tubing, inner diameter of tubing, depth of tubing; formation pressure, EUR, gas production index, and liquid production index.
[0032] It can be understood that the parameters related to the daily gas production of foam drainage gas wells can be divided into two categories, one is gas well static parameters and the other is production dynamic parameters. Gas well static parameters do not change with time, such as inner diameter of casing, outer diameter of tubing, inner diameter of tubing, depth of tubing, etc. (not fully listed), and production dynamic parameters are related to the dynamic conditions of production, which can include cumulative production days of gas wells, cumulative gas production, cumulative water production, etc. (not fully listed).
[0033] Step S12, divide the training set and the test set based on the associated dataset.
[0034] Specifically, it includes: splicing the parameters in the associated dataset according to the data information dimension to obtain a wide data table at each dimension level; sorting out the wide data table according to the correlation between the wide data table and the daily gas production of the bubble drainage well; dividing the training set and the test set based on the sorted wide data table.
[0035] According to the predefined data information dimensions (such as time dimension, geographical location dimension, production parameter dimension, etc.), the scattered parameters are horizontally spliced to obtain a wide data table, that is, each row represents an observation unit (such as the daily record of a bubble drainage well), and the columns contain all relevant feature variables (such as date, well depth, gas reservoir pressure, water production, etc.); the correlation between the wide data table and the daily gas production of the bubble drainage well can also be determined based on the Pearson correlation coefficient. When the Pearson correlation coefficient between the parameters in the wide data table and the daily gas production of the bubble drainage well is lower than the threshold, the parameter is removed to obtain the sorted wide data table (for the wide data table, reference can also be made to step S11 in patent document CN119337754B).
[0036] After obtaining the sorted wide data table, it can be divided into a training set and a test set according to a preset ratio. The training set and the test set are used to train the daily gas production prediction model of the bubble drainage well in the following text.
[0037] Step S13: Train the daily gas production prediction model of the bubble drainage well based on the training set and verify the daily gas production prediction model of the bubble drainage well with the test set. When the preset training requirements are met, output the daily gas production prediction model of the bubble drainage well.
[0038] Specifically, it includes: constructing a daily gas production prediction model of the bubble drainage well based on the training set, where the daily gas production prediction model of the bubble drainage well predicts the gas production of the bubble drainage well according to the time sequence; using DILATE as the loss function of the daily gas production prediction model of the bubble drainage well and Adam as the optimizer of the daily gas production prediction model of the bubble drainage well; when DILATE reaches the preset application requirements, input the test set into the daily gas production prediction model of the bubble drainage well. When the preset training requirements are met, output the daily gas production prediction model of the bubble drainage well.
[0039] The preset application requirements can be the number of training times, etc., and the preset training requirements can be the prediction result accuracy, etc., which can be determined according to the actual situation here. It can be understood that when inputting the training set into the daily gas production prediction model of the bubble drainage well, it can be input in the time sequence of each parameter so that the daily gas production prediction model of the bubble drainage well predicts the gas production of the bubble drainage well according to the time sequence.
[0040] DILATE is a combination of Dynamic Time Warping (DTW) and Temporal Localization Loss, aiming to solve the problem of time misalignment in time series prediction tasks. DILATE improves the prediction accuracy by simultaneously minimizing the shape difference and time localization error between the predicted sequence and the true sequence.
[0041] The Adam optimizer is an optimization algorithm with an adaptive learning rate. The Adam optimizer combines the advantages of two optimization algorithms, AdaGrad and RMSProp. The Adam optimizer can effectively accelerate stochastic gradient descent and automatically adjust the learning rate of each parameter.
[0042] Specifically, based on the training set, a prediction model for the daily gas production of foam drainage wells based on time series prediction is constructed. The correlation features between the parameters in the training set and the daily gas production of foam drainage wells are extracted to predict the daily gas production of foam drainage wells under static well conditions and production dynamic conditions. DILATE is used as the loss function for training the prediction model of the daily gas production of foam drainage wells, and the Adam optimizer is selected. The state update parameters are changed until DILATE meets the preset application requirements, and the preset application requirements can be determined according to the actual situation.
[0043] The test set is input into the prediction model of the daily gas production of foam drainage wells to test the effectiveness and accuracy of the established prediction model of the daily gas production of foam drainage wells. If the results meet the preset training requirements, it indicates that the prediction model of the daily gas production of foam drainage wells has effectively learned the influence of each parameter on the daily gas production of foam drainage wells and has the basic conditions for using the model.
[0044] If the preset training requirements are not met, the prediction model of the daily gas production of foam drainage wells formed is optimized and iterated until the test set is brought into the prediction model of the daily gas production of foam drainage wells to meet the preset training requirements.
[0045] Step S14, determine the daily injection amount range, injection cycle range, and dilution ratio range of the foam drainage agent for the foam drainage well.
[0046] Specifically, it includes: determining the daily injection amount range of the foam drainage agent for the foam drainage well according to the effective concentration range of the foam drainage agent and the daily water production of the foam drainage well; determining the injection cycle range and dilution ratio range according to the performance of the injection equipment used for the foam drainage well.
[0047] In the relevant field, the daily injection amount range of the foam drainage agent for the foam drainage well can be determined according to the effective concentration range of the foam drainage agent and the daily water production of the foam drainage well.
[0048] The performance of the injection equipment can include the maximum and minimum injection rates, stability, and accuracy of the equipment, etc.
[0049] According to the performance of the injection equipment, the injection cycle range and the dilution ratio range (the dilution ratio of water and foam drainage agent) can be determined.
[0050] Step S15: Construct several groups of optimized parameters according to the daily injection amount range, injection cycle range and dilution ratio range of the foam drainage agent in the foam drainage gas well, and input the optimized parameters into the daily gas production prediction model of the foam drainage gas well to obtain the predicted daily gas production corresponding to the optimized parameters. Among them, a group of optimized parameters includes a daily injection amount of the foam drainage agent, an injection cycle and a dilution ratio.
[0051] Select any one of the daily injection amount of the foam drainage agent, an injection cycle range and a dilution ratio from the daily injection amount range, injection cycle range and dilution ratio range of the foam drainage agent in the foam drainage gas well to form a group of optimized parameters (several groups of optimized parameters can be obtained by using the particle swarm optimization algorithm).
[0052] Input the optimized parameters into the daily gas production prediction model of the foam drainage gas well, and the predicted daily gas production corresponding to the optimized parameters can be obtained.
[0053] Step S16: Screen several groups of optimized parameters with the goal of maximizing the predicted daily gas production to obtain the optimal optimized parameters.
[0054] Specifically, it includes: with the goal of maximizing the predicted daily gas production, screen out the optimized parameters corresponding to the maximum predicted daily gas production from several groups of optimized parameters. If the optimized parameters corresponding to the maximum predicted daily gas production are only one group, then take this group of optimized parameters as the optimal optimized parameters; if the optimized parameters corresponding to the maximum predicted daily gas production are two groups or more, then with the goal of the lowest cost, screen out the optimized parameters with the lowest cost from several optimized parameters corresponding to the maximum predicted daily gas production; if the optimized parameters with the lowest cost are only one group, then take this group of optimized parameters as the optimal optimized parameters; if the optimized parameters with the lowest cost are two groups or more, then with the goal of the least on-site additional workload, screen out the optimal optimized parameters from several optimized parameters with the lowest cost.
[0055] The lowest cost means the lowest usage amount of the foam drainage agent, and the least on-site additional workload means the least actions of relevant personnel to adjust the injection equipment.
[0056] The method also includes: determining the deviation value according to the optimal optimized parameters of the foam drainage gas well; when the deviation value is greater than the preset threshold, update the daily gas production prediction model of the foam drainage gas well.
[0057] It can be understood that when predicting the same foam drainage gas well, there should not be too large a parameter gap between two optimal optimized parameters with a small time sequence difference. When the parameter gap is too large, it means that the deviation is too large, and the daily gas production prediction model of the foam drainage gas well needs to be retrained.
[0058] To ensure the stability and effectiveness of the algorithm, when a deviation occurs, the self-iteration mechanism is triggered to update and iterate the algorithm, ensuring the performance of the algorithm.
[0059] All the characteristics of the foam drainage regime can be brought into the model again for retraining the model to address the problem of reduced model stability after the production characteristics change; when the effectiveness of the algorithm deviates, combined with the feedback results of the algorithm effectiveness, based on the accurate recommendations in the previous stage, focus on analyzing the data characteristics with ineffective recommendations, and conduct re-learning and training for the data characteristics with poor effects, thereby improving the effectiveness of the algorithm results.
[0060] The foam drainage regime optimization method based on machine learning provided by the present invention can also refer to Figure 2 .
[0061] In summary, the present invention provides a method for optimizing the foam drainage regime of gas wells based on machine learning. The method includes: screening the production parameters of foam drainage gas wells, the reservoir parameters of foam drainage gas wells, and the basic well parameters based on the gas production correlation of the daily gas production of foam drainage gas wells to obtain an associated data set; dividing the training set and the test set based on the associated data set; training the daily gas production prediction model of foam drainage gas wells based on the training set, and validating the daily gas production prediction model of foam drainage gas wells with the test set. When the preset training requirements are met, the daily gas production prediction model of foam drainage gas wells is output; determining the daily injection amount range, injection cycle range, and dilution ratio range of the foam drainage agent for foam drainage gas wells; constructing several groups of optimization parameters according to the daily injection amount range, injection cycle range, and dilution ratio range of the foam drainage agent for foam drainage gas wells, and inputting the optimization parameters into the daily gas production prediction model of foam drainage gas wells to obtain the predicted daily gas production corresponding to the optimization parameters, where a group of optimization parameters includes a daily injection amount of the foam drainage agent, an injection cycle, and a dilution ratio; screening several groups of optimization parameters with the goal of maximizing the predicted daily gas production to obtain the optimal optimization parameters. The present invention uses easily obtainable parameters to build a model, determines the data usage logic for different data dimension features during model building, ensures the effective utilization of data, guarantees the effective learning of different data information features, and avoids the influence of subjective factors on the results. When setting the boundary conditions, the present invention fully considers the adaptability of the agent in the region and the on-site equipment conditions to ensure that the recommended results can be effectively implemented and applied. In the case of multi-objective optimization, the present invention comprehensively considers the constraint conditions of different target parameters and determines the targeted output logic to avoid the ambiguity problem of the output results and ensure the uniqueness of the results. The present invention establishes a targeted algorithm performance guarantee mechanism, determines the targeted monitoring mechanism from two aspects of the stability and effectiveness of the algorithm operation, and determines the corresponding algorithm self-optimization and self-iteration to ensure the continuous and effective operation of the algorithm. The present invention realizes the online, near-real-time, and dynamic determination of the injection and production work regime through a data-driven method, effectively solves the contradictions of large workload, low timeliness, and low coverage of gas well difference characteristics in the analysis of the foam drainage gas well regime, which affect the gas well productivity, effectively improves the analysis and optimization decision-making efficiency of the foam drainage well regime effect, and helps to effectively exert the productivity of the foam drainage gas well.
[0062] Based on the same inventive concept, the present invention provides a Figure 3 device for optimizing the foam drainage regime of gas wells based on machine learning as shown in The basic data screening module 31 is used to screen the production parameters of foam drainage gas wells, the reservoir parameters of foam drainage gas wells, and the basic well parameters based on the correlation between the dynamic and static characteristics of foam drainage gas wells and the daily gas production to obtain an associated data set; The dividing module 32 is used to divide the training set and the test set based on the associated data set; The model training module 33 is configured to train the daily gas production prediction model for the foam drainage gas well based on a training set, and validate the daily gas production prediction model for the foam drainage gas well with a test set. When the preset training requirements are met, the daily gas production prediction model for the foam drainage gas well is output; The range determination module 34 is configured to determine the range of daily foam drainage agent injection volume, the range of injection cycle, and the range of dilution ratio for the foam drainage gas well; The prediction module 35 is configured to construct several sets of optimization parameters according to the range of daily foam drainage agent injection volume, the range of injection cycle, and the range of dilution ratio of the foam drainage gas well, and input the optimization parameters into the daily gas production prediction model for the foam drainage gas well to obtain the predicted daily gas production corresponding to the optimization parameters. Among them, a set of optimization parameters includes a daily foam drainage agent injection volume, an injection cycle, and a dilution ratio; The optimal parameter screening module 36 is configured to screen several sets of optimization parameters with the goal of maximizing the predicted daily gas production to obtain the optimal optimization parameters.
[0063] Based on the same inventive concept, the present invention also provides an electronic device, including: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to execute to implement the optimization method for the foam drainage system of the gas well provided as described above.
[0064] Based on the same inventive concept, the present invention also provides a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute to implement the optimization method for the foam drainage system of the gas well provided as described above.
[0065] Since the electronic device introduced in this embodiment is the electronic device adopted for implementing the information processing method in the embodiments of the present invention, based on the information processing method introduced in the embodiments of the present invention, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment. Therefore, the specific implementation of how this electronic device implements the method in the embodiments of the present invention will not be described in detail here. As long as the electronic device adopted by those skilled in the art to implement the information processing method in the embodiments of the present invention falls within the scope of protection of the present invention.
[0066] Those skilled in the art will appreciate that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0067] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and combinations of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate means for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks.
[0068] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in Figure 1 one or more of the flows Figure 1 or blocks.
[0069] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks.
[0070] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concept. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0071] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. An optimization method for the foam drainage system of gas wells based on machine learning, characterized in that, The method includes: Based on the correlation between the dynamic and static characteristics of the foam drainage well and the daily gas production, screening the production parameters of the foam drainage well, the reservoir parameters of the foam drainage well, and the basic well parameters to obtain an associated data set; Based on the associated data set, dividing the training set and the test set; Based on the training set, training the daily gas production prediction model of the foam drainage well, and verifying the daily gas production prediction model of the foam drainage well with the test set. When the preset training requirements are met, outputting the daily gas production prediction model of the foam drainage well; Determining the range of daily foam drainage agent injection volume, injection cycle range, and dilution ratio range for the foam drainage well; According to the range of daily foam drainage agent injection volume, injection cycle range, and dilution ratio range of the foam drainage well, constructing several groups of optimization parameters, and inputting the optimization parameters into the daily gas production prediction model of the foam drainage well to obtain the predicted daily gas production corresponding to the optimization parameters. Among them, a group of optimization parameters includes a daily foam drainage agent injection volume, an injection cycle, and a dilution ratio; Taking the maximization of the predicted daily gas production as the goal, screening several groups of optimization parameters to obtain the optimal optimization parameters.
2. The method for optimizing the foam drainage system of a gas well based on machine learning according to claim 1, wherein Based on the correlation between the dynamic and static characteristics of the foam drainage well and the daily gas production, screening the production parameters of the foam drainage well, the reservoir parameters of the foam drainage well, and the basic well parameters to obtain an associated data set, including: Constructing a basic data set with the production parameters of the foam drainage well, the reservoir parameters of the foam drainage well, and the basic well parameters; Based on the Pearson correlation analysis method, screening the parameters in the basic data set to obtain the parameters related to the daily gas production of the foam drainage well; According to the parameters related to the daily gas production of the foam drainage well, constructing an associated data set.
3. The method for optimizing the foam drainage regime of a gas well based on machine learning according to claim 1, wherein Based on the associated data set, dividing the training set and the test set, including: According to the data information dimension, splicing the parameters in the associated data set to obtain a wide data table at each dimension level; According to the correlation between the wide data table and the daily gas production of the foam drainage well, sorting out the wide data table; Based on the sorted wide data table, dividing the training set and the test set.
4. The method for optimizing the foam drainage regime of a gas well based on machine learning according to claim 1, characterized in that, Based on the training set, training the daily gas production prediction model of the foam drainage well, and verifying the daily gas production prediction model of the foam drainage well with the test set. When the preset training requirements are met, outputting the daily gas production prediction model of the foam drainage well, including: Based on the training set, constructing a daily gas production prediction model of the foam drainage well, where the daily gas production prediction model of the foam drainage well predicts the gas production of the foam drainage well according to the time series; Taking DILATE as the loss function of the daily gas production prediction model of the foam drainage well and Adam as the optimizer of the daily gas production prediction model of the foam drainage well; When DILATE reaches the preset application requirements, inputting the test set into the daily gas production prediction model of the foam drainage well. When the preset training requirements are met, outputting the daily gas production prediction model of the foam drainage well.
5. The method for optimizing the foam drainage system of a gas well based on machine learning according to claim 1, wherein Determining the range of daily foam drainage agent injection volume, injection cycle range, and dilution ratio range for the foam drainage well, including: According to the effective concentration range of the foam drainage agent of the foam drainage well and the daily water production of the foam drainage well, determining the range of daily foam drainage agent injection volume of the foam drainage well; According to the performance of the injection equipment used in the foam drainage well, determining the injection cycle range and the dilution ratio range.
6. The method for optimizing the foam drainage system of a gas well based on machine learning according to claim 1, characterized in that With the goal of maximizing the predicted daily gas production, several sets of optimization parameters are screened to obtain the optimal optimization parameters, including: With the goal of maximizing the predicted daily gas production, the optimization parameters corresponding to the maximum predicted daily gas production are screened from several sets of optimization parameters. If the optimization parameters corresponding to the maximum predicted daily gas production are only one set, then this set of optimization parameters is used as the optimal optimization parameters; If the optimization parameters corresponding to the maximum predicted daily gas production are two sets or more, then with the goal of the lowest cost, the optimization parameters with the lowest cost are screened from several optimization parameters corresponding to the maximum predicted daily gas production; If the optimization parameters with the lowest cost are only one set, then this set of optimization parameters is used as the optimal optimization parameters; If the optimization parameters with the lowest cost are two sets or more, then with the goal of the minimum on-site additional workload, the optimal optimization parameters are screened from several optimization parameters with the lowest cost.
7. The method for optimizing the foam drainage regime of a gas well based on machine learning according to claim 1, wherein The method further includes: Determining the deviation value according to the optimal optimization parameters of the foam drainage gas well; When the deviation value is greater than the preset threshold, the daily gas production prediction model of the foam drainage gas well is updated.
8. An optimization device for the gas well foam drainage system based on machine learning, characterized in that, The device includes: A basic data screening module, configured to screen the production parameters of the foam drainage gas well, the gas reservoir parameters of the foam drainage gas well, and the basic well parameters based on the correlation between the dynamic and static characteristics of the foam drainage gas well and the daily gas production to obtain an associated data set; A partitioning module, configured to partition a training set and a test set based on the associated data set; A model training module, configured to train the daily gas production prediction model of the foam drainage gas well based on the training set and verify the daily gas production prediction model of the foam drainage gas well with the test set. When the preset training requirements are met, the daily gas production prediction model of the foam drainage gas well is output; A range determination module, configured to determine the daily foam injection amount range, the injection cycle range, and the dilution ratio range of the foam drainage agent for the foam drainage gas well; A prediction module, configured to construct several sets of optimization parameters according to the daily foam injection amount range, the injection cycle range, and the dilution ratio range of the foam drainage agent of the foam drainage gas well, and input the optimization parameters into the daily gas production prediction model of the foam drainage gas well to obtain the predicted daily gas production corresponding to the optimization parameters. Among them, a set of optimization parameters includes a daily foam injection amount, an injection cycle, and a dilution ratio; An optimal parameter screening module, configured to screen several sets of optimization parameters with the goal of maximizing the predicted daily gas production to obtain the optimal optimization parameters.
9. An electronic device, characterized in that, Including: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to execute to implement the optimization method for the foam drainage system of gas wells based on machine learning as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute to implement the optimization method for the foam drainage system of gas wells based on machine learning as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Well group injection and production scheme optimization method, device, equipment and medium based on logistic regression algorithm
CN119337754B
Filling method and device of foam drainage agent and foam drainage ball for device
CN113006753A
Natural gas customer analysis method and system based on clustering algorithm
CN113191802A
Method for intelligently adding foam drainage agent based on data driving and side cloud cooperation to solve gas well water blockage
CN114169217A
Gas well daily gas production rate prediction method and determination device, electronic equipment and storage medium
CN116502772A