RBF Neural Network Oil Well Oil Production Prediction Method and Prediction System Based on Gene Regulation Genetic Algorithm
Optimizing the RBF neural network through gene regulation genetic algorithms, the nonlinear deficiency and precocious maturity problems of traditional models in oil field yield prediction are solved, and higher prediction accuracy and convergence speed are achieved, which improves the effect of oil field injection and production modeling.
Patent Information
- Application Number
- CN202210773467.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-01
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-07-01
AI Technical Summary
Traditional neural network models have problems such as insufficient nonlinearity, low prediction accuracy, low training efficiency and easy to fall into local optimal values in oil field yield prediction, especially the precocious puberty and local optimal phenomena of genetic algorithms are difficult to effectively solve.
The RBF neural network based on gene regulation genetic algorithm is adopted to optimize the selection, transcription and variation operation of the genetic algorithm through quadruple DNA encoding. Combined with momentum gradient optimization training, the gradient descent optimization method of the RBF neural network is improved, and an oil field injection and procurement model is constructed.
The prediction accuracy and approximation ability of oil output during oil field injection and production are improved, the precocious puberty of the population and local optimal solutions are avoided, and the convergence speed and accuracy of the algorithm are enhanced.
Smart Images

Figure CN115310664B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a bio-intelligent optimization algorithm, and more particularly to a method and system for predicting oil production of an RBF neural network based on a gene regulation genetic algorithm. Background Art
[0002] In order to solve the problems of insufficient nonlinearity of traditional mathematical models and low accuracy in predicting oilfield production, many experts and scholars have applied technologies such as support vector machines, machine learning, and neural networks to oilfield injection-production modeling and oil production prediction. Among them, the application of neural network models is the most extensive. For example, Han Rong, Fan Ling and others proposed a BP neural network prediction method for the prediction of oilfield production. By analyzing the influencing factors of oilfield production, a BP neural network prediction model for oilfield injection-production was established to predict the oilfield production, but the prediction accuracy needs to be improved. In order to better overcome the nonlinearity between various influencing factors in the injection-production process, some scholars first analyzed and processed the collected data through wavelet transform, and then predicted the oilfield production through a BP neural network model, which improved the accuracy of production prediction. However, the training efficiency of the model is low during the optimization process and it is easy to fall into local optimal values.
[0003] In order to further improve the prediction accuracy of traditional neural networks, many scholars have applied intelligent optimization algorithms to the training process of neural networks. For example, Xu Chenhua et al. introduced a genetic optimization algorithm into the BP neural network model, effectively overcoming the defects of traditional BP neural networks. However, the traditional genetic algorithm is prone to premature and local optimal value problems. Qi Hao et al. introduced a quantum algorithm into the immune genetic system on this basis, effectively avoiding the redundancy problem of the algorithm. However, the accuracy of the algorithm needs to be further improved. With the development of bio-intelligent algorithms, a gene regulation network model with DNA regulation as the core provides a new research idea for the improvement of traditional optimization algorithms. For example, inspired by the genetic mechanism of biological DNA, Ding Yongsheng et al. combined a genetic algorithm with DNA mechanism and proposed a genetic algorithm based on DNA coding, but only changed the coding method of the genetic algorithm. Li Zhigang et al. verified the feasibility of the algorithm by using the DNA genetic algorithm to solve and optimize a certain production model. However, the above research only changing the coding method cannot well solve the premature phenomenon of the genetic algorithm, and it is difficult to guarantee the convergence accuracy of the algorithm.
[0004] In order to better solve the problems existing in bio-intelligent optimization algorithms and improve the algorithm performance, inspired by the replication, transcription, and gene mutation mechanisms of biological gene DNA molecules, the present invention proposes a training method for an RBF neural network based on a gene-regulation genetic algorithm (DNA-GA). This algorithm improves the optimization method of gradient descent for traditional RBF neural networks, optimizes the selection operation, transcription operation, and mutation operation in the genetic algorithm (GA), and applies the optimized RBF neural network algorithm to the modeling of oilfield injection-production and oil production prediction. The simulation experiment results show that the prediction system of the RBF neural network based on the gene-regulation genetic algorithm has obvious improvements in both approximation ability and prediction accuracy, providing a new research approach for improving the prediction accuracy of oil production in the oilfield injection-production process. Summary of the Invention
[0005] The present invention discloses an oil production prediction method for an RBF neural network based on a gene-regulation genetic algorithm, comprising the following steps:
[0006] Step 1: Initialize the RBF neural network, and optimize the parameters of the RBF neural network by using momentum gradient optimization training to obtain optimized parameters;
[0007] Step 2: Based on the gene-regulation genetic algorithm, use a quaternary DNA coding method to encode the optimized parameters to generate an initial population; the length L of the DNA coding is 5·(2 + I)*J, and the initial population X = (X1, X2, X3,..., X N );
[0008] Step 3: Determine the fitness value of the population. Based on the gene-regulation genetic algorithm, determine the adaptive transcription factor and the adaptive mutation factor according to the fitness value, and perform selection operation, transcription operation, and mutation operation on the population to generate a new generation of population;
[0009] Step 4: Determine the fitness value of the new generation of population. If the termination condition is satisfied, enter Step 5; otherwise, return to Step 3;
[0010] Step 5: Output the DNA coding with the optimal fitness value, decode the DNA coding to obtain the optimal parameters of the RBF neural network, and construct an optimal model of the RBF neural network;
[0011] Step 6: Collect sample data, filter and normalize the sample data by using wavelet denoising method, and then divide the processed sample data into a training set and a test set according to a preset ratio; use the training set to optimize and train the optimal model of the RBF neural network; and then obtain the final model of the RBF neural network through testing with the test set;
[0012] Step 7: Input the data to be predicted into the final RBF neural network model to obtain the prediction result.
[0013] Among them, I represents the number of input nodes of the RBF neural network, J represents the number of hidden layer nodes of the RBF neural network, and N represents the number of individuals included in the population.
[0014] Further, the momentum gradient optimization training is specifically as follows:
[0015] b j (k) = b j (k - 1) + Δb j (k) + α[b j (k - 1) - b j (k - 2)];
[0016]
[0017] c ij (k) = c ij (k - 1) + Δc ij (k) + α[c ij (k - 1) - c ij (k - 2)];
[0018]
[0019] w j (k) = w j (k - 1) + Δw j (k) + α[w j (k - 1) - w j (k - 2)];
[0020]
[0021] Among them, X = (x1, x2, x3,..., x i ) represents the input data, ci j represents the center point coordinate vector of the hidden layer Gaussian function, which is the same as the dimension of the input data, ||X - c ij || 2 is the Euclidean distance between the input data and the center point coordinate vector, b j represents the width of the hidden layer Gaussian function; i = 1, 2, 3....I, represents the serial number of the input nodes of the RBF neural network; j = 1, 2, 3...J, represents the serial number of the hidden layer nodes of the RBF neural network; h j represents the output value of the hidden layer Gaussian function:
[0022]
[0023] η ∈ (0, 1) is the learning efficiency, and η satisfies the condition that:
[0024] α ∈ (0, 1) is the momentum factor; k is the momentum gradient serial number; E k represents the error index function, and w j represents the weight value from the hidden layer to the output layer.
[0025] Preferably, the selection operation is specifically as follows:
[0026] In the first R algorithm iterations, the roulette wheel selection method is used to select the parent individuals; and
[0027] Starting from the (R + 1)-th algorithm iteration, all the individuals are sorted in descending order according to the fitness value. The probability p(x s ) of being selected as the parent individual is:
[0028]
[0029] where R is a preset positive integer value, s represents the serial number of the individual after sorting according to the fitness, and q represents the average fitness selection probability;
[0030]
[0031] where o represents the serial number of the individual before sorting according to the fitness, and fit(x o ) is the fitness value obtained by the objective function at x o , and fit avg is the average value of the fitness value fit(x o ).
[0032] Preferably, the transcription operation is specifically as follows:
[0033] Let the starting position of the DNA gene fragment to be transcribed be the d-th coding, and the DNA gene fragment to be transcribed is expressed as:
[0034] X = X d+1 , X d+2 ,..., X d+n ;
[0035] The transcribed DNA gene fragment is expressed as:
[0036] where d = 1, 2, 3....L, is the coding serial number of the quaternary coding of the individual, represents the quaternary complement of X d , the transcription length is n = L · p c , and take the floor; p cIt represents an adaptive transcription factor, and L represents the length of the individual encoding.
[0037] Furthermore, the adaptive transcription factor specifically is:
[0038]
[0039] Among them, p0 represents the initial transcription factor and 0 < p0 < 0.4, fit represents the fitness value of the individual before variation, fit max represents the maximum individual fitness value in the population, fit min represents the minimum individual fitness value in the population, fit avg represents the average value of the individual fitness in the population.
[0040] Preferably, the variation operation specifically is:
[0041] The encoding of the DNA gene of the fragment to be varied is represented as X L-b , X L-b+1 ,..., X L , and the variation operation determines the variation length through the adaptive variation factor; the variation length is b = L·q c , and round down; where q c represents the adaptive variation factor;
[0042] The variation operation includes shift variation and recombination variation, and a random number is used to determine the type of the variation operation;
[0043] Take the random number m ∈ (0, 1], and select the intermediate value 0.5 within the value range as the dividing point;
[0044] If 0 < m ≤ 0.5, then the shift variation is adopted; if 0.5 < m ≤ 1, then the recombination variation is adopted;
[0045] The shift variation is based on the principle of gene insertion mutation. On the basis of the individual encoding, a single encoding X is randomly inserted at the variation starting position, and the subsequent encodings are shifted backward in turn; where X is any one of the quaternary encodings 0, 1, 2, 3;
[0046] The recombination variation is based on the principle of gene random frame shift mutation. The encoding order of the variation fragment is disrupted, and then randomly combined to form a new variation fragment.
[0047] Furthermore, the adaptive variation factor specifically is:
[0048]
[0049] Among them, q0 represents the initial variation factor, Δfit maxrepresents the change amount of the maximum individual fitness value in the population, ΔS represents the number of generations between the current population and the population with the most recent change in the maximum fitness value, and
[0050]
[0051] The present invention also discloses an RBF neural network oil well oil production prediction system based on gene regulation genetic algorithm, which is applied to the field of oil field production prediction, and includes:
[0052] A data acquisition module, which is used to adopt sample data, filter and normalize the sample data by using wavelet denoising method, and then divide the processed sample data into a training set and a test set according to a preset ratio;
[0053] An optimization module, which optimizes the RBF neural network by using the gene regulation genetic algorithm, outputs the optimal parameters of the RBF neural network, and is used to construct the optimal model of the RBF neural network;
[0054] A training module, which optimizes and trains the optimal model of the RBF neural network by using the training set, and then obtains the final model of the RBF neural network through testing by the test set;
[0055] A prediction module, which inputs the data to be predicted, and obtains a prediction result through the final model of the RBF neural network.
[0056] Further, the optimization of the RBF neural network by using the gene regulation genetic algorithm is specifically as follows:
[0057] Step 1: Initialize the RBF neural network, optimize the parameters of the RBF neural network by using momentum gradient optimization training, and obtain the optimized parameters;
[0058] Step 2: Based on the gene regulation genetic algorithm, encode the optimized parameters by using the quaternary DNA encoding method to generate the initial population;
[0059] Step 3: Calculate the fitness value of the population. Based on the gene regulation genetic algorithm, determine the adaptive transcription factor and the adaptive mutation factor according to the fitness value, and perform selection operation, transcription operation and mutation operation on the population to generate a new generation of population;
[0060] Step 4: Calculate the fitness value of the new generation of population. If the termination condition is satisfied, enter Step 5; otherwise, return to Step 3;
[0061] Step 5: Output the DNA encoding of the optimal fitness value, decode the DNA encoding to obtain the optimal parameters of the RBF neural network, and complete the construction of the optimal model of the RBF neural network.
[0062] Further, the prediction system further includes a computer-readable storage medium, on which a computer program is stored.
[0063] The prediction system further includes:
[0064] A non-volatile semiconductor storage element for reading the data information collected by the data acquisition module; the data information at least includes the sample data in the training set and the test set, and the data to be predicted;
[0065] A data processing unit, which calls the computer program through a processing circuit to execute and implement the steps of the RBF neural network oil well oil production prediction method based on the gene regulation genetic algorithm as described above;
[0066] A data distribution circuit, after processing the data to be predicted read from the non-volatile semiconductor storage element by each processing unit through the data processing unit, sends the obtained prediction result to one or more CAN buses to be sent to an external device through a gateway.
[0067] The present invention provides an RBF neural network oil well oil production prediction method and prediction system based on a gene regulation genetic algorithm, which adopts a quaternary DNA coding method, deeply optimizes the three operation links of selection, transcription, and mutation in the genetic algorithm, improves the overall performance of the genetic algorithm, and uses the genetic optimization algorithm to improve the optimization method of the traditional RBF neural network gradient descent. The optimized RBF neural network algorithm is applied to the modeling of oilfield injection-production and the prediction of oil production, and an effective prediction system is obtained.
[0068] The beneficial effect of the present invention is that the situation of population premature and local optimal solution is effectively avoided through the adaptive transcription factor, and the local optimization ability of the algorithm is enhanced by combining the adaptive mutation factor. At the same time, the simulation experiment results also show that the RBF neural network model optimized by the gene regulation genetic algorithm has obvious improvements in the approximation ability and prediction accuracy, providing a new research approach for improving the prediction accuracy of oil production in the oilfield injection-production process. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0070] Figure 1 It is a flowchart of the RBF neural network oil well oil production prediction method based on the gene regulation genetic algorithm of the present invention;
[0071] Figure 2 It is a schematic diagram of quaternary DNA encoding for the RBF neural network oil well oil production prediction method based on gene regulatory genetic algorithm described in the present invention;
[0072] Figure 3 It is a schematic diagram of transcription operation for the RBF neural network oil well oil production prediction method based on gene regulatory genetic algorithm described in the present invention;
[0073] Figure 4 It is a schematic diagram of shift mutation operation for the RBF neural network oil well oil production prediction method based on gene regulatory genetic algorithm described in the present invention;
[0074] Figure 5 It is a schematic diagram of recombination mutation operation for the RBF neural network oil well oil production prediction method based on gene regulatory genetic algorithm described in the present invention;
[0075] Figure 6 It is a structural diagram of the application of the RBF neural network oil well oil production prediction method based on gene regulatory genetic algorithm described in the present invention to the training of RBF neural network;
[0076] Figure 7 It is an iterative error graph of the prediction system of the RBF neural network based on gene regulatory genetic algorithm described in the present invention.
[0077] Figure 8 It is an error comparison graph of the prediction system of the RBF neural network based on gene regulatory genetic algorithm described in the present invention. Detailed implementation manners
[0078] The following further describes the detailed implementation manners of the present invention with reference to the accompanying drawings. It should be noted here that the description of these implementation manners is for helping to understand the present invention, but does not constitute a limitation to the present invention. In addition, the technical features involved in the various implementation manners of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0079] Aiming at the problems of slow convergence speed and easy to fall into local minimums that occur when the traditional RBF neural network processes complex problems such as non-linearity and hysteresis, the present invention discloses an RBF neural network oil well oil production prediction method based on gene regulatory genetic algorithm, and the overall idea is as Figure 1 shown, including the following steps:
[0080] Step 1: Initialize the RBF neural network, and optimize the parameters of the RBF neural network by using momentum gradient optimization training to obtain optimized parameters;
[0081] Further, the momentum gradient optimization training is specifically:
[0082] b j (k) = bj (k - 1)+Δb j (k)+α[b j (k - 1)-b j (k - 2)];
[0083]
[0084] c ij (k) = c ij (k - 1)+Δc ij (k)+α[c ij (k - 1)-c ij (k - 2)];
[0085]
[0086] w j (k) = w j (k - 1)+Δw j (k)+α[w j (k - 1)-w j (k - 2)];
[0087]
[0088] where X = (x1, x2, x3,..., x i ) represents the input data, c ij represents the center point coordinate vector of the hidden layer Gaussian function, which is the same as the dimension of the input data, ||X - c ij || 2 is the Euclidean distance between the input data and the center point coordinate vector, b j represents the width of the hidden layer Gaussian function; i = 1, 2, 3....I, represents the serial number of the input node of the RBF neural network; j = 1, 2, 3...J, represents the serial number of the hidden layer node of the RBF neural network; h j represents the output value of the hidden layer Gaussian function:
[0089]
[0090] η ∈ (0, 1) is the learning efficiency, and at the same time, the η satisfies the condition:
[0091] α ∈ (0, 1) is the momentum factor; k is the momentum gradient serial number; E k represents the error index function, w j represents the weight from the hidden layer to the output layer.
[0092] Step 2: Based on the gene regulatory genetic algorithm, use the quaternary DNA coding method to encode the optimization parameters to generate the initial population; the length of the DNA coding is L = 5·(2 + I)*J, and the initial population X = (X1, X2, X3,..., X N );
[0093] The specific coding method is as follows: In biology, gene expression regulation generally occurs at the transcriptional level. Through the processes of DNA molecule replication, transcription, and translation, genetic information is continuously transmitted to control the growth and development of organisms. A DNA molecule is a high-molecular compound with a double helix structure, composed of four nucleotides: adenine deoxynucleotide (A), cytosine deoxynucleotide (C), guanine deoxynucleotide (G), and thymine deoxynucleotide (T). Therefore, a single strand of DNA can be regarded as a string composed of 4 different letters A, G, C, and T.
[0094] Using the coding method based on the bases in the DNA chain, a single DNA molecule can be expressed as a set of 4 letters: {A, T, C, G}. Therefore, the quaternary DNA coding method is used to encode individuals. The number 0 represents the base A, the number 1 represents the base C, the number 2 represents the base G, and the number 3 represents the base T. The initial individual can be represented by a random quaternary digital sequence. For example, X = 203103210322031 can represent an individual with a length of 15. If the number of individuals in the population is N, the structure of the kth (1 ≤ k ≤ N) individual is as Figure 2 shown. In the figure, L represents the length of the individual coding, and X1, X2, X3,..., X L-1 , X L represent parameter values. Among them, 0 ≤ X i ≤ 3 (1 ≤ i ≤ L) and is an integer value.
[0095] Among them, i represents the number of input nodes of the RBF neural network, j represents the number of hidden layer nodes of the RBF neural network, and N represents the number of individuals in the population.
[0096] The quaternary DNA coding method adopted by the present invention is carried out according to the coding method of DNA molecules in the gene regulation mechanism. The individual coding is random and does not consider the order and number of bases. On this basis, the processes of DNA replication, transcription, and mutation in gene expression are introduced into the selection, transcription, and mutation operations of the genetic algorithm, and information is operated according to the principle of base pair complementarity.
[0097] Step 3: Determine the fitness value of the population. Based on the gene regulatory genetic algorithm, determine the adaptive transcription factor and the adaptive mutation factor according to the fitness value, and perform selection operation, transcription operation, and mutation operation on the population to generate a new generation of population;
[0098] The selection operation is specifically as follows: in the first R algorithm iterations, the roulette wheel selection method is used to select the parental individuals; and starting from the (R + 1)-th algorithm iteration, all the individuals are sorted in descending order according to the fitness value, and the probability p(x s ) of being selected as the parental individual is:
[0099]
[0100] where R is a preset positive integer value, s represents the serial number of the individual after sorting according to the fitness, and q represents the average fitness selection probability;
[0101]
[0102] where o represents the serial number of the individual before fitness sorting, and fit(x o ) is the fitness value obtained by the objective function at x o , and fit avg is the average value of the fitness value fit(x o ).
[0103] This is because the selection operation mimics the process of survival of the fittest in nature, retaining individuals with larger fitness values, which reflects the global optimization ability of the algorithm. The traditional genetic algorithm uses the roulette wheel selection method to randomly select and replicate individuals, which can ensure the diversity of the next generation population; however, in the later stage of evolution, when the fitness values are relatively close, there will be a problem of slow convergence speed. Therefore, the algorithm retains the advantages of the roulette wheel and improves the selection operator in the later stage to overcome the problem of slow convergence speed.
[0104] The transcription operation is specifically as follows: as Figure 3 shown, let the starting position of the DNA gene fragment to be transcribed be the d-th encoding, and the DNA gene fragment to be transcribed is represented as: X = X d+1 , X d+2 ,..., X d+n ; the DNA gene fragment after transcription is represented as:
[0105] where d = 1, 2, 3....L, which is the encoding serial number of the quaternary encoding of the individual, represents the quaternary complement of X d , the transcription length is n = L·p c , and it is rounded down; p c represents the adaptive transcription factor, and L represents the length of the individual encoding.
[0106] Furthermore, the adaptive transcription factor is specifically:
[0107]
[0108] Among them, p0 represents the initial transcription factor, and 0 < p0 < 0.4. fit represents the fitness value of the individual before variation, fit max represents the maximum individual fitness value in the population, fit min represents the minimum individual fitness value in the population, fit avg represents the average value of the individual fitness in the population.
[0109] It can be seen that the adaptive transcription factor p c changes following the fitness values of the population and itself, which results in inconsistent transcription lengths for each individual. And in each iteration, if the fit max and fit min of the population change, the transcription length will also change. The adaptive transcription factor is always in a process of dynamic adjustment, more effectively avoiding the situations of population prematurity and local optimal solutions.
[0110] Preferably, the mutation operation is specifically as follows:
[0111] The coding of the DNA gene of the fragment to be mutated is represented as X L-b , X L-b+1 ,..., X L , and the mutation operation determines the mutation length through the adaptive mutation factor; the mutation length is b = L·q c , and it is rounded down; where q c represents the adaptive mutation factor;
[0112] The mutation operation includes shift mutation and recombination mutation, and a random number is used to determine the type of the mutation operation;
[0113] Take the random number m ∈ (0, 1], and select the intermediate value 0.5 within the value range as the dividing point;
[0114] If 0 < m ≤ 0.5, then the shift mutation is adopted; if 0.5 < m ≤ 1, then the recombination mutation is adopted;
[0115] As Figure 4 shown, the shift mutation is based on the principle of gene insertion mutation. On the basis of the individual coding, a single coding X is randomly inserted at the mutation starting position, and the subsequent codings are shifted backward in turn; where X is any one of the quaternary codings 0, 1, 2, 3;
[0116] As Figure 5 shown, the recombination mutation is based on the principle of gene random frameshift mutation, shuffles the coding order of the mutation fragment, and then randomly combines to form a new mutation fragment.
[0117] Furthermore, the adaptive mutation factor is specifically:
[0118]
[0119] where q0 represents the initial mutation factor, Δfit max represents the change in the maximum individual fitness value in the population, ΔS represents the number of generations between the population and the population with the most recent change in maximum fitness, and
[0120]
[0121] Similarly, the adaptive mutation factor q c also changes following the fitness values of the population and itself, which results in inconsistent mutation lengths for each individual. Moreover, when the fit max and ΔS of the population change during each iteration, the mutation length also changes. The adaptive mutation factor is in a dynamic adjustment process all the time, which can prevent the destruction of excellent populations, maintain the diversity of the population, and enhance the local optimization ability of the algorithm.
[0122] Step 4: Determine the fitness value of the new generation population. If the termination condition is met, go to Step 5; otherwise, return to Step 3.
[0123] The termination condition means that the fitness value reaches the preset error value requirement; it also includes that within a certain number of iterations, the fitness value of the best individual shows no obvious improvement, or the average fitness value of the population shows no obvious improvement, or a combination of these conditions is used to stop the algorithm.
[0124] This algorithm improves the overall performance of the algorithm by improving the individual coding method, selection, transcription, and mutation processes on the basis of the original genetic algorithm, especially improving significantly in terms of convergence speed and accuracy. The specific improvement of the present invention is mainly based on the fitness value of the individual, optimizing the selection, transcription, and mutation operations of the algorithm, and the improved operations are dynamically adjusted during the iteration process, rather than the fixed algorithm operations of the original genetic algorithm.
[0125] Step 5: Output the DNA encoding of the optimal fitness value, decode the DNA encoding to obtain the optimal parameters of the RBF neural network, and use them to construct the optimal model of the RBF neural network.
[0126] The optimal model of the RBF neural network is as Figure 6As shown in the figure. The training process of the RBF neural network is a process of optimizing weights. The present invention optimizes and improves the training process of the RBF neural network with a genetic optimization algorithm, which can further improve the convergence speed and accuracy of the RBF neural network.
[0127] Step 6: Collect sample data, filter and normalize the sample data using wavelet denoising method, and then divide the processed sample data into a training set and a test set according to a preset ratio; use the training set to optimize and train the optimal model of the RBF neural network; and then obtain the final model of the RBF neural network through testing with the test set.
[0128] Step 7: Input the data to be predicted into the final model of the RBF neural network to obtain the prediction result.
[0129] Preferably, the present invention also discloses an RBF neural network oil well oil production prediction system based on a gene regulation genetic algorithm, which is applied to the field of oil field production prediction and includes:
[0130] A data acquisition module, which is used to adopt sample data, filter and normalize the sample data using wavelet denoising method, and then divide the processed sample data into a training set and a test set according to a preset ratio.
[0131] An optimization module, which optimizes the RBF neural network using a gene regulation genetic algorithm, outputs the optimal parameters of the RBF neural network, and is used to construct the optimal model of the RBF neural network.
[0132] A training module, which uses the training set to optimize and train the optimal model of the RBF neural network, and then obtains the final model of the RBF neural network through testing with the test set.
[0133] A prediction module, which inputs the data to be predicted, passes through the final model of the RBF neural network, and obtains the prediction result.
[0134] Furthermore, the optimization of the RBF neural network using a gene regulation genetic algorithm is specifically as follows:
[0135] Step 1: Initialize the RBF neural network, optimize the parameters of the RBF neural network using momentum gradient optimization training to obtain the optimized parameters.
[0136] Step 2: Based on the gene regulation genetic algorithm, encode the optimized parameters using a quaternary DNA coding method to generate an initial population.
[0137] Step 3: Calculate the fitness value of the population. Based on the gene regulation genetic algorithm, determine the adaptive transcription factor and the adaptive mutation factor according to the fitness value, and perform selection operation, transcription operation and mutation operation on the population to generate a new generation of population.
[0138] Step 4: Calculate the fitness value of the new generation population. If the termination condition is satisfied, go to Step 5; otherwise, return to Step 3.
[0139] Step 5: Output the DNA encoding with the optimal fitness value, decode the DNA encoding to obtain the optimal parameters of the RBF neural network, and complete the construction of the optimal model of the RBF neural network.
[0140] Furthermore, apply the trained RBF neural network to the prediction of oil well production.
[0141] The specific implementation of the present invention is as follows: study the water injection and oil production data of some injection-production well groups in more than 2,000 oil and water wells in a certain oilfield block in China. Take the water injection and oil production data of a certain injection-production well group for 24 months from January 2015 to December 2016, and a total of 700 groups of input-output data are sorted out; select 600 groups of data as training data, use the genetic algorithm based on gene regulation to train the RBF neural network, and the remaining 100 groups of data are used as test samples for verification. In order to eliminate the influence of dimensions and improve the efficiency of model training, this embodiment uses the wavelet denoising method to filter and normalize the data, and then perform inverse normalization after the prediction is completed.
[0142] There are many influencing factors for oil well production. In this embodiment, the original well pattern water injection volume Q in1 (k), the first infill well pattern water injection volume Q in2 (k), the second infill well pattern water injection volume Q in3 (k), the casing pressure P g (k) of 4 important factors are used as feature quantities, and the oil well production Q out (k) is used as the output quantity of the neural network. The above 4 feature quantities plus the state output feedback Q of the neural network out (k - 1), Q out (k - 2) are used as the 6 inputs of the neural network, and a three-layer RBF neural network trained by the genetic algorithm based on gene regulation is used.
[0143] The architecture of the RBF neural network model is as follows: 6 neurons in the input layer, 7 neurons in the hidden layer, 1 neuron in the output layer, learning rate η = 0.5, momentum factor α = 0.05. The target error E for network training is 0.0001, and the maximum number of iterations is 500. The parameter settings of the standard genetic algorithm are: crossover probability p = 0.6, mutation probability q = 0.05. The parameter settings of the RBF neural network oil well oil production prediction method based on the gene regulation genetic algorithm are: transcription factor control parameter p0 = 0.3, initial mutation factor q0 = 0.05, population size N is 40 for both, and the maximum number of iterations G is 100 for both. The RBF neural network parameters are optimized respectively, and the experimental results are as Figure 7 shown. It can be seen from Figure 7 that the final model of the RBF neural network described in the present invention not only improves the speed of population optimization but also avoids the phenomenon of premature convergence.
[0144] To demonstrate the advantages of the gene regulation genetic algorithm, in this embodiment, prediction systems using the classical BP neural network, traditional RBF neural network, genetic algorithm optimized RBF neural network, and gene regulation genetic algorithm optimized RBF neural network are respectively used to construct an oil well injection-production model for predicting oil production. The training errors in the experimental results are as Figure 8 shown. By comparison, it can be seen that the approximation ability of the RBF neural network prediction system optimized by the gene regulation genetic algorithm has been significantly improved, and the prediction accuracy is also higher.
[0145] Furthermore, the prediction system further includes a computer-readable storage medium, on which a computer program is stored. The computer program stored thereon further includes:
[0146] A non-volatile semiconductor storage element for reading the data information collected by the data acquisition module; the data information at least includes the sample data in the training set and test set, as well as the data to be predicted;
[0147] And a data processing unit that calls the computer program through a processing circuit to execute and implement the steps of the RBF neural network oil well oil production prediction method based on the gene regulation genetic algorithm as described above;
[0148] There is also a data distribution circuit that, after processing the data to be predicted read from the non-volatile semiconductor storage element by each processing unit through the data processing unit, sends the obtained prediction results to one or more CAN buses to be sent to external devices through a gateway.
[0149] The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, without departing from the principle and spirit of the present invention, various changes, modifications, substitutions, and variations made to these embodiments still fall within the protection scope of the present invention.
Claims
1. A method for predicting the oil production of oil wells using an RBF neural network based on a gene regulatory genetic algorithm, characterized in that, It includes the following steps: Step 1: Initialize the RBF neural network, optimize the parameters of the RBF neural network using momentum gradient optimization training, and obtain the optimized parameters; Step 2: Using a quaternary DNA coding method based on a gene regulation genetic algorithm, encode the optimization parameters to generate an initial population; the length L of the DNA coding is L = 5·(2 + I)*J, and the initial population X = (X1, X2, X3,..., X N ); Step 3: Determine the fitness value of the population. Based on the gene regulation genetic algorithm, determine the adaptive transcription factor and the adaptive mutation factor according to the fitness value, and perform selection operation, transcription operation, and mutation operation on the population to generate a new generation of population; Step 4: Determine the fitness value of the new generation of population. If the termination condition is met, enter Step 5; otherwise, return to Step 3; Step 5: Output the DNA encoding with the optimal fitness value, decode the DNA encoding to obtain the optimal parameters of the RBF neural network, and construct the optimal model of the RBF neural network; Step 6: Collect sample data, filter and normalize the sample data using the wavelet denoising method, and then divide the processed sample data into a training set and a test set according to a preset ratio; use the training set to optimize and train the optimal model of the RBF neural network; and then obtain the final model of the RBF neural network through testing with the test set; Step 7: Input the original well pattern injection volume Q in1 (k), the injection volume Q of the primary infill well pattern in2 (k), the injection volume Q of the secondary infill well pattern in3 (k), the casing pressure P g (k) The 4 important factors are used as the data to be predicted into the final RBF neural network model to obtain the prediction results; Among them, the momentum gradient optimization training is specifically: b j b(k) = b j b(k - 1)+Δb j b(k)+α[b j b(k - 1)-b j b(k - 2)]; c ij c(k) = c ij c(k - 1)+Δc ij c(k)+α[c ij c(k - 1)-c ij c(k - 2)]; w j w(k) = w j (k - 1)+Δw j w(k)+α[w j (k - 1)-w j (k - 2)]; Among them, X = (x1, x2, x3,..., x I ) represents the input data, c ij represents the center point coordinate vector of the hidden layer Gaussian function, which has the same dimension as the input data, ||X - c ij || 2 is the Euclidean distance between the input data and the center point coordinate vector, b j represents the width of the hidden layer Gaussian function; i = 1, 2, 3....I, represents the serial number of the input node of the RBF neural network; j = 1, 2, 3...J, represents the serial number of the hidden layer node of the RBF neural network; h j represents the output value of the hidden layer Gaussian function: η ∈ (0, 1) is the learning efficiency, and at the same time, η satisfies the condition: α ∈ (0, 1) is the momentum factor; k is the momentum gradient serial number; E k represents the error index function, w j represents the weight value from the hidden layer to the output layer; Among them, I represents the number of input nodes of the RBF neural network, J represents the number of hidden layer nodes of the RBF neural network, and N represents the number of individuals included in the population.
2. The oil well oil production prediction method of the RBF neural network based on the gene regulation genetic algorithm according to claim 1, characterized in that The selection operation is specifically: In the first R algorithm iterations, the roulette wheel selection method is used to select parent individuals; and Starting from the (R + 1)-th algorithm iteration, all the individuals are sorted in descending order according to the fitness value, and the probability p(x s ) of being selected as the parental individual is as follows: Among them, R is a preset positive integer value, s represents the serial number of the individual after sorting according to fitness, and q represents the average fitness selection probability; Among them, o represents the individual serial number before fitness sorting, and fit(x o ) is the fitness value obtained by the objective function at x o , and fit avg is the average value of the fitness value fit(x o ).
3. The oil well oil production prediction method based on the gene regulation genetic algorithm for the RBF neural network according to claim 2, characterized in that, The transcription operation is specifically: Let the starting position of the DNA gene segment to be transcribed be the d-th encoding, and the DNA gene segment to be transcribed is expressed as: X = X d+1 , X d+2 ,..., X d+n ; The post-transcription DNA gene fragment is expressed as: where d = 1, 2, 3....L, which is the coding serial number of the quaternary code of the individual; represents X d the quaternary complement of, and the transcription length is n = L·p c , and rounded down; p c represents the adaptive transcription factor, and L represents the length of the individual coding.
4. The method for predicting the oil production of oil wells by using an RBF neural network based on a gene regulation genetic algorithm according to claim 3, wherein The adaptive transcription factor is specifically: Among them, p0 represents the initial transcription factor and 0 < p0 < 0.4, fit represents the fitness value of the individual before variation, fit max represents the maximum individual fitness value in the population, fit min represents the minimum individual fitness value in the population, fit avg represents the average value of the individual fitness in the population.
5. The method for predicting oil production of oil wells by using an RBF neural network based on a gene-regulation genetic algorithm according to claim 4, wherein The mutation operation is specifically: The coding of the DNA gene of the fragment to be mutated is represented as X L-b , X L-b+1 ,..., X L , the mutation operation determines the mutation length through the adaptive mutation factor; the mutation length is b = L·q c , and take the floor; where q c represents the adaptive mutation factor; The mutation operation includes shift mutation and recombination mutation, and a random number is used to determine the type of the mutation operation; take the random number m ∈ (0, 1], and select the intermediate value 0.5 within the value range as the dividing point; If 0 < m ≤ 0.5, then the shift mutation is adopted; if 0.5 < m ≤ 1, then the recombination mutation is adopted; the shift mutation is based on the principle of gene insertion mutation. On the basis of the individual encoding, a single encoding X is randomly inserted at the mutation starting position, and the subsequent encodings are shifted backward in turn; where X is any one of the quaternary encodings 0, 1, 2, 3; The recombination mutation is based on the principle of gene random frame shift mutation, shuffles the encoding order of the mutation segment, and then randomly combines them to form a new mutation segment.
6. The method for predicting the oil production of oil wells by using an RBF neural network based on a gene regulatory genetic algorithm according to claim 5, wherein, The adaptive mutation factor is specifically: where q0 represents the initial mutation factor, Δfit max represents the change in the maximum individual fitness value in the population, ΔS represents the number of generations between the population and the population with the most recent change in maximum fitness, and 7. A prediction system for oil production in oil wells based on a gene-regulatory genetic algorithm and an RBF neural network, characterized in that, The system includes: A data acquisition module, which is used to adopt sample data, filter and normalize the sample data using the wavelet denoising method, and then divide the processed sample data into a training set and a test set according to a preset ratio; An optimization module, which optimizes the RBF neural network using the gene regulation genetic algorithm, outputs the optimal parameters of the RBF neural network, and is used to construct the optimal model of the RBF neural network; A training module that optimally trains the optimal model of the RBF neural network using the training set and obtains the final model of the RBF neural network after testing with the test set; Prediction module, with the original well pattern injection volume Q as the input in1 (k), the injection volume Q of the first infill well pattern in2 (k), the injection volume Q of the second infill well pattern in3 (k), the casing pressure P g (k) Four important factors are used as the data to be predicted. Through the final model of the RBF neural network, the prediction result is obtained; Among them, the optimization of the RBF neural network using the genetic algorithm based on gene regulation is specifically as follows: Step 1: Initialize the RBF neural network, and optimize the parameters of the RBF neural network using momentum gradient optimization training to obtain optimized parameters; Step 2: Based on the genetic algorithm based on gene regulation, encode the optimized parameters using a quaternary DNA encoding method to generate an initial population; Step 3: Calculate the fitness value of the population. Based on the genetic algorithm based on gene regulation, determine the adaptive transcription factor and the adaptive mutation factor according to the fitness value, and perform selection operation, transcription operation, and mutation operation on the population to generate a new generation of population; Step 4: Calculate the fitness value of the new generation of population. If the termination condition is satisfied, go to Step 5; otherwise, return to Step 3; Step 5: Output the DNA encoding with the optimal fitness value, decode the DNA encoding to obtain the optimal parameters of the RBF neural network, and complete the construction of the optimal model of the RBF neural network; Among them, the momentum gradient optimization training is specifically as follows: b j b(k) = b j b(k - 1)+Δb j b(k)+α[b j b(k - 1)-b j b(k - 2)]; c ij c(k) = c ij (k - 1)+Δc ij c(k)+α[c ij (k - 1)-c ij (k - 2)]; w j w(k) = w j (k - 1)+Δw j w(k)+α[w j (k - 1)-w j (k - 2)]; Among them, X = (x1, x2, x3,..., x I ) represents the input data, c ij represents the center point coordinate vector of the hidden layer Gaussian function, which has the same dimension as the input data, ||X - c ij || 2 is the Euclidean distance between the input data and the center point coordinate vector, b j represents the width of the hidden layer Gaussian function; i = 1, 2, 3....I, represents the serial number of the input node of the RBF neural network; j = 1, 2, 3...J, represents the serial number of the hidden layer node of the RBF neural network; h j represents the output value of the hidden layer Gaussian function: η ∈ (0, 1) is the learning efficiency, and at the same time, η satisfies the condition: α∈(0,1) is the momentum factor; k is the momentum gradient sequence number; E k represents the error index function, w j represents the weight value from the hidden layer to the output layer.
8. The RBF neural network oil well oil production prediction system based on gene regulation genetic algorithm according to claim 7, characterized in that, It further includes: A computer-readable storage medium with a computer program stored thereon; A non-volatile semiconductor storage element for reading the data information collected by the data acquisition module; the data information at least includes the sample data in the training set and the test set, as well as the data to be predicted; A data processing unit that calls the computer program through a processing circuit to execute and implement the steps of the RBF neural network oil well oil production prediction method based on the genetic algorithm based on gene regulation as described in any one of claims 1-6; and a data distribution circuit that, after processing the data to be predicted read from the non-volatile semiconductor storage element by each processing unit through the data processing unit, sends the obtained prediction results to one or more CAN buses to be sent to external devices through a gateway.
Citation Information
Patent Citations
Self-organizing T-S fuzzy neural network control method of grid-connected inverter
CN114660944A
Molecules and methods for inhibition and detection of proteins
US20140082769A1