Production control method and system based on gas well multi-stage joint modeling

Through multi-stage joint modeling of gas wells, combined with real-time and historical data, the phase adaptive parameter configuration is generated, and the dynamic adaptability and multi-objective synergy of gas well production strategies are solved, and efficient production control is achieved throughout the life cycle of gas wells.

CN120578073APending Publication Date: 2025-09-02SICHUAN XUCHEN DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510824754.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The existing gas well production strategies lack real-time data-driven dynamic decision-making capabilities, cannot adapt to changes in the production stage, insufficient multi-objective coordination, and lack of physical constraints, resulting in parameter configuration deviating from the actual working conditions, making it difficult to meet the efficient development of the entire life cycle of the gas well.

Method used

The production control method based on multi-stage joint modeling of gas wells is adopted. By obtaining real-time monitoring data and historical production data, a joint model of stage prediction is constructed, phase adaptive parameter configuration is generated, topological optimization and dynamic game verification are carried out, and production control strategies are generated to realize the adaptive regulation and multi-objective collaborative optimization of gas wells throughout the life cycle.

Benefits of technology

Adaptive regulation of gas wells throughout the life cycle, multi-objective coordinated optimization and physical data are deeply integrated, solving the problems of poor adaptability in gas drainage and gas production in gas wells, multi-objective conflict and low engineering feasibility, improving gas well production capacity and reducing energy consumption and effluent risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120578073A_ABST
    Figure CN120578073A_ABST
Patent Text Reader

Abstract

The invention provides a production control method and system based on gas well multi-stage joint modeling, and a dynamic self-adaptive drainage gas recovery decision system is constructed by fusing real-time monitoring data and historical production data. A coupling model set is designed according to the gas-water ratio, wellhead pressure and gas production rate characteristics of different production stages of a gas well, and recognition of the production stages and continuous prediction of the gas-water ratio are achieved. On the basis of dynamic feature fusion and implicit collaborative coding, stage-adaptive parameter configuration is generated, parameter space topology reconstruction and a multi-target game verification mechanism are introduced, and a closed-loop control link from data-driven modeling to physical verification optimization is formed through physical constraint embedding, Pareto optimal search and Nash equilibrium convergence. According to the gas well drainage gas recovery control method, gas well full-life-cycle self-adaptive regulation and control and multi-target collaborative optimization are achieved, the problems that in gas well drainage gas recovery, stage adaptability is poor, and multi-target conflicts exist are solved, the productivity is remarkably improved, and the operation and maintenance risk is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas well mining, and in particular to a production control method and system based on multi-stage joint modeling of gas wells. Background Art

[0002] Gas well drainage and gas production is a key process for maintaining or restoring gas well productivity by removing accumulated fluids from the wellbore. As gas well production time increases, formation pressure gradually decreases, significantly altering parameters such as the gas-water ratio and wellhead pressure. This leads to increased fluid accumulation in the wellbore and reduced gas production efficiency. Traditional methods rely on physical techniques such as foam gas lift and plunger gas lift, combined with manual experience to adjust production parameters. However, their effectiveness is limited by their adaptability to the dynamic production stages of the gas well. The gas-water ratio and pressure characteristics vary significantly between the early, mid, and late stages of production, necessitating targeted adjustments to the drainage and gas production model.

[0003] In existing technologies, gas well production strategies are often based on fixed thresholds or single models. For example, in the early stages, high-frequency gas injection is achieved using foam lift, followed by intermittent drainage using plunger lift in the mid-term, and finally, production regulation is regulated using multiphase flow models. These approaches rely on manual experience or static rules and lack the dynamic decision-making capabilities driven by real-time data. Furthermore, strategy optimization often focuses on a single objective (such as maximizing gas production), ignoring the synergy of multiple factors such as energy consumption and the risk of liquid accumulation. Furthermore, physical constraints such as conservation laws of fluid mechanics are not deeply integrated into the model, resulting in parameter configurations that deviate from actual operating conditions.

[0004] Existing technologies suffer from significant flaws: First, static models cannot adapt to dynamic production phases, and strategies lag behind real-time fluctuations in parameters such as the gas-water ratio and pressure. Second, multi-objective coordination is insufficient, and productivity increases often come at the expense of high energy consumption or the risk of liquid accumulation. Third, physical constraints are disconnected from data-driven approaches, and parameter verification relies on offline simulation, making it difficult to meet real-time control requirements. Fourth, strategy generation lacks global robustness and is susceptible to noise interference or local optimality. These issues hinder the efficient development of gas wells throughout their lifecycle. Summary of the Invention

[0005] In view of the above actual situation, this application proposes a production control method and system based on multi-stage joint modeling of gas wells to solve the problems existing in the existing technology, such as the rigidity of static models that cannot dynamically adapt to changes in production stages, multi-objective conflicts, lack of physical constraints and insufficient strategy robustness.

[0006] A production control method based on multi-stage joint modeling of gas wells, the method comprising the following steps: S1. Obtaining data to be processed, wherein the data to be processed includes real-time monitoring data and historical production data. The real-time monitoring data includes time-series monitoring values ​​of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well; the historical production data includes historical time-series records of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well, as well as stage classification labels, wherein the stage classification labels include initial, mid-term, and late-stage labels; S2, constructing a stage prediction joint model based on historical production data to obtain a gas well coupling model group, wherein the stage prediction joint model construction is based on cascade training and coordinated adjustment of classification regression parameters; S3, performing joint reasoning on the real-time monitoring data and the coupled model group to generate stage classification results and gas-water ratio prediction values. The joint reasoning is based on dynamic feature fusion and model collaborative constraint mechanism; S4, performing dynamic parameter chain generation on the gas well stage classification results and gas-water ratio prediction values, thereby obtaining stage-adaptive parameter configuration, wherein the generation process is based on implicit feature collaboration, parameter self-mapping mechanism, and physical constraint verification; S5, topology optimization and dynamic game verification are performed on the stage adaptive parameter configuration to generate a production control strategy. The optimization is based on the parameter space topology reconstruction and Nash equilibrium convergence mechanism.

[0007] Furthermore, the step S2 includes the following sub-steps: S201, performing supervised feature segmentation on the gas-water ratio, wellhead pressure, gas production, and liquid production in the historical production data, generating a stage classification model by splitting the decision tree nodes, wherein the supervised feature segmentation is based on the principle of maximizing information gain; S202, dynamically assigning feature weights to the stage classification labels, gas-water ratio, and liquid production in the historical production data, and generating a gas-water ratio prediction model through a random forest multi-tree ensemble, wherein the dynamic feature weight assignment is based on sampling of a subset of stage-sensitive features; S203, jointly optimizing the stage classification model and the gas-water ratio prediction model, generating a coupled model group through chain correction of classification regression errors and cross-validation loss function, wherein the joint optimization is based on back-propagation constraints.

[0008] Furthermore, the S3 step includes the following sub-steps: S301, performing dynamic feature fusion on the gas-water ratio, wellhead pressure, gas production, and liquid production in the real-time monitoring data, generating a joint inference input set through multi-dimensional feature path weighting and nonlinear interpolation. The dynamic feature fusion is based on the real-time update of the gas-water ratio-pressure-gas production association matrix; S302, input the coupled model group into the joint reasoning input set, generate the stage classification results and the gas-water ratio prediction value by matching the branch confidence constraints of the stage classification model with the feature association strength of the gas-water ratio prediction model, and the feature association strength matching is based on the implicit coupling relationship between the classification results and the dynamic feature set.

[0009] Furthermore, it is characterized in that the step S4 includes the following sub-steps: S401, performing dynamic feature collaborative encoding based on the stage classification results and the gas-water ratio prediction value, generating a multidimensional parameter basis through implicit tensor decomposition, wherein the encoding is dynamically constructed based on the covariance matrix of the classification results and the prediction value; S402, performing parameter self-mapping on the multidimensional parameter basis and the joint inference input set, and generating a stage parameter candidate set by nonlinear manifold projection, wherein the self-mapping is based on the geodesic distance and local linear embedding relationship in the feature space; S403, performing physical constraint verification on the candidate set of stage parameters, generating stage adaptive parameter configuration through conservation equation boundary conditions and production state simulation, the verification is based on the residual convergence judgment of the weak solution form of the fluid mechanics equation and the real-time feature set.

[0010] Furthermore, the step S5 includes the following sub-steps: S501, performing parameter space topology reconstruction on the stage adaptive parameter configuration, generating control strategy primitives through algebraic topology homology group analysis and dynamic manifold embedding, wherein the parameter space topology reconstruction is based on connectivity and compactness metrics of the parameter configuration; S502, dynamic game verification is performed on the control strategy primitives and the real-time production status, and a production control strategy is generated through multi-agent Nash equilibrium search and conservation law constraints. The dynamic game verification is based on the Pareto optimal convergence judgment of the non-cooperative game. The real-time production status is the classification result of the generation stage in step S3 and the gas-water ratio prediction value.

[0011] Furthermore, the dynamic feature fusion described in S301 is based on the real-time update of the gas-water ratio-pressure-gas production correlation matrix, including matrix construction processing and sliding window update processing; the feature correlation strength matching described in S301 is based on the implicit coupling relationship between the classification results and the dynamic feature set through the branch confidence constraints of the stage classification model and the dynamic weight modulation of the gas-water ratio prediction model.

[0012] Furthermore, the encoding described in S401 is based on the dynamic construction of the covariance matrix of the classification results and the predicted values, including covariance incremental update processing and tensor rank decomposition processing; the self-mapping described in S402 is based on the geodesic distance and local linear embedding relationship in the feature space, including neighborhood graph construction processing and local weight optimization processing; the verification described in S403 is based on the weak solution form of the fluid mechanics equation and the residual convergence judgment of the real-time feature set, including variational form discretization processing and residual norm iterative judgment processing.

[0013] Furthermore, the parameter space topology reconstruction in S501 includes homology group chain complex construction processing and manifold embedding dimension reduction processing based on the connectivity and compactness measurement of parameter configuration.

[0014] Furthermore, the dynamic game verification in S502 based on the Pareto optimal convergence judgment of the non-cooperative game includes a multi-agent utility function definition process and a Pareto frontier evolution search process.

[0015] In addition, the present application also discloses a production control system based on multi-stage joint modeling of gas wells, characterized in that the system includes: an acquisition unit, configured to acquire data to be processed, the data to be processed including real-time monitoring data and historical production data, the real-time monitoring data including time-series monitoring values ​​of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well; the historical production data including time-series records of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well, as well as stage classification labels, the stage classification labels including initial, mid-term, and late-stage labels; A joint model building unit is used to build a stage prediction joint model for historical production data, thereby obtaining a gas well coupling model group, wherein the stage prediction joint model building is based on cascade training and coordinated adjustment of classification regression parameters; An inference unit, configured to perform joint inference on the real-time monitoring data and the coupled model group, thereby generating stage classification results and gas-water ratio prediction values. The joint inference is based on dynamic feature fusion and model collaborative constraint mechanisms; A parameter generation unit is used to dynamically chain-generate parameters based on the gas well stage classification results and gas-water ratio prediction values, thereby obtaining stage-adaptive parameter configuration. The generation process is based on implicit feature collaboration, parameter self-mapping mechanism, and physical constraint verification. The control strategy unit is used to perform topology optimization and dynamic game verification on the stage adaptive parameter configuration to generate a production control strategy. The optimization is based on the parameter space topology reconstruction and Nash equilibrium convergence mechanism.

[0016] The present application proposes a production control method and system based on multi-stage joint modeling of gas wells, which realizes a gas well drainage and gas production control method that realizes adaptive regulation throughout the entire life cycle of the gas well, multi-objective collaborative optimization, and deep integration of physical data, and systematically solves the problems of poor stage adaptability, multi-objective conflicts, and low engineering feasibility in gas well drainage and gas production. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 A flow chart of a production control method based on multi-stage joint modeling of gas wells proposed in this application; Figure 2 This is a flow chart of constructing a gas well coupling model group in a production control method based on multi-stage joint modeling of gas wells proposed in this application; Figure 3 This is a flow chart of generating stage classification results and gas-water ratio prediction values ​​in a production control method based on multi-stage joint modeling of gas wells proposed in this application; Figure 4 This is a flow chart of adaptive parameter configuration in the generation phase of a production control method based on multi-stage joint modeling of gas wells proposed in this application; Figure 5 This is a flow chart of generating a production control strategy in a production control method based on multi-stage joint modeling of gas wells proposed in this application; Figure 6 A schematic diagram of the structure of a production control system based on multi-stage joint modeling of gas wells provided in an embodiment of the present application; DETAILED DESCRIPTION

[0017] The following will clearly and completely describe the simulation technology route in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] The features and performance of the present invention are further described in detail below with reference to the embodiments. Figure 1 As shown, a production control method based on multi-stage joint modeling of gas wells is characterized in that the method includes the following steps: S1. Obtaining data to be processed, wherein the data to be processed includes real-time monitoring data and historical production data. The real-time monitoring data includes time-series monitoring values ​​of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well; the historical production data includes historical time-series records of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well, as well as stage classification labels, wherein the stage classification labels include initial, mid-term, and late-stage labels; In some embodiments, real-time monitoring data is collected via a multi-source sensor network deployed at the gas wells, specifically including time-series monitoring values ​​of the gas-water ratio, wellhead pressure, gas production, and liquid production. In this embodiment, the gas-water ratio is measured in real time by an online gas-liquid two-phase flow analyzer, which converts the component ratio of the gas-liquid mixed fluid into an electrical signal output based on gas chromatography separation and photoelectric detection technology. Wellhead pressure is collected via a piezoresistive pressure sensor, which linearly maps the resistance change of a Wheatstone bridge circuit to the pressure value. Gas production and liquid production are measured using a turbine flowmeter and a Coriolis mass flowmeter, respectively. The turbine flowmeter calculates volumetric flow rate based on the positive correlation between turbine speed and gas flow rate, while the Coriolis mass flowmeter measures volumetric flow based on the direct correlation between phase difference and mass flow rate when the fluid passes through a vibrating tube.

[0020] In some embodiments, historical production data is stored in a distributed time series database, including historical time series records of gas-water ratio, wellhead pressure, gas production, and liquid production, as well as manually annotated stage classification labels. The generation of stage classification labels is based on the gas well production stage division rules: the initial stage is defined as the continuous time interval with a gas-water ratio greater than 10 and a wellhead pressure greater than 1000 psi; the mid-stage is defined as the interval with a gas-water ratio between 2 and 10 and a wellhead pressure between 500 and 1000 psi; and the late stage is defined as the interval with a gas-water ratio less than 2 and a wellhead pressure less than 500 psi. In this embodiment, the stage labels are annotated using an offline data analysis platform. Its logic is to segment the historical time series data based on a sliding window algorithm, and combine expert experience rules to perform threshold determination on the gas-water ratio and pressure mean in each time window to generate initial, mid-stage, or late stage labels.

[0021] In some embodiments, the fusion of real-time monitoring data and historical production data is completed through a data bus protocol, and its technical principle is a message queue middleware based on a publish-subscribe model to ensure high throughput and low latency transmission of time series data. The data preprocessing step includes denoising of the original signal, specifically using a wavelet transform threshold denoising algorithm to extract and filter out the high-frequency noise components of the signal through multi-scale decomposition; the filling of missing values ​​is achieved through a time series prediction model, whose input is the sensor readings and operating parameters at adjacent time points, and the output is the interpolated value of the missing position. In this embodiment, the verification of data integrity is completed through residual analysis. If the sensor data at a certain time point deviates from the range of three times the standard deviation of the statistical distribution in the sliding window, the abnormal mark is triggered and the redundant sensor data replacement mechanism is started.

[0022] The storage format of the real-time monitoring data and historical production data is a structured time series data table, whose fields include timestamp, gas-water ratio, wellhead pressure, gas production, liquid production and stage label. In this embodiment, the indexing strategy of the data table adopts timestamp-based sharding storage, and reduces storage space occupancy through a column compression algorithm. The data access interface supports SQL queries and streaming processing APIs to meet the needs of real-time reasoning and offline model training. The physical storage form of the stage classification label is an independent metadata table, which is associated with the original time series data record through a foreign key to ensure dynamic binding and traceability of the label and data.

[0023] S2, constructing a stage prediction joint model based on historical production data to obtain a gas well coupling model group, wherein the stage prediction joint model construction is based on cascade training and coordinated adjustment of classification regression parameters; S201, performing supervised feature segmentation on the gas-water ratio, wellhead pressure, gas production, and liquid production in the historical production data, generating a stage classification model by splitting the decision tree nodes, wherein the supervised feature segmentation is based on the principle of maximizing information gain; In some embodiments, supervised feature segmentation is based on the mapping relationship between the four-dimensional feature vectors of gas-water ratio, wellhead pressure, gas production and liquid production of historical production data and the stage classification labels. The feature segmentation is to divide the multidimensional feature space into mutually exclusive sub-regions through the decision tree node splitting strategy, so that the purity of the sample stage labels in each sub-region is maximized. In this embodiment, feature segmentation is an entropy and information gain quantification model in information theory. Specifically, given a training data set T, it contains n samples, and the feature vector of each sample is (x1, x2, x3, x4), corresponding to gas-water ratio, wellhead pressure, gas production and liquid production, respectively. The label set Y contains three types of stage classification results: early, middle and late. The entropy of the data set T is defined as: , where k=3 is the number of stage categories, p i is the proportion of samples of category i in the dataset T.

[0024] In this embodiment, information gain is used to evaluate the effectiveness of feature segmentation. Candidate feature A (such as gas-water ratio) and its possible values ​​are divided into subsets T v , the expression of information gain is: ,in represents the total number of samples in the dataset T, The number of subset samples when feature A takes the value v. The decision tree algorithm traverses all features and their segmentation thresholds and selects the feature-threshold combination that maximizes IG(T,A) as the segmentation rule for the current node.

[0025] In some embodiments, the termination condition of node splitting is controlled by a preset purity threshold. If the proportion of samples of a certain category in the child node exceeds 95%, or the number of node samples is less than 1% of the total number of samples, the splitting is stopped and marked as a leaf node. In this embodiment, the physical implementation of feature segmentation is a recursive dichotomy: for continuous features such as wellhead pressure, the information gain of all possible split points (such as the median and quartiles of the pressure value) is calculated, and the split point with the largest gain is selected; for discrete features, in this implementation, it is a stage label, and it is directly divided by category. During the splitting process, the feature selection priority is arranged in descending order by the information gain value to ensure that high-discrimination features are preferentially involved in the construction of the decision path.

[0026] In this embodiment, the generation of the stage classification model is completed by CART, that is, the classification and regression tree algorithm. The training process of the decision tree starts from the root node and performs the following operations on each non-leaf node in turn: 1) traverse all features and split points to calculate the information gain; 2) select the feature-split point combination with the largest gain to split the node; 3) recursively process the child nodes until the termination condition is met. The tree structure thus generated is stored in the form of a binary tree through depth-first search. Each non-leaf node records the feature index and split threshold, and the leaf node stores the probability distribution of the stage category. In the model inference stage, the real-time monitoring data moves from the root node to the leaf node along the branch path of the decision tree, thereby outputting the stage classification result.

[0027] In some embodiments, an extended application of the information gain maximization principle includes dynamic adjustment of feature weights. If a feature, such as the gas-water ratio, is repeatedly selected in multiple node splits, an attenuation coefficient is applied to its information gain value to avoid overfitting. In this embodiment, the attenuation coefficient α is calculated as: , where N A is the number of times feature A is selected in the generated paths. This mechanism suppresses the dominant role of high-frequency features, increases the model's sensitivity to low-discrimination features (such as liquid production), and enhances classification generalization capabilities.

[0028] The output of the supervised feature segmentation is the structural parameters of the decision tree model and a set of splitting rules. In this embodiment, the model parameters are persistently stored in JSON format, including the node ID, parent node ID, feature index, split threshold, child node pointer, and leaf node category label. During the model deployment phase, the decision tree structure is loaded through deserialization and compiled into a fast inference module based on a rule engine, supporting real-time classification response in milliseconds.

[0029] S202, dynamically assigning feature weights to the stage classification labels, gas-water ratio, and liquid production in the historical production data, and generating a gas-water ratio prediction model through a random forest multi-tree ensemble, wherein the dynamic feature weight assignment is based on sampling of a subset of stage-sensitive features; In some embodiments, the mechanism of dynamic feature weight allocation is based on the coupling relationship between the stage classification label and the gas-water ratio prediction task. The weight allocation is to enhance the expression ability of key features in different production stages in the random forest model through the stage sensitive feature subset sampling strategy. In this embodiment, the input feature set of historical production data includes the stage classification label L, gas-water ratio R, and liquid production Q, and its dynamic weight is defined as a function of the contribution of the feature to the gas-water ratio prediction as the stage changes. For the i-th feature F i , its weight The calculation formula at stage s is: , where stage s includes the early, middle and late stages, Cov(⋅) represents the conditional covariance, which is used to quantify the feature F under stage s i The linear correlation strength with the gas-water ratio R, d = 3 is the total number of features.

[0030] In this embodiment, the sampling of stage-sensitive feature subsets is achieved through weighted random selection. For each decision tree training process, the sampling probability of the feature subset and its dynamic weight Specifically, at stage s, the feature F i Probability of being selected into a subset for: ,This mechanism ensures that high-weight features in stage s (e.g., the air-water ratio in the early stage) are preferentially included in the subset, thereby improving the ,ability of a single tree to capture stage-specific regularities.

[0031] In some embodiments, the construction of random forest multi-tree ensemble is accomplished by Bootstrap aggregation and stage-adaptive feature selection. The training data of each regression tree is extracted from the historical data by sampling with replacement, and the feature subset is dynamically adjusted based on the stage label distribution of the current sample. For the tth tree, its training data set D t The generation process is as follows: 1) randomly extract N samples from historical data, where N is the size of the original data set, to form the Bootstrap sample set; 2) statistically calculate Dt The distribution of the label L in the middle stage, and the calculation of the proportion of each stage ; 3) Weighted fusion feature subset sampling probability according to stage proportion, that is, overall probability ;4) According to probability P i Randomly select m (m≤d) features from d features to form a feature subset for node splitting of the tree.

[0032] In this embodiment, the generation of a single regression tree follows the minimum mean square error criterion of the CART algorithm. j , whose split threshold θ is related to the feature F k The choice of is determined by the following optimization problem: ,in The features F k The left and right subsets under the threshold θ, is the mean gas-water ratio of the subset.

[0033] In some embodiments, the prediction output of the random forest is achieved by weighted averaging the results of multiple trees. For an input sample x, its stage label L=s is determined by a pre-trained stage classification model, and the gas-water ratio prediction value is: , where T is the total number of trees in the forest, is the predicted value of the t-th tree at stage s. This formula implicitly implies the weight constraint of the stage label on the tree prediction result, that is, the prediction of each tree depends only on the stage-sensitive feature subset used during its training. The physical implementation of the dynamic feature weight allocation and multi-tree integration is completed through a distributed computing framework. In this embodiment, the training task of each tree is assigned to an independent computing node, and the feature subset sampling and weight calculation are synchronized through the stage label mapping table in the shared memory. The persistent storage of the model parameters adopts a binary serialization format, which includes the splitting rules, feature indexes and leaf node prediction values ​​of each tree, and records the dynamic weight matrix of each stage for fast loading during inference.

[0034] S203, jointly optimizing the stage classification model and the gas-water ratio prediction model, generating a coupled model group through chain correction of classification regression errors and cross-validation loss function, wherein the joint optimization is based on back-propagation constraints.

[0035] In some embodiments, the joint optimization of the stage classification model and the gas-water ratio prediction model is achieved through a classification regression error chain correction mechanism. The mechanism dynamically binds the output probability distribution of the stage classification model with the feature weights of the gas-water ratio prediction model to form a bidirectional gradient transfer path. In this embodiment, the training data of the coupled model group is the historical production data set D, whose input features are gas-water ratio R, wellhead pressure P, gas production G, liquid production Q, stage classification label L, and the target variable is the true value of the gas-water ratio R trueThe objective function of the joint optimization is defined as the weighted sum of the classification cross entropy loss and the regression mean squared error: , where λ1 and λ2 are balance coefficients, y i,s is the one-hot encoding of the stage label of sample i, p i,s is the predicted probability of the stage classification model is the output value of the gas-water ratio prediction model.

[0036] In this embodiment, the specific implementation of the chain correction of classification regression error is completed through gradient back propagation. The output probability p of the stage classification model i,s It is encoded as feature selection weights and input into the dynamic feature subset sampling module of the gas-water ratio prediction model. For the t-th regression tree in the random forest, its feature subset sampling probability is (Corresponding to feature F k The weights at stage s) are updated according to the following rules: , where is the learning rate, the gradient term The chain derivative calculation includes the indirect impact of classification error on regression feature weights. This process forces the regression model to prioritize stage-related features with high classification confidence during feature selection, such as the gas-water ratio in the early stage or the liquid production in the later stage.

[0037] In some embodiments, the cross-validation loss function is constructed using a stratified K-fold strategy that matches the distribution of stage labels. The training set D is divided into K=5 subsets, and each fold is validated to ensure that the proportion of stage labels in each subset is consistent with the original dataset. For the kth fold, the model parameters are updated using gradient descent with L2 regularization: where θ t is the model parameter vector (including the decision tree splitting threshold and dynamic weight matrix), γ is the learning rate, and β is the regularization coefficient. The regularization term constrains the parameter amplitude to suppress the risk of overfitting caused by the coupling of classification and regression tasks.

[0038] In this embodiment, the implicit coupling relationship of feature correlation strength matching is modeled through the attention mechanism. The probability distribution p of the stage classification model output i,s Mapped to the attention weight matrix A i ∈R 3×d , where d=4 is the feature dimension (R, P, G, Q). Matrix A i The sth row of represents the correlation strength of each feature at stage s, and its calculation formula is: , where W s With W f is the trainable projection matrix, F i,k is the kth eigenvalue of sample i. The characteristic input of the gas-water ratio prediction model is modified into a weighted form , thereby implicitly embedding the stage classification results into the feature space of the regression model.

[0039] The physical implementation of the joint optimization process is accomplished via a heterogeneous computing platform. In this embodiment, the decision tree structure of the stage classification model is stored in an in-memory database, while the random forest parameters of the gas-water ratio prediction model are deployed on distributed computing nodes. Gradient calculations and parameter updates are synchronized via a message passing interface to ensure consistency in multi-model collaborative training. The optimized coupled model group is persistently stored using a binary protocol and contains the following metadata: 1) decision tree node splitting rules and classification probability distributions; 2) random forest feature weight matrix and attention projection parameters; and 3) regularization coefficients and learning rate configurations.

[0040] In some embodiments, the extended application of backpropagation constraints includes dynamic pruning of decision tree structures and sparsification of feature weights. If a decision tree node does not significantly reduce the joint loss (i.e., the loss decrease is less than a threshold ϵ=10) in M=5 consecutive iterations, −4 ), the pruning operation is triggered and it is merged into leaf nodes. The sparsification of the feature weight matrix is ​​achieved through the L1 regularization term, and its objective function is modified to: ,This strategy improves the computational efficiency and interpretability of the model by reducing the participation of non-critical features.

[0041] In general, for the real-time monitoring data, the coupling model group first outputs the stage label s i With the confidence distribution p i,s ; Then the attention mechanism is based on p i,s Generate weighted feature vectors The weighted features are then input into the gas-water ratio prediction model to output the predicted value. This process dynamically modulates the feature space of the regression model through the classification results.

[0042] S3, performing joint reasoning on the real-time monitoring data and the coupled model group to generate stage classification results and gas-water ratio prediction values. The joint reasoning is based on dynamic feature fusion and model collaborative constraint mechanism; S301, performing dynamic feature fusion on the gas-water ratio, wellhead pressure, gas production, and liquid production in the real-time monitoring data, generating a joint inference input set through multi-dimensional feature path weighting and nonlinear interpolation. The dynamic feature fusion is based on the real-time update of the gas-water ratio-pressure-gas production association matrix; In some embodiments, the dynamic feature fusion includes a matrix construction process and a sliding window update process based on the real-time update of the gas-water ratio-pressure-gas production correlation matrix. In this embodiment, the gas-water ratio-pressure-gas production correlation matrix is ​​defined as a third-order tensor M∈R T×3×3 , where T is the length of the time series and the matrix element M t,i,jIndicates the correlation strength between feature i (gas-water ratio, wellhead pressure, gas production) and feature j at time point t. The matrix construction process is based on the covariance calculation of the sliding window. For the time window A subset of data within Feature pairs (F i ,F j ) is: , where is the feature F in the window i The mean of is the preset window length. Real-time update processing is achieved through recursive least squares method. When a new data point (F i,t+1 ,F j,t+1 ) arrives, the covariance matrix is ​​iterated according to the following rules: ,in is the feature mean before the window is updated.

[0043] In this embodiment, the implementation of multi-dimensional feature path weighting is based on the spectral decomposition result of the correlation matrix. t ∈R 3×3 Perform eigenvalue decomposition: ,in is the eigenvalue diagonal matrix, U t is the eigenvector matrix. The eigenpath weight vector w t ∈R3 is obtained by normalizing the eigenvector corresponding to the maximum eigenvalue: , where for The eigenvector corresponding to the largest eigenvalue in . The weighted eigenvector The calculation is: , where ⊙ represents element-wise multiplication, is the original feature vector.

[0044] In some embodiments, the nonlinear interpolation is performed based on the radial basis function kernel interpolation method. t and weighted eigenvectors Fusion, constructing interpolation function , where c k is the K=100 cluster centers selected from historical data, σ is the kernel width parameter, α k is the coefficient fitted by the least squares method. Joint inference input set X t ∈R 4 Generates as: .

[0045] In this embodiment, the physical implementation of dynamic feature fusion is accomplished through a streaming computing framework. Real-time monitoring data is fed into the covariance matrix update module via a message queue. The mean and covariance of the data within the window are dynamically maintained using an incremental computation engine. The weighted and interpolation computation modules are deployed on a GPU accelerator, leveraging parallel computing power to achieve millisecond-level response. The fused joint inference input set is written to an in-memory database in a columnar storage format for subsequent model inference calls.

[0046] In some embodiments, anomaly detection of the correlation matrix is ​​achieved by Mahalanobis distance metric. , its Mahalanobis distance D with the historical distribution t Calculated as: , where μ is the mean vector of weighted features of historical data. If D t Exceeding the threshold , then the data cleaning process is triggered to remove abnormal points and recalculate the correlation matrix.

[0047] The output of the dynamic feature fusion is the joint reasoning input set X t , whose dimensions include weighted features of gas-water ratio, wellhead pressure, gas production, and interpolated estimates of liquid production. In this embodiment, the input data set is structured as a four-dimensional floating-point array, encapsulated via a binary protocol and appended with timestamps and quality metadata to ensure timing alignment and data integrity verification for downstream model inference.

[0048] S302, input the coupled model group into the joint reasoning input set, generate the stage classification results and the gas-water ratio prediction value by matching the branch confidence constraints of the stage classification model with the feature association strength of the gas-water ratio prediction model, and the feature association strength matching is based on the implicit coupling relationship between the classification results and the dynamic feature set.

[0049] In some embodiments, the feature association strength matching is achieved by implicitly coupling the classification results with the dynamic feature set through the branch confidence constraint of the stage classification model and the dynamic weight modulation of the gas-water ratio prediction model. In this embodiment, the stage label s output by the stage classification model is i and the confidence distribution p i,s The feature input of the gas-water ratio prediction model is adjusted through the probability gating mechanism. , its dynamic feature set Interpolation characteristics with liquid production The association strength is determined by the classification confidence p i,s Dynamic weighting. Specifically, define the feature correlation matrix A i ∈R 4×3 , whose element A k,srepresents the association weight of the kth feature (k∈{1,2,3,4}) at stage s, and the calculation formula is: , where W p ∈R d×3 With W f ∈R d×4 is the trainable projection matrix, d=64 is the hidden layer dimension, is the k-th eigenvalue of the input set.

[0050] In this embodiment, the branch confidence constraint is implemented through a probability gating function. The output probability p of the stage classification model is i,s is mapped to the gate vector g i ∈R 3 , and its calculation formula is: , where σ(⋅) is the Sigmoid function, W g ∈R 3×3 with b g ∈R 3 is the gate parameter. This vector is used to adjust the feature correlation matrix A i After stage-by-stage scaling, the corrected correlation strength matrix is: , this operation forces the model to be more accurate in the low confidence stage (such as p i,s <0.5) suppresses the weight of non-critical features and improves prediction robustness.

[0051] In some embodiments, the feature input of the gas-water ratio prediction model is generated by dynamic weight fusion. For stage s, the modified correlation matrix Normalize the rows to get the stage-specific feature weight vector , its expression is: ,in Represents a row slice operation on a matrix or two-dimensional array, and the weighted eigenvector Calculated as: , the vector is input to the random forest model to predict the gas-water ratio, and the output of each tree is By stage weight p i,s Aggregate, so the predicted value is: In this embodiment, the mathematical representation of the implicit coupling relationship is realized by the joint loss function. Define the total loss L total is the classification cross entropy loss L class , regression mean square error L reg Consistency loss with association strength L consist A linear combination of: , where L consist Used to constrain the feature association matrix A i The physical consistency with the stage label is calculated as: , where is the average correlation matrix of historical data at stage s, which is pre-calculated through offline statistical analysis.

[0052] The physical implementation of the feature correlation strength matching is completed through a heterogeneous computing architecture. In this embodiment, the inference task of the stage classification model is deployed on the FPGA accelerator to achieve nanosecond confidence calculation; the gas-water ratio prediction model runs on a GPU cluster to support high-concurrency weighted feature processing. The real-time update of the correlation matrix and the optimization of the gate parameters are synchronized through the parameter server to ensure the consistency of distributed training. The output stage classification result s i and gas-water ratio predicted value It is stored in the form of a time-aligned tuple for dynamic parameter chain generation and calling in step S4.

[0053] In some embodiments, the detection of abnormal correlation strength is achieved by KL divergence measurement. i , which is consistent with the historical distribution The degree of deviation is calculated as: , if D KL >θ KL =0.1, the model recalibration process is triggered, and the correlation projection matrix W is retrained using the data in the sliding window. p With W f , in order to maintain the stability of the feature coupling relationship.

[0054] The output of step S302 is the stage label and the predicted gas-water ratio. The data format is a structured record containing a timestamp, stage classification confidence, weighted feature vector, and prediction residual. In this embodiment, the output is transmitted to downstream modules via message-based middleware, meeting the integrity and timing requirements of the input data for implicit feature collaboration and parameter self-mapping mechanisms in step S4.

[0055] S4, performing dynamic parameter chain generation on the gas well stage classification results and gas-water ratio prediction values, thereby obtaining stage-adaptive parameter configuration, wherein the generation process is based on implicit feature collaboration, parameter self-mapping mechanism, and physical constraint verification; S401, performing dynamic feature collaborative encoding based on the stage classification results and the gas-water ratio prediction value, generating a multidimensional parameter basis through implicit tensor decomposition, wherein the encoding is dynamically constructed based on the covariance matrix of the classification results and the prediction value; In some embodiments, the encoding is dynamically constructed based on the covariance matrix of the classification result and the predicted value, including covariance incremental update processing and tensor rank decomposition processing. In this embodiment, the covariance matrix C∈R 2×2 Defined as: , where Var(s) is the variance of the stage label, is the variance of the predicted value, is the covariance of the two. The specific logic of the covariance incremental update process is as follows: When reached, the matrix elements are iterated as follows: , where are the means of historical stage labels and predicted values ​​respectively.

[0056] In this embodiment, the implicit tensor decomposition is achieved by high-order singular value decomposition. The covariance matrix C is expanded into a third-order tensor T∈R 2×2×K , where K is the time window length. The goal of tensor decomposition is to represent it as a core tensor With three factor matrices U (1) ,U (2) ,U (3) The product of , the factor matrix and The feature spaces corresponding to the stage labels and predicted values, R1 and R2 are the decomposition ranks. Capturing cross-modal coupling relationships, its slices constitute a multidimensional parameter basis.

[0057] In some embodiments, the generation of the multidimensional parameter basis is achieved by truncating the low-rank approximation of the core tensor. The components corresponding to the first r significant singular values ​​in the core tensor are retained to construct the parameter basis matrix B∈R after dimensionality reduction. r×4 , whose column vectors represent the coordinated change patterns of gas-water ratio, pressure, gas production, and liquid production at different production stages. The update cycle of the basis matrix is ​​triggered by the significant change of the covariance matrix within the sliding window, which is specifically determined by the difference in Frobenius norm: , if the conditions are met, the tensor rank decomposition process is re-executed and a new basis is generated.

[0058] The physical implementation of the dynamic feature collaborative encoding is accomplished through edge computing nodes. In this embodiment, the covariance matrix calculation and update module is deployed on an embedded processor close to the data source, supporting low-latency real-time computation. The tensor decomposition task is assigned to the GPU cluster of the edge server, utilizing a parallel algebra library to accelerate the decomposition process. The generated parameter basis is transmitted to downstream modules as a binary stream for invocation by the parameter self-mapping mechanism in step S4.

[0059] In some embodiments, the verification of the parameter basis is achieved by physical conservation law constraints. k , the mass conservation equation must be satisfied ,in is the feature weight coefficient, obtained by regression fitting of historical data. If the basis violates the constraints, the basis reconstruction process is triggered to re-screen the core tensor components and correct the decomposition rank.

[0060] S402, performing parameter self-mapping on the multidimensional parameter basis and the joint inference input set, and generating a stage parameter candidate set by nonlinear manifold projection, wherein the self-mapping is based on the geodesic distance and local linear embedding relationship in the feature space; In some embodiments, the self-mapping includes a neighborhood graph construction process and a local weight optimization process based on the geodesic distance and local linear embedding relationship of the feature space. In this embodiment, the multidimensional parameter basis B∈R r×4 and the joint reasoning input set X t ∈R 4 The fusion is achieved through manifold learning. The calculation of geodesic distance is based on the k-nearest neighbor graph (k=10), where the nodes represent the column vectors b of the parameter basis. k ∈R 4 , the edge weight is the Euclidean distance Geodesic distance D ij It is defined as the cumulative edge weight of the shortest path connecting nodes i and j, and is solved iteratively using the Dijkstra algorithm: , where P ij is the set of all paths connecting nodes i and j.

[0061] In this embodiment, the local linear embedding relationship is modeled by the weight matrix W∈R r×r Done. For each basis vector b k , the linear combination coefficient w in its neighborhood (k nearest neighbors) k ∈R k Solve by minimizing the reconstruction error: , the closed-form solution of the optimization problem is: Among them G k is the neighborhood covariance matrix, element G pq =(b k −b p ) ⊤ (b k −b q ), 1 is a vector of all 1s.

[0062] In some embodiments, nonlinear manifold projection is accomplished by dual constraints of geodesic distance and local weight. t The low-dimensional coordinate y on the manifold t ∈R 2 The following objective function is optimized: , where the first term maintains the local linear structure, the second term constrains global geodesic consistency, and λ is the balance coefficient. The solution to this problem is obtained via generalized eigenvalue decomposition, and the eigenvector corresponding to the minimum eigenvalue is the projected coordinate.

[0063] The generation of the candidate set of stage parameters is completed by reverse mapping. In this embodiment, the low-dimensional coordinate yt Reconstructed into high-dimensional parameter space through radial basis function network, its expression is: , where c k is the cluster center of the historical parameter basis, α k Is the fitting coefficient. Candidate set P candidate Indicated as P t The set of feasible solutions whose elements satisfy the conservation equations of fluid mechanics Discrete form.

[0064] The physical implementation of parameter self-mapping is accomplished through a distributed optimization framework. Neighborhood graph construction and geodesic calculations are deployed in the graph computing engine, while local weight optimization and manifold projection are performed on the numerical computing nodes. The stage parameter candidate set is stored in a tensor format with dimensions N × 4 × T, where N is the number of candidate parameter combinations and T is the time window length. Each slice corresponds to the gas-water ratio, pressure, gas production, and liquid production configuration at a specific moment in time.

[0065] S403, performing physical constraint verification on the candidate set of stage parameters, generating stage adaptive parameter configuration through conservation equation boundary conditions and production state simulation, the verification is based on the residual convergence judgment of the weak solution form of the fluid mechanics equation and the real-time feature set.

[0066] In some embodiments, the verification is based on the residual convergence judgment of the weak solution form of the fluid mechanics equation and the real-time feature set, including the variational form discretization processing and the residual norm iterative judgment processing. In this embodiment, the weak solution form of the fluid mechanics equation is constructed by the variational principle, the core of which is to transform the differential equation into the functional extreme value problem of the integral form. For the mass conservation equation of multiphase flow in gas wells, Its weak solution form is defined as: for any test function ,satisfy , where ρ is the fluid density, v is the velocity field, q is the boundary flux, n is the boundary normal vector, and Ω is the computational domain. The specific implementation of the boundary conditions of the conservation equation includes two categories: Dirichlet boundary conditions and Neumann boundary conditions. In this embodiment, the wellhead pressure monitoring value P t Applied as a Dirichlet condition at the inlet boundary of the computational domain , the outer boundary of the formation Using the Neumann condition, set the mass flux q⋅n=βG t , where G t is the real-time gas production, and β is the formation permeability conversion coefficient.

[0067] The variational form discretization is achieved through the finite element method, dividing the computational domain into tetrahedral mesh elements. The basis functions are linear Lagrange polynomials. The discretized algebraic equations are in the form of: Ku=F, where K is the stiffness matrix, u is the unknown quantity (pressure, flow rate), and F is the load vector. The boundary conditions are embedded by modifying the stiffness matrix and load vector: Dirichlet conditions are directly applied through node assignments, and Neumann conditions are applied through boundary integral terms. Incorporate the load vector.

[0068] In some embodiments, the residual norm iteration decision process is based on the convergence criterion of the Newton-Raphson method. candidate Each parameter combination p in i , and its corresponding discrete equation residual r i Calculated as: , the L2 norm of the residual Used to evaluate parameter feasibility. The convergence criteria are: ,in is the preset threshold, k is the number of iterations. If the residual norm does not meet the convergence condition within 5 iterations, the parameter combination is eliminated.

[0069] In this embodiment, the production state simulation drives the boundary condition update through the real-time feature set. t and gas production G t Mapped to boundary condition parameters: Dirichlet conditions With Neumann condition The velocity field v(t) and pressure field (t) at each time step in the computational domain are solved by the implicit Euler method to ensure numerical stability.

[0070] The generation of adaptive parameter configurations in the above stage is completed through multi-objective screening. The parameter combinations that pass the verification must meet the following conditions at the same time: 1. Physical Conservation Law Constraints: Residual Norm ; 2. Production stability constraint: spatiotemporal fluctuation of velocity field v ; 3. Engineering feasibility constraint: wellhead pressure P t and gas production G t The combined value is within the device operating range .

[0071] In some embodiments, the optimization of parameter configuration is achieved by Pareto front screening. The objective function is defined as gas production efficiency η = G t / Q t (Q t is liquid production) and equipment loss rate , and screen out the non-dominated solution set as the stage adaptive parameter configuration.

[0072] In this embodiment, the expression of the stage adaptive parameter configuration is the structured parameter matrix P adapt ∈R N×4×T , where N is the number of valid parameter combinations, each slice Contains the gas-water ratio R at time t t , wellhead pressure P t , gas production G t and liquid production Q t Optimized value of .

[0073] S5, topology optimization and dynamic game verification of the stage adaptive parameter configuration to generate a production control strategy. The optimization is based on the parameter space topology reconstruction and Nash equilibrium convergence mechanism. S501, performing parameter space topology reconstruction on the stage adaptive parameter configuration, generating control strategy primitives through algebraic topology homology group analysis and dynamic manifold embedding, wherein the parameter space topology reconstruction is based on connectivity and compactness metrics of the parameter configuration; In some embodiments, the parameter space topology reconstruction includes a homology group chain complex construction process and a manifold embedding dimension reduction process based on the connectivity and compactness measurement of the parameter configuration. In this embodiment, the homology group chain complex construction process quantifies the connectivity of the parameter space through the homology group theory of algebraic topology, the core of which is to identify the algebraic representation of high-dimensional holes and connection structures. Given a stage adaptive parameter configuration set P adapt ⊆R 4 , whose parameter space is modeled as a simplicial complex K, where each simplex corresponds to a parameter combination and its neighborhood relationship. The mathematical tool for connectivity analysis is the one-dimensional homology group H1(K), whose generators represent non-contractible ring structures in the parameter space. The specific implementation of the processing is divided into three stages: 1. Simplex generation: Construct the Vietoris-Rips complex based on the Euclidean distance between parameter points. If the parameter point p i ,p j satisfy , then add an edge simplex; if the distances between the three points are less than , then add a triangle simplex; 2. Chain complex construction: defining the chain group C k For all k-dimensional simplexes, the free Abelian group, the edge operator Map k-dimensional simplexes to linear combinations of their boundaries; 3. Homology group calculation: through The loop-like connectivity pattern of the parameter space is extracted, whose rank β1 represents the number of independent loops.

[0074] The goal of manifold embedding dimensionality reduction is to project the high-dimensional parameter space onto a low-dimensional manifold while preserving the topological and geometric properties. In this embodiment, the implementation of dynamic manifold embedding is divided into two steps: 1. Adjacency graph construction: defining edge weights based on geodesic distance and local density between parameter points , construct a weighted adjacency graph ; 2. Laplace eigenmap: Solve the generalized eigenvalue problem Ly = λDy through the graph Laplace matrix L = D − W (D is the degree matrix, W is the adjacency matrix), and take the eigenvector corresponding to the minimum non-zero eigenvalue as the embedding coordinate Y∈R 2, Achieve dimensionality reduction.

[0075] In this embodiment, the compactness measurement is completed by the collaborative calculation of the covering number and the Hausdorff distance. adapt The compactness of is defined as: , where the ratio of the covering sphere radius to the space diameter approaches 1, indicating high aggregation, and approaches 0, indicating high dispersion. Compactness analysis is used to screen redundant parameter combinations and ensure the geometric stability of the manifold embedding.

[0076] The generation of control strategy primitives is achieved through the deep fusion of topological features and manifold structures. In this embodiment, specifically, the homology group ring path is encoded as a cyclic control strategy, and its boundary parameter sequence C topo Filter the noise ring by persistence (Persistence < θ p Manifold cluster centers are mapped to steady-state control primitives, and intra-cluster variance checks trigger primitive splitting (when variance exceeds a limit) or merging (when compactness exceeds a limit).

[0077] The optimization of dynamic manifold embedding is achieved through incremental learning. When the new parameter configuration p new When joining, the adjacency graph Update according to the following rules, including calculating p new The geodesic distance to the existing points is calculated, k nearest neighbor edges are added (k=5), and the graph Laplacian matrix L is incrementally updated. The eigenvectors are re-solved and the embedding coordinates Y are adjusted.

[0078] The output of the parameter space topology reconstruction is a set of control strategy primitives Its data structure is: The generation of the control strategy primitives is completed by the fusion of topological features and manifold structure. In this embodiment, the cyclic parameter path corresponding to the homology group generator is encoded as a control loop strategy, and the cluster center of the manifold embedding is mapped to a steady-state control primitive. Each primitive The data structure is a five-tuple: ,in Identifies primitive types, C topo is the boundary parameter sequence of the homology group ring, C geom are the coordinates of the center of the manifold cluster, R action To control the action rules (such as pressure adjustment amplitude), T trigger Trigger logic for conditions based on real-time features.

[0079] The output of the parameter space topology reconstruction is a set of control strategy primitives Its physical representation is a structured knowledge graph. Graph nodes represent primitives, edges represent state transitions between primitives, and weights are determined jointly by manifold distance and topological connectivity, supporting real-time policy reasoning.

[0080] S502, dynamic game verification is performed on the control strategy primitives and the real-time production status, and a production control strategy is generated through multi-agent Nash equilibrium search and conservation law constraints. The dynamic game verification is based on the Pareto optimal convergence judgment of the non-cooperative game. The real-time production status is the classification result of the generation stage in step S3 and the gas-water ratio prediction value.

[0081] In some embodiments, the dynamic game verification of the Pareto optimal convergence determination based on the non-cooperative game includes the definition of multi-agent utility functions and the Pareto frontier evolution search process. In this embodiment, the control strategy primitive is modeled as multiple agents, each representing a production control action (such as adjusting the gas injection rate, optimizing the well opening cycle, or adjusting the pressure threshold). Its utility function integrates three objectives: gas well production capacity, energy efficiency, and liquid accumulation risk. For the i-th agent, its utility function Ui is defined as: , where is the gas production efficiency (gas production / energy consumption), E i is the energy cost of a single action, R i To score the risk of effusion, It is the weight coefficient calibrated by historical data.

[0082] In some embodiments, the Nash equilibrium search for non-cooperative games is implemented through iterative policy updates. All agents adjust their actions based on the current policy combination in each round of the game until the policy space reaches a stable state. Specifically, the policy update rule for agent i is: ,in represents the current strategy of other agents, and λ is the strategy smoothing coefficient, which is used to avoid oscillation. The convergence judgment condition is that the strategy change rate of all agents is less than the threshold .

[0083] In this embodiment, the Pareto front evolution search is performed using a multi-objective genetic algorithm. The initial population consists of randomly generated strategy combinations, and the fitness function integrates the utility value and the degree of satisfaction of the conservation law constraints. The mathematical form of the conservation law constraints is the discrete residual of the mass conservation equation: , if the residual exceeds the threshold , then the strategy combination is marked as infeasible. Evolutionary operations include crossover, mutation, and environment selection, where environment selection is based on non-dominated sorting and crowding calculation to ensure that the population converges to the Pareto front.

[0084] The production control strategy is generated by integrating the equilibrium strategy with the Pareto solution set. In this embodiment, the Nash equilibrium strategy provides a locally optimal, stable control action, while the Pareto frontier solution set provides a global, multi-objective trade-off solution. The final strategy is the optimal solution in the intersection of the two, satisfying the following requirements: 1) Productivity improvement: maximizing gas production per unit time by dynamically adjusting the gas injection rate and well opening time based on the gas-water ratio prediction; 2) Energy consumption reduction: optimizing the operating frequency of the gas lift equipment to reduce ineffective gas injection and electricity consumption; and 3) Liquid accumulation avoidance: triggering plunger lift or multiphase flow control actions based on real-time gas-water ratio prediction to prevent liquid accumulation in the wellbore.

[0085] In some embodiments, engineering adaptability of the strategy is achieved through stage-specific action mapping. For example, in the early stage (gas-water ratio > 10), a high-frequency gas injection strategy using foam gas lift is prioritized; in the mid-stage (gas-water ratio ≤ 2 ≤ 10), pressure pulse control using plunger gas lift is switched; and in the late stage (gas-water ratio < 2), adaptive throttling control using a multiphase flow model is enabled. The switching logic for these actions is embedded in the game strategy's utility function and dynamically activated by real-time stage classification results. In this step, dynamic adjustments to the strategy (such as triggering plunger gas lift or multiphase flow control) directly depend on the real-time gas-water ratio prediction and stage classification results. In other words, the real-time gas-water ratio prediction and stage classification results serve as core input parameters for the real-time production status, dynamically adjusting the triggering conditions and action selection of the control strategy. It is worth noting that the reuse of the real-time gas-water ratio prediction and stage labels generated in step S3 in step S5 is not simply data reuse but rather a core design element in building a closed-loop feedback optimization mechanism. The real-time data generated by S3 serves as the initial inference result, providing the basic input for parameter configuration in S4. This data is then used a second time in the dynamic game verification in S5 to verify the timeliness and robustness of the parameter configuration by inversely constraining the real-time production status. Specifically, the game model in S502 uses the real-time gas-water ratio prediction as a dynamic weighting factor in the utility function, while the stage label is used to activate the conservation law constraints for the corresponding stage (such as the high injection frequency limit in the early stage or the multiphase flow throttling rule in the later stage). This allows for real-time correction of parameter configuration deviations during the strategy generation process. This dual-call mechanism implements a closed-loop feedback loop of "data-driven inference → strategy generation → real-time verification → parameter iteration," ensuring that the production control strategy not only statically adapts to historical patterns but also dynamically responds to transient fluctuations in well conditions, thereby forming an optimized solution set that is both stable and adaptive.

[0086] The production control strategy is physically expressed as a time-series action sequence, whose data structure includes timestamps, target parameters (pressure, gas production), execution actions (injection valve opening, plunger cycle), and constraints (maximum energy consumption, safe pressure threshold). This strategy continuously optimizes through real-time feedback and incremental learning to ensure long-term stable operation of gas wells. This application systematically addresses the problem of collaboratively optimizing production capacity, energy consumption, and liquid accumulation during gas well drainage and gas production.

[0087] Based on the description of the embodiment of the production control method based on multi-stage joint modeling of gas wells, the embodiment of the present application also discloses a production control system based on multi-stage joint modeling of gas wells. The production control system based on multi-stage joint modeling of gas wells can be a computer program (including program code) that runs the production control method based on multi-stage joint modeling of gas wells mentioned above. Figure 6 As shown in the figure, the production control system based on multi-stage joint modeling of gas wells can run the following units: An acquisition unit 110 is configured to acquire data to be processed, wherein the data to be processed includes real-time monitoring data and historical production data. The real-time monitoring data includes time-series monitoring values ​​of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well. The historical production data includes historical time-series records of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well, as well as stage classification labels. The stage classification labels include initial, mid-term, and late-stage labels. A joint model building unit 120 is used to build a stage prediction joint model based on historical production data to obtain a gas well coupling model group, wherein the stage prediction joint model building is based on cascade training and coordinated adjustment of classification regression parameters; An inference unit 130 is configured to perform joint inference on the real-time monitoring data and the coupled model group to generate a stage classification result and a gas-water ratio prediction value. The joint inference is based on a dynamic feature fusion and model collaborative constraint mechanism. The parameter generation unit 140 is used to perform dynamic parameter chain generation on the gas well stage classification results and the gas-water ratio prediction value, thereby obtaining stage-adaptive parameter configuration. The generation process is based on implicit feature collaboration, parameter self-mapping mechanism and physical constraint verification; The control strategy unit 150 is used to perform topology optimization and dynamic game verification on the stage adaptive parameter configuration, thereby generating a production control strategy. The optimization is based on parameter space topology reconstruction and Nash equilibrium convergence mechanism.

[0088] The foregoing description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Rather, the present invention can be used in various other combinations, modifications, and environments and can be modified within the scope of the concept described herein through the above teachings or techniques or knowledge in the relevant field. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be protected by the appended claims.

Claims

1. A production control method based on multi-stage joint modeling of gas wells, characterized in that: The method comprises the following steps: S1, obtaining data to be processed, wherein the data to be processed includes real-time monitoring data and historical production data, wherein the real-time monitoring data includes time-series monitoring values ​​of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well; the historical production data includes historical time-series records of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well, as well as stage classification labels, wherein the stage classification labels include initial, mid-term, and late-stage labels; S2, constructing a stage prediction joint model based on historical production data to obtain a gas well coupling model group, wherein the stage prediction joint model construction is based on cascade training and coordinated adjustment of classification regression parameters; S3, performing joint reasoning on the real-time monitoring data and the coupled model group to generate stage classification results and gas-water ratio prediction values. The joint reasoning is based on dynamic feature fusion and model collaborative constraint mechanism; S4, performing dynamic parameter chain generation on the gas well stage classification results and gas-water ratio prediction values, thereby obtaining stage-adaptive parameter configuration, wherein the generation process is based on implicit feature collaboration, parameter self-mapping mechanism, and physical constraint verification; S5, topology optimization and dynamic game verification are performed on the stage adaptive parameter configuration to generate a production control strategy. The optimization is based on the parameter space topology reconstruction and Nash equilibrium convergence mechanism.

2. A production control method based on multi-stage joint modeling of gas wells according to claim 1, characterized in that: The S2 step includes the following sub-steps: S201, performing supervised feature segmentation on the gas-water ratio, wellhead pressure, gas production, and liquid production in the historical production data, generating a stage classification model by splitting the decision tree nodes, wherein the supervised feature segmentation is based on the principle of maximizing information gain; S202, dynamically assigning feature weights to the stage classification labels, gas-water ratio, and liquid production in the historical production data, and generating a gas-water ratio prediction model through a random forest multi-tree ensemble, wherein the dynamic feature weight assignment is based on sampling of a subset of stage-sensitive features; S203, jointly optimizing the stage classification model and the gas-water ratio prediction model, generating a coupled model group through chain correction of classification regression errors and cross-validation loss function, wherein the joint optimization is based on back-propagation constraints.

3. The production control method based on multi-stage joint modeling of gas wells according to claim 1 is characterized in that: The S3 step includes the following sub-steps: S301, performing dynamic feature fusion on the gas-water ratio, wellhead pressure, gas production, and liquid production in the real-time monitoring data, generating a joint inference input set through multi-dimensional feature path weighting and nonlinear interpolation. The dynamic feature fusion is based on the real-time update of the gas-water ratio-pressure-gas production association matrix; S302, input the coupled model group into the joint reasoning input set, generate the stage classification results and the gas-water ratio prediction value by matching the branch confidence constraints of the stage classification model with the feature association strength of the gas-water ratio prediction model, and the feature association strength matching is based on the implicit coupling relationship between the classification results and the dynamic feature set.

4. A production control method based on multi-stage joint modeling of gas wells according to any one of claims 1 to 3, characterized in that: The S4 step includes the following sub-steps: S401, performing dynamic feature collaborative encoding based on the stage classification results and the gas-water ratio prediction value, generating a multidimensional parameter basis through implicit tensor decomposition, wherein the encoding is dynamically constructed based on the covariance matrix of the classification results and the prediction value; S402, performing parameter self-mapping on the multidimensional parameter basis and the joint inference input set, and generating a stage parameter candidate set by nonlinear manifold projection, wherein the self-mapping is based on the geodesic distance and local linear embedding relationship in the feature space; S403, performing physical constraint verification on the candidate set of stage parameters, generating stage adaptive parameter configuration through conservation equation boundary conditions and production state simulation, the verification is based on the residual convergence judgment of the weak solution form of the fluid mechanics equation and the real-time feature set.

5. The production control method based on multi-stage joint modeling of gas wells according to claim 4 is characterized in that: The S5 step includes the following sub-steps: S501, performing parameter space topology reconstruction on the stage adaptive parameter configuration, generating control strategy primitives through algebraic topology homology group analysis and dynamic manifold embedding, wherein the parameter space topology reconstruction is based on connectivity and compactness metrics of the parameter configuration; S502, dynamic game verification is performed on the control strategy primitives and the real-time production status, and a production control strategy is generated through multi-agent Nash equilibrium search and conservation law constraints. The dynamic game verification is based on the Pareto optimal convergence judgment of the non-cooperative game. The real-time production status is the classification result of the generation stage in step S3 and the gas-water ratio prediction value.

6. The production control method based on multi-stage joint modeling of gas wells according to claim 3 is characterized in that: The dynamic feature fusion described in S301 is based on the real-time update of the gas-water ratio-pressure-gas production correlation matrix, including matrix construction processing and sliding window update processing; the feature correlation strength matching described in S301 is based on the implicit coupling relationship between the classification results and the dynamic feature set through the branch confidence constraints of the stage classification model and the dynamic weight modulation of the gas-water ratio prediction model.

7. The production control method based on multi-stage joint modeling of gas wells according to claim 4 is characterized in that: The encoding described in S401 is based on the dynamic construction of the covariance matrix of the classification results and the predicted values, including covariance incremental update processing and tensor rank decomposition processing; the self-mapping described in S402 is based on the geodesic distance and local linear embedding relationship in the feature space, including neighborhood graph construction processing and local weight optimization processing; the verification described in S403 is based on the weak solution form of the fluid mechanics equation and the residual convergence judgment of the real-time feature set, including variational form discretization processing and residual norm iterative judgment processing.

8. The production control method based on multi-stage joint modeling of gas wells according to claim 5 is characterized in that: The parameter space topology reconstruction in S501 includes a connectivity and compactness measurement based on parameter configuration, including a homology group chain complex construction process and a manifold embedding dimension reduction process.

9. The production control method based on multi-stage joint modeling of gas wells according to claim 5, characterized in that: The dynamic game verification in S502 is based on the Pareto optimal convergence judgment of the non-cooperative game, which includes a multi-agent utility function definition process and a Pareto frontier evolution search process.

10. A production control system based on multi-stage joint modeling of gas wells, characterized in that: The system comprises: an acquisition unit, configured to acquire data to be processed, the data to be processed including real-time monitoring data and historical production data, the real-time monitoring data including time-series monitoring values ​​of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well; the historical production data including time-series records of the gas-water ratio, wellhead pressure, gas production, and liquid production of the gas well, as well as stage classification labels, the stage classification labels including initial, mid-term, and late-stage labels; A joint model building unit is used to build a stage prediction joint model for historical production data, thereby obtaining a gas well coupling model group, wherein the stage prediction joint model building is based on cascade training and coordinated adjustment of classification regression parameters; An inference unit, configured to perform joint inference on the real-time monitoring data and the coupled model group, thereby generating stage classification results and gas-water ratio prediction values. The joint inference is based on dynamic feature fusion and model collaborative constraint mechanisms; A parameter generation unit is used to dynamically chain-generate parameters based on the gas well stage classification results and gas-water ratio prediction values, thereby obtaining stage-adaptive parameter configuration. The generation process is based on implicit feature collaboration, parameter self-mapping mechanism, and physical constraint verification. The control strategy unit is used to perform topology optimization and dynamic game verification on the stage adaptive parameter configuration to generate a production control strategy. The optimization is based on the parameter space topology reconstruction and Nash equilibrium convergence mechanism.

Citation Information

Cited By

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

    CN121744045A