Novel intelligent early warning method and system for shale gas low-efficiency well based on LSTM (Long Short Term Memory)

Through an LSTM-based intelligent early warning method, historical data and genetic algorithms are used to optimize feature selection and train models for prediction, which solves the problem of accurate early warning of inefficient shale gas wells and improves the intelligence and stability of gas well production.

CN120807203APending Publication Date: 2025-10-17CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511027071.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing technologies make it difficult to quickly and accurately predict the inefficiency of shale gas wells, resulting in low gas well production efficiency and the inability to take effective control measures in a timely manner, affecting the stable production and economic benefits of the gas field.

Method used

An LSTM-based intelligent early warning method is adopted. By obtaining historical production data from the database, cleaning and standardizing it, using genetic algorithms to optimize feature selection, and training LSTM models for prediction, early warning signals and governance measures are output.

Benefits of technology

It improves the prediction accuracy and intelligence of shale gas well production status, reduces manual intervention, and can provide early warning of inefficient wells to ensure stable production and economic benefits of gas fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807203A_ABST
    Figure CN120807203A_ABST
Patent Text Reader

Abstract

The invention relates to the field of dynamic prediction of oil and gas resources, and discloses a novel intelligent early warning method and system for a shale gas low-efficiency well based on LSTM (Long Short Term Memory). The invention discloses a novel intelligent early warning method for a shale gas low-efficiency well based on LSTM (Long Short Term Memory). The method comprises the following steps: acquiring gas well historical yield data from a database, marking a production state, and performing data cleaning and standardization processing to obtain a feature set; encoding the features into genes, defining a fitness function, and optimizing a feature subset by using a genetic algorithm; training an LSTM (Long Short Term Memory) model by using the optimized feature subset; predicting the production state of the gas well based on the trained model and triggering early warning; and finally, evaluating model prediction accuracy by using the verification set and the test set. According to the method, the complex rule of historical data is mined by using the advantage of LSTM processing time sequence data, accurate early warning of the low-efficiency well is realized, and stable production of a gas field is guaranteed. By means of automatic feature selection and model optimization, manual intervention is reduced, the intelligent degree and prediction accuracy are improved, and the method is suitable for different types of shale gas wells.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of oil and gas resource dynamic prediction, in particular to a new intelligent warning method and system for shale gas inefficient wells based on LSTM. BACKGROUND

[0002] As an important clean energy, shale gas plays a key role in energy structure transformation. With the continuous advancement of shale gas field development process, many problems have gradually emerged, which restrict the efficient and stable production of gas fields. The abnormal decline of wellhead pressure makes the gas well production power insufficient; the sharp decline of gas and water production directly affects the economic benefits of gas fields; gas well water flooding interferes with the normal gas flow channel; and sand plugging problem further aggravates the difficulty of production. These problems are intertwined, which greatly reduces the production efficiency of shale gas wells and makes them into inefficient wells with low pressure and low yield. If effective control measures are not taken in time, it will face the dilemma of shutdown, which will have a huge impact on energy supply and enterprise economic benefits.

[0003] In response to this challenge, traditional prediction methods are not up to the task. In the past, it mainly relied on manual collection and processing of relevant data. However, the number of shale gas wells is large, and the amount of information generated by each well is huge, which makes the labor intensity of manual data processing extremely high, and the work efficiency is low, which is difficult to meet the demand of fast and accurate prediction. More importantly, manual data processing is inevitably influenced by subjective factors, resulting in low accuracy of prediction results and unable to provide reliable basis for production decision-making. In addition, the production state of shale gas wells is influenced by many complex factors, including regional geological condition difference, cumulative effect of production time, etc. These factors make the production process show poor regularity. The existing traditional methods are difficult to capture the complex nonlinear relationship in the production process, especially when facing low pressure and low yield, etc. The prediction accuracy is not satisfactory, and it is difficult to effectively predict the emergence of inefficient wells in advance in order to take targeted control measures.

[0004] Therefore, there is an urgent need for a new and efficient and accurate prediction method to solve the problem of shale gas inefficient well early warning. SUMMARY

[0005] The present application aims to provide a new intelligent warning method and system for shale gas inefficient wells based on LSTM, to fully utilize the strong advantage of LSTM model in processing time series data, effectively mine the complex rules contained in historical production data, accurately predict shale gas inefficient wells, and ensure the stable production and sustainable development of gas fields.

[0006] To achieve the above purpose, the present application adopts the following technical scheme: A new intelligent warning method for shale gas inefficient wells based on LSTM, comprising: S1, intelligently obtaining historical production data of a target natural gas well from a database, the historical production data including oil pressure, casing pressure, production, water production, marking the production state of each time point, the production state including low pressure and low production, low pressure and not low production, not low pressure and low production, and not low pressure and not low production, and performing cleaning and standardization processing on the data to obtain a feature set; S2, representing each feature in the feature set as a gene, performing feature encoding, defining a fitness function, and performing feature selection using a genetic algorithm to obtain an optimized feature subset through selection, crossover and mutation operations; S3, training an LSTM model through the optimized feature subset; S4, predicting the production state of the target shale gas well based on the trained LSTM model, outputting the prediction result, and triggering an early warning based on the prediction result; S5, verifying and testing the model using a verification set and a test set to evaluate the prediction accuracy of the model.

[0007] The principle and advantages of the present scheme are as follows: in actual application, historical production data is obtained from a database to provide a data basis for intelligent early warning; data cleaning and standardization processing are performed to remove noise and improve data quality, making the data more suitable for model training. Feature encoding represents each feature as a gene to form a genotype, thereby facilitating the use of a genetic algorithm. The genetic algorithm gradually optimizes the feature subset through selection, crossover and mutation operations. The genetic algorithm optimizes feature selection to ensure that the features input into the LSTM model are the most relevant, thereby improving the prediction performance of the model. The LSTM model is a special recurrent neural network that can effectively handle long-term dependencies in time series and facilitate the processing of nonlinear complex change relationships in the production process of shale gas wells. Based on the trained LSTM model, the future production state is predicted. The model outputs the prediction result based on the input feature subset. The present application can be applied to different types of shale gas wells, automatically selects features and optimizes the model, reduces manual intervention, and improves the intelligence level and prediction accuracy of the system.

[0008] Preferably, as an improvement, the fitness function is the ratio of the model prediction accuracy to the size of the feature subset.

[0009] Technical effect: both the prediction accuracy of the model and the simplicity of the feature subset are considered.

[0010] Preferably, as an improvement, the feature encoding uses a binary encoding method to represent each feature as a binary string of length N, where N is the total number of features.

[0011] Technical effect: the binary encoding method is simple and intuitive, facilitating the operation of the genetic algorithm.

[0012] Preferably, as an improvement, the selection operation of the genetic algorithm adopts a roulette strategy, the crossover operation adopts a single-point crossover method, the mutation operation adopts a random mutation strategy, and the number of population iterations is set to 50-100 generations.

[0013] Technical effects: Reasonably configure the operation strategy and iteration parameters of the genetic algorithm to ensure the convergence and global optimization ability of the search process, while considering the computational efficiency, suitable for feature optimization tasks in large-scale data scenarios of shale gas wells.

[0014] Preferably, as an improvement, the prediction result further includes the production state change trend of the target gas well in the future several days, and whether to trigger an inefficient well warning signal is judged in combination with a confidence threshold.

[0015] Technical effects: Provide prediction output with a time span, and control the warning trigger mechanism through confidence, to ensure the reliability and practicality of the warning information, which helps to deploy maintenance or production adjustment schemes in advance.

[0016] Preferably, as an improvement, the LSTM model includes a memory unit and a gating mechanism, the memory unit is used to store long-term information, the gating mechanism selectively updates and forgets information through an input gate, a forget gate and an output gate, and the LSTM model adopts a multivariate input mode.

[0017] Technical effects: Through the gating mechanism, the change rule of the production state can be better captured, and through the multivariate input, factors affecting the production state can be fully considered.

[0018] Preferably, as an improvement, an early stopping mechanism is adopted in the training process of the LSTM model, and when the loss function on the validation set does not appear to decrease within a threshold range for consecutive threshold cycles, the training is stopped.

[0019] Technical effects: The early stopping mechanism can effectively prevent overfitting of the model during training.

[0020] Preferably, as an improvement, when the model is verified and tested using the validation set and the test set, a K-fold cross-validation method is adopted.

[0021] Technical effects: Facilitate the full use of the data set and reduce the evaluation bias caused by data division.

[0022] Preferably, as an improvement, it further includes S6, when the prediction result triggers an inefficient well warning signal, an early warning report containing treatment measure suggestions is automatically generated.

[0023] Technical effects: When the prediction result triggers an inefficient well warning signal, an early warning report containing specific treatment measure suggestions is automatically generated, providing clear response schemes for gas field production management personnel.

[0024] Also included is a new LSTM-based shale gas inefficient well intelligent warning system, which uses the new LSTM-based shale gas inefficient well intelligent warning method. BRIEF DESCRIPTION OF DRAWINGS Figure 1 A flowchart of a new LSTM-based shale gas inefficient well intelligent warning method. DETAILED DESCRIPTION

[0025] The following will be further described in detail through specific embodiments: The embodiments are basically as shown in the accompanying Figure 1 drawings: A new LSTM-based shale gas inefficient well intelligent warning method, comprising: S1, intelligently obtaining historical production data of the target natural gas well from the database, the historical production data including oil pressure, casing pressure, production, water production, labeling the production state at each time point, the production state including low pressure and low production, low pressure and not low production, not low pressure and low production, and not low pressure and not low production, and cleaning and standardizing the data to obtain a feature set.

[0026] Oil pressure refers to the pressure in the tubing, reflecting the pressure state inside the gas well. The level of oil pressure directly affects the efficiency and yield of the gas well. When the oil pressure is too low, it may mean that the gas well is not producing enough, and the yield of the gas well will decrease, causing the gas well to enter a state of low pressure and low yield. For example, if the oil pressure continues to be lower than a certain critical value required for normal production, the model predicts that the probability of the gas well being an inefficient well will significantly increase. The downward trend of oil pressure is also an important early warning signal. If the oil pressure is gradually decreasing, even if the current oil pressure has not reached a very low level, it may indicate that the gas well will face problems such as yield reduction in the future. Casing pressure refers to the pressure in the casing, reflecting the pressure situation of the formation around the gas well. Higher casing pressure usually means that the formation has sufficient energy, which is conducive to the stable production of the gas well. A reasonable pressure difference between casing pressure and oil pressure can ensure the smooth flow of gas from the formation into the wellbore, thereby affecting the yield. If the pressure difference between casing pressure and oil pressure is abnormal, such as casing pressure being too low resulting in insufficient pressure difference, or casing pressure being too high resulting in excessive pressure difference, it may have a negative impact on the production of the gas well. A sudden large drop or rise in casing pressure may be caused by the opening or closing of formation fractures, the invasion of formation water, etc. These changes will have a significant impact on the production state of the gas well. Yield refers to the amount of shale gas produced by the gas well in a certain period of time, and is a direct indicator of the production efficiency of the gas well. The level of yield is the most intuitive standard for determining whether a gas well is inefficient. If the yield is lower than a certain threshold, the gas well is considered to be an inefficient well. Water production refers to the amount of water produced during the production process of the gas well. Water production affects the production efficiency and recovery effect of the gas well, for example, excessive water production can lead to inefficient gas wells. Oil pressure, casing pressure, yield, and water production are interrelated and influence each other, and together determine the production state of the gas well. The relationship between them and the prediction result is not a simple linear relationship. For example, the reasonable combination of oil pressure and casing pressure is an important condition for ensuring the stable production of the gas well, while the yield is affected by a combination of factors such as oil pressure, casing pressure, and water production. The increase in water production may lead to a decrease in oil pressure and yield, and thus the gas well enters an inefficient state. Only by comprehensively analyzing the changes in these data and capturing the complex rules can the production state of the gas well be accurately predicted, and the emergence of inefficient wells can be warned in advance, providing a strong guarantee for the stable production and sustainable development of gas fields.

[0027] Data cleaning includes removing missing values and outliers to effectively reduce the interference of data noise on model training and improve the robustness of the model. Specifically, in this embodiment, the box plot is used to identify and remove outliers in historical yield data, and the linear interpolation method is used to fill in missing data. The box plot can intuitively identify outliers in the data, effectively eliminate unreasonable data, and avoid interference of abnormal data on model training. The linear interpolation method fills in missing data, ensures data integrity, improves data quality, makes model training data more reliable, and thus improves the accuracy of prediction.

[0028] In this embodiment, the Z-score standardization method is used to standardize the cleaned data, so as to eliminate the dimensional influence of the data and make different characteristic data in the same scale.

[0029] S2, each feature in the feature set is represented as a gene, and feature encoding is performed. The feature encoding adopts a binary encoding mode, and each feature is represented as a binary string with a length of N. N is the total number of features. By representing each feature as a binary string, the selection state of the feature (1 represents selection, and 0 represents non-selection) is clearly represented, so that the selection, crossover and mutation operations in the genetic algorithm can be more efficiently performed, thereby speeding up the optimization process of feature selection, improving the efficiency and quality of feature selection, and further improving the prediction performance of the model.

[0030] In the feature selection process, not only high prediction accuracy is pursued, but also the number of features is reduced to avoid overfitting. Therefore, in this embodiment, the fitness function is the ratio of the model prediction accuracy to the size of the feature subset, i.e. fitness function value = prediction accuracy / feature subset size. In this way, a feature subset with high prediction accuracy and relatively simple structure can be obtained, so that the LSTM model has better generalization ability and computational efficiency while maintaining good prediction performance.

[0031] Next, genetic algorithm is used for feature selection, and optimized feature subset is obtained through selection, crossover and mutation operations. The selection operation of the genetic algorithm adopts the roulette strategy, the crossover operation adopts the single-point crossover mode, the mutation operation adopts the random mutation strategy, and the population iteration number is set to 50-100 generations. By reasonably configuring the operation strategy and iteration parameters of the genetic algorithm, the convergence and global optimization ability of the search process are guaranteed, and the computational efficiency is also considered, which is suitable for feature optimization tasks in the large-scale data scenario of shale gas wells.

[0032] S3, the LSTM model is trained through the optimized feature subset. The LSTM model includes memory cells and a gating mechanism. The memory cells are used to store long-term information. The gating mechanism selectively updates and forgets information through input gates, forget gates and output gates, so as to better capture the change rule of the production state. The LSTM model adopts a multivariate input mode to simultaneously process multiple input variables (such as oil pressure, casing pressure and production), so as to comprehensively consider the factors affecting the production state.

[0033] The early stopping mechanism is used in the training process of the LSTM model, and the training is stopped when the loss function on the validation set does not decrease within a threshold range for consecutive M training cycles, such as when the loss function on the validation set does not decrease for consecutive M training cycles, where M is a positive integer. The early stopping mechanism can effectively prevent overfitting of the model during training, by monitoring the loss function on the validation set in real time during training, avoiding overfitting of the model on the training set and losing the generalization ability to new data, which helps to improve the prediction accuracy and stability of the model in practical application, and ensures that the model can better adapt to different types of shale gas well production state prediction needs.

[0034] In this embodiment, when training the LSTM model, the Adam optimizer is used to update the model parameters, the learning rate is set to 0.001-0.01, and the dropout technique is used to randomly discard part of the neurons in the training process with a probability of 0.2-0.5 to improve the generalization ability of the model, so that the model can more accurately predict the production state of different shale gas wells in practical application.

[0035] S4, based on the trained LSTM model, the production state of the target shale gas well is predicted, and the prediction result is output, and the prediction result is used to trigger an early warning. The preferred prediction step in this embodiment is 1-7 days, and different prediction steps are set to facilitate flexible acquisition of short-term to medium-term production state prediction results according to actual production needs, to provide decision-making basis for production management at different time scales, to timely deal with possible inefficient well problems, and to ensure stable production of gas fields. The output prediction result includes four dimensions, corresponding to the probability distribution of four production states of low pressure and low yield, low pressure and not low yield, not low pressure and low yield, and not low pressure and not low yield. The prediction result also includes the production state change trend of the target gas well in the future several days (1-7 days), and whether to trigger an inefficient well early warning signal is judged in combination with a confidence threshold.

[0036] S5, the model is verified and tested using the validation set and the test set to evaluate the prediction accuracy of the model. In this example, the K-fold cross-validation method is used, K is 5-10, the data set is divided into K subsets, each time 1 subset is selected as the test set, and the remaining K-1 subsets are used as the training set and the validation set, repeated K times, and the average value of K results is taken as the evaluation index of the model.

[0037] S6, when the prediction result triggers the low-efficiency well early warning signal, automatically generating an early warning report containing governance measure suggestions, including but not limited to adjusting the production parameters, carrying out the drainage gas recovery operation, carrying out the downhole sand cleaning, etc., so as to provide clear response scheme for the production management personnel, reduce the gas well shutdown probability, guarantee the energy supply and the enterprise economic benefit, further improve the intelligent and efficient level of the gas field production management.

[0038] The application also provides a shale gas low-efficiency well intelligent early warning new system based on LSTM. The above-mentioned is only the embodiment of the present application, and the specific technical solutions and / or common knowledge of the scheme are not described in detail. It should be pointed out that for those skilled in the art, without departing from the technical scheme of the present application, a number of modifications and improvements can be made, which should also be regarded as the protection scope of the present application, which will not affect the effect and practicality of the present application. The protection scope of the present application should be subject to the content of its claims, and the specific implementation mode and the like in the specification can be used to explain the content of the claims.

Claims

1. A new LSTM-based intelligent early warning method for shale gas inefficient wells, characterized by: include: S1, intelligently obtain historical production data of the target natural gas well from the database, the historical production data including oil pressure, casing pressure, production, and water production, and mark the production status at each time point, the production status including low pressure and low production, low pressure but not low production, not low pressure and low production, and not low pressure and not low production, and clean and standardize the data to obtain a feature set; S2, each feature in the feature set is represented as a gene, feature encoding is performed, fitness function is defined, and genetic algorithm is used for feature selection. The optimized feature subset is obtained through selection, crossover and mutation operations; S3, train the LSTM model using the optimized feature subset; S4, based on the trained LSTM model, predicts the production status of the target shale gas well, outputs the prediction results, and triggers an early warning based on the prediction results; S5, use the validation set and test set to verify and test the model and evaluate the prediction accuracy of the model.

2. The new LSTM-based intelligent early warning method for shale gas inefficient wells according to claim 1 is characterized by: The fitness function is the ratio of the model prediction accuracy to the size of the feature subset.

3. The new LSTM-based intelligent early warning method for shale gas inefficient wells according to claim 1 is characterized by: The feature coding adopts binary coding, and each feature is represented as a binary string with a length of N, where N is the total number of features.

4. The new LSTM-based intelligent early warning method for shale gas inefficient wells according to claim 1 is characterized by: The selection operation of the genetic algorithm adopts a roulette strategy, the crossover operation adopts a single-point crossover method, the mutation operation adopts a random mutation strategy, and the number of population iterations is set to 50-100 generations.

5. The new LSTM-based intelligent early warning method for shale gas inefficient wells according to claim 1 is characterized by: The prediction result also includes the production status change trend of the target gas well in the next few days, and is combined with the confidence threshold to determine whether an inefficient well warning signal is triggered.

6. The new LSTM-based intelligent early warning method for shale gas inefficient wells according to claim 1 is characterized by: The LSTM model includes a memory unit and a gating mechanism. The memory unit is used to store long-term information. The gating mechanism selectively updates and forgets information through an input gate, a forget gate, and an output gate. The LSTM model adopts a multi-variable input mode.

7. The new LSTM-based intelligent early warning method for shale gas inefficient wells according to claim 1 is characterized by: The early stopping mechanism is adopted in the training process of the LSTM model. When the loss function on the validation set does not decrease within a continuous threshold range within training cycles, the training is stopped.

8. The new LSTM-based intelligent early warning method for shale gas inefficient wells according to claim 1 is characterized by: When the validation set and the test set are used to validate and test the model, a K-fold cross-validation method is adopted.

9. The new LSTM-based intelligent early warning method for shale gas inefficient wells according to claim 1 is characterized by: It also includes S6, which automatically generates an early warning report containing treatment measures recommendations when the prediction results trigger an early warning signal for an inefficient well.

10. A new LSTM-based intelligent early warning system for shale gas inefficient wells, characterized by: A new intelligent early warning method for shale gas inefficient wells based on LSTM as described in any one of claims 1 to 9 is used.