Intelligent shaft operation state prediction method based on hybrid deep learning framework

By using a hybrid deep learning framework for intelligent prediction of wellbore operation status, and utilizing an improved dual attention mechanism and a time-fusion Transformer model, the problem of difficult prediction of wellbore pressure and temperature profiles in CO2 geological storage is solved, and high-precision prediction of the dynamic evolution of wellbore status is achieved, thereby improving the safety and stability of the CO2 geological storage system.

CN120744400AActive Publication Date: 2025-10-03CHINA UNIV OF PETROLEUM (EAST CHINA)

Patent Information

Application Number
CN202511223458.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-10-03
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

Existing technologies in the field of CO2 geological storage have difficulty effectively dealing with the unique dual-sequence characteristics of wellbore pressure and temperature profiles. Especially during CO2 injection or leakage, traditional prediction methods have difficulty accurately characterizing the phase change process and improving computational efficiency.

Method used

An intelligent prediction method for wellbore operation status based on a hybrid deep learning framework is adopted. Through the improved dual attention mechanism and the time fusion Transformer model, a dual sequence feature database is integrated. The hybrid deep learning framework DT-DANet is established by combining the improved dual attention network and the time fusion Transformer to achieve high-precision prediction of the dynamic evolution of multiple parameters in the wellbore.

Benefits of technology

It achieves high-precision prediction of wellbore status under CO2 injection and leakage scenarios, improves the safety assessment capability of the CO2 geological storage system, and can accurately reconstruct the transient change characteristics of wellbore pressure, temperature distribution and phase behavior.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744400A_ABST
    Figure CN120744400A_ABST
Patent Text Reader

Abstract

The invention discloses a shaft operation state intelligent prediction method based on a hybrid deep learning framework, and belongs to the field of petroleum engineering oil-gas field development engineering, and the method comprises the following steps: building a geological sequestration shaft transient temperature-pressure coupling mathematical model, and carrying out the numerical solution; constructing a double sequence feature database covering CO2 injection and leakage working conditions; adopting a parallel architecture to process the double sequence features to construct an improved double attention network; the method comprises the following steps: establishing a hybrid deep learning framework DT-DANet by coupling an improved double attention network and a time fusion Transform; and carrying out collaborative optimization training on the hybrid deep learning framework by adopting a composite loss function, wherein the output of the framework is a wellbore pressure profile, a temperature profile and phase state distribution under different time steps. According to the method, high-precision prediction of shaft multi-parameter dynamic evolution in the CO2 geological storage process is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of petroleum engineering and oil and gas field development engineering, and specifically relates to an intelligent prediction method for wellbore operation status based on a hybrid deep learning framework. Background Art

[0002] CO2 capture, utilization, and storage technology is a key emission reduction technology for addressing global climate change. Injecting CO2 captured from industrial sources into deep saline aquifers for geological storage (GCS) has become one of the most promising emission reduction options. However, the long-term safety and stability of deep geological storage systems still face challenges, with the CO2 injection process and potential leakage risks being the most prominent. During injection or leakage, CO2 may undergo complex phase evolution as the temperature-pressure conditions in the wellbore change dynamically. This non-steady-state phase transition process significantly alters its rheological properties and migration mechanism, potentially leading to a series of engineering safety hazards. Therefore, in-depth research on the multiphase flow mechanism and heat transfer characteristics of CO2 in the wellbore environment and the precise construction of a pressure and temperature profile prediction model in the multi-dimensional well depth-time will provide important theoretical support and technical guarantees for the risk assessment and safety management of CO2 geological storage projects.

[0003] As an accurate and efficient research method, numerical simulation occupies a core position in the risk assessment system of CO2 geological storage projects, especially providing key support for the quantitative characterization of CO2 injection dynamics and leakage risks. The numerical simulation method based on computational fluid dynamics can accurately characterize the phase change behavior of CO2 flow-heat transfer coupling in the wellbore and its impact on the spatiotemporal evolution of temperature and pressure fields. Compared with traditional analytical methods, although numerical simulation has the limitation of high computing resource requirements, it has irreplaceable advantages in the detailed description of complex physical processes such as multiphase flow coupling, phase change dynamic response and thermodynamic non-equilibrium. However, the existing numerical methods still need further breakthroughs in accurately characterizing the phase change process and improving computational efficiency.

[0004] In the field of CO2 geological storage, data types exhibit remarkable diversity and complexity, encompassing multimodal data systems ranging from images, videos, production time series data, to various engineering parameters. This multimodal nature presents significant challenges for data analysis and modeling, while also driving the innovative application of artificial intelligence technology in petroleum engineering. However, existing technologies primarily focus on multimodal data processing in reservoirs and drilling, lacking systematic exploration of the underlying correlation mechanisms between cross-modal data. In particular, in the context of CO2 geological storage, wellbore pressure and temperature profiles exhibit unique dual sequence characteristics: they exhibit both spatial gradient distribution along the well depth dimension and dynamic evolution patterns along the time dimension. This complex spatiotemporal coupling makes it difficult for traditional prediction methods to effectively address this complex nature. Summary of the Invention

[0005] To address these challenges, this paper proposes an intelligent prediction method for wellbore operating conditions based on a hybrid deep learning framework. By integrating an improved dual-attention mechanism with a temporal fusion Transformer model, this method achieves high-precision prediction of the dynamic evolution of multiple wellbore parameters during CO2 geological storage. This intelligent prediction method accurately reconstructs the transient characteristics of wellbore pressure, temperature distribution, and phase behavior under CO2 injection and leakage scenarios, providing a reliable technical means for safety assessment of storage systems.

[0006] The technical solutions of the present invention are as follows: A method for intelligently predicting wellbore operating status based on a hybrid deep learning framework includes the following steps: Step 1: Establish a mathematical model of transient temperature-pressure coupling in a geological storage wellbore and perform numerical solution; Step 2: Construct a dual sequence feature database covering CO2 injection and leakage conditions; Step 3: Use a parallel architecture to process dual sequence features and construct an improved dual attention network; Step 4: Establish a hybrid deep learning framework DT-DANet by coupling the improved dual attention network and the temporal fusion Transformer; Step 5: Use a composite loss function to perform collaborative optimization training on the hybrid deep learning framework, the output of which is the wellbore pressure profile, temperature profile, and phase distribution at different time steps.

[0007] Furthermore, in step 1, the process of constructing the transient temperature-pressure coupled mathematical model of the geological storage wellbore is as follows: first, constructing the wellbore mass conservation equation, momentum conservation equation, and energy conservation equation in sequence; then constructing the CO2 physical property parameter model; The mass conservation equation is: ; Where, To control the volume; is the gas phase volume fraction; and denote the density of gas phase and liquid phase respectively; and denote the mass fractions of gas and liquid phases, respectively; and are the velocities of the gas and liquid phases, respectively; is the cross-sectional area; is the source-sink term; is the current time step; is the axial depth; The momentum conservation equation is: ; Where, For pressure; is the mixed density; is the mixing speed; is the coefficient that characterizes the degree of slip between the gas and liquid phases; is the wellbore inclination; is the wall shear stress; is the perimeter of the cross-sectional area; is the acceleration due to gravity; The energy conservation equation is: ; Where, is the fluid temperature in the wellbore; is the radial length; is the Joule-Thomson coefficient; is enthalpy; is the specific heat capacity of CO2 at constant pressure; for heat; is the fluid velocity; The CO2 physical property parameter model includes thermophysical properties and flow properties; the thermophysical properties include CO2 density, specific heat capacity and Joule-Thomson coefficient, and the flow properties include CO2 viscosity and thermal conductivity of various materials.

[0008] Furthermore, in step 1, the temperature-pressure dual iterative algorithm is used to couple and solve the transient temperature-pressure coupling mathematical model. The specific process is as follows: Based on the actual wellbore structural parameters and reservoir conditions of the geological storage well under mining conditions, the wellbore grid is divided and a one-dimensional wellbore conceptual model is constructed; In the first iteration, the parameters are initialized first, and the initial pressure profile and temperature profile are assigned; then, the CO2 physical property parameter model is established; Starting from the second iteration, the pressure profile of the current iteration step is calculated based on the mass conservation equation by considering the temperature profile of the previous iteration step. The temperature profile of the current iteration step is further calculated by coupling the energy conservation equation based on the pressure profile of the current iteration step and the heat transfer parameters of the previous iteration step. The heat transfer parameters of the current iteration step are calculated based on the pressure profile, temperature profile, and flow rate extracted from the grid. During the calculation process of each iterative step, a convergence judgment criterion is established to check whether the calculation has reached the preset convergence accuracy by comparing the relative errors of the two iterative results. If the convergence conditions are not met, the calculation parameters are adjusted and the iterative calculation is repeated. When the convergence conditions are met, the pressure profile calculation results and temperature profile calculation results corresponding to the current time step are output and used as the initial conditions for the next iterative step calculation. The iterative step solution process is continued until the entire wellbore transient temperature-pressure coupling calculation process is completed.

[0009] Furthermore, the specific process of step 2 is as follows: in the CO2 injection scenario, using the time step, injection pressure, injection temperature, injection rate, initial wellbore temperature profile, initial wellbore pressure profile and wellbore configuration parameters as input parameters, solving the wellbore pressure, temperature profile and CO2 phase distribution at each time step as output responses based on the wellbore transient temperature-pressure coupling mathematical model, and establishing a dual sequence feature database for CO2 injection conditions; in the CO2 leakage scenario, using the time step, wellhead leakage pressure, initial wellbore temperature profile, initial wellbore pressure profile and wellbore configuration parameters as input parameters, solving the wellbore pressure profile, temperature profile and CO2 phase distribution at each time step as output responses based on the wellbore transient temperature-pressure coupling mathematical model, and establishing a dual sequence feature database for CO2 leakage conditions; and combining the two databases to construct a dual sequence feature database covering CO2 injection and leakage conditions.

[0010] Furthermore, in step 3, the improved dual attention network extracts local spatiotemporal features through two complementary attention mechanisms: a masked self-attention mechanism and a temporal pattern attention mechanism based on convolutional enhancement; wherein the masked self-attention mechanism extracts spatial distribution features along the wellbore depth, and the temporal pattern attention mechanism extracts local temporal features within the CO2 injection and leakage operation cycle; The basic principle of the masked self-attention mechanism is to control the direction of information flow through masking operations and enhance the information representation of deep positions through relative position encoding; given an input sequence ,in Indicates the The feature vector of the wellbore depth position, the mask matrix The design follows the principle of one-way information flow: ; Where, is the wellbore depth position index; is the source depth position; the specific position encoding equation is as follows: ; ; Where, is the encoding function; is the encoding dimension index; is the total number of feature dimensions; A scaling factor to control the periodic changes between dimensions; The specific working process of the temporal pattern attention mechanism is as follows: after preprocessing the temporal data at different running times, a series of hidden state vectors are extracted and a hidden state matrix is ​​formed. ; Use a one-dimensional convolution kernel along the hidden state matrix The row vector of the convolution operation is performed to obtain the time series pattern matrix , the specific formula is: ; Where, For the The row vector is passed through The elements of the timing pattern matrix extracted by the filters; is the index number of the receptive field width of the one-dimensional convolution kernel; is the receptive field width of the one-dimensional convolution kernel; For the The row vector is passed through The elements of the timing pattern matrix extracted by the filters; For the The filter weights; is the current time step; is the total number of time steps; the scoring function is defined as the sigmoid function, which is used as the activation function for attention weight calculation. The expression for weight calculation is: ; ; Where, is the scoring function; for No. row vectors; is transposed; is the current time step The hidden layer state of is the weight matrix for autonomous learning; is the normalized weight parameter; is the sigmoid function; Use weight matrix to compare the time series pattern matrix Perform weighted summation on each row of to get the current time step The attention vector , the formula is: ; Where, The total number of features of the input variables to the temporal pattern attention mechanism; Then, the attention vector and the hidden layer state After weighted linear mapping and superposition, the output value of the temporal pattern attention mechanism is obtained, and the formula is as follows: ; in, for The output value when ; For the prediction time length; and are the weight parameter matrices of the hidden layer state and attention vector respectively.

[0011] Furthermore, in step 4, the temporal fusion Transformer module uses the local spatiotemporal features extracted by the improved dual attention network as input, where the deep sequence information is encoded by the masked self-attention mechanism, and the time series pattern is represented by the temporal pattern attention mechanism. In terms of feature processing, the temporal fusion Transformer module adopts a differentiated encoding strategy: for the static variables of wellbore depth and formation properties, their long-term impact features are extracted through the static covariate encoder; for the dynamic variables of injection temperature, pressure and CO2 rate, features are screened through the variable selection network, and their dynamic evolution process is modeled using the sequence-to-sequence architecture. The hybrid deep learning framework DT-DANet adopts a multi-stage training strategy: first, deep sequence data is processed through a masked self-attention mechanism to retain the directional characteristics of CO2 flow; simultaneously, time series data is encoded through a temporal pattern attention mechanism to accurately capture the dynamic evolution laws; then, these local spatiotemporal features are input into the time fusion Transformer module, which realizes the modeling of global dependencies through a variable selection network and a time-aware processing layer, and integrates historical and static feature information; finally, after nonlinear transformation using a gated residual network and a multi-head attention mechanism, the framework outputs a comprehensive prediction result including wellbore pressure profile, temperature profile and CO2 phase distribution.

[0012] Furthermore, in step 5, the composite loss function is composed of a main loss function and an auxiliary loss function; The main loss formula is: ; ; ; Where, is the main loss function; coefficient and are different weighting factors; and are the prediction errors of wellbore temperature and pressure, respectively; 、 Respectively The predicted and actual values ​​of the wellbore temperature; is the total number of wellbore temperatures; 、 Respectively The predicted value and actual value of each pressure; is the total number of pressures; The auxiliary loss function includes the temporal attention consistency loss function and the physical constraint loss function, and the formula is: ; ; Where, is the temporal attention consistency loss function; is the physical constraint loss function; 、 The current time step , the previous time step The temporal attention matrix of is the total time step; and are used to penalize unrealistic gradients in wellbore pressure and temperature predictions, respectively; and is the weight coefficient in different loss functions; Composite loss function The formula is: ; The Adam optimizer combined with an adaptive learning rate scheduling strategy is used to optimize model training. A two-stage adjustment strategy is adopted in the training optimization process: in the initial warm-up stage, the learning rate is gradually increased to avoid parameter oscillation in the early stages of training; then, in the decay stage, the learning rate is dynamically adjusted to ensure that the model converges stably to the global optimal solution.

[0013] The beneficial technical effects brought about by the present invention: The present invention aims at the dual sequence characteristics of the wellbore operating status during the CO2 geological storage process, establishes a GCS wellbore transient temperature-pressure coupling mathematical model that takes into account the CO2 phase change behavior, and constructs a dual sequence feature database covering CO2 injection / leakage conditions. Based on the masked self-attention mechanism, the deep sequence feature extraction of the wellbore profile parameters is realized, and at the same time, the dynamic evolution law of the wellbore operating status is accurately captured in combination with the time series pattern attention mechanism, realizing the effective fusion of the wellbore depth sequence and time series characteristics. The GCS wellbore operating status intelligent prediction method established by the present invention realizes the simultaneous mining of local detail features and global dependencies in multi-dimensional time series data by integrating the improved dual attention mechanism and the time fusion Transformer architecture. The multi-level deep learning parallel architecture design further enhances the model's ability to capture multi-scale sequence features, enabling it to accurately predict transient pressure propagation characteristics, dynamic evolution of temperature fields, and long-term system responses. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is a flow chart of the intelligent prediction method for wellbore operation status based on the hybrid deep learning framework of the present invention.

[0015] Figure 2 This is a flow chart for solving the GCS wellbore transient temperature-pressure coupling mathematical model of the present invention.

[0016] Figure 3 Schematic diagram of the dual sequence characteristics in the GCS wellbore of the present invention.

[0017] Figure 4 1 is a comparison chart of the predicted value and the actual value of the wellbore pressure profile in an embodiment of the present invention.

[0018] Figure 5 3 is a comparison chart of the predicted value and the actual value of the wellbore temperature profile in an embodiment of the present invention.

[0019] Figure 6 This is a comparison chart of the loss values ​​of various loss functions in the CO2 injection scenario in an embodiment of the present invention.

[0020] Figure 7 This is a comparison chart of the loss values ​​of various loss functions in the CO2 leakage scenario in an embodiment of the present invention.

[0021] Figure 8 1 is a comparison diagram of the actual value and the predicted value of the wellbore pressure profile in the CO2 injection scenario in an embodiment of the present invention; wherein (a) is a schematic diagram of the actual value, and (b) is a schematic diagram of the predicted value.

[0022] Figure 9 Schematic diagram of the relative error between the predicted value and the true value of the wellbore pressure profile in the CO2 injection scenario in an embodiment of the present invention.

[0023] Figure 10 1 is a comparison diagram of the actual value and the predicted value of the wellbore pressure profile in the CO2 leakage scenario in an embodiment of the present invention; among them, (c) is a schematic diagram of the actual value, and (d) is a schematic diagram of the predicted value.

[0024] Figure 11 Schematic diagram of the relative error between the predicted value and the true value of the wellbore pressure profile in the CO2 leakage scenario in an embodiment of the present invention.

[0025] Figure 12 1 is a comparison diagram of the actual value and the predicted value of the wellbore temperature profile in the CO2 injection scenario in an embodiment of the present invention; among them, (e) is a schematic diagram of the actual value, and (f) is a schematic diagram of the predicted value.

[0026] Figure 13 Schematic diagram of the relative error between the predicted value and the true value of the wellbore temperature profile in the CO2 injection scenario in an embodiment of the present invention.

[0027] Figure 14 : This is a comparison diagram of the actual value and the predicted value of the wellbore temperature profile in the CO2 leakage scenario in an embodiment of the present invention; among them, (g) is a schematic diagram of the actual value, and (h) is a schematic diagram of the predicted value.

[0028] Figure 15 Schematic diagram of the relative error between the predicted value and the true value of the wellbore temperature profile in the CO2 leakage scenario in an embodiment of the present invention.

[0029] Figure 16 This is a schematic diagram of the actual value of the wellbore phase distribution in the CO2 injection scenario in an embodiment of the present invention.

[0030] Figure 17 Schematic diagram of the predicted values ​​of wellbore phase distribution in the CO2 injection scenario in an embodiment of the present invention.

[0031] Figure 18 This is a schematic diagram of the true value of the wellbore phase distribution in the CO2 leakage scenario in an embodiment of the present invention.

[0032] Figure 19 Schematic diagram of the predicted values ​​of wellbore phase distribution in a CO2 leakage scenario in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: This invention establishes a coupled mathematical model of multiphase flow and heat transfer in geological storage (GCS) wellbore that takes into account the phase change behavior of CO2, and realizes the accurate characterization of the complex physical processes in the wellbore. In view of the unique dual sequence characteristics of wellbore parameters in the process of CO2 geological storage, this invention establishes a dual-channel feature extraction architecture based on the masked self-attention mechanism and the temporal pattern attention mechanism, and further combines the time fusion Transformer technology to form an intelligent prediction method for wellbore operation status based on a hybrid deep learning framework, which effectively captures the dependencies between different depth sequences and time scales, and significantly improves the prediction accuracy of complex multiphase flow and heat transfer phenomena during CO2 injection / leakage. Figure 1 As shown, the present invention includes the following steps: Step 1: Establish a GCS wellbore transient temperature-pressure coupling mathematical model and perform numerical solution. To accurately predict and effectively control the wellbore state and phase behavior during CO2 injection and leakage, it is urgent to establish a reliable numerical simulation tool. Based on the physical characteristics of the heat-fluid coupling process and engineering practice, a corresponding mathematical model was established, and the following basic assumptions were proposed: (1) A quasi-steady-state assumption was used to deal with the heat transfer process in the wellbore, while considering the unsteady heat exchange at the wellbore-formation interface. The physical basis of this assumption is the characteristic time scale difference between fluid flow and formation thermal response; (2) To accurately characterize the CO2 seepage temperature field, radial and axial heat conduction were considered in the wellbore, while only radial heat transfer terms were retained in the formation area, and radiation heat transfer effects were reasonably ignored based on low temperature conditions; (3) In the initial state, the wellbore system and the surrounding formation are in thermal equilibrium, and the temperature values ​​at each corresponding depth point along the vertical direction are equal; (4) A linear geothermal gradient was used to describe the initial formation temperature field distribution characteristics; (5) The influence of convective heat transfer and internal rock heat sources was ignored, and only the heat conduction mechanism was considered. These assumptions significantly improve computational efficiency while ensuring model accuracy, providing theoretical support for subsequent numerical solutions and engineering predictions.

[0034] The construction process of the GCS wellbore transient temperature-pressure coupling mathematical model is as follows: The first step is to construct the wellbore mass conservation equation, momentum conservation equation, and energy conservation equation. The flow and heat transfer process of CO2 inside the wellbore strictly follows the principle of mass conservation. For an infinitesimal control volume, the mass conservation equation can be expressed as: (1); Where, To control the volume; is the gas phase volume fraction; and denote the density of gas phase and liquid phase respectively; and denote the mass fractions of gas and liquid phases, respectively; and are the velocities of the gas and liquid phases, respectively; is the cross-sectional area; is the source-sink term; is the current time step; is the axial depth.

[0035] In the momentum conservation equation, the pressure change of CO2 fluid per unit length along the wellbore is determined by the gravity gradient, friction resistance, and acceleration gradient. The specific form of the momentum conservation equation is: (2); Where, For pressure; is the mixed density; is the mixing speed; is the coefficient that characterizes the degree of slip between the gas and liquid phases; is the wellbore inclination; is the wall shear stress, which is related to the wall roughness and flow state; is the perimeter of the cross-sectional area; is the acceleration due to gravity.

[0036] In order to accurately characterize the gas-liquid two-phase flow characteristics and interphase slip effect during the CO2 phase change process, the drift flow model is used to describe the multiphase flow dynamics. This model effectively describes the interphase slip phenomenon caused by physical property differences by treating the gas-liquid two-phase system as a quasi-single-phase fluid and introducing the interphase relative velocity parameter. Specifically, the model quantifies the interphase velocity difference by defining two key parameters: profile coefficient and drift velocity. Based on the theoretical framework of the drift flow model, the gas phase velocity in the wellbore is and liquid velocity Can be expressed as: (3); (4); Where, is the profile factor, which is used to calculate the effect of local gas saturation and velocity distribution in the pipe cross section; is the drift speed; is the characteristic density. By solving the above equations simultaneously, the phase velocities of the gaseous and liquid components in the CO2-brine mixture can be determined, thereby accurately solving the mass conservation equation.

[0037] When constructing the wellbore energy conservation equation, a partitioned modeling approach was employed to accurately characterize the differentiated heat transfer mechanisms during CO2 flow. Based on the differences in heat transfer characteristics, the computational domain was divided into two characteristic regions. The first region encompasses the one-dimensional steady-state heat transfer process from the wellbore center to the outer boundary of the cement sheath. The heat transfer behavior of each wellbore structural component (tubing, annulus, casing, and cement sheath) within this region can be expressed for an infinitesimal control volume as follows: (5); Where, for heat; is the radial length; is the total radius of the wellbore; is the total heat transfer coefficient; is the fluid velocity; is the fluid temperature in the wellbore; is the interface temperature between cement sheath and formation.

[0038] The second region involves the unsteady heat transfer process from the outer boundary of the cement sheath to the surrounding formation. For an infinitesimal control volume, the heat transfer dynamics of this process can be expressed as: (6); Where, is the formation thermal conductivity; is the formation temperature; is the dimensionless transient heat transfer function.

[0039] By systematically coupling the physical processes of the two heat transfer regions, a complete wellbore-formation thermal coupling mathematical model was constructed, as shown in Equation (7). This model simultaneously considers radial heat transfer and axial temperature gradients, and can accurately characterize the temperature distribution characteristics of CO2 during its flow along the wellbore.

[0040] (7); The flow and heat transfer process of CO2 in the wellbore strictly follows the principle of energy conservation. For an infinitesimal control volume, the complete energy conservation equation can be expressed as: (8); Where, is the Joule-Thomson coefficient; is enthalpy; is the specific heat capacity of CO2 at constant pressure. This energy conservation equation takes into account both the enthalpy change and the temperature change caused by the pressure gradient (Joule-Thomson effect), which is crucial for accurately predicting the temperature field distribution during CO2 wellbore flow.

[0041] During the flow of CO2, the fluid in the wellbore undergoes a complex phase change dynamic process. Under the combined effects of ground temperature and pressure gradient, CO2 exhibits significant non-equilibrium phase change characteristics, and its thermophysical properties undergo drastic changes, which in turn profoundly affects the flow-heat transfer coupling process. Specifically, when CO2 migrates from a high-pressure reservoir to a low-pressure wellhead, if the system pressure crosses the phase equilibrium boundary, a flash phase change phenomenon will be triggered. This flash process is accompanied by latent heat absorption and rapid volume expansion. In this process, the Joule-Thomson effect of CO2 is coupled with the thermal effect of the phase change latent heat, jointly determining the changing trend of the fluid temperature. Based on the Span-Wagner equation, the Joule-Thomson coefficient can be expressed as: (9); in, is temperature; is the molar volume of the gas; In the critical region of CO2 phase transition, the Joule-Thomson effect and the latent heat of phase transition produce significant thermodynamic coupling, resulting in a strongly nonlinear temperature field. This coupling significantly alters key fluid properties such as viscosity and density, thereby affecting flow characteristics and heat transfer mechanisms within the wellbore. The energy conservation equations proposed in this paper account for these coupled thermal effects and unify them through pressure gradient and temperature conduction terms.

[0042] The second step is to construct a CO2 physical property parameter model. According to the transport characteristics of CO2 in saline water layers, its physical properties can be divided into thermophysical properties and flow properties. Thermophysical properties mainly include CO2 density, specific heat capacity and Joule-Thomson coefficient, while flow properties mainly include CO2 viscosity and thermal conductivity of various materials. For different working conditions, the present invention adopts differentiated physical property calculation methods. In the pure CO2 injection condition, the Span-Wagner state equation is used to calculate the physical property parameters. This equation is based on the Helmholtz free energy and can accurately describe the key thermodynamic parameters of CO2 over a wide temperature and pressure range. During the CO2 leakage process, the mixing of CO2 and brine will cause the fluid properties to deviate from the ideal state. Therefore, the improved PR state equation is used to calculate the thermodynamic properties of the CO2-brine mixture. By combining the mixing rule and the binary interaction parameter, this method accurately represents the non-ideal characteristics of the mixture, especially the thermodynamic behavior near the critical point.

[0043] The transient temperature-pressure coupling mathematical model is a complex multi-physics problem, which includes the mass conservation equation, momentum conservation equation and energy conservation equation. In order to obtain a high-precision numerical solution, the temperature-pressure dual iterative algorithm is used for coupling solution. The specific implementation process is as follows: In the axial dimension, the wellbore is discretized into The finite volume method is used to integrate the mass, momentum and energy conservation equations in each unit to form a nonlinear system of equations. The temperature field and pressure field are solved synchronously by the Newton-Raphson iteration method, and the CO2 physical parameters are updated in each iteration until the convergence conditions are met. In the radial dimension, a multi-layer heat transfer model including tubing, annulus, casing, cement ring and formation is established. By calculating the thermal resistance between adjacent layers, the total heat transfer coefficient is derived and coupled to the energy conservation equation to update the temperature field distribution. The detailed GCS wellbore transient temperature-pressure coupling mathematical model solution process is as follows: Figure 2 As shown in the figure, specifically: Based on the established transient temperature-pressure coupling mathematical model, combined with the actual wellbore structural parameters and reservoir configuration of the GCS well under field conditions (i.e., setting basic parameters), the wellbore mesh is created to construct a one-dimensional wellbore conceptual model. During the first iteration, parameters are initialized, assigning initial values ​​for the pressure profile (the pressure profile represents the pressure distribution throughout the wellbore from the wellhead to the bottom) and the temperature profile (the temperature profile represents the temperature distribution throughout the wellbore from the wellhead to the bottom). Next, a comprehensive CO2 physical property parameter model is established that accurately describes the changes in CO2 physical properties under different temperature and pressure conditions. Starting from the second iteration, the pressure profile for the current iteration is calculated based on the mass conservation equation, taking into account the temperature profile from the previous iteration. Furthermore, the temperature profile for the current iteration is calculated by coupling the energy conservation equation based on the pressure profile and the heat transfer parameters from the previous iteration. The heat transfer parameters for the current iteration are calculated based on the pressure and temperature profiles and the flow rate extracted from the mesh. During each iteration, strict convergence criteria are established. The relative errors between the two iterations are compared to verify that the calculations have reached the preset convergence accuracy. If convergence criteria are not met, the calculation parameters are adjusted and the iteration is repeated to ensure the stability and accuracy of the numerical solution. When convergence criteria are met, the pressure and temperature profile calculations corresponding to the current time step are output and used as the initial conditions for the next iteration. The solution process continues with each iteration until the entire wellbore transient temperature-pressure coupled calculation process is completed.

[0044] Step 2: Construct a dual sequence feature database covering CO2 injection and leakage conditions; During CO2 injection and leakage, the wellbore pressure, temperature profile, and CO2 phase distribution exhibit significant multidimensional dynamic characteristics. These parameter fields are affected by the combined effects of injection conditions, geothermal gradients, and pressure gradients, and exhibit distinct spatiotemporal evolution patterns. Specifically: First, the wellbore profile and temperature profile exhibit typical depth dependence, with their gradients increasing above the critical depth, then stabilizing and reaching dynamic equilibrium with the formation environment. Second, the phase transition process exhibits strong nonlinear characteristics, and its spatial distribution is closely coupled with the temperature-pressure field. These distribution patterns indicate that a multi-scale characterization method that simultaneously considers both the depth and time dimensions must be established to accurately describe the dynamic evolution of wellbore thermodynamic parameters.

[0045] Therefore, the present invention is based on the data characteristics of the two most representative scenarios in CO2 geological storage projects, and by dividing the data of CO2 injection and leakage scenarios, a dual sequence feature database covering CO2 injection / leakage conditions is constructed. In the CO2 injection scenario, the time step, injection pressure, injection temperature, injection rate, initial wellbore temperature profile, initial wellbore pressure profile and wellbore configuration parameters are used as input parameters, and the wellbore pressure, temperature profile and CO2 phase distribution at each time step are solved based on a high-precision wellbore transient temperature-pressure coupling mathematical model as output responses to establish a dual sequence feature database for CO2 injection conditions; in the CO2 leakage scenario, the time step, wellhead leakage pressure, initial wellbore temperature profile, initial wellbore pressure profile and wellbore configuration parameters are used as input parameters, and the wellbore pressure profile, temperature profile and CO2 phase distribution at each time step are solved based on a high-precision wellbore transient temperature-pressure coupling mathematical model as output responses to establish a dual sequence feature database for CO2 leakage conditions. By combining the above two databases, a dual sequence feature database covering CO2 injection and leakage conditions was constructed, which was used in the subsequent training process of the GCS wellbore operation status intelligent prediction method.

[0046] Step 3: The spatial distribution features along the wellbore depth are extracted through the masked self-attention mechanism, the temporal pattern attention mechanism is used to dynamically analyze the wellbore state evolution law, and the dual sequence features are processed using a parallel architecture to construct an improved dual attention network; In order to effectively capture the depth sequence characteristics of the wellbore, this paper proposes a depth sequence feature extraction method based on the masked self-attention mechanism. This method realizes efficient modeling of depth sequence data through a special mask matrix design and position encoding scheme. The basic principle of the masked self-attention mechanism is to control the direction of information flow through masking operations and enhance the information representation of depth positions through relative position encoding. Specifically, given an input sequence ,in Indicates the The feature vector of the wellbore depth position, the mask matrix The design follows the principle of one-way information flow: (10); Where, is the wellbore depth position index, that is, the currently calculated depth position; is the source depth position, that is, the source depth position of the input information. Indicates that information from the current depth position and above is allowed to pass. This design strictly adheres to the directional propagation characteristics of the wellbore physical process, minimizing the false correlations that do not conform to physical laws in model learning, and effectively improving the stability and convergence efficiency of the training process. The specific position encoding equation is as follows: (11); (12); Where, is the encoding function; is the encoding dimension index; is the total number of feature dimensions; is a scaling factor that controls the periodic changes between dimensions. This encoding mechanism can accurately capture the relative relationship between different wellbore depth positions and effectively characterize the continuous change pattern of wellbore state parameters along the depth sequence, thereby improving its prediction performance across different depth ranges.

[0047] The multivariate time series characteristics (including injection temperature, pressure, and injection rate) during CO2 injection and leakage show strong multi-scale time dependence, including both short-term physical parameter fluctuations caused by local phase changes and long-term stable change trends. In view of the above characteristics, the present invention develops a time series pattern attention mechanism based on convolution enhancement to extract local time series features within the CO2 injection and leakage operation cycle. After preprocessing the time series data at different operating times, a series of hidden state vectors are extracted and a hidden state matrix is ​​formed. In order to extract the key temporal pattern features from the matrix, a one-dimensional convolution operation is used to perform convolution calculation on the hidden state matrix. Use a one-dimensional convolution kernel to convolve the hidden state matrix along the The row vector of the convolution operation is performed to obtain the time series pattern matrix , the specific formula is: (13); Where, For the The row vector is passed through The elements of the timing pattern matrix extracted by the filters; is the index number of the receptive field width of the one-dimensional convolution kernel; is the receptive field width of the one-dimensional convolution kernel; For the The row vector is passed through The elements of the timing pattern matrix extracted by the filters; For the The filter weights; is the current time step; is the total number of time steps. In addition, the scoring function is defined as the sigmoid function as the activation function for attention weight calculation, and the expressions for weight calculation are: (14); (15); Where, is the scoring function; for No. row vectors; is transposed; is the current time step The hidden layer state of is the weight matrix for autonomous learning; is the normalized weight parameter; is the sigmoid function. The weight matrix is ​​used to transform the time series pattern matrix Perform weighted summation on each row of to get the current time step The attention vector This vector comprehensively considers the impact of all row vectors on the current hidden layer state. Its calculation formula is: (16); Where, The total number of features of the input variables for the temporal pattern attention mechanism. Subsequently, the attention vector and the hidden layer state After weighted linear mapping and superposition, the output value of the temporal pattern attention mechanism is obtained, and the formula is as follows: (17); in, for The output value when ; For the prediction time length; and are the weight parameter matrices for the hidden layer state and attention vector, respectively. The temporal pattern attention mechanism dynamically adjusts the weight distribution across feature dimensions by analyzing the correlation between historical state features and the current moment, thereby more comprehensively capturing the dynamic evolution of time series data.

[0048] By integrating these complementary attention mechanisms, the invention develops an improved dual attention network specifically for analyzing and processing transient pressure, temperature profiles and CO2 phase distribution with dual sequence characteristics in CO2 geological storage. This enhanced architecture can effectively capture pressure ,temperature ,flow The spatial dependence and temporal evolution patterns of CO2 physical properties in depth series provide a reliable theoretical analysis tool for the safety assessment and risk prediction of CO2 geological storage systems. Figure 3 The GCS wellbore data with dual sequence characteristics are presented, which effectively characterizes the coupling characteristics of depth series and time series. 、 、 、 are the pressure, temperature, flow rate and CO2 physical properties parameters of the first wellbore grid respectively.

[0049] Step 4: By coupling the improved dual attention network and the time fusion Transformer, a hybrid deep learning framework DT-DANet is established to form an intelligent prediction method for the operation status of the GCS wellbore. The present invention develops a hybrid deep learning framework DT-DANet. By organically combining the improved dual attention network and the time fusion Transformer architecture, it accurately predicts the spatiotemporal distribution of the wellbore pressure and temperature profiles during CO2 injection and leakage, and analyzes the evolution law of the CO2 phase. After processing the deep sequence and time series data respectively through the masked self-attention mechanism and the temporal pattern attention mechanism, these local features need to be integrated and dimensionally aligned to output the wellbore pressure and temperature profiles at different time steps and predict the CO2 phase distribution. To this end, the present invention designs a global feature extraction module based on the time fusion Transformer. Its main goal is to achieve comprehensive characterization and prediction of the wellbore parameter field at different time steps by deeply fusing the local spatiotemporal features extracted by the improved dual attention network module and the global dependencies captured by the time fusion Transformer module. The temporal fusion Transformer module takes as input the local spatiotemporal features extracted by the improved dual attention network, where deep sequence information is encoded via a masked self-attention mechanism, and time series patterns are represented by a temporal pattern attention mechanism. In terms of feature processing, the temporal fusion Transformer module adopts a differentiated encoding strategy: for static variables such as wellbore depth and formation properties, a static covariate encoder is used to extract their long-term impact features; for dynamic variables such as injection temperature, pressure, and CO2 rate, a variable selection network is used to screen features, and a sequence-to-sequence architecture is used to model their dynamic evolution process. The variable selection network selects relevant input variables for each time step, strengthening the key control factors for the prediction task and weakening or discarding irrelevant information, thereby optimizing the representation of input features and enabling the model to focus more on accurately predicting the target.

[0050] A hybrid deep learning framework, DT-DANet, is constructed by coupling an improved dual-attention network with a temporal fusion Transformer. This framework employs a multi-stage training strategy: First, deep sequence data (pressure and temperature profiles) are processed using a masked self-attention mechanism, effectively preserving the directional characteristics of CO2 flow. Simultaneously, time series data (injection pressure, temperature, and CO2 rate) are encoded using a temporal pattern attention mechanism to accurately capture their dynamic evolution. These local spatiotemporal features are then fed into a temporal fusion Transformer module. A variable selection network and a time-aware processing layer model global dependencies and integrate historical and static feature information. Finally, after nonlinear transformations using a gated residual network and a multi-head attention mechanism, the framework outputs comprehensive predictions of wellbore pressure and temperature profiles, as well as CO2 phase distribution. The variable selection network performs feature selection, while the time-aware processing layer explicitly encodes time intervals and periodicity, enhancing the model's ability to extract information about temporal nonstationarity, the effects of time delays, and dynamic trends.

[0051] Step 5. Use a composite loss function to perform collaborative optimization training on the hybrid deep learning framework. The output of the framework is the wellbore pressure profile, temperature profile and phase distribution at different time steps, which can achieve accurate prediction of transient pressure propagation characteristics, dynamic evolution of temperature field and long-term system. The hybrid deep learning framework DT-DANet uses multiple loss functions for joint training. This process combines the main loss function of the prediction task with the auxiliary loss function of the constraint condition. This joint training process enhances the physical interpretability of the model while ensuring the prediction accuracy. Specifically, the main loss term adopts the form of mean square error to strictly quantify the deviation between the predicted temperature field and pressure field distribution and the numerical simulation results. Its mathematical expression is: (18); (19); (20); Where, is the main loss function; coefficient and are different weighting factors used to balance the relative importance of wellbore temperature and pressure prediction in the CO2 injection and leakage processes; and are the prediction errors of wellbore temperature and pressure, respectively; 、 Respectively The predicted and actual values ​​of the wellbore temperature; is the total number of wellbore temperatures; 、 Respectively The predicted value and actual value of each pressure; is the total number of pressures.

[0052] To enhance the model's physical plausibility and interpretability, several auxiliary loss functions were incorporated into the training process: a temporal attention consistency loss ensures a smooth transition between attention distributions at adjacent time steps, preventing unphysical jumps in predictions; and a physical constraint loss penalizes unreasonable gradients in pressure and temperature predictions along the wellbore depth. These auxiliary loss functions are optimized collaboratively with the primary loss term to form a composite loss function.

[0053] (twenty one); (twenty two); (twenty three); Where, is the temporal attention consistency loss function; is the physical constraint loss function; is the composite loss function; 、 The current time step , the previous time step The temporal attention matrix of is the total time step; and are used to penalize unrealistic gradients in wellbore pressure and temperature predictions, respectively. and is the weight coefficient in different loss functions, which is used to balance the importance of different loss terms.

[0054] The Adam optimizer combined with an adaptive learning rate scheduling strategy was used for model training optimization. This training mechanism employs a two-stage adjustment strategy: during the initial warm-up phase, the learning rate is gradually increased, effectively avoiding parameter oscillations during the initial stages of training. Subsequently, the learning rate is dynamically adjusted during the decay phase to ensure the model's stable convergence to the global optimal solution. This comprehensive training strategy not only significantly improves the model's prediction accuracy for wellbore pressure and temperature profiles but, more importantly, ensures that the model output strictly adheres to the physical laws of CO2 flow and heat transfer while maintaining the interpretability of the attention mechanism, ultimately enabling reliable generalization to various CO2 geological storage scenarios.

[0055] In order to demonstrate the feasibility and superiority of the present invention, the following examples are given.

[0056] Taking a GCS well from an actual CO2 geological storage project as an example, a one-dimensional conceptual wellbore model was constructed to systematically simulate the CO2 injection process and potential wellbore leakage scenarios in saline aquifers. The model was designed based strictly on the actual wellbore structure and reservoir geological conditions. Key wellbore structure and reservoir condition configuration parameters are shown in Table 1.

[0057] Table 1 Wellbore structure and reservoir condition configuration parameters .

[0058] Based on the above data, the method presented herein predicts the operating status of a target GCS wellbore under CO2 injection and leakage scenarios. The specific steps are as follows: A transient temperature-pressure coupled mathematical model for the GCS wellbore is established according to the process in step 1, taking into account the CO2 phase transition behavior. Based on the set wellbore structural parameters and reservoir conditions, a one-dimensional conceptual wellbore model is constructed to verify the transient temperature-pressure coupled mathematical model. Figure 4 、 Figure 5 The comparison diagrams of the predicted and actual values ​​of the wellbore pressure profile and temperature profile are shown in Figure 2. Figure 4 and Figure 5 It can be seen that the numerical calculation results (predicted values) show good consistency with the field test data (actual values). Specifically, the relative error between the model-predicted pressure profile and the actual measured value ranges from 0.23% to 1.18%, while the temperature profile prediction error is controlled within the range of 0.11% to 0.78%. These verification results demonstrate that the established mathematical model has excellent predictive accuracy, and the error between its calculated results and the field measured data fully meets the engineering accuracy requirements.

[0059] Following the process in step 2, a dual-sequence feature database covering CO2 injection and leakage conditions is constructed. This example conducts numerical simulations based on two of the most representative scenarios from actual CO2 geological storage projects. In the CO2 injection simulation, the complete CO2 injection process along the wellbore is simulated by setting different injection pressures, temperatures, and injection rates. The specific injection parameters are defined as follows: temperature variation ranges from -20°C to 40°C, pressure variation ranges from 5 MPa to 30 MPa, and injection rate variation ranges from 5 kg / s to 80 kg / s. Wellbore configuration parameters, primarily including wellbore depth, diameter, and surface roughness, are predetermined during the wellbore design phase and remain constant throughout the operation. These parameter settings cover a wide range of conditions potentially encountered in actual engineering applications and facilitate a comprehensive evaluation of the model's predictive capabilities under different injection scenarios. Therefore, the input parameters for the CO2 injection scenario include: time step, injection pressure, injection temperature, injection rate, initial wellbore temperature distribution, initial wellbore pressure distribution, and wellbore configuration parameters. The output parameters include the pressure and temperature profiles along the wellbore within discrete time intervals, as well as the axial distribution of the CO2 phase. In the CO2 leakage simulation, different wellhead leakage pressures (constant pressure boundary conditions are set at the wellhead) are set to simulate leakage caused by valve failure, specifically 1 MPa to 10 MPa. The input parameters for this scenario include the time step, wellhead leakage pressure, initial wellbore temperature distribution, initial wellbore pressure distribution, and wellbore configuration parameters. The corresponding output parameters are the wellbore pressure, temperature profile, and axial distribution of the CO2 phase within discrete time intervals during the leakage process. Considering the differences in input parameters between the two scenarios, a dedicated prediction model was developed for each scenario to ensure excellent performance under both typical conditions, significantly improving the reliability and practical value of the engineering application.

[0060] This example generated 410 wellbore numerical simulation scenarios for two typical CO2 injection and leakage conditions. 300 of these scenarios were used for model training, 80 for hyperparameter optimization within the hybrid deep learning framework, and the remaining models for evaluating model generalization. Each simulation scenario was run for a full 2400 seconds: for injection, the injection rate parameters were dynamically adjusted at 600-second intervals; for leakage, a 400-second pre-injection phase and a 2000-second leakage phase were used.

[0061] According to the process of step 3, a hybrid deep learning framework is established and the framework topology is adjusted. The invention establishes a hybrid deep learning framework DT-DANet by coupling the improved dual attention network and the time fusion Transformer. The framework adopts a hierarchical data processing process. First, the local spatiotemporal features [B, T step ,Q, U], where B is the batch size, Tstep is the time step, Q is the number of wellbore grid cells, and U is the hidden layer feature dimension. These features are then input into the temporal fusion Transformer module for global feature extraction. During the feature processing stage, the framework employs a differentiated strategy for handling static and dynamic variables. Static variables (wellbore depth distribution and formation properties) are encoded into [B, Q, Hs] feature representations via a linear transformation layer, while dynamic variables (CO2 injection pressure, temperature, and rate) are subjected to a gating mechanism to calculate importance scores [B, T, Hd], enabling dynamic screening of key parameters. T is temperature, Hs is the hidden dimension of the static features, and Hd is the hidden dimension of the dynamic features. This design effectively balances the requirements for representing time-invariant and time-varying features. The temporal fusion Transformer module extracts complex dual-sequence features through multi-layer processing. The temporal processing layer combines positional encoding to capture temporal dependencies, and a multi-head attention mechanism processes features at different time scales in parallel, with each attention head focusing on transient responses and long-term evolution patterns, respectively. The feature transformation network establishes the interactive relationship between static wellbore properties and dynamic injection parameters through a cross-attention mechanism. Finally, the framework analyzes the importance of each input feature through the interpretation layer and outputs the wellbore pressure and temperature profiles [B, T step , Q, 2]. This end-to-end architecture design not only preserves the fine structure of local features but also effectively models global dependencies. A systematic hyperparameter optimization strategy significantly improves model performance, with differentiated configurations tailored to the specific characteristics of CO2 injection and leakage scenarios. Table 2 details the specific hyperparameters of the hybrid deep learning framework. In terms of training settings, 250 and 200 training sub-epochs were used for the injection and leakage scenarios, respectively, to ensure convergence while optimizing computational efficiency. The model uses a batch size of 64, with dropout rates of 0.4 and 0.5 for the injection and leakage scenarios, respectively. In terms of architectural design, the GELU activation function, with its smooth gradient properties, was selected, and the Adam optimizer (with an initial learning rate of 0.0001) was employed to ensure stable convergence. The number of attention heads for the injection and leakage scenarios was set to 8 and 6, respectively. Combined with a 256-dimensional hidden layer representation and a 128-dimensional positional encoding dimension, this fully captures dual sequence features. A stack of three layers of temporally fused Transformer modules forms a hierarchical feature extraction system. The entire training process is guided by a composite loss function. This sophisticated hyperparameter configuration scheme enables the model to demonstrate excellent performance under different working conditions.

[0062] Table 2. Hyperparameter configuration of hybrid deep learning framework .

[0063] According to the process of step 4, an intelligent prediction method for GCS wellbore operation status is established. Figure 6and Figure 7 The comparison of the loss values ​​of each loss function of the proposed method in the CO2 injection and leakage scenarios during the entire training process is shown, especially the change of the composite loss function. Since the method mainly predicts the axial temperature and pressure distribution of the wellbore at discrete time steps and then derives the CO2 phase distribution, the loss functions of the wellbore pressure and temperature are integrated to comprehensively evaluate the training convergence. The visualization results show that the composite loss function in the CO2 injection scenario It stabilizes after 220 epochs and eventually converges to about 0.38; the composite loss function in the CO2 leakage scenario After 165 epochs, the prediction accuracy gradually stabilized and finally converged to approximately 0.17. This convergence behavior not only confirms the completeness of the training process but also demonstrates the model's balance between prediction accuracy and physical consistency. To verify the performance of the trained prediction method under different wellhead injection parameters and well configuration parameters, representative scenarios were selected from a test set of CO2 injection and leakage scenarios. These scenarios cover typical operating conditions such as dynamic injection strategy changes and extreme wellhead failures, aiming to rigorously test the model's adaptability and robustness under complex engineering conditions. The detailed parameter configurations for these two operating conditions are shown in Table 3.

[0064] Table 3 Detailed parameter configuration of the example solution .

[0065] Figure 8 A comparison chart of the actual and predicted wellbore pressure profiles for the CO2 injection scenario; Figure 8 (a) and (b) are schematic diagrams of the true value and the predicted value, respectively. Figure 9 Schematic diagram of the relative error between the predicted and true values ​​of the wellbore pressure profile in the CO2 injection scenario. Figure 10 A comparison chart of the actual and predicted values ​​of the wellbore pressure profile in the CO2 leakage scenario; Figure 10 (c) and (d) are schematic diagrams of the true value and the predicted value, respectively. Figure 11Schematic diagram of the relative error between the predicted and true values ​​of the wellbore pressure profile for the CO2 leakage scenario. For the CO2 injection scenario, despite the increased input complexity brought about by the dynamically changing injection parameters, the model can still robustly predict the wellbore pressure profile. The average relative error of the prediction results at different time steps and depths is only 4.7%, and the error of all prediction points is controlled within 8%, fully demonstrating that the prediction method can accurately capture the temporal dynamics of injection parameter fluctuations and their impact on the axial pressure distribution. For the prediction of the wellbore pressure profile in the leakage scenario, the method maintains good prediction performance, with the prediction error always remaining below 3% and averaging 1.7%. Even under extreme wellhead failure conditions, the prediction method can still accurately characterize the pressure distribution characteristics and leakage dynamics behavior, demonstrating excellent robustness under complex operating conditions. In addition, the prediction method performs well in predicting axial temperature profiles. Figure 12 A comparison chart of the actual and predicted wellbore temperature profiles for the CO2 injection scenario; Figure 12 (e) and (f) are schematic diagrams of the true value and the predicted value, respectively. Figure 13 Schematic diagram of the relative error between the predicted and true values ​​of the wellbore temperature profile in the CO2 injection scenario. Figure 14 This is a comparison chart of the actual and predicted values ​​of the wellbore temperature profile in the CO2 leakage scenario. Figure 14 (g) and (h) are schematic diagrams of the true value and the predicted value, respectively. Figure 15 The figure below shows the relative error between the predicted and true values ​​of the wellbore temperature profile for the CO2 leakage scenario. For the CO2 injection scenario, the relative error of the model-predicted axial temperature profile remained within 3%, averaging 1.6%, accurately capturing the gradual cooling effect of low-temperature CO2 on the bottomhole temperature during dynamic injection. Of particular note, the model successfully reproduced the nonlinear evolution of the cooling degree caused by changes in injection rate, demonstrating its ability to analyze complex thermodynamic processes. In the leakage scenario, the prediction error also remained below 4%, averaging 1.8%, accurately characterizing the sudden drop in wellhead temperature. This phenomenon stems from the synergistic effect of CO2 phase transition heat absorption and the Joule-Thomson effect under leakage conditions, and is highly consistent with the wellhead freezing phenomenon observed in the field. These results fully verify the accuracy and reliability of this method in predicting temperature profiles during CO2 injection and leakage.

[0066] Based on the wellbore pressure and temperature profiles predicted by this method, the CO2 phase distribution along the wellbore axis was calculated. Figure 16 and Figure 17 Schematic diagrams of the actual and predicted values ​​of wellbore phase distribution in the CO2 injection scenario. Figure 18 and Figure 19 Schematic diagrams of the actual and predicted values ​​of the wellbore phase distribution in the CO2 leakage scenario. Figure 17 and Figure 19The "Error" in the equation represents the error between the true and predicted wellbore phase distribution. In the injection scenario, the phase prediction error primarily occurs during the fourth injection rate change. This is due to the significant difference between the third and fourth injection rates, which results in a partial deviation in the model's capture of the trend change. Notably, the error is concentrated in the critical region where the liquid phase transitions to the supercritical state. However, thanks to the highly accurate predictions of the temperature and pressure fields, the overall predicted phase distribution shows near-perfect agreement with the true value. In the leak scenario, the model successfully reproduces the complex phase transition dynamics: within the initial 1500 seconds, CO2 in the wellhead region briefly transitions from a supercritical state to a liquid state, followed by a rapid vaporization to a gaseous state that extends downward to a depth of 2500 meters. The predicted results are highly consistent with the real data. Although there are slight differences in the widths of the gas and liquid phases, the overall phase evolution pattern is fully consistent with theoretical expectations considering the Joule-Thomson effect and phase transition endothermicity. These results fully validate the model's reliability and accuracy in CO2 phase prediction.

[0067] To comprehensively evaluate the performance of this prediction method, a rigorous comparative analysis was conducted with typical machine learning and deep learning methods, including XGBoost, convolutional neural networks (CNN), and long short-term memory networks (LSTM). To ensure a fair comparison, all compared models used the same parameter configuration and training strategy. The coefficient of determination (R 2 ) and root mean square error (RMSE) as evaluation metrics to quantitatively analyze the performance of each method in predicting wellbore pressure and temperature profiles. Table 4 comprehensively summarizes the comparative results of different methods in CO2 injection and leakage scenarios.

[0068] Table 4 Evaluation index performance of different deep learning methods in predicting wellbore operation status .

[0069] The systematic comparative analysis shows that the DT-DANet of the present invention has significant advantages in processing dual sequence data. 2The DT-DANet model outperforms the competing models in both performance and RMSE metrics, demonstrating excellent prediction accuracy. The traditional machine learning method, XGBoost, is most limited due to its inability to effectively model dynamic sequence correlations. Among deep learning methods, CNN demonstrates excellent spatial feature extraction capabilities and can effectively analyze the distribution of wellbore depth. However, it lacks the ability to capture the continuity between adjacent depth points, which can lead to unphysical jumps in prediction results. While LSTM performs well in time series modeling, its neglect of spatial constraints limits its performance in dual-sequence tasks. Notably, in CO2 leakage scenarios, due to the constant wellhead pressure, depth-sequence features become the dominant factor. This allows CNN's spatial processing capabilities to be better utilized, narrowing the performance gap between DT-DANet and LSTM. These comparative results fully demonstrate the superiority and applicability of DT-DANet for CO2 geological storage wellbore state prediction. A practical application demonstrates that this method achieves excellent performance in prediction tasks involving dual-sequence features in the depth and time dimensions. Leveraging its unique attention mechanism and advanced global feature extraction capabilities, this method accurately characterizes the pressure, temperature, and CO2 phase distribution within the wellbore during complex CO2 injection and leakage processes. The contribution of this invention is that it provides a more accurate and efficient wellbore status monitoring tool for CO2 geological storage. Its prediction results can directly support on-site engineers in safety assessment and decision optimization, and have important engineering application value.

[0070] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the scope of protection of the present invention.

Claims

1. A method for intelligent prediction of wellbore operation status based on a hybrid deep learning framework, characterized in that: The steps include: Step 1: Establish a mathematical model of transient temperature-pressure coupling in a geological storage wellbore and perform numerical solution; Step 2: Construct a dual sequence feature database covering CO2 injection and leakage conditions; Step 3: Use a parallel architecture to process dual sequence features and construct an improved dual attention network; Step 4: Establish a hybrid deep learning framework DT-DANet by coupling the improved dual attention network and the temporal fusion Transformer; Step 5: Use a composite loss function to perform collaborative optimization training on the hybrid deep learning framework, the output of which is the wellbore pressure profile, temperature profile, and phase distribution at different time steps.

2. The method for intelligent prediction of wellbore operation status based on a hybrid deep learning framework according to claim 1 is characterized in that: In step 1, the process of constructing the transient temperature-pressure coupled mathematical model of the geological storage wellbore is as follows: first, constructing the wellbore mass conservation equation, momentum conservation equation, and energy conservation equation in sequence; then constructing the CO2 physical property parameter model; The mass conservation equation is: ; Where, To control the volume; is the gas phase volume fraction; and denote the density of gas phase and liquid phase respectively; and denote the mass fractions of gas and liquid phases, respectively; and are the velocities of the gas and liquid phases, respectively; is the cross-sectional area; is the source-sink term; is the current time step; is the axial depth; The momentum conservation equation is: ; Where, For pressure; is the mixed density; is the mixing speed; is the coefficient that characterizes the degree of slip between the gas and liquid phases; is the wellbore inclination; is the wall shear stress; is the perimeter of the cross-sectional area; is the acceleration due to gravity; The energy conservation equation is: ; Where, is the fluid temperature in the wellbore; is the radial length; is the Joule-Thomson coefficient; is enthalpy; is the specific heat capacity of CO2 at constant pressure; for heat; is the fluid velocity; The CO2 physical property parameter model includes thermophysical properties and flow properties; the thermophysical properties include CO2 density, specific heat capacity and Joule-Thomson coefficient, and the flow properties include CO2 viscosity and thermal conductivity of various materials.

3. The method for intelligent prediction of wellbore operation status based on a hybrid deep learning framework according to claim 2 is characterized in that: In step 1, the temperature-pressure dual iterative algorithm is used to couple and solve the transient temperature-pressure coupling mathematical model. The specific process is as follows: Based on the actual wellbore structural parameters and reservoir conditions of the geological storage well under mining conditions, the wellbore grid is divided and a one-dimensional wellbore conceptual model is constructed; In the first iteration, the parameters are initialized first, and the initial pressure profile and temperature profile are assigned; then, the CO2 physical property parameter model is established; Starting from the second iteration, the pressure profile of the current iteration step is calculated based on the mass conservation equation by considering the temperature profile of the previous iteration step. The temperature profile of the current iteration step is further calculated by coupling the energy conservation equation based on the pressure profile of the current iteration step and the heat transfer parameters of the previous iteration step. The heat transfer parameters of the current iteration step are calculated based on the pressure profile, temperature profile, and flow rate extracted from the grid. In the calculation process of each iterative step, a convergence judgment criterion is established to check whether the calculation has reached the preset convergence accuracy by comparing the relative errors of the two iterative results. If the convergence condition is not met, adjust the calculation parameters and return to perform iterative calculation again; When the convergence conditions are met, the pressure profile calculation results and temperature profile calculation results corresponding to the current time step are output and used as the initial conditions for the next iterative step calculation. The iterative step is continued to solve the problem until the entire wellbore transient temperature-pressure coupling calculation process is completed.

4. The method for intelligent prediction of wellbore operation status based on a hybrid deep learning framework according to claim 1 is characterized in that: The specific process of step 2 is as follows: in the CO2 injection scenario, using the time step, injection pressure, injection temperature, injection rate, initial wellbore temperature profile, initial wellbore pressure profile and wellbore configuration parameters as input parameters, solving the wellbore pressure, temperature profile and CO2 phase distribution at each time step as output responses based on the wellbore transient temperature-pressure coupling mathematical model, and establishing a dual sequence feature database for CO2 injection conditions; in the CO2 leakage scenario, using the time step, wellhead leakage pressure, initial wellbore temperature profile, initial wellbore pressure profile and wellbore configuration parameters as input parameters, solving the wellbore pressure profile, temperature profile and CO2 phase distribution at each time step as output responses based on the wellbore transient temperature-pressure coupling mathematical model, and establishing a dual sequence feature database for CO2 leakage conditions; combining the two databases to construct a dual sequence feature database covering CO2 injection and leakage conditions.

5. The method for intelligent prediction of wellbore operation status based on a hybrid deep learning framework according to claim 1 is characterized in that: In step 3, the improved dual attention network extracts local spatiotemporal features through two complementary attention mechanisms: a masked self-attention mechanism and a convolution-enhanced temporal pattern attention mechanism. The masked self-attention mechanism extracts spatial distribution features along the wellbore depth, and the temporal pattern attention mechanism extracts local temporal features within the CO2 injection and leakage operation cycle. The basic principle of the masked self-attention mechanism is to control the direction of information flow through masking operations and enhance the information representation of deep positions through relative position encoding; given an input sequence ,in Indicates the The feature vector of the wellbore depth position, the mask matrix The design follows the principle of one-way information flow: ; Where, is the wellbore depth position index; is the source depth position; the specific position encoding equation is as follows: ; ; Where, is the encoding function; is the encoding dimension index; is the total number of feature dimensions; A scaling factor to control the periodic changes between dimensions; The specific working process of the temporal pattern attention mechanism is as follows: after preprocessing the temporal data at different running times, a series of hidden state vectors are extracted and a hidden state matrix is ​​formed. ; Use a one-dimensional convolution kernel along the hidden state matrix The row vector of the convolution operation is performed to obtain the time series pattern matrix , the specific formula is: ; Where, For the The row vector is passed through The elements of the timing pattern matrix extracted by the filters; is the index number of the receptive field width of the one-dimensional convolution kernel; is the receptive field width of the one-dimensional convolution kernel; For the The row vector is passed through The elements of the timing pattern matrix extracted by the filters; For the The filter weights; is the current time step; is the total number of time steps; the scoring function is defined as the sigmoid function, which is used as the activation function for attention weight calculation. The expression for weight calculation is: ; ; Where, is the scoring function; for No. row vectors; is transposed; is the current time step The hidden layer state of is the weight matrix for autonomous learning; is the normalized weight parameter; is the sigmoid function; Use weight matrix to compare the time series pattern matrix Perform weighted summation on each row of , and get the current time step The attention vector , the formula is: ; Where, The total number of features of the input variables to the temporal pattern attention mechanism; Then, the attention vector and the hidden layer state After weighted linear mapping and superposition, the output value of the temporal pattern attention mechanism is obtained, and the formula is as follows: ; in, for The output value when ; For the prediction time length; and are the weight parameter matrices of the hidden layer state and attention vector respectively.

6. The method for intelligent prediction of wellbore operation status based on a hybrid deep learning framework according to claim 5 is characterized in that: In step 4, the temporal fusion Transformer module uses the local spatiotemporal features extracted by the improved dual attention network as input, where the deep sequence information is encoded by the masked self-attention mechanism, and the time series pattern is represented by the temporal pattern attention mechanism. In terms of feature processing, the temporal fusion Transformer module adopts a differentiated encoding strategy: for the static variables of wellbore depth and formation attributes, their long-term impact features are extracted through the static covariate encoder; for the dynamic variables of injection temperature, pressure, and CO2 rate, feature selection is performed through the variable selection network, and their dynamic evolution process is modeled using the sequence-to-sequence architecture. The hybrid deep learning framework DT-DANet employs a multi-stage training strategy: First, deep sequence data is processed using a masked self-attention mechanism to preserve the directional characteristics of CO2 flow. Simultaneously, time series data is encoded using a temporal pattern attention mechanism to accurately capture dynamic evolution patterns. These local spatiotemporal features are then fed into a temporal fusion Transformer module, which models global dependencies and integrates historical and static feature information through a variable selection network and a time-aware processing layer. Finally, after nonlinear transformation of the gated residual network and multi-head attention mechanism, the framework outputs a comprehensive prediction result including wellbore pressure profile, temperature profile and CO2 phase distribution.

7. The method for intelligent prediction of wellbore operation status based on a hybrid deep learning framework according to claim 1, characterized in that: In step 5, the composite loss function is composed of a main loss function and an auxiliary loss function; The main loss formula is: ; ; ; Where, is the main loss function; coefficient and are different weighting factors; and are the prediction errors of wellbore temperature and pressure, respectively; 、 Respectively The predicted and actual values ​​of the wellbore temperature; is the total number of wellbore temperatures; 、 Respectively The predicted value and actual value of each pressure; is the total number of pressures; The auxiliary loss function includes the temporal attention consistency loss function and the physical constraint loss function, and the formula is: ; ; Where, is the temporal attention consistency loss function; is the physical constraint loss function; 、 The current time step , the previous time step The temporal attention matrix of is the total time step; and are used to penalize unrealistic gradients in wellbore pressure and temperature predictions, respectively; and is the weight coefficient in different loss functions; Composite loss function The formula is: ; Adopt Adam optimizer combined with adaptive learning rate scheduling strategy to optimize model training; The training optimization process adopts a two-stage adjustment strategy: in the initial warm-up phase, the learning rate is gradually increased to avoid parameter oscillation in the early stages of training; then it enters the decay phase, and the learning rate is dynamically adjusted to ensure that the model converges stably to the global optimal solution.

Citation Information

Patent Citations

  • Well location and well control parameter optimization method based on space-time diagram neural network

    CN118036477A

  • Intelligent prediction method for fracture pressure of compact conglomerate reservoir based on improved Transform architecture

    CN119357718A

  • Double-flow circulation attention dynamic gesture recognition method based on motion guidance

    CN120220253A

  • Logging-while-drilling reservoir parameter dynamic prediction method based on double attention convolution LSTM

    CN120524446A

  • Multi-scale hybrid attention mechanism modeling method for predicting remaining useful life of aero engine

    WO2024087128A1

Cited By

  • Method and device for cooperatively detecting defects of shaft facilities by utilizing lifting process of inspection instrument

    CN121746392A

  • Method for intelligently predicting production dynamics based on historical fitting images of oil and gas reservoirs

    CN121788743A

  • Novel intelligent oil and gas reservoir numerical simulation method based on physical mechanism driving

    CN121835402A