A method, device, electronic device and storage medium for analyzing the main controlling factors of natural gas hydrate production capacity
By preprocessing and evaluating the causal relationship of sample data on natural gas hydrate production capacity, and constructing a target causal diagram, the problem of insufficient causal relationship identification in existing technologies is solved, the scientific and reliable identification of the main controlling factors is achieved, and the technical support for natural gas hydrate development is improved.
Patent Information
- Application Number
- CN202510991952.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-18
AI Technical Summary
Existing technologies are insufficient in identifying causal relationships in natural gas hydrate production capacity analysis and are easily affected by confounding variables, resulting in inaccurate judgment of the main controlling factors and a lack of interpretability of model results, making it difficult to provide clear guidance for engineering decisions.
By obtaining sample data of multiple variable factors of natural gas hydrate production capacity, the sample data are preprocessed, and a preliminary causal structure between the variable factors is constructed based on the physical mechanism. Direct causal relationship evaluation and causal inference analysis are used to construct a target causal diagram and identify the main controlling factors of natural gas hydrate production capacity.
Accurately identify the cause-and-effect relationship of production capacity impacts, improve the scientificity and reliability of the screening of key controlling factors, and provide more powerful technical support for natural gas hydrate development.
Smart Images

Figure CN120492876B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for analyzing the main controlling factors of natural gas hydrate production capacity. Background Art
[0002] Natural gas hydrates, as an important clean energy resource, are subject to complex and diverse factors affecting their productivity, encompassing reservoir properties, thermodynamic conditions, and extraction processes. Research on their productivity primarily relies on statistical analysis and machine learning methods. Statistical analyses such as correlation analysis and principal component analysis are widely used to screen factors influencing productivity, but these methods primarily reveal linear correlations between variables and struggle to address complex nonlinearities and interactions. Machine learning methods, including random forests, support vector machines, and neural networks, can improve prediction accuracy, but they are often "black box" models that lack an explanation of the specific mechanisms at work for each factor. Furthermore, some studies have employed coupled geological-engineering simulations to conduct in-depth analyses of the impact of productivity. However, these methods are computationally intensive and rely on numerous experimental parameters, hindering their widespread application in practical engineering. Summary of the Invention
[0003] The main purpose of the embodiments of the present application is to propose a method, device, electronic device and storage medium for analyzing the main controlling factors of natural gas hydrate production capacity, aiming to solve at least one problem of the prior art.
[0004] To achieve the above objectives, one aspect of the embodiments of the present application provides a method for analyzing the main controlling factors of natural gas hydrate production capacity, the method comprising:
[0005] Obtain sample data of various variable factors of natural gas hydrate production capacity and pre-process the sample data;
[0006] Based on the physical mechanism, a preliminary causal structure between variable factors is constructed. Based on the preliminary causal structure and preprocessed sample data, a direct causal relationship evaluation is performed to obtain the target causal diagram.
[0007] Causal inference analysis was performed based on the target causal diagram to obtain the main controlling factors of natural gas hydrate production capacity.
[0008] In some embodiments, preprocessing the sample data includes the following steps:
[0009] The sample data of each variable factor were statistically analyzed using the one-way analysis of variance method to obtain the F test results corresponding to each variable factor;
[0010] The p-value of the F-test result is obtained based on the preset degrees of freedom, where the degrees of freedom are determined based on the number of groups and samples of the sample data.
[0011] When the p-value of a variable factor is greater than the preset threshold, the corresponding variable factor is eliminated or its weight is reduced.
[0012] In some embodiments, preprocessing the sample data further includes at least one of the following steps:
[0013] The missing values of the sample data are filled based on the mean filling method;
[0014] When the data missing rate of a sample data exceeds the preset ratio, the corresponding sample data will be eliminated;
[0015] Standardize the sample data corresponding to all variable factors;
[0016] Normalize the sample data based on the preset data structure.
[0017] In some embodiments, performing a direct causal relationship evaluation based on the preliminary causal structure and the preprocessed sample data to obtain a target causal graph includes the following steps:
[0018] Taking the preliminary causal structure as a constraint, the target causal graph is constructed using the constraint-based causal discovery method based on the preprocessed sample data.
[0019] In some embodiments, the preliminary causal structure is used as a constraint, and a constraint-based causal discovery method is used to construct a target causal graph based on the preprocessed sample data, including the following steps:
[0020] Using the preliminary causal structure as a constraint, a completely undirected graph is initialized based on the preprocessed sample data. The sample data includes multiple observation samples of variable factors, each observation sample corresponds to a variable node in the completely undirected graph, and there are undirected edges between any variable nodes.
[0021] Perform conditional independence tests on completely undirected graphs based on pre-set test tools;
[0022] Based on the results of the conditional independence test, the undirected edges between the two variable nodes that form a conditional independence relationship in the completely undirected graph are deleted to obtain a skeleton graph;
[0023] The causal directions of the remaining undirected edges are determined through the collision structure in the skeleton graph to obtain the target causal graph.
[0024] In some embodiments, the causal inference analysis includes an average treatment effect estimation method and a counterfactual analysis method; performing the causal inference analysis based on the target causal graph to obtain the main controlling factors of the natural gas hydrate production capacity includes the following steps:
[0025] The average treatment effect estimation method was used to obtain the average impact of each variable factor on the initial gas production, and the preliminary main controlling factors were screened based on the average impact;
[0026] Based on the counterfactual analysis method, a counterfactual sample is constructed in which the sampling data of the preliminary main controlling factors change;
[0027] Based on the counterfactual samples, the target causal diagram is used to predict the predicted daily gas production;
[0028] Determine the significance of the change based on the difference between the predicted daily gas production and the set original daily gas production;
[0029] The target main controlling factors of natural gas hydrate production capacity are determined based on the significance of the changes.
[0030] In some embodiments, the counterfactual sample includes variable data of multiple sampling intervals; determining the target main controlling factor of natural gas hydrate production capacity based on the significance of the change includes the following steps:
[0031] When the change significance of a preliminary main controlling factor corresponding to the counterfactual samples in each sampling interval is significant, the corresponding preliminary main controlling factor is determined as the target main controlling factor of natural gas hydrate production capacity.
[0032] To achieve the above-mentioned purpose, another aspect of the present application provides a device for analyzing the main controlling factors of natural gas hydrate production capacity, the device comprising:
[0033] A data preprocessing module is used to obtain sample data of various variable factors of natural gas hydrate production capacity and preprocess the sample data;
[0034] The causal structure learning module is used to construct a preliminary causal structure between variable factors based on physical mechanisms, and to evaluate direct causal relationships based on the preliminary causal structure and preprocessed sample data to obtain the target causal graph.
[0035] The causal inference analysis module is used to perform causal inference analysis based on the target causal graph to obtain the main controlling factors of natural gas hydrate production capacity.
[0036] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above-mentioned method when executing the computer program.
[0037] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned method is implemented.
[0038] To achieve the above object, another aspect of the present invention provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0039] The embodiments of the present application include at least the following beneficial effects: The present application provides a method, apparatus, electronic device, storage medium, and program product for analyzing the primary controlling factors of natural gas hydrate production capacity. This solution obtains sample data of multiple variable factors affecting natural gas hydrate production capacity and preprocesses the sample data. A preliminary causal structure between the variable factors is constructed based on physical mechanisms. Based on the preliminary causal structure and the preprocessed sample data, a direct causal relationship evaluation is performed to obtain a target causal graph. Causal inference analysis is performed based on the target causal graph to determine the primary controlling factors of natural gas hydrate production capacity. This application, through a causal inference-based method for analyzing the primary controlling factors of natural gas hydrate production capacity, aims to accurately identify the causal relationships that influence production capacity, improve the scientific nature and reliability of primary controlling factor screening based on causal relationships, and provide stronger technical support for natural gas hydrate development. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a schematic diagram of an implementation environment for the method for analyzing the main controlling factors of natural gas hydrate production capacity provided in an embodiment of the present application;
[0041] Figure 2 This is a flow chart of a method for analyzing the main controlling factors of natural gas hydrate production capacity provided in an embodiment of the present application;
[0042] Figure 3 Schematic diagram of the system program flow of the method for analyzing the main controlling factors of natural gas hydrate production capacity provided by the embodiment of the present application;
[0043] Figure 4 Schematic diagram of a data example of causal inference analysis of production data provided in an embodiment of the present application;
[0044] Figure 5 is a schematic diagram of a data example of causal inference analysis of geological parameters provided in an embodiment of the present application;
[0045] Figure 6 Schematic diagram of data examples of causal inference analysis of hydrate physical parameters provided in the examples of the present application;
[0046] Figure 7 Schematic diagram of a data example of causal inference analysis of development design parameters provided in an embodiment of the present application;
[0047] Figure 8 This is a schematic diagram of an example of the contribution results of the main control factors of production capacity provided in an embodiment of the present application;
[0048] Figure 9This is a schematic structural diagram of a device for analyzing the main controlling factors of natural gas hydrate production capacity provided in an embodiment of the present application;
[0049] Figure 10 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0051] It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0052] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" as used herein.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0054] Related technologies for analyzing natural gas hydrate production capacity have significant shortcomings, primarily in their ability to identify causal relationships between influencing factors. This inability to identify key controlling factors is easily influenced by confounding variables, leading to inaccurate assessments of key factors. Furthermore, the lack of interpretability of model results makes it difficult to provide clear guidance for engineering decisions.
[0055] In view of this, an embodiment of the present application provides a method for analyzing the main controlling factors of natural gas hydrate production capacity. This solution obtains sample data of multiple variable factors affecting natural gas hydrate production capacity and preprocesses the sample data. A preliminary causal structure between the variable factors is constructed based on physical mechanisms. A direct causal relationship evaluation is performed based on the preliminary causal structure and the preprocessed sample data to obtain a target causal graph. Causal inference analysis is performed based on the target causal graph to obtain the main controlling factors of natural gas hydrate production capacity. This application, through a method for analyzing the main controlling factors of natural gas hydrate production capacity based on causal inference, aims to accurately identify the causal relationships that influence production capacity, improve the scientific nature and reliability of the screening of main controlling factors based on causal relationships, and provide more powerful technical support for natural gas hydrate development.
[0056] It is understandable that the method for analyzing the main controlling factors of natural gas hydrate production capacity provided by the present application can be applied to any computer device with data processing and computing capabilities, and this computer device can be various terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, tablet computer, laptop computer, desktop computer, etc., but is not limited to this.
[0057] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 , the implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to the network in a wireless or wired manner to complete data transmission and exchange.
[0058] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0059] In addition, server 101 can also be a node server in a blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
[0060] The terminal 102 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment of the present application.
[0061] For example, based on Figure 1 In the implementation environment shown, an embodiment of the present application provides a method for analyzing the main controlling factors of natural gas hydrate production capacity. The following is explained using the example of the method for analyzing the main controlling factors of natural gas hydrate production capacity applied to the server 101. It can be understood that the method for analyzing the main controlling factors of natural gas hydrate production capacity can also be applied to the terminal 102.
[0062] Reference Figure 2 , Figure 2 This is an optional flowchart of the method for analyzing the main controlling factors of natural gas hydrate production capacity provided in an embodiment of the present application. The execution subject of the method for analyzing the main controlling factors of natural gas hydrate production capacity can be any of the aforementioned computer devices (including servers or terminals). Figure 2 The method may include but is not limited to steps S100 to S300.
[0063] Step S100, obtaining sample data of various variable factors of natural gas hydrate production capacity and preprocessing the sample data;
[0064] For example, in some specific implementations, obtaining sample data of multiple variable factors of natural gas hydrate production capacity can be achieved as follows:
[0065] The productivity of low-permeability gas reservoirs is affected by many factors. Therefore, this application requires the collection of multiple types of data to build a comprehensive causal analysis model. These data include but are not limited to:
[0066] 1. Production data: initial gas production, initial bottom hole flowing pressure, initial casing pressure, and oil pressure;
[0067] 2. Geological data: porosity, permeability, reservoir thickness, formation pressure, pore length, pore number, rock density, formation temperature;
[0068] 3. Hydrate physical parameters: hydrate saturation, hydrate structure type, hydrate stability pressure, hydrate stability temperature, and thermal conductivity of the hydrate layer;
[0069] 4. Development and design parameters: mining method, injection and production rate, injection and production process parameters, fracturing fluid volume, sand addition amount, fracture length, fracture width, and well type parameters.
[0070] It should be noted that, in some embodiments, preprocessing of sample data may include the following steps: performing statistical analysis on the sample data of each variable factor using one-way analysis of variance to obtain the F test result corresponding to each variable factor; obtaining the p-value of the F test result based on the preset degrees of freedom; wherein the degrees of freedom are determined based on the number of groups and the number of samples of the sample data; when the p-value of a variable factor is greater than a preset threshold, the corresponding variable factor is eliminated or its weight is reduced.
[0071] For example, in some specific implementations, in order to reduce the impact of redundant variables on causal inference, it is necessary to screen the variables. This application uses a one-way analysis of variance (ANOVA) for initial screening to analyze the explanatory power of each input variable on the target variable (such as initial gas production). Specifically, the F value (i.e., F test result) of each variable is calculated using the formula:
[0072]
[0073] in, is the between-group sum of squares, is the within-group sum of squares, is the number of groups, is the total number of samples. For continuous variables, we can divide them into several groups according to quantiles and calculate the significance of their differences on the target variable. Specifically, the mean square between groups ( MSB ) = between-group sum of squares ( SSB ) / degrees of freedom between groups, mean square within groups ( MSW ) = within-group sum of squares ( SSW ) / within degrees of freedom.
[0074] This application uses a p-value greater than 0.05 as the screening threshold. If the p-value corresponding to the F-test result of a variable is greater than the threshold, it is considered that the variable has no significant difference in impact on production capacity and can be preliminarily regarded as a redundant variable. In the subsequent causal analysis, it can be ignored or its weight can be reduced. Determine the degrees of freedom: Numerator degrees of freedom (df1): between-group degrees of freedom, which can be set to the number of groups-1, denominator degrees of freedom (df2): within-group degrees of freedom, which can be set to the total sample size-number of groups. The p-value is the probability of observing the current F-value (or more extreme value) when the null hypothesis is true. It is usually obtained through the F-distribution table or statistical software (such as R, Python). Judgment criteria: If the P-value is less than the significance level (such as 0.05), the null hypothesis is rejected and the difference is considered significant.
[0075] In this application, redundant variables can be divided into the following two categories: 1. Irrelevant variables: variables that have no significant explanatory power for production capacity, usually with a large F-test p-value; 2. Highly collinear variables: variables that are highly correlated with other variables but do not provide independent information, which may cause bias or multicollinearity problems in causal diagram learning.
[0076] In some embodiments, preprocessing the sample data may further include at least one of the following steps:
[0077] S101, filling in missing values of sample data based on mean filling method;
[0078] For example, in some specific implementations, natural gas hydrate data may have missing values due to measurement errors, equipment failures, or human factors. This application mainly uses the mean filling method to fill in the data. The formula for filling in missing values is:
[0079]
[0080] in, is the result of completing missing values, is the number of non-missing values in the column, represents the non-missing data in the column, Represents the mean.
[0081] S102: When the data missing rate of a type of sample data exceeds a preset ratio, the corresponding sample data is eliminated;
[0082] For example, in some specific implementations, if the data missing rate exceeds 30% (the setting can be adjusted according to actual needs), such data samples are eliminated.
[0083] S103, performing standardization processing on the sample data corresponding to all variable factors;
[0084] For example, in some specific implementations, since different variables have different dimensions, directly inputting them into the model may affect the analysis results. Therefore, normalization is required. The formula for the normalized values is:
[0085]
[0086] in, represents the numerical value in the sample data, represents the average value of all sample data, Represents the standard deviation of all sample data.
[0087] S104, normalizing the sample data based on a preset data structure;
[0088] For example, in some specific implementations, to facilitate subsequent causal analysis, the final structured data can be stored and converted into a format suitable for causal inference analysis. The data will be stored in the form of a structured data table to support subsequent causal reduction analysis.
[0089] After completing the aforementioned cleaning and preprocessing steps, the system further converts the data into a standardized structure suitable for causal inference analysis, supporting subsequent core functions such as causal graph construction, causal relationship identification, and counterfactual analysis. Specifically, the system normalizes all processed data into a Pandas DataFrame format, which is both highly readable and highly compatible with mainstream causal inference libraries such as DoWhy, CausalNex, and pgmpy. Each row represents an independent sample (e.g., observations from a natural gas hydrate well), and each column corresponds to a variable, including the target variable (e.g., daily gas production) and multiple explanatory variables. Categorical variables are one-hot encoded, and continuous variables are standardized. Variable names are also uniformly formatted, removing spaces and special characters, to facilitate their use as nodes in causal graphs. Furthermore, the system avoids data fields with significant autocorrelation in the time series to ensure sample independence and removes redundant features, ultimately generating a cleanly structured data frame ready for causal modeling.
[0090] Step S200: constructing a preliminary causal structure between variable factors based on physical mechanisms, and performing direct causal relationship evaluation based on the preliminary causal structure and preprocessed sample data to obtain a target causal graph;
[0091] For example, in some specific implementations, the construction of a causal graph is a key step in causal inference. This application adopts an expert knowledge + data-driven approach, combining geological, engineering, and production data to establish a causal structure.
[0092] Specifically, based on the physical mechanism of low-permeability gas reservoirs, a preliminary causal relationship between variables was established, including: 1. Geological parameters: affecting the flow capacity of the reservoir, and thus affecting production capacity; 2. Hydrate physical parameters: affecting hydrate stability; 3. Mining process parameters and production data: affecting hydrate decomposition efficiency.
[0093] It should be noted that, in some embodiments, direct causal relationship evaluation is performed based on the preliminary causal structure and preprocessed sample data to obtain a target causal graph, which can include the following steps: using the preliminary causal structure as a constraint, and constructing the target causal graph using a constraint-based causal discovery method based on the preprocessed sample data.
[0094] For example, in some specific implementations, the preliminary causal structure serves as a "prior causal hypothesis" to provide structural constraints (constraint graph) for subsequent causal discovery algorithms. On this basis, the causal discovery algorithm can be used to automatically mine potential causal relationships.
[0095] In some embodiments, the preliminary causal structure is used as a constraint, and a target causal graph is constructed based on the preprocessed sample data using a constraint-based causal discovery method, which can include the following steps: using the preliminary causal structure as a constraint, and initializing a completely undirected graph based on the preprocessed sample data; wherein the sample data includes multiple observation samples of variable factors, each observation sample corresponds to a variable node in the completely undirected graph, and there are undirected edges between any variable nodes; a conditional independence test is performed on the completely undirected graph based on a preset test tool; based on the result of the conditional independence test, the undirected edges between two variable nodes that form a conditional independence relationship in the completely undirected graph are deleted to obtain a skeleton graph; the causal direction of the remaining undirected edges is determined through the collision structure in the skeleton graph to obtain the target causal graph.
[0096] For example, in some specific implementations, the present application uses the PC (Peter-Clark) algorithm to perform direct causal relationship evaluation on the cleaned data. The data format used is a Pandas DataFrame, with each column representing a variable and each row representing an observation sample. The data is derived from the results of the aforementioned preprocessing.
[0097] Specifically, the PC algorithm (Peter-Clark) is used to evaluate the direct causal relationship of the data. The PC algorithm implementation logic is as follows:
[0098] 1. Initialization: Set the variable set to: , construct a completely undirected graph , any variables are connected.
[0099] 2. Conditional independence test: for any variable pair and , in the variable subset Under the conditions, test Is it true?
[0100] 3. If independent, remove undirected edges , and record the corresponding condition set .
[0101] 4. The test tool is G-square test ( ), the specific test statistic is:
[0102]
[0103] in, for (Variable factor) takes the value of and (Productivity) value is The number of samples; for The value is The total number of samples; for The value is The total number of samples; is the total number of samples.
[0104] In this application, the application of test statistic results in determining independence between variables is mainly reflected in the conditional independence test stage, especially in the process of constructing the causal graph using the PC algorithm. The specific applications are as follows:
[0105] 1. Calculation of test statistics: as shown in the above formula.
[0106] 2. Statistical significance judgment:
[0107] Calculated The value follows an approximate chi-square distribution, and then the corresponding p-value is calculated by looking up the table or program. If the p-value is greater than the set significance level (such as 0.05), the variable is considered and In a given Under the condition of conditional independence, it can be regarded as no direct causal connection between the two.
[0108] 3. Graph structure update basis:
[0109] In causal structure learning, if and If it is judged to be conditionally independent, the connection in the graph is removed and undirected edges; while recording the independent condition sets that lead to This operation, performed for all possible combinations of the variable set, helps to construct a "skeleton diagram" between the variables and lays the foundation for identifying causal directions.
[0110] 4. Collision structure identification:
[0111] After forming the skeleton graph, the collision structure (e.g. ), further determine the direction of the edge, and then construct the target causal graph in the form of a directed acyclic graph (DAG).
[0112] 5. In summary, the application of test statistics not only provides a quantitative basis for judging the independence of variables, but also plays a key role in eliminating spurious correlations and determining edge structure and direction during the learning process of causal graph structures, thus ensuring the scientific nature and reliability of subsequent causal inference analysis.
[0113] in, Indicates that under a given set of condition variables Under the premise of The value is and The value is Here Not specific and , but rather the set of constrained variables that constitute the conditional independence test.
[0114] Furthermore, through the V-structure (i.e., collision structure, ) Determine the causal direction and obtain the final causal diagram.
[0115] Edge removal example description:
[0116] Let the variable set be , after testing, it was found that:
[0117] 1. In = conditions, and Conditional independence, that is ;
[0118] 2. Remove from the graph and The edge between , and record the condition set .
[0119] Step S300, performing causal inference analysis based on the target causal graph to obtain the main controlling factors of natural gas hydrate production capacity;
[0120] It should be noted that causal inference analysis includes an average treatment effect estimation method and a counterfactual analysis method; in some embodiments, step S300 may include the following steps: using the average treatment effect estimation method to obtain the average impact of the change of each variable factor on the initial gas production, and obtaining the preliminary main controlling factors based on the average impact screening; based on the counterfactual analysis method, constructing a counterfactual sample in which the sampling data of the preliminary main controlling factors change; based on the counterfactual sample, using the target causal diagram to predict the predicted daily gas production; determining the significance of the change based on the difference between the predicted daily gas production and the set original daily gas production; and determining the target main controlling factors of the natural gas hydrate production capacity based on the significance of the change.
[0121] For example, in some specific implementations, after constructing the causal graph (DAG), the present application further quantifies the impact of each main controlling factor on the gas well productivity based on the causal inference method, so as to distinguish between correlation and causality and identify the true main controlling factor.
[0122] Specifically, the average treatment effect (ATE) estimation method is used to calculate the effect of a variable Changes in initial gas production The average impact of is as follows:
[0123]
[0124] in, It means applying external intervention to simulate a controlled experiment to eliminate the influence of confounding factors.
[0125] Furthermore, to verify the influence of the main controlling factors, this application adopts the counterfactual analysis method, that is, simulating the effect of a change in a certain factor (such as an increase in development design parameters or a decrease in bottom hole flowing pressure) on the daily gas production to conduct hypothesis testing.
[0126] Specifically, the counterfactual sample is constructed, and the current daily gas production data is set , assuming that a variable Changes occur, and the daily gas production is predicted based on the causal model (DAG) obtained in step (2) , the specific formula is:
[0127]
[0128] Specifically, if If the factor is significant (the significance can be determined in combination with the preset gas production threshold), it indicates that the factor has a significant causal effect on the daily gas production.
[0129] In some embodiments, determining the target main controlling factor of natural gas hydrate production capacity based on the significance of changes may include the following steps: when the significance of changes corresponding to the counterfactual samples of a preliminary main controlling factor in each sampling interval are significant, determining the corresponding preliminary main controlling factor as the target main controlling factor of natural gas hydrate production capacity.
[0130] For example, in some specific implementations, a bootstrap method can be used to perform repeated sampling for stability testing. Specifically, a dataset is repeatedly sampled to generate multiple simulated datasets. Specifically, a causal inference analysis is performed on each dataset. Ultimately, the distribution and confidence interval of the statistical estimates are analyzed. If the same factor exhibits a significant causal effect under different sampling conditions, it can be determined that the factor is the primary controlling factor.
[0131] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0132] First of all, it should be noted that the existing technology has obvious shortcomings, mainly reflected in the insufficient ability to identify the causal relationship of influencing factors, and is easily affected by confounding variables, resulting in inaccurate judgment of the main controlling factors. At the same time, the lack of interpretability of the model results makes it difficult to provide clear guidance for engineering decisions. Therefore, in response to these problems, this application proposes an analysis method of the main controlling factors of natural gas hydrate production capacity based on causal inference, aiming to accurately identify the causal relationship of production capacity impact, improve the scientificity and reliability of the screening of main controlling factors, and provide more powerful technical support for the development of natural gas hydrates.
[0133] In some specific embodiments, the present application proposes a method for analyzing the main controlling factors of natural gas hydrate production capacity based on causal inference, aiming to overcome the defect in the existing technology that only correlation analysis cannot distinguish causal relationships. By constructing a causal graph (DAG, Directed Acyclic Graph), combining expert knowledge and data-driven methods, the main controlling factors affecting natural gas hydrate production capacity are accurately identified, and the causal effect of each factor is quantitatively evaluated using causal inference methods, thereby improving the scientific nature and guidance of the analysis results.
[0134] like Figure 3 As shown, the analysis method of the main controlling factors of natural gas hydrate production capacity in this application can be Figure 3 The system program flow shown in the figure is implemented. The system can include a data preprocessing module, a causal structure learning module, and a causal inference analysis module. The system realizes the entire process of data collection, cleaning, causal relationship modeling, causal effect quantification and stability testing through modular design. Specifically, the analysis method of the main controlling factors of natural gas hydrate production capacity of this application can be implemented through the following process:
[0135] (1) Data preprocessing module:
[0136] The productivity of low-permeability gas reservoirs is affected by many factors. Therefore, this application requires the collection of multiple types of data to build a comprehensive causal analysis model. These data include but are not limited to:
[0137] 1. Production data: initial gas production, initial bottom hole flowing pressure, initial casing pressure, and oil pressure;
[0138] 2. Geological data: porosity, permeability, reservoir thickness, formation pressure, pore length, pore number, rock density, formation temperature;
[0139] 3. Hydrate physical parameters: hydrate saturation, hydrate structure type, hydrate stability pressure, hydrate stability temperature, and thermal conductivity of the hydrate layer;
[0140] 4. Development and design parameters: mining method, injection and production rate, injection and production process parameters, fracturing fluid volume, sand addition amount, fracture length, fracture width, and well type parameters.
[0141] Specifically, natural gas hydrate data may contain missing values due to measurement errors, equipment failures, or human factors. This application mainly uses the mean filling method to complete the data. The main formula is:
[0142]
[0143] in, is the number of non-missing values in the column, Represents the non-missing data in this column.
[0144] Specifically, if the data missing rate exceeds 30%, such data samples will be eliminated.
[0145] Furthermore, since different variables have different dimensions, directly inputting them into the model may affect the analysis results. Therefore, standardization is required. The specific formula is:
[0146]
[0147] Furthermore, in order to reduce the impact of redundant variables on causal inference, variables need to be screened. This application uses a one-way analysis of variance (ANOVA) for initial screening to analyze the explanatory power of each input variable on the target variable (such as initial gas production). Specifically, the F value of each variable is calculated using the formula:
[0148]
[0149] in, is the between-group sum of squares, is the within-group sum of squares, is the number of groups, is the total number of samples. For continuous variables, they are divided into several groups according to quantiles, and the significance of their differences on the target variable is calculated.
[0150] This application uses a p-value greater than 0.05 as the screening threshold. If the p-value corresponding to the F-test result of a variable is greater than this threshold, it is considered that the variable has no significant difference in impact on production capacity and can be initially regarded as a redundant variable. In subsequent causal analysis, it can be ignored or its weight can be reduced.
[0151] In this application, redundant variables mainly include the following two categories: 1. irrelevant variables: variables that have no significant explanatory power for production capacity, usually with a large F-test p-value; 2. highly collinear variables: variables that are highly correlated with other variables but do not provide independent information, which may cause bias or multicollinearity problems in causal diagram learning.
[0152] Furthermore, after data cleaning and preprocessing, the final structured data can be stored and converted into a format suitable for causal inference analysis to facilitate subsequent causal analysis. The data will be stored in the form of a structured data table to support subsequent causal reduction analysis.
[0153] After completing the aforementioned cleaning and preprocessing steps, the system further converts the data into a standardized structure suitable for causal inference analysis, supporting subsequent core functions such as causal graph construction, causal relationship identification, and counterfactual analysis. Specifically, the system normalizes all processed data into a Pandas DataFrame format, which is both highly readable and highly compatible with mainstream causal inference libraries such as DoWhy, CausalNex, and pgmpy. Each row represents an independent sample (e.g., observations from a natural gas hydrate well), and each column corresponds to a variable, including the target variable (e.g., daily gas production) and multiple explanatory variables. Categorical variables are one-hot encoded, and continuous variables are standardized. Variable names are also uniformly formatted, removing spaces and special characters, to facilitate their use as nodes in causal graphs. Furthermore, the system avoids data fields with significant autocorrelation in the time series to ensure sample independence and removes redundant features, ultimately generating a cleanly structured data frame ready for causal modeling.
[0154] (2) Causal structure learning module:
[0155] The construction of a causal diagram is a key step in causal inference. This application uses an expert knowledge + data-driven approach to establish a causal structure by combining geological, engineering, and production data.
[0156] Specifically, based on the physical mechanism of low-permeability gas reservoirs, a preliminary causal relationship between variables was established, including: 1. Geological parameters: affecting the flow capacity of the reservoir, and thus affecting production capacity; 2. Hydrate physical parameters: affecting hydrate stability; 3. Mining process parameters and production data: affecting hydrate decomposition efficiency.
[0157] Furthermore, the preliminary causal structure serves as a "priori causal hypothesis," providing structural constraints (constraint graphs) for subsequent causal discovery algorithms, significantly reducing invalid search paths and improving algorithm efficiency and the credibility of the results. These preliminary causal structures and direct causal relationships are used to initialize the undirected graph structure and guide V-structure identification and direction attribution, forming a key prerequisite for the "undirected to directed" transition in causal graph construction (DAG).
[0158] Based on this, this application uses a causal discovery algorithm to automatically mine potential causal relationships.
[0159] Specifically, this application uses the Peter-Clark (PC) algorithm to evaluate direct causal relationships on cleaned data. The data format used is a Pandas DataFrame, with each column representing a variable and each row representing an observation. The data comes from a data preprocessing module (high-quality samples after missing values are filled and outliers are removed).
[0160] Specifically, the PC algorithm (Peter-Clark) was used to evaluate the direct causal relationship of the data.
[0161] PC algorithm implementation logic description
[0162] 1. Initialization: Set the variable set to: , construct a completely undirected graph , any variables are connected.
[0163] 2. Conditional independence test: for any variable pair and , in the variable subset Under the conditions, test Is it true?
[0164] 3. If independent, remove undirected edges , and record the corresponding condition set .
[0165] 4. Inspection tools are -squared test ( ), the specific test statistics are:
[0166]
[0167] in, The value of X is And the value of Y is The number of samples; The value of X is The total number of samples; The value of Y is The total number of samples; is the total number of samples.
[0168] Furthermore, through the V-structure (i.e. ) Determine the causal direction and obtain the final causal diagram.
[0169] Data flow integrity description:
[0170] The data flow of this module is as follows:
[0171] 1. The pre-processed data set is provided by the "data cleaning module" .
[0172] 2. Combine domain knowledge and mechanism models to construct a preliminary causal hypothesis diagram , as the constraint input of the PC algorithm.
[0173] 3. The input format is unified into Pandas DataFrame and sent to the PC algorithm module to mine potential causal relationships and output the causal graph structure .
[0174] 4. This causal graph structure will serve as the core foundation for subsequent causal inference modules (ATE estimation, counterfactual simulation, etc.), proposing variable intervention paths and causal inference mechanisms.
[0175] Specifically, the cleaned data is transformed into data containing p variables , initialize a completely undirected graph G, in which any variables are connected.
[0176] Edge removal example description:
[0177] Let the variable set be , after testing, it was found that:
[0178] 1. In = conditions, and Conditional independence, that is ;
[0179] 2. Remove from the graph and The edge between , and record the condition set .
[0180] (3) Causal inference analysis module:
[0181] After constructing the causal graph (DAG), this application further quantifies the impact of each main controlling factor on gas well productivity based on the causal inference method to distinguish correlation from causality and identify the true main controlling factor.
[0182] Specifically, the average treatment effect (ATE) estimation method is used to calculate the effect of a variable Changes in initial gas production The average impact of is as follows:
[0183]
[0184] in, It means applying external intervention to simulate a controlled experiment to eliminate the influence of confounding factors.
[0185] Furthermore, to verify the influence of the main controlling factors, this application adopts the counterfactual analysis method, that is, simulating the effect of a change in a certain factor (such as an increase in development design parameters or a decrease in bottom hole flowing pressure) on the daily gas production to conduct hypothesis testing.
[0186] Specifically, the counterfactual sample is constructed, and the current daily gas production data is set , assuming that a variable Changes occur, and the daily gas production is predicted based on the causal model (DAG) obtained in step (2) , the specific formula is:
[0187]
[0188] Specifically, if If the factor is significant (the significance can be determined in combination with the preset gas production threshold), it indicates that the factor has a significant causal effect on the daily gas production.
[0189] Specifically, the present application adopts the Bootstrap method to perform repeated sampling for stability testing, that is, repeatedly sampling the data set to generate multiple simulated data sets.
[0190] Specifically, causal inference analysis is performed on each dataset.
[0191] Specifically, the distribution and confidence interval of statistical estimates, if the same factor shows a significant causal effect under different sampling conditions, then it can be determined that the factor is the main controlling factor. Figure 4 As shown in the figure, it is a data example of causal inference analysis of various variables in production data; Figure 5 As shown in Figure 2, it is an example of data for causal inference analysis of various variables of geological parameters; Figure 6 As shown in Figure 2, it is an example of data for causal inference analysis of various variables of hydrate physical parameters; Figure 7 As shown in , it is a data example of causal inference analysis of various variables of development design parameters; Figure 8 As shown, an example of the production capacity main control factor contribution result of the relative contribution of various candidate main control factors to production capacity obtained based on the method of the present application.
[0192] In summary, this application introduces causal inference theory for natural gas hydrate productivity analysis. By utilizing causal inference methods such as the PC algorithm, average treatment effect (ATE), and counterfactual analysis, it replaces traditional analysis methods based solely on correlation, achieving the identification of "causal master factors" for the first time. Furthermore, this application implements a causal structure construction method that combines data-driven and expert knowledge. During the causal graph construction phase, expert knowledge in geology, physics, and engineering is integrated to construct a priori graphs. A causal discovery algorithm then automatically discovers potential causal paths, enhancing the scientificity and practicality of the causal graphs. Furthermore, this application utilizes comprehensive data preprocessing methods, including mean filling, outlier removal (missing values > 30%), standardization, and variable screening (analysis of variance), to ensure input data quality and provide reliable data support for subsequent causal analysis. Furthermore, this application combines counterfactual analysis with bootstrap sampling to verify causal stability and predictive simulation. By simulating changes in variables (such as bottomhole flowing pressure and hydrate parameters), productivity trends are predicted and the causal nature of the master factors is verified. Bootstrap sampling is also used to enhance the robustness and credibility of the analysis results. The causal inference-based analysis method for the main controlling factors of natural gas hydrate production capacity proposed in this application has the following innovations and advantages compared to traditional methods:
[0193] (1) Upgrading from correlation analysis to causal inference to improve the scientific nature of the analysis: Traditional methods (such as the Pearson correlation coefficient) can only measure the statistical correlation between variables and have difficulty distinguishing true causal relationships from spurious correlations. This application, based on a cause-effect diagram (DAG) and intervention analysis, can accurately identify the main controlling factors that directly affect natural gas hydrate production capacity, thereby improving the reliability of the analysis.
[0194] (2) Combining domain knowledge with data-driven methods to construct a high-confidence causal network: In the causal inference process, this application integrates geological engineering knowledge, production experience, and data-driven structural learning algorithms (such as PC algorithm and GES algorithm) to optimize the construction of the causal network (DAG), making it more consistent with the physical mechanism of natural gas hydrate reservoirs and enhancing the interpretability of the model.
[0195] (3) Use intervention analysis to quantitatively evaluate the causal effects of various factors: quantitatively evaluate the impact of different factors on natural gas hydrate production capacity, quantify the average causal effect (ATE) of the main controlling factors, and ensure the accuracy and operability of the analysis results.
[0196] Compared with the existing technology, this application addresses the key technical difficulties in natural gas hydrate production capacity analysis, such as "complex factors, high variable coupling, and correlation that cannot represent causality." It proposes a system and method for analyzing the main controlling factors of natural gas hydrate production capacity based on causal inference. The system has at least the following significant advantages and beneficial effects:
[0197] 1. Overcoming the flaw of traditional methods that only identify correlations but lack causal reasoning capabilities: Traditional correlation analysis methods (such as the Pearson coefficient, grey correlation analysis, and regression analysis) cannot effectively reveal the causal mechanisms between variables. This application introduces causal inference theory, uses the PC algorithm to construct a causal graph, and combines average treatment effect (ATE) with counterfactual analysis to quantitatively identify the "true controlling factors affecting production capacity," providing greater explanatory power and guiding significance.
[0198] 2. Combining expert knowledge with data-driven approaches to improve the scientific nature and accuracy of causal structures: By integrating expert knowledge from the fields of geology, physics, and technology to establish an a priori framework for causal structures, and using causal discovery algorithms to automatically supplement unknown paths, this ensures that the causal diagram is consistent with both physical mechanisms and actual data, thereby improving the scientific nature, completeness, and credibility of the model.
[0199] 3. Use Bootstrap repeated sampling to improve the stability and generalization of conclusions: By repeatedly performing causal inference on different sample sets and evaluating the distribution and confidence interval of the causal effect, we ensure that the identified main controlling factors are consistent across different blocks and gas wells, thereby enhancing the reliability and generalization of the model results.
[0200] 4. Comprehensive coverage of factors affecting production capacity, providing more complete analysis results: This application considers variables in multiple dimensions, including production data, geological data, hydrate parameters, and development design. Variance analysis and standardization are introduced in the data preprocessing stage to ensure that the input data are representative and comparable, providing a solid data foundation for causal analysis.
[0201] like Figure 9 As shown, the embodiment of the present application further provides a natural gas hydrate production capacity main control factor analysis device 900, which can implement the above method, and the device includes:
[0202] The data preprocessing module 901 is used to obtain sample data of various variable factors of natural gas hydrate production capacity and preprocess the sample data;
[0203] The causal structure learning module 902 is used to construct a preliminary causal structure between variable factors based on physical mechanisms, and to evaluate direct causal relationships based on the preliminary causal structure and preprocessed sample data to obtain a target causal graph;
[0204] The causal inference analysis module 903 is used to perform causal inference analysis based on the target causal graph to obtain the main controlling factors of natural gas hydrate production capacity.
[0205] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0206] The present application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, an in-vehicle computer, or the like.
[0207] It can be understood that the contents of the above method embodiments are applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0208] like Figure 10 As shown, Figure 10 The hardware structure of an electronic device 1000 according to another embodiment is shown. The electronic device 1000 includes:
[0209] The processor 1001 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention.
[0210] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called by the processor 1001 to execute the network node population optimization method of the embodiment of the present invention.
[0211] Input / output interface 1003, used to implement information input and output;
[0212] Communication interface 1004, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0213] Bus 1005 , which transmits information between various components of the device (e.g., processor 1001 , memory 1002 , input / output interface 1003 , and communication interface 1004 );
[0214] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0215] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one location or distributed across multiple network units. Some or all of these modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0216] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above method is implemented.
[0217] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0218] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0219] It is understandable that the contents of the above method embodiments are all applicable to the present program product embodiments, the functions specifically implemented by the present program product embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0220] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0221] The embodiments of the present application provide a method, device, electronic device, storage medium, and program product for analyzing the main controlling factors of natural gas hydrate production capacity. The method obtains sample data of multiple variable factors of natural gas hydrate production capacity and pre-processes the sample data; constructs a preliminary causal structure between the variable factors based on physical mechanisms, and performs a direct causal relationship evaluation based on the preliminary causal structure and the pre-processed sample data to obtain a target causal graph; and performs causal inference analysis based on the target causal graph to obtain the main controlling factors of the natural gas hydrate production capacity. This application uses a method for analyzing the main controlling factors of natural gas hydrate production capacity based on causal inference to accurately identify the causal relationships that affect production capacity, improve the scientific nature and reliability of the screening of main controlling factors based on causal relationships, and provide more powerful technical support for natural gas hydrate development.
[0222] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0223] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0224] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0225] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0226] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0227] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0228] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0229] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0230] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0231] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0232] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A method for analyzing the main controlling factors of natural gas hydrate production capacity, characterized in that: The method comprises the following steps: Obtaining sample data of multiple variable factors of natural gas hydrate production capacity, and preprocessing the sample data; Constructing a preliminary causal structure between the variable factors based on physical mechanisms, and performing direct causal relationship evaluation based on the preliminary causal structure and preprocessed sample data to obtain a target causal graph; The direct causal relationship evaluation based on the preliminary causal structure and the preprocessed sample data to obtain the target causal graph includes the following steps: Taking the preliminary causal structure as a constraint, and according to the preprocessed sample data, using a constraint-based causal discovery method to construct the target causal graph; The method of using the preliminary causal structure as a constraint and constructing the target causal graph using a constraint-based causal discovery method based on the preprocessed sample data includes the following steps: Using the preliminary causal structure as a constraint, a completely undirected graph is initialized based on the preprocessed sample data; wherein the sample data includes multiple observation samples of the variable factors, each observation sample corresponds to a variable node in the completely undirected graph, and undirected edges exist between any of the variable nodes; Performing a conditional independence test on the completely undirected graph based on a preset test tool; Based on the result of the conditional independence test, the undirected edge between the two variable nodes forming a conditional independence relationship in the completely undirected graph is deleted to obtain a skeleton graph; Determining the causal directions of the remaining undirected edges through the collision structure in the skeleton graph to obtain the target causal graph; Performing causal inference analysis based on the target causal graph to obtain the main controlling factors of the natural gas hydrate production capacity; The causal inference analysis includes an average treatment effect estimation method and a counterfactual analysis method; performing causal inference analysis based on the target causal graph to obtain the main controlling factors of the natural gas hydrate production capacity includes the following steps: The average treatment effect estimation method is used to obtain the average effect of each variable factor change on the initial gas production, and preliminary main controlling factors are screened based on the average effect; Based on the counterfactual analysis method, construct a counterfactual sample in which the sampling data of the preliminary main controlling factor changes; Based on the counterfactual sample, using the target causal graph to predict the predicted daily gas production; Determining the significance of the change based on the difference between the predicted daily gas production and the set original daily gas production; The target main controlling factor of the natural gas hydrate production capacity is determined according to the significance of the change.
2. The method according to claim 1, characterized in that The preprocessing of the sample data comprises the following steps: Performing statistical analysis on the sample data of each variable factor using one-way analysis of variance to obtain an F test result corresponding to each variable factor; Obtaining a p-value of the F-test result based on a preset degree of freedom; wherein the degree of freedom is determined based on the number of groups and the number of samples of the sample data; When the p-value of one of the variable factors is greater than a preset threshold, the corresponding variable factor is eliminated or its weight is reduced.
3. The method according to claim 2, characterized in that The preprocessing of the sample data further includes at least one of the following steps: Filling in the missing values of the sample data based on the mean filling method; When the data missing rate of a type of sample data exceeds a preset ratio, the corresponding sample data is eliminated; Performing standardization on the sample data corresponding to all the variable factors; The sample data is normalized based on a preset data structure.
4. The method according to claim 1, wherein The counterfactual sample includes variable data of multiple sampling intervals; and determining the target main controlling factor of the natural gas hydrate production capacity according to the change significance includes the following steps: When the change significance of a preliminary main controlling factor corresponding to the counterfactual samples in each sampling interval is significant, the corresponding preliminary main controlling factor is determined to be the target main controlling factor of the natural gas hydrate production capacity.
5. A device for analyzing the main controlling factors of natural gas hydrate production capacity, characterized in that: The device comprises: A data preprocessing module, used to obtain sample data of various variable factors of natural gas hydrate production capacity and preprocess the sample data; A causal structure learning module is used to construct a preliminary causal structure between the variable factors based on physical mechanisms, and to evaluate direct causal relationships based on the preliminary causal structure and preprocessed sample data to obtain a target causal graph; The direct causal relationship evaluation based on the preliminary causal structure and the preprocessed sample data to obtain the target causal graph includes the following steps: Taking the preliminary causal structure as a constraint, and according to the preprocessed sample data, using a constraint-based causal discovery method to construct the target causal graph; The method of using the preliminary causal structure as a constraint and constructing the target causal graph using a constraint-based causal discovery method based on the preprocessed sample data includes the following steps: Using the preliminary causal structure as a constraint, a completely undirected graph is initialized based on the preprocessed sample data; wherein the sample data includes multiple observation samples of the variable factors, each observation sample corresponds to a variable node in the completely undirected graph, and undirected edges exist between any of the variable nodes; Performing a conditional independence test on the completely undirected graph based on a preset test tool; Based on the result of the conditional independence test, the undirected edge between the two variable nodes forming a conditional independence relationship in the completely undirected graph is deleted to obtain a skeleton graph; Determining the causal directions of the remaining undirected edges through the collision structure in the skeleton graph to obtain the target causal graph; a causal inference analysis module, configured to perform causal inference analysis based on the target causal graph to obtain the main controlling factors of the natural gas hydrate production capacity; The causal inference analysis includes an average treatment effect estimation method and a counterfactual analysis method; performing causal inference analysis based on the target causal graph to obtain the main controlling factors of the natural gas hydrate production capacity includes the following steps: The average treatment effect estimation method is used to obtain the average effect of each variable factor change on the initial gas production, and preliminary main controlling factors are screened based on the average effect; Based on the counterfactual analysis method, construct a counterfactual sample in which the sampling data of the preliminary main controlling factor changes; Based on the counterfactual sample, using the target causal graph to predict the predicted daily gas production; Determining the significance of the change based on the difference between the predicted daily gas production and the set original daily gas production; The target main controlling factor of the natural gas hydrate production capacity is determined according to the significance of the change.
6. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Gas turbine compressor water washing early warning method based on dynamic causal diagram analysis
CN116432444A
Stock price prediction-oriented causal relationship characteristic factor selection method, device and equipment
CN117670540A