Shale gas well middle and later period effusion intelligent diagnosis method based on LSTM and TCN model

By employing an end-to-end intelligent diagnostic method using LSTM and TCN models, combined with multi-source time-series data for multi-scale feature extraction and global dependency modeling, the problem of accurate diagnosis of fluid accumulation in the mid-to-late stages of shale gas wells has been solved. This has enabled efficient and automated identification and early warning of fluid accumulation status, thereby improving the level of gas well production management.

CN120892997APending Publication Date: 2025-11-04CHONGQING OPRO ENERGY TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511279235.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Existing technologies are insufficient for efficient and accurate intelligent diagnosis of fluid accumulation problems in the mid-to-late stages of shale gas wells. Traditional methods rely on human experience or a single deep learning model, which cannot adapt to complex and ever-changing working conditions, leading to missed detections or false alarms of fluid accumulation anomalies. Furthermore, they lack a model adaptive upgrade mechanism.

Method used

An end-to-end intelligent diagnostic method based on LSTM and TCN models is adopted. Combining multi-source production time-series data, multi-scale local feature extraction is performed through temporal convolutional networks and global temporal dependency modeling of long short-term memory networks are performed. The model parameters are dynamically updated to achieve real-time identification and early warning of fluid accumulation status.

Benefits of technology

It enables comprehensive perception and precise analysis of the shale gas well production process, improves the accuracy of liquid accumulation status diagnosis and the sensitivity of anomaly early warning, and has significant advantages such as high degree of automation, accurate diagnosis, strong generalization ability and continuous optimization and upgrading. It reduces manual intervention and maintenance costs, and improves the stability and economy of gas well production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892997A_ABST
    Figure CN120892997A_ABST
Patent Text Reader

Abstract

The invention discloses a shale gas well middle and later period effusion intelligent diagnosis method based on LSTM and TCN models. The method comprises the following steps: S1, collecting and preprocessing multi-source time sequence data, performing sliding window segmentation, and generating a standardized data set; s2, manually marking an effusion starting point, a critical point and a process intervention point, and generating a training sample set with a label; s3, performing multi-layer expansion causal convolution on the time sequence convolutional network, and extracting multi-scale local features; s4, the modeling of the long-short-term memory network is globally dependent, and output diagnosis and early warning are discriminated; and S5, regularly collecting newly added data and diagnosis results, dynamically updating the sample set, and retraining and optimizing the model. According to the method, intelligent, efficient and real-time diagnosis and early warning of the liquid accumulation state in the middle and later periods of the shale gas well are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent monitoring of oil and gas fields, and particularly relates to a middle-late stage liquid loading intelligent diagnosis method for shale gas wells based on an LSTM and a TCN model. BACKGROUND

[0002] At present, with the continuous expansion of shale gas development scale in China, the production cycle of gas wells is gradually extended, and especially in the middle-late stage, the liquid loading problem of gas wells is increasingly prominent. Liquid loading not only reduces the production of gas wells, but also increases the operation and maintenance cost, and even affects the safety of the wellbore and the overall development benefit of the gas field. Therefore, efficient and accurate intelligent diagnosis and early warning of the liquid loading state of shale gas wells has become an important direction of digital and intelligent management of oil and gas fields. The traditional liquid loading diagnosis method mainly relies on artificial experience, single-point monitoring of downhole sensors or simple rule judgment. These methods have multiple limitations: on the one hand, artificial judgment is limited by expert experience and is highly subjective, and cannot realize real-time automatic monitoring of a large number of gas wells; on the other hand, the deployment cost of downhole sensors is high, the maintenance is complex, and the downhole harsh working conditions easily affect the data completeness or distortion, further restricting the wide application of intelligent liquid loading identification. In addition, the existing automatic liquid loading detection means relying on simple statistical analysis or threshold discrimination cannot adapt to complex and variable working conditions and long-term sequence and multi-parameter interaction, and is easy to cause liquid loading abnormality missed detection or false alarm, affecting the scientificity and timeliness of decision-making.

[0003] With the progress of artificial intelligence technology and time series data analysis capability, time series modeling methods based on deep learning are gradually applied to oil and gas well working condition analysis. However, the existing related technologies are mainly based on a single network structure, such as using a recurrent neural network (RNN) or a long short-term memory network (LSTM) to model the production parameters of gas wells, or only using a convolutional neural network (CNN) to extract short-term change features. Such single model often cannot simultaneously consider the local high-order fluctuations and long-term dependencies of time series data, and when facing the multi-scale, nonlinear and multivariate characteristics of actual production data, the model generalization ability is limited. In addition, most of the existing intelligent diagnosis systems lack a model self-adaptive upgrading mechanism, and cannot dynamically optimize the model parameters according to the newly collected production data and diagnosis results, resulting in a gradual decline in diagnosis accuracy and early warning ability under long-term operation, and it is difficult to support the intelligent and continuous application needs of the production site.

[0004] Therefore, how to provide a shale gas well middle-late stage liquid loading intelligent diagnosis method based on an LSTM and a TCN model is a problem that those skilled in the art need to solve. SUMMARY

[0005] One purpose of the present application is to propose an intelligent diagnosis method for late-stage liquid loading in shale gas wells based on LSTM and TCN models, which fully utilizes multi-source production time series data, combines the multi-scale local feature extraction capability of the time series convolution network model and the global time series dependence modeling advantage of the long short-term memory network, innovatively constructs an end-to-end liquid loading intelligent diagnosis process, and covers key links such as data acquisition, preprocessing, sliding window segmentation, sample labeling, deep feature learning, intelligent discrimination, dynamic early warning and model self-adaptive upgrading. Through the deep fusion and self-adaptive training mechanism of the model, the present application accurately identifies and discriminates the liquid loading state in the production process of shale gas wells, realizes real-time early warning and auxiliary decision-making for abnormal working conditions, has the advantages of high automation, accurate diagnosis, strong generalization ability and continuous optimization and upgrading, and improves the intelligent operation and production management level of shale gas wells.

[0006] The intelligent diagnosis method for late-stage liquid loading in shale gas wells based on LSTM and TCN models according to the embodiment of the present application comprises the following steps:

[0007] S1, multi-source time series data in the production process of shale gas wells are collected, the multi-source time series data are preprocessed, the preprocessed multi-source time series data are segmented into fixed-length sequence samples by using a sliding window method, and a standardized time series data set is obtained;

[0008] S2, the standardized time series data set is manually labeled to label liquid loading starting points, liquid loading critical points and process intervention points, and a labeled training sample set is generated;

[0009] S3, a time series convolution network model is constructed, the labeled training sample set is input into the time series convolution network model, multi-scale local feature extraction is performed on the input data by using a multi-layer dilated causal convolution, and local feature expression is obtained;

[0010] S4, the local feature expression is input into a long short-term memory network, global time series dependence modeling is performed, fused time series features are output, the fused time series features are input into a fully connected layer, liquid loading probability or risk level discrimination is completed, corresponding diagnosis results are output, a liquid loading probability threshold is set according to the diagnosis results, corresponding early warning information is generated, and the early warning information is sent to relevant production monitoring and management links;

[0011] S5, new production data and diagnosis results are periodically collected, the labeled training sample set is updated, and the time series convolution network model and the long short-term memory network are periodically retrained and optimized.

[0012] Optionally, the multi-source time series data specifically include wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam displacement, gas lift volume and foam concentration data.

[0013] Optionally, the preprocessing of the multi-source time series data specifically includes missing value interpolation, outlier removal, data normalization, and time series alignment.

[0014] Optionally, the segmentation of the preprocessed multi-source time series data into fixed-length sequence samples by using the sliding window method specifically refers to dividing the continuous time series data into a plurality of data segments with consistent length, mutual overlap, or no overlap according to a preset window length and step, and each segment serving as a fixed-length sequence sample.

[0015] Optionally, S2 specifically includes:

[0016] S21, for each fixed-length sequence sample in the standardized time series data set, the time series changes of the production parameters of wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam displacement, gas lift volume, and foam concentration are analyzed one by one to obtain the pressure change trend and the gas production change trend of each fixed-length sequence sample.

[0017] S22, for each fixed-length sequence sample, the change rate of casing pressure difference and the decline rate of gas production are calculated, and continuous data points with casing pressure difference change rate greater than or equal to 15% per hour and gas production decline rate greater than or equal to 10% per hour are screened out. The continuous data points meeting the two conditions are marked as the starting point of liquid loading, and the initial appearance period of liquid loading phenomenon is clearly pointed out.

[0018] S23, based on the marked liquid loading starting point, combined with the further change trend of wellhead pressure and the cumulative decline amplitude of gas production or liquid production, the liquid loading evolution process is judged, and when the wellhead pressure change appears a significant turning point or the cumulative decline of flow rate exceeds a set threshold, it is marked as a liquid loading critical point.

[0019] S24, according to the actual operation records in the production process, the specific time of the occurrence of foam displacement agent injection, gas lift measure implementation, and foam agent addition artificial intervention behavior corresponding to each fixed-length sequence sample is identified, and is marked as a process intervention point.

[0020] S25, the marked liquid loading starting point, liquid loading critical point, and process intervention point are respectively associated with the corresponding fixed-length sequence sample one by one, and finally a labeled training sample set is generated.

[0021] Optionally, S3 specifically includes:

[0022] S31, each set of standardized fixed-length time series data X={x1, x2,..., x n} in the labeled training sample set is taken as input, and each x i includes wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam displacement, gas lift volume, and foam concentration.

[0023] S32, in each volume layer, a plurality of groups of convolution kernels of different lengths are arranged, and lengths of the groups of convolution kernels are K1, K2,..., K m , respectively, convolution operations are performed in parallel on the same input time series data to obtain initial multi-scale feature representations, wherein m is the number of groups of different convolution kernels arranged in parallel in each volume layer;

[0024] S33, for the initial multi-scale feature representations, the inflation coefficients d l,j and weight parameters of the corresponding group of convolution kernels are initialized in combination with the change rate, local statistical features and historical prediction errors of the current input data;

[0025] S34, during the convolution operation, for each group of convolution kernels and each time step t, the inflation coefficient d l,j (t) and the time step weight γ l,j,s (t) are dynamically generated according to the change trend and statistical characteristics of the current input feature, and the input data is subjected to weighted convolution operation to obtain the output feature y l,j,t of the jth group of convolution kernels of the lth layer at time t;

[0026] S35, the output features y l,j,t obtained by all groups of convolution kernels are spliced in the channel dimension to form multi-scale dynamic feature representations;

[0027] S36, after the output of each volume layer, a dynamic gated residual connection structure is used to perform element-wise weighted fusion of the standardized fixed-length time series data of each group of convolution layers and the multi-scale dynamic feature representations and the weight vector generated by the input feature through the gating function g l (input l ) to obtain the residual connection output z l ;

[0028] S37, the ReLU activation function is applied to the residual connection output z l to enhance the nonlinear feature expression capability, and the Dropout operation is applied to reduce the overfitting risk to obtain the output feature of the current convolution layer;

[0029] S38, the obtained output feature of the current convolution layer is taken as the input of the next convolution layer, and the above multi-scale convolution, dynamic adaptation, gated residual connection and activation regularization structure are stacked in sequence until the forward calculation of all convolution layers is completed, and finally the local feature expression F of each input sample is obtained.

[0030] Optionally, the S4 specifically comprises:

[0031] S41, the local feature expression F = {f1, f2,..., f nAs an input sequence, input to a long short-term memory network, each f i is a multi-dimensional feature vector output by the time convolutional network;

[0032] S42, at each time, the input gate, the forget gate and the output gate signal are calculated using a multi-branch gating structure, each gating signal Not only based on the previous hidden state and the current input feature, but also introduce an auxiliary branch based on the local statistical characteristics of the current input, and get it by weighted fusion of the main branch and the auxiliary branch;

[0033] S43, under the action of the gating signal, the hidden state and the memory cell state of the previous moment and the candidate memory state of the current moment are fused and updated, and at each moment, the hidden state and the memory cell state are subjected to dimension reduction linear transformation by the state compression layer, only the most important information component is retained, and the reduced hidden state and memory cell state are transmitted to the next moment;

[0034] S44, the confidence of the gating signal and the change amplitude of the hidden state of each moment are calculated, if the confidence is lower than the preset threshold and the state change is less than the threshold, the part of the time step calculation is dynamically pruned, only the main information is transmitted, and the time step pruning is realized;

[0035] S45, the hidden state h ′ 1,h ′ 2,...,h ′ n are aggregated to form the time sequence fusion feature H of the whole sequence;

[0036] S46, the hidden state h ′ 1,h ′ 2,...,h ′ n} are respectively adjusted by the gating parameters β i After adjustment, it is sent to the multi-head self-attention fusion layer, which is adjusted by a plurality of sets of attention weights α i (m) The features of each moment are weighted and aggregated from multiple perspectives, and finally the effusion probability p is obtained;

[0037] S47, according to the effusion probability p and the set probability threshold θ, when p≥θ, the corresponding warning information is generated;

[0038] S48, the diagnosis result and the warning information are sent to the relevant production monitoring and management link to realize the timely warning and disposal of abnormal state.

[0039] Optionally, the S5 specifically comprises:

[0040] S51, real-time collection of newly added multi-source time series data and corresponding production parameters in the shale gas well production process according to a preset collection period, to form a newly added data set;

[0041] S52, data preprocessing of the newly added data set, segmentation into fixed-length sequence samples by using a sliding window method, to obtain a newly added standardized time series data set;

[0042] S53, manual or semi-automatic labeling of the newly added standardized time series data set combined with real-time diagnosis results to determine the initial point of liquid accumulation, the critical point of liquid accumulation and the process intervention point, and the labeled results are one-to-one corresponding to the newly added fixed-length sequence samples, to form a newly added labeled training sample set;

[0043] S54, combining the newly added labeled training sample set with the historical training sample set to obtain the latest training sample set;

[0044] S55, periodically updating the parameters of the time series convolution network model and the long short-term memory network for the latest training sample set, using an end-to-end training method to optimize the network parameters by minimizing the loss function L;

[0045] S56, after completing the retraining and parameter optimization of the time series convolution network model and the long short-term memory network, saving the updated time series convolution network model weight and deploying it in the production monitoring and diagnosis process.

[0046] The beneficial effects of the present application are:

[0047] The present application deeply integrates the time series convolution network model and the long short-term memory network, and solves the intelligent diagnosis problem of liquid accumulation in the middle and late stages of shale gas wells, realizing comprehensive perception and accurate analysis of complex multi-source time series data in the production site. Compared with the existing liquid accumulation detection methods relying on artificial judgment or single deep learning model, the present application can not only effectively capture the local high-order fluctuation characteristics of production parameters, but also deeply model the global dependence relationship of long time span, thereby improving the diagnosis accuracy of liquid accumulation state and the sensitivity of abnormal early warning. The invention scheme adopts a dynamic sample set updating and model periodic adaptive training mechanism, so that the system continuously absorbs newly collected data and feedback results, ensuring that the model always maintains the optimal adaptability to the site working conditions, overcoming the problems of model upgrade lag and weak generalization ability in the prior art.

[0048] The application has extremely strong engineering feasibility and popularization value. Through end-to-end automatic data processing, feature extraction, deep discrimination and intelligent early warning process, real-time online monitoring and intelligent operation and maintenance of large-scale gas well groups are realized, and manual intervention and maintenance cost are effectively reduced. After the invention technology is deployed in the production site, liquid accumulation abnormalities are timely identified, process parameters and liquid discharge measures are assisted to be optimized, the stability and economy of gas well production are improved, and the intelligent management and safe operation level of oil and gas fields are significantly improved. The application not only has obvious innovation and practicality in the field of intelligent liquid accumulation diagnosis, but also provides strong technical support for efficient development and intelligent operation and maintenance of unconventional oil and gas fields such as shale gas. BRIEF DESCRIPTION OF DRAWINGS

[0049] The accompanying drawings are included to provide a further understanding of the application, and constitute a part of the specification, illustrate the application together with the embodiments thereof, and explain the application without limiting the application. In the drawings:

[0050] Figure 1 A flowchart of the intelligent diagnosis method for liquid accumulation in the middle and late stages of shale gas wells based on the LSTM and TCN models proposed by the application;

[0051] Figure 2 A principle block diagram of the deep fusion structure of the time sequence convolution network model and the long short-term memory network of the intelligent diagnosis method for liquid accumulation in the middle and late stages of shale gas wells based on the LSTM and TCN models proposed by the application; DETAILED DESCRIPTION

[0052] The application will now be described in further detail with reference to the drawings. These drawings are simplified schematic diagrams, and only schematically show the basic structure of the application, and therefore only show the components related to the application.

[0053] REFERENCE Figure 1 and Figure 2 The intelligent diagnosis method for liquid accumulation in the middle and late stages of shale gas wells based on the LSTM and TCN models includes the following steps:

[0054] S1, collecting multi-source time sequence data in the production process of shale gas wells, pre-processing the multi-source time sequence data, using a sliding window method to divide the pre-processed multi-source time sequence data into fixed-length sequence samples, and obtaining a standardized time sequence data set;

[0055] S2, manually labeling the standardized time sequence data set, labeling liquid accumulation starting points, liquid accumulation critical points and process intervention points, and generating a labeled training sample set;

[0056] S3, constructing a time sequence convolution network model, inputting the labeled training sample set into the time sequence convolution network model, using a multi-layer dilated causal convolution to perform multi-scale local feature extraction on the input data, and obtaining local feature expression;

[0057] S4, input the local feature expression to a long short-term memory network to model global time sequence dependency relationship, output fused time sequence features, input to a full connection layer to complete liquid accumulation probability or risk level discrimination, output corresponding diagnostic results, set a liquid accumulation probability threshold according to the diagnostic results, generate corresponding early warning information, and send the early warning information to relevant production monitoring and management links;

[0058] S5, periodically collect new production data and diagnostic results, update the labeled training sample set, and periodically retrain and optimize the time sequence convolution network model and the long short-term memory network.

[0059] The present application realizes high-quality input of shale gas well production process data through standardized collection and intelligent preprocessing of multi-source time sequence data, combined with artificial precise labeling and sliding window sample construction, adopts a time sequence convolution network model to extract multi-scale local features from the data, then realizes global time sequence dependency modeling through a long short-term memory network, and outputs liquid accumulation probability or risk level from a full connection layer, thereby improving the accuracy and real-time performance of liquid accumulation state diagnosis, and the diagnostic results are used to intelligently generate early warning information according to a set threshold, and automatically pushed to production monitoring and management links to realize early detection and rapid response of liquid accumulation abnormalities. The present application periodically collects new production data and diagnostic results, dynamically updates the labeled training sample set, and periodically optimizes the model parameters, so that the diagnostic system has the ability of continuous self-learning and adaptation to working condition changes. The present application improves the automation, precision and real-time performance of shale gas well liquid accumulation intelligent diagnosis, reduces the risk of artificial intervention and yield loss, and provides strong technical support for gas field intelligent operation and safety production.

[0060] In the embodiment, the multi-source time sequence data specifically includes wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam displacement, gas lift volume and foam concentration data.

[0061] In the embodiment, the preprocessing of the multi-source time sequence data specifically includes missing value interpolation, outlier removal, data normalization and time sequence alignment.

[0062] In the embodiment, the use of the sliding window method to divide the preprocessed multi-source time sequence data into fixed-length sequence samples specifically refers to dividing continuous time sequence data into a plurality of data segments with consistent length, mutual overlap or no overlap according to a preset window length and step, and each segment is taken as a fixed-length sequence sample.

[0063] In the embodiment, S2 specifically includes:

[0064] S21, for each group of fixed-length sequence samples in the standardized time series data set, analyze the time series changes of each production parameter of wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam displacement, gas lift volume and foam concentration one by one, and obtain the pressure change trend and gas production change trend of each group of fixed-length sequence samples;

[0065] S22, for each group of fixed-length sequence samples, calculate the change rate of casing pressure difference and the decline rate of gas production, and screen out continuous data points with casing pressure difference change rate greater than or equal to 15% per hour and gas production decline rate greater than or equal to 10% per hour, mark the continuous data points meeting the two conditions as the starting point of liquid loading, and clearly indicate the initial appearance period of liquid loading phenomenon;

[0066] S23, on the basis of the marked liquid loading starting point, combined with the further change trend of wellhead pressure and the cumulative decline amplitude of gas production or liquid production, the evolution process of liquid loading is judged, and when the change of wellhead pressure appears a significant turning point or the cumulative decline of flow rate exceeds the set threshold, it is marked as a liquid loading critical point;

[0067] S24, according to the actual operation record in the production process, the specific time of foam displacement agent injection, gas lift measure implementation and foam agent addition manual intervention behavior of each group of fixed-length sequence samples corresponding time series data is identified, and is marked as a process intervention point;

[0068] S25, the marked liquid loading starting point, liquid loading critical point and process intervention point are respectively associated with the corresponding fixed-length sequence sample one by one, and finally a labeled training sample set is generated.

[0069] The present application comprehensively analyzes the time series changes of multiple parameters such as wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam displacement, gas lift volume and foam concentration through fixed-length sequence samples of standardized time series data set, accurately obtains the pressure and gas production trend of each sample, realizes the all-around characterization of production conditions, scientifically screens out key data points with typical liquid loading signs through quantitative analysis of casing pressure difference change rate and gas production decline rate, and accurately marks the liquid loading starting point, improves the reliability of early identification of liquid loading phenomenon, further locates the critical evolution stage of liquid loading combined with pressure turning point and cumulative flow change, avoids misjudgment caused by single index fluctuation, the present application accurately associates the specific implementation time of process intervention with the sample, realizes the synchronous labeling of production events and working condition data, provides a high-quality labeled sample set for model training, the labeling process not only guarantees the accuracy and representativeness of the training sample, enhances the working condition adaptability and abnormal discrimination ability of the model, but also provides a solid data foundation for continuous optimization and automatic learning of the intelligent diagnosis system, improves the scientificity and controllability of liquid loading anomaly identification.

[0070] In the embodiment, the S3 specifically comprises:

[0071] S31, standardize each set of fixed-length time series data X={x1, x2,..., xT} in the labeled training sample set as input, and each x n i contains wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam displacement, gas lift volume and foam concentration;

[0072] S32, in each convolution layer, a plurality of groups of convolution kernels of different lengths are set, and the lengths of the convolution kernels in each group are K1, K2,..., K m , respectively, and the convolution operation is performed in parallel on the same input time series data to obtain multi-scale initial feature representation, wherein m is the number of different convolution kernel groups set in parallel in each convolution layer;

[0073] S33, the change rate, local statistical features and historical prediction error of the current input data are calculated for the multi-scale initial feature representation, wherein the change rate includes the first-order difference and normalized amplitude of each production parameter at consecutive time steps, the local statistical features include mean, variance, maximum, minimum and range, and the historical prediction error is the absolute error or mean square error between the predicted value and the true observed value of the input at the corresponding time for the previous period. After normalization, the change rate, local statistical features and historical prediction error are used as reference basis for initializing the dilation coefficient and convolution kernel weight parameter by linear weighting method. The dilation coefficient of the convolution kernel group is dynamically allocated according to the amplitude of the change rate and local statistical features to realize adaptive adjustment of the receptive field. The initial value of the convolution weight is adjusted according to the historical prediction error, and higher learning weight is allocated to the area with larger error to initialize the dilation coefficient d l,j and weight parameter of the corresponding convolution kernel group;

[0074] S34, during the convolution operation, for each group of convolution kernels and each time step t, the dilation coefficient d l,j (t) and the time step weight γ l,j,s (t) are dynamically generated according to the change trend and statistical characteristics of the current input feature. The dynamic generation of the dilation coefficient and the time step weight means that the dilation coefficient is adaptively allocated according to the change rate and statistical features of the input data in the current window, and the time step weight is calculated using normalization and weighting mapping method according to the change amplitude of the input feature and historical prediction error information. The input data in the normalized fixed-length time series data is weighted and convolved to obtain the output feature y of the jth group of convolution kernels at time t in the lth layer: l,j,t

[0075]

[0076] wherein k j is the length of the jth group of convolution kernels, and w l,j,s ​​is the parameter of the jth group of convolution kernels in the first layer at the s-th position, d l,j (t) represents the dilated coefficient dynamically generated by the jth group of convolution kernels in the first layer at the current time step t, s is the sampling index of the convolution kernel in the window;

[0077] output feature y l,j,t By introducing dynamic dilated coefficients and time-synchronous weights in the convolution operation, the precise response to the change trend and statistical characteristics of the input feature is realized, and the flexibility and expression ability of the convolution network in complex time series data modeling are improved. The dynamic dilated coefficient adaptively adjusts the receptive field according to the actual fluctuation of the input at different time points, effectively capturing the multi-scale and non-stationary change patterns in the data. The time-synchronous weight assigns adaptive weights to different positions in each convolution window, so that the model highlights the information contribution at key moments and suppresses redundant or noise interference. The weighted convolution mechanism not only improves the pertinence and timeliness of feature extraction, but also enhances the sensitivity and discrimination accuracy of the model to abnormal fluctuations and sudden working conditions. It provides more representative and high-discrimination local feature expression for time series intelligent diagnosis, and improves the reliability and generalization ability of the liquid accumulation anomaly recognition.

[0078] S35, the output features y l,j,t are spliced in the channel dimension to form a multi-scale dynamic feature representation;

[0079] S36, after the output of each convolution layer, a dynamic gated residual connection structure is used to perform element-wise weighted fusion of the standardized fixed-length time series data and the multi-scale dynamic feature representation of each group of convolution layers, respectively, and the weight vector generated by the input feature through the gating function g l (input l ) to obtain the residual connection output z l :

[0080] z l =g l (input l )⊙input l +(1-g l (input l ))⊙output l ;

[0081] Where, input l is the input feature tensor of the first layer, output l is the convolution output feature tensor of the first layer, is the element-wise multiplication operation, g l (input l ) is the weight vector generated by the input feature as the independent variable through the gating function and the Sigmoid activation, with a value range of 0 to 1;

[0082] Residual connection output z l By introducing the dynamic gated residual connection structure, the input features and the convolution features are adaptively weighted and fused after the convolution output of each layer, the efficient transmission and dynamic adjustment of information flow are realized, the weight vector is automatically generated according to the current input features by the gating function, the proportion of the input features and the convolution features in the residual fusion is flexibly allocated, the abstract ability brought by the deep network is utilized, the original information of the input is preserved, the Sigmoid activation ensures the smooth change of the weight in the reasonable range, the stability and controllability of the fusion operation are enhanced, the dynamic fusion mechanism relieves the gradient vanishing and feature degradation problems in the deep network, the robustness and expression ability of the feature transmission are improved, the adaptability of the model to abnormal time series signals and the generalization ability of the model to complex scenes are greatly improved, and a reliable and efficient feature basis is provided for the intelligent diagnosis system.

[0083] S37, the residual connection output z l The ReLU activation function is applied to enhance the nonlinear feature expression ability, and the Dropout operation is applied to reduce the overfitting risk, and the current convolution layer output feature is obtained;

[0084] S38, the current convolution layer output feature obtained is taken as the input of the next convolution layer, and the above multi-scale convolution, dynamic adaptation, gated residual connection and activation regularization structure are stacked in sequence, until the forward calculation of all convolution layers is completed, and finally the local feature expression F of each input sample is obtained.

[0085] In the time series convolution network model, the present application realizes multi-scale local feature extraction of gas well multi-source production data through parallel operation of multiple groups of different length convolution kernels, effectively captures the change law of production parameters at different time scales, improves the expression ability of the model to complex time series signals, dynamically adjusts the expansion coefficient and convolution weight in combination with the change rate, statistical characteristics and historical error of the input data, enhances the adaptability of the model to abnormal fluctuations, sudden changes and trend changes, improves the recognition sensitivity and discrimination precision of the liquid loading state anomaly, and the dynamic gated residual connection structure realizes adaptive weighted fusion of input and convolution output, relieves the gradient vanishing and information loss problems in the deep network, makes the deep features flow and transmit efficiently among multiple layers of network, improves the stability and generalization ability of the network, and the activation and Dropout regularization mechanism further enhances the nonlinear expression ability and inhibits the model overfitting, ensures the robustness of feature extraction, realizes efficient modeling and expression of complex local features of multi-source time series data, provides a solid feature basis for liquid intelligent diagnosis and prediction, and improves the adaptability and intelligent recognition level of the system to complex production conditions.

[0086] In the embodiment, the S4 specifically comprises:

[0087] S41, input the local feature expression F = {f1, f2,..., f n} as an input sequence to a long short-term memory network, each f i is a multi-dimensional feature vector output by a time convolution network;

[0088] S42, at each time, the input gate, the forget gate and the output gate signal are calculated using a multi-branch gating structure, each gating signal is not only based on the hidden state at the previous time and the current input feature, but also introduces an auxiliary branch based on the current input local statistical characteristics, and the main branch and the auxiliary branch are weighted and fused to obtain:

[0089]

[0090] wherein k represents the input gate, the forget gate or the output gate, S(f t ) is a statistical description of the input feature, including the mean, variance, maximum, minimum, range, first-order difference mean and first-order difference variance of the input feature at the current time and within the window, is a weight parameter, is a bias term, and σ is a Sigmoid activation function, h t-1 is the hidden state vector at the previous time;

[0091] The gating signal The input gate, the forget gate and the output gate signal are calculated through a multi-branch gating structure, and are modeled based on the historical hidden state and the current input feature. An auxiliary branch of the statistical description of the input feature is introduced, and the two pieces of information are integrated to realize adaptive adjustment of the gating signal, so as to sensitively capture the local characteristics and change trend of the current input. The gating signal can dynamically adjust the reception of new information, the forgetting of historical information and the output of the final state of the memory cell, improve the adaptability of the model to complex and non-stationary time series data, and the weighted fusion of the main branch and the auxiliary branch. The gating mechanism has stronger discrimination ability and robustness in scenes such as dramatic changes in working conditions and signal mutations, and improves the response speed and accuracy of the model to key moments and abnormal states, providing a solid mechanism foundation for efficient learning and dynamic adaptation of intelligent diagnosis systems.

[0092] S43, under the action of the gating signal, the hidden state and the memory cell state at the previous time and the candidate memory state at the current time are fused and updated, and at each time, the hidden state and the memory cell state are subjected to a dimension reduction linear transformation through a state compression layer, only the most important information components are retained, and the dimension-reduced hidden state and memory cell state are transmitted to the next time;

[0093] S44, calculate the confidence of the gating signal and the change amplitude of the hidden state of each time, if the confidence is lower than the preset threshold and the state change is less than the threshold, dynamically crop part of the calculation of the time step, only pass the main information, realize the time step cropping;

[0094] S45, compress the hidden state h ′ 1,h ′ 2,...,h ′ n Aggregation is performed to form the time sequence fusion feature H of the whole sequence;

[0095] S46, the hidden state h ′ 1,h ′ 2,...,h ′ n} output by all time steps are respectively adjusted by gating parameters β i , and then input into a multi-head self-attention fusion layer, and a plurality of sets of attention weights are used to perform multi-perspective weighted aggregation on the features of each time, and finally obtain the effusion probability p:

[0096]

[0097] Wherein, M is the number of heads of multi-head attention, w m is a learnable weight for each head fusion, β i is the gating parameter of the i-th time, is the adaptive weight of the i-th time corresponding to the m-th attention head, is the full connection parameter of the m-th attention head, h i ′ is the hidden state after compression of the i-th time, and n is the time step length of the input sample sequence;

[0098] The effusion probability p is adjusted by introducing the gating parameter and the multi-head self-attention fusion mechanism, and the hidden states of all time steps are weighted aggregated under multi-perspective, which improves the ability of the model to capture key information in the time sequence feature. The gating parameter can flexibly adjust the contribution of each time step to the final output, so that the model focuses on the historical fragments most sensitive to effusion diagnosis. The multi-head self-attention mechanism introduces multiple perspectives for feature aggregation, enhances the recognition ability of the model to complex time sequence relationship and potential abnormal features, and improves the richness and discriminability of feature expression. The whole aggregation process is regulated by learnable weights and activation functions, which ensures the accuracy and robustness of the diagnosis probability output, improves the accuracy of effusion intelligent diagnosis, enhances the adaptability of the model to variable working conditions and time sequence abnormalities, and provides technical support for intelligent early warning and auxiliary decision-making.

[0099] S47, according to the comparison between the liquid accumulation probability p and the set probability threshold value theta, when p >= theta, the corresponding early warning information is generated;

[0100] S48, the diagnosis result and the early warning information are sent to the related production monitoring and management link, and timely early warning and disposal of abnormal state are realized.

[0101] The application realizes global dependence modeling and dynamic adaptive aggregation of time sequence characteristics through deep innovation and optimization of long short-term memory network structure, considers historical hidden state and current input characteristics by using multi-branch gating structure, introduces auxiliary adjustment of input local statistical characteristics, makes the gating mechanism more flexible to allocate information flow, improves the adaptability to complex time sequence changes and sudden working conditions, state compression and dimensionality reduction operation, retains the most key information, suppresses information redundancy and noise interference, guarantees the balance of long-term memory and expression ability of the model, and the dynamic time step pruning mechanism improves the calculation efficiency and reasoning speed of the model, so that the model focuses on information processing at key moments, the multi-head self-attention fusion layer realizes time sequence feature aggregation in multiple perspectives, enhances the accuracy of liquid accumulation probability discrimination and the richness of feature expression, and the diagnosis result and the early warning information can be timely pushed to the production management link, realizing early detection, fast response and effective disposal of abnormal working conditions, the application improves the intelligent identification and adaptability of the model to large-scale production site complex and dynamic time sequence data, improves the real-time and accuracy of liquid accumulation anomaly detection, and provides a solid support for intelligent operation and maintenance and safe and efficient production of shale gas wells.

[0102] In the embodiment, the S5 specifically comprises:

[0103] S51, according to a preset acquisition period, real-time acquisition of newly added multi-source time sequence data and corresponding production parameters in the shale gas well production process forms a new data set;

[0104] S52, data preprocessing is performed on the new data set, and a sliding window method is used to divide into fixed-length sequence samples to obtain a new standardized time sequence data set;

[0105] S53, manual or semi-automatic labeling is performed on the new standardized time sequence data set combined with real-time diagnosis results to determine the liquid accumulation starting point, the liquid accumulation critical point and the process intervention point, and the labeling results are one-to-one corresponding to the new fixed-length sequence samples to form a new labeled training sample set;

[0106] S54, the new labeled training sample set is combined with the historical training sample set to obtain the latest training sample whole set;

[0107] S55, the parameters of the time sequence convolution network model and the long short-term memory network are periodically and synchronously updated for the latest training sample whole set, an end-to-end training method is used, and the network parameters are optimized by minimizing the loss function L:

[0108]

[0109] Wherein, N is the number of samples, y i is the sample label, p i is the predicted probability, and log2 is the logarithmic function.

[0110] The minimum loss function L adopts the cross-entropy loss function to train and optimize the parameters of the model end to end, effectively measures the difference between the predicted probability of the model and the real label, and continuously adjusts the network parameters. By minimizing the loss function, the model improves the ability to distinguish between positive and negative samples, enhances the accuracy of the abnormal state of the effusion, and the cross-entropy loss itself is sensitive to the probability output, so that the model quickly responds to the prediction deviation during the training process and converges to the optimal solution. The parameters of the time series convolution network and the long short-term memory network are periodically optimized to ensure that the model continuously adapts to new data and changes in working conditions, prevents performance degradation, and ensures the scientificity and robustness of the output of the intelligent diagnosis model. It provides a solid theoretical foundation and technical support for efficient identification and dynamic self-adaptation of effusion abnormalities.

[0111] S56, after the retraining and parameter optimization of the time series convolution network model and the long short-term memory network are completed, the updated time series convolution network model weight is saved and deployed in the production monitoring and diagnosis process.

[0112] The present application realizes the continuous perception and knowledge accumulation of the intelligent diagnosis system to the production condition change by periodically collecting new production data and diagnosis results. The newly added data is accurately labeled after standardized processing and sliding window segmentation, combined with real-time diagnosis results, to ensure that the sample set has high representativeness and timeliness, effectively reflects the latest laws of effusion state and intervention behavior on site. The newly added samples and historical data are dynamically merged to form the latest training complete set, which enriches the model training basis and improves the model's adaptability to complex working conditions and various abnormalities. The parameters of the time series convolution network and the long short-term memory network are periodically updated, the model is trained end to end and the loss function is minimized, the model quickly corrects the prediction deviation, realizes self-optimization and iterative improvement of the diagnosis performance, and the model weight after retraining and optimization is deployed in the on-site system. It always maintains high sensitivity and high recognition rate to new working conditions and abnormal features, so that the intelligent diagnosis system has the ability of continuous self-learning, dynamic self-adaptation and efficient upgrading, effectively prolongs the model life cycle, improves the accuracy of effusion abnormal diagnosis and production safety, and provides a solid data and technical support for intelligent management and sustainable production of gas fields.

[0113] Example 1:

[0114] In order to verify the feasibility of the present application in implementation, the present application is applied to a certain shale gas field. In the past, field operation personnel mainly rely on manual experience and traditional pressure threshold method to judge the gas well liquid loading condition, not only easy to cause liquid loading missed report and false report due to data fluctuation and subjective misjudgment, but also difficult to find abnormality in time, often leading to gas well production decline, increasing the difficulty of production management and maintenance cost. The gas field management party hopes to improve the diagnosis efficiency and decision-making scientificity of abnormal liquid loading by means of intelligent means, therefore selects 16 representative gas wells of 4 platforms in the gas field, and deploys and applies the intelligent liquid loading diagnosis method based on time series convolution network model and long short-term memory network deep fusion proposed by the present application to carry out comparative test.

[0115] After the intelligent diagnosis system goes online, the platform automatically collects and integrates eight key production data such as wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam agent injection amount, gas lift gas amount and foam agent concentration, the sampling frequency is once per hour, and after the original data are subjected to missing value interpolation, abnormality rejection and normalization, the sliding window is divided into continuous time series samples. The engineer team carries out sample labeling with the historical data of 2023-2024 and process intervention log, and provides training basis for the intelligent diagnosis model. The model adopts time series convolution network to extract multi-scale features, then models the global time series dependence relationship by long short-term memory network, and discriminates through the innovative gated self-attention fusion structure. After the system is deployed, the gas well liquid loading state is automatically diagnosed every hour and the probability value is generated, if the probability is greater than 0.7, the early warning is automatically pushed to the operation and maintenance team. The model continuously adapts, absorbs the latest production data and feedback results every week, and realizes dynamic optimization.

[0116] After one month of operation, the management party carries out multi-dimensional comparative evaluation on the intelligent diagnosis method and the traditional threshold method. The artificial threshold method alarms when the wellhead pressure is abnormal, however, the field feedback shows that the liquid loading recognition accuracy of this method is only about 83%, false alarm and missed alarm occur from time to time, especially in complex gas wells and variable interference scenes. The intelligent diagnosis model of the present application greatly improves the discrimination accuracy and real-time response ability of liquid loading state by means of multi-parameter deep fusion and model self-adaptive upgrading. For some typical gas wells such as ZK021, ZK023, ZK025 and ZK027, the model early warning can identify liquid loading abnormality 4 hours in advance on average, significantly reducing the production loss and energy waste caused by delayed processing.

[0117] Table 1 Comparison of liquid loading diagnosis technology and production performance of pilot gas wells in a certain basin

[0118]

[0119] As can be seen from Table 1, the intelligent diagnosis method of the application is outstanding in the accuracy, response speed and yield guarantee of liquid accumulation identification. Taking ZK021 well as an example, the traditional threshold method alarms one hour and thirty minutes after the actual liquid accumulation occurs, resulting in a yield loss of up to 520 cubic meters; while the intelligent diagnosis system successfully warns 4 hours and 30 minutes (at 06:00) in advance, with an advance of 1 hour between the warning and the actual occurrence, and the yield loss of the well is effectively controlled within 72 cubic meters, fully embodying the significant advantages of the intelligent diagnosis in the timeliness and accuracy of early warning.

[0120] For example, ZK023, ZK025, ZK027 and other wells, the intelligent diagnosis system can all give an early warning 1 to 1.5 hours before the liquid accumulation occurs, while the traditional threshold method lags behind in alarm, with yield losses of 470, 690 and 540 cubic meters respectively, while the yield loss of the method of the application is greatly reduced to 68, 93 and 61 cubic meters, indicating that through early warning and timely process intervention, the adverse effects of large-scale liquid accumulation on production are effectively avoided. It is worth noting that ZK022 and other wells still have false alarms when there is no actual liquid accumulation, resulting in waste of process resources and operation and maintenance efforts, while the intelligent diagnosis system accurately identifies as "normal" with a liquid accumulation probability of only 0.22, achieving high robustness to liquid-free conditions.

[0121] For ZK024, ZK026, ZK028 and other gas wells with stable production process and no liquid accumulation, neither method triggers an alarm, but the intelligent diagnosis system's liquid accumulation probability evaluation is more reasonable, always remaining low (0.11-0.19) and not false alarming. The application shows higher early warning advance, lower false negative and false positive rates in all typical gas wells, reduces the yield loss and frequency of manual intervention of gas wells, and improves the intelligence and lean level of field operation and maintenance, providing strong technical support for intelligent management and cost reduction and efficiency improvement of gas fields.

[0122] The above is only the preferred specific embodiment of the application, but the protection scope of the application is not limited thereto, and any person skilled in the art can make equivalent substitutions or changes to the technical solutions and inventive concepts of the application within the technical scope disclosed by the application, which should be covered within the protection scope of the application.

Claims

1. A method for intelligent diagnosis of fluid accumulation in the middle and late stages of shale gas wells based on LSTM and TCN models, characterized in that, Includes the following steps: S1. Collect multi-source time-series data during the production process of shale gas wells, preprocess the multi-source time-series data, and use the sliding window method to divide the preprocessed multi-source time-series data into fixed-length sequence samples to obtain a standardized time-series dataset. S2. Manually label the standardized time-series dataset, marking the initiation point, critical point, and process intervention point of fluid accumulation, and generate a labeled training sample set; S3. Construct a temporal convolutional network model. Input the labeled training sample set into the temporal convolutional network model and use multi-layer dilated causal convolution to extract local features from the input data at multiple scales to obtain local feature representations. S4. Input the local feature representation into the long short-term memory network to model the global temporal dependency relationship, output the fused temporal features, input them into the fully connected layer to complete the determination of the probability or risk level of fluid accumulation, output the corresponding diagnostic results, set the fluid accumulation probability threshold according to the diagnostic results, generate the corresponding early warning information, and send the early warning information to the relevant production monitoring and management links. S5. Regularly collect new production data and diagnostic results, update the labeled training sample set, and periodically retrain and optimize the temporal convolutional network model and long short-term memory network.

2. The intelligent diagnostic method for mid-to-late stage fluid accumulation in shale gas wells based on LSTM and TCN models according to claim 1, characterized in that, The multi-source time-series data specifically includes wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam discharge rate, gas lift rate, and foaming agent concentration data.

3. The intelligent diagnostic method for mid-to-late stage fluid accumulation in shale gas wells based on LSTM and TCN models according to claim 1, characterized in that, The preprocessing of multi-source time-series data specifically includes missing value imputation, outlier removal, data normalization, and time-series alignment.

4. The intelligent diagnostic method for mid-to-late stage fluid accumulation in shale gas wells based on LSTM and TCN models according to claim 1, characterized in that, The method of using a sliding window to segment preprocessed multi-source time series data into fixed-length sequence samples specifically refers to dividing continuous time series data into several data segments of consistent length, which may overlap or not overlap, according to a preset window length and step size, with each segment serving as a fixed-length sequence sample.

5. The intelligent diagnostic method for mid-to-late stage fluid accumulation in shale gas wells based on LSTM and TCN models according to claim 1, characterized in that, S2 specifically includes: S21. For each fixed-length sequence sample in the standardized time series dataset, analyze the time series changes of various production parameters such as wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam discharge rate, gas lift rate and foaming agent concentration, and obtain the pressure change trend and gas production change trend of each fixed-length sequence sample. S22. For each set of fixed-length sequence samples, calculate the rate of change of oil-casing pressure difference and the rate of decrease of gas production, screen out continuous data points with an oil-casing pressure difference change rate greater than or equal to 15% per hour and a gas production decrease rate greater than or equal to 10% per hour, mark the continuous data points that meet the two conditions as the liquid accumulation start point, and clearly indicate the initial occurrence time of the liquid accumulation phenomenon. S23. Based on the marked starting point of liquid accumulation, and combined with the further trend of wellhead pressure changes and the cumulative decrease in gas production or liquid production, judge the evolution process of liquid accumulation, and mark the point when the wellhead pressure change shows a significant turning point or the cumulative decrease in flow exceeds the set threshold as the critical point of liquid accumulation. S24. Based on the actual operation records in the production process, identify the specific times when artificial intervention behaviors such as foaming agent injection, air lift measures implementation, and foaming agent addition occur for the time series data corresponding to each set of fixed-length sequence samples, and mark them as process intervention points. S25. Associate the labeled liquid accumulation start point, liquid accumulation critical point, and process intervention point with the corresponding fixed-length sequence samples one by one to finally generate a labeled training sample set.

6. The intelligent diagnostic method for mid-to-late stage fluid accumulation in shale gas wells based on LSTM and TCN models according to claim 1, characterized in that, S3 specifically includes: S31. For each group of standardized fixed-length time-series data X = {x1, x2, ..., x...} in the labeled training sample set... n } as input, each x i This includes wellhead pressure, gas production, liquid production, gas-liquid ratio, temperature, foam discharge rate, gas lift rate, and foaming agent concentration; S32. Within each convolutional layer, multiple sets of convolutional kernels of different lengths are set, with the lengths of each set of kernels being K1, K2, ..., K. m Convolution operations are performed in parallel on the same input time series data to obtain multi-scale initial feature representations, where m is the number of different convolution kernel groups set in parallel in each convolutional layer; S33. For the initial feature representation at multiple scales, combine the rate of change of the current input data, local statistical features, and historical prediction errors to initialize the dilation coefficient d of the corresponding convolutional kernel group. l,j and weight parameters; S34. During the convolution operation, for each set of convolution kernels and each time step t, the dilation coefficient d is dynamically generated based on the changing trend and statistical characteristics of the current input features. l,j (t) and time step weight γ l,j,s (t), and the input data Perform weighted convolution operation to obtain the output feature y of the j-th group of convolution kernels in the l-th layer at time t. l,j,t ; S35, the output features y obtained from all convolutional kernel groups l,j,t The data is spliced ​​along the channel dimension to form a multi-scale dynamic feature representation; S36. After the output of each convolutional layer, a dynamic gated residual connection structure is used to connect each set of standardized fixed-length temporal data and multi-scale dynamic feature representations from the convolutional layer to the input features through a gate function g. l (input l The generated weight vectors are then fused element-wise to obtain the residual connection output z. l ; S37, Output z for residual connection l The ReLU activation function is applied to enhance the nonlinear feature representation capability, and the Dropout operation is applied to reduce the risk of overfitting, thus obtaining the output features of the current convolutional layer. S38. The obtained output features of the current convolutional layer are used as the input of the next convolutional layer. The above multi-scale convolution, dynamic adaptation, gated residual connection and activation regularization structure are stacked in sequence until all convolutional layers have completed the forward computation, and finally the local feature expression F of each input sample is obtained.

7. The intelligent diagnostic method for mid-to-late stage fluid accumulation in shale gas wells based on LSTM and TCN models according to claim 1, characterized in that, S4 specifically includes: S41. Express local features as F = {f1, f2, ..., f...} n The sequence f is fed into the Long Short-Term Memory network as input. i This is a multidimensional feature vector output by a temporal convolutional network; S42. At each time step, a multi-branch gating structure is used to calculate the input gate, forget gate, and output gate signals. Each gate signal... It not only relies on the hidden state of the previous time step and the features of the current input, but also introduces an auxiliary branch based on the local statistical characteristics of the current input, which is obtained by weighted fusion of the main branch and the auxiliary branch; S43. Under the action of the gating signal, the hidden state and memory unit state of the previous time step are fused and updated with the candidate memory state of the current time step. At each time step, the hidden state and memory unit state are subjected to a dimension reduction linear transformation through the state compression layer, retaining only the most important information components, and the dimension reduction hidden state and memory unit state are passed to the next time step respectively. S44. Calculate the confidence level of the gated signal and the magnitude of the hidden state change at each moment. If the confidence level is lower than the preset threshold and the state change is less than the threshold, then dynamically trim part of the calculation of the time step and only transmit the main information to achieve time step trimming. S45. Compress the hidden states h′1, h′2, ..., h′ of the output of the LSTM network at all time points. n Aggregate the data to form the temporal fusion feature H of the overall sequence; S46. Compress the hidden states {h′1,h′2,...,h′} at all times into the output. n } respectively through gating parameter β i After adjustment, it is fed into a multi-head self-attention fusion layer, consisting of multiple sets of attention weights α. i (m) The features at each time point are weighted and aggregated from multiple perspectives to obtain the final probability p of the fluid accumulation. S47. Compare the probability of liquid accumulation p with the set probability threshold θ. When p ≥ θ, generate the corresponding warning information. S48. Send the diagnostic results and early warning information to relevant production monitoring and management links to achieve timely early warning and handling of abnormal conditions.

8. The intelligent diagnostic method for mid-to-late stage fluid accumulation in shale gas wells based on LSTM and TCN models according to claim 1, characterized in that, S5 specifically includes: S51. According to the preset acquisition cycle, collect new multi-source time-series data and corresponding production parameters added during the shale gas well production process in real time to form a new dataset. S52. Preprocess the newly added dataset by using the sliding window method to divide it into fixed-length sequence samples to obtain the newly added standardized time series dataset. S53. Manually or semi-automatically annotate the newly added standardized time series dataset with real-time diagnostic results to determine the initiation point, critical point, and process intervention point of fluid accumulation. Then, match the annotation results with the newly added fixed-length sequence samples to form a new labeled training sample set. S54. Merge the newly added labeled training sample set with the historical training sample set to obtain the latest complete training sample set; S55. For the latest training sample set, periodically and synchronously update the parameters of the temporal convolutional network model and the long short-term memory network, and use an end-to-end training method to optimize the network parameters by minimizing the loss function L. S56. After completing the retraining and parameter optimization of the temporal convolutional network model and the long short-term memory network, save the updated weights of the temporal convolutional network model and deploy them in the production monitoring and diagnostic process.

Citation Information

Cited By

  • Physical constraint and multi-source data dual-drive gas well effusion diagnosis method

    CN121744045A

  • A physical constraint and multi-source data double-driven gas well liquid loading diagnosis method

    CN121744045B

  • Safety monitoring method for gas production wellhead

    CN121765479A

  • CNN-LSTM-based gas flame combustion condition intelligent diagnosis method and system, and storage medium

    CN122049617A