Oil reservoir inter-well connectivity coefficient calculation method based on attention mechanism
By using the neural network model based on attention mechanism, K-fold cross-verification and Adam gradient descent algorithm in the calculation of reservoir well connectivity coefficients, the problems of overfitting, large data demand and poor results interpretation in the existing technology are solved, and more accurate and efficient inter-well connectivity recognition is achieved, supporting refined oilfield development.
Patent Information
- Application Number
- CN202411618082.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-18
AI Technical Summary
The existing method of calculation of inter-well connectivity coefficients of reservoirs based on attention mechanisms has the risk of overfitting, high data demand and poor interpretability of results, resulting in poor inter-well connectivity identification and limiting the refined development of oil fields.
Adopt a neural network model based on attention mechanism, combining K-fold cross-validation and Adam gradient descent algorithm, automatically learn and pay attention to key information, reduce the risk of overfitting, and improve the generalization ability and computing efficiency of the model through sliding window mechanism and data preprocessing.
It improves the accuracy and reliability of the calculation of inter-well connectivity coefficients, reduces the calculation amount, improves the generalization ability of the model and pays attention to key factors, and helps petroleum engineers better understand the inter-well relationship of reservoirs and the factors affecting the effectiveness of reservoir development.
Smart Images

Figure CN119646464A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of petroleum, and in particular to a method for calculating a connectivity coefficient between oil reservoir wells based on an attention mechanism. Background Art
[0002] The well-to-well connectivity coefficient of an oil reservoir is an important indicator for evaluating the fluid conductivity between different wells in the reservoir. Traditional methods are usually based on physical experiments or numerical simulations, but these methods require a lot of time and resources. In recent years, with the development of deep learning technology, using the attention mechanism of neural networks to calculate the well-to-well connectivity coefficient of an oil reservoir has become a new technology. The attention mechanism is a technology used to simulate human attention allocation, which can automatically learn and focus on key information. In the calculation of the well-to-well connectivity coefficient of an oil reservoir, a deep neural network is trained based on dynamic production data, and the attention mechanism is used to locate the most critical features or attributes for well-to-well connectivity, and the production correlation coefficient between water injection wells and oil production wells is fitted to obtain the relative connectivity coefficient matrix. However, due to the complexity of the model and the large number of parameters, it may perform well on the training data but poorly on the test data, and there is a risk of overfitting. In addition, the neural network has a large demand for data and usually requires a large amount of data for training, while the acquisition of reservoir data is relatively difficult, which limits the universality of this technology. The black box characteristics of the deep learning model make its results less interpretable, making it difficult to understand how the model makes predictions and to evaluate the accuracy of the results.
[0003] Since reservoir geology includes different types of rocks and fracture distribution, this characteristic increases the difficulty of connectivity identification. There are multiphase fluids such as oil, gas, and water in the reservoir, and the complexity of the interaction between these fluids under different geological conditions also makes it difficult to identify connectivity. In addition, there are few reservoir seismic responses, logging data, and pressure dynamic monitoring data, as well as test data errors, which makes it difficult to accurately identify well connectivity, limiting the refined development of oil fields.
[0004] In summary, the existing technology uses the attention mechanism to calculate the connectivity coefficient between reservoir wells, and its application scope and accuracy need further verification and improvement. The above-mentioned shortcomings lead to poor inter-well connectivity identification effect. Therefore, this method combines a variety of data processing and analysis algorithms to solve the main problems of model construction and provide a new method for calculating the connectivity coefficient between reservoir wells based on the attention mechanism. Summary of the invention
[0005] In view of this, the present invention aims to propose a method for calculating the well-to-well connectivity coefficient of oil reservoirs based on the attention mechanism. The purpose of this method is to more accurately evaluate the connectivity between injection and production wells, help petroleum engineers and decision makers better understand the well-to-well relationship of oil reservoirs and the factors affecting the development effect of oil reservoirs, and provide a more reliable basis for oil reservoir development and management decisions. This will improve the efficiency and economy of oil reservoir development and achieve better oil reservoir development and management.
[0006] To achieve the above object, the technical solution of the present invention is implemented as follows: a method for calculating the connectivity coefficient between oil reservoir wells based on the attention mechanism, comprising the following steps:
[0007] Step 1: Before analyzing the well group data to be processed, first obtain the historical production data of each water injection well and the current oil production well, and perform cleaning, screening, and alignment preprocessing on these data; next, perform normalization on the acquired historical production data, and divide it into multiple subsequences using a sliding window mechanism. At the same time, delete the samples of the oil production wells in the shut-in state to obtain a standard sample set suitable for inputting into the neural network;
[0008] Step 2: After obtaining the sample set, use the K-fold cross-validation method to process the sample set;
[0009] Step 3: Establish a neural network model based on the attention mechanism, and define the objective function as the mean square error between the actual daily liquid production of the current oil well and the value predicted by the neural network. This objective function will be used in the training and learning process of the neural network.
[0010] Step 4: In order to determine the optimal sliding window size, a grid search algorithm is used for optimization. The trained neural network model and the results of parameter optimization are used to obtain the training results of the model. At the same time, the attention weight of each water injection well for the daily liquid production of the oil production well is obtained. These weights constitute an attention weight matrix, which is used to determine the connectivity between each water injection well and the oil production well.
[0011] Furthermore, in step 1, the historical production data of each water injection well and the current oil production well include: the well number, production date, daily water injection volume, wellhead injection pressure, water nozzle diameter, casing pressure, injection time, and total cumulative injection volume of each water injection well; the well number, production date, oil pressure, casing pressure, oil nozzle diameter, production time, water content, and daily liquid production of the current oil production well.
[0012] In some embodiments, the normalization operation includes:
[0013] First, the magnitude of historical production data of different wells is different. Unifying the historical production data of different wells into a standard range can avoid the adverse effects of data of different magnitudes on model training.
[0014] Subsequently, each feature in the sequence is normalized separately to complete the task of obtaining the data change trend in the time series.
[0015] In some embodiments, the sliding window mechanism includes: dividing the historical production data into a series of subsequences of fixed length, capturing the production characteristics of different time periods, providing more sample data, and increasing the generalization ability of the model.
[0016] In some embodiments, the K-fold cross-validation method comprises:
[0017] First, the sample set obtained by inputting the neural network is shuffled;
[0018] Then, the sample set is divided into K subsets, and a cross-validation cycle is started. In each cycle, one of the subsets is selected as the validation set, and the remaining K-1 subsets are used as the training set. In each cycle, the training set is used to train the model, and the trained model is used to predict the selected validation set to obtain the prediction result.
[0019] Repeat the above steps until each subset is used as a validation set, and finally get the average value of the performance evaluation results.
[0020] In some embodiments, establishing a neural network model based on an attention mechanism includes:
[0021] First, unify the feature dimensions of the data of water injection wells and oil production wells, and correspond the time windows of the current oil production wells to the water injection wells. Then, merge the features of the two and perform feature concatenation. The connectivity coefficient matrix is calculated based on the attention mechanism to obtain the correlation matrix.
[0022] Then, the features are further extracted to obtain the tensor matrix, and the mean square error (MSE) is calculated. The parameters are changed until the error MSE is close to zero, and finally the state update parameters of the neural network model are obtained.
[0023] Furthermore, the task of the attention mechanism is to calculate the correlation between the current oil production well and each water injection well, so as to obtain the connectivity matrix.
[0024] In some embodiments, the grid search algorithm comprises:
[0025] First, a list of candidate values for the sliding window size is defined based on expert experience, representing the lag time after the injection of water from the injection well affects the oil production well;
[0026] Then, the values of the sliding window size in all cases are traversed, and finally the optimal sliding window size for the current oil well is determined by comparing the minimum loss value of the validation set.
[0027] Compared with the prior art, the method for calculating the well-to-well connectivity coefficient based on the attention mechanism described in the present invention has the following advantages:
[0028] (1) The neural network model in the present invention needs to receive and process a large amount of data. However, at a specific moment, only a small part of the data is important. The referenced attention mechanism can automatically learn the most important features in the data, improve the model's attention to key factors, and make it easier to capture the essence of well connectivity in complex reservoir environments;
[0029] (2) The present invention uses K-fold cross validation to process the sample set. This method helps to improve the generalization ability of the model and reduce the risk of overfitting. In addition, the attention mechanism model can help to reason when the data is incomplete, solving the problems of insufficient data and data quality;
[0030] (3) The present invention adopts the Adam gradient descent algorithm to replace the traditional stochastic gradient descent algorithm, continuously adjusts the connectivity coefficient according to the actual situation, evaluates the convergence result, compares it with the actual well connectivity, realizes back propagation, continuously reduces the error MSE, obtains the state update parameters of the neural network model, verifies and improves the model, ensures a relatively low amount of calculation, and improves the efficiency and accuracy of the model calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0032] Figure 1 is a flowchart of an exemplary method for calculating the well-to-well connectivity coefficient of an oil reservoir based on an attention mechanism according to some embodiments of this specification;
[0033] Figure 2 It is a module diagram of an exemplary method for calculating the connectivity coefficient between reservoir wells based on the attention mechanism as shown in some embodiments of this specification. DETAILED DESCRIPTION
[0034] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0035] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0036] It should be understood that the "system", "system", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0037] As shown in this specification and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "comprise" and "include" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0038] The method of this patent aims to realize the calculation of the connectivity coefficient between oil reservoir wells. By preprocessing the historical production data and building a model, the connectivity coefficient between wells can be obtained more accurately. It is particularly noteworthy that the neural network model used in this method is based on the attention mechanism, which can focus on the information that is more critical to the current task among a large amount of input information, reduce the attention to other information, and even filter out irrelevant information, which can solve the problem of information overload and improve the efficiency and accuracy of task processing. In addition, the results of the neural network model can also be used in scenarios such as production capacity assessment, reserve estimation, optimization of well network layout, fracturing design and optimization.
[0039] like Figure 1 As shown, the present invention provides a method for calculating the connectivity coefficient between oil reservoir wells based on the attention mechanism, the method comprising: firstly, data collection is performed, and the historical production data of each water injection well and the current oil production well in the well group to be analyzed are collected and obtained, including the well number, production date, daily water injection volume, wellhead injection pressure, nozzle diameter, casing pressure, injection time, total cumulative injection volume of each water injection well, and the well number, production date, oil pressure, casing pressure, nozzle diameter, production time, water content, daily liquid production and other information of the current oil production well. Subsequently, a neural network model is established using the collected data. Then, an attention mechanism is introduced, and the weights between each water injection well and the current oil production well are considered, and the weights are fitted according to the daily liquid production of the oil production well. The attention mechanism is used to calculate the contribution ratio of each water injection well and the oil production well itself to the daily liquid production of the oil production well, and the contribution ratio of each water injection well to the liquid production of the oil production well is obtained as the relative connectivity coefficient between the water injection well and the oil production well. In order to improve the accuracy of the connectivity coefficient, a gradient descent algorithm is used to continuously adjust the connectivity coefficient according to actual conditions. Finally, the converged connectivity coefficient is evaluated and compared with the actual well-to-well connectivity, and the model is verified and improved based on the evaluation results. Specifically, the following steps are included:
[0040] Step 1, obtain and process data: First, preprocess the historical production data, which includes checking the integrity of the data, handling missing values, outliers and noise, etc. Then select appropriate features according to the needs and task objectives. The most relevant features can be selected based on expert experience knowledge, or feature selection algorithms can be used to determine the most representative and predictive features. The selected features are then normalized to ensure that each feature has a consistent scale in the numerical range. Each feature selected in the sequence is then normalized separately.
[0041] After the normalization process is completed, the size of the sliding window is determined according to the specific situation and needs. The size determines the length of each subsequence, which can be selected according to the specific situation and needs. Then two pointers are initialized, one pointing to the starting position of the sliding window and the other pointing to the end position of the sliding window, and the data in the sliding window is saved as a subsequence. Move the end pointer of the sliding window, slide backward by a step, repeat the subsequence saving and moving the end pointer until the end pointer of the sliding window reaches the end of the entire data sequence. If there are samples in which the oil well is shut in, delete them. Finally, the standard sample set for input into the neural network model is obtained.
[0042] In the embodiment of the present invention, the normalization process is a very critical step in deep learning data preprocessing, which can unify the dimensions and prevent small data from being swallowed. The processing formula is:
[0043]
[0044] Among them, x * is the normalized data, x is the time series data of each feature, x min is the minimum value, x max is the maximum value.
[0045] Step 2, K-fold cross validation: Shuffle the standard sample set input into the neural network, divide the sample set into 5 or 7 subsets (folds), and then start the cross validation cycle. In each cycle, select one of the subsets as the validation set, and the remaining 4 or 6 subsets as the training set. In each cycle, use the training set to train the model, and use the trained model to predict the selected validation set to obtain the prediction results. Repeat the above steps until each subset is used as a validation set, and finally obtain the average of 5 or 7 performance evaluation results.
[0046] Then, the relevant formula is as follows:
[0047]
[0048] Among them, K means dividing the sample set into K subsets (folds), MSE_i means the mean square error of the i-th fold, and MSE_CV means the mean square error of K-fold cross validation.
[0049] The present invention uses K-fold cross validation to process the sample set, which helps to improve the generalization ability of the model and reduce the risk of overfitting. In addition, the attention mechanism model can help to reason in the case of incomplete data, solving the problems of insufficient data and data quality.
[0050] Step 3, build and train the neural network model: first unify the feature dimensions of the data of the water injection wells and the oil production wells, and at the same time, the time of the current oil production well needs to correspond to the time window of the water injection well. Then, use the transpose and dot product operations to obtain the fused features of the two, and concatenate the features of the two to obtain the concatenated features, and calculate the connectivity coefficient matrix based on the attention mechanism. Finally, the attention mechanism can calculate the correlation between the current oil production well and each water injection well, thereby obtaining the correlation matrix, and further use convolution, pooling and other operations to extract features to obtain a tensor matrix of the same dimension as the model label, and combine the model label to calculate the mean square error MSE, use the Adam gradient descent algorithm to implement back propagation, change the state update parameter f until the error MSE is close to zero, and obtain the state update parameter of the neural network model.
[0051] The attention mechanism includes: the neural network model needs to receive and process a large amount of data, but at a specific moment, only a small part of the data is important. The referenced attention mechanism can automatically learn the most important features in the data, improve the model's attention to key factors, and make it easier to capture the essence of well connectivity in a complex reservoir environment. The task of the attention mechanism is to calculate the correlation between the current oil production well and each water injection well, so as to obtain a connectivity matrix.
[0052] In the embodiment of the present invention, the Adam gradient descent algorithm is a random and efficient optimization method. The algorithm is proposed based on the concept of the gradient descent algorithm (SGD) and combines the Adagrad and RMSProp algorithms. The calculation is based on the first-order derivative of the objective function, ensuring a relatively low amount of calculation.
[0053] The present invention adopts the Adam gradient descent algorithm to replace the traditional stochastic gradient descent algorithm, continuously adjusts the connectivity coefficient according to the actual situation, evaluates the convergence result, compares it with the actual well-to-well connectivity, realizes back propagation, continuously reduces the error MSE, obtains the state update parameters of the neural network model, verifies and improves the model, ensures a relatively low amount of calculation, and improves the efficiency and accuracy of the model calculation.
[0054] Step 4, determine the sliding window size: First, define a list of candidate values for the sliding window size based on expert experience, representing the lag time of the impact of water injection on the oil well after the water injection well has injected water. Then divide the data set into a training set and a validation set. For each candidate window size, perform the following steps: First, initialize the neural network model based on the attention mechanism, and use the data of the training set to train the model and adjust the parameters. Use the trained model to predict the validation set, and calculate the performance evaluation index of the model on the validation set. Then traverse the values of the sliding window size in all cases, and finally determine the optimal sliding window size for the current oil well by comparing the minimum loss value of the validation set.
[0055] Figure 2 is a module diagram of an exemplary method for calculating the well-to-well connectivity coefficient based on the attention mechanism according to some embodiments of this specification, such as Figure 2 As shown, a method for calculating the connectivity coefficient between reservoir wells based on the attention mechanism includes a model input parameter module, a model main mechanism module, and an output result module.
[0056] The model input parameter module can be used for data acquisition and preprocessing, including data cleaning, data standardization, feature engineering and other operations. These preprocessing steps help improve the quality of data and adapt to the needs of the model.
[0057] The main mechanism module of the model can be used to unify the data feature dimensions and perform feature fusion and data splicing, and then obtain the model training results through the neural network model trained based on the attention mechanism, and obtain the attention weight of each water injection well for the daily liquid production of the oil production well.
[0058] The output result module can be used to obtain the daily liquid production of the current oil well predicted by the model and the connectivity coefficient matrix of the oil well.
[0059] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are suggested in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.
[0060] At the same time, this specification uses specific words to describe the embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of this specification. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of this specification can be appropriately combined. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0061] Finally, it should be understood that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for calculating the connectivity coefficient between reservoir wells based on the attention mechanism, characterized in that: The following steps are involved: Step 1: Before analyzing the well group data to be processed, first obtain the historical production data of each water injection well and the current oil production well, and perform cleaning, screening, and alignment preprocessing on these data; next, perform normalization on the acquired historical production data, and divide it into multiple subsequences using a sliding window mechanism. At the same time, delete the samples of the oil production wells in the shut-in state to obtain a standard sample set suitable for inputting into the neural network; Step 2: After obtaining the sample set, use the K-fold cross validation method to process the sample set; Step 3: Establish a neural network model based on the attention mechanism, and define the objective function as the mean square error between the actual daily liquid production of the current oil well and the value predicted by the neural network. This objective function will be used in the training and learning process of the neural network. Step 4: In order to determine the optimal sliding window size, a grid search algorithm is used for optimization. The trained neural network model and the results of parameter optimization are used to obtain the training results of the model. At the same time, the attention weight of each water injection well for the daily liquid production of the oil production well is obtained. These weights constitute an attention weight matrix, which is used to determine the connectivity between each water injection well and the oil production well.
2. The method for calculating the well-to-well connectivity coefficient based on the attention mechanism according to claim 1, characterized in that: The historical production data of each water injection well and the current oil production well include: the well number, production date, daily water injection volume, wellhead injection pressure, water nozzle diameter, casing pressure, injection time, and total cumulative injection volume of each water injection well; the well number, production date, oil pressure, casing pressure, oil nozzle diameter, production time, water content, and daily liquid production of the current oil production well.
3. The method for calculating the well-to-well connectivity coefficient based on the attention mechanism according to claim 2, characterized in that: The normalization operation includes: First, the magnitude of historical production data of different wells is different. Unifying the historical production data of different wells into a standard range can avoid the adverse effects of data of different magnitudes on model training. Subsequently, each feature in the sequence is normalized separately to complete the task of obtaining the data change trend in the time series.
4. The method for calculating the well-to-well connectivity coefficient based on the attention mechanism according to claim 1, characterized in that: The sliding window mechanism includes: dividing the historical production data into a series of subsequences with fixed lengths, capturing the production characteristics of different time periods, providing more sample data, and increasing the generalization ability of the model.
5. The method for calculating the well-to-well connectivity coefficient based on the attention mechanism according to claim 1, characterized in that: The K-fold cross validation method comprises: First, the sample set obtained by inputting the neural network is shuffled; Then, the sample set is divided into K subsets, and a cross-validation cycle is started. In each cycle, one of the subsets is selected as the validation set, and the remaining K-1 subsets are used as the training set. In each cycle, the training set is used to train the model, and the trained model is used to predict the selected validation set to obtain the prediction result. Repeat the above steps until each subset is used as a validation set, and finally get the average value of the performance evaluation results.
6. The method for calculating the well-to-well connectivity coefficient based on the attention mechanism according to claim 1, characterized in that: The establishment of a neural network model based on the attention mechanism includes: First, unify the feature dimensions of the data of water injection wells and oil production wells, and correspond the time windows of the current oil production wells to the water injection wells. Then, merge the features of the two and perform feature concatenation. The connectivity coefficient matrix is calculated based on the attention mechanism to obtain the correlation matrix. Then, the features are further extracted to obtain the tensor matrix, and the mean square error (MSE) is calculated. The parameters are changed until the error MSE is close to zero, and finally the state update parameters of the neural network model are obtained.
7. The method for calculating the well-to-well connectivity coefficient based on the attention mechanism according to claim 6, characterized in that: The task of the attention mechanism is to calculate the correlation between the current oil production well and each water injection well, so as to obtain the connectivity matrix.
8. The method for calculating the well-to-well connectivity coefficient based on the attention mechanism according to claim 1, characterized in that: The grid search algorithm comprises: First, a list of candidate values for the sliding window size is defined based on expert experience, representing the lag time after the injection of water from the injection well affects the oil production well; Then, the values of the sliding window size in all cases are traversed, and finally the optimal sliding window size for the current oil well is determined by comparing the minimum loss value of the validation set.