Plunger gas well gas production optimization method, device and equipment based on federal learning
Through the method based on federal learning, gas well gas production prediction and plunger work plan optimization, the problems of low gas production prediction accuracy and inadequate working system in the existing technology are solved, and more efficient intelligent management of gas well production is achieved.
Patent Information
- Application Number
- CN202510702820.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-05-29
AI Technical Summary
In the prior art, the prediction accuracy of gas production prediction of gas wells is limited, and the recommended method for plunger working system lacks personalization and adaptability, making it difficult to cope with complex geological conditions and dynamic production environment.
Using a federated learning-based method, by obtaining the plunger cycle data of multiple gas wells for cleaning and conversion, a multi-branch deep neural network model is constructed for gas production prediction, and a multi-objective optimization algorithm is used to generate and iteratively optimize the plunger work plan.
The accuracy of gas production prediction of gas wells is improved, and the intelligence of gas well production is realized, which can better adapt to complex geological conditions and dynamic production environment, ensuring the normal lifting of the plunger gas well.
Smart Images

Figure CN120235080A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optimizing gas production in plunger gas wells, and particularly to a method, device, and equipment for optimizing gas production in plunger gas wells based on federated learning. Background Art
[0002] Plunger gas lift is a technology that uses a plunger as a mechanical interface between gas and liquid. In the formation and the annulus between the tubing and the casing, the gas in the reservoir pushes the plunger to periodically discharge the liquid, thereby effectively reducing gas channeling and liquid fallback, and reducing the liquid "slip" effect.
[0003] Traditional gas well gas production prediction methods mostly rely on empirical models or simple statistical analysis for manual parameter adjustment, and often cannot fully exploit the rich information under the background of big data, resulting in limited prediction accuracy. At the same time, the existing plunger operating regime recommendation methods are usually based on fixed rules, lacking personalization and adaptability, and it is difficult to cope with complex geological conditions and dynamic production environments. In view of this, the present invention provides a method for optimizing gas production in plunger gas wells based on federated learning. Summary of the Invention
[0004] By providing a method, device, and equipment for optimizing gas production in plunger gas wells based on federated learning, the present invention solves the technical problem of limited prediction accuracy in gas well gas production prediction in the prior art, and achieves the technical effect of intelligent gas well production.
[0005] In a first aspect, the present invention provides a method for optimizing gas production in plunger gas wells based on federated learning, the method comprising: Obtain the plunger cycle data of a number of gas wells, and perform multi-stage cleaning and conversion on the plunger cycle data to obtain the sliding window combined plunger cycle gas production data of each gas well, where each gas well belongs to the same gas gathering station, and each gas well corresponds to a number of sliding window combined plunger cycle gas production data; Based on a distributed federated learning framework, train a multi-branch deep neural network model with the sliding window combined plunger cycle gas production data and pressure data of each gas well to obtain a gas production prediction model; Generate a number of plunger operating schemes based on a multi-objective optimization algorithm, and iterate the plunger operating schemes based on the cycle gas production under each plunger operating scheme output by the gas production prediction model, and finally obtain an optimal plunger operating scheme.
[0006] Further, performing multi-stage cleaning and conversion on the plunger cycle data includes: Obtain the daily gas production of the gas well, and determine the cycle gas production of the cycle of the gas well according to the open well duration and daily gas production of each cycle of the gas well on that day, where the plunger cycle data includes the open well duration and the cycle gas production; Screen the opening time according to the frequency distribution of the opening time; Screen the gas production per cycle according to the frequency distribution of the gas production per cycle; After the screening is completed, based on the sliding window, combine the preset number of plunger cycle data to obtain the sliding window combined plunger cycle gas production data.
[0007] Further, based on the distributed federated learning framework, train the multi-branch deep neural network model with the sliding window combined plunger cycle gas production data and pressure data of each gas well to obtain a gas production prediction model, including: Build a horizontal federated learning framework with the sliding window combined plunger cycle gas production data of each gas well in the same gas gathering station. The horizontal federated learning framework includes a central server and multiple local clients, and one gas well corresponds to one local client; Aggregate in the central server to obtain the global model of the multi-branch deep neural network model; Train the multi-branch deep neural network model based on the sliding window combined plunger cycle gas production data and pressure data of each gas well, where the pressure data includes tubing pressure, casing pressure, and export pressure; When the preset training requirements are met, use the multi-branch deep neural network model as the gas production prediction model.
[0008] Further, the global model includes:
[0009] Among them, is the global model parameter, is the learning rate, is the number of local clients, is the local client the number of data samples, is the sum of the number of data samples of all local clients, is the local client the local loss function with respect to the global model parameter gradient.
[0010] Further, the loss training function of the multi-branch deep neural network model includes:
[0011] Among them, is the loss training function of the multi-branch deep neural network model, is the total number of samples input into the multi-branch deep neural network model, is the true gas production of the th sample, For the The predicted gas production of each sample.
[0012] Furthermore, several plunger working schemes are generated based on the multi-objective optimization algorithm, including: According to the number of gas wells in the gas gathering station, the population size, crossover rate and mutation rate are determined, including:
[0013] in, is the number of gas wells in the gas gathering station, is the population size, is the crossover rate, is the mutation rate; After obtaining the population size, it is adjusted according to the preset time length to obtain 3N plunger working schemes.
[0014] Furthermore, based on the periodic gas production under each plunger working scheme output by the gas production prediction model, the plunger working scheme is iterated to finally obtain the optimal plunger working scheme, including: S131, average pressure data corresponding to the gas production data of each sliding window combination plunger period; S132, after splicing the average pressure data with the plunger working scheme, input them into the gas production prediction model together to obtain the periodic gas production under each spliced plunger working scheme; S133, retaining the plunger working scheme before the preset position, and re-performing cross-matching and mutation to obtain a new plunger working scheme; S134, repeating steps S132-S133, when the number of consecutive iterations reaches a preset number and the periodic gas production corresponding to the plunger working scheme does not increase, the optimal plunger working scheme is obtained.
[0015] Further, when the optimal plunger working scheme is applied, the method further comprises: Calculate the load factor at the time of well opening; If the load factor at the time of well opening is greater than or equal to the mean load factor, the well is opened; if it is less than, the well is shut in. The mean load factor includes:
[0016] in, is the mean value of the load factor, is the number of cycles, For the Casing pressure per cycle, For the Oil pipe pressure per cycle, For the The line pressure for each cycle.
[0017] In a second aspect, the present invention provides a plunger gas well gas production optimization device based on federated learning, the device comprising: A data acquisition module, configured to acquire plunger cycle data of a plurality of gas wells, perform multi-stage cleaning and conversion on the plunger cycle data, and obtain sliding window combined plunger cycle gas production data of each gas well, wherein each gas well belongs to the same gas gathering station, and each gas well corresponds to a plurality of sliding window combined plunger cycle gas production data; A model training module, configured to train a multi-branch deep neural network model based on the sliding window combined plunger cycle gas production data and pressure data of each gas well in a distributed federated learning framework to obtain a gas production prediction model; A scheme generation module, configured to generate a plurality of plunger working schemes based on a multi-objective optimization algorithm, and iterate the plunger working schemes based on the cycle gas production under each plunger working scheme output by the gas production prediction model, and finally obtain an optimal plunger working scheme.
[0018] 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 a plunger gas well gas production optimization method provided in the first aspect.
[0019] One or more technical solutions provided in the present invention have at least the following technical effects or advantages: The present invention performs data cleaning on the data of each plunger gas well, uses the data of multiple gas wells to train a neural network model under federated learning to predict the cycle gas production of each gas well, uses a multi-objective optimization algorithm combined with the neural network to screen out the optimal plunger working scheme that meets the conditions, and calculates the load coefficient in the actual process to ensure the normal lifting of the plunger gas well. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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.
[0021] Figure 1 It is a schematic flow chart of a plunger gas well gas production optimization method based on federated learning provided by the present invention; Figure 2 It is a schematic flow chart of another plunger gas well gas production optimization method based on federated learning provided by the present invention; Figure 3Schematic flow chart of the plunger working plan provided by the present invention; Figure 4 Schematic diagram of the predicted gas production after iteration provided by the present invention. Detailed implementation manners
[0022] In an embodiment of the present invention, by providing an optimization method for plunger gas well gas production based on federated learning, the technical problem of limited prediction accuracy in gas well gas production prediction in the prior art is solved.
[0023] The technical solution of the present invention for solving the above technical problem has the following general idea: An optimization method for plunger gas well gas production based on federated learning, the method includes: obtaining the plunger cycle data of several gas wells, and performing multi-stage cleaning and conversion on the plunger cycle data to obtain the sliding window combined plunger cycle gas production data of each gas well, where each gas well belongs to the same gas gathering station, and each gas well corresponds to several sliding window combined plunger cycle gas production data; based on the distributed federated learning framework, using the sliding window combined plunger cycle gas production data and pressure data of each gas well to train a multi-branch deep neural network model to obtain a gas production prediction model; generating several plunger working plans based on a multi-objective optimization algorithm, and iterating the plunger working plans based on the cycle gas production under each plunger working plan output by the gas production prediction model, and finally obtaining the optimal plunger working plan.
[0024] 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.
[0025] 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 front and rear associated objects.
[0026] Plunger gas lift is a technology that uses a plunger as a mechanical interface between gas and liquid. In the formation and the annulus between the tubing and the casing, the gas in the reservoir pushes the plunger to periodically discharge the liquid, thereby effectively reducing gas channeling and liquid fallback and reducing the liquid "slip" effect.
[0027] In the fields of mechanical and petroleum engineering, a plunger refers to a solid component with a tight fit. The plunger can slide inside a pump or a pipeline and is used to push fluids or isolate different types of fluids.
[0028] The present invention provides a Figure 1 Optimization method for plunger gas well gas production based on federated learning as shown, including steps S11 - S13: Step S11: Obtain the plunger cycle data of several gas wells, and perform multi-stage cleaning and transformation on the plunger cycle data to obtain the sliding window combined plunger cycle gas production data of each gas well. Each gas well belongs to the same gas gathering station, and each gas well corresponds to several pieces of sliding window combined plunger cycle gas production data.
[0029] Performing multi-stage cleaning and transformation on the plunger cycle data includes: obtaining the daily gas production of the gas well, and determining the cycle gas production of the cycle of the gas well according to the open well duration and daily gas production of each cycle of the gas well on that day. Among them, the plunger cycle data includes the open well duration and the cycle gas production; screening the open well duration according to the frequency distribution of the open well duration; screening the cycle gas production according to the frequency distribution of the cycle gas production; after the screening is completed, based on the sliding window, combine a preset number of plunger cycle data to obtain the sliding window combined plunger cycle gas production data.
[0030] The plunger cycle data refers to the data of relevant parameters in each working cycle (i.e., a complete up and down stroke) during the process of plunger gas lift for oil and gas production. The plunger cycle data includes the open well duration, the shut-in well duration, and the cycle gas production.
[0031] Generally speaking, a gas well will be opened and shut in multiple times in a day, and gas can be produced when the well is open. The combination of an open well duration and a shut-in well duration of a gas well can be recorded as a piece of plunger cycle data (the opening and shutting in of the same well are continuous and non-repetitive).
[0032] Usually, the data only records the daily gas production and the gas production rate of the same well varies little. Therefore, the daily gas production can be converted into the cycle gas production of this cycle by calculating the proportion of the open well duration in each cycle to the total open well duration of the day as the weight.
[0033] Regarding the selection of the open well duration, each gas well can select a suitable duration interval according to the frequency distribution of its opening and shutting in durations, and exclude those cases where the opening and shutting in durations are abnormally long or short. Here, it can be determined according to actual experience, or a threshold can be set for screening and elimination. In addition, the shut-in well duration can also be selected.
[0034] Regarding the selection of the cycle gas production, each gas well can determine an appropriate cycle gas production interval according to the frequency distribution of its cycle gas production, and can directly eliminate the abnormally high gas production data generated by only one cycle in a day.
[0035] In addition, the isolation forest method based on decision trees can be adopted. By setting an outlier score threshold and removing outlier data, the total amount of removed data can be no more than 5% of the total data volume, so as to identify and remove isolated outliers that are significantly different from other cycle data in terms of feature distribution. By constructing random trees to evaluate the outlier degree of data points, those data that deviate from the normal pattern in the feature space can be effectively captured.
[0036] The preset quantity can be three. The plunger cycle data for three consecutive periods can be combined to obtain a sliding window combined plunger cycle gas production data. For example, if there are 10 plunger cycle data in Well A, the combination methods are 1, 2, 3; 2, 3, 4; 3, 4, 5... etc.
[0037] It should be noted that one gas well can correspond to several sliding window combined plunger cycle gas production data.
[0038] Step S12: Based on the distributed federated learning framework, use the sliding window combined plunger cycle gas production data and pressure data of each gas well to train the multi-branch deep neural network model to obtain a gas production prediction model.
[0039] Specifically, it includes: building a horizontal federated learning framework with the sliding window combined plunger cycle gas production data of each gas well in the same gas gathering station. The horizontal federated learning framework includes a central server and multiple local clients, and one gas well corresponds to one local client; aggregating in the central server to obtain the global model of the multi-branch deep neural network model; training the multi-branch deep neural network model based on the sliding window combined plunger cycle gas production data and pressure data of each gas well, where the pressure data includes tubing head pressure, casing pressure, and export pressure; when the preset training requirements are met, use the multi-branch deep neural network model as the gas production prediction model.
[0040] Build a horizontal federated learning framework with the sliding window combined plunger cycle gas production data in the same gas gathering station. The federated learning framework includes a central server and multiple local clients (each gas well represents a local client). Based on the federated learning framework, the multi-well data can be effectively utilized to improve the prediction accuracy and overcome the problem of insufficient single-well data volume.
[0041] Under the same gas gathering station, each sliding window combined plunger cycle gas production data is separately set as a local client to train a local model, and the global model is aggregated in the central server. The global model updates parameters. The update is carried out through the following formula, including:
[0042] Among them, is the global model parameter. is the learning rate, is the number of local clients, is the local client the number of data samples, is the sum of the number of data samples of all local clients, is the local client local loss function with respect to the global model parameters gradient.
[0043] The main branch of the multi-branch deep neural network model uses a multi-layer perceptron (MLP). The multi-layer perceptron can establish a non-linear relationship between pressure data and gas production data. The auxiliary branch extracts temporal local features through a temporal convolutional network (TCN) and captures cross-cycle global correlations through a multi-head self-attention module.
[0044] Among them, the MLP includes multiple hidden layers and activation functions to enhance the model's expressive ability and prediction accuracy. The TCN contains dilated convolutions, residual connections, activation functions, etc., and uses a multi-head self-attention module to weight and fuse the outputs of multiple branches. The pressure data and gas production data are processed through forward propagation and the weights are optimized through the backpropagation algorithm.
[0045] The loss training function of the multi-branch deep neural network model includes:
[0046] Among them, is the loss training function of the multi-branch deep neural network model, is the total number of samples input to the multi-branch deep neural network model, is the true gas production of the th sample, is the predicted gas production of the th sample.
[0047] When the maximum number of training times or accuracy is reached, the multi-branch deep neural network model can be output to obtain a gas production prediction model.
[0048] Step S13: Generate several plunger working schemes based on the multi-objective optimization algorithm, and iterate on the plunger working schemes based on the periodic gas production under each plunger working scheme output by the gas production prediction model, and finally obtain the optimal plunger working scheme.
[0049] Figure 3 is a schematic flow diagram for generating the plunger working scheme, where the regime is the plunger working scheme.
[0050] Generate several plunger working schemes based on the multi-objective optimization algorithm, including: Determine the population size, crossover rate, and mutation rate according to the number of gas wells in the gas gathering station, including:
[0051] Among them, is the number of gas wells in the gas gathering station, is the population size, is the crossover rate, is the mutation rate; After obtaining the population size, adjust it with a preset time length to obtain 3N plunger working schemes.
[0052] Among them, the population size increases linearly with the number of gas wells in the gas gathering station, and the crossover rate and mutation rate are dynamically adjusted based on logarithmic functions to ensure the search efficiency in complex scenarios.
[0053] After generating N switching well regimes (plunger working schemes), based on the principle of multi-point detection, fine-tune the plunger working schemes in terms of time by increasing or decreasing the preset time length on the original basis (that is, increasing the preset time length for the well opening duration at the same time and decreasing the preset time length for the well opening duration at the same time), and finally obtain a total of 3N different plunger working schemes. The preset time length can be 5 minutes.
[0054] Based on the periodic gas production of each plunger working scheme output by the gas production prediction model, iterate the plunger working schemes, and finally obtain the optimal plunger working scheme, including: S131, the average pressure data corresponding to the periodic gas production data of each sliding window combined plunger; S132, splice the average pressure data with the plunger working scheme and input them into the gas production prediction model together to obtain the periodic gas production of each plunger working scheme after splicing; S133, retain the plunger working schemes before the preset ranking, and perform crossover pairing and mutation again to obtain new plunger working schemes; S134, repeat steps S132 - S133. When the continuous iteration times reach the preset number and the periodic gas production corresponding to the plunger working scheme does not increase, obtain the optimal plunger working scheme.
[0055] In the case where the plunger regime is not modified and there is no abnormality, the pressure data of each period are relatively close. To ensure the safety of well opening, the average value of the pressure data in the recent n periods can be determined, and this average value will be used as part of the input of the gas production prediction model (that is, the average oil pressure, average casing pressure, and average external transmission pressure within n periods).
[0056] Pair the above 3N different plunger working schemes with the corresponding average pressure data, and input them into the gas production prediction model for gas production prediction after pairing.
[0057] Through screening, retain the plunger working schemes whose gas production ranks before the preset position (for example, retain the top 20%). Randomly select the retained plunger working schemes for cross - pairing to generate new plunger well - opening and well - closing systems. Perform mutation operations on the data of the cross - paired plunger well - opening and well - closing systems, and the mutation rate is controlled within 15% to increase diversity and explore more possible solutions.
[0058] In addition, in order to reduce the difference between the unimplemented plunger working schemes and the implemented plunger working schemes, the historical data mean of the well - opening and well - closing durations of each cycle of each gas well can be used, plus or minus 3 times the variance, to determine the time extreme values of the unimplemented plunger working schemes.
[0059] By predicting the gas production, perform iterative cycles of crossover and mutation. When the predicted gas production no longer increases for m consecutive times (for example, 3 times) of iteration, the obtained result is the optimal plunger recommendation scheme. Based on the idea of multi - point detection, detect the convergence of the recommendation result. Three results are output in each round. After multiple iterations, the final result will tend to converge, thereby improving the reliability and effectiveness of the scheme. Figure 4 It is a schematic diagram of the predicted gas production after iteration.
[0060] To ensure the safety of the scheme, when applying the optimal plunger working scheme, the method further includes: Calculate the load coefficient at the well - opening moment; If the load coefficient at the well - opening moment is greater than or equal to the mean load coefficient, open the well; if it is less, continue to close the well until the load coefficient at the well - opening moment is greater than or equal to the mean load coefficient, where the mean load coefficient includes:
[0061] Among them, is the mean load coefficient, is the number of cycles, is the casing pressure of the th cycle, is the tubing pressure of the th cycle, is the pipeline pressure of the
[0062] Figure 2 This is another plunger gas well gas production optimization method provided by the present invention based on federated learning.
[0063] In summary, the present invention provides a plunger gas well gas production optimization method based on federated learning. The method includes: obtaining the plunger cycle data of several gas wells, and performing multi-stage cleaning and conversion on the plunger cycle data to obtain the sliding window combined plunger cycle gas production data of each gas well, where each gas well belongs to the same gas gathering station, and each gas well corresponds to several sliding window combined plunger cycle gas production data; based on the distributed federated learning framework, using the sliding window combined plunger cycle gas production data and pressure data of each gas well to train a multi-branch deep neural network model to obtain a gas production prediction model; generating several plunger working schemes based on the multi-objective optimization algorithm, and iterating the plunger working schemes based on the cycle gas production under each plunger working scheme output by the gas production prediction model to finally obtain the optimal plunger working scheme. The present invention performs data cleaning on the data of each plunger gas well, uses the data of multiple gas wells to train a neural network model under federated learning to predict the cycle gas production of each gas well, uses the multi-objective optimization algorithm combined with the neural network to screen the optimal plunger working scheme that meets the conditions, and calculates the load coefficient in the actual process to ensure the normal lifting of the plunger gas well.
[0064] Based on the same inventive concept, the present invention provides a plunger gas well gas production optimization device based on federated learning. The device includes: A data acquisition module, configured to obtain the plunger cycle data of several gas wells, and perform multi-stage cleaning and conversion on the plunger cycle data to obtain the sliding window combined plunger cycle gas production data of each gas well, where each gas well belongs to the same gas gathering station, and each gas well corresponds to several sliding window combined plunger cycle gas production data; A model training module, configured to train a multi-branch deep neural network model based on the distributed federated learning framework using the sliding window combined plunger cycle gas production data and pressure data of each gas well to obtain a gas production prediction model; A scheme generation module, configured to generate several plunger working schemes based on the multi-objective optimization algorithm, and iterate the plunger working schemes based on the cycle gas production under each plunger working scheme output by the gas production prediction model to finally obtain the optimal plunger working scheme.
[0065] Based on the same inventive concept, the present invention 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 a plunger gas well gas production optimization method based on federated learning.
[0066] Since the electronic device introduced in this embodiment is the one used to implement 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 used 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.
[0067] Those skilled in the art should understand 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 storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0068] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0069] 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 specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including instruction means, and the instruction means implements the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0070] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1Steps of the functions specified in one or more boxes.
[0071] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present invention.
[0072] 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. A plunger gas well gas production optimization method based on federated learning, characterized in that, The method includes: Obtain the plunger cycle data of several gas wells, perform multi-stage cleaning and conversion on the plunger cycle data to obtain the sliding window combined plunger cycle gas production data of each gas well, where each gas well belongs to the same gas gathering station, and each gas well corresponds to several sets of sliding window combined plunger cycle gas production data; Based on the distributed federated learning framework, use the sliding window combined plunger cycle gas production data and pressure data of each gas well to train a multi-branch deep neural network model to obtain a gas production prediction model; Generate several plunger working schemes based on the multi-objective optimization algorithm, and iterate the plunger working schemes based on the cycle gas production under each plunger working scheme output by the gas production prediction model to finally obtain the optimal plunger working scheme.
2. The gas production optimization method for plunger gas wells based on federated learning according to claim 1, wherein, Performing multi-stage cleaning and conversion on the plunger cycle data includes: Obtain the daily gas production of the gas well, and determine the cycle gas production of the gas well in this cycle according to the open well duration and daily gas production of each cycle of the gas well on this day. Among them, the plunger cycle data includes the open well duration and the cycle gas production; Screen the open well duration according to the frequency distribution of the open well duration; Screen the cycle gas production according to the frequency distribution of the cycle gas production; After the screening is completed, based on the sliding window, combine a preset number of plunger cycle data to obtain the sliding window combined plunger cycle gas production data.
3. The gas production optimization method for plunger gas wells based on federated learning according to claim 1, wherein, Based on the distributed federated learning framework, use the sliding window combined plunger cycle gas production data and pressure data of each gas well to train a multi-branch deep neural network model to obtain a gas production prediction model, including: Build a horizontal federated learning framework with the sliding window combined plunger cycle gas production data of each gas well in the same gas gathering station. The horizontal federated learning framework includes a central server and multiple local clients, and one gas well corresponds to one local client; Aggregate in the central server to obtain the global model of the multi-branch deep neural network model; Based on the sliding window combined plunger cycle gas production data and pressure data of each gas well, train the multi-branch deep neural network model, where the pressure data includes the tubing head pressure, casing pressure, and export pressure; When the preset training requirements are met, use the multi-branch deep neural network model as the gas production prediction model.
4. The gas production optimization method for plunger gas wells based on federated learning according to claim 3, wherein The global model includes: Among them, are global model parameters, is the learning rate, is the number of local clients, is the local client the number of data samples, is the sum of the number of data samples of all local clients, is the local client local loss function with respect to the global model parameters gradient.
5. The gas production optimization method for plunger gas wells based on federated learning according to claim 3, wherein The loss training function of the multi-branch deep neural network model includes: Among them, is the loss training function of the multi-branch deep neural network model, is the total number of samples input into the multi-branch deep neural network model, is the true gas production of the th sample, is the predicted gas production of the 6. The gas production optimization method for plunger gas wells based on federated learning according to claim 1, wherein, Generating several plunger working schemes based on the multi-objective optimization algorithm includes: Determine the population size, crossover rate, and mutation rate according to the number of gas wells in the gas gathering station, including: Among them, is the number of gas wells in the gas gathering station, is the population size, is the crossover rate, is the mutation rate; After obtaining the population size, adjust it with a preset time length to obtain 3N plunger working schemes.
7. The gas production optimization method for plunger gas wells based on federated learning according to claim 6, characterized in that Iterating the plunger working schemes based on the cycle gas production under each plunger working scheme output by the gas production prediction model to finally obtain the optimal plunger working scheme, including: S131, the average pressure data corresponding to each sliding window combined plunger cycle gas production data; S132, after splicing the average pressure data with the plunger working scheme, input them into the gas production prediction model together to obtain the cycle gas production under each spliced plunger working scheme; S133. Retain the plunger working scheme before the preset position, perform cross-pairing and mutation again, and obtain a new plunger working scheme; S134. Repeat steps S132 - S133. When the number of consecutive iterations reaches the preset quantity and the periodic gas production volume corresponding to the plunger working scheme does not increase, obtain the optimal plunger working scheme.
8. The gas production optimization method for plunger gas wells based on federated learning according to claim 7, characterized in that, When applying the optimal plunger working scheme, the method further includes: Calculate the load coefficient at the well-opening moment; If the load coefficient at the well-opening moment is greater than or equal to the average load coefficient, open the well; if it is less, continue to close the well, where the average load coefficient includes: Among them, is the mean load factor, is the number of cycles, is the casing pressure in the th cycle, is the tubing pressure in the th cycle, is the pipeline pressure in the th cycle.
9. A plunger gas well gas production optimization device based on federated learning, characterized in that, The device includes: A data acquisition module, configured to acquire the plunger cycle data of several gas wells, perform multi-stage cleaning and conversion on the plunger cycle data, and obtain the sliding window combined plunger cycle gas production data of each gas well, where each gas well belongs to the same gathering station, and each gas well corresponds to several sliding window combined plunger cycle gas production data; A model training module, configured to train a multi-branch deep neural network model based on the distributed federated learning framework with the sliding window combined plunger cycle gas production data and pressure data of each gas well to obtain a gas production prediction model; A scheme generation module, configured to generate several plunger working schemes based on a multi-objective optimization algorithm, and iterate the plunger working schemes based on the periodic gas production volume of each plunger working scheme output by the gas production prediction model, and finally obtain the optimal plunger working scheme.
10. An electronic device, characterized in that, Includes: A processor; A memory for storing executable instructions of the processor; Wherein, the processor is configured to execute to implement a plunger gas well gas production optimization method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Multi-target federated learning evolution method based on improved NSGA-III
CN114819181A
Plunger gas lift well yield increasing method based on multi-cycle wild dog optimization algorithm
CN118481579A
Plunger gas lift well group peak shifting well opening and closing scheduling optimization method
CN119338041A
Intelligent regulation and control method and equipment for gas reservoir water invasion and storage medium
CN119494267A