Oil production or CO2 storage prediction method based on discrete wavelet transform and neural network
The Bi-LSTM and LSTM joint neural network model optimized by discrete wavelet transform and genetic algorithm solves the complexity and prediction error problems of oilfield production time series data processing, and achieves efficient and accurate prediction of oil production and CO2 storage.
Patent Information
- Application Number
- CN202211539490.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-12-02
AI Technical Summary
Traditional time series analysis methods have problems in processing oilfield production time series data, such as complex operations, long time consumption, and inability to make real-time dynamic predictions. Shallow LSTM cannot fully grasp the characteristics of oilfield production time series data, and direct use leads to large prediction errors. Bi-LSTM has low accuracy when processing positive relationships. The complexity of oilfield production time series data leads to large errors in direct training and prediction.
Discrete wavelet transform is used to perform cold decomposition of data, and a Bi-LSTM and LSTM joint neural network model is constructed. The genetic algorithm is used to optimize the model. Lagrange linear interpolation and Min-Max normalization are combined to process oilfield production time series data. Features are screened through Spearman correlation analysis, and a hybrid neural network is constructed for prediction.
It improves the prediction accuracy and efficiency of oilfield production time series data, can extract characteristic information of a large amount of production data in a short time, and provide a reliable basis for oilfield enterprise decision-making.
Smart Images

Figure CN116307034B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of oilfield production prediction, and in particular relates to a method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network. Background Art
[0002] Carbon sequestration is a long-term solution to CO2 emissions. Oil reservoirs are ideal places for CO2 geological storage. CO2 can be injected into oil reservoirs as an oil displacement agent to increase crude oil recovery.
[0003] Oilfield production time series data is characterized by nonlinearity, large data volumes, diverse data types, strong coupling, lack of integrity, and weak stability. Accurately understanding oilfield production dynamics can promptly identify problems during reservoir development, analyze their causes, and resolve conflicts during development. This allows for better understanding and transformation of reservoirs, maintaining high and stable oilfield production, and improving recovery rates.
[0004] Traditional time series analysis methods have many drawbacks. In the process of establishing a numerical reservoir model, a large amount of basic data input is required, the operation is complex and time-consuming, and real-time dynamic prediction cannot be performed during the model operation; based on the integrated moving average autoregressive model (ARIMA), it has poor learning effect on nonlinear time series data, cannot fully analyze and utilize oilfield production time series data, and is no longer applicable.
[0005] Deep learning models have demonstrated excellent performance in processing oilfield production time series data. Long short-term memory (LSTM) neural networks are a typical deep learning method that avoids the vanishing and exploding gradient issues of RNNs, enabling the application of backpropagation algorithms. Successful applications in speech recognition, human trajectory prediction, and traffic forecasting demonstrate their superior performance in processing time series data.
[0006] However, shallow LSTMs cannot fully grasp the characteristic information of oilfield production time series data and cannot fully utilize its advantages. Directly using them for analysis and prediction results in large errors. Furthermore, because time series data is input in chronological order and propagates forward along a chain-like structure, LSTMs can only learn forward relationships in the data, ignoring valuable backward relationships. This inability to fully capture the characteristic information in both the forward and reverse directions of the time series data leads to reduced prediction accuracy.
[0007] Bidirectional long short-term memory (Bi-LSTM) neural networks can extract valuable forward and reverse features from time series data and are capable of comprehensively capturing data features when processing time series data. However, their accuracy is lower than that of LSTM when processing the positive relationships of the extracted data features. Therefore, the Bi-LSTM and LSTM are combined, with the Bi-LSTM responsible for comprehensively extracting feature relationships from the data and the LSTM for processing the extracted feature relationships. This combination of the strengths of each neural network significantly improves prediction accuracy.
[0008] At the same time, due to the complex characteristics of oilfield production time series data, direct use of it for training and prediction will result in large errors. Therefore, it is necessary to perform specific processing on the oilfield production time series data to reduce its complexity and thus improve the accuracy of the prediction.
[0009] Model parameter tuning is crucial to the performance of neural networks and is also the most time-consuming. The grid search method has high computational cost, and the trial-and-error method has unstable computational efficiency. Using genetic algorithms to optimize neural network model hyperparameters can achieve optimal model parameters without traversal search. Summary of the Invention
[0010] In order to solve the above problems, the present invention proposes a method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network. Discrete wavelet transform is used to perform cold decomposition of data. At the same time, a neural network model using Bi-LSTM and LSTM is constructed. Genetic algorithm is then used to optimize the model. Finally, the optimized model is used to predict oil production or CO2 storage.
[0011] The technical solutions of the present invention are as follows:
[0012] A method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network includes the following steps:
[0013] Step 1: Based on the basic production data of a certain oil reservoir block, perform iterative calculations through an oil reservoir numerical simulator to obtain oil field production time series data;
[0014] Step 2: Use Lagrange linear interpolation method and Min-Max normalization method to preprocess the oilfield production time series data;
[0015] Step 3: Based on the oilfield production time series data preprocessed in step 2, Spearman correlation analysis is used to select data with strong correlation with the label time series data as input features;
[0016] Step 4: Use discrete wavelet transform (DWT) to decompose the monthly oil production and monthly CO2 storage of the time series label data;
[0017] Step 5: Divide the data set, with the first 80% as the training set to select the best neural network model; and 20% of the data as the validation set to test the prediction accuracy of the model;
[0018] Step 6: Construct a hybrid neural network Γ that integrates Bi-LSTM and LSTM. Use Bi-LSTM to learn the positive and negative features of the input oilfield production time series data and label data to capture the nonlinear feature relationship of the data. Based on the feature information captured by Bi-LSTM, use LSTM to predict the monthly oil production or monthly CO2 storage in the forward direction along time.
[0019] Step 7: Training includes discrete wavelet transform DWT and Bi-LSTM neural network Φ (j) , LSTM neural network Φ* (j) , the overall neural network model of inverse wavelet transform InverseWT;
[0020] Step 8: Test the optimized neural network model and output the optimized neural network model with good performance after testing.
[0021] Step 9: Monitor the oilfield production in real time, input the real-time oilfield production time series data into the optimized neural network model, and then obtain the predicted value of monthly oil production or monthly CO2 storage.
[0022] Furthermore, the specific process of step 1 is as follows:
[0023] Step 1.1: Based on the basic production data of a certain oil reservoir block, analyze the reservoir structure, formation, reservoir, and fluid characteristics; establish a geological model, and optimize the geological model through reserve fitting and parameter adjustment;
[0024] Step 1.2: Import the geological model into the reservoir numerical simulator to establish a reservoir numerical model, perform history fitting based on the oil test and production test data, and optimize the reservoir numerical model;
[0025] Step 1.3: Based on the characteristics of the block, design a reasonable reservoir development method, divide the development layers, and deploy the well pattern;
[0026] Step 1.4: Perform numerical simulation calculations based on this reservoir development plan to obtain oilfield production time series data for training and testing the deep neural network model.
[0027] Furthermore, the specific process of step 2 is as follows:
[0028] Step 2.1. Use Lagrange linear interpolation to fill in the missing data points based on the values of the known data points, and assign weights based on the distances between the unknown points and the adjacent points in the data sequence. Assuming that (x1, y1), (x2, y2), and (x3, y3) are known, the value of y at the interpolated point x in the interval [x1, x3] is required. The Lagrange basic polynomial is:
[0029]
[0030] Applying the Lagrange interpolation method, we get the interpolation function expression P(x),
[0031] P(x)=y1k1(x)+y2k2(x)+y3k3(x) (2)
[0032] have to:
[0033] y=P(x) (3)
[0034] Then, by interpolating the data point x as needed, the value y of the data point can be obtained; where k i (i=1,2,3) represents the Lagrangian interpolation basis function, P represents the Lagrangian interpolation function;
[0035] Step 2.2: Perform Min-Max normalization on the oilfield production time series data to make the data fall into a specific interval, remove the data dimension restriction, and convert it into pure numerical values;
[0036] Min-Max normalization is to perform a linear transformation on the original data and map the values to [0,1]. h , perform the transformation:
[0037]
[0038] Where: y i ,i∈[1,h] represents the normalization result of the original oilfield production time series data, j∈[1,h] represents the sequence number of the time series data length, and h represents the time series data length;
[0039] z i =y i (max-min)+min,i∈[1,h] (5)
[0040] Where: z i ,i∈[1,h] represents the normalized result after the original data is normalized; max represents the maximum value of the interval to be mapped, the default is 1; min represents the minimum value of the interval to be mapped, the default is 0;
[0041] Finally, the normalized oil field production time series data is obtained:
[0042] z1, z2, ..., z h (6)
[0043] Where: h represents the number of groups of oilfield production time series data; z h Represents normalized data; the numerical range of the new series is in the interval [0, 1] and is dimensionless data.
[0044] Furthermore, in step 3,
[0045] The calculation formula of Spearman rank correlation coefficient ρ is:
[0046]
[0047] in, is the rank difference, x h and y h is the production time series data of the two oil fields after preprocessing; h represents the length of the time series data; l is the sample size.
[0048] Furthermore, in step 4,
[0049] DWT decomposes the label time series data, discretizes the scale and translation of the basic wavelet, decomposes the label time series data into high-frequency and low-frequency parts, and trains and predicts each part separately;
[0050] The working process of discrete wavelet transform DWT is as follows: use filters of different frequencies to analyze signals of different frequencies; input a discrete signal, filter out the low-frequency part of the signal through a high-pass filter, and output the high-frequency part of the signal; the high-frequency part is input into the downsampler to obtain the first layer of wavelet transform coefficients; the low-frequency part enters the next cycle to filter out the low-frequency and high-frequency signals again, repeat the operation, and obtain n layers of wavelet transform coefficients, where the coefficient expression is:
[0051]
[0052] Where: a represents the low-frequency wavelet signal, d represents the high-frequency wavelet signal, f(t) represents the original series, φ represents the mother wave, T represents the length of the original series; t represents the discrete time index;
[0053] The specific wavelet transform method used by discrete wavelet transform DWT is Haar wavelet transform. Haar wavelet transform consists of two functions: Haar scale function μ and Haar wavelet function y. The scale function and wavelet function have an orthogonal relationship. Haar wavelet transform decomposition is to decompose the scale function μ into q The numerical value expressed is projected onto the next level scaling function μ q-1 and wavelet function v q-1 process;
[0054]
[0055]
[0056]
[0057]
[0058] Where: p represents the data decomposed by Haar wavelet transform; q represents the wavelet decomposition level; r represents the distance of wavelet translation;
[0059] Inverse wavelet transform InverseWT is to reconstruct the decomposed wavelet component signal by wavelet, and reconstruct the signal by wavelet according to the low-frequency coefficient aq of the qth layer and the high-frequency coefficients d1, d2, ..., dq of the 1st to qth layers of the wavelet decomposition to obtain the original data p.
[0060] p=InverseWT(aq;d1,d2,...,dq) (13)
[0061] The two label time series data are decomposed into three levels of wavelet in the wavelet domain using Haar discrete wavelet transform, and three high-frequency signals d1, d2, d3 and one low-frequency a3 with different periodicity and trend are obtained.
[0062] Furthermore, in step 6,
[0063] The hybrid neural network Γ includes an input layer, a Bi-LSTM dual-structure layer, a Dropout layer, an LSTM structure layer, a Dense layer, and an output layer. The Bi-LSTM dual-structure layer contains two layers of Bi-LSTM structures, which learn the input data and capture the feature information in the data. During the forward propagation process, the Dropout layer deletes some feature data. The LSTM structure layer makes predictions based on the captured data feature information. The Dense layer integrates the LSTM predictions and outputs the predicted values.
[0064] The LSTM structure layer is an LSTM neural network. The LSTM neural network contains a forget gate, an input gate, and an output gate. The mathematical formula for the operation in the LSTM memory unit is:
[0065] i g =sigm(i t W ix +O t-1 W im +b i ) (10)
[0066] f g =sigm(i t W fx+O t-1 W fm +b f ) (11)
[0067] O g =sigm(i t W ox +O t-1 W om +b o ) (12)
[0068] u=relu(i t W ux +O t-1 W um +b u ) (13)
[0069] x t =f g *x t-1 +i g *u (14)
[0070] O t =O g *relu(u) (15)
[0071] Where, O g represents the output gate; i g represents the input gate; f g represents the forget gate; x t represents the state at time step t; u represents the updated neuron state; O t Represents unit output; sigm(·) represents the activation function Sigmoid, a represents data to be activated; i t represents the input data at time t; W ix Represents the input gate input data weight; O t-1 Indicates the output data at time t-1; W im represents the input gate output data weight, b i represents the input gate bias term; W fx Represents the input data weight of the forget gate; W fm represents the output data weight of the forget gate; b f Represents the forget gate bias; W Ox Represents the input data weight of the output gate; W om Represents the output data weight of the output gate; b O Represents the output gate bias term; W ux W represents the weight of the input data for updating the neuron state; um Represents the output data weight of updating the neuron state; b uRepresents the bias term for updating the neuron state; relu(·) represents the ReLU activation function;
[0072] The Bi-LSTM double structure layer is a two-layer Bi-LSTM neural network. The Bi-LSTM neural network mechanism is a combination of forward LSTM and reverse LSTM′. The forward LSTM processes the forward time series (t0-t n ) data, reverse LSTM′ processes the reverse time series (t n -t0) data; the outputs of the two LSTMs in different directions are merged into the output of the Bi-LSTM neural network by (16);
[0073]
[0074] Where: G represents the function that combines the forward and reverse outputs; represents the forward unit output; Indicates the reverse unit output; X t Represents the input time series data; Y t Represents the new output after processing by function G;
[0075] The hybrid neural network Γ receives the high-frequency and low-frequency data components DWT(y′) after Haar discrete wavelet transform decomposition. (j) And the strong correlation influencing factor X is first passed into the Bi-LSTM layer φ (j) Learning nonlinear feature relationships Y (j) :
[0076] Y (j) =φ (j) (X, DWT(y′) (j) , M j ) (17)
[0077] Where: j = [1, 2, 3, 4], corresponding to the label data components [d1, d2, d3, a3]; DWT (y')(j) represents the component data [d1; d2; d3; a3] after the label data y' is decomposed; M j Indicates the number of neurons in the Bi-LSTM layer of each data component;
[0078] The Dropout layer randomly stops some neurons from working with probability P to alleviate the overfitting problem of the model:
[0079] P(M j , N j ) (18)
[0080] Where: M j 、N jThe number of neurons in the Bi-LSTM and LSTM layers corresponding to each data component;
[0081] LSTM layer φ *(j) According to the feature Y learned by Bi-LSTM (j) Forward prediction along time, the Dense layer integrates the feature output and outputs the predicted value Y of each data component *(j) :
[0082] Y *(j) =φ *(j) (Y (j) ; N j ) (19)
[0083] During the model feature learning process, the Bi-LSTM layer comprehensively and effectively captures the information embedded in the oilfield production time series data, and learns the nonlinear mapping relationship between monthly CO2 storage, monthly oil production, and the selected input time series data.
[0084] Furthermore, in step 7,
[0085] Inverse wavelet transform (InverseWT) is used to reconstruct the three high-frequency components d1, d2, and d3 and one low-frequency component a3 of the predicted monthly oil production or monthly CO2 storage, thereby restoring them to the values in the label data unit.
[0086] The model training process is as follows: first, the input data X and y are processed to complete the data set construction, and then input into the hybrid neural network Γ. Then, it is optimized and trained based on the genetic algorithm, and the optimized model structure hyperparameters are output. The optimal model is used to predict the label data components. The predicted label data components are restored to the values in the original label data units through inverse wavelet transform to complete the prediction.
[0087] Based on the data set and genetic algorithm, the hybrid neural network Γ is optimized, the population and gene parameters are initialized, and evolutionary iterative calculations are performed to optimize the model hyperparameters, including: the number of neurons in the Bi-LSTM layer M, the number of neurons in the LSTM layer N, the data batch size BS, the number of model training Epochs, and the model learning rate lr. A total of five parameters are selected, and the optimal model is finally output. The training optimization process is as follows:
[0088] Input the hybrid neural network Γ to be optimized, perform binary one-hot encoding on the parameters to be optimized, initialize the population size, gene length, and number of evolutionary iterations; calculate the fitness function to minimize the RMSE between the predicted value and the true value; use the binary tournament population individual selection method to screen excellent individuals; use two-point crossover and random mutation to ensure the diversity and effectiveness of the population, and finally output the hyperparameters of the optimal model structure; specifically:
[0089] Genetic algorithms map the phenotypes of all individuals in a population to numerical values and use randomization techniques to efficiently search an encoded parameter space. After initializing the population, they follow the principles of survival of the fittest to obtain the optimal solution. The genetic operations of genetic algorithms are selection, crossover, and mutation. The core content of genetic algorithms includes five factors: feature encoding, setting the initial population size, designing the fitness function, designing genetic crossover and mutation, and setting basic control parameters.
[0090] Step 7.1. Chromosome Coding Design: Use binary coding to design the coding for individual chromosomes. By using the BitArray function, convert the parameters to be optimized into binary type. If an individual chromosome is selected, it is encoded as 1; otherwise, it is encoded as 0. That is, each individual chromosome is represented as a binary 0 / 1 digital string after binary coding.
[0091] Step 7.2, fitness function design: I. First, decode the coding sequence of each individual chromosome to obtain the individual's characteristic phenotype; II. Calculate the objective function value of the corresponding individual based on the individual characteristic phenotype; III. Based on the objective function value, calculate the individual's fitness according to the optimization problem type and transformation rule;
[0092] Call the FitnessMin fitness function in the Fitness class and initialize the weights attribute value of all parts to (-1.0); minimize the fitness value of the single-objective solution, that is, minimize the root mean square error RMSE between the predicted value and the true value:
[0093] F=Γ(X,y;BS,Epoch,lr;M,N) (20)
[0094] Minimize:RMSE(F,T)(21)
[0095] Where Γ represents the hybrid neural network to be optimized; X, y represent the input data and label data; the decision variables of the neural network model structure include the data batch size BS, the number of model training Epochs, and the model learning rate lr; M, N represent the number of neurons in the Bi-LSTM layer and LSTM layer of the neural network model respectively; F represents the predicted data; T represents the real data;
[0096] Step 7.3, Individual Selection Design: Select excellent individuals from the population and eliminate inferior individuals. The selection operation is based on the fitness evaluation of individuals in the population. Excellent individuals are directly passed on to the next generation or new individuals are generated through pairing and crossover and then passed on to the next generation.
[0097] Step 7.4, Individual Crossover Design: The two parent individuals exchange some of their genes at the crossover rate Pc to produce new individuals and maintain population diversity. Parent1 and Parent2 are the two parent individuals, and Offspring1 and Offspring2 are the offspring individuals obtained after the two-point crossover operation. The operation process is as follows:
[0098]
[0099]
[0100] offspring1 1 0 0 1 0 0 0 1 (24)
[0101] offspring2 0 1 0 1 1 1 1 1 (25)
[0102] Step 7.5, Individual variation design: The gene values at certain loci in the individual chromosome coding string are replaced with the remaining alleles at the loci to form a new individual; set the mutation probability parameter P m Whether an individual mutates depends on the mutation probability parameter P m The size of the new individual formed after the crossover operation will generate a corresponding random number rand between [0, 1]. If rand < P m , then perform mutation operation.
[0103] Furthermore, in step 8, the monthly oil production or monthly CO2 storage is predicted, and the label data is decomposed into low-frequency and high-frequency components through discrete wavelet transform. Models are trained separately according to different label data components to obtain their respective optimized prediction models.
[0104] The beneficial technical effects brought about by the present invention are:
[0105] The present invention proposes a prediction method based on Bi-LSTM and LSTM combined with discrete wavelet transform and genetic algorithm. This method has a stronger ability to capture oilfield production patterns and time series data characteristics. It is a new method for predicting oilfield production parameters and can be applied to automated production prediction in the petroleum industry. It can extract valuable feature information from large amounts of production data in a short period of time, has high prediction accuracy, and can provide a reliable basis for decision-making in oilfield enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0106] Figure 1 This is a flow chart of the oil production or CO2 storage prediction method based on discrete wavelet transform and neural network of the present invention;
[0107] Figure 2It is a schematic diagram of the structure of discrete wavelet transform in the present invention;
[0108] Figure 3 This is a process diagram of using DWT to decompose label data in the present invention;
[0109] Figure 4 It is a 3-level discrete wavelet transform diagram of some monthly oil production data in the present invention;
[0110] Figure 5 yes Figure 4 Boxplots of true values and wavelet components d1, d2, d3, and a3;
[0111] Figure 6 Schematic diagram of the structure of the hybrid neural network Γ in the present invention;
[0112] Figure 7 yes Figure 6 The structural diagram of the LSTM part;
[0113] Figure 8 yes Figure 6 The structure diagram of the Bi-LSTM part;
[0114] Figure 9 It is the overall architecture diagram of the neural network model in the present invention;
[0115] Figure 10 This is a comparison result diagram of the predicted monthly oil production and the actual value in the present invention;
[0116] Figure 11 It is a linear fitting diagram of the predicted monthly CO2 storage volume and the actual value in the present invention. DETAILED DESCRIPTION
[0117] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0118] like Figure 1 As shown, a method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network includes the following steps:
[0119] Step 1: Based on the basic production data of a certain oil reservoir block, perform iterative calculations through the reservoir numerical simulator to obtain the oil field production time series data. The specific process is as follows:
[0120] Step 1.1: Based on the basic production data of a certain oil reservoir block, analyze the reservoir structure, formation, reservoir, and fluid characteristics; establish a geological model, and optimize the geological model through reserve fitting and parameter adjustment;
[0121] Step 1.2: Import the geological model into the reservoir numerical simulator to establish a reservoir numerical model, perform history fitting based on the oil test and production test data, and optimize the reservoir numerical model;
[0122] Step 1.3: Based on the characteristics of the block, design a reasonable reservoir development method, divide the development layers, and deploy the well pattern;
[0123] Step 1.4: Based on this reservoir development plan, numerical simulation calculation is performed to obtain the monthly gas production (m 3 / month), monthly water production (m 3 / month), cumulative liquid production (m 3 ), production gas-oil ratio under surface conditions (m 3 / m 3 ), liquid production rate (m 3 / month), cumulative liquid production (m 3 ), monthly oil production (m 3 / month), monthly CO2 storage capacity (mol / month), and a total of 8 sets of 39-year oilfield production time series data. Since the first and second years are depletion-type production processes and the third year is a well-sealed operation with no production, a total of 36 years of oilfield production time series data are provided for training and testing deep neural network models.
[0124] Step 2: Use Lagrange linear interpolation method and Min-Max normalization method to preprocess the oilfield production time series data.
[0125] Step 2.1: During oilfield production, some production data may be lost due to various uncontrollable factors. Lagrange linear interpolation is used to fill in the missing data points based on the values of known data points, and the weight is allocated based on the distance from the unknown point to the adjacent points in the data sequence. Assuming that (x1, y1), (x2, y2), and (x3, y3) are known, the value of y at the interpolated point x in the interval [x1, x3] is required. The Lagrange basic polynomial is:
[0126]
[0127] Applying the Lagrange interpolation method, we get the interpolation function expression P(x),
[0128] P(x)=y1k1(x)+y2k2(x)+y3k3(x) (2)
[0129] have to:
[0130] y=P(x) (3)
[0131] Then, by interpolating the data point x as needed, the value y of the data point can be obtained; where k i (i=1,2,3) represents the Lagrangian interpolation basis function, P represents the Lagrangian interpolation function;
[0132] Step 2.2: Oilfield production time series data has different dimensions and orders of magnitude. Using the raw data directly will emphasize higher values during analysis. To ensure the reliability of the model learning results, the oilfield production time series data undergoes Min-Max normalization, which forces the data to fall within a specific range. This removes the data dimension restrictions and converts it into pure numerical values. This facilitates comparison and weighted averaging of data of different units or orders of magnitude, making data of different dimensions numerically comparable.
[0133] Min-Max normalization is to perform a linear transformation on the original data and map the values to [0,1]. h , perform the transformation:
[0134]
[0135] Where: y i ,i∈[1,h] represents the normalization result of the original oilfield production time series data, j∈[1,h] represents the sequence number of the time series data length, and h represents the time series data length;
[0136] z i =y i (max-min)+min,i∈[1,h] (5)
[0137] Where: z i ,i∈[1,h] represents the normalized result after the original data is standardized; max represents the maximum value of the interval to be mapped, the default is 1; min represents the minimum value of the interval to be mapped, the default is 0.
[0138] Finally, the normalized oil field production time series data is obtained:
[0139] z1,z2,...,z h (6)
[0140] Where: h = 8, representing 8 sets of oilfield production time series data; z h Represents normalized data; the numerical range of the new series is in the interval [0,1] and is dimensionless data.
[0141] Step 3: Based on the 8 sets of normalized oilfield production time series data after preprocessing in step 2, Spearman correlation analysis is used to screen out data with strong correlation with the label time series data as input features to improve training and prediction efficiency.
[0142] The Spearman rank correlation coefficient is used to determine the strength of the correlation between two oilfield production variables. Compared to the Pearson correlation coefficient, the Spearman rank correlation coefficient does not require the variables to follow a normal distribution. It determines the extent to which two variables can be described by a monotonic function. The Spearman rank correlation coefficient ranges between -1 and 1. The positive or negative value of the correlation coefficient represents the positive or negative correlation between the independent variable and the dependent variable. The formula for calculating the correlation coefficient ρ is:
[0143]
[0144] in, is the rank difference, x h and y h is the production time series data of the two oil fields after preprocessing; h represents the length of the time series data; l is the sample size.
[0145] The input time series data with strong correlation with the label time series data of monthly oil production and monthly CO2 storage are obtained: cumulative gas injection volume and production gas-oil ratio under surface conditions.
[0146] Step 4: Use discrete wavelet transform (DWT) to decompose the time series label data of monthly oil production and monthly CO2 storage.
[0147] Wavelet transform is divided into discrete wavelet transform (DWT) and continuous wavelet transform (CWT). CWT is a continuous scale transformation based on the mother wavelet, which will generate a large amount of redundant information, affecting the learning speed and accuracy of the neural network. Therefore, in order to reduce the redundancy of information, the present invention uses DWT to decompose the label time series data, discretizes the scale and translation of the basic wavelet, decomposes the label time series data into high-frequency and low-frequency parts, and trains and predicts each part separately, reducing the learning difficulty of the neural network, thereby improving the prediction accuracy of the neural network.
[0148] like Figure 2 As shown in the discrete wavelet transform diagram, y[n] is the discrete input signal; A[n] is a low-pass filter, whose main function is to filter the high-frequency part of the input signal and output the low-frequency part; D[n] is a high-pass filter, whose main function is to filter the low-frequency part and output the high-frequency part; ↓2 is a downsampling filter.
[0149] The working principle of the discrete wavelet transform (DWT) is to use filters of different frequencies (high-pass filter and low-pass filter) to analyze signals of different frequencies. A discrete signal y[n] is input, and the low-frequency portion A[n] of the signal is filtered out through a high-pass filter, and the high-frequency portion D[n] of the signal is output. The high-frequency portion is input into the downsampler to obtain the first layer of wavelet transform coefficients; the low-frequency portion enters the next cycle to filter out the low-frequency and high-frequency signals again. The operation is repeated to obtain the n-layer wavelet transform coefficients, where the coefficient expression is:
[0150]
[0151] Where a represents the low-frequency wavelet signal, d represents the high-frequency wavelet signal, represents the original series, represents the mother wavelet, T represents the length of the original series, and t represents the discrete time index.
[0152] The wavelet transform method specifically used in the discrete wavelet transform DWT of the present invention is Haar wavelet transform; Haar wavelet transform consists of two functions: Haar scale function μ and Haar wavelet function ν, the scale function and the wavelet function have an orthogonal relationship, and the Haar wavelet transform decomposition is to decompose the scale function μ into q The numerical value expressed is projected onto the next level scaling function μ q-1 and the wavelet function ν q-1 process.
[0153]
[0154]
[0155]
[0156]
[0157] Where: p represents the data to be decomposed by Haar wavelet transform; q represents the wavelet decomposition level; r represents the distance of wavelet translation.
[0158] Inverse wavelet transform (InverseWT) is to perform wavelet reconstruction on the decomposed wavelet component signal. According to the low-frequency coefficient aq of the qth layer and the high-frequency coefficients d1, d2, ..., dq of the 1st to qth layers of the wavelet decomposition, the signal is reconstructed by wavelet to obtain the original data p.
[0159] p=InverseWT(aq;d1,d2,...,dq) (13)
[0160] like Figure 3As shown in FIG, the monthly oil production or monthly CO2 storage of the label time series data is decomposed into low-frequency wavelet components and high-frequency wavelet components in sequence. The present invention uses Haar discrete wavelet transform to perform three-level wavelet decomposition on the two label time series data in the wavelet domain, and obtains three high-frequency (d1, d2, d3) and one low-frequency (a3) signals with different periodicity and trend. Figure 4 As shown in the figure, a three-level Haar discrete wavelet transform diagram of some monthly oil production data is shown. It can be seen from the figure that the fluctuation of the real value of monthly oil production is large, and the fluctuation of the high-frequency signals d1, d2, d3 and the low-frequency signal a3 after decomposition is reduced and shows a gradually decreasing trend. Figure 5 As can be seen from the box plot, the variation range of the component signal is gradually decreasing, the fluctuation of the data is gradually decreasing, and after the low-frequency signal a2 is decomposed to obtain d3 and a3, the mean and median values of the d3 and a3 components are approximately equal, indicating that the three-level Haar discrete wavelet transform can completely decompose the monthly oil production time series data, thereby reducing the learning difficulty of the neural network model and improving its prediction performance.
[0161] Step 5: Divide the data set. After the data preprocessing in step 2 and the input time series data screening in step 3, the 8 groups of 36-year oil field production data are obtained. Two groups of 36-year normalized input time series data with strong correlation with the label time series data are obtained. After discrete wavelet transform, the two groups of 36-year label time series data are obtained to obtain 8 groups of decomposed label time series data with different frequencies, which constitute the deep learning data set. The first 80% of the data is used as the training set to select the best neural network model; 20% of the data is used as the validation set to test the prediction accuracy of the model.
[0162] Step 6. Construct a hybrid neural network Γ that integrates Bi-LSTM and LSTM. Use Bi-LSTM to learn the positive and negative features of the input oilfield production time series data and label data to capture the nonlinear feature relationship of the data. Use LSTM to predict the monthly oil production or monthly CO2 storage along the time direction based on the feature information captured by Bi-LSTM.
[0163] The structure of the hybrid neural network Γ is as follows Figure 6As shown, it includes an input layer, a Bi-LSTM dual-structure layer, a Dropout layer, an LSTM structure layer, a Dense layer, and an output layer. The Bi-LSTM dual-structure layer contains two layers of Bi-LSTM neural networks, which learn the input data and capture the feature information in the data. As the number of neural network layers increases, the model has an overfitting problem. The Dropout layer is introduced into the model to solve the overfitting problem. During the forward propagation process, the Dropout layer stops the activation value of a certain neuron with a certain probability P, thereby deleting some feature data, reducing the model's dependence on certain local features and enhancing the model's generalization ability. The LSTM layer makes predictions based on the captured data feature information. Finally, the Dense layer integrates the LSTM predictions and outputs the predicted values. The LSTM and Bi-LSTM neural network structures are shown in the figure. Figure 7 、 Figure 8 shown.
[0164] An LSTM neural network consists of a forget gate, an input gate (memory gate), and an output gate. The forget gate is responsible for "forgetting information" and determines the state of a neuron. When the neuron is set to off, unnecessary information is filtered out and discarded. The input gate, also known as the memory gate, determines whether to retain information passed through the forget gate, thereby determining the state of the neuron in which the input information is stored. The output gate determines the output value based on the neuron's state.
[0165] LSTM extends the memory unit of the RNN recurrent neural network, avoiding the vanishing and exploding gradient problems. It can learn long-term dependent time series data while ensuring continuity. This extended memory unit retains information for a long time and can read, write, and delete this information. These operations are performed by the output gate, input gate, and forget gate, respectively. The input gate uses an activation function to determine whether to modify the memory state with updated data. The activation function acts as a switch, comparing the previous output with the current input. If the input value is close to 0, the memory state is not affected by the updated data. Otherwise, the updated data will modify the memory state. Based on the characteristics of the oilfield production time series data captured by the Bi-LSTM layer, the LSTM performs predictions in the forward direction of time.
[0166] The mathematical formula for the operation in the LSTM memory unit is:
[0167] i g =sigm(i t W ix +O t-1 W im +b i ) (10)
[0168] f g =sigm(it W fx +O t-1 W fm +b f ) (11)
[0169] O g =sigm(i t W Ox +O t-1 W om +b o ) (12)
[0170] u=relu(i t W ux +O t-1 W um +b u ) (13)
[0171] x t =f g *x t-1 +i g *u (14)
[0172] O t =O g *relu(u) (15)
[0173] Where, O g represents the output gate; i g represents the input gate (memory gate); f g represents the forget gate; x t represents the state at time step t; u represents the updated neuron state; O t Represents unit output; sigm(·) represents the activation function Sigmoid, a represents data to be activated; i t represents the input data at time t; W ix Represents the input gate input data weight; O t-1 Indicates the output data at time t-1; W im represents the input gate output data weight, b i represents the input gate bias term; W fx Represents the input data weight of the forget gate; W fm represents the output data weight of the forget gate; b f Represents the forget gate bias; W ox Represents the input data weight of the output gate; W om Represents the output data weight of the output gate; b O Represents the output gate bias term; W ux W represents the weight of the input data for updating the neuron state; umRepresents the output data weight of updating the neuron state; b u Represents the bias term for updating the neuron state; relu(·) represents the ReLU activation function.
[0174] The Bi-LSTM neural network mechanism is a combination of forward LSTM and reverse LSTM′. The forward LSTM processes the forward time series (t0-t n ) data, reverse LSTM′ processes the reverse time series (t n -t0) data. The outputs of the two LSTMs in different directions are merged into the output of the Bi-LSTM neural network by (16).
[0175]
[0176] Where: G represents the function that combines the forward and reverse outputs; represents the forward unit output; Indicates the reverse unit output; X t Represents the input time series data; Y t Represents the new output after being processed by function G.
[0177] The hybrid neural network Γ receives the high-frequency and low-frequency data components (DWT(y′)) decomposed by Haar discrete wavelet transform DWT. (j) And the strong correlation influencing factor X is first passed into the Bi-LSTM layer φ (j) Learning nonlinear feature relationships Y (j) :
[0178] Y (j) =φ (j) (X, (DWT(y′) (j) , M j ) (17)
[0179] Where: j = [1, 2, 3, 4], corresponding to the label data components [d1, d2, d3, a3]; DWT (y′) (j) Represents the component data [d1; d2; d3; a3] after the label data y′ is decomposed; M j Indicates the number of neurons in the Bi-LSTM layer for each data component.
[0180] The Dropout layer randomly stops some neurons from working with a certain probability P to alleviate the overfitting problem of the model:
[0181] P(M j , N j ) (18)
[0182] Where: M j 、N jThe number of neurons in the Bi-LSTM and LSTM layers corresponding to each data component.
[0183] LSTM layer φ *(j) According to the feature Y learned by Bi-LSTM (j) Forward prediction along time, the Dense layer integrates the feature output and outputs the predicted value Y of each data component *(j) :
[0184] Y *(j) =φ *(j) (Y (j) ; N j ) (19)
[0185] During the model feature learning process, the Bi-LSTM layer comprehensively and effectively captures the information embedded in the oilfield production time series data, and learns the nonlinear mapping relationship between monthly oil production or monthly CO2 storage and the selected input time series data; the Dropout layer P is set to 0.2 to reduce the model's dependence on certain local features, thereby enhancing the model's generalization: an LSTM layer is added to the top of the neural network to predict along the forward direction of time based on the feature information learned by the Bi-LSTM layer; a Dense layer is added to the topmost layer of the neural network model to integrate the features predicted by the LSTM and output the predicted values.
[0186] Step 7: Train the neural network model:
[0187] The model of the present invention can predict monthly oil production or monthly CO2 storage. First, the label data is decomposed into low-frequency and high-frequency components through discrete wavelet transform. The models are trained separately according to different label data components to obtain the most optimized prediction models.
[0188] The overall architecture of the constructed neural network model is as follows Figure 9 As shown, it consists of 4 submodules: discrete wavelet transform DWT, Bi-LSTM neural network Φ (j) , LSTM neural network Φ* (j) , inverse wavelet transform InverseWT.
[0189] Among them, the inverse wavelet transform InverseWT reconstructs the three high-frequency components d1, d2, d3 and one low-frequency component a3 of the predicted monthly oil production or monthly CO2 storage, thereby restoring it to the value under the label data unit.
[0190] Algorithm 1 is the pseudocode for the model training process. First, the input data X and y are processed to complete the data set construction. The data is then input into the hybrid neural network Γ. Optimization and training are performed based on the genetic algorithm. The optimized model structure hyperparameters are output. The optimal model is used to predict the label data components. The predicted label data components are restored to the values in the original label data units through the inverse wavelet transform to complete the prediction. Where: j = [1, 2, 3, 4], corresponding to the label data components [d1, d2, d3, a3]; DWT(y′) (j) Represents the component data [d1; d2; d3; a3] after the label data y′ is decomposed; M j 、N j , corresponding to the number of neurons in the Bi-LSTM and LSTM layers of each data component; Ψ represents the interpolation function, X′, y′ represent the completed input and label data; ζ represents the Max-Min normalization function, X″ represents the normalized input data; Y (j) Y represents the j-th label data component feature captured by Bi-LSTM; *(j) Represents the j-th label data component feature predicted by LSTM.
[0191]
[0192] The specific implementation method of the genetic algorithm optimization of neural network hyperparameters in step 2 of Algorithm 1 is as follows:
[0193] Based on the dataset and genetic algorithm, the hybrid neural network Γ is optimized, the population and gene parameters are initialized, and evolutionary iterative calculations are performed to optimize the model hyperparameters, including the number of neurons in the Bi-LSTM layer (M), the number of neurons in the LSTM layer (N), the data batch size (BS), the number of model training times (Epoch), and the model learning rate (lr), a total of five parameters, and the optimal model is finally output. The training optimization process is briefly described as follows:
[0194] The hybrid neural network Γ to be optimized is input, the parameters to be optimized are binary one-hot encoded, the population size is initialized to 80, the gene length is 42, and the number of evolutionary iterations is 40; the fitness function is calculated to minimize the RMSE between the predicted value and the true value; the binary tournament population individual selection method is used to screen excellent individuals; two-point crossover and random mutation are used to ensure the diversity and effectiveness of the population, and finally the hyperparameters of the optimal model structure are output.
[0195] The detailed process of training optimization is as follows:
[0196] Genetic algorithms map the phenotypes of all individuals in a population to numerical values, or codes, and use randomization techniques to efficiently search an encoded parameter space. After initializing the population, they follow the principles of survival of the fittest to find the optimal solution. The genetic operations of a genetic algorithm are selection, crossover, and mutation; the core elements of a genetic algorithm include feature encoding, setting the initial population size, designing the fitness function, designing genetic crossover and mutation, and setting basic control parameters.
[0197] Step 7.1. Chromosome Coding Design: Use binary coding to design the encoding for individual chromosomes. Use the BitArray function to convert the parameters to be optimized into binary data. For individual model hyperparameters (M, N, BS, Epoch, and lr), an individual chromosome refers to the value of a model hyperparameter within the optimization range. For example, the optimization range for the number of neurons N in the LSTM layer is N∈(0, 300), where each value is an individual chromosome. Selected individual chromosomes are encoded as 1, and otherwise encoded as 0. In other words, each individual chromosome, after binary coding, is represented as a binary 0 / 1 string, thereby increasing the model training iteration rate and saving time and cost.
[0198] Step 7.2, fitness function design: I. First, decode the chromosome coding sequence of each individual to obtain the phenotype of individual characteristics; II. Calculate the objective function value of the corresponding individual based on the individual characteristic phenotype; III. Based on the objective function value, obtain the individual fitness according to the optimization problem type and certain transformation rules.
[0199] Call the FitnessMin fitness function in the Fitness class and initialize the weights attribute value of all parts to (-1.0). Minimize the fitness value of the single-objective solution, that is, minimize the root mean square error (RMSE) between the predicted value and the true value:
[0200] F=Γ(X, y; BS, Epoch, lr; M, N) (20)
[0201] Minimize:RMSE(F, T) (21)
[0202] Where Γ represents the hybrid neural network to be optimized; X and y represent the input data and label data; the decision variables of the neural network model structure are the data batch size (BS), the number of model training times (Epoch), and the model learning rate (1r); M and N represent the number of neurons in the LSTM layer and Bi-LSTM layer of the neural network model; F represents the predicted data; and T represents the real data.
[0203] Step 7.3, individual selection design: select excellent individuals from the group and eliminate inferior individuals. The selection operation is based on the fitness evaluation of individuals in the group. The purpose of selection is to pass on excellent individuals directly to the next generation or to generate new individuals through pairing and crossover and then pass them on to the next generation.
[0204] Step 7.4, individual crossover design: The structure of the two parent individuals is based on a certain probability (crossover rate P c ) exchange some of their genes with each other to produce new individuals. This maintains the diversity of the population. parent1 and parent2 are two parent individuals, and offspring1 and offspring2 are the offspring individuals obtained after the two-point crossover operation. The operation process is as follows:
[0205]
[0206]
[0207] offspring1 1 0 0 1 0 0 0 1 (24)
[0208] offspring2 0 1 0 1 1 1 1 1 (25)
[0209] Step 7.5, Individual mutation design: The gene values at certain loci in the individual chromosome coding string are replaced with the remaining alleles at the loci to form a new individual. Set the mutation probability parameter P m =0.6, whether an individual mutates depends on the mutation probability P m The size of the new individual after the crossover operation will generate a corresponding random number rand between [0,1]. <P m , then perform mutation operation.
[0210] The optimization process of the genetic algorithm is shown in the pseudo code of Algorithm 2:
[0211]
[0212] α represents binary code; Ps represents the number of initialized populations; G l represents gene length; β represents individual selection; δ represents individual two-point crossover method; ω represents individual random mutation method; X, y are input and label data; () C Represents the optimal model hyperparameter results after individual selection; () I represents the model hyperparameters after individual crossover and individual mutation; M′, N′, BS′, Epoch′, and lr′ represent binary-coded model hyperparameters.
[0213] Step 8: Test the optimized neural network model and output the optimized neural network model with good performance after testing:
[0214] Step 8.1: Forecast monthly oil production. Decompose the labeled data into low-frequency and high-frequency components using discrete wavelet transform. Train models based on the different labeled data components to obtain the optimal prediction models. Table 1 shows the hyperparameter results of the genetic algorithm-optimized neural network model for predicting monthly oil production.
[0215] Table 1 Hyperparameters of the neural network model for predicting monthly oil production
[0216]
[0217] Based on the four optimized neural network models, the four wavelet components are predicted and the predicted monthly oil production data components a3, d3, d2 and d1 are restored using inverse wavelet transform. Figure 10 Table 2 shows the comparison results between the predicted value and the true value of monthly oil production. MSE represents the mean square error, MAE represents the mean absolute error, and RMSE represents the root mean square error.
[0218] Table 2 Error between predicted and actual monthly oil production
[0219]
[0220] As shown in Table 3, within 30 (monthly) time steps, the neural network has a good learning and capture ability for the fluctuation characteristics of the data within a small range, and can also better grasp the overall trend of the data, and the prediction error is within an acceptable range.
[0221] However, as the prediction time step increases, the predicted monthly oil production deviates from the actual value after 30 (monthly) time steps. This is caused by cumulative error. When using the LSTM neural network to predict future values, the output of the previous step is used as input data for the next step, which causes the error to accumulate over time. Therefore, when making predictions based on this neural network model, the time step size should be controlled within 30 to achieve the best prediction accuracy.
[0222] Table 3 Error after inverse wavelet transform
[0223]
[0224] Step 8.2: Predict the monthly CO2 storage capacity. Table 4 shows the hyperparameter results of the genetic algorithm-optimized neural network model for predicting monthly CO2 storage capacity. Figure 11This is the linear fit between the predicted and true monthly CO2 storage values. The closer the fitted line is to the reference line, the more accurate the prediction. The figure shows that within 30 time steps, the fitted line closely matches the reference line. After 30 time steps, the fitted line gradually deviates from the reference line, and the error increases. This conclusion is consistent with the monthly oil production prediction.
[0225] Table 4 Hyperparameters of the neural network model for predicting monthly CO2 storage
[0226]
[0227] Step 9: Monitor the oilfield production in real time, input the real-time oilfield production time series data into the model, and then obtain the predicted value of monthly oil production or monthly CO2 storage.
[0228] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the essential scope of the present invention should also fall within the scope of protection of the present invention.
Claims
1. A method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network, characterized in that: The steps include: Step 1: Based on the basic production data of a certain oil reservoir block, perform iterative calculations through an oil reservoir numerical simulator to obtain oil field production time series data; Step 2: Use Lagrange linear interpolation method and Min-Max normalization method to preprocess the oilfield production time series data; Step 3: Based on the oilfield production time series data preprocessed in step 2, Spearman correlation analysis is used to select data with strong correlation with the label time series data as input features; Step 4: Use discrete wavelet transform (DWT) to decompose the monthly oil production and monthly CO2 storage of the time series label data; Step 5: Divide the data set, with the first 80% as the training set to select the best neural network model; and 20% of the data as the validation set to test the prediction accuracy of the model; Step 6: Construct a hybrid neural network Γ that integrates Bi-LSTM and LSTM. Use Bi-LSTM to learn the positive and negative characteristics of the input oilfield production time series data and label data to capture the nonlinear characteristic relationship of the data. Based on the feature information captured by Bi-LSTM, LSTM is used to predict monthly oil production or monthly CO2 storage along time. Step 7: Training includes discrete wavelet transform DWT and Bi-LSTM neural network Φ (j) , LSTM neural network Φ *(j) , the overall neural network model of inverse wavelet transform InverseWT; Step 8: Test the optimized neural network model and output the optimized neural network model with good performance after testing. Step 9: Monitor the oilfield production in real time, input the real-time oilfield production time series data into the optimized neural network model, and then obtain the predicted value of monthly oil production or monthly CO2 storage.
2. The method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network according to claim 1, characterized in that: The specific process of step 1 is as follows: Step 1.1: Based on the basic production data of a certain oil reservoir block, analyze the reservoir structure, formation, reservoir, and fluid characteristics; establish a geological model, and optimize the geological model through reserve fitting and parameter adjustment; Step 1.2: Import the geological model into the reservoir numerical simulator to establish a reservoir numerical model, perform history fitting based on the oil test and production test data, and optimize the reservoir numerical model; Step 1.3: Based on the characteristics of the block, design a reasonable reservoir development method, divide the development layers, and deploy the well pattern; Step 1.4: Perform numerical simulation calculations based on this reservoir development plan to obtain oilfield production time series data for training and testing the neural network model.
3. The method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network according to claim 1, characterized in that: The specific process of step 2 is as follows: Step 2.
1. Use Lagrange linear interpolation to fill in the missing data points based on the values of the known data points, and assign weights based on the distances between the unknown points and the adjacent points in the data sequence. Assuming that (x1, y1), (x2, y2), and (x3, y3) are known, the value of y at the interpolated point x in the interval [x1, x3] is required. The Lagrange basic polynomial is: Applying the Lagrange interpolation method, we get the interpolation function expression P(x), P(x)=y1k1(x)+y2k2(x)+y3k3(x) (2) have to: y=P(x) (3) Then, by interpolating the data point x as needed, the value y of the data point can be obtained; where k i (i=1,2,3) represents the Lagrangian interpolation basis function, P represents the Lagrangian interpolation function; Step 2.2: Perform Min-Max normalization on the oilfield production time series data to make the data fall into a specific interval, remove the data dimension restriction, and convert it into pure numerical values; Min-Max normalization is to perform a linear transformation on the original data and map the values to [0,1]. h , perform the transformation: Where: y i ,i∈[1,h] represents the normalization result of the original oilfield production time series data, j∈[1,h] represents the sequence number of the time series data length, and h represents the time series data length; z i =y i (max-min)+min,i∈[1,h] (5) Where: z i ,i∈[1,h] represents the normalized result after the original data is normalized; max represents the maximum value of the interval to be mapped, and the default value is 1; min represents the minimum value of the interval to be mapped, the default is 0; Finally, the normalized oil field production time series data is obtained: z1,z2,...,z h (6) Where: h represents the number of groups of oilfield production time series data; z h Represents normalized data; the numerical range of the new series is in the interval [0,1] and is dimensionless data.
4. The method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network according to claim 1, characterized in that: In the step 3, The calculation formula of Spearman rank correlation coefficient ρ is: in, is the rank difference, x h and y h is the production time series data of the two oil fields after preprocessing; h represents the length of the time series data; l is the sample size.
5. The method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network according to claim 1, characterized in that: In the step 4, DWT decomposes the label time series data, discretizes the scale and translation of the basic wavelet, decomposes the label time series data into high-frequency and low-frequency parts, and trains and predicts each part separately; The working process of discrete wavelet transform DWT is as follows: use filters of different frequencies to analyze signals of different frequencies; input a discrete signal, filter out the low-frequency part of the signal through a high-pass filter, and output the high-frequency part of the signal; the high-frequency part is input into the downsampler to obtain the first layer of wavelet transform coefficients; the low-frequency part enters the next cycle to filter out the low-frequency and high-frequency signals again, repeat the operation, and obtain n layers of wavelet transform coefficients, where the coefficient expression is: Where: a represents the low-frequency wavelet signal, d represents the high-frequency wavelet signal, f(t) represents the original series, φ represents the mother wave, T represents the length of the original series; t represents the discrete time index; The specific wavelet transform method used by discrete wavelet transform DWT is Haar wavelet transform. Haar wavelet transform consists of two functions: Haar scale function μ and Haar wavelet function ν. The scale function and wavelet function have an orthogonal relationship. Haar wavelet transform decomposition is to decompose the scale function μ into q The numerical value expressed is projected onto the next level scaling function μ q-1 and the wavelet function ν q-1 process; Where: p represents the data decomposed by Haar wavelet transform; q represents the wavelet decomposition level; r represents the distance of wavelet translation; Inverse wavelet transform InverseWT is to reconstruct the decomposed wavelet component signal by wavelet, and reconstruct the signal by wavelet according to the low-frequency coefficient aq of the qth layer and the high-frequency coefficients d1, d2, ..., dq of the 1st to qth layers of the wavelet decomposition to obtain the original data p. p=InverseWT(aq;d1,d2,...,dq) (13) The two label time series data are decomposed into three levels of wavelet in the wavelet domain using Haar discrete wavelet transform, and three high-frequency signals d1, d2, d3 and one low-frequency a3 with different periodicity and trend are obtained.
6. The method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network according to claim 1, characterized in that: In step 6, The hybrid neural network Γ includes an input layer, a Bi-LSTM dual-structure layer, a Dropout layer, an LSTM structure layer, a Dense layer, and an output layer. The Bi-LSTM dual-structure layer contains two layers of Bi-LSTM structures, which learns the input data and captures the feature information in the data. During the forward propagation process, the Dropout layer deletes some feature data; The LSTM structure layer makes predictions based on the captured data feature information; the Dense layer integrates the LSTM predictions and outputs the predicted values; The LSTM structure layer is an LSTM neural network. The LSTM neural network contains a forget gate, an input gate, and an output gate. The mathematical formula for the operation in the LSTM memory unit is: i g =sigm(i t W ix +O t-1 W im +b i ) (10) f g =sigm(i t W fx +O t-1 W fm +b f ) (11) O g =sigm(i t W Ox +O t-1 W Om +b O ) (12) u=relu(i t W ux +O t-1 W um +b u ) (13) x t =f g *x t-1 +i g *u (14) O t =O g *railway(s) (15) Where, O g represents the output gate; i g represents the input gate; f g represents the forget gate; x t represents the state at time step t; u represents the updated neuron state; O t Represents unit output; sigm(·) represents the activation function Sigmoid, a represents data to be activated; i t Represents the input data at time t; W ix Represents the input gate input data weight; O t-1 Indicates the output data at time t-1; W im represents the input gate output data weight, b i represents the input gate bias term; W fx Represents the input data weight of the forget gate; W fm represents the output data weight of the forget gate; b f Represents the forget gate bias; W Ox Represents the input data weight of the output gate; W Om Represents the output data weight of the output gate; b O Represents the output gate bias term; W ux Represents the weight of input data for updating neuron state; W um Represents the output data weight of updating the neuron state; b u Represents the bias term for updating the neuron state; relu(·) represents the ReLU activation function; The Bi-LSTM double structure layer is a two-layer Bi-LSTM neural network. The Bi-LSTM neural network mechanism is a combination of forward LSTM and reverse LSTM'. The forward LSTM processes the forward time series (t0-t n ) data, reverse LSTM' processes the reverse time series (t n -t0) data; the outputs of the two LSTMs in different directions are merged into the output of the Bi-LSTM neural network by (16); Where: G represents the function that combines the forward and reverse outputs; represents the forward unit output; Indicates the reverse unit output; X t Represents the input time series data; Y t Represents the new output after processing by function G; The hybrid neural network Γ receives the high-frequency and low-frequency data components DWT(y′) after Haar discrete wavelet transform decomposition. (j) And the strong correlation influencing factor X is first passed into the Bi-LSTM layer φ (j) Learning nonlinear feature relationships Y (j) : Y (j) =φ (j) (X,DWT(y′) (j) ,M j ) (17) Where: j = [1, 2, 3, 4], corresponding to the label data components [d1, d2, d3, a3]; DWT (y′) (j) Represents the component data [d1; d2; d3; a3] after the label data y′ is decomposed; M j Indicates the number of neurons in the Bi-LSTM layer of each data component; The Dropout layer randomly stops some neurons from working with probability P to alleviate the overfitting problem of the model: P(M j ,N j ) (18) Where: M j 、N j The number of neurons in the Bi-LSTM and LSTM layers corresponding to each data component; LSTM layer φ *(j) According to the feature Y learned by Bi-LSTM (j) Forward prediction along time, the Dense layer integrates the feature output and outputs the predicted value Y of each data component *(j) : AND *(j) =φ *(j) (AND (j) ;N j ) (19) During the model feature learning process, the Bi-LSTM layer comprehensively and effectively captures the information embedded in the oilfield production time series data, and learns the nonlinear mapping relationship between monthly oil production or monthly CO2 storage and the selected input time series data.
7. The method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network according to claim 1, characterized in that: In the step 7, Inverse wavelet transform (InverseWT) is used to reconstruct the three high-frequency components d1, d2, and d3 and one low-frequency component a3 of the predicted monthly oil production or monthly CO2 storage, thereby restoring them to the values in the label data unit. The model training process is as follows: first, the input data X and y are processed to complete the data set construction, and then input into the hybrid neural network Γ. Then, it is optimized and trained based on the genetic algorithm, and the optimized model structure hyperparameters are output. The optimal model is used to predict the label data components. The predicted label data components are restored to the values in the original label data units through inverse wavelet transform to complete the prediction. Based on the data set and genetic algorithm, the hybrid neural network Γ is optimized, the population and gene parameters are initialized, and evolutionary iterative calculations are performed to optimize the model hyperparameters, including: the number of neurons in the Bi-LSTM layer M, the number of neurons in the LSTM layer N, the data batch size BS, the number of model training Epochs, and the model learning rate lr. A total of five parameters are selected, and the optimal model is finally output. The training optimization process is as follows: Input the hybrid neural network Γ to be optimized, perform binary one-hot encoding on the parameters to be optimized, initialize the population size, gene length, and number of evolutionary iterations; calculate the fitness function to minimize the root mean square error (RMSE) between the predicted value and the true value; use the binary tournament population individual selection method to screen excellent individuals; use two-point crossover and random mutation to ensure the diversity and effectiveness of the population, and finally output the hyperparameters of the optimal model structure; specifically: Genetic algorithms map the phenotypes of all individuals in a population to numerical values and use randomization techniques to efficiently search an encoded parameter space. After initializing the population, they follow the principles of survival of the fittest to obtain the optimal solution. The genetic operations of genetic algorithms are selection, crossover, and mutation. The core content of genetic algorithms includes five factors: feature encoding, setting the initial population size, designing the fitness function, designing genetic crossover and mutation, and setting basic control parameters. Step 7.
1. Chromosome Coding Design: Use binary coding to design the coding for individual chromosomes. By using the BitArray function, convert the parameters to be optimized into binary type. If an individual chromosome is selected, it is encoded as 1; otherwise, it is encoded as 0. That is, each individual chromosome is represented as a binary 0 / 1 digital string after binary coding. Step 7.2, fitness function design: I. First, decode the coding sequence of each individual chromosome to obtain the individual's characteristic phenotype; II. Calculate the objective function value of the corresponding individual based on the individual characteristic phenotype; III. Based on the objective function value, calculate the individual's fitness according to the optimization problem type and transformation rule; Call the FitnessMin fitness function in the Fitness class and initialize the weights attribute value of all parts to (-1.0); minimize the fitness value of the single-objective solution, that is, minimize the root mean square error RMSE between the predicted value and the true value: F=Γ(X,y;BS,Epoch,lr;M,N) (20) Minimize:RMSE(F,T)(21) Where Γ represents the hybrid neural network to be optimized; X, y represent the input data and label data; the decision variables of the neural network model structure include the data batch size BS, the number of model training Epochs, and the model learning rate lr; M, N represent the number of neurons in the Bi-LSTM layer and LSTM layer of the neural network model respectively; F represents the predicted data; T represents the real data; Step 7.3, Individual Selection Design: Select excellent individuals from the population and eliminate inferior individuals. The selection operation is based on the fitness evaluation of individuals in the population. Excellent individuals are directly passed on to the next generation or new individuals are generated through pairing and crossover and then passed on to the next generation. Step 7.4, Individual Crossover Design: The two parent individuals exchange some of their genes at the crossover rate Pc to produce new individuals and maintain population diversity. Parent1 and Parent2 are the two parent individuals, and Offspring1 and Offspring2 are the offspring individuals obtained after the two-point crossover operation. The operation process is as follows: offspring1 1 0 0 1 0 0 0 1 (24) offspring2 0 1 0 1 1 1 1 1 (25) Step 7.5, Individual variation design: The gene values at certain loci in the individual chromosome coding string are replaced with the remaining alleles at the loci to form a new individual; set the mutation probability parameter P m Whether an individual mutates depends on the mutation probability parameter P m The size of the new individual after the crossover operation will generate a corresponding random number rand between [0,1]. <P m , then perform mutation operation.
8. The method for predicting oil production or CO2 storage based on discrete wavelet transform and neural network according to claim 1, characterized in that: In step 8, the monthly oil production or monthly CO2 storage is predicted, and the label data is decomposed into low-frequency and high-frequency components through discrete wavelet transform. Models are trained separately according to different label data components to obtain their respective optimized prediction models.
Citation Information
Patent Citations
New well dynamic yield prediction method based on static oil and gas field data
CN113722997A
Device for optimizing training indicator of environment prediction model, and method for operating same
US20220284345A1