A method for predicting wellbore fluid loading based on deep learning

Through a deep learning-based method, combined with SCADA high-frequency data, A2 data and geological parameters, a Transformer model is constructed to predict wellbore effusion, which solves the problem of inaccurate effusion prediction in the existing technology, and achieves more refined prediction and guidance on the timing of gas extraction process.

CN114239419BActive Publication Date: 2025-07-01PETROCHINA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111603701.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2025-07-01
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict the time of fluid accumulation in gas wells and the timing of gas production process, resulting in an increase in the pressure gradient of the wellbore, decreasing yield, and affecting the recovery rate.

Method used

Using a wellbore effusion prediction method based on deep learning, the high-frequency data for SCADA production is obtained to reduce dimensionality, integrate A2 data and geological parameter data, and build a Transformer model with a multi-head attention mechanism, calculate the reconstruction error vector and dynamic threshold to judge effusion.

Benefits of technology

It realizes fine prediction of wellbore effusion, captures more subtle data changes, avoids misjudgment under large data fluctuations, and improves the timing guidance accuracy of the gas extraction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239419B_ABST
    Figure CN114239419B_ABST
Patent Text Reader

Abstract

The present invention provides a method for predicting wellbore liquid accumulation based on deep learning, comprising: S1, obtaining high-frequency SCADA production data and performing dimensionality reduction on it; S2, performing feature fusion on the dimensionality-reduced high-frequency SCADA production data, A2 data, and geological parameter data to obtain a fused feature vector; S3, using the fused feature vector for data modeling and training, and calculating a reconstruction error vector; S4, calculating a dynamic threshold based on the reconstruction error vector, and determining whether there is liquid accumulation in the wellbore according to the dynamic threshold. The present invention realizes the prediction of wellbore liquid accumulation based on deep learning. By using second-level data as features, the model not only focuses on the data fluctuations between days, but also takes into account the data fluctuations within a day, and can capture more subtle data changes. Moreover, the method of using a dynamic threshold to predict liquid accumulation can solve the problem that when there are large data fluctuations compared to the normal state in actual industrial production, the model will not make misjudgments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas well development, and in particular to a method for predicting wellbore liquid accumulation based on deep learning. Background Art

[0002] Liquid accumulation in a gas well refers to the phenomenon that liquid accumulates in the wellbore because the gas cannot effectively carry out the liquid. During the production process of a gas well, gas and liquid flow out of the formation and are produced on the ground through the wellbore. In the early stage of production, the gas well has a high gas production rate, and the gas and liquid phases flow upward in an annular flow, with the liquid carried in the form of droplets entrained in the gas core and liquid films attached to the pipe wall. As the formation pressure decreases, the gas production of the gas well decreases, resulting in the reversal of the flow of liquid (droplets / liquid film) in the wellbore and the inability to be carried out of the ground, resulting in liquid accumulation. Field well testing operations have shown that liquid accumulation in the wellbore causes a significant increase in the wellbore pressure gradient, thereby increasing the rate of production decline and affecting the final recovery rate of the gas well. Therefore, accurately predicting the time of liquid accumulation in a gas well and taking timely drainage and gas production process measures are of great significance to maintaining stable production of low-yield gas wells. However, there are still the following problems with gas production technology and the prediction of liquid accumulation:

[0003] 1. The two-phase flow mechanism is complex, and the results of various models vary greatly, making it difficult to guide the implementation of measures. The wellbore trajectory is complex, the two-phase flow simulation is difficult, and it is difficult to accurately calculate the wellbore pressure and temperature distribution.

[0004] 2. There are many studies on gas well liquid loading, but there is no consensus on its mechanism. The calculated values ​​of different prediction models have large deviations, resulting in a lack of effective guidance when designing drainage and production processes on site. The fundamental reason is that each mechanism model considers a single influencing factor when modeling, and lacks comparison with the actual wellbore two-phase flow.

[0005] 3. The timing of implementing gas production technology mainly relies on experience, and more precise guidance on the timing of measures is urgently needed, especially for shale gas. If the timing of running is too early, the wellbore pressure is too high, and the risk of pressure operation is high; if the timing of running is too late, the gas well has poor liquid carrying capacity and is prone to liquid accumulation, which affects the later production capacity; the geological engineering parameters of different wells vary greatly, and the production capacity varies, so it is difficult to fully apply unified standards. Summary of the invention

[0006] The present invention aims to provide a wellbore fluid accumulation prediction method based on deep learning to solve the above-mentioned problems.

[0007] The present invention provides a method for predicting wellbore fluid loading based on deep learning, comprising the following steps:

[0008] S1, obtain SCADA production high-frequency data and reduce its dimension;

[0009] S2. Feature fusion is performed on the dimension-reduced SCADA production high-frequency data, A2 data, and geological parameter data to obtain a fused feature vector.

[0010] S3. Data modeling and training are carried out using the fused feature vector, and a reconstruction error vector is calculated.

[0011] S4. A dynamic threshold is calculated based on the reconstruction error vector, and it is determined whether the wellbore is liquid-accumulated according to the dynamic threshold.

[0012] The beneficial effects of the above solution are as follows: Prediction of wellbore liquid accumulation based on deep learning is realized. By using second-level data as features, the model not only focuses on the data fluctuations between days but also takes into account the data fluctuations within a day, being able to capture more subtle data changes. Moreover, the method of using a dynamic threshold to predict liquid accumulation can solve the problem that when there are relatively large data fluctuations in actual industrial production compared to the normal state, the model will not make misjudgments.

[0013] Further, the method for dimension reduction of the SCADA production high-frequency data in step S1 is as follows:

[0014] The time dimension of the obtained SCADA production high-frequency data is reduced to a specified dimension using an autoencoder. Among them, the autoencoder includes multiple layers of LSTM networks, each layer of the LSTM network has different hidden units, and each layer of the LSTM network extracts features of different dimensions from the SCADA production high-frequency data.

[0015] The beneficial effects of the above solution are as follows: Data processing operations are carried out according to the high-dimensional characteristics of the SCADA production high-frequency data, which can ensure that while making full use of the SCADA production high-frequency data, the model can avoid the curse of dimensionality due to the high dimensionality of the data.

[0016] Further, in step S2, the dimension-reduced SCADA production high-frequency data, A2 data, and geological parameter data are subjected to feature fusion using the Concat operation.

[0017] The beneficial effects of the above solution are as follows: In existing wellbore liquid accumulation prediction algorithms, they are all restricted by well types and blocks. In order to make the model proposed by the present invention not be restricted by the above factors, feature fusion operations are carried out, and static data such as A2 data and geological parameter data are introduced to achieve intelligent liquid accumulation prediction.

[0018] Further, the method for data modeling and training using the fused feature in step S3 includes:

[0019] S31. Construct a Transformer model with a multi-head attention mechanism. The Transformer model includes a number of parallel scaled dot-product attention modules; each of the scaled dot-product attention modules is based on an encoder-decoder architecture and consists of an encoder and a decoder; both the encoder and the decoder are built using the multi-head attention mechanism inside, and each multi-head attention mechanism is connected by a feature fusion layer and a feed-forward layer;

[0020] S32. Each scaled dot-product attention module uses the scaled dot-product attention mechanism to calculate Q (queries), K (keys), and V (values) for the fused features, and then performs scaled dot-product attention calculation based on the calculation results to complete data modeling; where Q (queries) is the content that each piece of data wants to query, K (keys) is the keyword of each piece of data, and V (values) is the content of each piece of data;

[0021] S33. Use the data during the period when the wellbore has no liquid accumulation. First, perform feature fusion on the data during the period when the wellbore has no liquid accumulation by taking step S2, and then use the obtained feature vector as the input feature to train the model constructed after completing data modeling in step S32.

[0022] The beneficial effects of the above solution are: In the actual production process, the liquid accumulation data is less compared to the data without liquid accumulation. Therefore, using the method based on the reconstruction error to model the data and predict the liquid accumulation can ensure that the model is not affected by the imbalance between positive and negative samples (liquid accumulation and non-liquid accumulation data).

[0023] Further, the method for calculating Q (queries), K (keys), and V (values) for the fused features obtained in step S2 using the scaled dot-product attention mechanism in step S32 is:

[0024]

[0025]

[0026]

[0027] where W q 、W k 、W v are the weights corresponding to Q (queries), K (keys), and V (values) respectively, is the data formed by slicing the input data with a fixed window size.

[0028] Further, the method for performing scaled dot-product attention calculation based on the calculation results in step S32 is expressed as:

[0029]

[0030] Among them, T represents matrix transpose, and d k is the dimension of the training input data.

[0031] The beneficial effects of the above solution are: it can capture long-distance dependencies in the sequence, effectively utilize long-distance dependencies, and also directly help increase the parallelism of calculations.

[0032] Furthermore, the method for calculating the reconstruction error vector in step S3 is as follows:

[0033] First, calculate the reconstruction error:

[0034]

[0035] where e t represents the reconstruction error at time t, n represents the length of the input-output feature vector, y t is the input data at time t, is the reconstructed data at time t, that is, the output data of the model at time t;

[0036] Then, obtain the reconstruction error vector based on the reconstruction error:

[0037] B = [e t-h , … e t-1 , e t ;

[0038] where B represents the reconstruction error vector, and h represents the size of the reconstruction error window.

[0039] The beneficial effects of the above solution are: since the feature data of each day is a vector, for the convenience of subsequent threshold selection and fluid accumulation prediction, the expectation of the reconstruction error vector of each day is used to represent the reconstruction error of that day.

[0040] Furthermore, the method for calculating the dynamic threshold based on the reconstruction error vector in step S4 is as follows:

[0041]

[0042] where A represents the dynamic threshold candidate vector; the argmax(A) function represents selecting from the dynamic threshold candidate vector A the one that makes the formula The maximum dynamic threshold ε; μ(B) is the mean of the reconstruction error vectors; σ(B) is the standard deviation of the reconstruction error vectors; z is the weight coefficient; Δμ(e) is the difference between the mean μ(B) of the reconstruction errors in the reconstruction error vectors and the mean μ({e ∈ B|e < ε}) of the reconstruction errors after removing the anomalies; Δσ(e) is the difference between the standard deviation σ(B) of the reconstruction errors in the reconstruction error vectors and the standard deviation μ({e ∈ B|e < ε}) of the reconstruction errors after removing the anomalies; B a is the set of reconstruction errors e that satisfy e > ε; P j is the set of consecutive reconstruction errors in the B a set.

[0043] The beneficial effect of the above solution is that using a dynamic method to select the threshold avoids the one-size-fits-all mode of the fixed threshold method, making the selected threshold determined by the recent production situation and conforming to the actual industrial production situation.

[0044] Furthermore, the method for judging whether the wellbore is liquid-accumulated according to the dynamic threshold in step S4 is as follows:

[0045] When the reconstruction error at time t + 1 is greater than or equal to the dynamic threshold, it is judged that the wellbore is in a liquid-accumulated state at this moment; otherwise, it is judged that the wellbore is not liquid-accumulated at this moment.

[0046] The beneficial effect of the above solution is that using the method of dynamic threshold to predict liquid accumulation can solve the problem that when there are large data fluctuations in actual industrial production compared to the normal state, the model will not make misjudgments.

[0047] In summary, due to the adoption of the above technical solution, the beneficial effect of the present invention is:

[0048] The present invention realizes the prediction of wellbore liquid accumulation based on deep learning, where second-level data is used as features, enabling the model to not only focus on the data fluctuations between days but also consider the data fluctuations within a day, and being able to capture more subtle data changes; and using the method of dynamic threshold to predict liquid accumulation can solve the problem that when there are large data fluctuations in actual industrial production compared to the normal state, the model will not make misjudgments. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0050] Figure 1Flow chart of the wellbore liquid accumulation prediction method based on deep learning according to an embodiment of the present invention.

[0051] Figure 2 Schematic diagram of the structure of the dimensionality reduction autoencoder according to an embodiment of the present invention.

[0052] Figure 3 Schematic diagram of feature fusion according to an embodiment of the present invention.

[0053] Figure 4 Schematic diagram of the structure of the Transformer model according to an embodiment of the present invention.

[0054] Figure 5a Schematic diagram of the scaled dot-product attention mechanism in the multi-head attention mechanism according to an embodiment of the present invention, where

[0055] Figure 5b Schematic diagram of the multi-head attention mechanism according to an embodiment of the present invention. Detailed implementation manners

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations.

[0057] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0058] Embodiment

[0059] As Figure 1 shown, this embodiment proposes a wellbore liquid accumulation prediction method based on deep learning, including the following steps:

[0060] S1. Obtain SCADA production high-frequency data and perform dimensionality reduction on it;

[0061] Among them, the SCADA production high-frequency data is the production high-frequency data read from the SCADA production high-frequency data acquisition system, with a time level of seconds, which can reflect the data fluctuation situation within a day during the production process in detail. After data cleaning operations, there are 17,279 pieces of data for one feature per day in the SCADA production high-frequency data, showing the characteristic of high dimensionality.

[0062] Due to the high-dimensional characteristics of the SCADA production high-frequency data, considering the subsequent feature fusion with A2 data and geological parameter data, if the original data is directly used for feature fusion and data modeling, it will lead to the curse of dimensionality and insufficient influence of A2 data and geological parameter data on the model. Moreover, the SCADA production high-frequency data is production data with a time level of seconds, and the A2 data is the production data summarized by day from the SCADA production high-frequency data, with a time level of days, mainly used to observe the production data fluctuations between days. As the day-level production data, the A2 data needs to raise the time dimension of the SCADA production high-frequency data to the day level through dimensionality reduction operations. The method for dimensionality reduction of the SCADA production high-frequency data in this embodiment is: using an autoencoder to reduce the time dimension of the obtained SCADA production high-frequency data to a specified dimension; wherein, the autoencoder includes multiple layers of LSTM networks, each layer of the LSTM network has different hidden units, and each layer of the LSTM network extracts features of different dimensions from the SCADA production high-frequency data.

[0063] As Figure 2 shown in an example of the autoencoder, the autoencoder in this example has a total of five layers, and each layer is an LSTM (Long Short-Term Memory) network. Each layer of the LSTM network has different hidden units and can extract features of different dimensions from time series data. The intermediate variables of the extracted autoencoder are essentially a set of the most representative features extracted from the input high-dimensional data, reducing the SCADA production high-frequency data from tens of thousands per day to a custom number, raising the time scale from seconds to days, and then performing feature fusion with A2 data and geological parameter data.

[0064] S2. Perform feature fusion on the dimensionality-reduced SCADA production high-frequency data with A2 data and geological parameter data to obtain a fused feature vector;

[0065] In this embodiment, the geological parameter data refers to the geological parameters of each production well, which are fixed attributes of the well and belong to static parameters. In this embodiment, the Concat operation is used to perform feature fusion on the dimensionality-reduced SCADA production high-frequency data with A2 data and geological parameter data. The Concat operation refers to directly splicing all features into a vector to achieve feature diversity and improve the model modeling result. Splice the dimensionality-reduced SCADA production high-frequency data of one day, A2 data, and geological parameter data through the Concat operation to form the final model input feature vector, as Figure 3 shown, so as to enable the model to fully utilize the A2 data and static geological parameter data while considering the dynamic SCADA production high-frequency data, thereby making more accurate prediction results.

[0066] S3. Use the fused feature vectors for data modeling and training, and calculate the reconstruction error vector. Specifically:

[0067] S31. Construct a Transformer model with a multi-head attention mechanism. The multi-head attention mechanism includes several parallel scaled dot-product attention modules. Each scaled dot-product attention module is based on an encoder-decoder architecture and consists of an encoder and a decoder. The encoder and decoder are both built using a multi-head attention mechanism inside, and each multi-head attention mechanism is connected by a feature fusion layer and a feed-forward layer. The Transformer model with a multi-head attention mechanism constructed for this embodiment is as Figure 4 shown. The multi-head attention mechanism is as Figure 5a shown, including three parallel scaled dot-product attention modules. The working mechanism of each scaled dot-product attention module is as Figure 5b shown. The input and output of this Transformer model are both time-series data of a specific sliding window size, aiming to capture the data fluctuation relationship between days. And the data fluctuation relationship between days can reflect the accumulation fluid characteristics, such as a sudden drop in daily gas production, an increase in the pressure difference between the tubing and casing pressure, etc. Since the model is only trained with normal data, when the input of the model is normal data, an output with a smaller reconstruction error will be obtained. When the input of the model is abnormal data, that is, the data during the accumulation fluid period, an output with a larger reconstruction error will be obtained.

[0068] S32. Each scaled dot-product attention module uses the scaled dot-product attention mechanism to calculate Q (queries), K (keys), and V (values) for the fused features, and then performs scaled dot-product attention calculation based on the calculation results to complete data modeling. Among them, Q (queries) is the content that each piece of data wants to query, K (keys) is the keyword of each piece of data, and V (values) is the content of each piece of data.

[0069] Among them, the method of using the scaled dot-product attention mechanism to calculate Q (queries), K (keys), and V (values) for the fused features obtained in step S2 is:

[0070]

[0071]

[0072]

[0073] Among them, W q 、W k 、W vThe weights corresponding to Q (queries), K (keys), and V (values) respectively, are the data formed by slicing the input data with a fixed window size.

[0074] The method for calculating the scaled dot - product attention according to the calculation result is expressed as:

[0075]

[0076] where, T represents matrix transpose, and d k is the dimension of the training input data.

[0077] The model is essentially a reconstruction of the input data. According to the input data y at time t t and the reconstructed data The method for calculating the reconstruction error vector is:

[0078] First, calculate the reconstruction error e t :

[0079]

[0080] where, e t represents the reconstruction error at time t, n represents the length of the input - output feature vector, y t is the input data at time t, is the reconstructed data at time t, that is, the output data of the model at time t;

[0081] Then, obtain the reconstruction error vector B according to the reconstruction error:

[0082] B = [e t-h , … e t-1 , e t ;

[0083] where, B represents the reconstruction error vector, and h represents the reconstruction error window size.

[0084] S33. Use the data in the non - liquid - filled period of the wellbore. First, perform feature fusion on the data in the non - liquid - filled period of the wellbore by taking step S2, and then use the obtained feature vector as the input feature to train the model constructed after completing data modeling in step S32. In this embodiment, the optimizer for training the model is Adam Optimizer, the learning rate of the optimizer can be set to 0.002, and the total number of iterations is 500 times.

[0085] S4. Calculate the dynamic threshold according to the reconstruction error vector, and judge whether the wellbore is liquid - filled according to the dynamic threshold. Specifically:

[0086] First, calculate the dynamic threshold candidate vector A according to the reconstruction error value vector B:

[0087] A = μ(B) + zσ(B);

[0088] Wherein, μ(B) is the mean of the reconstruction error vector; σ(B) is the standard deviation of the reconstruction error vector; z is the weight coefficient;

[0089] The threshold value at each time step is dynamic, that is, calculate the dynamic threshold ε:

[0090]

[0091] Δμ(e) = μ(B) - μ({e ∈ B|e < ε});

[0092] Δσ(e) = σ(B) - σ({e ∈ B|e < ε});

[0093] B a = {e ∈ B|e > ε};

[0094] Wherein:

[0095] The argmax(A) function represents selecting the dynamic threshold ε from the dynamic threshold candidate vector A that maximizes the formula ;

[0096] Δμ(e) = μ(B) - μ({e ∈ B|e < ε}) represents dividing the reconstruction errors in the reconstruction error vector B according to the selected dynamic threshold ε, and obtaining the difference between the mean μ(B) of the reconstruction errors in the reconstruction error vector and the mean μ({e ∈ B|e < ε}) of the reconstruction errors after removing the abnormal reconstruction errors (i.e., the reconstruction errors greater than or equal to the dynamic threshold);

[0097] Δσ(e) = σ(B) - σ({e ∈ B|e < ε}) represents the difference between the standard deviation μ(B) of the reconstruction errors in the reconstruction error vector and the standard deviation μ({e ∈ B|e < ε}) of the reconstruction errors after removing the abnormal reconstruction errors (i.e., the reconstruction errors greater than or equal to the dynamic threshold);

[0098] B a = {e ∈ B|e > ε} represents the set of reconstruction errors e that satisfy e > ε, that is, the set of abnormal reconstruction errors selected according to the dynamic threshold ε.

[0099] P j = continuous sequences of e a ∈B a represents B a The set of continuous reconstruction errors in the set.

[0100] The principle of calculating the dynamic threshold can be understood as follows: using the fewest abnormal sequences and the fewest number of abnormal points to maximize the mean and standard deviation of the sequence after removing the anomalies compared to the original sequence.

[0101] It can be seen that the method of dynamic threshold combines the mean and the standard deviation and continuously updates the threshold according to the accumulation of the reconstruction error. Only one parameter, i.e., the weight coefficient z, needs to be adjusted throughout the process.

[0102] After finding the dynamic threshold, the wellbore liquid holdup is judged at time t + 1: when the reconstruction error at time t + 1 is greater than or equal to the dynamic threshold, it is judged that the wellbore is in the liquid holdup state at this moment; otherwise, it is judged that the wellbore is not in the liquid holdup state at this moment.

[0103] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various changes and modifications can be made to the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for predicting wellbore liquid accumulation based on deep learning, characterized in that, It includes the following steps: S1. Obtain the SCADA production high-frequency data and perform dimensionality reduction on it; S2. Perform feature fusion on the dimensionality-reduced SCADA production high-frequency data, A2 data, and geological parameter data to obtain a fused feature vector; where the A2 data is the production data summarized by day from the SCADA production high-frequency data; S3. Use the fused feature vector to perform data modeling and training, and calculate the reconstruction error vector; S4. Calculate the dynamic threshold according to the reconstruction error vector, and determine whether the wellbore is liquid-accumulated based on the dynamic threshold; The method of using the fused features in step S3 to perform data modeling and training includes: S31. Construct a Transformer model with a multi-head attention mechanism. The Transformer model includes several parallel scaled dot-product attention modules; each scaled dot-product attention module is based on an encoder-decoder architecture and consists of an encoder and a decoder; both the encoder and the decoder are built using the multi-head attention mechanism inside, and each multi-head attention mechanism is connected by a feature fusion layer and a forward propagation layer; S32. Each scaled dot-product attention module uses the scaled dot-product attention mechanism to calculate Q (queries), K (keys), and V (values) for the fused features, and then performs scaled dot-product attention calculation according to the calculation results to complete data modeling; where Q (queries) is the content that each piece of data wants to query, K (keys) is the keyword of each piece of data, and V (values) is the content of each piece of data; S33. Use the data in the time period when the wellbore is not liquid-accumulated. First, perform feature fusion on the data in the time period when the wellbore is not liquid-accumulated by taking step S2, and then use the obtained feature vector as the input feature to train the model constructed after completing data modeling in step S32.

2. The method for predicting wellbore liquid accumulation based on deep learning according to claim 1, wherein The method of calculating Q (queries), K (keys), and V (values) for the fused features obtained in step S2 using the scaled dot-product attention mechanism in step S32 is: Q = W q y ` t ; K = W k y ` t ; V = W v y ` t ; Among them, W q , W k , W v are the weights corresponding to Q (queries), K (keys), and V (values) respectively, and y t ` is the data formed by slicing the input data with a fixed window size.

3. The method for predicting wellbore liquid accumulation based on deep learning according to claim 2, wherein The method of performing scaled dot-product attention calculation according to the calculation results in step S32 is expressed as: where T represents matrix transpose, and d k is the dimension of the training input data.

4. The wellbore liquid accumulation prediction method based on deep learning according to claim 1, wherein, The method of calculating the reconstruction error vector in step S3 is: First calculate the reconstruction error: Among them, e t represents the reconstruction error at time t, n represents the length of the feature vector of the input and output, y t is the input data at time t, is the reconstructed data at time t, that is, the output data of the model at time t; Then obtain the reconstruction error vector according to the reconstruction error: B = [e t-h , … e t-1 , e t ; where B represents the reconstruction error vector and h represents the reconstruction error window size.

5. The method for predicting wellbore liquid accumulation based on deep learning according to claim 4, wherein The method of calculating the dynamic threshold according to the reconstruction error vector in step S4 is: Among them, A represents the dynamic threshold candidate vector; the argmax(A) function represents selecting the dynamic threshold ε that maximizes the formula ; μ(B) is the mean of the reconstruction error vector; σ(B) is the standard deviation of the reconstruction error vector; z is the weight coefficient; Δμ(e) is the difference between the mean μ(B) of the reconstruction error in the reconstruction error vector and the mean μ({e ∈ B|e < ε}) of the reconstruction error after removing the outliers; Δσ(e) is the difference between the standard deviation μ(B) of the reconstruction error in the reconstruction error vector and the standard deviation μ({e ∈ B|e < ε}) of the reconstruction error after removing the outliers; B a is the set of reconstruction errors e that satisfy e > ε; P j is the set of consecutive reconstruction errors in the B a set.

6. The wellbore liquid accumulation prediction method based on deep learning according to claim 1, characterized in that The method of performing dimensionality reduction on the SCADA production high-frequency data in step S1 is: Use an autoencoder to reduce the time dimension of the obtained SCADA production high-frequency data to a specified dimension; where the autoencoder includes multiple layers of LSTM networks, each layer of LSTM network has different hidden units, and each layer of LSTM network extracts features of different dimensions from the SCADA production high-frequency data.

7. The method for predicting wellbore liquid accumulation based on deep learning according to claim 6, characterized in that In step S2, use the Concat operation to perform feature fusion on the dimensionality-reduced SCADA production high-frequency data, A2 data, and geological parameter data.

8. The method for predicting wellbore liquid accumulation based on deep learning according to claim 1, wherein, The method of determining whether the wellbore is liquid-accumulated based on the dynamic threshold in step S4 is: When the reconstruction error at time t + 1 is greater than or equal to the dynamic threshold, it is determined that the wellbore is in the state of liquid accumulation at this moment; otherwise, it is determined that the wellbore has no liquid accumulation at this moment.

Citation Information

Patent Citations

  • Shaft liquid accumulation prediction and diagnosis method

    CN113338916A