Method and device for predicting effusion of tight gas well
By combining the effusion prediction model of the bidirectional LSTM layer and the Informer submodule, the traditional method's shortcomings in prediction accuracy and long-term dependency capture are solved, and efficient prediction of effusion in tight gas wells is achieved.
Patent Information
- Application Number
- CN202411594618.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-09
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-09
AI Technical Summary
When traditional time series prediction methods process complex and highly nonlinear time series data, there are problems such as insufficient prediction accuracy and inability to effectively capture long-term dependencies.
A effusion prediction model combining a bidirectional processing module and a prediction module is adopted. The bidirectional processing module includes a bidirectional LSTM layer. The short-term and long-term characteristics of the time series are captured through forward and reverse LSTM submodules. The prediction module uses the Informer submodule and self-directional The attention submodule generates effusion prediction results.
It improves the accuracy and efficiency of effusion prediction of tight gas wells, can effectively capture short-term and long-term time series characteristics, and is suitable for prediction tasks with different time spans.
Smart Images

Figure CN119441738A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of tight gas wells, and in particular to a method and a device for predicting liquid accumulation in a tight gas well. Background Art
[0002] Liquid accumulation in tight gas wells is a phenomenon that can seriously affect the normal production of oil and gas wells, and involves the production efficiency and overall safety of oil and gas wells. Therefore, it is necessary to predict liquid accumulation in tight gas wells.
[0003] Traditional time series prediction methods such as ARIMA and SVR often have problems such as insufficient prediction accuracy and inability to effectively capture long-term dependencies when dealing with complex and highly nonlinear time series data. LSTM, as a recursive neural network (RNN), effectively solves the gradient vanishing or gradient exploding problems of traditional RNN in long-sequence training through its unique gating mechanism (forget gate, input gate, output gate), and is suitable for short-term time series prediction. However, when the prediction time span increases, the computational complexity and memory usage of LSTM increase significantly, limiting its application in long-term prediction. Summary of the invention
[0004] The present invention proposes a method and device for predicting liquid accumulation in tight gas wells, which can solve key technical problems existing in traditional time series prediction methods when processing complex and highly nonlinear time series data, such as insufficient prediction accuracy and inability to effectively capture long-term dependencies.
[0005] In various method embodiments of the present invention, a method for predicting liquid loading in a tight gas well includes:
[0006] Step S1: obtaining production data of the tight gas well to be predicted, preprocessing the production data of the tight gas well to be predicted, and normalizing the preprocessed production data of the tight gas well;
[0007] Step S2: dividing the normalized tight gas well production data into multiple subsequences according to time, inputting the trained liquid accumulation prediction model, and obtaining liquid accumulation prediction results;
[0008] The effusion prediction model includes a bidirectional processing module and a prediction module;
[0009] The bidirectional processing module includes a first LSTM layer and a second LSTM layer;
[0010] The first LSTM layer includes N forward LSTM submodules connected in sequence, and each subsequence is sorted in a forward time order. Each forward LSTM submodule receives a subsequence in sequence, and the first forward LSTM submodule receives the first subsequence, and uses the generated feature vector as the output of the first forward LSTM submodule; for each forward LSTM submodule from the second forward LSTM submodule to the N-1th forward LSTM submodule, the number of the forward LSTM submodule is obtained, and NUM0 is recorded as the number minus 1. The forward LSTM submodule generates a feature vector based on the output of the NUM0th forward LSTM submodule and the input of the forward LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th forward LSTM submodule; the Nth forward LSTM submodule generates a first output feature vector based on the feature vector generated by the N-1th forward LSTM submodule and its own input;
[0011] The second LSTM layer includes N reverse LSTM submodules connected in sequence, and each subsequence is sorted in reverse time order. Each reverse LSTM submodule receives a subsequence in sequence, and the first reverse LSTM submodule receives the subsequence ranked first and the first output feature vector, and uses the generated feature vector as the output of the first reverse LSTM submodule; for each reverse LSTM submodule from the second reverse LSTM submodule to the N-1th reverse LSTM submodule, obtain the number of the reverse LSTM submodule, record NUM0 as the number minus 1, and the reverse LSTM submodule generates a feature vector based on the output of the NUM0th reverse LSTM submodule and the input of the reverse LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th reverse LSTM submodule; the Nth reverse LSTM submodule generates a fused feature vector based on the feature vector generated by the N-1th reverse LSTM submodule and its own input;
[0012] The prediction module includes an Informer submodule and a self-attention submodule. The self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight. The Informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight. The liquid accumulation prediction result includes a predicted value or a confidence interval of the liquid accumulation.
[0013] Optionally, the tight gas well production data to be predicted includes date, production layer, production time, oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation information, where the liquid accumulation information is a Boolean value indicating whether liquid accumulation exists.
[0014] Optionally, the preprocessing of the tight gas well production data to be predicted and normalizing the preprocessed tight gas well production data include:
[0015] Organize the tight gas well production data to be predicted into time series
[0016]
[0017] in, is the time series of tight gas well production data to be predicted, That is Daily production data, including the following dimensions: date, production layer, production time, oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation information;
[0018] Performing data cleaning on the time series;
[0019] Each of the oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation is taken as a normalized object, and the following operations are performed on the normalized objects:
[0020] Calculate the mean:
[0021]
[0022] Among them, μ t is the mean of the normalized object, S is the amount of data of the normalized object, t i is the feature vector corresponding to the i-th data of the normalized object;
[0023] Calculate the standard deviation:
[0024]
[0025] Among them, σ t is the standard deviation of the normalized object;
[0026] Normalization:
[0027]
[0028] t is the eigenvector corresponding to all the data of the normalized object, μ t The transpose of is the normalized result.
[0029] Optionally, the forward LSTM submodule and the reverse LSTM submodule each include a first LSTM layer, a first Dropout layer, a second LSTM layer, a second Dropout layer, a third LSTM layer, a third Dropout layer, and a fully connected layer, which are connected in sequence.
[0030] Optionally, the self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight, and the informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight, including:
[0031] The fused feature vector is incorporated into the normalized tight gas well production data, that is, the normalized tight gas well production data is added with a feature vector to form new normalized tight gas well production data; the new normalized tight gas well production data is added with a feature vector. As the input of the self-attention submodule; wherein, are each characteristic vector in the new normalized tight gas well production data;
[0032] The self-attention submodule determines the attention weight α of each feature vector p ,
[0033]
[0034] in, , α p is the attention weight corresponding to the pth eigenvector of the new normalized tight gas well production data, s p represents the score or feature representation associated with the pth feature vector, s q represents the score or feature representation associated with the qth feature vector;
[0035] The self-attention submodule determines the offset Δ of each feature vector p ,
[0036]
[0037] Δ p is the offset of the p-th feature vector, indicating the amount by which the p-th feature vector needs to be adjusted in the attention mechanism; r pq is the attention weight between the p-th eigenvector and the q-th eigenvector, and this attention weight reflects the importance of the q-th eigenvector in calculating the offset of the p-th eigenvector; N is the total number of eigenvectors in the new normalized tight gas well production data;
[0038] Each feature vector in the new normalized tight gas well production data is superimposed with its corresponding offset Δ p , forming the superimposed tight gas well production data;
[0039] The Informer submodule generates a liquid accumulation prediction result based on the superimposed tight gas well production data.
[0040] In the above-mentioned method embodiments of the present invention, a device for predicting liquid accumulation in a tight gas well includes:
[0041] Data processing module: configured to obtain production data of the tight gas well to be predicted, preprocess the production data of the tight gas well to be predicted, and normalize the preprocessed production data of the tight gas well;
[0042] Prediction module: configured to divide the normalized tight gas well production data into multiple subsequences according to time, input the trained liquid accumulation prediction model, and obtain the liquid accumulation prediction result;
[0043] The effusion prediction model includes a bidirectional processing module and a prediction module;
[0044] The bidirectional processing module includes a first LSTM layer and a second LSTM layer;
[0045] The first LSTM layer includes N forward LSTM submodules connected in sequence, and each subsequence is sorted in a forward time order. Each forward LSTM submodule receives a subsequence in sequence, and the first forward LSTM submodule receives the first subsequence, and uses the generated feature vector as the output of the first forward LSTM submodule; for each forward LSTM submodule from the second forward LSTM submodule to the N-1th forward LSTM submodule, the number of the forward LSTM submodule is obtained, and NUM0 is recorded as the number minus 1. The forward LSTM submodule generates a feature vector based on the output of the NUM0th forward LSTM submodule and the input of the forward LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th forward LSTM submodule; the Nth forward LSTM submodule generates a first output feature vector based on the feature vector generated by the N-1th forward LSTM submodule and its own input;
[0046] The second LSTM layer includes N reverse LSTM submodules connected in sequence, and each subsequence is sorted in reverse time order. Each reverse LSTM submodule receives a subsequence in sequence, and the first reverse LSTM submodule receives the subsequence ranked first and the first output feature vector, and uses the generated feature vector as the output of the first reverse LSTM submodule; for each reverse LSTM submodule from the second reverse LSTM submodule to the N-1th reverse LSTM submodule, obtain the number of the reverse LSTM submodule, record NUM0 as the number minus 1, and the reverse LSTM submodule generates a feature vector based on the output of the NUM0th reverse LSTM submodule and the input of the reverse LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th reverse LSTM submodule; the Nth reverse LSTM submodule generates a fused feature vector based on the feature vector generated by the N-1th reverse LSTM submodule and its own input;
[0047] The prediction module includes an Informer submodule and a self-attention submodule. The self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight. The Informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight. The liquid accumulation prediction result includes a predicted value or a confidence interval of the liquid accumulation.
[0048] In the above method embodiments of the present invention, a computer-readable storage medium is provided, wherein a plurality of instructions are stored in the storage medium, and the plurality of instructions are used for a processor to load and execute the above method.
[0049] In the above-mentioned method embodiments of the present invention, an electronic device includes: a processor for executing multiple instructions; a memory for storing multiple instructions; wherein the multiple instructions are used to be stored by the memory, and loaded by the processor to execute the method as described above.
[0050] This paper innovatively proposes an efficient prediction model that deeply integrates the long short-term memory network (LSTM) and the informer model, aiming to break the limitations of traditional time series prediction methods and achieve a double leap in short-term and long-term prediction accuracy. Through a carefully designed architecture, the algorithm cleverly combines the excellent memory ability of LSTM in processing short-term time series data with the computational efficiency and memory space friendliness of the informer algorithm when dealing with ultra-long sequences, thereby constructing a prediction framework that is both accurate and efficient. In terms of short-term prediction, the LSTM layer, as one of the core components of the model, uses its internal gating mechanism (forget gate, input gate, output gate) to effectively capture and store key information in the time series, especially those patterns and trends that are crucial to recent predictions. This mechanism ensures that the model can maintain a high degree of sensitivity and accuracy in the face of complex and changeable short-term fluctuations, providing solid data support for immediate decision-making. In response to the challenges of long-term prediction, the informer algorithm, with its deformable attention mechanism and sparsification technology, greatly reduces the computational complexity and memory consumption problems faced by traditional sequence-to-sequence models when processing long sequences. By focusing only on the key parts of the sequence, Informer can efficiently capture long-term dependencies, allowing the model to maintain high accuracy when predicting trends and patterns over a longer time frame in the future. This capability is invaluable for industries that require long-term planning, such as tight gas effusion prediction.
[0051] The present invention has the following advantages:
[0052] The present invention combines LSTM and Informer to predict the liquid accumulation in tight gas wells, which can quickly and effectively predict the liquid accumulation in tight gas wells. Effective prediction of liquid accumulation can help production units take effective measures in a timely manner to improve the production efficiency of tight gas wells and reduce losses caused by liquid accumulation. The present invention uses a deformable attention mechanism to improve the Informer model and improve prediction accuracy. It can adapt to the prediction of different time spans of users according to user needs.
[0053] The present invention combines the advantages of the LSTM model and the Informer model to achieve high accuracy in short-term and long-term time series prediction. The Informer model of the present invention can perform efficient calculations through a deformable attention mechanism and a generative decoder, significantly reducing computational complexity and memory usage. The present invention can adapt to prediction tasks of different time spans according to user needs.
[0054] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0056] Figure 1 A schematic flow chart of a method for predicting liquid loading in tight gas wells according to the present invention;
[0057] Figure 2 It is a structural schematic diagram of the time prediction module of the present invention;
[0058] Figure 3 A schematic diagram of the structure of a device for predicting liquid accumulation in a tight gas well according to the present invention;
[0059] Figure 4 A schematic diagram of the structure of an electronic device for predicting liquid accumulation in tight gas wells according to the present invention. DETAILED DESCRIPTION
[0060] Below, the example embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited by the example embodiments described herein. It should be noted that unless otherwise specifically stated, the relative arrangement of the parts and steps, the numerical expressions and the numerical values set forth in these embodiments do not limit the scope of the present invention.
[0061] Those skilled in the art can understand that the terms "first", "second", S1, S2, etc. in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor represent the necessary logical order between them. It should also be understood that in the embodiments of the present invention, "multiple" can refer to two or more, and "at least one" can refer to one, two or more. It should also be understood that for any component, data or structure mentioned in the embodiments of the present invention, in the absence of explicit limitation or contrary revelation given in the context, it can generally be understood as one or more. In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship. It should also be understood that the description of each embodiment of the present invention emphasizes the differences between the embodiments, and the same or similar parts can refer to each other. For the sake of brevity, they will not be repeated one by one. At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention and its application or use. Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, they should be considered part of the specification. It should be noted that similar reference numerals and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be further discussed in subsequent figures.
[0062] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc. Terminal devices, computer systems, servers, etc. Electronic devices can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, target programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0063] Exemplary Methods
[0064] Figure 1 FIG. 1 is a flow chart of a method for predicting liquid accumulation in a tight gas well provided by an exemplary embodiment of the present invention. Figure 1 As shown, the following steps are included:
[0065] Step S1: obtaining production data of the tight gas well to be predicted, preprocessing the production data of the tight gas well to be predicted, and normalizing the preprocessed production data of the tight gas well;
[0066] Step S2: dividing the normalized tight gas well production data into multiple subsequences according to time, inputting the trained liquid accumulation prediction model, and obtaining liquid accumulation prediction results;
[0067] The effusion prediction model includes a bidirectional processing module and a prediction module;
[0068] The bidirectional processing module includes a first LSTM layer and a second LSTM layer;
[0069] The first LSTM layer includes N forward LSTM submodules connected in sequence, and each subsequence is sorted in a forward time order. Each forward LSTM submodule receives a subsequence in sequence, and the first forward LSTM submodule receives the first subsequence, and uses the generated feature vector as the output of the first forward LSTM submodule; for each forward LSTM submodule from the second forward LSTM submodule to the N-1th forward LSTM submodule, the number of the forward LSTM submodule is obtained, and NUM0 is recorded as the number minus 1. The forward LSTM submodule generates a feature vector based on the output of the NUM0th forward LSTM submodule and the input of the forward LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th forward LSTM submodule; the Nth forward LSTM submodule generates a first output feature vector based on the feature vector generated by the N-1th forward LSTM submodule and its own input;
[0070] The second LSTM layer includes N reverse LSTM submodules connected in sequence, and each subsequence is sorted in reverse time order. Each reverse LSTM submodule receives a subsequence in sequence, and the first reverse LSTM submodule receives the subsequence ranked first and the first output feature vector, and uses the generated feature vector as the output of the first reverse LSTM submodule; for each reverse LSTM submodule from the second reverse LSTM submodule to the N-1th reverse LSTM submodule, obtain the number of the reverse LSTM submodule, record NUM0 as the number minus 1, and the reverse LSTM submodule generates a feature vector based on the output of the NUM0th reverse LSTM submodule and the input of the reverse LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th reverse LSTM submodule; the Nth reverse LSTM submodule generates a fused feature vector based on the feature vector generated by the N-1th reverse LSTM submodule and its own input;
[0071] The prediction module includes an Informer submodule and a self-attention submodule. The self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight. The Informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight. The liquid accumulation prediction result includes a predicted value or a confidence interval of the liquid accumulation.
[0072] In the present invention, the Informer submodule is a conventional Informer model in this field. The tight gas well production data to be predicted is time series data, including historical observations, timestamps and other information. By performing operations such as cleaning and normalization on the tight gas well production data to be predicted, a standard input is provided for the liquid accumulation prediction model. The bidirectional processing module constructs a short-term time series prediction model based on the LSTM network module, which is suitable for predicting data in the next few hours to days. The prediction module constructs a long-term time series prediction model based on the output of the bidirectional processing module through deformable attention, which is suitable for predicting data in the next few days to weeks. The liquid accumulation prediction result includes information such as the predicted value and the confidence interval.
[0073] The fused feature vector of the present invention is a fusion of the feature vectors generated by each reverse LSTM submodule and the feature vectors generated by each forward LSTM submodule to obtain a fused feature vector. Among them, the forward LSTM submodule can capture the trend and periodic changes of data moving forward over time, while the reverse LSTM submodule can reveal hidden information or reverse correlations that may be ignored due to forward processing. By fusing the feature vectors from these two different perspectives, the model can understand the time series data more comprehensively, thereby improving the accuracy of the prediction.
[0074] Furthermore, the production data of the tight gas well to be predicted includes date, production layer, production time, oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation information, where the liquid accumulation information is a Boolean value indicating whether there is liquid accumulation.
[0075] In the present invention, in the tight gas well production data, the data of each day includes a total of 30 features. In order to reduce the data dimension and the complexity of subsequent processing, only the date, production layer, production time, oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation information are selected.
[0076] The preprocessing of the tight gas well production data to be predicted and normalization of the preprocessed tight gas well production data include:
[0077] Organize the tight gas well production data to be predicted into time series
[0078]
[0079] in, is the time series of tight gas well production data to be predicted, That is Daily production data, including the following dimensions: date, production layer, production time, oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation information;
[0080] Performing data cleaning on the time series;
[0081] Each of the oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation is taken as a normalized object, and the following operations are performed on the normalized objects:
[0082] Calculate the mean:
[0083] Among them, μ t is the mean of the normalized object, S is the amount of data of the normalized object, t i is the feature vector corresponding to the i-th data of the normalized object;
[0084] Calculate the standard deviation:
[0085]
[0086] Among them, σ t is the standard deviation of the normalized object;
[0087] Normalization:
[0088]
[0089] t is the eigenvector corresponding to all the data of the normalized object, μ t The transpose of is the normalized result.
[0090] In the present invention, the data is organized into time series.
[0091]
[0092] in That is Daily production data, including the following dimensions: date, production layer, production time, oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation information.
[0093] For the liquid accumulation situation, experts label the data for one day based on the oil pressure, casing pressure, casing pressure drop, changes in production time, and casing pressure recovery after shutting in of specific wells, combined with the report of the liquid accumulation investigation. The labeled data are the production data of 30 tight gas wells in a block in the northwest, covering about eight years. The first six years of the labeled data are used as the training set, and the last two years of data are used as the validation set.
[0094] Secondly, data cleaning is performed. In this process, the possible problem is that there are abnormal values or null values in the data. For abnormal values, they are processed as null values and then processed together with null values. For null values, the interpolation method is used to calculate the average of the previous and next values of the missing value, and interpolation operations are performed on each column of the data to fill the null value. Data anomalies and null values are only occasionally seen in the production data of a few tight gas wells.
[0095] Then, the numerical feature information including oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation is normalized so that the data meets the training format requirements and eliminates or avoids the gradient explosion problem that may occur during the training process.
[0096] For the numerical characteristics of production data of tight gas wells, such as oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation, their means are first calculated:
[0097]
[0098] Among them, t i For The feature vector after removing the non-numerical feature production layer. Then, calculate its standard deviation:
[0099]
[0100] Finally, the numerical characteristics of the production data of tight gas wells, including oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation, are normalized, that is, each characteristic value is converted to a standard normal distribution with a mean of 0 and a variance of 1.
[0101]
[0102] The production layer of tight gas wells is a non-numerical feature and is encoded using the One-hot algorithm.
[0103] Step S2: Divide the normalized tight gas well production data into multiple subsequences according to time, input the trained liquid accumulation prediction model, and obtain the liquid accumulation prediction result.
[0104] Furthermore, the forward LSTM submodule and the reverse LSTM submodule each include a first LSTM layer, a first Dropout layer, a second LSTM layer, a second Dropout layer, a third LSTM layer, a third Dropout layer, and a fully connected layer, which are sequentially connected.
[0105] In the present invention, in the process of predicting the liquid accumulation in tight gas wells, the production data of tight gas wells are first segmented according to the time dimension. The production data of tight gas wells constitutes a time series X={x1,x2,...,x T} is divided into multiple subsequences, Xi ={x si ,x si+1 ,...,x ei}. i , e i are the start and end subscripts of the subsequences, respectively. The production data of tight gas wells is in days. The segment length is set to one month. Each subsequence retains some of the temporal features of the original tight gas well production data, but its reduced size makes subsequent processing more efficient. The core purpose of this step is to provide the model with a more refined temporal perspective so as to better capture the short-term dynamic changes hidden in the production data.
[0106] Next, the segmented production data of tight gas wells are fed into the forward LSTM module and the reverse LSTM module respectively. The forward LSTM module processes the production data of tight gas wells in the natural order (i.e., the order of increasing time), which can capture the trend and cyclical changes of the data over time, especially those short-term laws that are crucial for short-term predictions.
[0107]
[0108] x t is the input of the current time step, is the forward hidden state of the previous time step, LSTM forward Represents forward LSTM. The cleaned data is segmented and fed into the forward LSTM after reshaping.
[0109] Construct an LSTM model, first use the LSTM layer, then use the Dropout layer to reduce the possibility of overfitting. Repeatedly stack the LSTM layer and the Dropout layer three times. Finally, add a fully connected layer as the output layer.
[0110] The reverse LSTM module takes the opposite approach, that is, traversing the subsequences of tight gas well production data in descending time order. This helps the model look at the data from another perspective and reveal hidden information or reverse correlations that may be ignored due to forward processing.
[0111]
[0112] is the reverse hidden state at the previous time step.
[0113] The reverse LSTM module construction is the same as the forward one, that is, the production data of tight gas wells segmented by month are input in reverse time.
[0114] Through this two-way processing mechanism, the model can more comprehensively grasp the short-term characteristics of the time series.
[0115] After the bidirectional LSTM module is completed, the output results of the two modules, namely the liquid accumulation prediction data, are effectively integrated to form a comprehensive representation of the short-term liquid accumulation situation of tight gas wells. This representation not only includes the positive development trend of liquid accumulation in tight gas wells, but also incorporates supplementary information on the development trend of liquid accumulation in tight gas wells from a reverse perspective, thereby greatly enhancing the model's ability to capture short-term fluctuations.
[0116]
[0117] In the present invention, a fused feature vector is obtained by fusing the feature vectors generated by each reverse LSTM submodule and each forward LSTM submodule. The forward LSTM submodule can capture the trend and periodic changes in the time series, while the reverse LSTM submodule reveals the reverse correlation and hidden information that may be ignored by the forward processing. By connecting these two sets of feature vectors in chronological order, not only the original order information of the time series can be retained, but also the feature information from different perspectives is integrated, thereby providing a more comprehensive input representation for the model.
[0118] Furthermore, the self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight, and the informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight, including:
[0119] The fused feature vector is incorporated into the normalized tight gas well production data, that is, a feature vector is added to the normalized tight gas well production data, and the new normalized tight gas well production data is As the input of the self-attention submodule; wherein, are each characteristic vector in the new normalized tight gas well production data;
[0120] The self-attention submodule determines the attention weight α of each feature vector p ,
[0121]
[0122] in, , α p is the attention weight corresponding to the pth eigenvector of the new normalized tight gas well production data, s p represents the score or feature representation associated with the pth feature vector, s q represents the score or feature representation associated with the qth feature vector;
[0123] The self-attention submodule determines the offset Δ of each feature vector p ,
[0124]
[0125] Δ p is the offset of the p-th feature vector, indicating the amount by which the p-th feature vector needs to be adjusted in the attention mechanism; r pq is the attention weight between the p-th eigenvector and the q-th eigenvector, which reflects the importance of the q-th eigenvector in calculating the offset of the p-th eigenvector; N is the total number of eigenvectors in the new normalized tight gas well production data.
[0126] Each feature vector in the new normalized tight gas well production data is superimposed with its corresponding offset Δ p , forming the superimposed tight gas well production data;
[0127] The Informer submodule generates a liquid accumulation prediction result based on the superimposed tight gas well production data.
[0128] In the present invention, the output of each LSTM model, i.e., the one-dimensional liquid accumulation of tight gas wells, is connected in chronological order and incorporated into the sequence of tight gas well production data, which is equivalent to adding a new feature, and together with the original production data, forms the input data of the Informer. By importing this data into the Informer module, the long-term laws of the time series can be further explored. With its efficient deformable attention mechanism, the Informer module can significantly reduce the computational complexity and memory consumption when processing long sequences, while maintaining the ability to keenly capture long-term dependencies.
[0129] Assume that the input data of the Informer model is a series of feature vectors, denoted as
[0130]
[0131] Where N is the length of the tight gas well production data (after adding the predicted tight gas well liquid loading). For each feature vector z i , by introducing a position offset Δ i , transform it to get the new feature vector . Position offset Δ i It is obtained by weighted summation of attention weights and feature vectors of other input data.
[0132] Calculation of attention weights, using function f to calculate the score s of each feature vector iThen, the score is exponentially normalized to obtain the attention weight , where j represents the index when traversing all feature vectors.
[0133] The calculation of the position offset is based on the weighted summation of the attention weight and the feature vector of other input data to obtain the position offset Δ i This is done by multiplying each feature vector by the attention weight and then summing the resulting weighted feature vectors.
[0134] Adjust the shape of the attention mechanism, by applying a position offset to the original position of the input data, the shape of the attention mechanism can be adjusted. Specifically, the new feature vector It can be represented as the original feature vector plus the position offset.
[0135] Deformable self-attention module, in the processing of tight gas well production data, the deformable self-attention module can be used to enhance the characteristics of tight gas well production data. This converts the input vector into a feature map and then generates a query vector while taking into account the coordinates of the reference point. The final output result is obtained by combining the offset module and the attention module. At this stage, the Informer module deeply explores the long-term trend, seasonal pattern and possible periodic fluctuations of liquid accumulation in the tight gas well production data, providing a solid foundation for long-term prediction.
[0136]
[0137] O t is the output of the Informer module at time step t.
[0138] Finally, by combining the bidirectional LSTM module's precise capture of short-term liquid accumulation patterns and the Informer module's in-depth insight into long-term liquid accumulation patterns, the prediction model proposed in the present invention achieves a comprehensive, efficient and accurate prediction of the production data of tight gas wells with liquid accumulation.
[0139] In this embodiment, the first six years of annotated tight gas well production data are used as the training set, and the last two years of data are used as the validation set. The training set data is used to train the liquid accumulation prediction model; the trained liquid accumulation prediction model is validated on the validation set to obtain the accuracy of the tight gas well liquid accumulation prediction model.
[0140] Exemplary Devices
[0141] Figure 3 FIG. 1 is a schematic diagram of a device for predicting liquid accumulation in a tight gas well provided by an exemplary embodiment of the present invention. Figure 3 As shown, this embodiment includes:
[0142] Data processing module: configured to obtain production data of the tight gas well to be predicted, preprocess the production data of the tight gas well to be predicted, and normalize the preprocessed production data of the tight gas well;
[0143] Prediction module: configured to divide the normalized tight gas well production data into multiple subsequences according to time, input the trained liquid accumulation prediction model, and obtain the liquid accumulation prediction result;
[0144] The effusion prediction model includes a bidirectional processing module and a prediction module;
[0145] The bidirectional processing module includes a first LSTM layer and a second LSTM layer;
[0146] The first LSTM layer includes N forward LSTM submodules connected in sequence, and each subsequence is sorted in a forward time order. Each forward LSTM submodule receives a subsequence in sequence, and the first forward LSTM submodule receives the first subsequence, and uses the generated feature vector as the output of the first forward LSTM submodule; for each forward LSTM submodule from the second forward LSTM submodule to the N-1th forward LSTM submodule, the number of the forward LSTM submodule is obtained, and NUM0 is recorded as the number minus 1. The forward LSTM submodule generates a feature vector based on the output of the NUM0th forward LSTM submodule and the input of the forward LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th forward LSTM submodule; the Nth forward LSTM submodule generates a first output feature vector based on the feature vector generated by the N-1th forward LSTM submodule and its own input;
[0147] The second LSTM layer includes N reverse LSTM submodules connected in sequence, and each subsequence is sorted in reverse time order. Each reverse LSTM submodule receives a subsequence in sequence, and the first reverse LSTM submodule receives the subsequence ranked first and the first output feature vector, and uses the generated feature vector as the output of the first reverse LSTM submodule; for each reverse LSTM submodule from the second reverse LSTM submodule to the N-1th reverse LSTM submodule, obtain the number of the reverse LSTM submodule, record NUM0 as the number minus 1, and the reverse LSTM submodule generates a feature vector based on the output of the NUM0th reverse LSTM submodule and the input of the reverse LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th reverse LSTM submodule; the Nth reverse LSTM submodule generates a fused feature vector based on the feature vector generated by the N-1th reverse LSTM submodule and its own input;
[0148] The prediction module includes an Informer submodule and a self-attention submodule. The self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight. The Informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight. The liquid accumulation prediction result includes a predicted value or a confidence interval of the liquid accumulation.
[0149] Exemplary Electronic Devices
[0150] Figure 4 This is the structure of an electronic device 40 provided by an exemplary embodiment of the present invention. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them. Figure 4 FIG. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure. Figure 4 As shown, the electronic device includes one or more processors 41 and a memory 42 .
[0151] The processor 41 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0152] The memory 42 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 41 may run the program instructions to implement the methods of the software programs of the various embodiments of the present disclosure described above and / or other desired functions. In one example, the electronic device may also include: an input device 43 and an output device 44, which are interconnected through a bus system and / or other forms of connection mechanisms (not shown). In addition, the input device 43 may also include, for example, a keyboard, a mouse, etc. The output device 44 may output various information to the outside. The output device 44 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0153] Of course, to simplify, Figure 4Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.
[0154] Exemplary computer program products and computer-readable storage media
[0155] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
[0156] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0157] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0158] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0159] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0160] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0161] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0162] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0163] It should also be noted that in the apparatus, equipment and method of the present disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present disclosure. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present disclosure. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown here, but to the widest scope consistent with the principles and novel features disclosed herein.
[0164] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for predicting liquid loading in tight gas wells, characterized in that: The method comprises the following steps: Step S1: obtaining production data of the tight gas well to be predicted, preprocessing the production data of the tight gas well to be predicted, and normalizing the preprocessed production data of the tight gas well; Step S2: dividing the normalized tight gas well production data into multiple subsequences according to time, inputting the trained liquid accumulation prediction model, and obtaining liquid accumulation prediction results; The effusion prediction model includes a bidirectional processing module and a prediction module; The bidirectional processing module includes a first LSTM layer and a second LSTM layer; The first LSTM layer includes N forward LSTM submodules connected in sequence, and each subsequence is sorted in a forward time order. Each forward LSTM submodule receives a subsequence in sequence, and the first forward LSTM submodule receives the first subsequence, and the generated feature vector is used as the output of the first forward LSTM submodule; For each forward LSTM submodule from the second forward LSTM submodule to the N-1th forward LSTM submodule, obtain the number of the forward LSTM submodule, record NUM0 as the number minus 1, generate a feature vector based on the output of the NUM0th forward LSTM submodule and the input of the forward LSTM submodule itself, and use the feature vector as the input of the NUM0+2th forward LSTM submodule; the Nth forward LSTM submodule generates a first output feature vector based on the feature vector generated by the N-1th forward LSTM submodule and its own input; The second LSTM layer includes N reverse LSTM submodules connected in sequence, and each subsequence is sorted in reverse time order. Each reverse LSTM submodule receives a subsequence in sequence, and the first reverse LSTM submodule receives the subsequence ranked first and the first output feature vector, and uses the generated feature vector as the output of the first reverse LSTM submodule; for each reverse LSTM submodule from the second reverse LSTM submodule to the N-1th reverse LSTM submodule, obtain the number of the reverse LSTM submodule, record NUM0 as the number minus 1, and the reverse LSTM submodule generates a feature vector based on the output of the NUM0th reverse LSTM submodule and the input of the reverse LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th reverse LSTM submodule; the Nth reverse LSTM submodule generates a fused feature vector based on the feature vector generated by the N-1th reverse LSTM submodule and its own input; The prediction module includes an Informer submodule and a self-attention submodule. The self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight. The Informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight. The liquid accumulation prediction result includes a predicted value or a confidence interval of the liquid accumulation.
2. The method according to claim 1, characterized in that The production data of the tight gas well to be predicted include date, production layer, production time, oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation information. The liquid accumulation information is a Boolean value indicating whether there is liquid accumulation.
3. The method according to claim 1, characterized in that The preprocessing of the tight gas well production data to be predicted and normalization of the preprocessed tight gas well production data include: The tight gas well production data to be predicted is organized into a time series: , in, is the time series of tight gas well production data to be predicted, That is Daily production data, including the following dimensions: date, production layer, production time, oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation information; Performing data cleaning on the time series; Each of the oil pressure, casing pressure, casing pressure drop, gas production, and liquid accumulation is taken as a normalized object, and the following operations are performed on the normalized objects: Calculate the mean: , Among them, μ t is the mean of the normalized object, S is the amount of data of the normalized object, t i is the feature vector corresponding to the i-th data of the normalized object; Calculate the standard deviation: , Among them, σ t is the standard deviation of the normalized object; Normalization: , t is the eigenvector corresponding to all the data of the normalized object, μ t The transpose of is the normalized result.
4. The method according to claim 1, characterized in that The forward LSTM submodule and the reverse LSTM submodule each include a first LSTM layer, a first Dropout layer, a second LSTM layer, a second Dropout layer, a third LSTM layer, a third Dropout layer, and a fully connected layer, which are connected in sequence.
5. The method according to claim 1, characterized in that The self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight, and the informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight, including: The fused feature vector is incorporated into the normalized tight gas well production data, that is, the normalized tight gas well production data is added with a feature vector to form new normalized tight gas well production data; the new normalized tight gas well production data is added with a feature vector. As the input of the self-attention submodule; wherein, are each characteristic vector in the new normalized tight gas well production data; The self-attention submodule determines the attention weight α of each feature vector p , , in, , α p is the attention weight corresponding to the pth eigenvector of the new normalized tight gas well production data, s p represents the score or feature representation associated with the pth feature vector, s q represents the score or feature representation associated with the qth feature vector; The self-attention submodule determines the offset Δ of each feature vector p , , Δ p is the offset of the p-th feature vector, indicating the amount by which the p-th feature vector needs to be adjusted in the attention mechanism; r pq is the attention weight between the p-th eigenvector and the q-th eigenvector, and this attention weight reflects the importance of the q-th eigenvector in calculating the offset of the p-th eigenvector; N is the total number of eigenvectors in the new normalized tight gas well production data; Each feature vector in the new normalized tight gas well production data is superimposed with its corresponding offset Δ p , forming the superimposed tight gas well production data; The Informer submodule generates a liquid accumulation prediction result based on the superimposed tight gas well production data.
6. A device for predicting liquid accumulation in tight gas wells, characterized in that: The device comprises: Data processing module: configured to obtain production data of the tight gas well to be predicted, preprocess the production data of the tight gas well to be predicted, and normalize the preprocessed production data of the tight gas well; Prediction module: configured to divide the normalized tight gas well production data into multiple subsequences according to time, input the trained liquid accumulation prediction model, and obtain the liquid accumulation prediction result; The effusion prediction model includes a bidirectional processing module and a prediction module; The bidirectional processing module includes a first LSTM layer and a second LSTM layer; The first LSTM layer includes N forward LSTM submodules connected in sequence, and each subsequence is sorted in a forward time order. Each forward LSTM submodule receives a subsequence in sequence, and the first forward LSTM submodule receives the first subsequence, and uses the generated feature vector as the output of the first forward LSTM submodule; for each forward LSTM submodule from the second forward LSTM submodule to the N-1th forward LSTM submodule, the number of the forward LSTM submodule is obtained, and NUM0 is recorded as the number minus 1. The forward LSTM submodule generates a feature vector based on the output of the NUM0th forward LSTM submodule and the input of the forward LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th forward LSTM submodule; the Nth forward LSTM submodule generates a first output feature vector based on the feature vector generated by the N-1th forward LSTM submodule and its own input; The second LSTM layer includes N reverse LSTM submodules connected in sequence, and each subsequence is sorted in reverse time order. Each reverse LSTM submodule receives a subsequence in sequence, and the first reverse LSTM submodule receives the subsequence ranked first and the first output feature vector, and uses the generated feature vector as the output of the first reverse LSTM submodule; for each reverse LSTM submodule from the second reverse LSTM submodule to the N-1th reverse LSTM submodule, obtain the number of the reverse LSTM submodule, record NUM0 as the number minus 1, and the reverse LSTM submodule generates a feature vector based on the output of the NUM0th reverse LSTM submodule and the input of the reverse LSTM submodule itself, and uses the feature vector as the input of the NUM0+2th reverse LSTM submodule; the Nth reverse LSTM submodule generates a fused feature vector based on the feature vector generated by the N-1th reverse LSTM submodule and its own input; The prediction module includes an Informer submodule and a self-attention submodule. The self-attention submodule receives the fused feature vector and the normalized tight gas well production data to generate an attention weight. The Informer submodule generates a liquid accumulation prediction result based on the fused feature vector, the normalized tight gas well production data and the attention weight. The liquid accumulation prediction result includes a predicted value or a confidence interval of the liquid accumulation.
7. A computer-readable storage medium, characterized in that: The storage medium stores a plurality of instructions; the plurality of instructions are used for a processor to load and execute the method as described in any one of claims 1 to 5.
8. An electronic device, characterized in that: The electronic device comprises: A processor, which is used to execute multiple instructions; A memory for storing a plurality of instructions; The plurality of instructions are used to be stored in the memory and loaded and executed by the processor according to any one of claims 1 to 5.
Citation Information
Patent Citations
Shaft effusion detection method based on depth anomaly detection
CN114358215A
Gas well effusion diagnosis method based on neural network
CN115186739A
LSTM carbon price prediction method and system based on attention mechanism
CN117151770A
Method for judging abnormal working conditions of shale gas well plunger process well
CN117454294A
Power plant generating capacity prediction method based on hybrid prediction framework
CN118157129A