Gas well effusion early warning method and device based on neural network model

Through the gas well effusion warning method based on neural network model, the frequency domain characteristics of real-time data are used to perform early warning, which solves the problem of difficult to identify early signals of gas well effusion in the prior art, and achieves earlier and more accurate effusion recognition and Improved production stability.

CN119494538APending Publication Date: 2025-02-21BEIJING MAIKE PIONEER TECHNOLOGY DEVELOPMENT CO LTD +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411594619.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-09
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify early signals of effusion in gas wells, and they can usually only be processed when effusion is significant, resulting in a decrease in gas well production capacity.

Method used

Using the gas well effusion warning method based on the neural network model, the frequency domain characteristics of sleeve pressure, oil pressure and instantaneous gas volume are extracted and the trained neural network is input. The model provides early warning.

Benefits of technology

Early identification and early warning of effusion in gas wells has been achieved, the cost of effusion treatment has been reduced, and the stability and efficiency of gas well production have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494538A_ABST
    Figure CN119494538A_ABST
Patent Text Reader

Abstract

The invention discloses a gas well effusion early warning method and device based on a neural network model, and the method comprises the steps: obtaining real-time data of a gas well, carrying out the preprocessing of the real-time data, carrying out the frequency domain analysis of the preprocessed real-time data, and obtaining a real-time frequency domain feature; performing frequency domain normalization processing on the real-time frequency domain feature to obtain a casing pressure feature, an oil pressure feature and an instantaneous gas flow feature after normalization processing, forming a feature vector by the casing pressure feature, the oil pressure feature and the instantaneous gas flow feature after normalization processing, and inputting the feature vector as an input vector into a trained neural network model; an output result of the trained neural network model serves as an output result corresponding to the real-time data, and whether gas well effusion is pre-warned or not is determined based on the output result corresponding to the real-time data. According to the method, through early intervention, the hydrops treatment cost is reduced, and the stability and production efficiency of gas well production are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of oil and natural gas production, and in particular to a gas well liquid accumulation early warning method and device based on a neural network model. Background Art

[0002] During the production process of gas wells, liquid accumulation in gas wells is one of the important factors affecting the production efficiency and stability of gas wells, and may even lead to production interruptions. The process of gas wells from no liquid accumulation to liquid-carrying production and then to liquid accumulation is usually accompanied by changes in flow patterns. The fluid distribution state and pressure fluctuation characteristics in the gas well will change with the occurrence of liquid accumulation, especially in gas wells without packers, where casing pressure and oil pressure will experience low-frequency fluctuations, which are early signals of liquid accumulation in gas wells.

[0003] Due to the differences in geological and engineering characteristics and liquid production (liquid carrying) of different wells, low-frequency characteristics will vary greatly. Existing technologies are difficult to effectively identify early liquid accumulation and can only be treated when liquid accumulation is significant, resulting in a decrease in gas well productivity. Therefore, it is particularly important to identify liquid accumulation earlier and more accurately based on the characterization, analysis and identification of real-time gas well data, especially low-frequency pressure fluctuations. Summary of the invention

[0004] The present invention proposes a gas well liquid accumulation early warning method and device based on a neural network model, which can perform early identification and early warning of gas well liquid accumulation by combining time domain feature engineering and frequency domain processing of real-time data.

[0005] In various method embodiments of the present invention, a gas well liquid accumulation early warning method based on a neural network model includes:

[0006] Step S1: acquiring real-time data of the gas well, preprocessing the real-time data, performing frequency domain analysis on the preprocessed real-time data to obtain real-time frequency domain features; performing frequency domain normalization processing on the real-time frequency domain features to obtain normalized casing pressure features, oil pressure features, and instantaneous gas volume features, forming a feature vector from the normalized casing pressure features, oil pressure features, and instantaneous gas volume features, and using the feature vector as an input vector to input into a trained neural network model;

[0007] Step S2: The output result of the trained neural network model is used as the output result corresponding to the real-time data, and whether to issue an early warning for liquid accumulation in the gas well is determined based on the output result corresponding to the real-time data.

[0008] Optionally, the neural network model includes an input layer, an LSTM model, a CNN network model, a fully connected layer and an output layer connected in sequence; the input layer receives the input vector and inputs the input vector into the LSTM model, the LSTM model generates a first feature with time dependency information based on the input vector, and inputs the first feature into the CNN network model and the fully connected layer respectively, the CNN network model extracts the spatial feature in the first feature as the second feature, and inputs the second feature into the fully connected layer; the fully connected layer extracts a third feature based on the first feature and the second feature, and the output layer outputs a classification result based on the third feature as the output result of the neural network model.

[0009] Optionally, the preprocessed data is subjected to frequency domain analysis to obtain frequency domain features corresponding to the data, wherein the data is real-time data or training sample data, including:

[0010] Determine the amplitudes corresponding to the casing pressure, oil pressure and instantaneous gas volume from the pre-processed data, determine the dominant frequencies corresponding to the casing pressure, oil pressure and instantaneous gas volume, and determine the casing pressure frequency domain characteristics, oil pressure frequency domain characteristics and instantaneous gas volume frequency domain characteristics related to liquid accumulation in the gas well based on the dominant frequencies corresponding to the casing pressure, oil pressure and instantaneous gas volume and the periodic fluctuation characteristics of the gas well; the casing pressure frequency domain characteristics, oil pressure frequency domain characteristics and instantaneous gas volume frequency domain characteristics are collectively referred to as frequency domain characteristics;

[0011] The sleeve pressure frequency domain characteristic is denoted as F tub (f)

[0012]

[0013] Among them, n is the time, N is the total number of sample points, P tub (n) is the casing pressure data at the nth moment, j is the imaginary part, α is the weight related to the casing pressure change rate, is the peak change rate of casing pressure, β is the first weight related to the amplitude feature, A tub (f) is the casing pressure amplitude at frequency f;

[0014] The oil pressure frequency domain characteristic is denoted as F oil (f)

[0015]

[0016] Among them, P oil (n) is the oil pressure data at the nth moment, γ is the weight related to the oil pressure change amplitude,

[0017] P oil (t stable ) is the stable value of oil pressure, P oil(t peak ) is the peak value of oil pressure, δ is the second weight related to the amplitude feature, A oil (f) is the oil pressure amplitude at frequency f;

[0018] The frequency domain characteristic of instantaneous air volume is recorded as F gas (f)

[0019]

[0020] Among them, Q gas (n) is the instantaneous gas volume data at the nth moment, and η is the weight related to the gas volume change rate;

[0021] is the maximum rate of change of gas volume, ζ is the third weight related to the amplitude feature, A gas (f) is the instantaneous air volume amplitude at frequency f.

[0022] Optionally, frequency domain normalization processing is performed on the frequency domain features corresponding to the data; and casing pressure features, oil pressure features, and instantaneous gas volume features after normalization processing are obtained, wherein the data is real-time data or training sample data, wherein:

[0023] The normalization formula is:

[0024]

[0025] Among them, f norm is the normalized feature. When the object to be normalized is oil pressure, the normalized feature is the normalized oil pressure feature. When the object to be normalized is casing pressure, the normalized feature is the normalized casing pressure feature. When the object to be normalized is instantaneous gas volume, the normalized feature is the normalized instantaneous gas volume feature. 井 is the dominant frequency of the gas well, f ref is the frequency domain feature corresponding to the object to be normalized, and the object to be normalized is oil pressure, casing pressure, and instantaneous gas volume.

[0026] Optionally, the training process of the neural network model is:

[0027] Acquire an input vector corresponding to the training sample data based on the training sample data;

[0028] Freeze the CNN network model, the output of the LSTM model is directly input into the fully connected layer instead of the CNN network model, the output of the CNN network model is not input into the fully connected layer, that is, the CNN network model does not participate in training; train the neural network model based on the input vector corresponding to the training sample data, and obtain a trained neural network model as the first neural network model;

[0029] In the first neural network model, the LSTM model is frozen, the output of the input layer is directly input into the CNN network model, the output of the input layer is not input into the LSTM model, and the output of the LSTM model is not input into the fully connected layer, that is, the LSTM model does not participate in training, and the first neural network model is trained based on the input vector corresponding to the training sample data to obtain the trained first neural network model as the second neural network model;

[0030] In the second neural network model, the LSTM model is unfrozen, that is, the input layer receives the input vector and inputs the input vector into the LSTM model, the LSTM model generates a first feature with time dependency information based on the input vector, the first feature is input into the CNN network model and the fully connected layer respectively, the CNN network model extracts the spatial feature in the first feature as the second feature, and the second feature is input into the fully connected layer; the second neural network model is trained based on the input vector corresponding to the training sample data to obtain a trained second neural network model as a trained neural network model.

[0031] In the above-mentioned method embodiments of the present invention, a gas well liquid accumulation early warning device based on a neural network model comprises:

[0032] Feature vector generation module: configured to obtain real-time data of gas wells, preprocess the real-time data, perform frequency domain analysis on the preprocessed real-time data to obtain real-time frequency domain features; perform frequency domain normalization on the real-time frequency domain features to obtain normalized casing pressure features, oil pressure features, and instantaneous gas volume features, form a feature vector from the normalized casing pressure features, oil pressure features, and instantaneous gas volume features, and use the feature vector as an input vector to input into the trained neural network model;

[0033] Early warning module: configured to use the output result of the trained neural network model as the output result corresponding to the real-time data, and determine whether to issue an early warning for liquid accumulation in the gas well based on the output result corresponding to the real-time data.

[0034] In the above method embodiments of the present invention, a computer-readable storage medium is provided, wherein a plurality of instructions are stored in the storage medium, and the plurality of instructions are used for a processor to load and execute the above method.

[0035] In the above-mentioned method embodiments of the present invention, an electronic device includes: a processor for executing multiple instructions; a memory for storing multiple instructions; wherein the multiple instructions are used to be stored by the memory, and loaded by the processor to execute the method as described above.

[0036] The present invention uses machine learning models to accurately identify the characteristics of different gas well liquid accumulation in the early stage of liquid accumulation by preprocessing, feature extraction, time domain and frequency domain analysis of real-time data. It can also send out early warning signals. Through early intervention, the cost of liquid accumulation treatment can be reduced and the stability and efficiency of gas well production can be improved.

[0037] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0039] Figure 1 It is a schematic diagram of the process of the gas well liquid accumulation early warning method based on the neural network model of the present invention;

[0040] Figure 2 This is a schematic diagram of the structure of the neural network model of the present invention;

[0041] Figure 3 A schematic diagram of a process for generating input data for a neural network model of the present invention;

[0042] Figure 4 This is a schematic diagram of the neural network model training process of the present invention;

[0043] Figure 5 A detailed process diagram of the neural network model training process of the present invention;

[0044] Figure 6 This is a schematic diagram of the prediction process of the neural network model of the present invention;

[0045] Figure 7 This is a schematic flow chart of a gas well liquid accumulation early warning method based on a neural network model according to an embodiment of the present invention;

[0046] Figure 8 It is a structural schematic diagram of a gas well liquid accumulation early warning device based on a neural network model of the present invention;

[0047] Fig. 9 The figure is a schematic diagram of the structure of the gas well liquid accumulation early warning electronic device based on the neural network model of the present invention. DETAILED DESCRIPTION

[0048] Below, the example embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited by the example embodiments described herein. It should be noted that unless otherwise specifically stated, the relative arrangement of the parts and steps, the numerical expressions and the numerical values ​​set forth in these embodiments do not limit the scope of the present invention.

[0049] Those skilled in the art can understand that the terms "first", "second", S1, S2, etc. in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor represent the necessary logical order between them. It should also be understood that in the embodiments of the present invention, "multiple" can refer to two or more, and "at least one" can refer to one, two or more. It should also be understood that for any component, data or structure mentioned in the embodiments of the present invention, in the absence of explicit limitation or contrary revelation given in the context, it can generally be understood as one or more. In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship. It should also be understood that the description of each embodiment of the present invention emphasizes the differences between the embodiments, and the same or similar parts can refer to each other. For the sake of brevity, they will not be repeated one by one. At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention and its application or use. Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, they should be considered part of the specification. It should be noted that similar reference numerals and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be further discussed in subsequent figures.

[0050] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc. Terminal devices, computer systems, servers, etc. Electronic devices can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, target programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0051] Exemplary Methods

[0052] Figure 1 FIG. 1 is a flow chart of a gas well liquid accumulation early warning method based on a neural network model provided by an exemplary embodiment of the present invention. Figure 1 As shown, the following steps are included:

[0053] Step S1: acquiring real-time data of the gas well, preprocessing the real-time data, performing frequency domain analysis on the preprocessed real-time data to obtain real-time frequency domain features; performing frequency domain normalization processing on the real-time frequency domain features to obtain normalized casing pressure features, oil pressure features, and instantaneous gas volume features, forming a feature vector from the normalized casing pressure features, oil pressure features, and instantaneous gas volume features, and using the feature vector as an input vector to input into a trained neural network model;

[0054] Step S2: The output result of the trained neural network model is used as the output result corresponding to the real-time data, and whether to issue an early warning for liquid accumulation in the gas well is determined based on the output result corresponding to the real-time data.

[0055] Furthermore, if Figure 2As shown, the neural network model includes an input layer, an LSTM model, a CNN network model, a fully connected layer and an output layer connected in sequence; the input layer receives the input vector and inputs the input vector into the LSTM model, the LSTM model generates a first feature with time dependency information based on the input vector, and inputs the first feature into the CNN network model and the fully connected layer respectively, the CNN network model extracts the spatial feature in the first feature as the second feature, and inputs the second feature into the fully connected layer; the fully connected layer extracts the third feature based on the first feature and the second feature, and the output layer outputs the classification result based on the third feature as the output result of the neural network model.

[0056] The output layer is a binary classification model or a multi-classification model. When the output layer is a binary classification model, the output layer outputs the probability of effusion occurrence; when the output layer is a multi-classification model, the output layer outputs the probability distribution of the effusion level.

[0057] like Figure 3 As shown, the preprocessing includes:

[0058] Obtain the data to be preprocessed, remove outliers, and process missing values; normalize and smooth the processed data.

[0059] The methods for identifying outliers include the Z-score method and the box plot method; the methods for processing missing values ​​include the linear interpolation method, the moving average method and the data elimination method.

[0060] Gas well data may contain noise or abnormal data points due to various external factors. These abnormal points usually do not conform to the normal production mode of the gas well and may be caused by sensor failure, data transmission problems or abnormal operation. In the data processing stage, anomaly detection algorithms (such as Z-score, box plot method or LOF local anomaly factor method) are used to identify and remove abnormal points in the data to ensure data stability.

[0061] Z-score method: Calculate the Z-score of each data point. Data points that exceed the set threshold will be considered outliers and removed.

[0062] Box plot method: outliers are identified based on the quartiles (Q1, Q3) of the data, and data that exceeds 1.5 times the interquartile range (IQR) are considered outliers and removed.

[0063] Due to failures in the acquisition process or data transmission problems, there may be missing values ​​in the real-time data of the gas well. In order not to affect the training and prediction of the model, a variety of missing value processing methods are used according to different situations:

[0064] Linear interpolation method: For missing values ​​in a short period of time, linear interpolation is used to estimate and fill in the missing values ​​through the previous and next data points to ensure the continuity of the time series data.

[0065] Moving average method: For missing values ​​with a long time span, the moving average method is used to fill in the missing values ​​based on the average value of several previous and subsequent observation points.

[0066] Data elimination: When missing values ​​occupy a large part of the entire time series data, eliminate this segment of data to avoid affecting the model training process.

[0067] The data characteristics of gas wells (such as casing pressure, oil pressure, instantaneous gas volume, etc.) have large differences in values. Unprocessed data may cause instability in the model training process. Therefore, the present invention adopts normalization processing to scale the features of different dimensions to the same numerical range, thereby improving the convergence speed and prediction effect of the model.

[0068] Min-Max normalization: Scale the data to between [0, 1] to ensure that all eigenvalues ​​are on a uniform scale and reduce the impact between features.

[0069]

[0070] Z-Score standardization: For normally distributed data, the data is standardized according to its mean to ensure that the distribution of features has the same mean and variance, which is suitable for the model to effectively learn time series data.

[0071]

[0072] In order to eliminate short-term fluctuations in gas well production data, data smoothing technology is used to reduce noise in time series data and retain the long-term trend of the data. The smoothing method used in the present invention includes:

[0073] Sliding average: By taking the average of data points at multiple consecutive moments, the impact of short-term fluctuations is reduced and the smoothness of the data is enhanced.

[0074] Exponential smoothing: Assign lower weights to more distant historical data and higher weights to more recent data to further remove noise and improve the stability of the model.

[0075] Further, the preprocessed data is subjected to frequency domain analysis to obtain frequency domain features corresponding to the data, wherein the data is real-time data or training sample data, including:

[0076] Determine the amplitudes corresponding to the casing pressure, oil pressure and instantaneous gas volume from the pre-processed data, determine the dominant frequencies corresponding to the casing pressure, oil pressure and instantaneous gas volume, and determine the casing pressure frequency domain characteristics, oil pressure frequency domain characteristics and instantaneous gas volume frequency domain characteristics related to liquid accumulation in the gas well based on the dominant frequencies corresponding to the casing pressure, oil pressure and instantaneous gas volume and the periodic fluctuation characteristics of the gas well; the casing pressure frequency domain characteristics, oil pressure frequency domain characteristics and instantaneous gas volume frequency domain characteristics are collectively referred to as frequency domain characteristics;

[0077] The sleeve pressure frequency domain characteristic is denoted as F tub (f)

[0078]

[0079] Among them, n is the time, N is the total number of sample points, P tub (n) is the casing pressure data at the nth moment, j is the imaginary part, α is the weight related to the casing pressure change rate, is the peak change rate of casing pressure, β is the first weight related to the amplitude feature, A tub (f) is the casing pressure amplitude at frequency f;

[0080] The oil pressure frequency domain characteristic is denoted as F oil (f)

[0081]

[0082] Among them, P oil (n) is the oil pressure data at the nth moment, γ is the weight related to the oil pressure change amplitude,

[0083] P oil (t stable ) is the stable value of oil pressure, P oil (t peak ) is the peak value of oil pressure, δ is the second weight related to the amplitude feature, A oil (f) is the oil pressure amplitude at frequency f;

[0084] The frequency domain characteristic of instantaneous air volume is recorded as F gas (f)

[0085]

[0086] Among them, Q gas (n) is the instantaneous gas volume data at the nth moment, and η is the weight related to the gas volume change rate;

[0087] is the maximum rate of change of gas volume, ζ is the third weight related to the amplitude feature, A gas (f) is the instantaneous air volume amplitude at frequency f.

[0088] Further, the frequency domain features corresponding to the data are subjected to frequency domain normalization processing; and the casing pressure features, oil pressure features, and instantaneous gas volume features after normalization processing are obtained, wherein the data are real-time data or training sample data, wherein:

[0089] The normalization formula is:

[0090]

[0091] Among them, f norm is the normalized feature. When the object to be normalized is oil pressure, the normalized feature is the normalized oil pressure feature. When the object to be normalized is casing pressure, the normalized feature is the normalized casing pressure feature. When the object to be normalized is instantaneous gas volume, the normalized feature is the normalized instantaneous gas volume feature. 井 is the dominant frequency of the gas well, f ref is the frequency domain feature corresponding to the object to be normalized, and the object to be normalized is oil pressure, casing pressure, and instantaneous gas volume.

[0092] The preprocessed data of the present invention is time domain data. In order to process the frequency differences of different gas wells in the liquid accumulation stage, the fast Fourier transform (FFT) is used to convert the time domain data to the frequency domain data, and then identify and process different frequency components. For each data (such as casing pressure, oil pressure, instantaneous gas volume), it is converted to the frequency domain through FFT. The output of FFT is the amplitude and phase corresponding to each frequency. The fluctuations of different frequencies are identified, so as to find the main frequency components of the liquid accumulation characteristics.

[0093] Through the FFT results, find the frequencies with large amplitudes in the frequency spectrum, which usually correspond to the periodic fluctuations of the gas well. Extract the frequency distribution of different samples to facilitate subsequent feature processing. For example: analyze the amplitude of each frequency component in the spectrum and find the corresponding dominant frequency (for example, the frequency corresponding to a 2-hour or 3-hour period). Record the dominant frequency of each sample to distinguish the differences between different samples in the liquid accumulation stage.

[0094] In order to unify the frequency characteristics of different gas wells, the frequency domain characteristics are normalized. Normalization is performed on the dominant frequency. The period differences between different wells are eliminated by scaling the dominant frequencies of different gas wells relative to the standard reference frequency. For example, a reference frequency (such as a 2-hour period) is selected, and the dominant frequency of each well is normalized relative to the reference frequency. For example, for a well with a 3-hour period, the frequency normalization coefficient is The normalized frequency features are used as one of the features input into the machine learning model to help better distinguish the characteristics of different effusion stages.

[0095] The frequency domain features are combined with the time domain features to form an output vector. The frequency domain features (such as the dominant frequency and corresponding amplitude) are combined with the time domain features (such as the normalized data of pressure) as the input of the neural network model. This combination can better capture the low-frequency characteristics of the gas well liquid accumulation process. For example: the frequency domain features such as the dominant frequency and amplitude are used as new features and input into the model together with the original time domain features (such as pressure fluctuations). Subsequently, the comprehensive pattern of time domain and frequency domain features is learned through machine learning models (such as LSTM) to improve the accuracy of liquid accumulation identification.

[0096] This frequency domain processing method effectively handles the frequency differences of different wells at different liquid accumulation stages, allowing the model to better identify the characteristics of gas well liquid accumulation. This method not only retains the fluctuation characteristics of the time domain, but also enhances the processing of frequency characteristics, which is suitable for the complex production environment of gas wells.

[0097] In the present invention, the construction of the neural network model is based on the extraction and fusion of two types of features, namely the combination of frequency domain features and time domain features, and the dynamic changes of time dependence and frequency characteristics in the process of gas well liquid accumulation are captured through a multi-layer neural network. The architecture of the neural network model can adapt to different classification tasks, including binary classification (whether liquid accumulation occurs) and multi-classification (liquid accumulation degree 0-4), and can efficiently predict real-time data.

[0098] Input layer: The model receives time domain and frequency domain features as input. These features include pressure fluctuations, dominant frequencies, and amplitudes of gas wells.

[0099] LSTM network layer: The first part of the model is the long short-term memory network (LSTM), which is used to process the time dependencies in time series data. The LSTM layer can extract long-term correlations in gas well production data, such as the trend of pressure changes over time. This layer can contain multiple LSTM units to enhance the model's ability to capture long-term trends. The network can be 1 layer or multiple layers.

[0100] CNN convolutional network layer: The output of the LSTM layer is passed to a convolutional neural network (CNN) to process frequency domain features. The CNN layer extracts spatial features from the gas well data, especially pressure fluctuations in different frequency bands, thereby capturing changes in frequency features during the liquid accumulation process. The network can be 1 layer or multiple layers.

[0101] Fully connected layer: The outputs of the LSTM and CNN network layers are combined and passed to the fully connected layer to further compress and extract features for classification prediction.

[0102] Output layer:

[0103] Binary classification model: used to predict whether liquid accumulation occurs in a gas well. The output layer contains 1 node, and uses the Sigmoid activation function to output the probability of liquid accumulation.

[0104] Multi-classification model: used to predict the degree of effusion (0-4). The output layer contains 5 nodes and uses the Softmax activation function to output the probability distribution of each effusion level.

[0105] Another implementation of the neural network model of the present invention is as follows.

[0106] Model structure: The neural network model includes two types of network models. The first type is the LSTM network, which is used to extract long-term dependent features in time series data. The second type is the CNN network, which is responsible for extracting local patterns from time series or frequency domain features such as instantaneous gas volume, oil pressure, and casing pressure, capturing the characteristics of short-term pressure and flow fluctuations, and identifying the correlation between frequencies.

[0107] Input layer: The normalized time series data (casing pressure, oil pressure, instantaneous gas volume, etc.) is input into the LSTM network for feature extraction.

[0108] Convolutional layer: After the LSTM network, a CNN convolutional layer is added to further extract the characteristics of instantaneous gas volume, oil pressure, and casing pressure fluctuations.

[0109] Output layer: The final output layer is a fully connected layer that outputs the predicted effusion risk value.

[0110] like Figure 4-Figure 5 As shown, the training process of the neural network model is:

[0111] Acquire an input vector corresponding to the training sample data based on the training sample data;

[0112] Freeze the CNN network model, the output of the LSTM model is directly input into the fully connected layer instead of the CNN network model, the output of the CNN network model is not input into the fully connected layer, that is, the CNN network model does not participate in training; train the neural network model based on the input vector corresponding to the training sample data, and obtain a trained neural network model as the first neural network model;

[0113] In the first neural network model, the LSTM model is frozen, the output of the input layer is directly input into the CNN network model, the output of the input layer is not input into the LSTM model, and the output of the LSTM model is not input into the fully connected layer, that is, the LSTM model does not participate in training, and the first neural network model is trained based on the input vector corresponding to the training sample data to obtain the trained first neural network model as the second neural network model;

[0114] In the second neural network model, the LSTM model is unfrozen, that is, the input layer receives the input vector and inputs the input vector into the LSTM model, the LSTM model generates a first feature with time dependency information based on the input vector, the first feature is input into the CNN network model and the fully connected layer respectively, the CNN network model extracts the spatial feature in the first feature as the second feature, and the second feature is input into the fully connected layer; the second neural network model is trained based on the input vector corresponding to the training sample data to obtain a trained second neural network model as a trained neural network model.

[0115] In the present invention, the training process is: using the labeled data set, using the Adam optimizer and the cross entropy loss function for training. The model training is divided into three stages:

[0116] 1: Training LSTM part

[0117] At this stage, only the LSTM part is trained, while the weights of the CNN layer are frozen (i.e., the parameters of the CNN layer are not updated). This allows the model to focus on learning the long-term dependencies of time series data and ensures that the LSTM layer can effectively capture the temporal pattern of the input data.

[0118] 2: Training CNN part

[0119] After the weights of the LSTM layer are fixed, the CNN part is unfrozen and the CNN layer training begins. At this stage, the weights of the LSTM layer remain unchanged, and the model focuses on extracting local patterns of features through convolution operations, such as local changes in gas volume, oil pressure, and casing pressure in the short term.

[0120] 3: Joint fine-tuning

[0121] Finally, after both LSTM and CNN are trained separately, all layers are unfrozen and the whole model is fine-tuned jointly. Through this fine-tuning, parameters are adjusted in the entire model architecture so that the features between LSTM and CNN layers can be better combined, improving the final effusion prediction effect.

[0122] In the present invention, the training of the machine learning model uses data processed by feature engineering, including multi-dimensional features in the time domain and frequency domain, and divides the data into a training set and a test set. An optimization algorithm is used to adjust parameters, and multiple techniques are used to prevent overfitting.

[0123] Dataset division:

[0124] The data set is divided into a training set and a test set, with a ratio of 80% training set and 20% test set to ensure the effectiveness of the training results.

[0125] Loss function:

[0126] For the binary classification model, the binary crossentropy loss function was used for training to evaluate the accuracy of the model in predicting the occurrence of effusion.

[0127] For the multi-classification model, a categorical crossentropy loss function was used to optimize the classification performance of the model under different degrees of effusion.

[0128] Optimization algorithm:

[0129] The Adam optimizer was used with an initial learning rate of 0.001, which was gradually increased to 0.1 for different training samples, and the parameters with the best results were selected.

[0130] Batch size and training rounds:

[0131] The batch size is set to 64 samples. The batch size controls the number of samples for each gradient update of the model. A larger batch size helps the stability of training.

[0132] The number of training rounds was set to 100 to 200 rounds. During the training process, the loss changes of the validation set were monitored, and the early stopping mechanism was used to avoid overfitting.

[0133] Hyperparameter Tuning:

[0134] During the training process, the model hyperparameters were adjusted through grid search and cross-validation, especially the number of LSTM units (32, 64, 128) and CNN convolution kernel size (3x3, 5x5).

[0135] Use cross-validation to make the model generalize across different datasets.

[0136] Model Evaluation:

[0137] The performance evaluation of the model includes indicators such as accuracy, F1 value, and AUC to ensure the model's prediction accuracy for effusion phenomena.

[0138] For multi-classification problems, the confusion matrix was used to evaluate the model's ability to distinguish between different levels of effusion.

[0139] like Figure 6 As shown, the system is connected to the real-time production data of the gas well, especially the time series data of casing pressure, oil pressure and instantaneous gas volume.

[0140] Data source integration:

[0141] The system is connected to the gas well production monitoring system (SCADA) to obtain real-time data streams, including key parameters such as casing pressure, oil pressure, and instantaneous gas volume.

[0142] Use a data interface (API) or database connection to ensure real-time access to time series data for gas wells.

[0143] Data frequency and updating:

[0144] Determine the frequency of data collection, such as collecting pressure and instantaneous gas volume data every 5 minutes or 10 minutes.

[0145] The system automatically updates and caches the latest real-time data for use in subsequent prediction models.

[0146] The method of the present invention for distinguishing and warning of fluid accumulation is as follows.

[0147] A pre-trained machine learning model is loaded to analyze real-time data. When the model detects the characteristics of early effusion, the system will issue a warning signal to prompt operators to take timely intervention measures to avoid a drop in production capacity.

[0148] Process real-time data. Process data that exceeds the length of the sample time window (at least twice the length). For the acquired real-time data, first perform frequency domain analysis, perform fast Fourier transform (FFT) on the data, analyze its frequency characteristics, and detect whether the data has obvious frequency domain characteristics. If the frequency domain analysis results show that there is a significant main frequency (that is, the amplitude of a certain frequency is significantly greater than other frequencies), continue processing.

[0149] If there is a dominant frequency, the frequency is compared with the frequency of the sample data. The real-time data is adjusted to be consistent with the frequency of the sample data by scaling the time axis. In this way, the model can receive data with the same frequency characteristics as when it was trained.

[0150] Effusion prediction model input:

[0151] The processed real-time data is input into the trained machine learning model (LSTM + CNN, Informer, etc.). The model will determine whether there is a risk of effusion based on the received time domain and frequency domain features.

[0152] If a multi-classification model is used, the output is the degree of effusion (0-4), indicating the severity of the effusion; if a binary classification model is used, the output is the probability of effusion occurring.

[0153] Identification and classification of effusion:

[0154] Single classification mode: The model predicts the probability of effusion based on real-time data. If the probability is greater than the set threshold (for example, 0.5), it is considered that effusion has occurred.

[0155] Multi-classification mode: The model predicts the degree of effusion based on different output nodes (0 means no effusion, 4 means severe effusion). By distinguishing different levels of effusion, the system can take corresponding measures for different effusion situations.

[0156] Effusion risk assessment:

[0157] Based on the effusion risk value output by the model, the system further evaluates the changing trend of effusion risk. By continuously monitoring the effusion risk value, the acceleration or deceleration process of effusion can be captured, thereby determining whether the effusion risk is increasing or stable.

[0158] If the risk of effusion continues to rise, the system will further increase the severity level of the warning.

[0159] Warning Notice:

[0160] Once the risk of liquid accumulation is detected to exceed the warning threshold, the system notifies the operator through a visual interface, SMS or email. The warning information includes the probability or degree of liquid accumulation, the real-time data trend of the gas well, and the recommended intervention measures.

[0161] The early warning system can set up a multi-level notification mechanism. For example, low-risk warnings are displayed through a visual interface, and high-risk warnings are instantly notified to relevant persons in charge via text messages or emails.

[0162] The time series data marking and feature extraction of the present invention are based on the fact that the casing pressure and flow pressure data of the gas well show specific low-frequency fluctuation patterns in different production stages. These fluctuations are highly correlated with the phenomenon of liquid accumulation. By marking the historical data, the features related to liquid accumulation are extracted, and these features will be used as training data for the machine learning model. The training of the machine learning model of the present invention uses the marked time series data to train the machine learning model (such as LSTM, Informer, etc.) so that the model can learn the relationship between gas well pressure fluctuations and liquid accumulation, and finally identify the characteristics of early liquid accumulation. Real-time data access and analysis of the present invention: The system accesses the real-time production data of the gas well, especially the time series data of casing pressure and flow pressure. The liquid accumulation discrimination and early warning of the present invention analyzes the real-time data through the pre-trained machine learning model to determine whether there are signs of liquid accumulation. When the model detects the characteristics of early liquid accumulation, the system will issue a warning signal to prompt the operator to take intervention measures in time to avoid a decrease in production capacity.

[0163] like Figure 7 As shown, the present invention provides a specific embodiment of a gas well liquid accumulation early warning method based on a neural network model.

[0164] First, data preprocessing is performed, including the following steps.

[0165] Outlier removal: Use the Z-score method and box plot method to identify and remove outliers in the data to ensure data stability.

[0166] Missing value processing: Various missing value processing methods are used according to different situations.

[0167] Data smoothing: Eliminate short-term fluctuations in gas well production data.

[0168] Data normalization: scaling data of different ranges to the same numerical range.

[0169] Time and frequency domain processing: The sample data is converted to the frequency domain through FFT, the frequency distribution of different samples is extracted, and it is scaled relative to the standard reference frequency to eliminate the period differences between different wells.

[0170] The neural network model includes the following structure.

[0171] Input layer: The input data is time series data (such as instantaneous gas volume, oil pressure, casing pressure, etc.), and the input is provided in the form of time steps and number of features. The data input enters the LSTM part.

[0172] LSTM network: Use a single-layer or multi-layer LSTM structure and use a Dropout layer to prevent overfitting.

[0173] CNN network: After the LSTM output, use a single or multi-layer CNN to extract local features from the temporal features, adding a pooling layer after each CNN layer or only adding a pooling layer at the end.

[0174] Fully connected layer: The features passed through the LSTM and CNN layers are finally passed to the fully connected layer. This layer linearly combines different features and prepares for output.

[0175] Output layer: This layer generates the final prediction result. Depending on the task, the output layer has different number of nodes and activation functions:

[0176] For binary classification problems, you can use 1 node with the sigmoid activation function.

[0177] Multi-classification problems require multiple nodes with a softmax activation function.

[0178] The training process of the neural network model is as follows.

[0179] Sample feature engineering processing: including outlier removal, missing value processing, normalization, adaptive smoothing, and time domain and frequency domain processing.

[0180] Establish a machine learning model (MSNN): including LSTM network to extract temporal features and CNN network to extract spatial features.

[0181] Training model: Use the processed model for training, and adjust and optimize the network structure, training batches, and model parameters.

[0182] Save training results: Select the optimal parameters based on the training and cross-validation results of each batch, and save the model weight parameters.

[0183] Specifically, the first stage: LSTM + fully connected layer

[0184] At this stage, the CNN layers are frozen and only the LSTM layers and fully connected layers are trained. The LSTM layers focus on learning the temporal dependencies in time series data. After the features are extracted by the LSTM, they are passed to the fully connected layers for output prediction.

[0185] process:

[0186] Input data goes into the LSTM layer.

[0187] The LSTM layer outputs time series features.

[0188] These features are passed to the fully connected layer for final classification or regression output.

[0189] The CNN layers are frozen at this stage and do not participate in training.

[0190] Second stage: CNN + fully connected layer

[0191] Freeze the LSTM layer and only train the CNN layer and the fully connected layer. At this point, the weights of the LSTM layer remain fixed, and the CNN part begins to learn the local patterns (such as frequency features or local fluctuations) in the time series features extracted by the LSTM layer and generates outputs through the fully connected layer.

[0192] process:

[0193] The input data passes through the LSTM layer (but the LSTM layer weights are frozen).

[0194] The output of the LSTM layer is passed to the CNN layer, which starts to extract local features.

[0195] The output of the CNN layer is passed to the fully connected layer for output prediction.

[0196] The LSTM layer is frozen at this stage and does not participate in training.

[0197] Stage 3: LSTM + CNN + fully connected layer (joint fine-tuning)

[0198] Unfreeze all layers and perform joint fine-tuning of LSTM, CNN, and fully connected layers. At this point, the entire network is trained as a whole, and the weights of all layers are updated to ensure that the temporal features extracted by the LSTM layer and the local features extracted by the CNN layer can work better together.

[0199] process:

[0200] The input data first passes through the LSTM layer to capture the temporal dependencies.

[0201] The output of the LSTM layer is passed to the CNN layer, which extracts local patterns or frequency domain features.

[0202] The output of the CNN layer is passed to the fully connected layer for final prediction.

[0203] The weights of all layers (LSTM, CNN, fully connected layers) are updated.

[0204] The prediction process of the present invention is as follows.

[0205] Obtain real-time data: Obtain real-time data such as gas well casing pressure, oil pressure, instantaneous gas volume, etc. through the SCADA system.

[0206] Feature engineering processing: including outlier removal, missing value processing, normalization and adaptive smoothing. Frequency domain processing, based on the processing results, automatically selects data of a specific length and processes it to the length of the time window.

[0207] Load training results: Use the machine learning model built during training and load the saved model parameters.

[0208] Predict effusion and early warning: Output early warning signals based on the trained model effusion risk value and the rate of change of effusion risk.

[0209] The present invention performs the following operations.

[0210] 1. Load model training results

[0211] Before reading real-time data, the system will load the trained model for subsequent effusion prediction tasks. This step is to ensure that the system uses the trained model for real-time prediction.

[0212] 2. Read real-time data

[0213] Read real-time production data from the gas well monitoring system (such as SCADA system), such as instantaneous gas volume, oil pressure, casing pressure, etc. These data serve as input for model prediction.

[0214] 3. Data feature engineering processing

[0215] Process the data read in real time to ensure data quality and consistency so that the model can make predictions. This step includes multiple data preprocessing and feature extraction operations:

[0216] Outlier removal: Remove outliers from data.

[0217] Missing value processing: Process missing values ​​in the data and restore missing data points through interpolation, filling, etc.

[0218] Data smoothing: Smooth the data, reduce noise, and ensure the continuity and smoothness of the data to improve the stability of model predictions.

[0219] Data normalization: Normalize the data to eliminate the dimensional differences between different features and ensure that the input range of the model is consistent.

[0220] Frequency domain processing: Perform frequency domain analysis on the data to extract frequency features and time series features to enhance the model's ability to recognize effusion characteristics.

[0221] 4. Predicting effusion

[0222] After data processing, the real-time data is input into the loaded model to predict the risk of effusion. The model outputs the relevant indicators of effusion.

[0223] Probability and degree of effusion

[0224] Liquid accumulation probability: If the model is trained based on samples of whether liquid is accumulated or not, the model predicts the probability of liquid accumulation in the gas well, indicating the possibility that the gas well may currently be in a liquid accumulation state.

[0225] Effusion severity: If the model is trained based on samples of effusion severity, output the severity of the effusion (e.g., 0 to 4).

[0226] 5. Warning signal output

[0227] According to the probability and degree of effusion, if the risk of effusion reaches a certain threshold, the system will send out an early warning signal and notify the operator to take appropriate intervention measures.

[0228] The neural network model of the present invention combines the long short-term memory network (LSTM) and the convolutional neural network (CNN), which can effectively capture the complex time series characteristics and local characteristics of the gas well liquid accumulation process. The LSTM part is used to process the short-term and long-term dependencies of real-time gas well data (such as instantaneous gas volume, oil pressure, and casing pressure), while the CNN part further captures the key features in the gas well pressure fluctuation by extracting the local patterns of these data. In particular, through frequency domain analysis, CNN can extract frequency characteristics of different time periods and improve the sensitivity to the occurrence of liquid accumulation. It can increase the accuracy of early identification of liquid accumulation to more than 90% and reduce the false alarm rate in liquid accumulation detection.

[0229] Exemplary Devices

[0230] Figure 8 FIG. 1 is a schematic diagram of a gas well liquid accumulation early warning device based on a neural network model provided by an exemplary embodiment of the present invention. Figure 8 As shown, this embodiment includes:

[0231] Feature vector generation module: configured to obtain real-time data of gas wells, preprocess the real-time data, perform frequency domain analysis on the preprocessed real-time data to obtain real-time frequency domain features; perform frequency domain normalization on the real-time frequency domain features to obtain normalized casing pressure features, oil pressure features, and instantaneous gas volume features, form a feature vector from the normalized casing pressure features, oil pressure features, and instantaneous gas volume features, and use the feature vector as an input vector to input into the trained neural network model;

[0232] Early warning module: configured to use the output result of the trained neural network model as the output result corresponding to the real-time data, and determine whether to issue an early warning for liquid accumulation in the gas well based on the output result corresponding to the real-time data.

[0233] In a specific embodiment of the present invention, the device comprises:

[0234] Data access module: a data acquisition module that reads parameters such as casing pressure, oil pressure, and instantaneous gas volume from the existing gas well real-time monitoring platform.

[0235] Data processing module: performs feature engineering processing on the real-time data samples received.

[0236] Neural network module: neural network model, training of neural network model, and saving of training results.

[0237] Effusion identification and warning module: Use the trained neural network to make predictions based on the real-time data received. After the neural network determines the risk of effusion, it will issue a warning signal to prompt the operator.

[0238] Exemplary Electronic Devices

[0239] Fig. 9 This is the structure of an electronic device 90 provided by an exemplary embodiment of the present invention. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them. Fig. 9 FIG. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure. Fig. 9 As shown, the electronic device includes one or more processors 91 and memory 92 .

[0240] The processor 91 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0241] The memory 92 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 91 may run the program instructions to implement the methods of the software programs of the various embodiments of the present disclosure described above and / or other desired functions. In one example, the electronic device may also include: an input device 93 and an output device 94, which are interconnected through a bus system and / or other forms of connection mechanisms (not shown). In addition, the input device 93 may also include, for example, a keyboard, a mouse, etc. The output device 94 may output various information to the outside. The output device 94 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0242] Of course, to simplify, Fig. 9 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.

[0243] Exemplary computer program products and computer-readable storage media

[0244] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.

[0245] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0246] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.

[0247] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0248] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0249] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0250] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0251] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0252] It should also be noted that in the apparatus, equipment and method of the present disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present disclosure. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present disclosure. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown here, but to the widest scope consistent with the principles and novel features disclosed herein.

[0253] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A gas well liquid accumulation early warning method based on a neural network model, characterized in that: The method comprises the following steps: Step S1: acquiring real-time data of a gas well, preprocessing the real-time data, and performing frequency domain analysis on the preprocessed real-time data to obtain real-time frequency domain features; Performing frequency domain normalization processing on the real-time frequency domain features to obtain normalized casing pressure features, oil pressure features, and instantaneous gas volume features, forming a feature vector from the normalized casing pressure features, oil pressure features, and instantaneous gas volume features, and using the feature vector as an input vector to input into a trained neural network model; Step S2: The output result of the trained neural network model is used as the output result corresponding to the real-time data, and whether to issue an early warning for liquid accumulation in the gas well is determined based on the output result corresponding to the real-time data.

2. The method according to claim 1, characterized in that The neural network model includes an input layer, an LSTM model, a CNN network model, a fully connected layer and an output layer connected in sequence; the input layer receives the input vector and inputs the input vector into the LSTM model, the LSTM model generates a first feature with time dependency information based on the input vector, and inputs the first feature into the CNN network model and the fully connected layer respectively, the CNN network model extracts the spatial feature in the first feature as the second feature, and inputs the second feature into the fully connected layer; the fully connected layer extracts the third feature based on the first feature and the second feature, and the output layer outputs the classification result based on the third feature as the output result of the neural network model.

3. The method according to claim 1, characterized in that Perform frequency domain analysis on the preprocessed data to obtain frequency domain features corresponding to the data, wherein the data is real-time data or training sample data, including: Determine the amplitudes corresponding to the casing pressure, oil pressure and instantaneous gas volume from the pre-processed data, determine the dominant frequencies corresponding to the casing pressure, oil pressure and instantaneous gas volume, and determine the casing pressure frequency domain characteristics, oil pressure frequency domain characteristics and instantaneous gas volume frequency domain characteristics related to liquid accumulation in the gas well based on the dominant frequencies corresponding to the casing pressure, oil pressure and instantaneous gas volume and the periodic fluctuation characteristics of the gas well; the casing pressure frequency domain characteristics, oil pressure frequency domain characteristics and instantaneous gas volume frequency domain characteristics are collectively referred to as frequency domain characteristics; The sleeve pressure frequency domain characteristic is recorded as , , Among them, n is the time, N is the total number of sample points, P tub (n) is the casing pressure data at the nth moment, j is the imaginary part, α is the weight related to the casing pressure change rate, is the peak change rate of casing pressure, β is the first weight related to the amplitude feature, A tub (f) is the casing pressure amplitude at frequency f; The oil pressure frequency domain characteristic is denoted as F oil (f) , Among them, P oil (n) is the oil pressure data at the nth moment, γ is the weight related to the oil pressure change amplitude, P oil (t stable ) is the stable value of oil pressure, P oil (t peak ) is the peak value of oil pressure, δ is the second weight related to the amplitude feature, A oil (f) is the oil pressure amplitude at frequency f; The frequency domain characteristic of instantaneous gas volume is recorded as F gas (f) , Among them, Q gas (n) is the instantaneous gas volume data at the nth moment, and η is the weight related to the gas volume change rate; is the maximum rate of change of gas volume, ζ is the third weight related to the amplitude feature, A gas (f) is the instantaneous air volume amplitude at frequency f.

4. The method according to claim 3, characterized in that Perform frequency domain normalization processing on the frequency domain features corresponding to the data; obtain the normalized casing pressure features, oil pressure features, and instantaneous gas volume features, wherein the data is real-time data or training sample data, wherein: The normalization formula is: , Among them, f norm is the normalized feature. When the object to be normalized is oil pressure, the normalized feature is the normalized oil pressure feature. When the object to be normalized is casing pressure, the normalized feature is the normalized casing pressure feature. When the object to be normalized is instantaneous gas volume, the normalized feature is the normalized instantaneous gas volume feature. 井 is the dominant frequency of the gas well, f ref is the frequency domain feature corresponding to the object to be normalized, and the object to be normalized is oil pressure, casing pressure, and instantaneous gas volume.

5. The method according to claim 2, characterized in that The training process of the neural network model is: Acquire an input vector corresponding to the training sample data based on the training sample data; Freeze the CNN network model, the output of the LSTM model is directly input into the fully connected layer instead of the CNN network model, the output of the CNN network model is not input into the fully connected layer, that is, the CNN network model does not participate in training; train the neural network model based on the input vector corresponding to the training sample data, and obtain a trained neural network model as the first neural network model; In the first neural network model, the LSTM model is frozen, the output of the input layer is directly input into the CNN network model, the output of the input layer is not input into the LSTM model, and the output of the LSTM model is not input into the fully connected layer, that is, the LSTM model does not participate in training, and the first neural network model is trained based on the input vector corresponding to the training sample data to obtain the trained first neural network model as the second neural network model; In the second neural network model, the LSTM model is unfrozen, that is, the input layer receives the input vector and inputs the input vector into the LSTM model, the LSTM model generates a first feature with time dependency information based on the input vector, the first feature is input into the CNN network model and the fully connected layer respectively, the CNN network model extracts the spatial feature in the first feature as the second feature, and the second feature is input into the fully connected layer; The second neural network model is trained based on the input vector corresponding to the training sample data to obtain a trained second neural network model as a trained neural network model.

6. A gas well liquid accumulation early warning device based on a neural network model, characterized in that: The device comprises: Feature vector generation module: configured to obtain real-time data of gas wells, preprocess the real-time data, perform frequency domain analysis on the preprocessed real-time data to obtain real-time frequency domain features; perform frequency domain normalization on the real-time frequency domain features to obtain normalized casing pressure features, oil pressure features, and instantaneous gas volume features, form a feature vector from the normalized casing pressure features, oil pressure features, and instantaneous gas volume features, and use the feature vector as an input vector to input into the trained neural network model; Early warning module: configured to use the output result of the trained neural network model as the output result corresponding to the real-time data, and determine whether to issue an early warning for liquid accumulation in the gas well based on the output result corresponding to the real-time data.

7. A computer-readable storage medium, characterized in that: The storage medium stores a plurality of instructions; the plurality of instructions are used for a processor to load and execute the method as described in any one of claims 1 to 5.

8. An electronic device, characterized in that: The electronic device comprises: A processor, which is used to execute multiple instructions; A memory for storing a plurality of instructions; The plurality of instructions are used to be stored in the memory and loaded and executed by the processor according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Fracturing sand blockage early warning method based on long-short-term memory neural network

    CN110533163A

  • Gas well effusion diagnosis method based on neural network

    CN115186739A

  • Gas well liquid accumulation early warning method, system and equipment and storage medium

    CN117828802A

  • Coupling signal identification method, system and device based on multi-modal deep learning and medium

    CN117992816A