Shale oil daily output prediction method based on self-attention depth modeling
By integrating multi-source data through self-attention deep modeling, constructing a multi-head self-attention neural network, and combining sliding window technology and Bayesian optimization, the problem of insufficient multi-source data fusion and long-term dependency in shale oil production prediction is solved, achieving high-precision and real-time prediction.
Patent Information
- Application Number
- CN202511194751.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-12-09
AI Technical Summary
Existing shale oil production prediction methods have shortcomings in multi-source data fusion, long-term dependency capture, and prediction accuracy, while traditional machine learning models are deficient in generalization ability and prediction accuracy.
A deep neural network architecture based on self-attention deep modeling was adopted, which integrates rock physical parameters, hydraulic fracturing parameters and real-time production data to construct a multi-head self-attention mechanism. Combined with sliding window technology and Bayesian optimization of hyperparameters, the daily production of shale oil was predicted.
It significantly improves the accuracy and reliability of shale oil production forecasting, achieves deep fusion and real-time dynamic updates of multi-source data, supports second-level inference, and provides immediate support for on-site decision-making.
Smart Images

Figure CN121092902A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of petroleum engineering technology, specifically to a method for predicting daily shale oil production based on self-attention depth modeling. Background Technology
[0002] Shale oil production prediction plays a crucial role in oilfield development, production optimization, and economic benefit assessment. Traditional shale oil production prediction methods include statistical methods based on empirical formulas and physical modeling. While these methods can provide detailed reservoir dynamic descriptions, they cannot fully account for complex factors such as the attenuation of fracturing effects, resulting in limited prediction accuracy in complex reservoirs like shale oil. Furthermore, the lack of comprehensive integration of geological and engineering parameters limits their predictive capabilities. With the development of artificial intelligence, the introduction of deep learning technology has significantly improved the ability to capture complex relationships. For example, patent 202311795614.9 discloses a rapid prediction method for shale oil well oil, gas, and water production based on an improved LSTM model, reducing the mean square error of production prediction to 0.017. However, traditional... Machine learning models still struggle to capture the dependencies between parameters effectively, resulting in limitations in generalization ability. For example, the method and system for predicting shale oil production based on a CNN-LSTM model disclosed in patent CN202410258681.5 only covers short-term dependencies. Self-attention mechanisms, as a core component of the Transformer architecture, have made breakthroughs in fields such as natural language processing. Their ability to process sequential information in parallel and effectively capture long-distance dependencies provides a new technical approach to solving the complex time-series modeling problem in shale oil production prediction. Therefore, developing a shale oil daily production prediction method based on self-attention deep modeling has significant practical application value. Summary of the Invention
[0003] To address the challenges of multi-source data fusion, insufficient capture of long-term dependencies, and low prediction accuracy in existing shale oil production prediction methods, this invention proposes a shale oil daily production prediction method based on self-attention depth modeling. This method integrates rock physical parameters, hydraulic fracturing parameters, and real-time production data to construct a comprehensive prediction model containing multiple key features, significantly improving the accuracy and reliability of shale oil production prediction.
[0004] To solve the above-mentioned technical problems, the main steps of the technical solution adopted by the present invention include:
[0005] 1) Collect historical daily shale oil production data from the oilfield, and preprocess the collected data to construct training and testing sets;
[0006] 2) Construct a deep neural network architecture based on a multi-head self-attention mechanism as a time-series prediction model for daily shale oil production;
[0007] 3) Construct a traditional time series prediction model, the Long Short-Term Memory (LSTM) neural network model, as a comparative experimental model;
[0008] 4) Based on the time series prediction model for daily shale oil production built in step 2), the input model data is processed using the sliding window technique and then input into the model for training. Based on the comparative experimental model built in step 3), the data is directly input for training.
[0009] 5) Based on the shale oil daily production time series prediction and comparative experimental model trained in step 4), production prediction is performed on the oilfield test set, and the model test results are evaluated to obtain the model evaluation index calculation results.
[0010] 6) Based on the calculation results of the evaluation indicators of the shale oil daily production time series prediction model and the comparative experimental model in step 5), analyze and compare them to determine and obtain the final prediction model.
[0011] The historical daily shale oil production data collected in step 1) includes the following parameters:
[0012] 1.1) Rock physical parameters: porosity, permeability, oil saturation, resistivity, sonic transit time, clay content, and horizontal section length;
[0013] 1.2) Hydraulic fracturing parameters: displacement, total injected fluid volume, total proppant volume, number of fracturing stages, fracturing pressure, working pressure, shut-in pressure;
[0014] 1.3) Dynamic production parameters: date, daily liquid production, real-time pump inlet pressure, and daily oil production.
[0015] Step 1) includes data preprocessing and dataset partitioning, which includes:
[0016] 1.1) Preliminary cleaning: Remove outlier data that exceeds three standard deviations;
[0017] 1.2) Missing value imputation: Linear interpolation is performed on missing data; cubic Lagrange interpolation is performed on data with negative daily liquid and oil production values.
[0018] 1.3) Data integration: Align rock physical parameters, hydraulic fracturing parameters and dynamic production parameters by timestamp, and associate static parameters with daily production data by well location to form a time series dataset containing multi-source parameters;
[0019] 1.4) Dataset partitioning: Divide the processed data into training and test sets.
[0020] Step 2) involves constructing a deep neural network architecture based on a multi-head self-attention mechanism, including:
[0021] 2.1) The self-attention mechanism is adopted as the core framework. The model consists of an input sequence encoding layer, a position encoding layer, a softmax layer, a forward propagation layer, a multi-head attention mechanism layer, a masked multi-head attention mechanism layer, and a linear layer.
[0022] 2.2) Model architecture setting: The self-attention mechanism uses 8 attention heads to process in parallel. Each attention head focuses on different feature dependencies. The multi-head outputs are integrated through connection operations. The temporal features and cross-parameter correlations are extracted through two layers of multi-head self-attention modules.
[0023] 2.3) Model hyperparameter settings: The model dimension is set to 512, the number of model layers is 2, the random dropout rate of model neurons is 0.1, and the model learning rate is 0.0001;
[0024] 2.4) Optimizer Selection: The Adam optimizer is used for parameter updates; the mean squared error is used as the loss function, as shown in the following formula:
[0025]
[0026] Among them, y i This represents the actual daily production value of shale oil. denoted as the daily shale oil production value predicted by the model, and n as the sample size.
[0027] Step 3) involves constructing a traditional time-series prediction model, the Long Short-Term Memory (LSTM) neural network model, including:
[0028] 3.1) The overall model architecture adopts a hierarchical chain structure, consisting of an input layer, an LSTM hidden layer, and an output layer connected in sequence;
[0029] 3.2) Hidden layer structure parameter configuration: Set 2 LSTM hidden layers, each containing 128 neurons. Set a Dropout layer between the hidden layer and the output layer with a dropout rate of 0.1 to suppress overfitting;
[0030] 3.3) Layer connection method: The input layer and the first LSTM hidden layer are linearly mapped through a weight matrix, with the mapping dimension being the number of input features × 128; the connection dimension between the first LSTM hidden layer and the second LSTM hidden layer remains 128×128; the second LSTM hidden layer and the output layer are dimensionally compressed through a 128×1 weight matrix to obtain the final output prediction value.
[0031] Step 4) involves processing the input model data using the sliding window technique, followed by training the constructed shale oil daily production time series prediction model. This specifically includes:
[0032] 4.1) The sliding window technique is used to process time series datasets, with continuous historical data segments as input and corresponding future daily oil production as output. Input model data is generated by sliding the window along the time axis.
[0033] 4.2) The Bayesian optimization algorithm is used to fine-tune the model hyperparameters learning rate, Dropout probability, and number of attention heads. The optimal training parameters are determined by iteratively selecting the hyperparameter combination.
[0034] 4.3) Based on the optimal training parameters determined in 4.2), train the shale oil daily production time series prediction model, and update the model parameters through backpropagation until the model converges.
[0035] In step 5), the model test results are used to perform model evaluation calculations. The model evaluation index calculation results include obtaining the time-series prediction of shale oil daily production and comparing the predicted and actual production values of the experimental model on the test set. Three complementary evaluation indicators are used with the coefficient of determination R. 2 The mean absolute error (MAE) and mean relative error (MRE) are used to evaluate and calculate the predicted and actual daily shale oil production values.
[0036] The advantages of this invention compared to the prior art are mainly reflected in:
[0037] (1) Deep fusion and accurate modeling of multi-source data: Integrate static rock physical parameters, hydraulic fracturing parameters and dynamic production data to build a prediction system covering the entire chain from geology to engineering to production. Combine the multi-head self-attention mechanism to dynamically focus on key time-series nodes and parameter combinations, break through the bottleneck of traditional methods' dependence on single data and long-cycle time-series dependence, and significantly improve the prediction accuracy of complex responses of shale oil reservoirs.
[0038] (2) High efficiency and real-time application capabilities: Through sliding window technology and Bayesian optimization of hyperparameters, it can quickly adapt to different wellbore conditions and maintain stable performance in multiple test wells without retraining a single well; the framework based on the self-attention mechanism realizes second-level inference, supports dynamic updates of predictions combined with real-time data, provides immediate support for on-site decision-making, and balances accuracy and deployment efficiency.
[0039] In summary, this invention, through multi-source data integration, the advantages of time-series modeling based on self-attention mechanisms, and dynamic adaptability, comprehensively surpasses traditional methods in prediction accuracy, generalization, and computational efficiency, providing a more practical technical tool for the efficient development of shale oil reservoirs. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the embodiments will be briefly described below.
[0041] Figure 1 This is an overall flowchart of the method of the present invention;
[0042] Figure 2 This is a schematic diagram of the structure of a self-attention mechanism neural network;
[0043] Figure 3 This is a schematic diagram of the traditional LSTM model structure;
[0044] Figure 4 This diagram illustrates the comparison of production prediction results between the time-series prediction model and the comparative experimental model for daily shale oil production. Detailed Implementation
[0045] Example 1
[0046] See Figure 1 This invention proposes a method for predicting daily shale oil production based on self-attention depth modeling, which specifically includes the following steps:
[0047] 1) Collect historical daily shale oil production data from the oilfield, and preprocess the collected data to construct training and testing sets;
[0048] 2) Construct a deep neural network architecture based on a multi-head self-attention mechanism as a time-series prediction model for daily shale oil production;
[0049] 3) Construct a traditional time series prediction model, the Long Short-Term Memory (LSTM) neural network model, as a comparative experimental model;
[0050] 4) Based on the time series prediction model for daily shale oil production built in step 2), the input model data is processed using the sliding window technique and then input into the model for training. Based on the comparative experimental model built in step 3), the data is directly input for training.
[0051] 5) Based on the shale oil daily production time series prediction and comparative experimental model trained in step 4), production prediction is performed on the oilfield test set, and the model test results are evaluated to obtain the model evaluation index calculation results.
[0052] 6) Based on the calculation results of the evaluation indicators of the shale oil daily production time series prediction model and the comparative experimental model in step 5), analyze and compare them to determine and obtain the final prediction model.
[0053] In this embodiment, in step 1), relevant historical daily shale oil production data are collected in real time using sensors and monitoring systems at the horizontal well sites in the Ordos Basin. The production data includes the following parameters:
[0054] 1.1) Rock physical parameters: porosity, permeability, oil saturation, resistivity, sonic transit time, clay content, and horizontal section length;
[0055] 1.2) Hydraulic fracturing parameters: displacement, total injected fluid volume, total proppant volume, number of fracturing stages, fracturing pressure, working pressure, shut-in pressure;
[0056] 1.3) Dynamic production parameters: date, daily liquid production, real-time pump inlet pressure, and daily oil production.
[0057] In this embodiment, step 1) involves data preprocessing and dataset partitioning of the collected data, including:
[0058] 1.1) Preliminary cleaning: Remove outlier data that exceeds three standard deviations;
[0059] 1.2) Missing value imputation: After the initial data cleaning, gaps exist in the production data due to equipment maintenance, technical failures, etc. Linear interpolation is used to imput missing values. Missing values are estimated by fitting a linear polynomial between known data points to ensure the continuity and smoothness of the time series; cubic Lagrange interpolation is performed on data with negative daily liquid and oil production values.
[0060] 1.3) Data integration: Align rock physical parameters, hydraulic fracturing parameters and dynamic production parameters by timestamp, and associate static parameters with daily production data by well location to form a time series dataset containing multi-source parameters;
[0061] 1.4) Dataset partitioning: Divide the processed data into training and test sets.
[0062] In this embodiment, step 2) involves constructing a time-series prediction model for shale oil daily production based on a self-attention mechanism. This aims to capture the complex correlations and temporal dependencies among multiple parameters, such as... Figure 2 The diagram shown illustrates the structure of the model. The model construction specifically includes the following sub-steps:
[0063] 2.1) The self-attention mechanism is adopted as the core framework. The model consists of an input sequence encoding layer, a position encoding layer, a softmax layer, a forward propagation layer, a multi-head attention mechanism layer, a masked multi-head attention mechanism layer, and a linear layer.
[0064] 2.2) Model architecture setting: The self-attention mechanism uses 8 attention heads to process in parallel. Each attention head focuses on different feature dependencies. The multi-head outputs are integrated through connection operations. The temporal features and cross-parameter correlations are extracted through two layers of multi-head self-attention modules.
[0065] 2.3) Model hyperparameter settings: The model dimension is set to 512, the number of model layers is 2, the random dropout rate of model neurons is 0.1, and the model learning rate is 0.0001;
[0066] 2.4) Optimizer Selection: The Adam optimizer is used for parameter updates; the mean squared error is used as the loss function, as shown in the following formula:
[0067]
[0068] Among them, y i This represents the actual daily production value of shale oil. denoted as the daily shale oil production value predicted by the model, and n as the sample size.
[0069] In this embodiment, step 3 involves constructing a traditional time-series prediction model, the Long Short-Term Memory (LSTM) neural network, as a comparative experiment. Figure 3 The diagram shown illustrates the structure of the model, and its construction includes the following sub-steps:
[0070] 3.1) The overall model architecture adopts a hierarchical chain structure, consisting of an input layer, an LSTM hidden layer, and an output layer connected in sequence;
[0071] 3.2) Hidden layer structure parameter configuration: Set 2 LSTM hidden layers, each containing 128 neurons. Set a Dropout layer between the hidden layer and the output layer with a dropout rate of 0.1 to suppress overfitting;
[0072] 3.3) Layer connection method: The input layer and the first LSTM hidden layer are linearly mapped through a weight matrix, with the mapping dimension being the number of input features × 128; the connection dimension between the first LSTM hidden layer and the second LSTM hidden layer remains 128×128; the second LSTM hidden layer and the output layer are dimensionally compressed through a 128×1 weight matrix to obtain the final output prediction value.
[0073] In this embodiment, step 4), after processing the input model data using the sliding window technique, specifically includes training the constructed shale oil daily production time series prediction model:
[0074] 4.1) The sliding window technique is used to process time series datasets, with continuous historical data segments as input and corresponding future daily oil production as output. Input model data is generated by sliding the window along the time axis.
[0075] 4.2) Bayesian optimization algorithm was used to fine-tune the model hyperparameters learning rate, Dropout probability, and number of attention heads to minimize the loss function on the validation set. By iteratively selecting the hyperparameter combination, the optimal training parameters were determined: model learning rate of 0.0001, model neural unit random dropout rate of 0.1, and number of attention heads of 8.
[0076] 4.3) Based on the optimal training parameters determined in 4.2), train the shale oil daily production time series prediction model, update the model parameters through backpropagation until the model converges; the training epochs are 1000, and the batch size of the training set is 16.
[0077] In this embodiment, in step 4), based on the constructed comparative experimental model, relevant historical shale oil daily production data collected in the Ordos Basin are directly input for training, and the model is saved; the training rounds are set to 1000 epochs, and the training batch size is 16, which is consistent with the shale oil daily production time series prediction model.
[0078] In this embodiment, step 5) involves testing the trained model and calculating the model evaluation results to obtain the model evaluation index calculation results, including:
[0079] 5.1) Test the trained shale oil daily production time series prediction model and the comparative experimental model on the test set, and use the current 40-day historical data of shale oil daily production to predict the shale oil daily production for the next 20 days;
[0080] 5.2) Obtain the predicted and actual daily shale oil production values from the time-series prediction and comparative experimental models on the test set. Use three complementary evaluation indicators—relative error, coefficient of determination, and mean square error—to evaluate the predicted and actual daily shale oil production data. The model evaluation parameter formulas are as follows:
[0081]
[0082] Where yi is the true value. For predicted values, is the mean of the actual values, and n is the total number of samples.
[0083] In this embodiment, in step 6), the calculation results of the evaluation indicators of the shale oil daily production time-series prediction model and the comparative experimental model are analyzed and compared. The prediction performance of the model is evaluated from multiple perspectives, including error distribution, trend fitting, and relative accuracy, and the final optimal model is obtained. The evaluation results of the oilfield prediction model are shown in the table below:
[0084]
[0085] Figure 4The diagram shows a comparison of the daily production prediction results of the shale oil time-series prediction model and the comparative experimental model on the test set. The results show that the prediction model based on the self-attention mechanism predicts the 20-day production of the 40-day production more accurately than the results of the comparative experimental model. According to various indicators in the table, the prediction performance of the model of this invention exceeds that of the traditional time-series prediction model, the Long Short-Term Memory Neural Network (LSTM) model, providing a strong guarantee for production optimization and decision support in large-scale oilfields.
Claims
1. A method for predicting daily shale oil production based on self-attention depth modeling, characterized in that, Includes the following steps: 1) Collect historical daily shale oil production data from the oilfield, and preprocess the collected data to construct training and testing sets; 2) Construct a deep neural network architecture based on a multi-head self-attention mechanism as a time-series prediction model for daily shale oil production; 3) Construct a traditional time series prediction model, the Long Short-Term Memory (LSTM) neural network model, as a comparative experimental model; 4) Based on the time series prediction model for daily shale oil production built in step 2), the input model data is processed using the sliding window technique and then input into the model for training. Based on the comparative experimental model built in step 3), the data is directly input for training. 5) Based on the shale oil daily production time series prediction and comparative experimental model trained in step 4), production prediction is performed on the oilfield test set, and the model test results are evaluated to obtain the model evaluation index calculation results. 6) Based on the calculation results of the evaluation indicators of the shale oil daily production time series prediction model and the comparative experimental model in step 5), analyze and compare them to determine and obtain the final prediction model.
2. The method according to claim 1, characterized in that, The historical daily shale oil production data collected in step 1) includes the following parameters: 1.1) Rock physical parameters: porosity, permeability, oil saturation, resistivity, sonic transit time, clay content, and horizontal section length; 1.2) Hydraulic fracturing parameters: displacement, total injected fluid volume, total proppant volume, number of fracturing stages, fracturing pressure, working pressure, shut-in pressure; 1.3) Dynamic production parameters: date, daily liquid production, real-time pump inlet pressure, and daily oil production.
3. The method according to claim 1, characterized in that, Step 1) includes data preprocessing and dataset partitioning, which includes: 1.1) Preliminary cleaning: Remove outlier data that exceeds three standard deviations; 1.2) Missing value imputation: Linear interpolation is performed on missing data; cubic Lagrange interpolation is performed on data with negative daily liquid and oil production values. 1.3) Data integration: Align rock physical parameters, hydraulic fracturing parameters and dynamic production parameters by timestamp, and associate static parameters with daily production data by well location to form a time series dataset containing multi-source parameters; 1.4) Dataset partitioning: Divide the processed data into training and test sets.
4. The method according to claim 1, characterized in that, Step 2) involves constructing a deep neural network architecture based on a multi-head self-attention mechanism, including: 2.1) The self-attention mechanism is adopted as the core framework. The model consists of an input sequence encoding layer, a position encoding layer, a softmax layer, a forward propagation layer, a multi-head attention mechanism layer, a masked multi-head attention mechanism layer, and a linear layer. 2.2) Model architecture setting: The self-attention mechanism uses multiple attention heads to process in parallel. Each attention head focuses on different feature dependencies. The outputs of the multiple heads are integrated through connection operations. The temporal features and cross-parameter correlations are extracted through two layers of serialized multi-head self-attention modules. 2.3) Model hyperparameter settings: The model dimension is set to 512, the number of model layers is 2, the random dropout rate of model neurons is 0.1, and the model learning rate is 0.0001; 2.4) Optimizer Selection: The Adam optimizer is used for parameter updates; the mean squared error is used as the loss function, as shown in the following formula: Among them, y i This represents the actual daily production value of shale oil. denoted as the daily shale oil production value predicted by the model, and n as the sample size.
5. The method according to claim 1, characterized in that, Step 3) involves constructing a traditional time-series prediction model, the Long Short-Term Memory (LSTM) neural network model, including: 3.1) The overall model architecture adopts a hierarchical chain structure, consisting of an input layer, an LSTM hidden layer, and an output layer connected in sequence; 3.2) Hidden layer structure parameter configuration: Set 2 LSTM hidden layers, each containing 128 neurons. Set a Dropout layer between the hidden layer and the output layer with a dropout rate of 0.1 to suppress overfitting; 3.3) Layer connection method: The input layer and the first LSTM hidden layer are linearly mapped through a weight matrix, with the mapping dimension being the number of input features × 128; the connection dimension between the first LSTM hidden layer and the second LSTM hidden layer remains 128×128; the second LSTM hidden layer and the output layer are dimensionally compressed through a 128×1 weight matrix to obtain the final output prediction value.
6. The method according to claim 1, characterized in that, Step 4) involves processing the input model data using the sliding window technique, followed by training the constructed shale oil daily production time series prediction model. This specifically includes: 4.1) The sliding window technique is used to process time series datasets, with continuous historical data segments as input and corresponding future daily oil production as output. Input model data is generated by sliding the window along the time axis. 4.2) The Bayesian optimization algorithm is used to fine-tune the model hyperparameters learning rate, Dropout probability, and number of attention heads. The optimal training parameters are determined by iteratively selecting the hyperparameter combination. 4.3) Based on the optimal training parameters determined in 4.2), train the shale oil daily production time series prediction model, and update the model parameters through backpropagation until the model converges.
7. The method according to claim 1, characterized in that, In step 5), the model test results are used to perform model evaluation calculations, and the model evaluation index calculation results include: obtaining the time-series prediction and comparison of shale oil daily production on the test set, comparing the predicted and actual production values with those predicted by the experimental model, and using three complementary evaluation indicators with the coefficient of determination R. 2 The mean absolute error (MAE) and mean relative error (MRE) are used to evaluate and calculate the predicted and actual daily shale oil production values.
Citation Information
Patent Citations
Method for rapidly predicting oil-gas-water yield of shale oil well based on improved LSTM (Long Short Term Memory) model
CN117808145A
Method and system for predicting shale oil yield based on CNN-LSTM model
CN117851928A