Oil reservoir moisture content prediction method based on graph neural network and Transform
By constructing a GNT agent model based on graph neural networks and Transformer, the problems of dynamic changes and complex connectivity relationships in reservoir water cut prediction are solved, high-precision water cut prediction is achieved, and support is provided for oil and gas field development optimization.
Patent Information
- Application Number
- CN202510739142.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-16
AI Technical Summary
Existing reservoir water cut prediction methods are difficult to adapt to dynamic changes in reservoirs and have limited ability to depict complex connectivity relationships between wells, resulting in low prediction accuracy and affecting development decision-making effectiveness.
A GNT agent model is constructed using graph neural networks and Transformer. By converting the reservoir injection and production model into a graph structure, the GCN module is used to extract spatial features, and the Transformer encoder module is combined to process temporal dependencies, dynamically adjust the information transmission intensity and capture long-distance time dependencies.
It significantly improves the accuracy of water cut prediction and provides an efficient and reliable proxy model for reservoir dynamic analysis, which can more accurately predict the water cut of production wells.
Smart Images

Figure CN120653959A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil and gas field development, and in particular to a method for predicting oil reservoir water content based on graph neural network and Transformer. Background Art
[0002] Reservoir injection and production is a key technology in oil and gas field development. Fluid is injected into the formation through injection wells to maintain pressure and drive crude oil to flow to production wells to increase recovery rate.
[0003] As a key indicator for measuring the water content of produced fluids in production wells, accurate prediction of water cut is crucial for optimizing injection-production strategies. However, existing prediction methods generally struggle to adapt to reservoir dynamics and have limited ability to depict complex inter-well connectivity. This results in generally low water cut prediction accuracy, directly impacting development decision-making.
[0004] Based on the above defects, a reservoir water cut prediction method based on graph neural network and Transformer is proposed. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for predicting oil reservoir water content based on graph neural network and Transformer to solve the problems in the background technology.
[0006] To achieve the above objectives, the present invention provides a method for predicting reservoir water cut based on graph neural network and Transformer, comprising the following steps:
[0007] S1. Convert the reservoir injection and production model at each time point into a graph structure and construct a connection network from injection wells to production wells;
[0008] The conversion process is as follows: the injection wells and production wells in the reservoir injection and production model are used as nodes, the inter-well connectivity relationship is mapped into the adjacency matrix between nodes, and the inter-well connectivity parameters are used as edge features;
[0009] S2. Build and train a GNT agent model by combining graph neural networks and Transformer to predict the water cut of each production well.
[0010] The GNT proxy model consists of a GCN module, a position encoding module, a Transformer encoder module, and a prediction module.
[0011] Preferably, in S2, the input of the GCN module includes a node feature matrix, an adjacency matrix and edge features;
[0012] The GCN module consists of M GCN layers. Each layer aggregates neighbor node features through convolution operations to update the feature representation of each node, and adopts the message passing mechanism enhanced by edge features to adjust the information transmission intensity between nodes and extract the spatial features of the graph structure.
[0013] Preferably, the message passing mechanism for edge feature enhancement is expressed as:
[0014]
[0015] Where i and j both represent position indexes. is the feature representation of the i-th node in the l+1 layer, σ is the nonlinear activation function, N(i) is the set of neighboring nodes, c ij is the normalization coefficient, W e Represents the weight matrix of edge features, E ij represents the edge feature between the i-th node and the j-th neighbor node, Θ is the element-by-element multiplication, W v is the weight matrix of node features.
[0016] Preferably, in S2, a position encoding module is used to add sequence position information to each node. The specific process is: creating and initializing a position encoding matrix, using sine and cosine functions to generate position encoding and store it in the position encoding matrix, and based on the broadcast mechanism, adding the position encoding matrix to the output of the GCN module to match the input requirements of the Transformer encoder module.
[0017] Preferably, the generation formula of the position code is expressed as:
[0018]
[0019] Where PE(pos,2i) represents the value of the 2i-th dimension of the position encoding vector at position pos, and d model The vector dimension encoding the position.
[0020] Preferably, in S2, the Transformer encoder module is composed of Q encoder layers, each layer includes two sublayers: a multi-head self-attention layer and a feedforward neural network, and each sublayer uses layer normalization and residual connection operations to accelerate convergence;
[0021] The forward propagation process of the Transformer encoder module is as follows: an upper triangular mask matrix is generated based on self-supervision and masking mechanism, the upper triangular mask matrix and the output of the position encoding module are passed to the multi-head self-attention layer to capture long-distance dependencies, and after feedforward neural network, layer normalization and residual connection operations, the feature representation processed by the encoder is output.
[0022] Preferably, the upper triangular mask matrix is expressed as:
[0023]
[0024] Where, N is the number of nodes.
[0025] Preferably, during the training process of S2, the predicted value is compared with the true value using the mean square error loss function, and then the mean square error loss function is optimized using the Adam algorithm, and the model parameters are adjusted and updated based on the back propagation method.
[0026] Preferably, in S2, the specific process of using the prediction module to predict the water cut is: adjusting the length and dimension of the output of the Transformer encoder module, mapping it to the output dimension through the fully connected layer, and realizing the prediction of the water cut of each production well.
[0027] Therefore, the present invention proposes a method for predicting water cut in oil reservoirs based on graph neural networks and Transformer. By fusing graph neural networks and Transformer to construct a GNT proxy model, the water cut prediction accuracy is significantly improved. First, the GCN module is used to convert the injection and production structure of the oil reservoir into graph data, with injection wells and production wells as nodes and connectivity relationships as edges. The message passing mechanism enhanced by edge features dynamically adjusts the information transmission intensity between nodes, effectively capturing the spatial connectivity characteristics between wells and solving the problem that traditional methods are insufficient in modeling complex spatial relationships. Then, the Transformer encoder module is introduced to process temporal dependencies. The multi-head self-attention layer combined with the mask mechanism can accurately capture long-distance time dependencies, overcoming the defect of insufficient extraction of temporal features of the dynamic injection and production process by existing methods, and providing an efficient and reliable proxy model for dynamic analysis of oil reservoirs.
[0028] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is an architectural diagram of the GNT proxy model according to an embodiment of the present invention;
[0030] Figure 2 A diagram showing the locations and connectivity of a conceptual reservoir model according to an embodiment of the present invention;
[0031] Figure 3 A comparison chart of loss values of the conceptual reservoir model according to an embodiment of the present invention;
[0032] Figure 4 This is a comparison chart of correlation coefficient scores of the conceptual reservoir model according to an embodiment of the present invention;
[0033] Figure 5A comparison diagram of water cuts in a conceptual reservoir model according to an embodiment of the present invention;
[0034] Figure 6 A schematic diagram of conductivity of a complex reservoir model according to an embodiment of the present invention;
[0035] Figure 7 Schematic diagram of the connected volumes of a complex reservoir model according to an embodiment of the present invention;
[0036] Figure 8 This is a comparison chart of loss values of a complex reservoir model according to an embodiment of the present invention;
[0037] Figure 9 This is a comparison chart of correlation coefficient scores of complex reservoir models according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0040] Example
[0041] like Figure 1 As shown, the present invention provides a method for predicting reservoir water content based on graph neural network and Transformer, comprising the following steps:
[0042] S1. Convert the reservoir injection and production model at each time point into a graph structure. The conversion process is as follows: the injection wells and production wells in the reservoir injection and production model are used as nodes, the inter-well connectivity relationship is mapped into an adjacency matrix (edge) between nodes, and the inter-well connectivity parameters are used as edge features. Based on this, a connection network from the injection wells to the production wells is constructed;
[0043] In this embodiment, the capacitance-resistance model (CRM) is conceptualized as a graph structure. Given that the production dynamics of injection and production wells vary at different production time points, the characteristic parameters of the graph neural network model also need to be dynamically adjusted accordingly. Therefore, a specific graph structure is constructed for each production time point. For a certain production, the input features of the injection well node include the injection volume at the current production time, the total injection volume, the well location data, the address characteristics, and the water content at the last production time. Correspondingly, the input features of the production well node include the liquid production at the current production time, the total liquid production, the well location data, the address characteristics, and the water content at the last production time.
[0044] S2. Build and train a GNT proxy model using graph neural networks and Transformers to predict the water cut of each production well. The GNT proxy model consists of a GCN module, a position encoding module, a Transformer encoder module, and a prediction module. Specifically:
[0045] (1) GCN module:
[0046] In the GCN module, spatial features are extracted from the graph structure of reservoir data. The input data includes a node feature matrix, an adjacency matrix, and edge features. The node feature matrix describes the attributes of each well (such as well type, permeability, porosity, water injection rate, and liquid production); the adjacency matrix describes the connections between wells; and the edge features describe the connectivity parameters between wells (conductivity and connected volume).
[0047] The GCN module consists of M GCN layers. Each layer aggregates (the current node's features) with neighboring node features through convolution operations to update each node's feature representation. This means that the feature update process for each node depends on the feature information of its neighboring nodes. Edge features between well nodes also influence production dynamic indicators. Therefore, when aggregating neighboring node features, an edge-feature-enhanced message passing mechanism is adopted. Edge features are introduced into the information transfer process and weighted to adjust the information transfer strength between nodes, thereby extracting the spatial characteristics of the graph structure.
[0048] ①The specific update process of each node feature is:
[0049] In the graph-based reservoir water content prediction problem, each node will identify its neighbor nodes through the adjacency matrix and update its own node features through the information aggregation mechanism. The goal of the graph neural network is to learn a state embedding vector h for each node through a series of information transmission. v , local information transmission and status update are performed on each node. This process enables the model to capture complex relationships and features in graph data.
[0050] Local information transmission and state update are expressed as:
[0051] h v =f(x v ,x co[v] ,h ne[v] ,x ne[v] );
[0052] o v =g(h v ,x v );
[0053] Where h vis the state embedding vector, f(·) is the local transfer function, g(·) is the local output function, x v represents the feature vector of node v, x co[v] The feature vector of the edge associated with node v, h ne[v] represents the state vector of the neighboring nodes of node v, x ne[v] Represents the neighbor node feature vector of node v, o v is the output vector.
[0054] For the local transfer function and local output function of all nodes in the graph, all feature vectors, state vectors, node features and output vectors are stacked and represented by X, H, X N , O represents, and the global transfer function F and global output function G are obtained:
[0055] H=F(H,X);
[0056] O=G(H,X N );
[0057] Among them, H is calculated using the traditional iterative method, and its expression is:
[0058] H t+1 =F(H t ,X);
[0059] Where H t The tensor representing the t-th iteration period of H. For any initial value H, its solution can be quickly converged by the iterative method.
[0060] Using target information for supervised learning, the loss function expression is:
[0061]
[0062] Where P is the total number of supervisory nodes, t i and o i are the true value and predicted value of the node respectively. The learning process of the loss function relies on the gradient descent strategy. The steps are as follows:
[0063] i State h v t Iterate and update the local information transfer function for t rounds until it approaches the fixed-point solution of the global information transfer function. At this time, the obtained H will be close to the fixed-point solution H(t), H(t)≈H.
[0064] ⅱ Calculate the gradient through the loss function and use the gradient calculated in the last step to update the network parameters.
[0065] ②The message passing mechanism of edge feature enhancement is expressed as:
[0066]
[0067] Where i and j both represent position indexes. is the feature representation of the i-th node in the l+1 layer, σ is the nonlinear activation function, N(i) is the set of neighboring nodes, c ij is the normalization coefficient, W e Represents the weight matrix of edge features, E ij represents the edge feature between the i-th node and the j-th neighbor node, Θ is the element-by-element multiplication, W v is the weight matrix of node features; this mechanism allows the model to dynamically adjust the intensity of message transmission according to edge features, thereby capturing the relationship between nodes more flexibly.
[0068] In this embodiment, the model uses three layers of GCN layers to extract spatial features: the first layer of GCN convolution receives 7-dimensional node feature input (including well type, permeability, porosity, water injection volume at the current mining time, liquid production at the current mining time, total water injection volume, and total liquid production), aggregates the first-order neighbor information of the node through the adjacency matrix and edge features, and captures local structural features. Through linear transformation and nonlinear activation function, the node features are mapped to a 64-dimensional latent space. The second layer of GCN convolution further aggregates the second-order neighbor information of the node on the basis of the previous layer to capture a wider range of local structural features. The third layer of GCN convolution aggregates the third-order neighbor information of the node, captures global structural features, and compresses the features to 32 dimensions. Through the convolution operation of the last layer, the model can generate node feature representations containing global information, providing high-quality feature input for downstream tasks. Through multi-layer stacking, the node can gradually fuse the information of multi-order neighbors to generate rich feature representations.
[0069] (2) Position encoding module:
[0070] Before the output data of the GCN module enters the Transformer encoder module, position encoding is required. The purpose is to add position information to each node so that the Transformer can distinguish nodes at different positions. The specific process is as follows: First, initialize the position encoding matrix PE with a size of (max_len, d model ), max_len is the maximum length of the sequence (ie the number of nodes), d model is the dimension of the encoding vector, which is consistent with the output dimension of the GCN module. The sine and cosine functions are used to calculate the sine and cosine values for each position and each dimension, respectively, and the generated position encoding is stored in the position encoding matrix (stored as a parameter of the model).
[0071] Among them, the generation formula of position encoding is expressed as:
[0072]
[0073] Where PE(pos,2i) represents the value of the 2i-th dimension of the position encoding vector at position pos, pos represents the position subscript of the input sequence, i represents the position encoding of dimension i, and d model The vector dimension encoding the position.
[0074] The output of the GCN module is a node feature matrix Where N is the number of nodes (sequence length), d out is the output dimension of the GCN module. In order to convert the output of the GCN module into a sequence form suitable for Transformer input, it is first necessary to convert it into a three-dimensional tensor, that is, the shape of the node feature matrix is changed from [N, d out ] is adjusted to [b,N,d out ], where b represents the batch size. Through a broadcast mechanism, the positional encoding matrix PE is added to the output of the GCN module, adding position information to each node feature. The positional encoding matrix PE is automatically expanded to match the shape of the GCN module output. In this way, the positional encoding module can convert the node feature matrix output by the GCN module into a sequence form with position information, thus matching the input requirements of the Transformer.
[0075] (3) Transformer encoder module:
[0076] In the Transformer layer, the reservoir water cut prediction task is a typical time series prediction problem. Its goal is to predict the water cut value at a certain point in the future based on historical data. This task does not require the generation of sequence data, but rather directly performs feature extraction and regression prediction on the input sequence. Therefore, the Transformer encoder module is implemented by only Q encoder layers. Each layer consists of two sublayers: a multi-head self-attention layer and a feedforward neural network. Layer normalization and residual connections are used (after each sublayer) to accelerate model convergence and improve training stability.
[0077] The multi-head self-attention layer enhances the model's understanding and generalization capabilities for complex sequence tasks. In the multi-head self-attention layer, the input sequence is first linearly transformed into multiple query, key, and value matrices, which are then divided into multiple smaller parts, each corresponding to an attention head. In each attention head, the attention score is obtained by calculating the dot product of the query and the key. These scores are normalized by Softmax and then used as weights to perform weighted summation on the values to obtain the output representation of the attention head. Finally, all output representations are concatenated and the final output is obtained through a linear transformation. This approach allows the model to capture dependencies and nuances in the sequence from multiple perspectives, significantly improving the model's ability to handle complex sequence tasks. The calculation formula for multi-head attention is as follows:
[0078] MultiHead(Q,K,V)=Concat(hedd1,...,head N )W O ;
[0079] Where W O Represents the parameter matrix of the output projection, head i represents the self-attention distribution of the i-th head;
[0080]
[0081] Where, Represents the projection matrices of Query, Key and Value of the i-th head respectively;
[0082] For each head i The attention calculation method is:
[0083]
[0084] Among them, D K Indicates the dimension of the key.
[0085] The forward propagation process of the Transformer encoder module is as follows: based on self-supervision and masking mechanism, an upper triangular mask matrix is generated, and the output of the upper triangular mask matrix and the position encoding module is passed to the multi-head self-attention layer to capture long-range dependencies. In the multi-head self-attention layer, the mask matrix is added to the attention score matrix to limit the attention weight of each position. After the feedforward neural network, layer normalization and residual connection operations, the feature representation processed by the encoder is output, specifically:
[0086] In this embodiment, the position-encoded data is used as the input of the Transformer encoder module, the number of attention heads is set to 4, the number of encoder layers is set to 2, and the hidden layer dimension of the feedforward neural network is set to 128. Self-supervision and masking mechanisms are the key to the model's ability to effectively capture long-distance dependencies in sequences. The core idea of self-supervision is to prevent the model from peeking at future information during training through masking technology, thereby ensuring that the model can only rely on current and previous information for prediction. Taking into account the dynamic characteristics of oil reservoirs, when predicting the water content of a well, the model can only rely on the historical data of the well and its neighboring wells, and cannot rely on future data. Generate an upper triangular mask matrix based on the sequence length N (i.e., the number of nodes) Expressed as:
[0087]
[0088] Where i and j represent the position index in the sequence respectively. When i≥j, M ij = 0, indicating that the information of position j can be used to predict position i, otherwise, M ij =-∞, indicating that the information of position j is masked and cannot be used to predict position i.
[0089] (4) Training and evaluation:
[0090] ① During the training process, the mean square error (MSE) loss function is used to compare the predicted value with the true value, and the average of the squares of the differences between the actual value and the predicted value is calculated. The mean square error loss function is expressed as:
[0091]
[0092] Where n is the total number of data, y i is the true value of the i-th sample, is the predicted value of the i-th sample;
[0093] The Adam algorithm is then used to optimize the mean square error loss function, and the backpropagation method is used to adjust and update the model parameters. In the Adam algorithm, the initial learning rate is set to 0.001. As training progresses, if the error is observed to stagnate or the convergence speed slows down, the model training needs to be further refined by reducing the learning rate, for example, multiplying the learning rate by 0.9.
[0094] ②Use correlation coefficient R 2 To evaluate the performance of the model, R 2 It is an indicator used to evaluate the goodness of fit of the regression model, with a value range of [0, 1]. 2 The closer the value is to 1, the closer the model prediction value is to the true value, and the better the performance is. The calculation formula is:
[0095]
[0096] Where, is the average value of the simulated real data.
[0097] (5) Prediction module:
[0098] The specific process of using the prediction module to predict water cut is as follows: the length and dimension of the output of the Transformer encoder module are adjusted, and it is mapped to the final output dimension through the fully connected layer to realize the prediction of the water cut of each production well.
[0099] The following is a test of the reservoir water cut prediction method based on graph neural network and Transformer provided by the present invention using two two-dimensional heterogeneous reservoir models. Both models use the CRM method to generate corresponding training and test data sets. The GNT agent model is trained and evaluated based on the respective data sets. The details are as follows:
[0100] ① Conceptual reservoir model:
[0101] Establish a two-dimensional heterogeneous conceptual reservoir model, Figure 2 The model's well points and connectivity are shown. The reservoir parameters are as follows: 5 injection wells and 4 production wells, a reservoir thickness of 8.5 m, a porosity of 0.3, an average permeability of 950 mD, an initial reservoir pressure of 8 MPa, crude oil and water viscosities of 43 mPa·s and 1.1 mPa·s, respectively, and a crude oil compressibility of 2.365 × 10 -5 MPa -1 , the formation water compressibility coefficient is 6.368×10 -5 MPa -1 , the rock compression coefficient is 17×10 -5 MPa -1 The data were obtained from a production process of 3000 days, with each time step interval set to 30 days.
[0102] Using preset reservoir parameters, a CRM approach was used to generate a dataset of 2,000 samples. Of these, 1,500 samples were used as training data, and 500 samples were used as testing data. To adapt the model training, each sample was processed into 100 graphs, using a production period of 3,000 days and a time step of 30 days. During model training, the batch size was set to 100, and the total number of training cycles was set to 100.
[0103] Train the GNN proxy model and the GNT proxy model separately, and record the training loss values of the two models. The results are as follows Figure 3As shown in . It is observed that with the increase of training rounds, the loss values of the two models gradually decrease and tend to a stable state. The training loss value of the GNT model is lower than that of the GNN model. In terms of model evaluation, as Figure 4 As shown, the R of the GNN model 2 The score is close to 0.6, and GNT's R 2 Scores exceeding 0.95 indicate higher prediction accuracy. The accuracy of the surrogate model is verified using the test data, such as Figure 5 As shown, the GNT proxy model outperforms the GNN proxy model, provides accurate predictions, and can replace the numerical simulation process in history matching.
[0104] ② Complex reservoir model:
[0105] like Figure 6 、 Figure 7 As shown in the figure, a complex reservoir model with eight injection wells and 13 production wells was selected. The reservoir model uses a 30-day time step, with a total production time of 4,500 days. A CRM model was developed based on reservoir geological data, including a 2,000-sample dataset for model training and history matching.
[0106] Similar to the conceptual model, 1500 samples were used as training data and 500 samples were used as testing and validation data. Each data file was processed into 150 graphs based on 4500 production days and a time step of 30. The model input parameters included node features, edge features, and a relationship matrix, and the output was the water cut fraction (WWCT) of each production well.
[0107] Train the GNN proxy model and the GNT proxy model separately, and record the loss value and correlation coefficient score of each epoch for comparison, such as Figure 8 、 Figure 9 As shown in the figure. For MSE, at the beginning of the iteration, the MSE of the GNN model decreases rapidly and then tends to be stable, while the MSE of the GNT model decreases relatively slowly, but as the number of iterations increases, the MSE gradually decreases and tends to be stable in the later stage, and the overall performance is better than GNN. For the correlation coefficient score, at the beginning of the iteration, the R 2 The GNN model stabilizes and approaches 0.6 after about 20 iterations. As the number of iterations increases, the R 2 It continues to rise throughout the iteration process, and its correlation coefficient score R 2 Close to 0.93. Using the GNN proxy model as a comparison benchmark, Figure 8 、 Figure 9 The advantages of the proposed GNT agent model in continuous learning and optimization are demonstrated.
[0108] Therefore, the present invention proposes a method for predicting reservoir water cut based on graph neural networks and Transformers. By integrating graph neural networks and Transformers to construct a GNT proxy model, the accuracy of water cut prediction is significantly improved. First, the GCN module is used to convert the reservoir injection and production structure into graph data. The edge-feature-enhanced message passing mechanism dynamically adjusts the intensity of information transmission between nodes, accurately capturing inter-well connectivity characteristics. The multi-head self-attention mechanism of the Transformer encoder module is then combined to handle temporal dependencies, effectively modeling long-distance temporal dynamic relationships. This solves the problem of traditional methods' insufficient modeling of complex spatiotemporal features, providing an efficient and reliable proxy model for reservoir dynamic analysis.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for predicting reservoir water content based on graph neural network and Transformer, characterized in that: The following steps are involved: S1. Convert the reservoir injection and production model at each time point into a graph structure and construct a connection network from injection wells to production wells; The conversion process is as follows: the injection wells and production wells in the reservoir injection and production model are used as nodes, the inter-well connectivity relationship is mapped into the adjacency matrix between nodes, and the inter-well connectivity parameters are used as edge features; S2. Build and train a GNT agent model by combining graph neural networks and Transformer to predict the water cut of each production well. The GNT proxy model consists of a GCN module, a position encoding module, a Transformer encoder module, and a prediction module.
2. The method for predicting reservoir water content based on graph neural network and Transformer according to claim 1, characterized in that: In S2, the input of the GCN module includes node feature matrix, adjacency matrix and edge features; The GCN module consists of M GCN layers. Each layer aggregates neighbor node features through convolution operations to update the feature representation of each node, and adopts the message passing mechanism enhanced by edge features to adjust the information transmission intensity between nodes and extract the spatial features of the graph structure.
3. The method for predicting reservoir water content based on graph neural network and Transformer according to claim 2, characterized in that: The message passing mechanism of edge feature enhancement is expressed as: Where i and j both represent position indexes, is the feature representation of the i-th node in the l+1 layer, σ is the nonlinear activation function, N(i) is the set of neighboring nodes, c ij is the normalization coefficient, W e Represents the weight matrix of edge features, E ij represents the edge feature between the i-th node and the j-th neighbor node, Θ is the element-by-element multiplication, W v is the weight matrix of node features.
4. The method for predicting reservoir water content based on graph neural network and Transformer according to claim 1, characterized in that: In S2, based on the output of the GCN module, a position encoding module is used to add sequence position information to each node. The specific process is: creating and initializing a position encoding matrix, using sine function and cosine function to generate position encoding and store it in the position encoding matrix, and based on the broadcast mechanism, adding the position encoding matrix to the output of the GCN module to match the input requirements of the Transformer encoder module.
5. The method for predicting reservoir water content based on graph neural network and Transformer according to claim 4, characterized in that: The generation formula of the position code is expressed as: Where PE(pos,2i) represents the value of the 2i-th dimension of the position encoding vector at position pos, and d model The vector dimension encoding the position.
6. The method for predicting reservoir water content based on graph neural network and Transformer according to claim 1, characterized in that: In S2, the Transformer encoder module consists of Q encoder layers, each of which includes two sublayers: a multi-head self-attention layer and a feedforward neural network. Each sublayer uses layer normalization and residual connection operations to accelerate convergence. The forward propagation process of the Transformer encoder module is as follows: an upper triangular mask matrix is generated based on self-supervision and masking mechanism, the upper triangular mask matrix and the output of the position encoding module are passed to the multi-head self-attention layer to capture long-distance dependencies, and after feedforward neural network, layer normalization and residual connection operations, the feature representation processed by the encoder is output.
7. The method for predicting reservoir water content based on graph neural network and Transformer according to claim 6, characterized in that: The upper triangular mask matrix is expressed as: Where, N is the number of nodes.
8. The method for predicting reservoir water content based on graph neural network and Transformer according to claim 1, characterized in that: During the training process of S2, the predicted value is compared with the true value using the mean square error loss function, and then the mean square error loss function is optimized using the Adam algorithm, and the model parameters are adjusted and updated based on the back propagation method.
9. The method for predicting reservoir water content based on graph neural network and Transformer according to claim 1, characterized in that: In S2, the specific process of using the prediction module to predict the water cut is as follows: adjusting the length and dimension of the output of the Transformer encoder module, mapping it to the output dimension through the fully connected layer, and realizing the prediction of the water cut of each production well.
Citation Information
Patent Citations
Oilfield optimal well pattern construction method based on GNN model
CN115186936A
Cited By
A method, apparatus, equipment, and storage medium for predicting oil reservoir production.
CN122413392A
A method, device, and storage medium for predicting oil reservoir production
CN122413392B