Gas storage capacity change automatic prediction method and early warning system

By using a machine learning LSTM network model, combined with horizontal and vertical prediction, the problem of difficult monitoring of gas storage capacity changes has been solved, enabling accurate prediction of gas storage capacity and timely early warning of leaks, thus improving the scientific nature and stability of gas storage management.

CN120850708APending Publication Date: 2025-10-28PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410519200.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing technologies are insufficient for quickly and easily monitoring and predicting changes in gas storage capacity. Traditional simulation methods cannot effectively address the impact of reservoir fracture and porosity changes on storage capacity, and there is a lack of accurate storage capacity prediction algorithms.

Method used

Machine learning methods are employed to construct horizontal and vertical prediction models using LSTM (Long Short-Term Memory) networks. Historical data from well clusters and individual wells are used to predict changes in gas storage capacity, and visualization charts are combined to provide early warnings.

Benefits of technology

It enables accurate prediction of changes in gas storage capacity and timely early warning of leaks, improving the scientific nature and stability of gas storage management and enhancing the reliability of storage capacity monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120850708A_ABST
    Figure CN120850708A_ABST
Patent Text Reader

Abstract

The invention discloses a gas storage capacity change automatic prediction method and early warning system, and the method comprises the steps: data input and primary processing: collecting original data from each oil well monitoring system, filtering interference information through primary processing, and converting the interference information into a preset format; data flowing and branching: carrying out deeper data cleaning on the data after primary processing, wherein the cleaned data is used for training a transverse prediction model and a longitudinal prediction model; and model output: inputting related data of the target well, selecting a prediction model or a longitudinal prediction model to predict the reservoir capacity change of the target well, and presenting the reservoir capacity change in a visual chart form so as to judge whether reservoir capacity leakage exists or not. According to the method, the storage capacity change of the gas storage can be accurately predicted by comparing the machine learning prediction with the actually observed pressure-injection curve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of risk prevention technology in oil and gas exploration and development, and in particular to an automatic prediction method and early warning system for changes in gas storage capacity. Background Art

[0002] Changes in gas storage capacity, as a core indicator of gas reservoir development and management, must be meticulously monitored and analyzed to ensure the stability of the gas storage facility and the sustainability of its economic operation. Microstructural changes in the fractures and pores of the gas storage reservoir rocks can lead to fluctuations in storage capacity. These geological factors and their interactions require further in-depth research to provide a scientific basis for the long-term stability of gas storage facilities.

[0003] The injection and production scheme of a gas storage facility directly impacts its capacity, and changes in this scheme can lead to changes in capacity. Therefore, any modifications to the injection and production scheme must undergo rigorous analysis and evaluation to anticipate its potential impact on the overall storage capacity. The development of rapid and convenient gas storage capacity prediction algorithms or technologies has become an urgent need. Precise control and monitoring of the pressure and flow rate of injection and production wells in a gas storage facility can reflect changes in reservoir fractures, porosity, and capacity in real time, providing crucial information for gas storage facility management. Accurate calculation of gas storage capacity can be achieved through in-depth analysis of the pressure-flow rate curves of injection and production wells, providing a reliable mathematical model for capacity monitoring.

[0004] The nonlinear relationship between pressure, flow rate and storage capacity in a gas storage facility encompasses complex factors such as geology, rock properties, and geochemistry. The analysis of these relationships challenges traditional reservoir simulation and numerical calculation methods, requiring more advanced analytical approaches. Summary of the Invention

[0005] To address the aforementioned issues, this invention proposes an automatic prediction method and early warning system for gas storage capacity changes. By comparing machine learning predictions with actual observed pressure-injection curves, accurate predictions of gas storage capacity changes can be made.

[0006] The technical solution adopted in this invention is as follows:

[0007] On the one hand, this invention proposes an automatic prediction method for gas storage capacity changes, including:

[0008] Data input and preliminary processing: Raw data is collected from each oil well monitoring system, and the data is filtered to remove interference and converted into a preset format through preliminary processing;

[0009] Data Flow and Branching: The pre-processed data undergoes further data cleaning. The cleaned data is then used to train horizontal and vertical prediction models. The horizontal prediction model focuses on the interrelationships between well groups, using historical data from other wells in the group to predict the performance of the target well. The vertical prediction model focuses on the performance of an individual well over time, analyzing long-term data to predict the future trend of the target well.

[0010] Model output: Input relevant data of the target well, select the prediction model or the longitudinal prediction model to predict the reservoir capacity change of the target well, and present it in the form of visualization charts to determine whether there is reservoir capacity leakage.

[0011] Furthermore, the preliminary processing includes: noise removal, data standardization, and converting time data into a timestamp format recognizable by the training of the horizontal and vertical prediction models; the data cleaning includes: filling in missing values ​​and data encoding conversion.

[0012] Furthermore, the lateral prediction model is built on LSTM (Long Short-Term Memory) network, which learns the complex dependencies of time series from historical data to achieve one-time prediction of gas volume and oil pressure data of multiple wells.

[0013] Furthermore, the longitudinal prediction model is constructed based on time windows and LSTM (Long Short-Term Memory) networks to capture the time-series characteristics of oil well data and predict future trends and patterns of oil wells.

[0014] Furthermore, the training process of the horizontal prediction model and the vertical prediction model includes: parameter initialization, model structure definition, and iterative optimization.

[0015] On the other hand, this invention proposes an automatic early warning system for changes in gas storage capacity, comprising:

[0016] The preprocessing module is configured to collect raw data from each oil well monitoring system, filter out interference information through preliminary processing and convert it into a preset format; and perform further data cleaning on the preprocessed data.

[0017] The model training module is configured to use the cleaned data to train a horizontal prediction model and a vertical prediction model. The horizontal prediction model focuses on the interrelationships between well groups and uses historical data from other wells in the well group to predict the performance of the target well. The vertical prediction model focuses on the performance of an individual well over time and uses long-term data to predict the future trend of the target well.

[0018] The model output module is configured to take in relevant data of the target well, select a prediction model or a longitudinal prediction model to predict the reservoir capacity change of the target well, and present the results in the form of visual charts to determine whether there is a reservoir capacity leak.

[0019] Furthermore, the preliminary processing includes: noise removal, data standardization, and converting time data into a timestamp format recognizable by the training of the horizontal and vertical prediction models; the data cleaning includes: filling in missing values ​​and data encoding conversion.

[0020] Furthermore, the lateral prediction model is built on LSTM (Long Short-Term Memory) network, which learns the complex dependencies of time series from historical data to achieve one-time prediction of gas volume and oil pressure data of multiple wells.

[0021] Furthermore, the longitudinal prediction model is constructed based on time windows and LSTM (Long Short-Term Memory) networks to capture the time-series characteristics of oil well data and predict future trends and patterns of oil wells.

[0022] Furthermore, the training process of the horizontal prediction model and the vertical prediction model includes: parameter initialization, model structure definition, and iterative optimization.

[0023] The beneficial effects of the present invention are:

[0024] 1. The lateral prediction model of this invention uses data from multiple wells, focusing on discovering correlations between wells to predict parameters of unknown wells. A significant feature of this model is its ability to effectively handle multivariate inputs and capture potential connections between different wells. Analysis of the comparison chart between actual and predicted data reveals that this model closely follows the true trends of most wells, especially in stable data segments. This model is more efficient in processing cross-well information and is suitable for scenarios with large amounts of well group data.

[0025] 2. The longitudinal prediction model of this invention focuses on historical data of a single well to predict its future dynamic changes. Utilizing time window technology and LSTM networks, this model excels in capturing time dependencies, and the prediction curves typically accurately reflect periodic changes and trends. This model performs even better in processing long-term series data of single wells, and is particularly suitable for in-depth analysis of the production performance of single wells.

[0026] 3. This invention, based on machine learning, particularly deep learning, provides a new perspective for studying the relationship between historical pressure-flow rate curves and future trends of gas storage injection wells. By comparing machine learning predictions with actual observed pressure-injection curves, accurate predictions of gas storage capacity changes can be made.

[0027] 4. The accumulation of long-term observation data helps to iteratively optimize the model, continuously improve the prediction accuracy, and provide stronger data support for the long-term management of gas storage facilities; the application of gas reservoir numerical simulation can supplement training data, optimize the model, and improve the prediction accuracy, further providing strong technical support for the scientific management of gas storage facilities. Attached Figure Description

[0028] Figure 1 A flowchart of an automatic prediction method for gas storage capacity changes according to the present invention.

[0029] Figure 2 The input data diagram of Embodiment 1 of the present invention.

[0030] Figure 3 The structure diagram of the LSMT prediction model for future gas injection and gas extraction volume of the gas storage facility in Embodiment 1 of the present invention.

[0031] Figure 4 Loss curves of 20 wells with an EPOCH value of 200 in Example 1 of this invention.

[0032] Figure 5 The program architecture diagram of Embodiment 1 of the present invention.

[0033] Figure 6 The flowchart of the model usage in Embodiment 1 of the present invention.

[0034] Figure 7 The loss curve of Embodiment 1 of the present invention. Detailed Implementation

[0035] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments are now described. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention; that is, the described embodiments are only a part of the embodiments of the invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0036] Example 1

[0037] This embodiment provides an automatic prediction method for gas storage capacity changes. By comparing machine learning predictions with actual observed pressure-injection curves, accurate predictions of gas storage capacity changes can be made. Figure 1 As shown, the method includes the following steps:

[0038] Data Input and Preliminary Processing: Raw data is collected from each oil well monitoring system, and preliminary processing is performed to filter out interfering information and convert it into a preset format. Preferably, the preliminary processing may include: noise removal, data standardization, and converting time data into a timestamp format recognizable by the training of the horizontal and vertical prediction models.

[0039] Data flow and branching: The pre-processed data undergoes deeper data cleaning, such as filling missing values ​​and data encoding transformation; the cleaned data is used to train lateral and longitudinal prediction models. The lateral prediction model focuses on the interrelationships between well groups, using historical data from other wells in the group to predict the performance of the target well; the longitudinal prediction model focuses on the performance of an individual well over time, predicting the future trend of the target well by analyzing long-term data.

[0040] Model output: Input relevant data of the target well, select the prediction model or the longitudinal prediction model to predict the reservoir capacity change of the target well, and present it in the form of visualization charts to determine whether there is reservoir capacity leakage.

[0041] Preferably, the horizontal prediction model is built on an LSTM (Long Short-Term Memory) network, learning the complex dependencies of time series data from historical data to predict gas volume and oil pressure data of multiple wells simultaneously. The vertical prediction model is built on a time window and an LSTM network, capturing the time series characteristics of oil well data and predicting future trends and patterns of oil wells. More preferably, the training process for the horizontal and vertical prediction models can be: parameter initialization, model structure definition, and iterative optimization.

[0042] Specifically, the automatic prediction method for gas storage capacity changes in this embodiment will be described in detail using the Chongqing Xiangguosi gas storage facility as an example. Specifically, the flow rate and pressure of 13 injection and production wells in the Chongqing Xiangguosi gas storage facility from 2013 to 2022 are analyzed. Using machine learning methods, a model is established that uses historical injection and production data as input to predict future injection and production data. This model can be used for storage capacity change prediction and storage leakage detection.

[0043] I. Theoretical Methods

[0044] 1.1 Gas storage capacity calculation method:

[0045] According to the calculation method for natural gas loss in underground gas storage facilities in Q / SY 195.1-2007, the formula for calculating storage capacity loss of gas reservoir-type gas storage facilities is as follows:

[0046] Q sh =Q qcg +Q zg –Q cg -Q qmg

[0047] in:

[0048] Q sh This refers to the amount of natural gas lost.

[0049] Q qcg Initial working gas volume in the gas storage facility;

[0050] Q qmg This refers to the working gas volume at the end of the gas storage capacity.

[0051] Q cg This refers to the amount of gas extracted from the gas storage facility.

[0052] Q zg The amount of gas injected into the gas storage facility;

[0053] 1.2 Injection-production curves and reservoir capacity changes:

[0054] The gas volume Q in the gas storage is represented by the equation Q(p,t) relating gas pressure p and time t. If we assume the initial gas pressure is P, and after one round of injection t+Δt, the pressure returns to P, then the change in gas volume in the storage is:

[0055] Q = Q(P,t) – Q(P,t+Δt)

[0056] If it is assumed that the initial working gas pressure in the gas storage facility is equal to the final working gas pressure, then ΔQ can be considered equivalent to the change in the gas storage facility's capacity.

[0057] 1.3 Prediction of reservoir capacity changes:

[0058] The differential of gas storage capacity with respect to time, q = dQ / dt, can be obtained from the daily gas injection and extraction volumes recorded on-site. Integrating this differential value yields the change in storage capacity, ΔQ. Therefore, conducting predictive research on q(p,t) can predict changes in gas storage capacity. The existing input data is q(p,t1:t2), where t1 and t2 are the start and end points of a recorded time period. The objective is to output the predicted data q(p,t2+Δt), where Δt is the length of a time period from t2 to the future. It is worth noting that the gas pressure p changes with time t and can be considered a function of t, which should be expressed as p(t). However, for simplicity, it is abbreviated to p in some parts of this report. In this embodiment, it is assumed that q(t2:t2+Δt) is known.

[0059] The goal of this embodiment is to establish a model O that uses historical pressure and gas volume p(t1:t2), q(t1:t2), and planned future gas volume q(t2:t2+Δt) as inputs to predict future pressure p(t2:t2+Δt).

[0060] Model training and prediction methods can be divided into two types: longitudinal prediction and lateral prediction.

[0061] Longitudinal prediction: Injection and production data from all 22 wells on day X were used to predict the gas flow rate on day Y (Y is usually much smaller than X).

[0062] Horizontal prediction: Using the production and pressure curves of well X and well 22-X over N days as training data, a model is established. This model predicts the pressure of well 22-X over NM days based on the pressure and gas volume of well X over N days, the pressure and gas volume of well 22-X over M days, and the gas volume of well 22-X over NM days. By comparing the predicted gas volume with the actual gas volume, and considering the continuity of the injection-production curves of the gas storage facility itself, storage capacity loss can be detected.

[0063] II. Machine Learning Training

[0064] 2.1 Neural Network Selection

[0065] The machine learning portion of this embodiment employs Long Short-Term Memory (LSTM) technology from neural network techniques. A neural network is a computational model inspired by biological nervous systems, consisting of multiple interconnected layers of artificial neurons. Each neuron receives the output of the neuron in the previous layer and passes the weighted sum to the next layer after processing it through an activation function. These connection weights are adjusted through an iterative learning process, enabling the network to automatically capture features and patterns from data examples.

[0066] Recurrent Neural Networks (RNNs) are neural network architectures designed to efficiently process sequential data and temporal information. Their core feature lies in the introduction of recurrent connections, allowing information to be passed within the network and retained in memory, thus better modeling previous states and inputs in the sequence. However, traditional RNNs suffer from vanishing or exploding gradients, limiting their effectiveness on long sequences. To overcome these problems, improved RNN variants have been developed, such as Long Short-Term Memory Networks (LSTM) and Gated Recurrent Units (GRUs), which effectively address the challenges of modeling dependencies in long sequences by introducing gating mechanisms. Recurrent Neural Networks and their improved variants perform exceptionally well in sequence data modeling and are widely used in tasks such as natural language processing, speech recognition, and stock prediction, demonstrating their ability to effectively capture sequence patterns and features.

[0067] Long Short-Term Memory (LSTM) networks are a special type of recurrent neural network (RNN) structure designed to capture long-term dependencies in time-series data by overcoming the long-term dependency problem inherent in traditional RNNs. The core component of an LSTM is a structure called a "cell," which contains three important gating mechanisms: the input gate, the forget gate, and the output gate. The input gate controls the flow of information from the input to the cell state. At time step t, the input to the LSTM gate is the current time step input X.t The hidden state h at the previous time step t-1 The network jointly decides which information will be discarded from the cell state; the forget gate determines which information will be discarded, a process that allows the network to update its understanding of the internal structure of the time series based on new inputs; the output gate determines which information will be used to compute the next hidden state.

[0068] Training an LSTM model typically involves using an algorithm called Backpropagation Through Time (BPTT). Given a set of training data, the algorithm first propagates the information forward through the network to calculate the loss at each time step, and then updates the network weights by backpropagating the gradients. Different loss functions and optimizers may also be employed to optimize network performance. Due to its unique design, LSTM has been widely used in various time-series prediction tasks, such as natural language processing, speech recognition, and financial forecasting. However, its training process is relatively computationally intensive, requiring fine-tuning of hyperparameters and potentially involving multiple iterations to achieve the desired model performance.

[0069] The Xiangguosi gas storage facility is a gas reservoir type, and its injection-production curve exhibits strong periodicity. Conventional extrapolation techniques struggle to deduce and predict the periodic changes in this curve. Recurrent Neural Networks (RNNs) offer significant advantages in predicting periodic curves. An RNN is a neural network specifically designed for processing time-series data. It can capture the relationships between different time steps in a periodic curve, thus better understanding and predicting periodic patterns and changes. Conventional feedforward neural networks may suffer from vanishing or exploding gradients when processing long sequences, while RNNs, through their recurrent structure, can better handle long-term dependencies, which is particularly important in periodic data. RNNs store information from previous time steps through hidden states, allowing them to remember previous periodic patterns and better predict future periodic changes. RNNs can adapt to different types of periodic patterns, from simple sine curves to more complex periodic fluctuations. Furthermore, predictive performance can be further improved by adjusting the RNN's network structure and hyperparameters. RNNs can be optimized through iterative training, gradually improving their predictive ability on periodic data. This helps the model gradually adapt to complex periodic patterns in the data.

[0070] LSTM (Long Short-Term Memory) is a variant of Recurrent Neural Networks (RNNs) that offers significant advantages over traditional RNNs in many tasks. Particularly in handling long sequences, addressing the vanishing gradient problem, and capturing long-term dependencies, LSTM has achieved remarkable success in both academia and industry. Here are some of the advantages of LSTM over traditional RNNs:

[0071] Long-term dependency modeling: Traditional RNNs may encounter the vanishing or exploding gradient problem when dealing with long sequences, making it difficult to capture long-distance temporal dependencies. LSTM, through its gating mechanism, especially the forget gate, input gate, and output gate, can better maintain and utilize long-term memory, thus better modeling long-term dependencies.

[0072] Suppressing gradient problems: LSTM effectively suppresses the vanishing and exploding gradient problems by controlling the flow of information through gating mechanisms. This allows LSTM to be trained in deeper network structures, thereby improving model performance.

[0073] Memory cells: LSTM introduces the concept of memory cells, which can retain and update information. This structure allows LSTM to better maintain and update the state of previous time steps, thus handling time-series data better.

[0074] Flexibility: LSTM's gating mechanism allows it to learn to selectively ignore or retain specific information. This makes LSTM more flexible across different tasks and datasets, enabling it to adapt to various data patterns.

[0075] Long sequence processing: Due to the gating mechanism of LSTM, it can maintain good performance when processing long sequences and will not suffer from the performance degradation problem caused by the increase of sequence length.

[0076] Therefore, this embodiment uses LSTM technology to train the historical Q(p,t) function of the gas storage facility to obtain model O, which is used to predict the future Q(p,t+Δt).

[0077] 2.2 Data Preprocessing

[0078] This embodiment uses an LSTM model and performs systematic modeling and prediction. The following key data is required to train the model:

[0079] Three input feature dimensions:

[0080] ① Wellhead pressure p(t1:t2) from date t1 to t2

[0081] ② The gas volume difference q(t1:t2) from date t1 to t2

[0082] ③ The pressure p(t2:t2+Δt) from date t2 to the predicted end point t2+Δt

[0083] The output is the gas volume q(t2:t2+Δt) from date t2 to the prediction end point t2+Δt.

[0084] Existing data: daily pressure p and gas volume q from April 2, 2019 to April 18, 2023. Where q = dQ / dt.

[0085] 2.3 Structural Design of Hidden Layers, etc.

[0086] In this embodiment, the existing dataset is divided into segments with a step size of N days and a rolling distance of M days. That is, the first group is from 1 to N days, the second group is from M to N+M days, and so on. For each group of data, x and dY of the first NM days and x of the last M days are used as input data, and the last M is used as the prediction object for machine learning training.

[0087] The input data is modified into a two-dimensional matrix of length N, consisting of three columns. The first column represents the air pressure *p* for the first *NM* days, the second column represents the air volume *dY* converted from the first *NM* days, and the third column represents the air pressure *P* for the next *M* days. Since the third column is shorter than the first two, missing data is padded with 0s. The output is a single sequence of length M, representing the *dY* for the next *M* days. *dY* can be converted to air volume *q* using the elliptic equation in the data preprocessing section. In the specific computer code, the output is a sequence of length *NM* numbers, padded with 0s for the remaining numbers. For ease of representation, the input matrix is ​​denoted as *X*, and the output sequence as *Y*. The specific operation is as follows... Figure 2 As shown.

[0088] Based on the set model parameters, the structure of the LSMT prediction model for future gas injection and extraction volumes of the gas storage facility established in this embodiment is as follows: Figure 3 As shown. Then, based on the output column dY and the set future air pressure, the required predicted air volume q can be obtained by combining coordinate transformation and elliptic curves.

[0089] 2.4 Attention Mechanism

[0090] Attention mechanisms play a crucial role in LSTM (Long Short-Term Memory) networks, providing greater flexibility and adaptability for information processing. By focusing on different parts of the input sequence when processing sequential data, LSTMs can better capture contextual information.

[0091] Introducing an attention mechanism into LSTM typically involves embedding attention weights into the model's computation. When LSTM processes sequential data, it calculates attention weights based on the input at the current time step and the hidden states from previous time steps. These weights represent the importance of each input time step at the current time step. By weighted summing of the input time steps, LSTM can more effectively focus its attention on information that contributes more to the current task.

[0092] 2.5 Machine Learning Parameter Optimization

[0093] The training process of the prediction model O developed in this embodiment involves numerous key parameters, which play a crucial role in the model's performance and generalization ability. At this stage, model O has been successfully established and preliminarily trained; however, to further improve its prediction accuracy, it is necessary to conduct in-depth research and optimization of these key parameters.

[0094] Preferably, systematic parameter tuning can be performed on the key parameters of model O. By systematically adjusting the value of each parameter and combining methods such as cross-validation, the aim is to find the optimal parameter combination so that the model can achieve better performance on different datasets. This stage will involve a large number of experiments and analyses, and it is also necessary to fully consider the interaction between parameters and their impact on the convergence and stability of the model during training.

[0095] 2.6 Model Training

[0096] The entire historical data collection data of Xiangguo Temple was used to train the EPOCH dataset, employing the MSE loss function. More than 1000 EPOCH datasets were trained until the loss function no longer decreased. Figure 4 This is the loss function for training.

[0097] pass Figure 4 It can be observed that the loss function tends to stabilize after 200 EPOCH cycles, which means that the training of the model has tended to converge or is close to convergence. This indicates that the model has learned a suitable pattern from the training data and has tended to converge. The model can fit the training data well and finally obtain the trained model O.

[0098] III. Reservoir Capacity Change Forecasting and Early Warning

[0099] 3.1 Prediction of Reservoir Capacity Changes

[0100] This embodiment uses the trained model O to predict reservoir capacity changes. Inputting p and q from the past M days transforms them into x and y; inputting the pressure p' for the next N days into model O; O can then calculate the flow rate q' for the next N days.

[0101] Therefore, based on the planned future value p, the corresponding value q can be calculated. If it is assumed that the gas pressure p will return to the initial p at the beginning of the gas storage phase within the next N days, the predicted value q can be used to calculate the complete value q(t) of the gas storage facility for this period. Integrating this value yields the gas intake and extraction volumes of the gas storage facility. Subtracting these two values ​​gives the storage capacity of the gas storage facility under the condition of gas extraction at gas pressure p over the next N days. Model O can predict the flow rate after N days, and then, using the predicted data from those N days, combined with the data from the previous MN days, predict the flow rate after 2N days.

[0102] Theoretically, it's possible to predict flow rates in the infinite future. However, this approach has two drawbacks: 1. The input gas pressure may not match the actual gas pressure. Model O requires manual input of the gas pressure for the next N days. In practice, gas pressure is not entirely controlled by the operator and may vary depending on the gas storage reservoir and injection well conditions. Therefore, a discrepancy between the input and actual gas pressure will lead to different predicted flow rates. 2. Even if the input and actual gas pressures match, each flow rate prediction will introduce an error. This error will gradually accumulate, eventually rendering the predicted data meaningless.

[0103] 3.2 Early warning of reservoir capacity changes

[0104] Model O can also be used for early warning of storage capacity changes. By extracting the gas pressure and volume of the past M days and the gas pressure of the next N days, these are used as inputs to Model O to calculate the gas volume of the next N days. By comparing the calculated gas volume of N days with the actual recorded gas volume, signs of storage capacity leakage can be detected. If the actual gas volume is smaller than the calculated gas volume, it indicates that the storage capacity is decreasing. Given that Model O has fully considered the normal shrinkage of storage capacity, an actual gas volume lower than the calculated gas volume means that the storage reservoir is experiencing a capacity change that does not conform to historical trends, indicating a higher probability of storage capacity leakage.

[0105] IV. Model Implementation and Procedure Description

[0106] This predictive model framework aims to provide an intuitive, efficient, and accurate data analysis and forecasting tool. The following is a detailed introduction to the model architecture; please refer to [link / reference]. Figure 5 The program architecture shown.

[0107] 4.1 Data Input and Preliminary Processing

[0108] The raw data was collected from various oil well monitoring systems. This data underwent preliminary processing to filter out interfering information and transform it into a format that the model could process. The preliminary processing included noise removal, data standardization, and converting time data into timestamps that the model could recognize.

[0109] 4.2 Data Flow and Branching

[0110] Preprocessing: Further data preprocessing aims to provide accurate input to the model. This step involves deeper data cleaning, such as filling in missing values ​​and data encoding transformation.

[0111] Model Training: The processed data was used to train two prediction models. The training process includes parameter initialization, model structure definition, and iterative optimization.

[0112] 4.3 Horizontal and Vertical Prediction Models

[0113] Lateral prediction: Lateral prediction models focus on the interrelationships between well groups, using historical data from other wells to predict the performance of the target well.

[0114] Longitudinal prediction: The longitudinal prediction model focuses on the performance of an individual oil well over time, predicting the future trend of the well by analyzing long-term data.

[0115] 4.4 Model Output

[0116] Prediction Results: The prediction results from the two models will be generated separately and presented to the user in the form of visual charts.

[0117] Performance evaluation: The accuracy of the model's predictions will be evaluated by comparing them with actual data so that users can verify the model's effectiveness.

[0118] User interaction and feedback: Users can input data, select models, start predictions, view results, and fine-tune parameters through a specially designed interactive interface, ensuring that users can adjust the model based on the prediction results to achieve optimal operation.

[0119] 4.5 Model Usage Process

[0120] Model usage process as follows Figure 6 As shown, it mainly includes the following steps:

[0121] 1) Data input: Users first need to input the collected oil well data into the system, which can be done by directly importing an Excel file.

[0122] 2) Model initialization and selection: Users select to use a horizontal or vertical prediction model according to their prediction needs and perform initialization settings for the model.

[0123] 3) Model training and validation: The system will automatically train the corresponding model based on the user's selection and data, and validate it to ensure the accuracy of the model.

[0124] 4) Prediction Execution and Result Analysis: After the model is trained, users can perform prediction tasks, and the system will display the prediction results and allow users to perform result analysis.

[0125] 5) Model optimization and parameter tuning: Users can further optimize and tune the model based on the prediction results and actual needs.

[0126] 6) Results Export: Once the user is satisfied, the prediction results can be exported to an Excel file for further analysis or reporting.

[0127] By following the steps above, users can easily use the model to predict oil well gas volume and oil pressure. The model is designed with user-friendliness and ease of operation in mind, adapting to the technical backgrounds and needs of different users.

[0128] V. Research Results

[0129] This embodiment aims to develop reliable predictive models to accurately predict gas volume and oil pressure data from oil wells. Two types of predictive models are constructed: a horizontal predictive model and a vertical predictive model. The horizontal predictive model focuses on using data from other wells in the well group to predict the performance of the target well, while the vertical predictive model focuses on analyzing the well's data over time to predict its future performance. The following sections will detail the implementation process and prediction results of these two predictive models.

[0130] 5.1 Horizontal Prediction Model

[0131] This embodiment utilizes deep learning technology to construct a lateral prediction model, aiming to predict gas volume and oil pressure data from multiple wells (N wells) simultaneously. The model is based on a Long Short-Term Memory (LSTM) network, designed to learn the complex dependencies of time series data from historical data to achieve accurate prediction of future values.

[0132] Data preprocessing and feature extraction: The initial dataset was extracted from an Excel file and preprocessed, including removing non-feature columns, standardization, and time-stamp conversion. Non-input columns were excluded from the data, and date columns were converted to timestamp format to quantify time information. The feature set included all columns except for the date and target columns to retain the most relevant predictive information.

[0133] Model Structure and Training: The input dimension of the model corresponds to the number of selected features, while the output dimension is set to 5, corresponding to the target variable of the five predicted wells. This embodiment uses a network structure containing 64 hidden units and two LSTM layers, with a fully connected layer added at the last layer to output the prediction results. Through iterative training, using mean squared error (MSE) as the loss function, the model learns and optimizes on the training set.

[0134] Prediction Results and Evaluation: The model's predictive ability was validated through its performance on the test set. According to the test results, the model captures the gas and oil pressure variation trends of most wells quite accurately, especially within intervals where data changes are relatively continuous. However, some prediction biases exist for peaks and troughs, which may stem from the nonlinear characteristics of the data and the model's generalization ability.

[0135] 5.2 Vertical Prediction Model

[0136] In this embodiment, a time-window-based longitudinal prediction model was employed to predict the future values ​​of 22 wells using deep learning. Utilizing a Long Short-Term Memory (LSTM) network, this model is able to capture the time-series characteristics of oil well data and predict its future trends and patterns.

[0137] The model's predictive ability was evaluated based on its performance on the test set. According to the test results, the model successfully captured the periodic changes in the data in most cases, and in many wells, the predicted curve closely matched the actual curve, especially in the middle region representing the time series data. This indicates that the model can learn the inherent patterns in the data and make relatively accurate predictions about future changes.

[0138] like Figure 7 As shown, loss curves were plotted for each feature column, illustrating the decrease in model loss during each training epoch. It can be observed that the loss curves for most feature columns decrease with increasing training epochs, indicating that the model's prediction error gradually decreases and the learning effect continuously improves. Although some feature columns have higher losses in the early stages of training, these losses significantly decrease as the model parameters are optimized, further demonstrating the model's ability to learn from the data.

[0139] In summary, by combining the windowing strategy with the powerful time-series data modeling capabilities of LSTM, the longitudinal prediction model achieved satisfactory results in predicting future gas and oil pressure data from oil wells. The model demonstrated good performance when handling complex oil well data, providing a scientific basis for subsequent optimization operations and decision-making. Future work will focus on further optimizing the model structure, reducing prediction errors, and exploring the model's applicability on different oilfield datasets.

[0140] 5.3 Model Comparison and Analysis

[0141] This embodiment compares and analyzes the performance of horizontal and vertical prediction models. Each model is designed and optimized for a specific prediction task and demonstrates its predictive capabilities on the corresponding task.

[0142] The lateral prediction model utilizes data from multiple wells, focusing on identifying correlations between wells to predict parameters for unknown wells. A significant feature of this model is its ability to effectively handle multivariate inputs and capture potential connections between different wells. Analysis of the comparison between actual and predicted data reveals that the model closely follows the true trends of most wells, especially in stable data segments. However, the model exhibits some lag in predicting abrupt changes, possibly due to insufficient sensitivity to outliers.

[0143] Compared to lateral models, longitudinal prediction models focus on historical data from individual wells to predict their future dynamic changes. Utilizing time window techniques and LSTM networks, these models excel at capturing time dependencies. While the prediction curves of longitudinal models typically accurately reflect periodic changes and trends, their accuracy decreases when faced with abrupt changes and extreme values.

[0144] Comparing the two models revealed that the horizontal model is more efficient at handling cross-well information and is suitable for scenarios with large amounts of well cluster data. The vertical model, on the other hand, performs better at handling long-term series data from a single well, particularly well-suited for in-depth analysis of single-well production performance. While both models can provide useful predictions, they exhibit different strengths and limitations when modeling future data.

[0145] In practical applications, the choice of model should be based on the characteristics of the data and the specific needs of the prediction task. For scenarios requiring the capture of interactions between multiple wells, a horizontal model may be more suitable. However, when the focus of prediction is the long-term performance of a single well, a vertical model is the better choice. Furthermore, considering the advantages of each model in different aspects, future research could explore ensemble methods combining horizontal and vertical models to achieve more accurate predictions.

[0146] Example 2

[0147] This embodiment provides an automatic early warning system for changes in gas storage capacity, including:

[0148] The preprocessing module is configured to collect raw data from each oil well monitoring system, filter out interference information through preliminary processing and convert it into a preset format; and perform further data cleaning on the preprocessed data.

[0149] The model training module is configured to use the cleaned data to train the horizontal prediction model and the vertical prediction model. The horizontal prediction model focuses on the interrelationship between well groups and uses historical data of other wells in the well group to predict the performance of the target well. The vertical prediction model focuses on the performance of an individual well over time and predicts the future trend of the target well by analyzing long-term data.

[0150] The model output module is configured to take in relevant data of the target well, select a prediction model or a longitudinal prediction model to predict the reservoir capacity change of the target well, and present the results in the form of visual charts to determine whether there is a reservoir capacity leak.

[0151] Preferably, the preliminary processing includes: noise removal, data standardization, and converting time data into a timestamp format recognizable by the training of the lateral and longitudinal prediction models; data cleaning includes: filling in missing values ​​and data encoding conversion.

[0152] Preferably, the lateral prediction model is built on LSTM (Long Short-Term Memory) network, which learns the complex dependencies of time series from historical data to achieve one-time prediction of gas volume and oil pressure data of multiple wells.

[0153] Preferably, the longitudinal prediction model is constructed based on time windows and LSTM (Long Short-Term Memory) networks to capture the time-series characteristics of oil well data and predict future trends and patterns of oil wells.

[0154] Preferably, the training process of the lateral prediction model and the longitudinal prediction model includes: parameter initialization, model structure definition, and iterative optimization.

[0155] Example 3

[0156] This embodiment is based on embodiment 1:

[0157] This embodiment provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the automatic prediction method for gas storage capacity changes in Embodiment 1. The computer program can be in the form of source code, object code, executable file, or some intermediate form.

[0158] Example 4

[0159] This embodiment is based on embodiment 1:

[0160] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the automatic prediction method for gas storage capacity changes in Embodiment 1. The computer program can be in the form of source code, object code, executable file, or some intermediate form. The storage medium includes any entity or device capable of carrying computer program code, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content contained in the storage medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the storage medium does not include electrical carrier signals and telecommunication signals.

[0161] It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

Claims

1. A method for automatically predicting changes in the capacity of a gas storage facility, characterized in that, include: Data input and preliminary processing: Raw data is collected from each oil well monitoring system, and the data is filtered to remove interference and converted into a preset format through preliminary processing; Data Flow and Branching: The pre-processed data undergoes further data cleaning. The cleaned data is then used to train horizontal and vertical prediction models. The horizontal prediction model focuses on the interrelationships between well groups, using historical data from other wells in the group to predict the performance of the target well. The vertical prediction model focuses on the performance of an individual well over time, analyzing long-term data to predict the future trend of the target well. Model output: Input relevant data of the target well, select the prediction model or the longitudinal prediction model to predict the reservoir capacity change of the target well, and present it in the form of visualization charts to determine whether there is reservoir capacity leakage.

2. The method for automatically predicting changes in gas storage capacity according to claim 1, characterized in that, The preliminary processing includes: noise removal, data standardization, and converting time data into a timestamp format recognizable by the training of the horizontal and vertical prediction models; the data cleaning includes: filling in missing values ​​and data encoding conversion.

3. The method for automatically predicting changes in gas storage capacity according to claim 1, characterized in that, The lateral prediction model is built on LSTM (Long Short-Term Memory) network, which learns the complex dependencies of time series from historical data to predict the gas volume and oil pressure data of multiple wells at once.

4. The method for automatically predicting changes in gas storage capacity according to claim 1, characterized in that, The longitudinal prediction model is constructed based on time windows and LSTM (Long Short-Term Memory) networks to capture the time-series characteristics of oil well data and predict future trends and patterns of oil wells.

5. The method for automatically predicting changes in gas storage capacity according to claim 1, characterized in that, The training process of the horizontal and vertical prediction models includes: parameter initialization, model structure definition, and iterative optimization.

6. An automatic early warning system for changes in the capacity of a gas storage facility, characterized in that, include: The preprocessing module is configured to collect raw data from each oil well monitoring system, filter out interference information through preliminary processing, and convert it into a preset format; Further data cleaning is performed on the initially processed data. The model training module is configured to use the cleaned data to train a horizontal prediction model and a vertical prediction model. The horizontal prediction model focuses on the interrelationships between well groups and uses historical data from other wells in the well group to predict the performance of the target well. The vertical prediction model focuses on the performance of an individual well over time and uses long-term data to predict the future trend of the target well. The model output module is configured to take in relevant data of the target well, select a prediction model or a longitudinal prediction model to predict the reservoir capacity change of the target well, and present the results in the form of visual charts to determine whether there is a reservoir capacity leak.

7. The automatic early warning system for gas storage capacity changes according to claim 6, characterized in that, The preliminary processing includes: noise removal, data standardization, and converting time data into a timestamp format recognizable by the training of the horizontal and vertical prediction models; the data cleaning includes: filling in missing values ​​and data encoding conversion.

8. The automatic early warning system for changes in gas storage capacity according to claim 6, characterized in that, The lateral prediction model is built on LSTM (Long Short-Term Memory) network, which learns the complex dependencies of time series from historical data to predict the gas volume and oil pressure data of multiple wells at once.

9. The automatic early warning system for gas storage capacity changes according to claim 6, characterized in that, The longitudinal prediction model is constructed based on time windows and LSTM (Long Short-Term Memory) networks to capture the time-series characteristics of oil well data and predict future trends and patterns of oil wells.

10. The automatic early warning system for gas storage capacity changes according to claim 6, characterized in that, The training process of the horizontal and vertical prediction models includes: parameter initialization, model structure definition, and iterative optimization.