A foam drainage timing prediction method based on adaptive cycle division and deep learning

By employing adaptive period division and deep learning methods, the dynamic parameter changes of gas wells are accurately captured, solving the problems of dynamic adaptability and insufficient data feature mining in the prediction of foaming agent injection timing. This achieves high-precision prediction of foaming agent injection timing, improving gas well production efficiency and economic benefits.

CN120765069BActive Publication Date: 2025-11-04SOUTHWEST PETROLEUM UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511277752.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-04
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

Existing methods for predicting the timing of foaming and drainage agent injection lack dynamic adaptability, have insufficient data feature mining, and lack a phase division strategy for the foaming and drainage operation cycle, resulting in insufficient prediction accuracy.

Method used

By employing an adaptive cycle segmentation and deep learning approach, dynamic production data from gas wells is collected, the bubble drainage cycle is segmented, positive and negative samples are sampled, a deep learning model is constructed, and pressure difference fitting curves and attention mechanism layers are used to accurately capture the changing patterns of dynamic parameters in gas wells.

Benefits of technology

It significantly improves the accuracy of predicting the timing of foaming agent injection, enabling early intervention in liquid accumulation issues, increasing gas well productivity, reducing production costs, and optimizing injection strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765069B_ABST
    Figure CN120765069B_ABST
Patent Text Reader

Abstract

The application discloses a foam backflushing timing prediction method based on adaptive cycle division and deep learning, relates to the technical field of oil and gas production engineering in the petroleum industry, and comprises the following steps: S1, collecting dynamic data of gas well production in foam backflushing operation, and performing stage division of a foam backflushing cycle according to the dynamic data of gas well production; S2, sampling dynamic data of different foam backflushing stages to obtain positive and negative samples; S3, establishing a foam backflushing agent injection timing prediction model based on the positive and negative samples; and S4, inputting dynamic data of gas well production to be predicted into the foam backflushing agent injection timing prediction model to obtain a prediction result of the foam backflushing agent injection timing. The application solves defects of existing methods in dynamic adaptability, data feature mining and stage division strategies, thereby significantly improving the prediction accuracy and reliability of the foam backflushing agent injection timing, can intervene before liquid loading occurs in the gas well, improves production efficiency, and can timely improve the gas well productivity and improve economic benefits.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of oil and gas production engineering in the petroleum industry, and particularly relates to a foam drainage timing prediction method based on adaptive cycle division and deep learning. BACKGROUND

[0002] In the development process of natural gas, with the gas well exploitation entering the middle and late stages, the formation energy gradually decays, and the wellbore liquid loading phenomenon is common. The core of the foam drainage gas recovery process as an economic and effective liquid discharge measure lies in the scientific injection of the foam drainage agent. In the determination of the traditional foam drainage agent injection timing, the injection timing of the foam drainage agent of the gas well is often determined through the pressure difference, cycle calculation and qualitative production experience; or a mathematical model based on physical principles is constructed to simulate the fluid flow behavior in the gas well. By adjusting the model parameters to fit the actual production data, the future state is predicted. With the development of artificial intelligence technology, the traditional machine learning method is introduced into the oil and gas well production field. According to the characteristics of the gas well production data, a strong classifier is formed by using ADABOOST to construct multiple decision trees and then integrating them to predict the foam drainage agent injection timing.

[0003] However, the existing foam drainage agent injection timing prediction method has the following three problems: (1) lack of dynamic adaptability, the traditional injection timing prediction method is mostly based on static physical models or simple empirical formulas, and it is difficult to adapt to the dynamically changing production conditions of the gas well in the exploitation process; (2) insufficient data feature mining, the existing prediction model fails to fully utilize the complex features and time series information in the data when processing the gas well production data; (3) lack of stage division strategy of the foam drainage operation cycle, after the implementation of the foam drainage agent injection operation of the gas well, the dynamic parameters will show a specific change law, however, the traditional model fails to fully mine these change laws, resulting in insufficient prediction accuracy of the foam drainage agent injection timing.

[0004] Therefore, a new foam drainage agent injection timing prediction method is needed to solve the above problems and realize high-precision foam drainage agent injection timing prediction. SUMMARY

[0005] The purpose of the present application is to provide a foam drainage timing prediction method based on adaptive cycle division and deep learning, which can accurately capture the dynamic parameter change law of the gas well in different exploitation stages, fully utilize the complex features and time series information, and thus realize accurate prediction of the foam drainage agent injection timing.

[0006] To achieve the above purpose, the present application provides the following scheme:

[0007] A foam drainage timing prediction method based on adaptive cycle division and deep learning, comprising the following steps:

[0008] S1, collecting dynamic data of gas well production in foam displacement operation, and dividing stages of foam displacement cycle according to the dynamic data of gas well production;

[0009] S2, sampling dynamic data of different foam displacement stages to obtain positive and negative samples;

[0010] S3, establishing a foam displacement agent injection timing prediction model based on the positive and negative samples;

[0011] S4, inputting dynamic data of gas well production to be predicted into the foam displacement agent injection timing prediction model to obtain a prediction result of the foam displacement agent injection timing.

[0012] Further, in S1, the stage division of the foam displacement cycle according to the dynamic data of gas well production comprises the following steps:

[0013] S101, taking a time interval between every two foam displacement agent injections as a foam displacement cycle, and fitting a pressure difference curve in a cycle to obtain a pressure difference fitting curve;

[0014] S102, dividing a foam displacement cycle into four stages, i.e., a foam generation stage, a violent reaction stage, a slow reaction stage, and a liquid accumulation recovery stage, according to a mechanism of foam displacement agent reaction and the pressure difference fitting curve.

[0015] Further, in S2, sampling dynamic data of different foam displacement stages to obtain positive and negative samples comprises the following steps:

[0016] S201, in the foam generation stage and the liquid accumulation recovery stage, sampling a sample interval after the pressure difference level returns to 70% of a reference pressure difference when the foam displacement agent is injected to obtain a positive sample;

[0017] S202, in the violent reaction stage, the slow reaction stage, and the remaining liquid accumulation recovery stage, sampling a negative sample.

[0018] Further, in S2, sampling dynamic data of different foam displacement stages to obtain positive and negative samples specifically comprises the following steps:

[0019] S2011, in the positive sample interval or the negative sample interval, setting a sliding window size and a step length, and sampling dynamic data of gas well production to obtain a positive sample and a negative sample;

[0020] S2012, labeling the positive sample with 1 to indicate that the foam displacement agent needs to be injected, and labeling the negative sample with 0 to indicate that the foam displacement agent does not need to be injected.

[0021] Further, in S3, establishing a foam displacement agent injection timing prediction model based on the positive and negative samples specifically comprises:

[0022] S301, divide the positive and negative samples into a training set and a test set;

[0023] S302, based on the features of the collected positive and negative samples, construct a deep learning model;

[0024] S303, set the hyperparameters required by the deep learning model, train and test the deep learning model using the training set and the test set, and output a foam drainage agent filling time prediction model.

[0025] Further, the hyperparameters include loss function, optimizer, learning rate, learning round, early stopping mechanism.

[0026] Further, the calculation formula of the differential pressure curve fitting is as follows:

[0027] Satisfies:

[0028] Satisfies:

[0029] Satisfies:

[0030]

[0031] Wherein, represents the length of a foam drainage period, represents a time point in a foam drainage period, , , represents a differential pressure curve in a foam drainage period, represents a binomial fitting curve of the first half of the foam drainage period differential pressure curve, represents a binomial fitting curve of the second half of the foam drainage period differential pressure curve, represents the differential pressure fitting curve of the entire foam drainage period; a 0 、a 1 、a 2 are coefficients of the fitting binomial ; b 0 、b 1 、b 2 are coefficients of the fitting binomial ; c 0 、c 1 、c 2、c 3 、c 4 are coefficients of the fitted four-term polynomial.

[0032] Further, the deep learning model comprises: one one-dimensional convolution layer, one pooling layer, two LSTM layers, one pressure difference constraint attention mechanism layer, and one full connection layer.

[0033] Further, the pressure difference constraint attention mechanism layer has the following calculation formula:

[0034] satisfies:

[0035]

[0036] satisfies:

[0037]

[0038] wherein, represents an input sample, represents a learnable projection weight matrix, which respectively acts on mapping the sample to a query space, a key space, and a value space, respectively represent the query space, the key space, and the value space, represents a time length, represents a feature dimension, represents a gating vector, which is used to constrain the output value of the attention score, represents a sigmoid activation function, represents a pressure difference feature column in the input sample, represents a learnable gating projection weight matrix, represents a gating bias vector, represents normalizing the score into a probability distribution, represents a vector Hadamard product, represents an output of the pressure difference constraint attention mechanism layer.

[0039] Further, the S102 divides one foam displacement cycle into four stages according to the mechanism of the foam displacement agent reaction and the pressure difference fitting curve: a foam generation stage, a violent reaction stage, a slow reaction stage, and a liquid accumulation recovery stage, and specifically comprises:

[0040] A1: taking the time point of adding the foam displacement agent as the starting time point of the foam generation stage; finding the maximum value of the first half of the pressure difference curve, and mapping it back to the time point at which the maximum value of the original pressure difference curve is located, as the ending time point of the foam generation stage, to determine the foam generation stage; ​

[0041] A2: find the minimum value of the entire differential pressure fitting curve, and map back to the time point where the minimum value of the original differential pressure curve is located; as the time point of the end of the slow reaction, find the time point of the maximum second derivative of the differential pressure fitting curve between the end time point of the foam generation stage and the slow reaction end time point, as the starting time point of the slow reaction stage, determine the slow reaction stage;

[0042] A3: take the time point of the end of the foam generation stage as the starting time point of the violent reaction stage, and take the time point of the start of the slow reaction as the end time point of the violent reaction, to determine the violent reaction stage;

[0043] A4: subtract the first three stages from the entire cycle to determine the fluid recovery stage.

[0044] According to the specific embodiments provided by the present application, the following technical effects are disclosed: the foam displacement timing prediction method based on adaptive cycle division and deep learning provided by the present application can accurately capture the dynamic parameter change law of the gas well in different production stages by introducing a stage division strategy and combining deep learning technology, and fully utilizes complex features and time series information, thereby significantly improving the prediction accuracy of the foam displacement agent injection timing. The present application can not only intervene before the gas well has a fluid accumulation problem, but also avoid the influence of fluid accumulation on production efficiency; in addition, the present application can timely improve the gas well productivity, improve the economic benefit, and reduce the production cost. The method described in the present application not only adapts to the dynamic changes in the production process of the gas well, but also optimizes the injection strategy, provides an efficient and scientific solution for oil and gas well production management, and solves the problems of insufficient dynamic adaptability, insufficient data feature mining and lack of stage division strategy in the existing foam displacement agent injection timing prediction method. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0046] Figure 1 The flowchart of the foam displacement timing prediction method based on adaptive cycle division and deep learning. DETAILED DESCRIPTION

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] The purpose of this invention is to provide a foaming agent injection timing prediction method based on adaptive period division and deep learning, which can accurately capture the dynamic parameter change patterns of gas wells at different production stages, make full use of complex features and time series information, and thus achieve accurate prediction of the foaming agent injection timing.

[0049] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0050] like Figure 1 As shown in the figure, an embodiment of the present invention provides a bubble sorting timing prediction method based on adaptive period partitioning and deep learning, which includes the following steps:

[0051] S1, collect dynamic data on gas well production during bubble drainage operations, and divide the bubble drainage cycle into stages based on the gas well production dynamic data; this step refines data-driven decision support by introducing hourly production dynamic data.

[0052] S2, sampling dynamic data at different bubble release stages to obtain positive and negative samples;

[0053] S3, establish a prediction model for the timing of foaming agent injection based on the positive and negative samples;

[0054] S4. Input the dynamic data of the gas well production to be predicted into the foaming agent injection timing prediction model to obtain the prediction result of the foaming agent injection timing. In this embodiment, a batch of real-time production data of gas wells was collected, constructed into the data type required by the model, and the data was input into the model to view the prediction result. Through the verification of real-time production data, the accuracy and generalization of the model can be proved, and it is applicable to real gas well production scenarios.

[0055] In this embodiment, step S1, which involves dividing the bubble discharge cycle into stages based on the dynamic data of the gas well production, includes the following steps:

[0056] S101, take the time interval between two foaming agent injections as a foaming cycle, and fit the pressure difference curve within a cycle to obtain the pressure difference fitting curve.

[0057] S102, according to the mechanism of foam displacement agent reaction and the differential pressure fitting curve, a foam displacement period is divided into four stages: foam generation stage, violent reaction stage, slow reaction stage and accumulated liquid recovery stage.

[0058] In this embodiment, S2, the dynamic data of different foam displacement stages are sampled to obtain positive and negative samples, including the following steps:

[0059] S201, in the foam generation stage and the accumulated liquid recovery stage, the sample interval after the pressure difference level recovers to 70% of the reference differential pressure when the foam displacement agent is added is sampled for positive samples, and the positive samples are obtained;

[0060] S202, negative samples are sampled in the violent reaction stage, the slow reaction stage and the remaining accumulated liquid recovery stage, and the negative samples are obtained.

[0061] In a further embodiment, the step S201 specifically includes the following steps:

[0062] S2011, in the positive sample interval, the production dynamic data of the gas well is sampled with a sliding window size of 13 and a step of 1;

[0063] S2012, the positive samples are labeled with 1, indicating that the foam displacement agent needs to be added.

[0064] In a further embodiment, the step S202 specifically includes the following steps:

[0065] S2021, in the negative sample interval, the production dynamic data of the gas well is sampled with a sliding window size of 13 and a step of 1;

[0066] S2022, the negative samples are labeled with 0, indicating that the foam displacement agent does not need to be added.

[0067] In this embodiment, by sampling positive and negative samples in different stages, the accuracy and generalization ability of the model can be improved. The sliding window sampling method can capture the continuity and time sequence of the production dynamic data of the gas well, avoiding information loss caused by data discretization. At the same time, the step of the sliding window is 1, which can ensure the density and integrity of the samples, further improving the sensitivity of the model to subtle changes.

[0068] In this embodiment, S3, based on the positive and negative samples, a foam displacement agent addition timing prediction model is established, specifically including:

[0069] S301, the positive and negative samples are divided into a training set and a test set, generally, the number of the training set and the test set is divided by 7:3;

[0070] S302, based on the features of the collected positive and negative samples, a deep learning model is constructed;

[0071] S303, set the hyperparameters required by the deep learning model, train and test the deep learning model, and output a foam displacement agent filling opportunity prediction model.

[0072] In this embodiment, the hyperparameters are set as follows:

[0073] Loss function: CrossEntropyLoss; optimizer: Adam; learning rate: 0.001; learning rounds: 100; set early stopping mechanism, that is, if the performance of the test set does not change for 3 consecutive rounds, stop the model training.

[0074] In this embodiment, the calculation formula of the differential pressure curve fitting is as follows:

[0075] Satisfies:

[0076] Satisfies:

[0077] Satisfies:

[0078]

[0079] wherein, represents the length of time of a foam displacement period, represents a time point in a foam displacement period, , , represents a differential pressure curve in a foam displacement period, represents a binomial fitting curve of the differential pressure curve in the first half of the foam displacement period, represents a binomial fitting curve of the differential pressure curve in the second half of the foam displacement period, represents a differential pressure fitting curve of the entire foam displacement period; a 0 、a 1 、a 2 are coefficients of the fitting binomial ; b 0 、b 1 、b 2 are coefficients of the fitting binomial ; c 0 、c 1 、c 2 、c 3、c 4 are coefficients of the fitted fourth order polynomial.

[0080] The accuracy of the differential pressure fitting curve is improved by piecewise multiple fitting, and the accuracy of subsequent stage division is improved.

[0081] In the embodiment, the deep learning model comprises one one-dimensional convolution layer, one pooling layer, two LSTM layers, one differential pressure constraint attention mechanism layer, and one full connection layer. The model constructed in this way has the following advantages: the combination of one-dimensional convolution and LSTM can effectively extract local features of samples and capture long and short term dependencies of time series, thereby improving the feature extraction capability of the model. The differential pressure constraint attention mechanism layer calculates the correlation weight of different positions in the input sequence, assigns different importance to each time step, and uses the differential pressure to constrain the attention score weight, so that the output conforms to the mechanism of gas well liquid loading, thereby improving the capturing ability and interpretability of the model for complex patterns.

[0082] In the embodiment, the calculation formula of the differential pressure constraint attention mechanism layer is as follows:

[0083] satisfies:

[0084]

[0085] satisfies:

[0086]

[0087] wherein, represents an input sample, represents a learnable projection weight matrix, which is respectively applied to map the sample to a query space, a key space, and a value space, respectively represent the query space, the key space, and the value space, represents a time length, represents a feature dimension, represents a gating vector, which is used to constrain the output value of the attention score, represents a sigmoid activation function, represents a differential pressure feature column in the input sample, represents a learnable gating projection weight matrix, represents a gating bias vector, represents normalizing the score into a probability distribution, represents a vector Hadamard product, represents the output of the differential pressure constraint attention mechanism layer.

[0088] ​In this embodiment, the stages in a foam displacement cycle are divided as follows:

[0089] A1: Take the time point of injecting foam as the starting time point of the foam generation stage; find the maximum value of the first half of the differential pressure fitting curve, and map it back to the time point where the maximum value of the original differential pressure curve is located, as the end time point of the foam generation stage, to determine the foam generation stage:

[0090] Satisfies:

[0091]

[0092]

[0093] wherein, , represents a time point in a foam displacement cycle, , represents a differential pressure curve in a foam displacement cycle, represents a binomial fitting curve of the first half of the differential pressure curve of a foam displacement cycle, represents a differential pressure fitting curve of the entire foam displacement cycle, represents the foam generation stage, represents the time point at which the foam generation stage ends, represents the feasible region of the solution of the time point at which the foam generation stage ends.

[0094] A2: Find the minimum value of the entire differential pressure fitting curve, and map it back to the time point where the minimum value of the original differential pressure curve is located; as the time point at which the slow reaction ends, find the time point at which the second derivative of the differential pressure fitting curve between the end time point of the foam generation stage and the time point at which the slow reaction ends is maximum, as the starting time point of the slow reaction stage, to determine the slow reaction stage:

[0095] Satisfies:

[0096]

[0097]

[0098]

[0099]

[0100] wherein, , represents a time point in a foam displacement cycle, , represents a differential pressure curve in a foam displacement cycle, represents a differential pressure fitting curve of the entire foam displacement cycle, a time point representing the end of the foam generation stage, a slow reaction stage, a time point representing the end of the slow reaction stage, a feasible region of the time point representing the end of the slow reaction stage, a violent reaction stage,

[0101] a time point representing the end of the violent reaction stage, a feasible region of the time point representing the end of the violent reaction stage, a second derivative of the differential pressure fitting curve.

[0102] A3: determining the violent reaction stage with the time point representing the end of the foam generation stage as the starting time point of the violent reaction stage, and with the time point representing the start of the slow reaction as the end time point of the violent reaction:

[0103]

[0104] wherein, a time point in a foam displacement cycle, , a time point representing the end of the foam generation stage, a violent reaction stage, a time point representing the end of the violent reaction stage.

[0105] A4: determining the liquid accumulation recovery stage by subtracting the first three stages from the whole cycle:

[0106]

[0107] wherein, a foam generation stage, a slow reaction stage, a violent reaction stage, a liquid accumulation recovery stage, a whole foam displacement cycle. The embodiment can generalize the change rule of the foam displacement reaction of different gas wells through the stage division of the foam displacement cycle, and also makes the sampling of positive and negative samples more accurate.

[0108] In this embodiment, the method is applied in more than ten gas wells, and the accuracy and the value of AUC are more than 10% higher than those of the traditional foam displacement timing prediction method. In actual foam displacement operation, the foam displacement agent injection timing predicted by the model is 15 hours or more earlier than the foam displacement agent injection timing arranged for the gas well operation. By predicting the foam displacement agent injection timing in advance, the intervention can be performed before the gas well has liquid accumulation problem, and the influence of liquid accumulation on production efficiency can be avoided. In addition, the gas well productivity can be improved in time, and the economic benefit can be improved.

[0109] In conclusion, the present application provides a foam displacement timing prediction method based on adaptive cycle division and deep learning, which solves the defects of existing methods in dynamic adaptability, data feature mining and stage division strategy, thereby significantly improving the prediction accuracy and reliability of foam displacement agent injection timing.

[0110] In the remaining technical features in the embodiment, those skilled in the art can flexibly select them according to actual conditions to meet different specific actual needs. However, it is obvious to those skilled in the art that the specific details do not have to be used to implement the present application. In other examples, in order to avoid confusion of the present application, well-known components, structures or parts are not specifically described, and are within the technical solution defined in the claims of the present application.

[0111] Changes and variations made by those skilled in the art without departing from the spirit and scope of the present application shall be within the scope of protection of the appended claims of the present application. In the above description, a large number of specific details are set forth in order to provide a thorough understanding of the present application. However, it is obvious to those skilled in the art that the present application does not have to be implemented with these specific details. In other examples, in order to avoid confusion of the present application, well-known technologies are not specifically described, such as specific construction details, operating conditions and other technical conditions.

[0112] The principles and implementation modes of the present application are described by applying specific examples in this paper, and the above examples are only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in specific implementation modes and application scope. In conclusion, the content of the present description should not be understood as a limitation of the present application.

Claims

1. A foam drainage timing prediction method based on adaptive cycle division and deep learning, characterized in that, The method comprises the following steps: S1, collecting dynamic data of gas well production during foam displacement operation, and dividing the foam displacement cycle into stages according to the dynamic data of the gas well production; S2, sampling the dynamic data of different foam displacement stages to obtain positive and negative samples; S3, establishing a foam displacement agent injection timing prediction model based on the positive and negative samples; S4, inputting the dynamic data of the gas well production to be predicted into the foam displacement agent injection timing prediction model to obtain a prediction result of the foam displacement agent injection timing; In S1, the division of the foam displacement cycle into stages according to the dynamic data of the gas well production comprises the following steps: S101, taking the time interval between every two foam displacement agent injections as a foam displacement cycle, and fitting the pressure difference curve in one cycle to obtain a pressure difference fitting curve; S102, dividing one foam displacement cycle into four stages, namely, a foam generation stage, a violent reaction stage, a slow reaction stage and a liquid accumulation recovery stage, according to the mechanism of foam displacement agent reaction and the pressure difference fitting curve; In S3, the foam displacement agent injection timing prediction model is established based on the positive and negative samples, and specifically comprises: S301, dividing the positive and negative samples into a training set and a test set; S302, constructing a deep learning model based on the features of the collected positive and negative samples; S303, setting hyperparameters required by the deep learning model, training and testing the deep learning model by using the training set and the test set, and outputting a foam displacement agent injection timing prediction model; In S303, the hyperparameters comprise a loss function, an optimizer, a learning rate, a learning round number and an early stopping mechanism; In S303, the deep learning model comprises one one-dimensional convolution layer, one pooling layer, two LSTM layers, one pressure difference constraint attention mechanism layer and one fully connected layer; In S303, the calculation formula of the pressure difference constraint attention mechanism layer is as follows: satisfies: satisfies: ; wherein, represents input samples, represents learnable projection weight matrices, respectively, for mapping samples to query space, key space, value space, respectively represent query space, key space, value space, represents time length, represents feature dimension, represents gating vector for constraining output value of attention score, represents sigmoid activation function, represents differential pressure feature column in input sample, represents learnable gating projection weight matrix, represents gating bias vector, represents normalizing score into probability distribution, represents vector Hadamard product, represents output of differential pressure constrained attention mechanism layer.

2. The foam-drawing timing prediction method based on adaptive cycle division and deep learning according to claim 1, characterized in that, In S2, the dynamic data of different foam displacement stages is sampled to obtain positive and negative samples, and specifically comprises the following steps: S201, in the foam generation stage and the liquid accumulation recovery stage, sampling the positive samples in the sample interval after the pressure difference level returns to 70% of the reference pressure difference when the foam displacement agent is injected, to obtain the positive samples; S202, sampling the negative samples in the violent reaction stage, the slow reaction stage and the remaining liquid accumulation recovery stage, to obtain the negative samples.

3. The foam drainage timing prediction method based on adaptive cycle division and deep learning of claim 2, wherein, In S2, the dynamic data of different foam displacement stages is sampled to obtain positive and negative samples, and specifically comprises the following steps: S2011, in the positive sample interval or the negative sample interval, setting a sliding window size and a step, sampling the dynamic data of the gas well production to obtain the positive samples and the negative samples; S2012, labeling the positive samples with 1, indicating that the foam displacement agent needs to be injected, and labeling the negative samples with 0, indicating that the foam displacement agent does not need to be injected.

4. The foam-drawing timing prediction method based on adaptive cycle division and deep learning according to claim 1, characterized in that, The calculation formula of the pressure difference curve fitting is as follows: satisfies: satisfies: satisfies: in, This indicates the length of one bubble-release cycle. This represents a point in time within a bubble-drain cycle. , , This represents the pressure difference curve over one bubble discharge cycle. This represents the binomial fitting curve of the pressure difference curve for the first half of the bubble discharge cycle. This represents the binomial fitting curve of the pressure difference curve for the second half of the bubble discharge cycle. The pressure difference fitting curve represents the entire bubble discharge cycle; a 0 、a 1 、a 2 All are fitted binomial expressions The coefficient; b 0 、b 1 、b 2 All are fitted binomials The coefficient; c 0 、c 1 、c 2 、c 3 、c 4 All are fitted quadrinomials The coefficient.

5. The foam drainage timing prediction method based on adaptive cycle division and deep learning according to claim 1, characterized in that, In S102, one foam displacement cycle is divided into four stages, namely, a foam generation stage, a violent reaction stage, a slow reaction stage and a liquid accumulation recovery stage, according to the mechanism of foam displacement agent reaction and the pressure difference fitting curve, and specifically comprises: A1: Take the time point of injecting foam as the starting time point of the foam generation stage; find the maximum value of the first half of the differential pressure curve and map it back to the time point where the maximum value of the original differential pressure curve is located, as the end time point of the foam generation stage, to determine the foam generation stage; A2: Find the minimum value of the entire differential pressure curve and map it back to the time point where the minimum value of the original differential pressure curve is located; as the time point of the end of slow reaction, find the time point of the maximum second-order derivative of the differential pressure fitting curve between the end time point of the foam generation stage and the time point of the end of slow reaction, as the starting time point of the slow reaction stage, to determine the slow reaction stage; A3: Take the time point of the end of the foam generation stage as the starting time point of the violent reaction stage, and take the time point of the start of the slow reaction as the end time point of the violent reaction, to determine the violent reaction stage; A4: Subtract the first three stages from the entire cycle to determine the fluid recovery stage.

Citation Information

Patent Citations

  • Foaming material for gas field foam discharging agent, slow dissolving foam discharging agent, and preparation method of slow dissolving foam discharging agent

    CN103937479A

  • Method for intelligently adding foam drainage agent based on data driving and side cloud cooperation to solve gas well water blockage

    CN114169217A