Gas well blockage prediction method and apparatus
By constructing a gas well production prediction model and a long short-term memory network, combined with the dynamic flow process of gas in the gas well, the problem of inaccurate gas well blockage detection was solved, and accurate and efficient prediction of gas well blockage and optimization of unblocking timing were achieved.
Patent Information
- Application Number
- PCT/CN2025/129980
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-10-25
- Filing Date
- 2025-10-24
- Publication Date
- 2026-04-30
AI Technical Summary
Existing gas well blockage prediction methods cannot effectively cope with the complex gas well blockage situation in oil and gas fields. Furthermore, the detection of the degree and location of blockage is inaccurate, and the timing of unblocking is difficult to determine, resulting in unblocking too early or too late, which increases costs.
By acquiring historical gas well production data, establishing training samples, and constructing a gas well production prediction model, a long short-term memory network model with forget gates, input gates, and output gates is used to calculate the gas well blockage history and prediction parameters. Combined with the dynamic gas flow process of the gas well, the blockage situation is judged and the degree of blockage is determined.
It enables accurate and efficient prediction of gas well blockage, quickly assesses the blockage situation and its severity, optimizes the timing of unblocking, and reduces costs.
Smart Images

Figure CN2025129980_30042026_PF_FP_ABST
Abstract
Description
A method and apparatus for predicting gas well blockage
[0001] Related applications
[0002] This application claims priority to Chinese Patent Application No. 202411505497.2, filed on October 25, 2024, and incorporates the entire contents of the aforementioned patent application as part of this disclosure. Technical Field
[0003] This disclosure relates to the field of oil and gas extraction technology, and in particular to a method and apparatus for predicting gas well blockage. Background Technology
[0004] The production characteristics of blocked wells vary depending on their location within a gas field. Wellbore blockage is typically caused by a variety of factors, and the blockage materials are diverse. Common blockage materials include downhole corrosion products, post-drilling residues, natural gas hydrates, related chemical agents, and elemental sulfur. In practice, wellbore blockages often consist of an inorganic framework with organic fillers. The mixture of these materials forms a dense, high-viscosity product with no voids, significantly reducing the conductivity of the gas flow channel. Over a long period, this blockage gradually accumulates on the pipe wall, leading to more severe wellbore blockage.
[0005] However, existing gas well blockage prediction methods can only predict a small number of blockages and cannot effectively address the complex blockage situations in oil and gas fields. Furthermore, due to the varying production characteristics of blockages in different locations within oilfields and the significant differences in blockage characteristics between wells using different processes, existing gas well blockage prediction methods suffer from inaccurate detection methods for the degree and location of blockages, difficulty in determining the timing of unblocking, and the problem that unblocking too early affects effectiveness while unblocking too late increases costs. Therefore, there is an urgent need for a gas well blockage prediction method that defines gas well blockage parameters based on gas flow theory, establishes a gas well blockage prediction model, and achieves accurate and efficient prediction of gas well blockages based on dynamic gas well production prediction data. Summary of the Invention
[0006] Given that current gas well blockage prediction methods can only predict a small number of blockages and cannot effectively address the complex blockage situations in oil and gas fields, and considering the different production characteristics of blockages in wells at different locations in oilfields and the significant differences in blockage characteristics between wells using different processes, existing gas well blockage prediction methods also suffer from inaccurate detection methods for the degree and location of blockages, difficulty in determining the timing of unblocking, and the problem that unblocking too early affects the effectiveness while unblocking too late increases costs, this disclosure is proposed to overcome or at least partially solve the above problems.
[0007] On the one hand, the purpose of some embodiments of this disclosure is to provide a method for predicting gas well blockage, the method including:
[0008] Obtain historical production data from gas wells;
[0009] Training samples were established based on historical gas well production data.
[0010] Establish a gas well production prediction model to capture time-series characteristics;
[0011] The gas well production prediction model is trained using training samples to obtain the trained gas well production prediction model, and gas well production prediction data is obtained based on the trained gas well production prediction model.
[0012] Based on the dynamic flow process of gas in gas wells, the historical parameters of gas well blockage corresponding to the historical production data of gas wells and the predicted parameters of gas well blockage corresponding to the predicted production data of gas wells are calculated respectively.
[0013] Based on the changing trends of historical parameters and predicted parameters of gas well blockage, determine whether a gas well has become blocked;
[0014] If a gas well becomes blocked, the maximum wellhead productivity when the well is not blocked and the maximum wellhead productivity when the well is blocked are calculated and compared based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well, and the degree of gas well blockage is determined based on the comparison results.
[0015] Furthermore, after obtaining historical gas well production data, the process further includes:
[0016] Normalize historical gas well production data; and / or,
[0017] Historical gas well production data is cleaned to remove abnormal and shut-in data.
[0018] Furthermore, the gas well production prediction model includes a forget gate, an input gate, and an output gate; wherein, the forget gate is used to calculate the discard information corresponding to the cell state at the previous time step, the input gate is used to calculate the retained information corresponding to the cell state at the current time step, and the output gate is used to calculate the output information corresponding to the cell state at the current time step.
[0019] Furthermore, a gas well production prediction model is trained using training samples to obtain a fully trained gas well production prediction model. Gas well production prediction data is then obtained based on this fully trained model, including:
[0020] The training samples are input into the gas well production prediction model, and the prediction results are obtained by forward propagation.
[0021] Calculate the loss based on the prediction results and the corresponding label information;
[0022] Backpropagation is performed based on the loss to update the network parameters in the gas well production prediction model;
[0023] Repeat the above steps of updating the network parameters in the gas well production prediction model using training samples until the preset convergence condition is met, and obtain the trained gas well production prediction model.
[0024] Obtain historical gas well production data for the well to be predicted;
[0025] Based on the trained gas well production prediction model, the gas well production prediction data corresponding to the historical gas well production data of the well to be predicted is obtained.
[0026] Furthermore, the loss is calculated based on the prediction results and the corresponding label information, including:
[0027] Based on the prediction results and the corresponding label information, the loss is calculated using a loss function with a regularization term.
[0028] Furthermore, based on the dynamic flow process of gas in the gas well, historical parameters of gas well blockage corresponding to historical gas well production data and predicted parameters of gas well blockage corresponding to predicted gas well production data are calculated, including:
[0029] Based on the dynamic flow process of gas in the gas well, and according to the historical production data of the gas well, the historical parameters of formation blockage, wellbore blockage, and surface blockage are calculated.
[0030] Based on the dynamic flow process of gas in the gas well, and according to the gas well production prediction data, the prediction parameters for formation blockage, wellbore blockage, and surface blockage are calculated.
[0031] Based on the blockage scenario, the historical parameters of gas well formation blockage, wellbore blockage, and surface blockage are filtered to obtain the first filtering result. Then, the predicted parameters of gas well formation blockage, wellbore blockage, and surface blockage are filtered to obtain the second filtering result.
[0032] Linear weighting operations are performed on the first screening results and the second screening results respectively to obtain the historical parameters of gas well blockage corresponding to the first screening results and the predicted parameters of gas well blockage corresponding to the second screening results.
[0033] Furthermore, based on the dynamic flow process of gas in the gas well and according to the historical production data of the gas well, historical parameters of formation blockage, wellbore blockage, and surface blockage are calculated, including:
[0034] Based on the flow process of gas from the formation to the bottom of the well, historical parameters of formation blockage in the gas well are calculated according to historical production data of the gas well.
[0035] Based on the flow process of gas from the bottom of the well to the wellhead, historical parameters of wellbore blockage are calculated according to historical gas well production data.
[0036] Based on the flow process of gas from the wellhead to the separator, historical parameters of surface blockage are calculated according to historical gas well production data.
[0037] Furthermore, based on the flow process of gas from the formation to the bottom of the well, and according to the gas well production history data, the historical parameters of gas well formation blockage are calculated using the following formula, including: in,
[0038] Where, p R p represents formation pressure. wf Indicates the bottom hole pressure of the gas well, A represents the laminar flow coefficient, B represents the turbulent flow coefficient, and q represents the bottom hole pressure of the gas well. sc Z represents the gas production rate, and Z represents the deviation coefficient at the current pressure. i Let G represent the deviation coefficient under the original conditions, where the deviation coefficient represents the ratio of the actual gas volume to the ideal gas volume, and G represents the original geological reserves. p p represents the current cumulative gas production. i Let q represent the original formation pressure, x represent the time series number, X represent the total time series number, and q represent the total time series number. scx R represents the gas production at time number x. f This indicates historical parameters related to formation blockage in gas wells.
[0039] Furthermore, based on the flow process of gas from the bottom of the well to the wellhead, and according to the historical production data of the gas well, the historical parameters of wellbore blockage are calculated using the following formula:
[0040] Where, p wf p represents the bottom hole pressure of a gas well. tf The gas wellhead pressure is represented by , e represents a dimensionless quantity with a value of 0.016, s represents an exponent, d represents the tubing inner diameter, f represents the coefficient of friction corresponding to temperature and pressure, and q represents the pressure at the wellhead. sc Indicates the volumetric flow rate of natural gas. represents the average wellbore temperature, R represents the average deviation coefficient of the wellbore. t This indicates historical parameters related to wellbore blockage.
[0041] Furthermore, based on the changing trends of historical parameters and predicted parameters of gas well blockage, it is determined whether a gas well has become blocked, including:
[0042] Calculate the changing trend of gas well blockage parameters based on historical and predicted gas well blockage parameters; the changing trend should include at least one or more of the increase and growth rate.
[0043] If any one of the parameters in the gas well blockage trend exceeds the corresponding preset threshold, the gas well will be blocked.
[0044] Furthermore, if a gas well becomes blocked, the maximum wellhead productivity when the well is unblocked and when it is blocked are calculated and compared based on gas well production prediction data and the dynamic relationship of formation inflow in the gas well. The degree of blockage is then determined based on the comparison results, including:
[0045] If a gas well becomes blocked, the maximum wellhead productivity when the well is not blocked and the maximum wellhead productivity when blocked are calculated using the following formulas based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well:
[0046] Among them, Q A q represents the maximum production capacity at the wellhead. sc P represents daily output. D P represents dimensionless pressure. R P represents the current formation pressure. tf Indicates wellhead pressure,
[0047] The degree of well blockage is determined by the ratio of the difference between the maximum wellhead productivity when the well is unblocked and the maximum wellhead productivity when the well is blocked to the maximum wellhead productivity when the well is unblocked.
[0048] Furthermore, after determining the degree of gas well blockage, the following further steps are included:
[0049] The effectiveness and cost of unblocking are assessed based on the degree of blockage in the gas well, and the timing of unblocking is determined based on the effectiveness and cost of unblocking.
[0050] On the other hand, some embodiments of this disclosure also provide a gas well blockage prediction device, the device comprising:
[0051] The receiving module is used to acquire historical production data from gas wells;
[0052] A module is established to create training samples based on historical gas well production data;
[0053] The modeling module is used to build gas well production prediction models for capturing time-series characteristics;
[0054] The training module is used to train the gas well production prediction model using training samples, and obtain the trained gas well production prediction model, so as to obtain gas well production prediction data based on the trained gas well production prediction model.
[0055] The calculation module is used to calculate the historical parameters of gas well blockage corresponding to the historical production data of gas wells and the predicted parameters of gas well blockage corresponding to the predicted production data of gas wells, based on the dynamic flow process of gas in gas wells.
[0056] The judgment module is used to determine whether a gas well is blocked based on the changing trends of historical parameters and predicted parameters of gas well blockage.
[0057] The determination module is used to calculate and compare the maximum wellhead production capacity when the well is not blocked and the maximum wellhead production capacity when the well is blocked, based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well, and thus determine the degree of gas well blockage based on the comparison results.
[0058] On the other hand, some embodiments of this disclosure also provide a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the computer program, when run by the processor, executes the instructions of the above-described method.
[0059] On the other hand, some embodiments of this disclosure also provide a computer storage medium on which a computer program is stored, the computer program being executed by the processor of a computer device to perform instructions for the above-described method.
[0060] On the other hand, some embodiments of this disclosure also provide a computer program product, which includes a computer program that, when run by the processor of a computer device, executes instructions for the methods described above.
[0061] The embodiments of this disclosure provide one or more technical solutions that have at least the following technical effects:
[0062] The embodiments of this disclosure first automatically acquire historical gas well production data to establish corresponding training samples and a gas well production prediction model. The training samples are then used to train the gas well production prediction model to achieve rapid and accurate prediction of gas well production data. Subsequently, based on the dynamic flow process of gas in the gas well, historical gas well blockage parameters corresponding to the historical gas well production data and gas well blockage prediction parameters corresponding to the gas well production prediction data are calculated to achieve accurate and efficient assessment of the degree of gas well blockage. By utilizing the changing trends of the historical gas well blockage parameters and the gas well blockage prediction parameters, it is possible to quickly and accurately determine whether the gas well is blocked. In the case of gas well blockage, based on the gas well production prediction data, the dynamic relationship of formation inflow in the gas well is used to calculate and compare the maximum wellhead productivity when it is not blocked and the maximum wellhead productivity when it is blocked. The degree of gas well blockage is determined based on the comparison results. Thus, based on the historical gas well production data, objective, accurate, and efficient prediction of gas well blockage is achieved.
[0063] The above description is merely an overview of some embodiments of the present disclosure. In order to better understand the technical means of some embodiments of the present disclosure and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of some embodiments of the present disclosure more apparent and understandable, specific implementation methods of some embodiments of the present disclosure are given below. Attached Figure Description
[0064] To more clearly illustrate some embodiments of this disclosure or technical solutions in the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0065] Figure 1 shows a schematic diagram of an implementation system for a gas well blockage prediction method according to some embodiments of this disclosure;
[0066] Figure 2 shows a flowchart of a gas well blockage prediction method according to some embodiments of the present disclosure;
[0067] Figure 3 is a schematic diagram of the steps for training a gas well production prediction model in some embodiments of this disclosure;
[0068] Figure 4 is a schematic diagram of the changes in historical parameters and predicted parameters of gas well blockage over time in some embodiments of this disclosure.
[0069] Figure 5 is a schematic diagram of the steps for determining whether a gas well is blocked in some embodiments of this disclosure;
[0070] Figure 6 is a schematic diagram showing the variation trend of gas well oil pressure and gas well blockage parameters in some embodiments of this disclosure;
[0071] Figure 7 is a schematic diagram of the change in the degree of gas well blockage over time in some embodiments of this disclosure;
[0072] Figure 8 is a schematic diagram illustrating the diagnostic assistance for gas well unblocking timing in some embodiments of this disclosure;
[0073] Figure 9 is a schematic diagram of the structure of a gas well blockage prediction device in some embodiments of this disclosure;
[0074] Figure 10 is a schematic diagram of the computer device structure provided in some embodiments of this disclosure.
[0075] [Explanation of reference numerals in the attached diagram] 101. Terminal; 102. Server; 901. Receiving module; 902. Establishment module; 903. Modeling module; 904. Training module; 905. Calculation module; 906. Judgment module; 907. Determination module; 1002. Computer device; 1004. Processor; 1006. Memory; 1008. Drive mechanism; 1010. Input / output interface; 1012. Input device; 1014. Output device; 1016. Presentation device; 1018. Graphical user interface; 1020. Network interface; 1022. Communication link; 1024. Communication bus. Detailed Implementation
[0076] To enable those skilled in the art to better understand the technical solutions in this disclosure, the technical solutions in some embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on some embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this disclosure.
[0077] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings herein are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0078] It should be noted that the acquisition, storage, use, and processing of data in this disclosed technical solution all comply with the relevant provisions of relevant laws and regulations.
[0079] It should be noted that in the embodiments disclosed herein, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary and are intended only to illustrate the feasibility of implementing the technical solutions disclosed herein. However, they do not mean that the applicant has used or necessarily used such solutions.
[0080] Figure 1 shows a schematic diagram of an implementation system for a gas well blockage prediction method according to an embodiment of the present invention. The system may include a terminal 101 and a server 102. The terminal 101 and server 102 communicate via a network, which may include a Local Area Network (LAN), a Wide Area Network (WAN), the Internet, or a combination thereof, and is connected to a website, user equipment (e.g., a computing device), and a backend system. Staff can send a gas well blockage prediction request to the server 102 through the terminal 101. Upon receiving the request, the server 102 retrieves data from its database for calculation and processing to obtain a prediction result, which is then sent back to the terminal 101 so that staff can process tasks based on the prediction results.
[0081] In this embodiment of the disclosure, server 102 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0082] In an optional embodiment, terminal 101 may be an electronic device, including but not limited to self-service terminal equipment, desktop computer, tablet computer, laptop computer, smart wearable device, etc. Optionally, the operating system running on the electronic device may include but not limited to Android, iOS, Linux, Windows, etc. Of course, terminal 101 is not limited to the above-mentioned physical electronic devices; it may also be software running on the above-mentioned electronic devices.
[0083] Furthermore, it should be noted that Figure 1 shows only one application environment provided by this disclosure. In actual applications, it may also include multiple terminals 101, and this disclosure does not impose any restrictions.
[0084] Figure 2 is a flowchart of a gas well blockage prediction method provided by an embodiment of the present invention. This disclosure provides the method operation steps as shown in the embodiment or flowchart, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiment is merely one possible execution order among many steps and does not represent the only execution order. In actual system or device products, the method can be executed in the order shown in the embodiment or the accompanying drawings, or in parallel. Specifically, as shown in Figure 2, when applied to the aforementioned server side, the method may include:
[0085] S201: Obtain historical production data from gas wells;
[0086] In some embodiments, the historical gas well production data can be data stored at preset time intervals, such as daily. Specifically, the historical gas well production data can include one or more of the following: average oil pressure, gas production, and transmission pressure. It can be constructed as a dataset arranged in a time series. For example, the gas well production can be obtained through a gas flow meter at the wellhead, and the wellhead pressure (e.g., average oil pressure or transmission pressure) can be obtained through a pressure sensor at the wellhead. The wellhead data signals (such as gas production, wellhead pressure, etc.) can be transmitted to the terminal server via a data cable.
[0087] Furthermore, in some embodiments, after acquiring historical gas well production data, the process further includes:
[0088] Normalize historical gas well production data; and / or,
[0089] Historical gas well production data is cleaned to remove abnormal and shut-in data.
[0090] In some embodiments, normalization can be understood as eliminating the influence of dimensions between different indicators in the production statistics dataset, bringing all indicators to the same order of magnitude, thus facilitating comprehensive comparison and evaluation. Specifically, normalization refers to normalizing each type of production data in the gas well production history data to the range [0, 1]. The formula for normalization can be: x i,m =(x i,j -x i,ave ) / (x i,max -x i,min )
[0091] Where, x i,m Let x be the normalized value of the m-th data point in the historical production data of the i-th gas well. i,j Let x be the j-th data point in the historical production data of the i-th gas well. i,ave x i,max and x i,min , which represent the average, maximum, and minimum values of the historical production data for the i-th type of gas well, respectively.
[0092] Furthermore, cleaning the gas well production history data can remove abnormal data and shut-in data. Abnormal data can include data that is significantly different from other data values, such as data with a value of 0. Also, shut-in data needs to be deleted from the gas well production history data because the data for the day the target gas well was shut down was not recorded, in order to ensure the validity of the gas well production history data.
[0093] S202: Establish training samples based on historical gas well production data;
[0094] It can be understood that, in some embodiments, when constructing training samples, the historical production data of gas wells is divided into segments, and the historical production data of gas wells with a preset time length is used as training samples to predict future data through current and historical data.
[0095] S203: Establish a gas well production prediction model for capturing time-series characteristics;
[0096] It can be understood that, in some embodiments, the gas well production prediction model includes a forget gate, an input gate, and an output gate; wherein, the forget gate is used to calculate the discard information corresponding to the cell state at the previous time step, the input gate is used to calculate the retained information corresponding to the cell state at the current time step, and the output gate is used to calculate the output information corresponding to the cell state at the current time step.
[0097] The gas well production prediction model can be a Long Short-Term Memory (LSTM) network model, including a forget gate, an input gate, and an output gate. The forget gate determines how much of the previous time step's cell state is retained in the current time step, i.e., what information is discarded from the cell state. The forget gate first reads the neuron output h from the previous time step. t-1 and the input data x at the current time t Then, after passing through the activation function layer, it outputs a number f between 0 and 1. t , with each in cell state C t-1 The data in the table are multiplied point by point. Where f t A value of 0 indicates complete discarding, while 1 indicates complete retention.
[0098] In some embodiments, the forget gate can be constructed using the following formula: f t =σ(W f ·[h t-1 ,x t ]+b f )
[0099] Among them, f t Forget gate, σ is the activation function, W f h is the forget gate weight matrix. t-1 x is the neuron output at the current moment. t b is the input data from the previous time step. f This is the forget gate bias term.
[0100] The input gate determines how much of the current input is retained in the current cell state. It consists of two parts: the first is the σ layer, which determines what values to update; the second is the tanh layer, which updates the feature variables with the necessary information. The tanh layer also creates a new cell state. It is an alternative update information, which is then used to update the old cell state, and Ct-1 Updated to C t , and f t Multiply to discard information that needs to be discarded, and then add... This completes the update of the cell state.
[0101] In some embodiments, the input gate can be constructed using the following formula: i t =σ(W i ·[h t-1 ,x t ]+b i )
[0102] Among them, i t σ is the input gate, W is the activation function. i h is the input gate weight matrix. t-1 x is the neuron output at the current moment. t The input data from the previous time step. As alternative update information, tanh() is the activation function, W C Let b be the memory cell weight matrix. i b C All are input gate bias terms, C t This represents the updated cell state.
[0103] The output gate is responsible for determining how much of the cell state should be output at the current moment. A σ layer determines which part of the cell state should be output. Specifically, the cell state is first processed through a tanh layer to obtain a value between -1 and 1, and this value is multiplied by the output of the σ layer to obtain the final output.
[0104] In some embodiments, the output gate can be constructed using the following formula: t =σ(W o [h t-1 ,x t ]+b o h t =o t ×tanh(C t )
[0105] Among them, o t Let W be the output gate, σ be the activation function, and W be the output gate. o h is the output gate weight matrix. t-1 x represents the neuron output from the previous time step. t For the input data at the current moment, b o For the output gate bias term, C t For the updated cell state, h ttanh represents the neuron output at the current time step, and tanh is the activation function.
[0106] S204: Use training samples to train a gas well production prediction model to obtain a trained gas well production prediction model, and then use the trained gas well production prediction model to obtain gas well production prediction data.
[0107] It can be understood that, in some embodiments, referring to Figure 3, a gas well production prediction model is trained using training samples to obtain a trained gas well production prediction model, and gas well production prediction data is obtained based on the trained gas well production prediction model, including:
[0108] S301: Input the training samples into the gas well production prediction model and obtain the prediction results using forward propagation;
[0109] S302: Calculate the loss based on the prediction results and the corresponding label information;
[0110] S303: Backpropagation based on loss to update network parameters in the gas well production prediction model;
[0111] S304: Repeat the above steps of updating the network parameters in the gas well production prediction model using training samples until the preset convergence condition is met, and obtain the trained gas well production prediction model.
[0112] S305: Obtain historical gas well production data for the well to be predicted;
[0113] S306: Based on the trained gas well production prediction model, predict the gas well production prediction data corresponding to the historical gas well production data of the well to be predicted.
[0114] Specifically, in some embodiments, training samples are input into a gas well production prediction model, and forward propagation can be used to obtain prediction results. Further, in some embodiments, after obtaining the prediction results, the loss is calculated based on the prediction results and the corresponding label information, which may include:
[0115] Based on the prediction results and the corresponding label information, the loss is calculated using a loss function with a regularization term.
[0116] Specifically, in some embodiments, in the early stages of blocking prediction, because the output value and the expected value (label value) are inconsistent, an error term value for each neuron is calculated to construct a loss function, which is then used to measure the accuracy of the prediction. Assuming the training sample size is N, the output is obtained through forward propagation of the network. The expected output is y. i The loss is denoted as loss. In some embodiments, the loss function can be expressed as:
[0117] However, using only the loss function described above is likely to lead to overfitting, meaning it works well on the training set but poorly on the actual test set. Therefore, the loss function can be improved by introducing a regularization term. The loss function with a regularization term can be expressed as:
[0118] Where loss is the loss value, and N is the number of training samples. For the desired output, y i The output of the model is λ, where λ is the weight of the regularization term and ω is the network parameter.
[0119] By using a loss function with a regularization term and calculating the corresponding loss using the prediction results and corresponding label information, the network parameters in the gas well production prediction model can be updated more accurately, thereby improving the prediction accuracy of the finally trained gas well production prediction model. The trained gas well production prediction model can then quickly and accurately predict the gas well production prediction data corresponding to the historical gas well production data of the well to be predicted.
[0120] Furthermore, in some embodiments, to ensure data balance, the training samples are divided into training set, validation set and test set according to a preset ratio (e.g., 7:2:1) and time sequence. The gas well production prediction model is trained together by the training set, validation set and test set, thereby improving the prediction accuracy of the gas well production prediction model.
[0121] Furthermore, in some embodiments, when using the trained gas well production prediction model to predict gas well production prediction data, the entire prediction process does not perform backpropagation, but only forward propagation. The formula for predicting gas well production prediction data at time t0+1 at time t0 is: VarR(t0+1)=LSTM{{Var1(t0),Var2(t0),Var3(t0)}, {Var1(t0-1),Var2(t0-1),Var3(t0-1)},…, {Var1(t0-n+1),Var2(t0-n+1),Var3(t0-n+1)}, {Var1(t0-n),Var2(t0-n),Var3(t0-n)}}
[0122] In this context, LSTM{} represents the process of the entire neural network forward propagating to obtain the predicted output, Var1(), Var2(), and Var3() all represent the input values, VarR() represents the predicted value, and t0+1, t0, t0-1, ..., t0-n, and t0-n+1 all represent time points.
[0123] In some embodiments, the gas well production prediction data for future times (e.g., t0+m) needs to be filled with the prediction data from the gas well production prediction model as input data for the model. At time t0, the gas well production prediction model can output an input time series with a step size of n and a vector size of 3n to predict the gas well production data after the next time point t0+1. The prediction formula is shown above. Through network forward propagation, the gas well production prediction data Var R(t0+1) at time t0+1 can be obtained quickly and accurately. After completing one prediction, the input sequence window will move forward by one step. Meanwhile, the unknown parameter Var1(t0+1) in the input will be filled by the previous predicted value VarR(t0+1), thus using the following formula to predict the gas well production forecast data at time t0+2, so as to achieve the prediction of gas well production data at multiple future times: VarR(t0+2)=LSTM{{VarR(t0+1),Var2(t0+1),Var3(t0+1)},…, {Var1(t0-n+2),Var2(t0-n+2),Var3(t0-n+2)}, {Var1(t0-n+1),Var2(t0-n+1),Var3(t0-n+1)}}
[0124] In this context, LSTM{} represents the process of the entire neural network forward propagating to obtain the predicted output, Var1(), Var2(), and Var3() all represent the input values, VarR() represents the predicted value, and t0+2, t0+1, t0, t0-1, ..., t0-n, and t0-n+1 all represent time points.
[0125] S205: Based on the dynamic flow process of gas in gas wells, calculate the historical parameters of gas well blockage corresponding to historical gas well production data, and the predicted parameters of gas well blockage corresponding to predicted gas well production data.
[0126] Specifically, both the historical gas well blockage parameters and the predicted gas well blockage parameters are calculated based on the dynamic flow process of the gas in the gas well. In some embodiments, based on the dynamic flow process of the gas in the gas well, the historical gas well blockage parameters corresponding to the historical gas well production data and the predicted gas well blockage parameters corresponding to the predicted gas well production data are calculated, including:
[0127] Based on the dynamic flow process of gas in the gas well, and according to the historical production data of the gas well, the historical parameters of formation blockage, wellbore blockage, and surface blockage are calculated.
[0128] Based on the dynamic flow process of gas in the gas well, and according to the gas well production prediction data, the prediction parameters for formation blockage, wellbore blockage, and surface blockage are calculated.
[0129] Based on the blockage scenario, the historical parameters of gas well formation blockage, wellbore blockage, and surface blockage are filtered to obtain the first filtering result. Then, the predicted parameters of gas well formation blockage, wellbore blockage, and surface blockage are filtered to obtain the second filtering result.
[0130] Linear weighting operations are performed on the first screening results and the second screening results respectively to obtain the historical parameters of gas well blockage corresponding to the first screening results and the predicted parameters of gas well blockage corresponding to the second screening results.
[0131] It can be understood that, in some embodiments, the calculation methods for obtaining the historical parameters of gas well formation blockage, wellbore blockage, and surface blockage are the same as the calculation principles for obtaining the predicted parameters of gas well formation blockage, wellbore blockage, and surface blockage.
[0132] Furthermore, due to the varying effectiveness of gas well formation blockage parameters (including historical and predicted parameters), wellbore blockage parameters (including historical and predicted parameters), and surface blockage parameters (historical and predicted parameters) under different blockage scenarios, for example, in actual gas well production operations, it is often difficult to obtain accurate and effective data on bottom hole flowing pressure. Therefore, gas well blockage parameters (including historical and predicted parameters) are often calculated using the gas well formation blockage parameters and wellbore blockage parameters corresponding to the wellhead pressure. Specifically, the flow of gas from the formation to the wellhead is divided into two processes: the flow of gas from the formation to the bottom of the well and the flow of gas from the bottom of the well to the wellhead. Therefore, the formation blockage parameters and wellbore blockage parameters can be linearly weighted to obtain the gas well blockage parameters.
[0133] Furthermore, in some embodiments, based on the dynamic flow process of gas in the gas well, and according to historical gas well production data, historical parameters of formation blockage, wellbore blockage, and surface blockage are calculated, including:
[0134] Based on the flow process of gas from the formation to the bottom of the well, historical parameters of formation blockage in the gas well are calculated according to historical production data of the gas well.
[0135] Based on the flow process of gas from the bottom of the well to the wellhead, historical parameters of wellbore blockage are calculated according to historical gas well production data.
[0136] Based on the flow process of gas from the wellhead to the separator, historical parameters of surface blockage are calculated according to historical gas well production data.
[0137] In some embodiments, if the validity of one of the historical parameters of gas well formation blockage, wellbore blockage, and surface blockage is poor and cannot be used to calculate the historical parameters of gas well blockage, the calculation process can be pre-screened. For example, during actual gas well production operations, due to the poor validity of the historical parameters of surface blockage, it is not necessary to calculate the historical parameters of surface blockage based on the flow process of gas from the wellhead to the separator, thereby reducing the cost of gas well blockage calculation.
[0138] Furthermore, based on the flow process of gas from the formation to the bottom of the well, and according to the gas well production history data, the historical parameters of gas well formation blockage are calculated using the following formula:
[0139] in,
[0140] Where, p R p represents formation pressure. wf Indicates the bottom hole pressure of the gas well, A represents the laminar flow coefficient, B represents the turbulent flow coefficient, and q represents the bottom hole pressure of the gas well. sc Z represents the gas production rate, and Z represents the deviation coefficient at the current pressure. i G represents the deviation coefficient under the original conditions, and G represents the original geological reserves. p p represents the current cumulative gas production. i Let q represent the original formation pressure, x represent the time series number, X represent the total time series number, and q represent the total time series number. scx R represents the gas production at time number x. f This indicates historical parameters related to formation blockage in gas wells.
[0141] Specifically, in some embodiments, for reservoirs with inactive edge and bottom water, the formation pressure p R The pressure p is calculated based on the material balance theory of constant-volume gas reservoirs. For other types of formations, it is necessary to recalculate the formation pressure p using other methods. R , These assumptions are made for the purpose of simplifying calculations, ignoring the changes in the gas deviation coefficient at different times, and thus based on the cumulative gas production G p The formation pressure p at different times can then be calculated. R However, in the actual strata, It often changes over time to a value that fluctuates around 1.
[0142] Furthermore, based on the flow process of gas from the bottom of the well to the wellhead, and according to the historical production data of the gas well, the historical parameters of wellbore blockage are calculated using the following formula:
[0143] Where, p wf p represents the bottom hole pressure of a gas well. tf The gas wellhead pressure is represented by , e represents a dimensionless quantity with a value of 0.016, s represents an exponent, d represents the tubing inner diameter, f represents the coefficient of friction corresponding to temperature and pressure, and q represents the pressure at the wellhead. sc Indicates the volumetric flow rate of natural gas. represents the average wellbore temperature, R represents the average deviation coefficient of the wellbore. t This indicates historical parameters related to wellbore blockage.
[0144] Specifically, in some embodiments, the wellbore blockage history parameters are calculated based on the wellbore pressure drop model. When other parameters remain constant except for the natural gas volume flow rate, the larger the natural gas volume flow rate, the higher the probability that the wellbore blockage history parameters are smaller. When other parameters remain constant except for the gas well bottom pressure and the gas wellhead pressure, the larger the difference between the gas well bottom pressure and the gas wellhead pressure, the higher the probability that the wellbore blockage history parameters are larger. Thus, the wellbore blockage history parameters can be obtained quickly and accurately according to the above wellbore blockage parameter calculation formula.
[0145] Furthermore, based on the flow process of gas from the wellhead to the separator, and according to the gas well production history data, the historical surface blockage parameters are calculated using the following formula:
[0146] Among them, R p p represents historical parameters of ground congestion. tf p represents the wellhead pressure of the gas well. sep q represents the pressure of the gas well separator. sc This indicates the amount of gas produced.
[0147] Specifically, in some embodiments, the gas flow process from the wellhead to the separator includes surface throttling and pipeline flow. Based on the gas flow process from the wellhead to the separator, and based on a concept similar to the wellbore blockage parameter calculation formula, the above-mentioned surface blockage parameter calculation formula can be used to calculate the historical surface blockage parameters.
[0148] It should be noted that the calculation formulas used when calculating the gas well formation blockage prediction parameters, wellbore blockage prediction parameters, and surface blockage prediction parameters are the same as those used when calculating the historical parameters of gas well formation blockage, wellbore blockage, and surface blockage. These formulas will not be repeated here. As a result, the variation curves of the historical parameters of gas well blockage and the predicted parameters of gas well blockage over time are shown in Figure 4.
[0149] Furthermore, the relative error between historical parameters and predicted parameters of gas well blockage can be calculated using the following formula:
[0150] In the formula: δ' represents the relative error, y m This represents the predicted value of the m-th sample. This represents the actual value of the m-th sample.
[0151] The average relative error between historical parameters and predicted parameters of gas well blockage can also be calculated using the following formula:
[0152] In the formula: δ represents the average relative error, M represents the total number of samples in the test set, and y m This represents the predicted value of the m-th sample. This represents the actual value of the m-th sample.
[0153] Generally, the relative error should be less than 10%. As shown in Figure 6, the relative error between historical gas well blockage parameters and predicted gas well blockage parameters is 9.84%, and the relative error needs to be as small as possible. When relative errors are similar, a smaller average relative error indicates better prediction results; a larger average relative error indicates worse prediction results.
[0154] S206: Determine whether a gas well has become blocked based on the changing trends of historical parameters and predicted parameters of gas well blockage.
[0155] It is difficult to accurately determine whether a gas well is blocked based solely on historical or predicted parameters of blockage at a single moment. Therefore, a comprehensive assessment based on the changing trends of both historical and predicted blockage parameters is necessary. Referring to Figure 5, in some embodiments, determining whether a gas well is blocked based on the changing trends of both historical and predicted blockage parameters may include:
[0156] S501: Calculate the changing trend of gas well blockage parameters based on historical gas well blockage parameters and gas well blockage prediction parameters;
[0157] The trend of change includes at least one or more of the increase and the growth rate;
[0158] S502: If any data in the trend of gas well blockage parameters exceeds the corresponding preset threshold, the gas well will be blocked.
[0159] In some embodiments, the historical parameters and predicted parameters of gas well blockage are data with time-series information. Based on these parameters, the increase and growth rate of the blockage parameters can be calculated to assess their changing trend. If any data in the changing trend exceeds the corresponding preset threshold, the probability of the gas well being blocked is high. Based on a strict evaluation perspective, the gas well is considered to be blocked at this time. If none of the data in the changing trend exceeds the corresponding preset threshold, referring to the schematic diagram of the changing trends of gas well oil pressure and gas well blockage parameters shown in Figure 6, it indicates that the changes in all types of data in the changing trend are small and generally stable. In this case, the gas well is considered to be blocked.
[0160] S207: If a gas well becomes blocked, the maximum wellhead production capacity when the well is not blocked and the maximum wellhead production capacity when the well is blocked are calculated and compared based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well, so as to determine the degree of gas well blockage based on the comparison results.
[0161] Furthermore, in some embodiments, if a gas well becomes blocked, the maximum wellhead productivity when the well is not blocked and the maximum wellhead productivity when blocked are calculated and compared using the formation inflow dynamics in the gas well based on gas well production prediction data, thereby determining the degree of gas well blockage based on the comparison results, including:
[0162] If a gas well becomes blocked, the maximum wellhead production capacity when the well is not blocked and the maximum wellhead production capacity when blocked are calculated using the following formula based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well:
[0163] Among them, Q A q represents the maximum production capacity at the wellhead. sc P represents daily output. D P represents dimensionless pressure. R P represents the current formation pressure. tf This represents the wellhead pressure. The dimensionless pressure is the ratio of the difference between the formation pressure and the square of the wellhead pressure to the square of the formation pressure, used to eliminate the influence of absolute pressure values.
[0164] Among them, the "formation inflow dynamic relationship" can be used to describe the relationship between the bottom-hole flowing pressure of a gas well and the gas production of the gas well, and can reflect the gas reservoir's ability to supply gas to the bottom of the well.
[0165] The degree of well blockage is determined by the ratio of the difference between the maximum wellhead productivity when the well is unblocked and the maximum wellhead productivity when the well is blocked to the maximum wellhead productivity when the well is unblocked.
[0166] It can be understood that in some embodiments, the maximum wellhead productivity needs to be calculated whether the gas well is unblocked or blocked. Using the above formula for calculating the maximum wellhead productivity, the maximum wellhead productivity when the well is unblocked and the maximum wellhead productivity when the well is blocked can be calculated quickly and accurately.
[0167] Furthermore, the degree of gas well blockage is calculated by the ratio of the difference between the maximum wellhead productivity during normal production and the maximum wellhead productivity on a certain day after the blockage occurs to the maximum wellhead productivity during normal production. The degree of gas well blockage can be used to assess the degree of blockage of the well to be predicted. Referring to the schematic diagram of the change curve of gas well blockage over time shown in Figure 7, the formula for calculating the degree of gas well blockage is as follows:
[0168] Among them, D r Q represents the degree of gas well blockage. A Q represents the maximum wellhead production capacity during normal gas well production. Ai Let be the maximum wellhead production capacity on day i, and i = 1...n.
[0169] The embodiments of this disclosure first automatically acquire historical gas well production data to establish corresponding training samples and a gas well production prediction model. The training samples are then used to train the gas well production prediction model to achieve rapid and accurate prediction of gas well production data. Subsequently, based on the dynamic flow process of gas in the gas well, historical gas well blockage parameters corresponding to the historical gas well production data and gas well blockage prediction parameters corresponding to the gas well production prediction data are calculated to achieve accurate and efficient assessment of the degree of gas well blockage. By utilizing the changing trends of the historical gas well blockage parameters and the gas well blockage prediction parameters, it is possible to quickly and accurately determine whether the gas well is blocked. In the case of gas well blockage, based on the gas well production prediction data, the dynamic relationship of formation inflow in the gas well is used to calculate and compare the maximum wellhead productivity when it is not blocked and the maximum wellhead productivity when it is blocked. The degree of gas well blockage is determined based on the comparison results. Thus, based on the historical gas well production data, objective, accurate, and efficient prediction of gas well blockage is achieved.
[0170] Furthermore, in some embodiments, after determining the degree of gas well blockage, the process further includes:
[0171] The effectiveness and cost of unblocking are assessed based on the degree of blockage in the gas well, and the timing of unblocking is determined based on the effectiveness and cost of unblocking.
[0172] In some embodiments, after obtaining the degree of gas well blockage, the timing of unblocking corresponding to the degree of blockage can be determined based on the effectiveness and cost of the unblocking process already implemented on the gas well, as shown in Figure 8, a schematic diagram for the diagnosis of gas well unblocking timing. As can be seen from Figure 8:
[0173] (1) When the gas well blockage degree Dr≤20%, the unblocking effect is poor and it is too early to judge the timing of unblocking.
[0174] (2) When the degree of blockage in the gas well is 20% < Dr ≤ 40%, the unblocking effect is generally low, the cost is low, and the timing for unblocking can be determined early.
[0175] (3) When the gas well blockage rate is 40 < Dr ≤ 70%, the unblocking effect is good and the cost is low, which is considered the best time to unblock.
[0176] (4) When the gas well blockage degree Dr > 70%, the unblocking effect is very good, but the unblocking cost is very high, and it is judged that the unblocking time is too late.
[0177] The corresponding diagnosis results of unblocking timing are shown in Table 1, thereby achieving efficient and accurate assessment of the unblocking timing of gas wells, so as to avoid delaying the unblocking timing and minimize the unblocking cost as much as possible under the premise of safety.
[0178] Table 1 Diagnostic Table for Unblocking Timing
[0179] It should be noted that although the operation of the method of the present invention has been described in a specific order in the above embodiments and figures, this does not require or imply that the operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0180] Corresponding to the gas well blockage prediction method described above, some embodiments of this disclosure also provide a gas well blockage prediction device. Referring to FIG9, in some embodiments, the device may include:
[0181] Receiver module 901 is used to acquire historical production data of gas wells;
[0182] Module 902 is established to create training samples based on historical gas well production data.
[0183] Modeling module 903 is used to build a gas well production prediction model for capturing time-series characteristics;
[0184] Training module 904 is used to train the gas well production prediction model using training samples to obtain the trained gas well production prediction model, so as to obtain gas well production prediction data based on the trained gas well production prediction model.
[0185] The calculation module 905 is used to calculate the historical parameters of gas well blockage corresponding to the historical gas production data and the predicted parameters of gas well blockage corresponding to the predicted gas production data, based on the dynamic flow process of gas in the gas well.
[0186] The judgment module 906 is used to determine whether a gas well has become blocked based on the changing trends of historical parameters and predicted parameters of gas well blockage.
[0187] The determination module 907 is used to calculate and compare the maximum wellhead production capacity when the well is not blocked and the maximum wellhead production capacity when the well is blocked, based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well, and thus determine the degree of gas well blockage based on the comparison results.
[0188] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing this disclosure, the functions of each unit can be implemented in one or more software and / or hardware.
[0189] It should be noted that in the embodiments disclosed herein, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized and consented to by the user and fully authorized by all parties.
[0190] It should be noted that the computer program product disclosed herein is a software product that primarily implements the method disclosed herein through a computer program.
[0191] Embodiments of this disclosure also provide a computer device. As shown in FIG10, in some embodiments of this disclosure, the computer device 1002 may include one or more processors 1004, such as one or more central processing units (CPUs) or graphics processing units (GPUs), each processing unit may implement one or more hardware threads. The computer device 1002 may also include any memory 1006 for storing information of any kind, such as code, settings, data, etc. In one specific embodiment, a computer program is stored on the memory 1006 and can run on the processor 1004. When the computer program is run by the processor 1004, it can execute instructions of the methods of any of the above embodiments. Without limitation, for example, the memory 1006 may include any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 1002. In one scenario, when processor 1004 executes associated instructions stored in any memory or combination of memories, computer device 1002 can perform any operation of the associated instructions. Computer device 1002 also includes one or more drive mechanisms 1008 for interacting with any memory, such as hard disk drive mechanisms, optical disk drive mechanisms, etc.
[0192] Computer device 1002 may also include an input / output interface 1010 (I / O) for receiving various inputs (via input device 1012) and providing various outputs (via output device 1014). A specific output mechanism may include a presentation device 1016 and an associated graphical user interface 1018 (GUI). In other embodiments, the input / output interface 1010 (I / O), input device 1012, and output device 1014 may be omitted, and the device may function solely as a computer device within a network. Computer device 1002 may also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the components described above together.
[0193] The communication link 1022 can be implemented in any way, such as via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, or any combination thereof. The communication link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0194] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), computer-readable storage media, and computer program products according to some embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processor to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processor, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0195] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processor to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0196] These computer program instructions may also be loaded onto a computer or other programmable data processor to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable device, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0197] In a typical configuration, a computer device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0198] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0199] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by computer equipment. As defined in this disclosure, computer-readable media does not include transient media, such as modulated data signals and carrier waves.
[0200] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, embodiments of this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this disclosure 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.
[0201] Embodiments of this disclosure can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. Embodiments of this disclosure can also be practiced in distributed computing environments where tasks are performed by remote processors connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0202] It should also be understood that, in the embodiments of this disclosure, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.
[0203] The various embodiments in this disclosure are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0204] In the description of this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the embodiments of this disclosure. In this disclosure, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this disclosure, as well as the features of different embodiments or examples.
[0205] The above description is merely an embodiment of this disclosure and is not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.
Claims
1. A method for predicting gas well blockage, characterized in that, The method includes: Obtain historical production data from gas wells; A training sample was established based on the gas well production history data. Establish a gas well production prediction model to capture time-series characteristics; The gas well production prediction model is trained using the training samples to obtain a trained gas well production prediction model, and gas well production prediction data is obtained based on the trained gas well production prediction model. Based on the dynamic flow process of gas in the gas well, the historical parameters of gas well blockage corresponding to the historical production data of the gas well and the predicted parameters of gas well blockage corresponding to the predicted production data of the gas well are calculated respectively. Based on the changing trends of the historical parameters and predicted parameters of gas well blockage, it is determined whether the gas well has become blocked. If a gas well becomes blocked, the maximum wellhead production capacity when the well is not blocked and the maximum wellhead production capacity when the well is blocked are calculated and compared based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well, thereby determining the degree of gas well blockage based on the comparison results.
2. The method according to claim 1, characterized in that, After obtaining historical gas well production data, the following further steps are included: The historical production data of the gas wells are normalized; and / or, The gas well production history data is cleaned to remove abnormal data and well shut-in data.
3. The method according to claim 1, characterized in that, The gas well production prediction model includes a forget gate, an input gate, and an output gate; wherein, the forget gate is used to calculate the discard information corresponding to the cell state at the previous time step, the input gate is used to calculate the retained information corresponding to the cell state at the current time step, and the output gate is used to calculate the output information corresponding to the cell state at the current time step.
4. The method according to claim 1, characterized in that, The gas well production prediction model is trained using the training samples to obtain a trained gas well production prediction model. Gas well production prediction data is then obtained based on the trained gas well production prediction model, including: The training samples are input into the gas well production prediction model, and the prediction results are obtained by forward propagation. The loss is calculated based on the prediction results and the corresponding label information; Backpropagation is performed based on the loss to update the network parameters in the gas well production prediction model; Repeat the above steps of updating the network parameters in the gas well production prediction model using the training samples until the preset convergence condition is met, and obtain the trained gas well production prediction model. Obtain historical gas well production data for the well to be predicted; Based on the trained gas well production prediction model, the gas well production prediction data corresponding to the historical gas well production data of the well to be predicted is obtained.
5. The method according to claim 4, characterized in that, The loss is calculated based on the prediction results and the corresponding label information, including: Based on the prediction results and the corresponding label information, the loss is calculated using a loss function with a regularization term.
6. The method according to claim 1, characterized in that, Based on the dynamic flow process of gas in the gas well, historical parameters of gas well blockage corresponding to the historical production data of the gas well and predicted parameters of gas well blockage corresponding to the predicted production data of the gas well are calculated, including: Based on the dynamic flow process of gas in the gas well, and according to the gas well production history data, the historical parameters of formation blockage, wellbore blockage, and surface blockage are calculated. Based on the dynamic flow process of gas in the gas well, and according to the gas well production prediction data, the gas well formation blockage prediction parameters, wellbore blockage prediction parameters, and surface blockage prediction parameters are calculated. Based on the blockage scenario, the historical parameters of gas well formation blockage, wellbore blockage, and surface blockage are filtered to obtain a first filtering result. Then, the predicted parameters of gas well formation blockage, wellbore blockage, and surface blockage are filtered to obtain a second filtering result. Linear weighting operations are performed on the first screening result and the second screening result respectively to obtain the historical parameters of gas well blockage corresponding to the first screening result and the predicted parameters of gas well blockage corresponding to the second screening result.
7. The method according to claim 6, characterized in that, Based on the dynamic flow process of gas in the gas well, and according to the gas well production history data, historical parameters of formation blockage, wellbore blockage, and surface blockage are calculated, including: Based on the flow process of gas from the formation to the bottom of the well, the historical parameters of formation blockage of the gas well are calculated according to the production history data of the gas well. Based on the flow process of gas from the bottom of the well to the wellhead, the historical parameters of wellbore blockage are calculated according to the gas well production history data; Based on the flow process of gas from the wellhead to the separator, the historical parameters of surface blockage are calculated according to the gas well production history data.
8. The method according to claim 7, characterized in that, Based on the flow process of gas from the formation to the bottom of the well, and according to the gas well's production history data, the historical parameters of formation blockage in the gas well are calculated using the following formula, including: in, Where, p R p represents formation pressure. wf Indicates the bottom hole pressure of the gas well, A represents the laminar flow coefficient, B represents the turbulent flow coefficient, and q represents the bottom hole pressure of the gas well. sc Z represents the gas production rate, and Z represents the deviation coefficient at the current pressure. i G represents the deviation coefficient under the original conditions, and G represents the original geological reserves. p p represents the current cumulative gas production. i Let q represent the original formation pressure, x represent the time series number, X represent the total time series number, and q represent the total time series number. scx R represents the gas production at time number x. f This indicates historical parameters related to formation blockage in gas wells.
9. The method according to claim 7, characterized in that, Based on the flow process of gas from the bottom of the well to the wellhead, and according to the gas well production history data, the historical parameters of wellbore blockage are calculated using the following formula: Where, p wf p represents the bottom hole pressure of a gas well. tf The gas wellhead pressure is represented by , e represents a dimensionless quantity with a value of 0.016, s represents an exponent, d represents the tubing inner diameter, f represents the coefficient of friction corresponding to temperature and pressure, and q represents the pressure at the wellhead. sc Indicates the volumetric flow rate of natural gas. Displaying the average temperature of the well casing, R represents the average deviation coefficient of the wellbore. t This indicates historical parameters related to wellbore blockage.
10. The method according to claim 7, characterized in that, Based on the flow process of gas from the wellhead to the separator, and according to the gas well production history data, the historical parameters of surface blockage are calculated using the following formula, including: Among them, R p p represents historical parameters of ground congestion. tf p represents the wellhead pressure of the gas well. sep q represents the pressure of the gas well separator. sc This indicates the amount of gas produced.
11. The method according to claim 1, characterized in that, Based on the changing trends of the historical parameters and predicted parameters of gas well blockage, it is determined whether a gas well has become blocked, including: The changing trend of the gas well blockage parameters is calculated based on the historical parameters and predicted parameters of the gas well blockage; the changing trend includes at least one or more of the increases and growth rates. If any one of the data in the trend of the gas well blockage parameters exceeds the corresponding preset threshold, the gas well will be blocked.
12. The method according to claim 1, characterized in that, If a gas well becomes blocked, the maximum wellhead productivity when the well is unblocked and the maximum wellhead productivity when blocked are calculated and compared using the gas well production prediction data and the dynamic relationship of formation inflow in the gas well, based on the comparison results. The degree of gas well blockage is then determined, including: If a gas well becomes blocked, the maximum wellhead productivity when the well is not blocked and the maximum wellhead productivity when blocked are calculated using the following formulas based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well: Among them, Q A q represents the maximum production capacity at the wellhead. sc P represents daily output. D P represents dimensionless pressure. R P represents the current formation pressure. tf Indicates wellhead pressure, The degree of well blockage is determined by the ratio of the difference between the maximum wellhead productivity when the well is unblocked and the maximum wellhead productivity when the well is blocked to the maximum wellhead productivity when the well is unblocked.
13. The method according to claim 1, characterized in that, After determining the degree of gas well blockage, further steps include: The effectiveness and cost of unblocking are assessed based on the degree of blockage in the gas well, and the timing of unblocking is determined based on the effectiveness and cost of unblocking.
14. A gas well blockage prediction device, characterized in that, The device includes: The receiving module is used to acquire historical production data from gas wells; A module is established to create training samples based on the gas well production history data. The modeling module is used to build gas well production prediction models for capturing time-series characteristics; The training module is used to train the gas well production prediction model using the training samples to obtain the trained gas well production prediction model, so as to obtain gas well production prediction data based on the trained gas well production prediction model. The calculation module is used to calculate the historical parameters of gas well blockage corresponding to the historical production data of the gas well, and the predicted parameters of gas well blockage corresponding to the predicted production data of the gas well, based on the dynamic flow process of gas in the gas well. The judgment module is used to determine whether the gas well is blocked based on the changing trends of the historical parameters of gas well blockage and the predicted parameters of gas well blockage. The determination module is used to calculate and compare the maximum wellhead production capacity when the well is not blocked and the maximum wellhead production capacity when the well is blocked, based on the gas well production prediction data and the dynamic relationship of formation inflow in the gas well, so as to determine the degree of gas well blockage based on the comparison results.
15. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the computer program is run by the processor, it executes the instructions of the method according to any one of claims 1-13.
16. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor of the computer device, it executes the instructions of the method according to any one of claims 1-13.
17. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, performs instructions according to any one of claims 1-13.
Citation Information
Patent Citations
Method and system for evaluating blocking degree of scale-blocked gas well
CN116950649A
Blockage prediction method, device and equipment for gas recovery well and storage medium
CN117852377A
Method and device for comprehensively analyzing blockage degree of gas well shaft according to gas well productivity
CN118095911A
Workflow of inflow performance relationship for a reservoir using machine learning technique
US20230272703A1