Hydrops detection-recommendation-execution-redisk closed-loop optimization method and system
By employing deep neural networks and closed-loop optimization methods, the problems of high false alarm rate and response lag in shale gas wellbore liquid accumulation detection were solved, achieving efficient and accurate liquid accumulation detection and resumption process recommendation, thereby improving the intelligence level and economic benefits of shale gas production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU XINYAO TIANHE TECHNOLOGY CO LTD
- Filing Date
- 2026-03-02
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for detecting liquid accumulation in shale gas wellbores suffer from problems such as high false alarm rates, slow response times, low production efficiency due to reliance on manual experience and static thresholds, and low data utilization. They also lack self-learning and automatic feature extraction capabilities, making it difficult to achieve highly robust and adaptable detection.
A liquid accumulation anomaly detection system based on deep neural networks is adopted. Combined with multi-dimensional time-series feature input, a closed-loop optimization method of liquid accumulation detection-recommendation-execution-review is constructed. Through real-time data acquisition, feature construction and model output early warning signals, the system automatically executes resumption process measures and iteratively updates model parameters through closed-loop feedback.
It significantly improves the accuracy and response efficiency of abnormal liquid accumulation detection, shortens the production recovery cycle, reduces the false alarm and missed alarm rates, realizes refined management and intelligent operation and maintenance of gas well production, recovers a large amount of production loss, and has high detection accuracy and adaptability.
Smart Images

Figure CN122020203A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to, but is not limited to, the field of energy technology, and particularly relates to a closed-loop optimization method and system for liquid accumulation detection-recommendation-execution-review. Background Technology
[0002] In shale gas extraction, wellbore fluid accumulation is a core cause of production fluctuations and losses. Current technologies primarily rely on SCADA systems to set static thresholds for alarms, which suffers from high false alarm rates, dependence on manual experience analysis, response delays, and a lack of model capabilities. While some existing technologies have achieved anomaly warnings, a complete closed-loop management system—from "anomaly detection" to "intelligent solution recommendation" and then to "execution feedback and model evolution"—has not yet been established, hindering the continuous improvement of the intelligence level of production operation and maintenance.
[0003] Shale gas, as an important unconventional natural gas resource, has been developed and utilized on a large scale in recent years. With increasing production years, shale gas wells in most areas of China are gradually entering the aging stage, resulting in fluctuating and unstable production capacity. According to statistics for the entire year of 2024, the Southwest Oil and Gas Field had an average of 10 wells experiencing liquid accumulation per day, with an average well recovery cycle of 2.5 days and an average daily production of 15,000 cubic meters. This resulted in a daily production loss of up to 150,000 cubic meters, impacting annual production by approximately 55 million cubic meters. Improving the response efficiency to abnormal conditions such as liquid accumulation and enhancing the intelligence level of production operation and maintenance have become urgent problems to be solved in current shale gas production and operation.
[0004] In existing technologies, the identification and handling of anomalies such as wellbore fluid accumulation, compressor shutdown, and pipeline blockage during shale gas production still mainly rely on manual experience and static threshold alarm mechanisms set in SCADA (Supervisory Control and Data Acquisition) or POC (Production Operation Control) systems. This type of method has the following significant drawbacks: 1. Fixed rules and poor generalization ability: The SCADA / POC system alarms based on manually set rules, which cannot adapt to the complex working conditions brought about by the evolution of wellbore status over time and environmental changes, and is prone to missed alarms or false alarms.
[0005] 2. Reliance on manual analysis and delayed response: Current anomaly assessment still relies on the experience and manual analysis of on-site engineers, which is inefficient and makes it difficult to achieve accurate and rapid dynamic management.
[0006] 3. Low data utilization: Although downhole sensors and surface monitoring equipment have achieved the acquisition of a large amount of time-series data, the existing system has failed to fully explore the dynamic evolution patterns hidden within them.
[0007] 4. Lack of model capabilities: There is a lack of intelligent models with self-learning and automatic feature extraction capabilities, making it difficult to establish a detection system with high robustness and adaptability in multi-well and multi-dimensional data environments.
[0008] Driven by digital transformation, shale gas extraction areas have established real-time monitoring systems covering both wellbore and surface processes, enabling standardized collection and centralized management of key parameters such as oil pressure, casing pressure, instantaneous flow rate, and post-valve pressure. This infrastructure provides a favorable data environment for the application of artificial intelligence technology in detecting dynamic anomalies in shale gas well production.
[0009] Against this backdrop, artificial intelligence, especially machine learning technologies represented by deep learning, possesses advantages such as nonlinear modeling, automatic feature extraction, and strong generalization capabilities, enabling it to identify subtle abnormal trends in complex dynamic production environments. By introducing a liquid accumulation anomaly detection system based on deep neural networks, it is possible not only to overcome the limitations of traditional rule-driven mechanisms but also to achieve real-time detection and prediction of various complex anomalies, improving the automation and intelligence of anomaly response, and ultimately realizing refined management and intelligent early warning of the shale gas well production process.
[0010] Therefore, there is an urgent need for an AI-based method and system for detecting shale gas liquid accumulation anomalies, which has high detection accuracy, strong robustness, good real-time performance, and adaptability. This system can replace the existing identification mechanism that relies on manual labor and fixed rules, improve production efficiency and the depth of data application, and reduce production losses caused by anomalies. Summary of the Invention
[0011] To address the problems existing in the prior art, this invention provides a closed-loop optimization method and system for fluid accumulation detection-recommendation-execution-review.
[0012] This invention is implemented as follows: a closed-loop optimization method for fluid accumulation detection-recommendation-execution-review, the method comprising: S1, Abnormal Warning Stage.
[0013] Real-time production time-series data such as oil pressure, casing pressure, flow rate, and valve downstream pressure of gas wells are collected. After feature construction of the time-series data, it is input into the liquid accumulation anomaly detection model, and the output results determine whether the gas well is in a liquid accumulation anomaly state and the corresponding early warning signal are provided.
[0014] S2, Intelligent Recommendation Stage for Resumption of Production Processes.
[0015] Based on the abnormal liquid accumulation state, current wellbore dynamic parameters, and historical data on the effectiveness of process measures, a process matching model is constructed, and a production recovery process plan for the target gas well is output.
[0016] S3, the automated or semi-automated execution phase.
[0017] The execution instructions are generated according to the resumption process plan, and the execution instructions are sent to the production control system or operation and maintenance terminal to implement the corresponding liquid elimination measures.
[0018] S4, Closed-loop evaluation and feedback phase.
[0019] Production recovery data after the implementation of the liquid accumulation elimination measures is collected, the effectiveness of the early warning results and the resumption process plan is evaluated, and the evaluation results are fed back as feedback data to the liquid accumulation anomaly detection model and the process matching model to achieve iterative updates of model parameters.
[0020] Furthermore, the features constructed in the abnormal warning stage include the pressure difference characteristics between oil pressure and casing pressure, statistical characteristics calculated based on the sliding time window, time difference characteristics of production parameters, and abnormal event occurrence interval characteristics.
[0021] Furthermore, the fluid accumulation anomaly detection model is a deep neural network model based on multi-dimensional temporal feature input. Its output is the probability value corresponding to the normal state and the abnormal state, and a warning signal is triggered according to whether the probability value of the abnormal state exceeds a preset threshold.
[0022] Another objective of this invention is to provide an intelligent recommendation method for gas well resumption processes based on historical execution feedback, characterized in that the method includes the following steps: A1. Construct a candidate process space, which includes foam drainage, plunger regeneration, gas lift regeneration, and compressor boosting processes.
[0023] A2. Based on the wellbore structure parameters, pressure distribution characteristics, and liquid accumulation degree of the target gas well, calculate the similarity between the target gas well and historical gas wells, and select an initial set of candidate processes.
[0024] A3. The current production status of the target gas well is used as the status information, the initial candidate process is used as the optional action, and the production change and implementation cost after resumption of production are used as feedback information to establish a process selection strategy model.
[0025] A4. Based on the process selection strategy model, output the recommended recovery process for the target gas well.
[0026] Furthermore, the similarity calculation is based on multidimensional vector similarity of well depth, pipe diameter, pressure distribution characteristics, and historical fluid accumulation degree.
[0027] Furthermore, the process selection strategy model uses the comprehensive evaluation result of the output recovery rate per unit time after resumption of production and the process implementation cost as feedback information to adjust the selection weight of each candidate process.
[0028] Another object of the present invention is to provide a model feedback enhancement method for treating liquid accumulation in gas wells. The method includes: B1: Collect production recovery data of gas wells within a preset time window after the resumption process is completed.
[0029] B2, based on the production recovery data, calculate the output recovery rate, pressure change trend and production recovery duration indicators.
[0030] B3. Generate the evaluation results of the process execution effect based on the aforementioned indicators.
[0031] B4. The evaluation results of the process execution effect are used as supervision or reinforcement signals to correct the alarm threshold parameters of the liquid accumulation anomaly detection model and the strategy parameters of the resumption process recommendation model, respectively.
[0032] Furthermore, the production recovery rate is calculated by comparing the average production change within a preset time period before and after the implementation of the production recovery measures.
[0033] Furthermore, the pressure change trend is characterized by calculating the oil pressure recovery rate and the casing pressure change amplitude.
[0034] Furthermore, the model feedback enhancement method retains the manual correction results when correcting model parameters, and uses the manual correction results and automatically generated evaluation results together as the basis for model updates.
[0035] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows: 1. Improve the accuracy of anomaly detection and reduce false alarm and missed alarm rates.
[0036] It employs a deep neural network (DNN) architecture with two hidden layers, models the data by inputting a 798-dimensional feature vector, and automatically extracts nonlinear feature relationships, replacing manual threshold rules.
[0037] Beneficial effects: The model can dynamically adapt to the production characteristics and changing trends of different wells, significantly improving the accuracy of identifying abnormal states such as fluid accumulation, and reducing false alarms and missed alarms.
[0038] 2. Achieve precise matching and intelligent decision-making for resumption of production processes.
[0039] A process matching engine based on collaborative filtering and reinforcement learning was constructed. It searches for the optimal process under the current conditions by retrieving the similarity of the operating conditions between the target well and historical successful case wells, and uses reinforcement learning algorithms to search for the optimal process under the current operating conditions among candidate schemes (such as bubble drainage, gas lift, etc.).
[0040] Beneficial effects: It changed the past "trial and error" process selection mode, realized the automatic optimization of the resumption plan, significantly improved the success rate of the first resumption, and ensured the pertinence of liquid accumulation elimination measures.
[0041] 3. Significantly shorten the response cycle and handling time for abnormal operating conditions.
[0042] By connecting the entire digital chain of S1-S3 stages, a seamless connection is achieved from automatic anomaly detection and intelligent solution recommendation to one-click issuance of instructions / work orders, and the latency of a single inference is reduced by about 85% compared with the original method.
[0043] Beneficial effects: The process, which originally relied on manual analysis, approval and instruction, has been transformed into a minute-level response, which has greatly shortened the average production recovery cycle of a single well and significantly reduced the production loss caused by unplanned downtime.
[0044] 4. A closed-loop learning mechanism with "self-evolution" capability has been constructed.
[0045] The system uses refined indicators such as "production increase 24 hours after measures" and "oil pressure recovery slope" to automatically review the early warning and process effects, and feeds the results back to the S1 detection model and S2 recommendation model as enhanced labels.
[0046] Beneficial effects: It forms a closed loop of "data → model → execution → feedback → optimization", which effectively solves the problem of accuracy drift caused by the increase of production years in industrial models, and enables the system to have the ability to continuously learn and iterate performance.
[0047] 5. Achieve refined management of production operations and maximize economic benefits.
[0048] This invention elevates "post-event processing" to "pre-event warning + proactive intervention". The system no longer relies solely on post-event detection, but issues warnings hours before an anomaly occurs, guiding maintenance responses to be more proactive.
[0049] Beneficial effects: Pilot tests have shown that this closed-loop system can effectively recover production losses caused by liquid accumulation. Taking a shale gas producing area in Southwest China as an example, it can reduce production losses by tens of millions of cubic meters per year, which translates to economic benefits of hundreds of millions of yuan, and has extremely high industrialization value.
[0050] 6. Enhanced the system's engineering versatility and portability.
[0051] The system architecture supports the decoupling of model and feature calculations and has the unified identification capability for multiple abnormal states (such as liquid accumulation, compressor shutdown, etc.).
[0052] Beneficial effects: It reduces the reliance on the experience of professional engineers in parameter tuning, can maintain stable operation in large-scale production scenarios with more than a thousand wells, and meets the real-time requirements of high-frequency data acquisition and multi-dimensional working condition analysis.
[0053] In summary, this invention integrates artificial intelligence deep learning methods with an industrial data platform to construct a closed-loop optimization system of "detection-recommendation-execution-review," breaking through the limitations of traditional rule logic and realizing the intelligent and precise operation and maintenance of shale gas production.
[0054] The following is a summary of the core transformation value and technological advancement of this technical solution: (1) Expected returns and business value After deployment, this invention can significantly improve the production efficiency of shale gas wells, and its economic and industrial value is mainly reflected in: Significant reduction in production losses: Unplanned downtime caused by abnormal fluid accumulation can be reduced by more than 60%, and the average well recovery cycle can be shortened by 1.5 days.
[0055] Direct economic benefits: Based on an average of 10 liquid accumulation wells per day in the Southwest Oil and Gas Field, the annual production loss can be recovered by approximately 40 million cubic meters, which translates to a production value of hundreds of millions of RMB.
[0056] Scalability: The system supports concurrent deployment at the scale of thousands of wells and can be easily embedded into existing SCADA / POC systems through a decoupled architecture, possessing extremely high potential for industrialization and promotion.
[0057] (2) Filling the technological gap in the industry at home and abroad Existing technologies are mostly limited to single early warning or static threshold monitoring. This invention fills a gap in the industry through the following full-chain innovations: The entire chain of intelligent systems: For the first time, it fully integrates "798-dimensional high-dimensional feature engineering, dual-hidden-layer DNN inference, collaborative filtering and reinforcement learning recommendation, and closed-loop review of production indicators".
[0058] Multi-model co-evolution: In the field of shale gas liquid accumulation management, the detection model and process recommendation model have been continuously iterated online under the drive of multi-dimensional production feedback (such as 24-hour production increment and oil pressure recovery slope).
[0059] (3) Solve long-standing technical problems To address the long-standing industry pain points of shale gas, such as delayed response to liquid accumulation, high false alarm and false negative rates, and outdated models upon deployment, this invention provides a systematic solution: Eliminate response lag: By decoupling the inference architecture, the latency of a single inference is reduced by 85%, enabling real-time and precise control of large-scale gas wells.
[0060] Overcoming model drift: By utilizing automated evaluation metrics in the S4 stage (such as oil pressure recovery slope and production increment), the execution results are converted into model optimization labels in real time, solving the problem that the model is difficult to continuously update as well conditions evolve.
[0061] Improving decision-making accuracy: By constructing multi-scale features and using deep reinforcement learning, the technical bottleneck of establishing a highly robust detection and decision-making system in a multi-well, multi-dimensional data environment has been solved.
[0062] (4) Overcoming technological bias This invention, through empirical application, has successfully challenged and overcome traditional prejudices within the industry: Breaking through the "threshold dependence" bias: It is proved that the DNN model can achieve a detection accuracy of over 95% with the support of 798-dimensional features, far exceeding the traditional fixed threshold rule.
[0063] Breaking the "real-time limitation" bias: Through feature calculation and model decoupling strategies, it is demonstrated that deep and complex models are fully capable of meeting the real-time processing requirements of high-frequency industrial data.
[0064] Breaking through the "sole reliance on human experience": It proves that by utilizing the closed-loop feedback formed by collaborative filtering and human annotation, expert experience can be effectively solidified and empowered into online algorithms, achieving more efficient process solution matching than purely manual decision-making. Attached Figure Description
[0065] Figure 1 This is a flowchart of a closed-loop optimization method for fluid accumulation detection, recommendation, execution, and review provided in an embodiment of the present invention.
[0066] Figure 2 This is a block diagram of a closed-loop optimization system structure of fluid accumulation detection-recommendation-execution-review provided by an embodiment of the present invention.
[0067] Figure 3 This is a detailed workflow and algorithm logic diagram of the closed-loop optimization method for fluid accumulation detection-recommendation-execution-review provided in this embodiment of the invention.
[0068] Figure 4 This is a structural diagram of the closed-loop optimization system for fluid accumulation detection-recommendation-execution-review provided in an embodiment of the present invention.
[0069] Figure 5 This is a comparison chart of the S2 recommendation accuracy and the actual resumption success rate provided in the embodiments of the present invention.
[0070] Figure 6 This is a trend diagram of the autonomous evolution of the S2 model achieved through S4 closed-loop feedback, provided in an embodiment of the present invention.
[0071] Figure 7 This is a comparison diagram of the end-to-end response efficiency improvement (S1-S3 links) provided in the embodiments of the present invention.
[0072] Figure 8 This is a multi-dimensional intelligent scoring and production speed diagram of the S2 process based on reinforcement learning provided in this embodiment of the invention.
[0073] Figure 9 This is the evolution diagram of S1 monitoring accuracy under S4 review feedback drive provided in the embodiments of the present invention.
[0074] Figure 10 This is a chart showing the recovery of production losses and the 24-hour incremental trend under the S4 review indicator provided in this embodiment of the invention.
[0075] Figure 11 This is a heatmap showing the consistency between the S2 recommendation and the S4 actual review optimal solution provided in the embodiments of the present invention. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0077] like Figure 1 As shown in the embodiment of the present invention, the closed-loop optimization method for fluid accumulation detection-recommendation-execution-review includes: S1, Abnormal Warning Stage.
[0078] Real-time production time-series data such as oil pressure, casing pressure, flow rate, and valve downstream pressure of gas wells are collected. After feature construction of the time-series data, it is input into the liquid accumulation anomaly detection model, and the output results determine whether the gas well is in a liquid accumulation anomaly state and the corresponding early warning signal are provided.
[0079] S2, Intelligent Recommendation Stage for Resumption of Production Processes.
[0080] Based on the abnormal liquid accumulation state, current wellbore dynamic parameters, and historical data on the effectiveness of process measures, a process matching model is constructed, and a production recovery process plan for the target gas well is output.
[0081] S3, the automated or semi-automated execution phase.
[0082] The execution instructions are generated according to the resumption process plan, and the execution instructions are sent to the production control system or operation and maintenance terminal to implement the corresponding liquid elimination measures.
[0083] S4, Closed-loop evaluation and feedback phase.
[0084] Production recovery data after the implementation of the liquid accumulation elimination measures is collected, the effectiveness of the early warning results and the resumption process plan is evaluated, and the evaluation results are fed back as feedback data to the liquid accumulation anomaly detection model and the process matching model to achieve iterative updates of model parameters.
[0085] In this embodiment of the invention, the signal data processing process runs through the entire process of fluid accumulation anomaly early warning, process recommendation, and closed-loop feedback. Its core lies in the unified modeling, feature extraction, and dynamic updating of multi-source production time-series signals. First, during the data acquisition phase, sensors deployed at the gas well site acquire multi-dimensional production parameters in real time, such as oil pressure, casing pressure, gas flow rate, and post-valve pressure. These parameters form a continuous time-series signal according to a preset sampling period and are transmitted to the data processing module through the data acquisition terminal. To ensure data quality, the acquired raw signals undergo integrity verification, outlier removal, and time alignment. For missing or abrupt data caused by communication interruptions or sensor jitter, sliding window interpolation or historical statistical features are used for compensation and correction, thereby forming continuous and usable standardized production time-series data.
[0086] In the feature construction stage, features are extracted from the processed time-series signal at different time scales. These features include, but are not limited to, pressure change rate, flow rate fluctuation amplitude, differential pressure ratio, trend slope, periodic indicators, and short-term statistical features, used to characterize the dynamic behavior of the gas well under different production conditions. After normalization, these features are fed into the liquid accumulation anomaly detection model as input vectors. Through comprehensive analysis of the time-series features, the model outputs a determination of whether the gas well currently has a liquid accumulation anomaly and the corresponding anomaly confidence level or warning level signal.
[0087] When the detection results indicate that the gas well is in an abnormal liquid accumulation state, the signal data processing module further integrates the anomaly identifier, current wellbore dynamic parameters, and production response data from historical process measures to construct a state description vector for process recommendation. The historical data includes information such as pressure recovery characteristics, production trends, and duration of effectiveness for different resumption processes. By comparing and analyzing the matching relationship between the current state and similar historical states, a decision-making basis is provided for the process matching model.
[0088] During the execution phase, the signal data processing module transforms the selected production recovery process into standardized execution instructions and monitors changes in various production signals in real time, recording and marking any abnormal execution behaviors or responses that do not meet expectations. After execution, time-series data of the gas well production recovery phase is continuously collected, and changes in key indicators before and after execution are compared to form a dataset for effect evaluation.
[0089] In the closed-loop feedback phase, the evaluation data is fed back as a feedback signal to the liquid accumulation anomaly detection model and the process matching model. By analyzing the deviation between the model output and the actual production effect, the model parameters are adaptively corrected, thereby continuously improving the accuracy of anomaly identification and the rationality of process recommendation, and realizing continuous optimization and closed-loop iteration of the liquid accumulation treatment process.
[0090] The features constructed in the abnormal early warning stage provided by the embodiments of the present invention include the pressure difference feature between oil pressure and casing pressure, statistical features calculated based on sliding time window, time difference features of production parameters, and abnormal event occurrence interval features.
[0091] The present invention provides a fluid accumulation anomaly detection model as a deep neural network model based on multi-dimensional temporal feature input. Its output is the probability value corresponding to the normal state and the abnormal state, and a warning signal is triggered according to whether the probability value of the abnormal state exceeds a preset threshold.
[0092] This invention provides an intelligent recommendation method for gas well restart processes based on historical execution feedback. The method includes the following steps: A1. Construct a candidate process space, which includes foam drainage, plunger regeneration, gas lift regeneration, and compressor boosting processes.
[0093] A2. Based on the wellbore structure parameters, pressure distribution characteristics, and liquid accumulation degree of the target gas well, calculate the similarity between the target gas well and historical gas wells, and select an initial set of candidate processes.
[0094] A3. The current production status of the target gas well is used as the status information, the initial candidate process is used as the optional action, and the production change and implementation cost after resumption of production are used as feedback information to establish a process selection strategy model.
[0095] A4. Based on the process selection strategy model, output the recommended recovery process for the target gas well.
[0096] The embodiments of the present invention provide a multi-dimensional vector similarity calculation based on well depth, pipe diameter, pressure distribution characteristics, and historical fluid accumulation.
[0097] This invention provides a process selection strategy model that uses the comprehensive evaluation results of the output recovery rate and process implementation cost per unit time after resumption of production as feedback information to adjust the selection weight of each candidate process.
[0098] This invention provides a model feedback enhancement method for treating liquid accumulation in gas wells, the method comprising: B1: Collect production recovery data of gas wells within a preset time window after the resumption process is completed.
[0099] B2, based on the production recovery data, calculate the output recovery rate, pressure change trend and production recovery duration indicators.
[0100] B3. Generate the evaluation results of the process execution effect based on the aforementioned indicators.
[0101] B4. The evaluation results of the process execution effect are used as supervision or reinforcement signals to correct the alarm threshold parameters of the liquid accumulation anomaly detection model and the strategy parameters of the resumption process recommendation model, respectively.
[0102] The model feedback enhancement method described in this embodiment uses the recovery effect as the core closed-loop signal to achieve collaborative adaptive optimization between the detection model and the process recommendation model. First, within a preset time window after the recovery process is completed, the system automatically collects continuous production data such as gas well production, casing pressure, oil pressure, gas-liquid ratio, and operational stability to construct a time-series data sequence for the recovery phase. Then, based on the production recovery data, feature extraction and trend analysis are performed to calculate quantitative indicators such as the recovery rate of production per unit time, the slope of pressure rise or fall, the duration of stable production, and the degree of recovery fluctuation. These are then normalized to form a comparable evaluation vector. Based on this, the system comprehensively considers process implementation costs, operation cycle, and risk factors to generate an evaluation result of the process execution effect. This evaluation result reflects both the level of economic benefits and the degree of technological adaptability.
[0103] Furthermore, the evaluation results are constructed as a supervisory signal or reinforcement learning reward signal: on the one hand, they are used to correct the alarm threshold and risk judgment boundary in the liquid accumulation anomaly detection model, making the detection model more reasonably sensitive to different well types and operating conditions; on the other hand, they serve as policy optimization feedback input to the production resumption process recommendation model, increasing the probability of selecting high-yield processes and reducing the recommendation weight of inefficient processes by updating the policy network weights or value function parameters. Through continuous iteration, the system achieves dynamic correction based on real production results, enabling the detection decision and process recommendation to gradually converge to the optimal strategy, thereby improving the economy and stability of gas well liquid accumulation management.
[0104] The embodiments of the present invention provide a method for calculating the production recovery rate by comparing the average production change within a preset time period before and after the implementation of production recovery measures.
[0105] The present invention provides a method to characterize the pressure change trend by calculating the oil pressure recovery rate and the casing pressure change amplitude.
[0106] The present invention provides a model feedback enhancement method that retains the manual correction results when correcting model parameters, and uses the manual correction results and the automatically generated evaluation results together as the basis for model updates.
[0107] The closed-loop optimization system is composed of, for example: Figure 2 As shown, this embodiment provides a closed-loop optimization system based on the above method, whose core functional modules are defined as follows: Liquid accumulation detection and early warning module: responsible for multi-source data access, standardized storage and 798-dimensional feature calculation, running DNN model to output real-time detection results and early warning signals.
[0108] Intelligent process recommendation module: It has a built-in process matching engine based on collaborative filtering and reinforcement learning, which automatically outputs targeted production recovery plan suggestions based on the current well conditions and historical review data.
[0109] Collaborative Execution and Monitoring Module: Responsible for task assignment and execution process recording, supporting remote control interfaces and mobile work order collaboration to ensure that resumption of production measures can be implemented quickly.
[0110] Evaluation and Feedback Optimization Module: This module provides a visual interface to display data trends, production recovery effects, and a manual correction entry point. It automatically calculates key performance indicators such as production increment and recovery slope, and drives the underlying model for asynchronous training and online optimization.
[0111] The closed-loop optimization system described in this embodiment takes shale gas well production sites as its target and constructs a dynamic adaptive operation mechanism around the logical chain of "detection-recommendation-execution-review". The system first uses a fluid accumulation detection and early warning module to collect and standardize multi-source data from wellhead sensors, production metering devices, pressure and temperature curves, and historical operation data to form a unified data warehouse. Based on a constructed 798-dimensional feature vector input to a deep neural network model, it performs real-time inference, outputting the current wellbore fluid accumulation risk level and trend prediction results. When the risk exceeds a set threshold, an early warning signal is automatically triggered.
[0112] The intelligent process recommendation module reads the detection results and well condition tag information, calls the built-in collaborative filtering algorithm to match similar historical well cases, and combines a reinforcement learning strategy network to predict the benefits and score strategies for various production recovery processes, generating a set of optimal or suboptimal production recovery solutions. The collaborative execution and monitoring module converts the selected solution into a standardized work order, pushes it to the field execution unit through a remote control interface or mobile terminal, and records the operation parameters, operation time, and stage production changes in real time, achieving full traceability. After the operation is completed, the evaluation and feedback optimization module automatically calculates review indicators such as production increment, recovery slope, and stabilization period, and performs deviation analysis with the model prediction results to form structured feedback data, driving the underlying model to perform asynchronous incremental training and parameter updates, thereby continuously correcting the strategy weights and recommendation logic. Through continuous iterative iteration, the system achieves self-learning optimization of abnormal fluid accumulation problems, forming an intelligent operation and maintenance closed-loop system for complex working conditions.
[0113] Implementation details of the closed-loop optimization method are as follows: Figure 3 , Figure 4 As shown, this embodiment provides a closed-loop optimization method of liquid accumulation detection-recommendation-execution-review, which achieves continuous improvement in production efficiency through perception, decision-making, execution and self-evolutionary feedback of gas well status.
[0114] like Figure 7 As shown, S1: Intelligent detection and early warning of fluid accumulation. This step enables real-time and continuous perception and judgment of the risk of fluid accumulation.
[0115] Data acquisition and storage: Real-time data such as oil pressure, casing pressure, instantaneous flow rate, and post-valve pressure are collected from sensors in each well and transmitted to the back-end database for standardized storage via OPC interface.
[0116] High-dimensional feature engineering: The raw data undergoes preprocessing such as invalid value removal, missing value imputation (weighted nonlinear interpolation), and Gaussian smoothing for noise reduction. Subsequently, a 798-dimensional feature vector is constructed, covering the maximum and minimum values, mean, and volatility of sliding windows at 10 / 30 / 60 time steps, as well as time difference features, periodic sin / cos coding, and event features (abnormal intervals and frequencies).
[0117] Model inference: A dual-hidden-layer deep neural network (DNN) is used, with 798-dimensional features in the input layer. The output layer calculates the probabilities of "normal" and "abnormal" using the Softmax function. If the abnormal probability exceeds a set threshold, an early warning signal is triggered.
[0118] like Figure 5 , Figure 6 , Figure 8 , Figure 11 As shown, S2: Intelligent Recommendation of Resumption Process Scheme. After the early warning is triggered in S1, the system enters the process matching decision-making stage: Collaborative Filtering Matching: The engine performs a similarity search with the historical case library based on parameters such as the current target well's depth, pipe diameter, and degree of fluid accumulation, initially selecting the best-performing process measures for this well or similar wells in the past. Reinforcement Learning Scheme Optimization: Based on the reinforcement learning framework, the current operating condition is regarded as the "State," and the optional measures (foam drainage, plunger, pressurization, etc.) are regarded as "Actions." The system searches the candidate library for the scheme with the highest expected reward, and finally outputs the optimal resumption suggestion for the gas well and its expected resumption success rate.
[0119] S3: The Process Implementation and Recording System translates intelligent decision-making into physical execution and simultaneously monitors data: Multi-terminal linkage execution: The system sends remote execution commands (such as adjusting valves or starting compressors) to the production control platform via API interfaces, or pushes electronic work orders (such as manually adding foaming rods) to the terminals of maintenance personnel. Full-process monitoring: During process implementation, the system records operational parameters at high frequency, including dosage, pressure fluctuation slope, and flow rate change curves, ensuring that the execution process is controlled and traceable.
[0120] like Figure 10As shown, S4: Closed-Loop Evaluation and Feedback Optimization. This step drives the continuous evolution of model accuracy and decision-making capabilities through result review: Automated Indicator Evaluation: Within a specified time window after process execution, the system automatically captures production data for performance analysis. Core evaluation fields include: 24-hour production increase after measures: a core indicator measuring the intensity of production recovery. Oil pressure recovery slope: a key parameter measuring the efficiency of wellbore fluid removal. Online Model Iterative Feedback: Evaluation results are fed back to the detection model in S1 and the recommendation engine in S2 as enhanced labels or reward values. Through parameter updates via reinforcement learning and the accumulation of labeled data, the system automatically corrects alarm thresholds and optimizes process matching weights, achieving closed-loop self-evolution of business logic.
[0121] Example 1 In a gas well fluid accumulation monitoring scenario at an oilfield, oil pressure, casing pressure, instantaneous flow rate, and downstream valve pressure data are collected in real time using wellhead sensors. The data is transmitted to the backend database at a 1-second sampling period. After receiving the data, the system first removes invalid values and detects missing values, then performs noise reduction processing using Gaussian filtering, and constructs differential pressure, time difference, and sliding window features to obtain a 798-dimensional input feature vector.
[0122] When features are input into the deep neural network, the system can output the probability of fluid accumulation in real time. If the abnormal probability exceeds a set threshold, the system automatically triggers an early warning and pushes the result to the visualization front end. Operators can then promptly carry out drainage operations based on the trend curve and alarm prompts, forming a closed loop of detection-recommendation-execution.
[0123] Example 2 During wellhead data acquisition, the system uses reasonable intervals defined by oil and gas experts to remove outliers from sensor data. For example, when casing pressure readings exceed 25 MPa, they are directly deemed invalid and removed. For intermittent packet loss caused by network jitter, the system identifies missing points by detecting timestamp intervals.
[0124] Missing value imputation employs weighted nonlinear interpolation, such as automatically filling missing segments based on trend relationships between adjacent data points, thus ensuring the continuity and smoothness of subsequent feature construction. This mechanism effectively reduces the interference of outliers on model training and inference, improving the accuracy of detection results.
[0125] Example 3 In the feature engineering stage, the system employs a multi-window sliding feature construction method. Using 10, 30, and 60 time steps as sliding windows, the maximum, minimum, average, and volatility of casing pressure and oil pressure difference are calculated, respectively. This allows for the simultaneous capture of both sharp fluctuations in short periods and stable trends in long periods.
[0126] By overlaying multi-scale windows, the model can learn the pressure fluctuation characteristics at different stages of the liquid accumulation process. In particular, when the pressure drops after the valve, short-term sharp fluctuations can serve as an important leading signal of anomalies, improving the early warning lead time.
[0127] Example 4 The system utilizes time-difference characteristics to capture trend changes. Specifically, for each type of production parameter, it calculates the numerical difference between the current point and the previous 60 time points to measure recent trends. For example, when the oil-casing pressure differential continuously increases within 60 points, it often indicates that fluid is accumulating in the wellbore.
[0128] Meanwhile, the timestamps are encoded into periodic feature vectors using sine and cosine functions, such as daily and weekly cycles, and then superimposed on the differential features. This allows the model to identify regular fluctuations caused by day-night cycles or periodic operations during training, reducing false alarms.
[0129] Example 5 The deep neural network model receives 798-dimensional features in its input layer, has 18 neurons in its first hidden layer and 10 neurons in its second hidden layer, both using the modified linear unit activation function. The output layer has two neurons, using the Softmax function to output the probabilities of the normal and abnormal states, respectively.
[0130] During the training phase, the system uses 70% of the data as the training set, 15% as the validation set, and 15% as the test set, and optimizes the model using the cross-entropy loss function. After multiple rounds of iterative training, the model achieves an accuracy of 96% on the test set, demonstrating a relatively stable ability to identify fluid accumulation.
[0131] Example 6 In the early prediction and alert mechanism, the system not only relies on the classification results of the neural network, but also combines event characteristics to generate dynamic alerts. For example, it calculates the time interval since the last anomaly occurred and counts the frequency of anomalies over the past month. If the frequency of anomalies is high in a short period of time, the system will lower the trigger threshold in advance.
[0132] Meanwhile, the reinforcement learning mechanism optimizes the alarm strategy based on human feedback. For example, when an operator believes that an alarm is a false alarm, the system will automatically adjust the parameters and raise the threshold when a similar situation occurs again, in order to reduce repeated false alarms.
[0133] Example 7 During the inference latency optimization process, the system decouples feature computation from model inference. All features are calculated and cached in real time during the data acquisition phase. When the model receives a prediction request, it directly calls the cached feature vectors, avoiding redundant calculations.
[0134] In a scenario where thousands of wells are operating simultaneously, the system uses API interfaces to call features in batches and perform parallel inference, reducing the average response latency from the original 3 seconds to 0.45 seconds, a reduction of approximately 85%, thus meeting the real-time requirements of large-scale production sites.
[0135] Example 8 The closed-loop optimization system comprises five modules: a database storage module that supports high-frequency writing and historical archiving; a data preprocessing module that performs cleaning, interpolation, and denoising; an anomaly detection and prediction module that runs a neural network model; a data display and manual annotation module that provides users with visualization and labeling functions; and an inference latency optimization module that enables low-latency inference.
[0136] In practical applications, the database module connects to the SCADA system via the OPC interface, writing more than 500 data entries per second; the visualization module provides trend curves and alarm panels, allowing users to quickly trace back historical fluid accumulation events at any wellhead and manually annotate them as a data source for subsequent model optimization.
[0137] Example 9 The database storage module adopts a distributed architecture, supporting 10,000 data writes per second, and provides a tiered storage mechanism for hot and cold data. Recently high-frequency data is stored in an in-memory database to support second-level retrieval; long-term historical data is stored in a disk database for archiving and backtracking.
[0138] For example, when a user queries the abnormal fluid accumulation status of a well over the past six months, the system can return the data curve and anomaly marker within one second, ensuring the efficiency of data services in large-scale production scenarios.
[0139] Example 10 The anomaly detection and prediction module can simultaneously identify liquid accumulation anomalies and compressor shutdown anomalies. During training, the system inputs both liquid accumulation data and compressor operation data into the model and sets dual output labels, corresponding to the liquid accumulation state and the compressor state, respectively.
[0140] When abnormal liquid accumulation is detected, the system will suggest a draining operation; when a compressor shutdown is detected, the system will trigger a unit inspection task. This dual-task detection mechanism reduces reliance on multiple independent models and improves overall operational efficiency and usability.
[0141] To verify the practical effectiveness of the "detection-recommendation-execution-review" closed-loop optimization scheme of this invention, the R&D team conducted a four-month pilot deployment test in a shale gas production area (covering 150 wells) in a Southwest oil and gas field, processing an average of over 500,000 data entries per day. The test results, recorded by the company's internal monitoring system and audited by a third party, demonstrated the system's significant advantages in improving production efficiency. 1. Verification of the accuracy of anomaly detection.
[0142] By employing 798-dimensional high-dimensional feature engineering in the S1 stage and a dual-hidden-layer DNN model, the system significantly surpasses traditional methods in recognition accuracy under complex working conditions: False Alarm Rate (FAR): reduced from 32.5% for traditional SCADA rule-based alarms to 6.3%. Missed Alarm Rate (MDR): reduced from 13.7% to 7.8%. Early Warning Accuracy: In identifying the early trend of liquid accumulation, the system achieves an early warning accuracy of up to 92%.
[0143] 2. Advance forecasting and process execution efficiency.
[0144] Based on the intelligent process recommendation of S2 and the collaborative execution process of S3, gas well operation and maintenance has shifted from "passive maintenance" to "proactive intervention": Early warning time: The system can achieve an average early warning time of 4.2 hours. Resumption cycle: The average resumption cycle per well has been significantly shortened from 3.5 days to 0.9 days. Production continuity: Unplanned downtime events have been reduced by 58%, and approximately 16 million cubic meters of production loss has been recovered within four months of the pilot program.
[0145] 3. System performance: real-time performance and high concurrency capability.
[0146] Through feature decoupling and inference process optimization in the S1 stage, the system demonstrates excellent industrial-grade stability: Inference latency: The average time for a single inference is 0.42 seconds, which is 86% lower than the original coupling method of 3.1 seconds. Concurrent processing: The system supports simultaneous processing of high-frequency data writing from 150 wells, with a peak write speed of 8,000 records per second, and the overall response time is stable within 1 second.
[0147] 4. Closed-loop optimization and model self-evolution effect.
[0148] Utilizing the review, evaluation, and feedback mechanism of Phase S4, the model achieved dynamic evolution in the production environment: Sample Accumulation: During the pilot phase, over 3,000 high-quality manually labeled samples were collected through a visual interface. Accuracy Leap: Through monthly iterative optimization based on feedback data, the model accuracy gradually increased from the initial 83% to 93.7%. Proof of Effectiveness: This data fully demonstrates that the feedback loop centered on Delta_Q (24-hour production increment) and k_Po (oil pressure recovery slope) can continuously correct model biases, ensuring the long-term effectiveness of the system.
[0149] The above data and charts fully demonstrate that the present invention has achieved significantly better results than the prior art in terms of detection accuracy, early warning, real-time performance and continuous optimization, and has outstanding substantive features and progress.
[0150] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.
[0151] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A closed-loop optimization method for fluid accumulation detection-recommendation-execution-review, characterized in that, The method includes the following steps: S1, Abnormal Warning Stage: Real-time production time-series data such as oil pressure, casing pressure, flow rate and valve post-valve pressure of gas wells are collected. After feature construction of the time-series data, it is input into the liquid accumulation anomaly detection model and outputs the judgment result of whether the gas well is in a liquid accumulation anomaly state and the corresponding early warning signal. S2, Intelligent Recommendation Stage for Resumption of Production Process Measures: Based on the abnormal liquid accumulation state, current wellbore dynamic parameters, and historical data on the effectiveness of process measures, a process matching model is constructed, and a production recovery process plan for the target gas well is output. S3, the automated or semi-automated execution phase: The execution instructions are generated according to the resumption process plan, and the execution instructions are sent to the production control system or operation and maintenance terminal to implement the corresponding liquid accumulation elimination measures. S4, Closed-loop evaluation and feedback phase: Production recovery data after the implementation of the liquid accumulation elimination measures is collected, the effectiveness of the early warning results and the resumption process plan is evaluated, and the evaluation results are fed back as feedback data to the liquid accumulation anomaly detection model and the process matching model to achieve iterative updates of model parameters.
2. The method according to claim 1, characterized in that, The features constructed in the anomaly warning stage include the pressure difference between oil pressure and casing pressure, statistical features calculated based on the sliding time window, time difference features of production parameters, and interval features of abnormal events.
3. The method according to claim 1, characterized in that, The fluid accumulation anomaly detection model is a deep neural network model based on multi-dimensional temporal feature input. Its output is the probability value corresponding to the normal state and the abnormal state, and a warning signal is triggered according to whether the probability value of the abnormal state exceeds a preset threshold.
4. A method for intelligent recommendation of gas well production recovery process based on historical execution feedback, implementing the closed-loop optimization method of liquid accumulation detection-recommendation-execution-review as described in any one of claims 1-3, characterized in that, The method includes the following steps: A1. Construct a candidate process space, which includes foam drainage, plunger regeneration, gas lift regeneration, and compressor boosting processes. A2. Based on the wellbore structure parameters, pressure distribution characteristics and liquid accumulation degree of the target gas well, calculate the similarity between the target gas well and historical gas wells, and screen to obtain an initial set of candidate processes. A3. The current production status of the target gas well is used as the status information, the initial candidate process is used as the optional action, and the production change and implementation cost after resumption of production are used as feedback information to establish a process selection strategy model. A4. Based on the process selection strategy model, output the recommended recovery process for the target gas well.
5. The method according to claim 4, characterized in that, The similarity is calculated based on multidimensional vector similarity of well depth, pipe diameter, pressure distribution characteristics, and historical fluid accumulation.
6. The method according to claim 4, characterized in that, The process selection strategy model uses the comprehensive evaluation results of the output recovery rate per unit time after resumption of production and the process implementation cost as feedback information to adjust the selection weight of each candidate process.
7. A model feedback enhancement method for gas well fluid accumulation control, implementing the closed-loop optimization method of fluid accumulation detection-recommendation-execution-review as described in any one of claims 1-3, characterized in that, The method includes: B1. Collect production recovery data of gas wells within a preset time window after the resumption process is completed; B2, Calculate the production recovery rate, pressure change trend and production recovery duration indicators based on the production recovery data; B3. Generate process execution effect evaluation results based on the aforementioned indicators; B4. The evaluation results of the process execution effect are used as supervision or reinforcement signals to correct the alarm threshold parameters of the liquid accumulation anomaly detection model and the strategy parameters of the resumption process recommendation model, respectively.
8. The method according to claim 7, characterized in that, The production recovery rate is calculated by comparing the average production change within a preset time period before and after the implementation of the production recovery measures.
9. The method according to claim 7, characterized in that, The pressure change trend is characterized by calculating the oil pressure recovery rate and the casing pressure change amplitude.
10. The method according to claim 7, characterized in that, The model feedback enhancement method retains the manual correction results when revising model parameters, and uses both the manual correction results and the automatically generated evaluation results as the basis for model updates.