A method for geological risk assessment of oil and gas production based on data mining

By constructing a four-dimensional pressure field and multi-channel image dataset, combined with deep learning and reinforcement learning technology, the problem of correlation between reservoir pressure field and heterogeneous characteristics in oil and gas mining is solved, and more accurate dynamic risk assessment and real-time early warning are achieved.

CN119761205AInactive Publication Date: 2025-04-04DONGYING RUIXIN PETROLEUM TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411945592.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing geological risk assessment methods for oil and gas exploitation are difficult to capture the complex spatial and temporal dynamic correlation between reservoir pressure field and heterogeneous characteristics, and lack effective means for dynamic risk prediction and real-time early warning.

Method used

By acquiring and preprocessing oil and gas extraction geological data, a three-dimensional geological model and a four-dimensional pressure field are constructed, and heterogeneous features are extracted using multi-channel image and deep learning technology, combining reinforcement learning and Bayesian networks for risk association mining and dynamic risk prediction.

Benefits of technology

The in-depth exploration of complex correlation rules between reservoir pressure field and heterogeneity is achieved, the accuracy of dynamic risk prediction and real-time early warning capabilities are improved, and more effective and reliable geological risk assessment results are provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761205A_ABST
    Figure CN119761205A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data mining technology, and in particular to a method for assessing geological risks in oil and gas production based on data mining. The method comprises the following steps: acquiring geological data for oil and gas production, and performing data preprocessing to obtain preprocessed data; constructing a three-dimensional geological model of the oil and gas production area to obtain a three-dimensional geological model; extracting pressure prediction features from the preprocessed data and the three-dimensional geological model to obtain a pressure prediction feature set; constructing a dynamic pressure field based on different time points according to the pressure prediction feature set to obtain a four-dimensional pressure field; constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set; constructing an image feature extraction model according to the multi-channel image data set to obtain an image feature extraction model. The present invention provides a more effective and reliable method for assessing geological risks in oil and gas production by combining deep learning, reinforcement learning and Bayesian networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data mining, and in particular to a method for assessing geological risks in oil and gas production based on data mining. Background Art

[0002] Geological risk assessment for oil and gas production is a crucial link in the development of oil and gas fields. It aims to guide oil and gas production planning and production optimization by predicting reservoir pressure changes, geological characteristics and potential risk factors through quantitative analysis. Traditional empirical assessment methods have gradually been replaced by data-driven technologies. Early geological risk assessment methods mainly rely on the construction of three-dimensional geological models, combined with reservoir physical parameters (such as porosity, permeability) and pressure field simulation for static assessment. With the accumulation of historical data of oil and gas fields, statistical methods have been widely used in risk assessment, such as linear regression, principal component analysis (PCA) and other methods to analyze the relationship between reservoir pressure changes and geological factors. Later, data mining methods were gradually introduced into geological risk assessment. Through methods such as support vector machine (SVM) and random forest (RF), some potential risk features can be mined from historical data. However, due to the multidimensionality and complexity of oil and gas production data, existing methods still have shortcomings in mining the association rules between reservoir pressure field and heterogeneous characteristics, as well as dynamic risk prediction and real-time early warning.

[0003] There are complex spatiotemporal dynamic correlations between reservoir pressure field and geological heterogeneity, and existing methods are difficult to capture and quantify these correlations. Existing methods mainly rely on physical models or simple statistical analysis, and fail to make full use of multi-source data (such as three-dimensional geological models, dynamic production data, water injection parameters, etc.) for deep mining. The lack of mining methods for complex association rules makes it difficult to accurately identify risk factors and their causal relationships.

[0004] Oil and gas production is a dynamic process. Reservoir pressure and geological conditions will continue to adjust with time and changes in production strategies. Existing methods usually assess risks based on static three-dimensional geological models, ignoring dynamic changes in the time dimension. The lack of analytical methods for the spatiotemporal evolution characteristics of the pressure field makes it impossible to dynamically predict risks and provide real-time warnings, resulting in the evaluation results lagging behind the actual production process. Summary of the invention

[0005] Based on this, it is necessary to provide a geological risk assessment method for oil and gas production based on data mining to solve at least one of the above technical problems.

[0006] To achieve the above purpose, a method for assessing geological risks in oil and gas production based on data mining includes the following steps:

[0007] Step S1: Acquire oil and gas production geological data, and perform data preprocessing to obtain preprocessed data; construct a three-dimensional geological model of the oil and gas production area to obtain a three-dimensional geological model; extract pressure prediction features from the preprocessed data and the three-dimensional geological model to obtain a pressure prediction feature set; construct a dynamic pressure field based on different time points according to the pressure prediction feature set to obtain a four-dimensional pressure field;

[0008] Step S2: constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set; constructing an image feature extraction model based on the multi-channel image data set to obtain an image feature extraction model; inputting the multi-channel image data set into the image feature extraction model to extract a heterogeneity feature vector to obtain a heterogeneity feature vector;

[0009] Step S3: constructing the state space of the heterogeneity feature vector and the four-dimensional pressure field to obtain state space data; defining the action space according to the state space data to obtain the action space data; designing the reward function according to the state space data and the action space data to obtain the reward function; constructing the risk association mining model according to the state space data, the action space data and the reward function to obtain the risk association mining model; extracting association rules using the risk association mining model to obtain the pressure-heterogeneity association rules;

[0010] Step S4: Establish a Bayesian network structure according to the pressure-heterogeneity association rule to obtain a Bayesian network structure; use the Bayesian network structure to predict the probability of geological dynamic risk according to the four-dimensional pressure field to obtain a geological risk assessment report to achieve the geological risk assessment task of oil and gas production.

[0011] The present invention constructs a pressure prediction feature set containing static and dynamic features by integrating historical data, geological models and reservoir simulation results, and uses the LSTM model to predict the pressure field at different time points in the future, and finally constructs a four-dimensional pressure field, which provides accurate and reliable dynamic pressure data for subsequent heterogeneity feature extraction and risk assessment. By converting the geological model and pressure field data into multi-channel images, and using data enhancement and convolutional neural networks combined with attention mechanisms, the automatic extraction of reservoir heterogeneity features is realized, effectively avoiding the subjectivity and limitations of traditional manual methods, and improving the efficiency and accuracy of feature extraction. By constructing state space, action space and reward function, and combining multi-agent reinforcement learning and reservoir simulation, a risk association mining model is established, which realizes the mining of the complex relationship between reservoir heterogeneity and pressure changes, and extracts pressure-heterogeneity association rules, providing reliable association analysis results for geological risk probability prediction. Based on the pressure-heterogeneity association rules and four-dimensional pressure field data, a Bayesian network model was constructed to achieve dynamic probability prediction of geological risks and generate a geological risk assessment report, which provides quantitative risk assessment results and visual risk probability graphs for oil and gas production decisions, improving the accuracy and interpretability of risk assessment. Therefore, the present invention provides a method for assessing geological risks in oil and gas production based on data mining. By combining deep learning, reinforcement learning and Bayesian network data mining technology, it effectively solves the shortcomings of existing methods in association analysis capabilities and dynamic risk assessment, and provides a more effective and reliable method for assessing geological risks in oil and gas production.

[0012] Preferably, step S1 comprises the following steps:

[0013] Step S11: acquiring historical pressure data, production data and water injection data; performing data preprocessing on the historical pressure data, production data and water injection data to obtain preprocessed data;

[0014] Step S12: constructing a three-dimensional geological model of the oil and gas production area to obtain a three-dimensional geological model;

[0015] Step S13: extracting pressure prediction features from the preprocessed data and the three-dimensional geological model to obtain a pressure prediction feature set;

[0016] Step S14: Perform LSTM model training on the pressure prediction feature set to obtain an LSTM pressure prediction model;

[0017] Step S15: using the LSTM pressure prediction model to perform pressure field prediction on the pressure prediction feature set to obtain pressure field prediction data;

[0018] Step S16: constructing a four-dimensional pressure field based on the pressure field prediction data at different time points to obtain a four-dimensional pressure field.

[0019] The present invention ensures the integrity, consistency and reliability of input data by acquiring and preprocessing historical pressure, production and water injection data, provides a high-quality data basis for subsequent pressure prediction and risk assessment, and effectively avoids prediction errors and risk assessment deviations caused by missing or abnormal data. The three-dimensional geological model is constructed to realize the digital expression of the geological structure of the oil and gas reservoir, and provides a spatial framework for subsequent pressure field simulation and heterogeneity feature extraction, so that the geometric morphology, lithology distribution and physical parameters of the reservoir can be described more accurately, thereby improving the accuracy of risk assessment. By extracting static geological features, dynamic production data, and features such as pressure gradient, flow direction and pressure change trend obtained by simulation calculation, a comprehensive pressure prediction feature set is constructed, which can more effectively capture the key influencing factors of pressure changes in the reservoir, and provide richer information for the training and accurate prediction of the LSTM model. By using the LSTM model to train the pressure prediction feature set, a prediction model that can capture the long-term dependency relationship in the pressure time series data is obtained. Compared with the traditional pressure prediction method, the LSTM model can more accurately predict the future pressure field change trend and provide a more reliable basis for dynamic risk assessment. By using the trained LSTM pressure prediction model, the pressure field at different time points in the future is predicted, and the pressure field prediction data is obtained, which provides the necessary data support for the subsequent construction of the four-dimensional pressure field and dynamic risk assessment. By integrating the pressure field prediction data at different time points, a four-dimensional pressure field is constructed, and the time dimension is introduced into the pressure field analysis, which can more comprehensively reflect the dynamic change of reservoir pressure over time, and provide key dynamic information for the subsequent heterogeneity feature extraction and risk association mining.

[0020] Preferably, step S13 comprises the following steps:

[0021] Step S131: extracting static geological features from the three-dimensional geological model to obtain static feature data;

[0022] Step S132: extracting dynamic production data from the preprocessed data to obtain dynamic production data;

[0023] Step S133: using storage layer simulation software to perform reservoir simulation calculations on static characteristic data and dynamic production data to obtain simulation result data;

[0024] Step S134: performing pressure gradient calculation according to the simulation result data to obtain pressure gradient data; performing flow direction calculation according to the simulation result data to obtain flow direction data;

[0025] Step S135: Calculate the pressure change trend characteristics according to the dynamic production data to obtain pressure change trend characteristic data;

[0026] Step S136: integrating the static characteristic data, pressure gradient data, flow direction data and pressure change trend characteristic data to obtain a pressure prediction feature set.

[0027] The present invention extracts static geological features in a three-dimensional geological model, such as porosity, permeability and lithology, and converts the static information of the geological model into quantifiable data, providing basic geological parameters for subsequent pressure prediction and risk assessment, and helping to more accurately describe the heterogeneity of the reservoir. Dynamic production data, such as pressure, production and water injection volume, are extracted from preprocessed data, and the dynamic information of oil and gas production is combined with the spatial information of the geological model, providing necessary data input for subsequent reservoir simulation calculations and pressure change trend analysis. Reservoir simulation software is used to combine static geological features and dynamic production data to perform reservoir simulation calculations, and more refined information such as pressure field distribution, pressure gradient and flow direction are obtained, which can more accurately reflect the dynamic process of fluid flow and pressure change in the reservoir. By calculating the pressure gradient and flow direction, the spatial variation of pressure in the reservoir and the characteristics of fluid flow can be more clearly portrayed. This information is crucial for identifying potential risk areas, such as areas with large pressure gradients are more likely to be activated by faults. Calculating pressure change trend characteristics, such as pressure change rate and pressure moving average, can capture the law of pressure change over time, help predict future pressure change trends, and provide early warning information for risk assessment. By integrating static geological characteristics, dynamic production data, pressure gradient, flow direction and pressure change trend characteristics, a more comprehensive pressure prediction feature set is constructed. This feature set includes a variety of key factors affecting reservoir pressure changes, laying a solid foundation for the subsequent use of the LSTM model for more accurate pressure prediction.

[0028] Preferably, step S2 comprises the following steps:

[0029] Step S21: constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set;

[0030] Step S22: performing data enhancement on the multi-channel image dataset to obtain a data enhanced image dataset;

[0031] Step S23: constructing an image feature extraction model based on a convolutional neural network according to the image data set after data enhancement to obtain an image feature extraction model;

[0032] Step S24: using the image feature extraction model to calculate the feature map of the multi-channel image data set to obtain feature map data; generating attention weights according to the feature map data to obtain attention weight data;

[0033] Step S25: performing weighted feature map calculation on the feature map data according to the attention weight data to obtain weighted feature map data; performing inhomogeneity feature vector generation according to the weighted feature map data to obtain inhomogeneity feature vector.

[0034] The present invention converts the three-dimensional geological model and the four-dimensional pressure field into a multi-channel image data set, and integrates the geological and pressure information into the image representation, so that mature image processing techniques, such as convolutional neural networks, can be used to extract the heterogeneity characteristics of the reservoir, thereby improving the efficiency and accuracy of feature extraction. Through data enhancement techniques, such as image flipping and rotation, the diversity of training samples is increased, the scale of the data set is effectively expanded, the generalization ability of the training model is improved, the risk of overfitting is reduced, and the robustness of the model is enhanced. The convolutional neural network model is trained using the enhanced multi-channel image data set, so that the model can automatically learn and extract the key features of reservoir heterogeneity, avoiding the subjectivity and limitations of traditional manual feature extraction, thereby improving the automation and efficiency of feature extraction. The feature map is calculated using the trained CNN model, and the attention weight is generated in combination with the attention mechanism, so that the model can pay more attention to the key areas related to heterogeneity in the image, thereby extracting more representative and discriminative feature information, and improving the accuracy and effectiveness of feature extraction. The feature maps are weighted by attention weights to highlight important heterogeneity features, and a compact heterogeneity feature vector is generated through global average pooling, which effectively expresses the heterogeneity information of the reservoir and provides high-quality input features for subsequent risk association mining.

[0035] Preferably, step S21 includes the following steps:

[0036] Step S211: Slice the three-dimensional geological model according to geological attributes to obtain geological attribute slice data;

[0037] Step S212: Slice the four-dimensional pressure field at each time step to obtain pressure field slice data;

[0038] Step S213: Calculate the pressure difference of the pressure field slice data to obtain pressure difference image data;

[0039] Step S214: performing image channel merging on the geological attribute slice data, the pressure field slice data and the pressure difference image data to obtain slice channel data;

[0040] Step S215: construct a multi-channel image data set for the slice channel data to obtain a multi-channel image data set.

[0041] The present invention converts the three-dimensional geological information into a series of two-dimensional images by slicing the three-dimensional geological model, which is convenient for subsequent image processing and feature extraction, while retaining the geological attribute information of different depths, and providing basic data for constructing a multi-channel image data set. The four-dimensional pressure field is sliced ​​in time steps, and the three-dimensional pressure field information of each time step is converted into a two-dimensional image, which realizes the expansion of the pressure field data in the time dimension, and provides necessary data preparation for the subsequent calculation of pressure difference and construction of multi-channel images. The difference of pressure field slices in adjacent time steps is calculated, which highlights the dynamic change characteristics of the pressure field, can more effectively reflect the trend and amplitude of pressure change, and provides more sensitive dynamic information for subsequent heterogeneity feature extraction. The geological attribute slices, pressure field slices and pressure difference image data are merged into a multi-channel image, and different types of data are integrated under a unified representation framework, so that the convolutional neural network can simultaneously learn and extract various information such as geological attributes, pressure distribution and pressure change trend, so as to more comprehensively characterize the heterogeneity characteristics of the reservoir. All slice channel data are integrated into a multi-channel image dataset, and a four-dimensional dataset containing rich geological and pressure information is constructed, providing a complete data foundation for subsequent training of deep learning models and extraction of heterogeneity feature vectors.

[0042] Preferably, step S3 comprises the following steps:

[0043] Step S31: constructing the state space of the heterogeneity feature vector and the four-dimensional pressure field to obtain state space data;

[0044] Step S32: defining the action space according to the state space data to obtain the action space data;

[0045] Step S33: Designing a reward function according to the state space data and the action space data to obtain a reward function;

[0046] Step S34: dividing the reservoir area according to the state space data to obtain the reservoir division area;

[0047] Step S35: Initialize the multi-agent according to the state space data, the action space data and the reservoir division area to obtain the initialized multi-agent;

[0048] Step S36: constructing a parallel training environment for the initialized multi-agent according to the reward function to obtain a parallel training environment; performing parallel training of the multi-agent according to the parallel training environment to obtain a trained multi-agent;

[0049] Step S37: Perform multi-agent strategy fusion on the trained multi-agent to obtain a risk association mining model; use the risk association mining model to extract association rules to obtain pressure-heterogeneity association rules.

[0050] The present invention constructs a complete state space containing rich information by integrating heterogeneity feature vectors, four-dimensional pressure field data, production and water injection volume, and spatiotemporal characteristics of the pressure field, providing a comprehensive perception of the reservoir state for the reinforcement learning agent, which helps the agent to learn and make decisions more effectively. The action space is defined and discretized and verified to ensure the effectiveness and safety of the action, limit the action range of the agent to meet the actual operation constraints, and avoid the generation of invalid or dangerous actions, thereby improving the efficiency and stability of reinforcement learning. By designing a reward function, the two goals of maximizing oil and gas production and minimizing geological risks are integrated into the reinforcement learning process, guiding the agent to learn how to increase production while ensuring safety, and achieving a balance between risk control and benefit maximization. The reservoir is divided into different regions, and the spatial heterogeneity of the reservoir is taken into account, so that different agents can be trained for the characteristics of different regions, thereby more finely controlling the mining strategy of each region and improving the effectiveness of overall risk management. A deep reinforcement learning agent is initialized for each reservoir region. Each agent has independent learning ability and can learn the optimal mining strategy for the characteristics of a specific region, laying a foundation for distributed control and optimization. Building a parallel training environment and using reward functions to train multiple agents in parallel speeds up the model training, improves learning efficiency, and enables each agent to learn the best mining strategy for a specific area through interaction with the environment. By integrating the strategies of multiple agents, a global risk association mining model is obtained. This model integrates the learning results of each region, can more effectively capture the complex relationship between reservoir heterogeneity and pressure changes, and extract more instructive pressure-heterogeneity association rules, providing a more reliable basis for geological risk assessment.

[0051] Preferably, step S31 includes the following steps:

[0052] Step S311: performing a one-dimensional vector conversion based on a time step on the four-dimensional pressure field to obtain a one-dimensional pressure vector; performing feature vector concatenation on the one-dimensional pressure vector and the inhomogeneity feature vector to obtain an initial state vector;

[0053] Step S312: performing spatiotemporal feature extraction preparation on the four-dimensional pressure field to obtain pressure field sequence data;

[0054] Step S313: extracting pressure field spatial features from the pressure field sequence data to obtain pressure field spatial features;

[0055] Step S314: extracting the pressure field time feature from the pressure field spatial feature to obtain the pressure field time feature;

[0056] Step S315: Complete state vector splicing is performed on the initial state vector, the pressure field spatial characteristics and the pressure field temporal characteristics to obtain state space data.

[0057] The present invention constructs an initial state vector by converting a four-dimensional pressure field into a one-dimensional pressure vector and splicing it with a heterogeneity feature vector, thereby integrating the pressure field and reservoir heterogeneity information into the state representation, and providing a basic perception of the current reservoir state for the reinforcement learning agent. The four-dimensional pressure field data is organized into a time series form, which prepares data for the subsequent extraction of the spatiotemporal characteristics of the pressure field, so that the dynamic change law of the pressure field in the time dimension can be captured using a time series model. The spatial characteristics of the pressure field are extracted using a pre-trained 3D convolutional neural network, which effectively captures the distribution pattern and local characteristics of the pressure field in the spatial dimension, such as the shape and position of high-pressure and low-pressure areas, and provides richer spatial information for state representation. The temporal characteristics of the pressure field are extracted using an LSTM network, which captures the evolution law and dynamic trend of the pressure field in the time dimension, such as the rate and duration of pressure rise or fall, and provides richer dynamic information for state representation. The initial state vector, spatial characteristics of the pressure field, and temporal characteristics of the pressure field are spliced ​​together to construct a complete state vector containing more comprehensive information. The static characteristics of the reservoir, dynamic pressure data, and the spatiotemporal change patterns of the pressure field are integrated into the state representation, providing the reinforcement learning agent with a more detailed and comprehensive perception of the reservoir state, which helps to improve the agent's learning efficiency and decision-making ability.

[0058] Preferably, step S32 includes the following steps:

[0059] Step S321: obtaining a water injection plan and a production plan; parameterizing the water injection plan and the production plan to obtain water injection parameters and production parameters;

[0060] Step S322: constructing an action vector for the water injection parameter and the production parameter to obtain an action vector;

[0061] Step S323: discretizing the action vector into an action space to obtain a discretized action space;

[0062] Step S324: performing action space verification on the discretized action space according to the state space data to obtain action space data.

[0063] The present invention obtains and parameterizes the water injection scheme and the production scheme, converts the actual oil field operation scheme into parameters that can be adjusted by the reinforcement learning agent, provides the agent with a specific means of controlling oil and gas production, and enables the agent to optimize the mining strategy by adjusting these parameters. The water injection parameters and the production parameters are constructed into action vectors, and multiple control parameters are integrated into a unified vector representation, which facilitates the reinforcement learning agent to perform action selection and strategy learning. The continuous action vector is discretized, and the infinite action space is converted into a finite set of discrete actions, which simplifies the complexity of the reinforcement learning problem, improves the learning efficiency of the agent, and enables the use of table-based reinforcement learning algorithms. By using a reservoir simulator to verify the discretized action space, unsafe or unfeasible actions are eliminated, ensuring the effectiveness and safety of all actions of the agent, and avoiding reservoir pressure anomalies or other geological risks caused by improper action selection.

[0064] Preferably, step S33 includes the following steps:

[0065] Step S331: using storage layer simulation software to perform pressure field simulation according to state space data and action space data to obtain simulated pressure field data;

[0066] Step S332: Calculate the pressure change of the simulated pressure field data and the state space data to obtain pressure change data;

[0067] Step S333: Calculate the risk index according to the pressure change data to obtain the risk index;

[0068] Step S334: Calculate risk penalty according to the risk indicator to obtain risk penalty data;

[0069] Step S335: Calculate the production reward according to the action space data to obtain production reward data;

[0070] Step S336: Integrate the risk penalty data and the output reward data into a reward function to obtain a reward function.

[0071] The present invention simulates the change of the future pressure field according to the current state and the action selected by the intelligent agent by using reservoir simulation software, and provides the necessary data basis for calculating the reward function, so that the reward function can reflect the impact of the action on the reservoir pressure. By calculating the difference between the simulated pressure field and the current pressure field, the pressure change data is obtained, and the degree of influence of the intelligent agent action on the reservoir pressure is quantified, which provides basic data for the subsequent calculation of risk indicators. According to the pressure change data, the risk index is calculated, such as the maximum pressure change, the standard deviation of the pressure change and the mean of the pressure change near the fault, and the pressure change is converted into a specific risk index, which provides a basis for quantifying the risk. According to the risk index, the risk penalty is calculated, and the risk index is converted into a negative reward, which is used to punish the action that leads to high risk, so as to encourage the intelligent agent to learn to choose a low-risk mining strategy. According to the action space data, the production reward is calculated, and the production change is converted into a positive reward, which is used to reward the action that can increase the production, and encourage the intelligent agent to learn to choose a high-yield mining strategy. The risk penalty and the production reward are integrated into the final reward function, which balances the two goals of maximizing production and minimizing risk, guides the intelligent agent to learn how to increase production under the premise of ensuring safety, and achieves a balance between risk control and maximizing benefits.

[0072] Preferably, step S4 comprises the following steps:

[0073] Step S41: Identify risk factors for the pressure-heterogeneity association rule to obtain a risk factor set;

[0074] Step S42: performing Bayesian network structure learning according to the risk factor set and the four-dimensional pressure field to obtain a Bayesian network structure;

[0075] Step S43: extracting real-time pressure field data according to the four-dimensional pressure field to obtain real-time pressure field data;

[0076] Step S44: using the Bayesian network structure to perform dynamic risk probability calculation on the real-time pressure field data to obtain a risk probability prediction result;

[0077] Step S45: generating a dynamic risk probability graph for the risk probability prediction result to obtain a dynamic risk probability graph;

[0078] Step S46: Perform geological risk assessment based on the dynamic risk probability map and the preset risk threshold to obtain a geological risk assessment report.

[0079] The present invention identifies key factors that have a significant impact on geological risks by analyzing the pressure-heterogeneity association rules, provides a basis for building a Bayesian network model, enables the model to focus on the most important risk factors, and improves the efficiency and accuracy of risk assessment. Based on the risk factor set and four-dimensional pressure field data, the Bayesian network structure is learned, the dependencies between risk factors and their impact on geological risks are captured, and a probability relationship model between risk factors and geological risks is established, providing a framework for dynamic risk probability prediction. Real-time pressure field data is extracted from the four-dimensional pressure field to provide the latest pressure information for the Bayesian network model, so that risk assessment can be based on the current reservoir state, improving the timeliness of risk assessment. The Bayesian network model is used to infer the real-time pressure field data, calculate the probability of geological risk occurrence, realize the quantitative assessment of geological risks, and provide a decision-making basis for risk management. The risk probability prediction results are visualized as dynamic risk probability maps, and the abstract probability values ​​are converted into intuitive images, which facilitates users to understand and analyze the spatial distribution and change trend of risks, and improves the interpretability of risk assessment. Based on the dynamic risk probability map and the preset risk threshold, geological risk assessment is carried out and an assessment report is generated, which provides clear risk assessment conclusions and recommended risk measures, and provides an important reference for oil and gas production decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 A schematic diagram of the steps of a method for assessing geological risks in oil and gas production based on data mining;

[0081] Figure 2 Detailed implementation flow chart of step S2 in the present invention;

[0082] Figure 3 It is a schematic diagram of the detailed implementation steps of step S3 in the present invention.

[0083] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0084] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0085] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0086] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0087] To achieve this, please refer to Figures 1 to 3 , a method for assessing geological risks in oil and gas production based on data mining, comprising the following steps:

[0088] Step S1: Acquire oil and gas production geological data, and perform data preprocessing to obtain preprocessed data; construct a three-dimensional geological model of the oil and gas production area to obtain a three-dimensional geological model; extract pressure prediction features from the preprocessed data and the three-dimensional geological model to obtain a pressure prediction feature set; construct a dynamic pressure field based on different time points according to the pressure prediction feature set to obtain a four-dimensional pressure field;

[0089] Step S2: constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set; constructing an image feature extraction model based on the multi-channel image data set to obtain an image feature extraction model; inputting the multi-channel image data set into the image feature extraction model to extract a heterogeneity feature vector to obtain a heterogeneity feature vector;

[0090] Step S3: constructing the state space of the heterogeneity feature vector and the four-dimensional pressure field to obtain state space data; defining the action space according to the state space data to obtain the action space data; designing the reward function according to the state space data and the action space data to obtain the reward function; constructing the risk association mining model according to the state space data, the action space data and the reward function to obtain the risk association mining model; extracting association rules using the risk association mining model to obtain the pressure-heterogeneity association rules;

[0091] Step S4: Establish a Bayesian network structure according to the pressure-heterogeneity association rule to obtain a Bayesian network structure; use the Bayesian network structure to predict the probability of geological dynamic risk according to the four-dimensional pressure field to obtain a geological risk assessment report to achieve the geological risk assessment task of oil and gas production.

[0092] In the embodiment of the present invention, reference Figure 1 FIG. 1 is a schematic diagram of the steps of the oil and gas production geological risk assessment method based on data mining of the present invention. In this example, the oil and gas production geological risk assessment method based on data mining includes the following steps:

[0093] Step S1: Acquire oil and gas production geological data, and perform data preprocessing to obtain preprocessed data; construct a three-dimensional geological model of the oil and gas production area to obtain a three-dimensional geological model; extract pressure prediction features from the preprocessed data and the three-dimensional geological model to obtain a pressure prediction feature set; construct a dynamic pressure field based on different time points according to the pressure prediction feature set to obtain a four-dimensional pressure field;

[0094] In an embodiment of the present invention, historical pressure, production and water injection data are first obtained and preprocessed, including missing value filling, outlier removal and data normalization. Then, Petrel software is used to construct a three-dimensional geological model based on seismic interpretation results, well logging data and geological stratification data, including a structural model, a lithology model and a physical property model. Next, static geological features (porosity, permeability, lithology) are extracted from the three-dimensional geological model, and dynamic production data (pressure, production, water injection volume) are extracted from the preprocessed data, and the reservoir simulation software Eclipse is combined to calculate features such as pressure gradient, flow direction and pressure change trend. Finally, all features are integrated to construct a pressure prediction feature set, and the LSTM model is used for training and prediction to obtain the pressure field at different time points in the future, construct four-dimensional pressure field data, and save it in NetCDF format.

[0095] Step S2: constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set; constructing an image feature extraction model based on the multi-channel image data set to obtain an image feature extraction model; inputting the multi-channel image data set into the image feature extraction model to extract a heterogeneity feature vector to obtain a heterogeneity feature vector;

[0096] In an embodiment of the present invention, the three-dimensional geological model and the four-dimensional pressure field data are converted into a multi-channel image data set. The geological attributes (porosity, permeability, lithology) and the pressure field data of each time step are respectively used as different image channels. The multi-channel image is then enhanced using the Imgaug library, including flipping and rotation operations. Next, a convolutional neural network (CNN) model based on the ResNet50 architecture is constructed using TensorFlow and Keras, and the enhanced image data set is used for training to obtain an image feature extraction model. Finally, the multi-channel image data set is input into the trained CNN model, and the weighted feature map is extracted in combination with the CBAM attention mechanism. After global average pooling, a heterogeneity feature vector is generated and saved in HDF5 format.

[0097] Step S3: constructing the state space of the heterogeneity feature vector and the four-dimensional pressure field to obtain state space data; defining the action space according to the state space data to obtain the action space data; designing the reward function according to the state space data and the action space data to obtain the reward function; constructing the risk association mining model according to the state space data, the action space data and the reward function to obtain the risk association mining model; extracting association rules using the risk association mining model to obtain the pressure-heterogeneity association rules;

[0098] In an embodiment of the present invention, the heterogeneity feature vector, four-dimensional pressure field data, production and injection volume data are integrated, and the spatiotemporal characteristics of the pressure field are extracted to construct state space data. Then, the action space is defined as the adjustment range of the production of each production well and the injection volume of the injection well, and the action space is discretized and verified using the Eclipse simulator to eliminate unreasonable actions. Next, a reward function is designed, which consists of two parts: production reward and risk penalty, and the risk penalty is calculated based on pressure changes. Then, the reservoir is divided into different areas according to the permeability distribution, and a reinforcement learning agent based on the DQN algorithm is created for each area. A parallel training environment is built using the Ray library, and multiple agents are trained using the reward function designed in step S33. Finally, the strategies of the trained multiple agents are merged to obtain a risk association mining model, and the model is used to extract pressure-heterogeneity association rules.

[0099] Step S4: Establishing a Bayesian network structure according to the pressure-heterogeneity association rule to obtain a Bayesian network structure; using the Bayesian network structure, predicting the probability of geological dynamic risk according to the four-dimensional pressure field to obtain a geological risk assessment report to achieve the geological risk assessment task of oil and gas production;

[0100] In an embodiment of the present invention, key risk factors such as high permeability and rapid pressure rise are identified from the pressure-heterogeneity association rules. Then, the Bayesian network structure is learned based on the risk factors and four-dimensional pressure field data using the PyMC3 library, combined with the Hill ClimbSearch algorithm and historical risk event data. Next, real-time pressure field data is obtained, and the value of each risk factor is calculated based on the real-time pressure field data. Then, the risk factor value is input into the Bayesian network model for reasoning to calculate the probability of geological risk occurrence. The risk probability is mapped to three-dimensional space to generate a dynamic risk probability map. Finally, based on the dynamic risk probability map and the preset risk threshold, it is determined whether there is a high-risk area, and a geological risk assessment report is generated, which contains a dynamic risk probability map, the location and area of ​​the high-risk area, and recommended risk measures.

[0101] Preferably, step S1 comprises the following steps:

[0102] Step S11: acquiring historical pressure data, production data and water injection data; performing data preprocessing on the historical pressure data, production data and water injection data to obtain preprocessed data;

[0103] Step S12: constructing a three-dimensional geological model of the oil and gas production area to obtain a three-dimensional geological model;

[0104] Step S13: extracting pressure prediction features from the preprocessed data and the three-dimensional geological model to obtain a pressure prediction feature set;

[0105] Step S14: Perform LSTM model training on the pressure prediction feature set to obtain an LSTM pressure prediction model;

[0106] Step S15: using the LSTM pressure prediction model to perform pressure field prediction on the pressure prediction feature set to obtain pressure field prediction data;

[0107] Step S16: constructing a four-dimensional pressure field based on the pressure field prediction data at different time points to obtain a four-dimensional pressure field.

[0108] In an embodiment of the present invention, pressure, production and water injection data for the past five years are exported from the oil field database. The pressure data includes the measurement time, well location coordinates and pressure value, and is stored in CSV format. The production data includes the production time, well location coordinates and daily production, and is stored in the form of an SQL database table. The water injection data includes the water injection time, well location coordinates and daily water injection volume, and is stored in .xlsx format. All data are imported into the Python environment, and the Pandas library is used for data integration. For missing pressure data, the SciPy library based on cubic spline interpolation is used to fill it. For abnormal production and water injection data, an outlier detection method based on the 3σ criterion is used to identify and eliminate them. Finally, all data are normalized to the [0, 1] interval using MinMaxScaler to obtain preprocessed data.

[0109] The three-dimensional geological model of the oil and gas production area is constructed using Petrel geological modeling software. The input data includes seismic interpretation results, well logging data, and geological stratification data. The structural model is constructed using the seismic interpretation results to define structural features such as faults and folds. The lithology model and physical property model are established using well logging data combined with geological stratification data to describe the spatial distribution of the lithology and physical property parameters (such as porosity and permeability) of the reservoir. The structural model, lithology model, and physical property model are integrated to generate a three-dimensional geological model with a resolution of 10m×10m×2m and saved in GRID format.

[0110] Extract the porosity and permeability of each grid cell from the three-dimensional geological model to form static features. Extract the pressure, production and water injection volume of each well location at each time step from the preprocessed data. Use the Kriging interpolation method to interpolate the well point data onto the three-dimensional grid to obtain the pressure, production and water injection volume of each grid cell. Calculate the pressure change rate of each grid cell (the difference between the pressure value of the current time step and the pressure value of the previous time step), as well as the cumulative production and cumulative water injection volume. Combine the static features, pressure, production, water injection volume, pressure change rate, cumulative production and cumulative water injection volume into a feature vector to form a pressure prediction feature set. Each grid cell at each time step corresponds to a feature vector.

[0111] The LSTM pressure prediction model was built using the TensorFlow deep learning framework. The model input is the pressure prediction feature set, and the output is the pressure value of the next time step. The LSTM model contains two LSTM layers, each containing 128 hidden units, and a fully connected output layer. The Adam optimizer was used, the learning rate was set to 0.001, and the mean square error was used as the loss function. The pressure prediction feature set was divided into a training set (80%) and a validation set (20%). The LSTM model was trained using the training set, and the model was evaluated using the validation set. The training process lasted for 100 epochs, and the model parameters were saved after each epoch. The model with the best performance on the validation set was selected as the final LSTM pressure prediction model.

[0112] The production and water injection plan of the future time step are input into the LSTM pressure prediction model to predict the pressure value of each grid cell in each future time step. The prediction time step is 1 day and the prediction period is 1 year. The prediction results are saved as time series data, and each time step corresponds to a three-dimensional pressure field.

[0113] The three-dimensional pressure field data of each time step predicted in step S15 are arranged in chronological order and combined into four-dimensional pressure field data. The four-dimensional pressure field data includes three-dimensional space dimensions and one time dimension, which fully describes the dynamic change process of reservoir pressure in the next year. The four-dimensional pressure field data is stored in NetCDF format for subsequent processing and analysis.

[0114] Preferably, step S13 comprises the following steps:

[0115] Step S131: extracting static geological features from the three-dimensional geological model to obtain static feature data;

[0116] Step S132: extracting dynamic production data from the preprocessed data to obtain dynamic production data;

[0117] Step S133: using storage layer simulation software to perform reservoir simulation calculations on static characteristic data and dynamic production data to obtain simulation result data;

[0118] Step S134: performing pressure gradient calculation according to the simulation result data to obtain pressure gradient data; performing flow direction calculation according to the simulation result data to obtain flow direction data;

[0119] Step S135: Calculate the pressure change trend characteristics according to the dynamic production data to obtain pressure change trend characteristic data;

[0120] Step S136: integrating the static characteristic data, pressure gradient data, flow direction data and pressure change trend characteristic data to obtain a pressure prediction feature set.

[0121] In an embodiment of the present invention, the constructed three-dimensional geological model (GRID format) is opened using Petrel software. For each grid cell in the model, static geological parameters such as porosity, permeability and lithology are extracted. The porosity and permeability data are read directly from the model attributes, and the units are decimals and millidarcy, respectively. The lithology data is processed using unique hot encoding to convert different lithology categories into numerical vectors. For example, if there are three lithologies of sandstone, shale and carbonate in the model, the sandstone is encoded as [1, 0, 0], the shale is encoded as [0, 1, 0], and the carbonate is encoded as [0, 0, 1]. The extracted porosity, permeability and lithology data are saved as CSV files to form static feature data.

[0122] Extract dynamic data related to production from the preprocessed data. Extract the pressure, production and injection volume data for each well location at each time step. The pressure data unit is MPa, the production data unit is cubic meters per day, and the injection volume data unit is cubic meters per day. Use the Kriging interpolation method to spatially interpolate the well point data to each unit of the three-dimensional grid. The interpolation parameters are set as the spherical model for the variation function model, the range is 500 meters, and the base value is 0.01. Arrange the interpolated pressure, production and injection volume data in chronological order and save them as NetCDF format files to form dynamic production data.

[0123] Use Eclipse reservoir simulation software to perform reservoir simulation calculations. Import static characteristic data (porosity, permeability, lithology) into the Eclipse model to define the static geological properties of the reservoir. Enter dynamic production data (pressure, production, water injection volume) as historical production data into the Eclipse model for model history fitting. Set the simulation time step to 1 day and the simulation duration to 5 years (consistent with the length of historical data). Run the Eclipse simulator to perform history matching and predictive simulation. During the simulation process, record data such as pressure, pressure gradient, and three-dimensional flow direction for each grid unit at each time step. Save the simulation results as a DATA format file to constitute the simulation result data.

[0124] Extract the pressure value of each grid cell at each time step from the simulation result data. Use the finite difference method to calculate the pressure gradient of each grid cell in the x, y, and z directions. The pressure gradient unit is MPa / m. At the same time, extract the fluid flow velocity vector of each grid cell at each time step from the simulation result data and calculate the flow direction. The flow direction is represented by a unit vector containing components in the x, y, and z directions. Save the pressure gradient data and flow direction data as a NetCDF format file.

[0125] Extract the pressure data of each grid cell from the dynamic production data. Calculate the pressure change rate of each grid cell, that is, the difference between the pressure value of the current time step and the pressure value of the previous time step, in MPa / day. In addition, calculate the moving average of the pressure change of each grid cell, and the window size is set to 7 days. The pressure change rate and the moving average of pressure are used as pressure change trend features and saved as NetCDF format files.

[0126] Integrate static feature data, pressure gradient data, flow direction data, and pressure change trend feature data. Combine various feature data of each grid cell at each time step into a feature vector. The feature vector contains porosity, permeability, lithology (vector after unique hot encoding), pressure gradient x component, pressure gradient y component, pressure gradient z component, flow direction x component, flow direction y component, flow direction z component, pressure change rate and pressure moving average. All feature data are normalized using the same method in step S11 to ensure consistent data range. Store the feature vectors of all grid cells at each time step as a matrix, and arrange the matrices of all time steps in chronological order to form the final pressure prediction feature set. Save the pressure prediction feature set as an HDF5 format file to facilitate the reading and training of subsequent deep learning models. This HDF5 file contains complete feature information describing the dynamic changes of the reservoir, providing high-quality input data for the LSTM model.

[0127] Preferably, step S2 comprises the following steps:

[0128] Step S21: constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set;

[0129] Step S22: performing data enhancement on the multi-channel image dataset to obtain a data enhanced image dataset;

[0130] Step S23: constructing an image feature extraction model based on a convolutional neural network according to the image data set after data enhancement to obtain an image feature extraction model;

[0131] Step S24: using the image feature extraction model to calculate the feature map of the multi-channel image data set to obtain feature map data; generating attention weights according to the feature map data to obtain attention weight data;

[0132] Step S25: performing weighted feature map calculation on the feature map data according to the attention weight data to obtain weighted feature map data; performing inhomogeneity feature vector generation according to the weighted feature map data to obtain inhomogeneity feature vector.

[0133] As an example of the present invention, refer to Figure 2As shown, in this example, step S2 includes:

[0134] Step S21: constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set;

[0135] In an embodiment of the present invention, Petrel software is used to read a three-dimensional geological model to extract porosity, permeability and lithology data. The three-dimensional geological model is sliced ​​every 2 meters along the z-axis direction to generate a series of two-dimensional images. Each geological attribute (porosity, permeability, lithology) corresponds to an image channel. The lithology data is pre-encoded with one-hot encoding. From the four-dimensional pressure field, the three-dimensional pressure field data of each time step is extracted, and the slices are also sliced ​​every 2 meters along the z-axis direction, and the pressure field data of each time step is used as an image channel. The geological attribute slices and the pressure field slices are merged into a multi-channel image. Each multi-channel image contains three geological attribute channels and pressure field channels for multiple time steps. All multi-channel images are saved in NumPy array format to form a multi-channel image data set.

[0136] Step S22: performing data enhancement on the multi-channel image dataset to obtain a data enhanced image dataset;

[0137] In the embodiment of the present invention, the multi-channel image dataset generated in step S21 is data enhanced using the Imgaug image enhancement library. For each multi-channel image, the following three data enhancement operations are randomly applied: 1) horizontal flipping with a probability of 0.5; 2) vertical flipping with a probability of 0.5; 3) random rotation from 0 to 90 degrees. Three new images are generated for each original image through data enhancement. The enhanced image is added to the original dataset to form a data-enhanced image dataset, which is saved in NumPy array format.

[0138] Step S23: constructing an image feature extraction model based on a convolutional neural network according to the image data set after data enhancement to obtain an image feature extraction model;

[0139] In an embodiment of the present invention, a convolutional neural network (CNN) model is constructed using TensorFlow and Keras libraries for image feature extraction. The CNN model adopts the ResNet50 architecture, including multiple convolutional layers, pooling layers and residual connections. The input is the data-enhanced image dataset obtained in step S22. The input layer of ResNet50 is modified to adapt to the input dimension of the multi-channel image. The original output layer of ResNet50 is removed, a global average pooling layer and a fully connected layer are added, and the output dimension is set to 512. The ReLU activation function is used. The Adam optimizer is used, the learning rate is set to 0.0001, and the cross entropy loss function is used. The CNN model is trained using the image dataset after data enhancement, the number of training rounds is 50, and the batch size is 32. Save the trained CNN model parameters to obtain the image feature extraction model.

[0140] Step S24: using the image feature extraction model to calculate the feature map of the multi-channel image data set to obtain feature map data; generating attention weights according to the feature map data to obtain attention weight data;

[0141] In the embodiment of the present invention, the multi-channel image data set is input into the CNN model trained in step S23, and forward propagation calculation is performed to obtain the feature map data corresponding to each image. The feature map data retains the spatial information and channel information of the image. After the last convolutional layer of the CNN model, a convolutional block attention module (CBAM) is added. The CBAM module includes a channel attention mechanism and a spatial attention mechanism. The channel attention mechanism extracts the channel features of the feature map respectively through global average pooling and global maximum pooling, and then generates the channel attention weight through two fully connected layers and a sigmoid activation function. The spatial attention mechanism extracts the spatial features of the feature map respectively through average pooling and maximum pooling, and then generates the spatial attention weight through a convolutional layer and a sigmoid activation function. The channel attention weight and the spatial attention weight are multiplied to obtain the final attention weight data.

[0142] Step S25: performing weighted feature map calculation on the feature map data according to the attention weight data to obtain weighted feature map data; performing inhomogeneity feature vector generation according to the weighted feature map data to obtain inhomogeneity feature vector;

[0143] In an embodiment of the present invention, the attention weight data is element-by-element multiplied with the feature map data output by the CNN model to obtain weighted feature map data. The weighted feature map highlights the key areas in the image that are related to heterogeneity. The weighted feature map is globally average pooled, and the feature map of each channel is compressed into a numerical value to obtain a feature vector. The dimension of the feature vector is the number of channels of the feature map output by the CNN model, which is 512 in this embodiment. The weighted feature map of each multi-channel image is converted into a 512-dimensional feature vector. The feature vectors of all images constitute a heterogeneity feature vector dataset and are saved as a HDF5 format file named `heterogeneity_features.h5`. This HDF5 file contains the heterogeneity features extracted from the multi-channel image for subsequent risk association mining.

[0144] Preferably, step S21 includes the following steps:

[0145] Step S211: Slice the three-dimensional geological model according to geological attributes to obtain geological attribute slice data;

[0146] Step S212: Slice the four-dimensional pressure field at each time step to obtain pressure field slice data;

[0147] Step S213: Calculate the pressure difference of the pressure field slice data to obtain pressure difference image data;

[0148] Step S214: performing image channel merging on the geological attribute slice data, the pressure field slice data and the pressure difference image data to obtain slice channel data;

[0149] Step S215: construct a multi-channel image data set for the slice channel data to obtain a multi-channel image data set.

[0150] In an embodiment of the present invention, Petrel software is used to load a three-dimensional geological model. The model resolution is 10m×10m×2m. Slices are taken every 2 meters along the Z-axis direction to generate a series of two-dimensional slices. Porosity, permeability and lithology data are extracted from each slice. The porosity and permeability data are normalized to the [0, 1] interval. The lithology data is one-hot encoded. For example, if there are three lithologies of sandstone, shale and carbonate, three channels are used to represent the lithology, sandstone is encoded as [1, 0, 0], shale is encoded as [0, 1, 0], and carbonate is encoded as [0, 0, 1]. The porosity, permeability and one-hot encoded lithology data of each slice are saved as separate NumPy array files, with the naming format of `geological_slice_z{index}.npy`, where `{index}` represents the depth index of the slice. All slice files constitute geological attribute slice data.

[0151] Read the four-dimensional pressure field data (NetCDF format) generated in step S1. The four-dimensional pressure field data contains one year of pressure prediction data, with a time step of 1 day and a total of 365 time steps. For the three-dimensional pressure field data of each time step, slice it every 2 meters along the Z-axis direction to generate a series of two-dimensional slices. Normalize the pressure data of each slice to the interval [0, 1]. Save the pressure data of each slice at each time step as a separate NumPy array file, with the naming format of `pressure_slice_t{time_step}_z{index}.npy`, where `{time_step}` represents the time step and `{index}` represents the depth index of the slice. All slice files constitute the pressure field slice data.

[0152] Read the pressure field slice data generated in step S212. For each depth index `{index}`, calculate the pressure difference between adjacent time steps. For example, calculate the difference between `pressure_slice_t1_z{index}.npy` and `pressure_slice_t0_z{index}.npy`, the difference between `pressure_slice_t2_z{index}.npy` and `pressure_slice_t1_z{index}.npy`, and so on. The pressure difference is also normalized to the [0, 1] interval. Save the pressure difference data of each slice at each time step as a separate NumPy array file, with the naming format of `pressure_difference_t{time_step}_z{index}.npy`, where `{time_step}` represents the time step, and `{index}` represents the depth index of the slice. All difference files constitute the pressure difference image data.

[0153] For each time step `{time_step}` and depth index `{index}`, merge the geological attribute slice data `geological_slice_z{index}.npy`, the pressure field slice data `pressure_slice_t{time_step}_z{index}.npy`, and the pressure difference image data `pressure_difference_t{time_step}_z{index}.npy` along the channel dimension. For example, assuming that the geological attribute slice has 5 channels (porosity, permeability, and three lithologies after one-hot encoding), the merged slice channel data contains 7 channels. Save the merged data as a NumPy array file with the naming format `combined_slice_t{time_step}_z{index}.npy`. All merged files constitute the slice channel data.

[0154] Load all the `combined_slice_t{time_step}_z{index}.npy` files generated in step S214 into memory and construct a four-dimensional NumPy array. The dimensions of the array are the number of time steps, slice depth index, image height, image width, and number of channels. For example, if there is one year of data (365 time steps), 100 depth slices, each slice size is 200×200 pixels, and each slice has 7 channels, the final NumPy array dimension is (365, 100, 200, 200, 7). Save this four-dimensional array as an HDF5 format file named `multi_channel_image_dataset.h5`. This HDF5 file contains the combined image data of all time steps and all depth slices, forming a multi-channel image dataset for subsequent inhomogeneity feature extraction.

[0155] Preferably, step S3 comprises the following steps:

[0156] Step S31: constructing the state space of the heterogeneity feature vector and the four-dimensional pressure field to obtain state space data;

[0157] Step S32: defining the action space according to the state space data to obtain the action space data;

[0158] Step S33: Designing a reward function according to the state space data and the action space data to obtain a reward function;

[0159] Step S34: dividing the reservoir area according to the state space data to obtain the reservoir division area;

[0160] Step S35: Initialize the multi-agent according to the state space data, the action space data and the reservoir division area to obtain the initialized multi-agent;

[0161] Step S36: constructing a parallel training environment for the initialized multi-agent according to the reward function to obtain a parallel training environment; performing parallel training of the multi-agent according to the parallel training environment to obtain a trained multi-agent;

[0162] Step S37: Perform multi-agent strategy fusion on the trained multi-agent to obtain a risk association mining model; use the risk association mining model to extract association rules to obtain pressure-heterogeneity association rules.

[0163] As an example of the present invention, refer to Figure 3 As shown, in this example, step S3 includes:

[0164] Step S31: constructing the state space of the heterogeneity feature vector and the four-dimensional pressure field to obtain state space data;

[0165] In an embodiment of the present invention, the heterogeneity feature vector (HDF5 format) and the four-dimensional pressure field data (NetCDF format) are read. The four-dimensional pressure field data is converted into a one-dimensional pressure vector at each time step. The one-dimensional pressure vector of each time step is spliced ​​with the corresponding heterogeneity feature vector to form an initial state vector. In addition, the average production and average water injection volume of each time step are extracted, and these two values ​​are added to the state vector. All features in the state vector are normalized to the [0, 1] interval using MinMaxScaler. The state vectors of all time steps constitute the state space data and are saved as HDF5 format files named `state_space_data.h5`.

[0166] Step S32: defining the action space according to the state space data to obtain the action space data;

[0167] In an embodiment of the present invention, the action space is defined as the adjustment range of the production of each production well and the adjustment range of the injection volume of each injection well. Assuming there are 10 production wells and 5 injection wells, the dimension of the action vector is 15. The range of each action value is set to [-0.1, 0.1], representing the adjustment ratio of the production or injection volume relative to the current value. The action space is discretized, and the value range of each action is divided into 11 intervals, each interval representing a discrete action value. Each discrete action is simulated using the Eclipse reservoir simulator to verify its feasibility. Eliminate actions that will cause the simulator to report an error or exceed the safety threshold (for example, the pressure is too high or too low), and finally obtain valid action space data, which is saved as a NumPy array file containing all valid discrete actions, named `action_space_data.npy`.

[0168] Step S33: Designing a reward function according to the state space data and the action space data to obtain a reward function;

[0169] In an embodiment of the present invention, the design goal of the reward function is to maximize oil and gas production while minimizing geological risks. The reward function is defined as the weighted sum of production reward and risk penalty. The production reward calculation formula is: `ProductionReward = current_production*(1+action_production_change)-base_production`, where `current_production` is the current production, `action_production_change` is the proportion of production change caused by the action, and `base_production` is the baseline production. The risk penalty is calculated based on pressure changes. The pressure change value of each grid cell is calculated, and if the pressure change exceeds the preset threshold (0.5MPa), a penalty is imposed. The penalty value is proportional to the pressure change value exceeding the threshold. The final reward function is: `Reward = Production Reward-Risk Penalty`, and the reward function is saved as a Python code file `reward_function.py`.

[0170] Step S34: dividing the reservoir area according to the state space data to obtain the reservoir division area;

[0171] In the embodiment of the present invention, a three-dimensional geological model (GRID format) is read. According to the permeability distribution of the geological model, the reservoir is divided into a high permeability region, a medium permeability region, and a low permeability region. The K-Means clustering algorithm is used to divide the grid cells into different permeability regions by taking the permeability value of each grid cell as a clustering feature. The division result is saved as a NumPy array file containing the region label of each grid cell, named `reservoir_regions.npy`.

[0172] Step S35: Initialize the multi-agent according to the state space data, the action space data and the reservoir division area to obtain the initialized multi-agent;

[0173] In an embodiment of the present invention, a deep reinforcement learning agent is created for each reservoir division area. Each agent uses a deep Q network (DQN) algorithm, and its neural network structure is a three-layer fully connected network, each layer contains 256 neurons, and a ReLU activation function. The input is the state vector of the corresponding area in the state space data, and the output is the Q value of each discrete action. Initialize the network weights of all agents using the Xavier initialization method. Save the initialized multi-agent model parameters as a dictionary file named `initialized_multi_agents.pkl`.

[0174] Step S36: constructing a parallel training environment for the initialized multi-agent according to the reward function to obtain a parallel training environment; performing parallel training of the multi-agent according to the parallel training environment to obtain a trained multi-agent;

[0175] In an embodiment of the present invention, a parallel training environment is built using the Ray library. Each agent runs in an independent process and interacts with the Eclipse reservoir simulator. The agent selects an action from the action space based on the current state and inputs the action into the simulator. The simulator calculates the state and reward value of the next time step based on the action and returns the result to the agent. The agent uses the experience replay mechanism to store training data and updates the DQN network parameters using the reward function `reward_function.py` defined in step S33. The number of training rounds is set to 1000, and each round contains 100 time steps. The initial value of the exploration rate (epsilon) is 1.0 and decays to 0.1 in a linear manner. After the training is completed, the DQN network parameters of each agent are saved and named `trained_multi_agent_{region_index}.pkl`, where `{region_index}` is the index of the reservoir region. All trained agent model files constitute the trained multi-agent.

[0176] Step S37: performing multi-agent strategy fusion on the trained multi-agents to obtain a risk association mining model; using the risk association mining model to extract association rules to obtain pressure-heterogeneity association rules;

[0177] In an embodiment of the present invention, all multi-agent model files `trained_multi_agent_{region_index}.pkl` after training in step S36 are loaded. A fusion network is constructed, and the Q value output of each agent is used as input. The fusion network is a single-layer fully connected network, and the output dimension is the same as the action space dimension. The fusion network is trained using training data, the loss function is mean square error, the optimizer is Adam, and the learning rate is 0.0001. The trained fusion network is the final risk association mining model. The trained fusion network model is saved as `risk_association_mining_model.pkl`. The model is used to predict actions in different states, analyze the impact of different actions on risk and yield under different heterogeneity feature vectors and pressure field conditions, and extract pressure-heterogeneity association rules. Save the extracted association rules as a text file `pressure_heterogeneity_association_rules.txt`. Each rule describes the relationship between a specific heterogeneity feature, pressure condition, and action, for example: `IF(high_permeability ANDpressure_increasing)THEN(reduce_injection_in_region_1)`.

[0178] Preferably, step S31 includes the following steps:

[0179] Step S311: performing a one-dimensional vector conversion based on a time step on the four-dimensional pressure field to obtain a one-dimensional pressure vector; performing feature vector concatenation on the one-dimensional pressure vector and the inhomogeneity feature vector to obtain an initial state vector;

[0180] Step S312: performing spatiotemporal feature extraction preparation on the four-dimensional pressure field to obtain pressure field sequence data;

[0181] Step S313: extracting pressure field spatial features from the pressure field sequence data to obtain pressure field spatial features;

[0182] Step S314: extracting the pressure field time feature from the pressure field spatial feature to obtain the pressure field time feature;

[0183] Step S315: Complete state vector splicing is performed on the initial state vector, the pressure field spatial characteristics and the pressure field temporal characteristics to obtain state space data.

[0184] In an embodiment of the present invention, the four-dimensional pressure field data (NetCDF format) generated in step S1 is read. For each time step, the three-dimensional pressure field data is flattened into a one-dimensional vector. For example, if the dimension of the three-dimensional pressure field data is 100×100×50, the dimension of the flattened one-dimensional pressure vector is 500000. Read the inhomogeneity feature vector (HDF5 format) generated in step S2. Concatenate the one-dimensional pressure vector of each time step with the corresponding inhomogeneity feature vector to form an initial state vector. Save the initial state vector as an HDF5 format file with the naming format of `initial_state_vector_t{time_step}.h5`, where `{time_step}` is the time step index.

[0185] Read the four-dimensional pressure field data (NetCDF format) generated in step S1. Treat the three-dimensional pressure field data of each time step as an independent three-dimensional array. Combine the three-dimensional pressure field data of 10 consecutive time steps into a four-dimensional array to form a pressure field sequence. For example, the three-dimensional pressure field data of time steps 0 to 9 constitute the first sequence, the three-dimensional pressure field data of time steps 1 to 10 constitute the second sequence, and so on. Save each pressure field sequence as a separate NumPy array file with the naming format of `pressure_sequence_{sequence_index}.npy`, where `{sequence_index}` is the sequence index. All sequence files constitute the pressure field sequence data.

[0186] Use a pre-trained 3D convolutional neural network (e.g., 3D ResNet18) to extract the spatial features of the pressure field. Load the pre-trained 3D ResNet18 model and remove its classification layer. Input each pressure field sequence data `pressure_sequence_{sequence_index}.npy` generated in step S312 into the 3D ResNet18 model for forward propagation. Extract the output of the last convolutional layer as the spatial features of the pressure field. Save the spatial features of the pressure field of each sequence as a separate NumPy array file with the naming format of `spatial_features_{sequence_index}.npy`.

[0187] Use a long short-term memory network (LSTM) to extract the temporal features of the pressure field. Construct an LSTM model, including an LSTM layer (for example, the number of hidden units is 256) and a fully connected layer. Take the pressure field spatial feature sequence generated in step S313 as input, for example, `spatial_features_0.npy` to `spatial_features_n.npy` constitute an input sequence. Use the hidden state of the last time step of the LSTM model as the pressure field temporal feature. Save the pressure field temporal features of each sequence as a separate NumPy array file, named in the format of `temporal_features_{sequence_index}.npy`.

[0188] For each time step, read the corresponding initial state vector `initial_state_vector_t{time_step}.h5`, pressure field spatial features `spatial_features_{sequence_index}.npy`, and pressure field temporal features `temporal_features_{sequence_index}.npy`. Concatenate these three feature vectors into a complete state vector. Note that since the pressure field sequence is composed of 10 consecutive time steps, one pressure field sequence corresponds to the state vectors of 10 time steps. For example, `pressure_sequence_0.npy` corresponds to `initial_state_vector_t0.h5` to `initial_state_vector_t9.h5`. Combine the complete state vectors of all time steps into a matrix to form the state space data. Save the state space data as an HDF5 format file named `complete_state_space_data.h5`. This file contains richer state information, including raw pressure data, heterogeneity characteristics, and spatiotemporal characteristics of the pressure field, providing more comprehensive input for reinforcement learning agents.

[0189] Preferably, step S32 includes the following steps:

[0190] Step S321: obtaining a water injection plan and a production plan; parameterizing the water injection plan and the production plan to obtain water injection parameters and production parameters;

[0191] Step S322: constructing an action vector for the water injection parameter and the production parameter to obtain an action vector;

[0192] Step S323: discretizing the action vector into an action space to obtain a discretized action space;

[0193] Step S324: performing action space verification on the discretized action space according to the state space data to obtain action space data.

[0194] In an embodiment of the present invention, the current water injection scheme and production scheme are obtained from the oil field production management system. The water injection scheme includes the well location coordinates and injection volume (cubic meters / day) of each water injection well, and the production scheme includes the well location coordinates and production (cubic meters / day) of each production well. Assume that there are 5 water injection wells and 10 production wells in the oil field. The injection volume of each water injection well and the production of each production well are defined as action parameters. The initial value of each parameter is set to the value in the current scheme. The water injection parameters and production parameters are stored as two NumPy arrays, named `injection_parameters.npy` and `production_parameters.npy` respectively. The dimensions of each array are 5 and 10 respectively.

[0195] Read the injection parameters `injection_parameters.npy` and the production parameters `production_parameters.npy`. Concatenate these two arrays into a larger array to form an action vector. The dimension of the action vector is 15 (5 injection parameters + 10 production parameters). The action vector represents the adjustment to the injection plan and the production plan. Save the action vector as a NumPy array file named `action_vector.npy`.

[0196] Read the action vector `action_vector.npy`. Discretize each element in the action vector. The value range of each element is set to [-0.1, 0.1], representing the adjustment ratio relative to the current solution value. Divide the value range of each element into 11 intervals, each interval corresponds to a discrete action value, such as -0.1, -0.08, -0.06, ..., 0.08, 0.1. Therefore, the discretized action space contains 11^15 possible action combinations. Save the discretized action space as a Python dictionary file named `discrete_action_space.pkl`, where the key is the action index and the value is the corresponding action vector.

[0197] Read the state space data `complete_state_space_data.h5` and the discretized action space `discrete_action_space.pkl`. Traverse each action in the discretized action space. Input the current state and action into the Eclipse reservoir simulator for simulation, and set the simulation duration to 10 days. Check whether the simulation results meet the following constraints: 1) The pressure values ​​of all grid cells are in the range [P_min, P_max], where P_min and P_max are the preset minimum and maximum pressure values ​​respectively; 2) The production of all production wells is non-negative; 3) The injection volume of all injection wells is non-negative. If an action violates any constraint, remove the action from the discretized action space. Save the validated action space as a NumPy array file named `validated_action_space.npy`. This file contains all discrete action vectors that meet the constraints, constituting the final action space data.

[0198] Preferably, step S33 includes the following steps:

[0199] Step S331: using storage layer simulation software to perform pressure field simulation according to state space data and action space data to obtain simulated pressure field data;

[0200] Step S332: Calculate the pressure change of the simulated pressure field data and the state space data to obtain pressure change data;

[0201] Step S333: Calculate the risk index according to the pressure change data to obtain the risk index;

[0202] Step S334: Calculate risk penalty according to the risk indicator to obtain risk penalty data;

[0203] Step S335: Calculate the production reward according to the action space data to obtain production reward data;

[0204] Step S336: Integrate the risk penalty data and the output reward data into a reward function to obtain a reward function.

[0205] In an embodiment of the present invention, the state space data file `complete_state_space_data.h5` and the action space data file `validated_action_space.npy` are read. The state vector of the current time step is extracted from the state space data, including information such as pressure field, heterogeneity characteristics, production and water injection volume. An action vector is selected from the action space data, which represents the adjustment of the production of the production well and the water injection volume of the injection well. The current state vector and action vector are used as input, and the Eclipse reservoir simulator is run. The simulation time is set to 10 days and the simulation step is 1 day. After the simulation is completed, the pressure field data of each simulation step is extracted and saved as a NumPy array file with the naming format of `simulated_pressure_field_t{time_step}_a{action_index}.npy`, where `{time_step}` is the time step index and `{action_index}` is the action index.

[0206] Read the simulated pressure field data `simulated_pressure_field_t{time_step}_a{action_index}.npy` and the state space data file `complete_state_space_data.h5`. Extract the pressure field data of the current time step from the state space data. Calculate the difference between the simulated pressure field data and the pressure field data of the current time step to obtain the pressure change data. Save the pressure change data as a NumPy array file with the naming format of `pressure_change_t{time_step}_a{action_index}.npy`.

[0207] Read the pressure change data `pressure_change_t{time_step}_a{action_index}.npy`. Calculate the following three risk indicators: 1) Maximum pressure change: calculate the pressure change value with the largest absolute value in the pressure change field; 2) Pressure change standard deviation: calculate the standard deviation of the pressure change field, reflecting the uniformity of the spatial distribution of pressure changes; 3) Mean pressure change near the fault: calculate the average pressure change value of the area near the fault. Store the three risk indicators as a NumPy array with the naming format of `risk_indicators_t{time_step}_a{action_index}.npy`.

[0208] Read the risk indicators `risk_indicators_t{time_step}_a{action_index}.npy`. Define three risk thresholds, corresponding to the maximum pressure change, the standard deviation of the pressure change, and the mean pressure change near the fault. If a risk indicator exceeds the corresponding threshold, a risk penalty is calculated. The risk penalty value is equal to the portion of the risk indicator that exceeds the threshold multiplied by a penalty coefficient. For example, if the maximum pressure change threshold is 0.8MPa, the penalty coefficient is 10, and the maximum pressure change is 1.0MPa, the risk penalty is (1.0-0.8)*10=2. Save the risk penalty value as a numeric value, with the naming format `risk_penalty_t{time_step}_a{action_index}.txt`.

[0209] Read the action space data file `validated_action_space.npy` and the state space data `complete_state_space_data.h5`. Calculate the production reward based on the production adjustment ratio of the production well in the action vector. The production reward is equal to the production adjustment ratio multiplied by the current total production. For example, if the production adjustment ratio is 0.05 and the current total production is 1000 cubic meters / day, the production reward is 0.05*1000=50. Save the production reward as a value with the naming format `production_reward_t{time_step}_a{action_index}.txt`.

[0210] Read the risk penalty data `risk_penalty_t{time_step}_a{action_index}.txt` and the production reward data `production_reward_t{time_step}_a{action_index}.txt` calculated in step S335. Define the reward function as the production reward minus the risk penalty: `Reward=Production Reward-Risk Penalty`. Write the formula into a Python function and save it as a Python file `reward_function.py`. The function accepts the time step index `{time_step}` and the action index `{action_index}` as input and returns the calculated reward value.

[0211] Preferably, step S4 comprises the following steps:

[0212] Step S41: Identify risk factors for the pressure-heterogeneity association rule to obtain a risk factor set;

[0213] Step S42: performing Bayesian network structure learning according to the risk factor set and the four-dimensional pressure field to obtain a Bayesian network structure;

[0214] Step S43: extracting real-time pressure field data according to the four-dimensional pressure field to obtain real-time pressure field data;

[0215] Step S44: using the Bayesian network structure to perform dynamic risk probability calculation on the real-time pressure field data to obtain a risk probability prediction result;

[0216] Step S45: generating a dynamic risk probability graph for the risk probability prediction result to obtain a dynamic risk probability graph;

[0217] Step S46: Perform geological risk assessment based on the dynamic risk probability map and the preset risk threshold to obtain a geological risk assessment report.

[0218] In an embodiment of the present invention, the pressure-heterogeneity association rule file `pressure_heterogeneity_association_rules.txt` is read. The file contains association rules mined by the reinforcement learning model, such as "IF(high_permeability AND pressure_increasing)THEN(reduce_injection_in_region_1)". These rules are analyzed to identify key factors related to geological risks. For example, high permeability, rapid pressure rise, large pressure changes near faults, etc. can be identified as risk factors. These risk factors and their corresponding thresholds are stored in a JSON file named `risk_factors.json`. For example: `{"high_permeability":{"threshold":0.8}, "pressure_increasing":{"threshold":0.05}, "fault_proximity_pressure_change":{"threshold":0.5}}`.

[0219] Read the risk factor set `risk_factors.json` and the four-dimensional pressure field data (NetCDF format). Use the PyMC3 library to build a Bayesian network model. Define each risk factor as a node and define "geological risk" as the final output node. Define the dependencies between risk factors based on expert knowledge and data analysis, for example, high permeability will lead to large pressure changes near faults. Use the Hill Climb Search algorithm to learn the structure of the Bayesian network, and use historical risk event data (for example, ground subsidence or fault activation events that occurred in the past) for model training. Save the learned Bayesian network structure as a text file named `bayesian_network_structure.txt` and use the DOT language to describe the network structure.

[0220] Get real-time pressure data from the oilfield monitoring system. Interpolate the real-time pressure data onto a 3D grid to generate a 3D pressure field. Save the 3D pressure field data as a NumPy array file named `real_time_pressure_field.npy`.

[0221] Read the Bayesian network structure `bayesian_network_structure.txt`, the risk factor set `risk_factors.json` identified in step S41, and the real-time pressure field data `real_time_pressure_field.npy` extracted in step S43. Calculate the value of each risk factor based on the real-time pressure field data. For example, determine whether it is high permeability based on the permeability data and the preset threshold, determine whether the pressure rises rapidly based on the pressure change rate, and calculate the mean pressure change near the fault based on the fault position and pressure field. Use the calculated risk factor value as input, use the PyMC3 library to perform Bayesian network reasoning, and calculate the probability of geological risk occurrence. Save the risk probability prediction result as a numerical value and name it `risk_probability.txt`.

[0222] Read the risk probability `risk_probability.txt` and the 3D geological model. Map the risk probability into 3D space to generate a 3D risk probability field. Use the Matplotlib library to visualize the 3D risk probability field as a dynamic risk probability map. Different colors can be used to represent different risk levels. Save the generated dynamic risk probability map as a PNG image file named `dynamic_risk_probability_map.png`.

[0223] Read the dynamic risk probability map `dynamic_risk_probability_map.png`. The preset risk threshold is 0.7. According to the risk probability map and the risk threshold, determine whether there is a high-risk area. If the risk probability of an area exceeds the threshold, the area is considered to have a high geological risk. Generate a geological risk assessment report, which includes the dynamic risk probability map, the location and area of ​​the high-risk area, and the recommended risk measures. Save the geological risk assessment report as a PDF file.

[0224] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0225] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for assessing geological risks in oil and gas production based on data mining, characterized in that: The following steps are involved: Step S1: Acquire oil and gas production geological data, and perform data preprocessing to obtain preprocessed data; Construct a three-dimensional geological model of the oil and gas production area to obtain a three-dimensional geological model; extract pressure prediction features from the preprocessed data and the three-dimensional geological model to obtain a pressure prediction feature set; construct a dynamic pressure field based on different time points according to the pressure prediction feature set to obtain a four-dimensional pressure field; Step S2: constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set; constructing an image feature extraction model based on the multi-channel image data set to obtain an image feature extraction model; inputting the multi-channel image data set into the image feature extraction model to extract a heterogeneity feature vector to obtain a heterogeneity feature vector; Step S3: constructing a state space for the heterogeneity feature vector and the four-dimensional pressure field to obtain state space data; defining an action space according to the state space data to obtain action space data; Design a reward function based on the state space data and the action space data to obtain a reward function; A risk association mining model is constructed based on state space data, action space data and reward function to obtain a risk association mining model; association rules are extracted using the risk association mining model to obtain pressure-heterogeneity association rules; Step S4: Establish a Bayesian network structure according to the pressure-heterogeneity association rule to obtain a Bayesian network structure; use the Bayesian network structure to predict the probability of geological dynamic risk according to the four-dimensional pressure field to obtain a geological risk assessment report to achieve the geological risk assessment task of oil and gas production.

2. The method for assessing geological risks of oil and gas production based on data mining according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: acquiring historical pressure data, production data and water injection data; performing data preprocessing on the historical pressure data, production data and water injection data to obtain preprocessed data; Step S12: constructing a three-dimensional geological model of the oil and gas production area to obtain a three-dimensional geological model; Step S13: extracting pressure prediction features from the preprocessed data and the three-dimensional geological model to obtain a pressure prediction feature set; Step S14: Perform LSTM model training on the pressure prediction feature set to obtain an LSTM pressure prediction model; Step S15: using the LSTM pressure prediction model to perform pressure field prediction on the pressure prediction feature set to obtain pressure field prediction data; Step S16: constructing a four-dimensional pressure field based on the pressure field prediction data at different time points to obtain a four-dimensional pressure field.

3. The method for assessing geological risks of oil and gas production based on data mining according to claim 2, characterized in that: Step S13 includes the following steps: Step S131: extracting static geological features from the three-dimensional geological model to obtain static feature data; Step S132: extracting dynamic production data from the preprocessed data to obtain dynamic production data; Step S133: using storage layer simulation software to perform reservoir simulation calculations on static characteristic data and dynamic production data to obtain simulation result data; Step S134: performing pressure gradient calculation according to the simulation result data to obtain pressure gradient data; performing flow direction calculation according to the simulation result data to obtain flow direction data; Step S135: Calculate the pressure change trend characteristics according to the dynamic production data to obtain pressure change trend characteristic data; Step S136: integrating the static characteristic data, pressure gradient data, flow direction data and pressure change trend characteristic data to obtain a pressure prediction feature set.

4. The method for assessing geological risks of oil and gas production based on data mining according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: constructing a multi-channel image of the three-dimensional geological model and the four-dimensional pressure field to obtain a multi-channel image data set; Step S22: performing data enhancement on the multi-channel image dataset to obtain a data enhanced image dataset; Step S23: constructing an image feature extraction model based on a convolutional neural network according to the image data set after data enhancement to obtain an image feature extraction model; Step S24: using the image feature extraction model to calculate the feature map of the multi-channel image data set to obtain feature map data; generating attention weights according to the feature map data to obtain attention weight data; Step S25: performing weighted feature map calculation on the feature map data according to the attention weight data to obtain weighted feature map data; performing inhomogeneity feature vector generation according to the weighted feature map data to obtain inhomogeneity feature vector.

5. The method for assessing geological risks of oil and gas production based on data mining according to claim 4, characterized in that: Step S21 includes the following steps: Step S211: Slice the three-dimensional geological model according to geological attributes to obtain geological attribute slice data; Step S212: Slice the four-dimensional pressure field at each time step to obtain pressure field slice data; Step S213: Calculate the pressure difference of the pressure field slice data to obtain pressure difference image data; Step S214: performing image channel merging on the geological attribute slice data, the pressure field slice data and the pressure difference image data to obtain slice channel data; Step S215: construct a multi-channel image data set for the slice channel data to obtain a multi-channel image data set.

6. The method for assessing geological risks in oil and gas production based on data mining according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: constructing the state space of the heterogeneity feature vector and the four-dimensional pressure field to obtain state space data; Step S32: defining the action space according to the state space data to obtain the action space data; Step S33: Designing a reward function according to the state space data and the action space data to obtain a reward function; Step S34: dividing the reservoir area according to the state space data to obtain the reservoir division area; Step S35: Initialize the multi-agent according to the state space data, the action space data and the reservoir division area to obtain the initialized multi-agent; Step S36: constructing a parallel training environment for the initialized multi-agent according to the reward function to obtain a parallel training environment; performing parallel training of the multi-agent according to the parallel training environment to obtain a trained multi-agent; Step S37: Perform multi-agent strategy fusion on the trained multi-agent to obtain a risk association mining model; use the risk association mining model to extract association rules to obtain pressure-heterogeneity association rules.

7. The method for assessing geological risks in oil and gas production based on data mining according to claim 6, characterized in that: Step S31 The following steps are involved: Step S311: performing a one-dimensional vector conversion based on a time step on the four-dimensional pressure field to obtain a one-dimensional pressure vector; performing feature vector concatenation on the one-dimensional pressure vector and the inhomogeneity feature vector to obtain an initial state vector; Step S312: performing spatiotemporal feature extraction preparation on the four-dimensional pressure field to obtain pressure field sequence data; Step S313: extracting pressure field spatial features from the pressure field sequence data to obtain pressure field spatial features; Step S314: extracting the pressure field time feature from the pressure field spatial feature to obtain the pressure field time feature; Step S315: Complete state vector splicing is performed on the initial state vector, the pressure field spatial characteristics and the pressure field temporal characteristics to obtain state space data.

8. The method for assessing geological risks of oil and gas production based on data mining according to claim 6, characterized in that: Step S32 includes the following steps: Step S321: obtaining a water injection plan and a production plan; parameterizing the water injection plan and the production plan to obtain water injection parameters and production parameters; Step S322: constructing an action vector for the water injection parameter and the production parameter to obtain an action vector; Step S323: discretizing the action vector into an action space to obtain a discretized action space; Step S324: performing action space verification on the discretized action space according to the state space data to obtain action space data.

9. The method for assessing geological risks in oil and gas production based on data mining according to claim 6, characterized in that: Step S33 includes the following steps: Step S331: using storage layer simulation software to perform pressure field simulation according to state space data and action space data to obtain simulated pressure field data; Step S332: Calculate the pressure change of the simulated pressure field data and the state space data to obtain pressure change data; Step S333: Calculate the risk index according to the pressure change data to obtain the risk index; Step S334: Calculate risk penalty according to the risk indicator to obtain risk penalty data; Step S335: Calculate the production reward according to the action space data to obtain production reward data; Step S336: Integrate the risk penalty data and the output reward data into a reward function to obtain a reward function.

10. The method for assessing geological risks of oil and gas production based on data mining according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: Identify risk factors for the pressure-heterogeneity association rule to obtain a risk factor set; Step S42: performing Bayesian network structure learning according to the risk factor set and the four-dimensional pressure field to obtain a Bayesian network structure; Step S43: extracting real-time pressure field data according to the four-dimensional pressure field to obtain real-time pressure field data; Step S44: using the Bayesian network structure to perform dynamic risk probability calculation on the real-time pressure field data to obtain a risk probability prediction result; Step S45: generating a dynamic risk probability graph for the risk probability prediction result to obtain a dynamic risk probability graph; Step S46: Perform geological risk assessment based on the dynamic risk probability map and the preset risk threshold to obtain a geological risk assessment report.

Citation Information

Cited By

  • Engineering geologic body multi-parameter coupling risk assessment method

    CN120634286A

  • Geological disaster monitoring network deployment method and system based on coverage entropy theory

    CN120877466A