Oil field yield prediction method and system based on digital twinborn technology

Through the prediction method of oilfield production based on digital twin technology, the improved random forest algorithm and two -way XLSTM algorithm are used to solve the problems that are difficult to achieve real -time monitoring and dynamic analysis of traditional methods, realize the precise prediction and real -time monitoring of oilfield production, and improve production. Efficiency and security.

CN119377571AActive Publication Date: 2025-01-28NORTHEAST GASOLINEEUM UNIV

Patent Information

Application Number
CN202411442471.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-28
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

Traditional oil field output prediction methods rely on empirical data analysis and traditional monitoring methods, making it difficult to achieve real-time monitoring and dynamic analysis of the oil field production process, resulting in untimely early warnings and lagging management.

Method used

Using the production prediction method based on digital twin technology, through the obtaining and pre -processing oilfield production process data and historical output data, to build a twin model, using the improved random forest algorithm and two -way XLSTM algorithm for output prediction, and realize real -time monitoring and early warning Essence

Benefits of technology

The real -time monitoring and accurate output prediction of the production process of the oilfield was realized, reducing production loss caused by equipment failure or process parameter abnormalities, and improving the production efficiency and safety of the oil field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377571A_ABST
    Figure CN119377571A_ABST
Patent Text Reader

Abstract

The invention discloses an oil field yield prediction method and system based on a digital twinborn technology, and relates to the technical field of oil field monitoring. The method is characterized by comprising the following steps: acquiring oil field production process data and oil field historical yield data; preprocessing the oil field production process data; constructing a twinborn model, inputting the preprocessed oil field production process data and oil field historical yield data into the twinborn model for oil field yield prediction, and obtaining an oil field yield prediction result; wherein an improved random forest algorithm is adopted in the digital twin model, and a self-adaptive lifting strategy and a dynamic depth control mechanism are combined; the output data and the original data are combined and input into the bidirectional xLSTM model for prediction, so that the accuracy and generalization ability of yield prediction are improved; by analyzing production data of the oil well, the model can effectively capture complex dynamic changes in the production process of the oil field, and therefore accurate prediction of the yield of the oil field is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oilfield monitoring, and in particular to an oilfield production prediction method and system based on digital twin technology. Background Art

[0002] A digital twin is a virtual model that is designed to accurately reflect a physical object. The object is equipped with various sensors related to important functional aspects, which generate data related to various aspects of the physical object's performance, which is then forwarded to a processing system and applied to the digital copy. Once this data is obtained, the virtual model can be used to run simulations, study performance issues, and generate possible improvements; all in order to gain valuable insights that can then be applied back to the original physical object.

[0003] At present, oilfield production forecasting and early warning mainly rely on empirical data analysis and traditional monitoring methods. The oilfield production environment is complex and changeable, and there are many factors that affect production, including the geological conditions of the oil wells and the impact of the external environment. Traditional production forecasting methods, such as linear regression and time series analysis, usually fit models based on historical data. These methods have certain limitations when dealing with the comprehensive impact of multi-dimensional data in the oilfield production process.

[0004] In addition, traditional monitoring methods mostly rely on regular inspections of on-site instruments and equipment, with a long data acquisition cycle and limited accuracy, making it difficult to achieve real-time monitoring and dynamic analysis of the oilfield production process. This may not only lead to untimely warnings of abnormal conditions in the oilfield, but may also cause delays in oilfield management, affecting the safe production and economic benefits of the oilfield. Therefore, how to achieve real-time monitoring, accurate prediction and rapid warning of the oilfield production process has become an urgent problem to be solved in the field of oilfield management. Summary of the invention

[0005] In view of this, the present invention proposes an oilfield production prediction method and system based on digital twin technology, in an effort to solve or alleviate one or more of the above problems.

[0006] According to one aspect of the present invention, a method for predicting oil field production based on digital twin technology is proposed, and the method comprises the following steps:

[0007] Obtain oil field production process data and oil field historical production data;

[0008] Preprocessing the oilfield production process data;

[0009] A twin model is constructed, and the pre-processed oil field production process data and the oil field historical production data are input into the twin model to predict the oil field production and obtain the oil field production prediction result; the twin model includes data prediction and real-time monitoring.

[0010] Furthermore, the oilfield production process data include: displacement, pump depth, production days, water content, dynamic liquid level, gas-oil ratio, liquid production of surrounding oil wells, and water injection of surrounding water injection wells.

[0011] Furthermore, the preprocessing includes:

[0012] The oilfield production process data collected at different times or on different dates in a day are formed into a data group, and the mean value and variance of the data group are calculated; whether the data in the data group is an outlier is determined based on the mean value and variance, and the outlier is corrected using a linear interpolation method; the corrected data group is initially normalized, the standard deviation and mean of the data group after initial normalization are calculated, and the ratio of the standard deviation to the mean is defined as a fluctuation coefficient. If the fluctuation coefficient is less than or equal to a preset threshold, the maximum and minimum normalization method is used to renormalize the corrected data group. If the fluctuation coefficient is greater than the preset threshold, the logarithmic normalization method is used to renormalize the corrected data group.

[0013] Furthermore, the preprocessing also includes: for the surrounding oil well liquid production and surrounding water injection well water injection in the oil field production process data, a time increase factor is introduced to weight them, and the weighted predicted water injection of the oil well adjacent to the water injection well and the predicted liquid production of the oil well adjacent to the oil well replace the original surrounding oil well liquid production and surrounding water injection.

[0014] Furthermore, the weighted predicted water injection volume of the adjacent water injection wells of the oil well and the predicted liquid production volume of the adjacent oil wells of the oil well are expressed as:

[0015]

[0016] Where W represents the predicted water injection volume of the adjacent water injection wells; Q represents the predicted liquid production volume of the adjacent oil wells; ω α and ω β represents the time increase factor, represents the influence weight of water injection volume over time, represents the influence weight of the liquid production over time, λ is the time attenuation coefficient, d j is the distance between the jth production well and the predicted oil well, t represents time; a is the number of water injection wells around the predicted oil well; W i is the injection volume of the ith injection well; b is the number of production wells around the predicted oil well; Q j is the liquid production of the jth production well.

[0017] Furthermore, the inputting of the pre-processed oilfield production process data and the oilfield historical production data into the twin model for oilfield production prediction includes:

[0018] An improved random forest algorithm is constructed, and the pre-processed oilfield production process data is input into the improved random forest algorithm for processing to obtain a preliminary prediction result of the oilfield output; wherein the improved random forest algorithm includes: for each decision tree, the sample weight is adjusted according to the error of the previous iteration using an adaptive boosting strategy; in the process of node splitting, the calculation depth of the decision tree is automatically adjusted using a dynamic control mechanism;

[0019] A bidirectional xLSTM algorithm is constructed, and the preliminary prediction results of oil field production and the historical production data of the oil field are input into the bidirectional xLSTM algorithm to obtain the final oil field production prediction results; wherein the bidirectional xLSTM algorithm includes a forward xLSTM and a backward xLSTM.

[0020] Furthermore, the preliminary prediction result of oil field production and the historical production data of the oil field are input into the bidirectional xLSTM algorithm to obtain the final prediction result of oil field production, including:

[0021] The historical production data of the oil field and the preliminary prediction result of the oil field production are sequentially input into the forward xLSTM, and sequentially pass through the input gate, the forget gate, the candidate memory unit, the update memory unit and the output gate to obtain the forward oil field production prediction result;

[0022] The preliminary prediction results of oil field production and the historical production data of oil fields are sequentially input into the backward xLSTM, and then pass through the input gate, forget gate, candidate memory unit, update memory unit and output gate in turn to obtain the backward oil field production prediction results;

[0023] The average value of the forward oilfield production prediction result and the backward oilfield production prediction result is taken as the final oilfield production prediction result.

[0024] Furthermore, for each decision tree, using an adaptive boosting strategy to adjust the sample weight according to the error of the previous iteration includes:

[0025] Initialize the same weights for each sample Where N is the total number of samples; weight ω is used i Construct a decision tree and calculate the prediction error. The prediction error is expressed as:

[0026]

[0027] Among them, y i is the true value of oilfield production process data, is the predicted value of oilfield production process data, is an indicator function, where a prediction error equals 1 and a prediction accuracy equals 0; i = 1, 2, ..., N

[0028] Set the error threshold. For samples whose prediction error is greater than the error threshold, their weights will increase in the next iteration. The weight update formula is:

[0029]

[0030] Among them, α represents the learning rate, ω i ″ represents the current iteration sample weight, ω i ′ represents the sample weight of the next iteration;

[0031] In the process of node splitting, the calculation depth of the decision tree is automatically adjusted by using a dynamic control mechanism, including:

[0032] When each node splits, calculate the sample complexity C of the current node;

[0033] Calculate the maximum tree depth d based on sample complexity C max :d max =α·C+d0, where α represents the adjustment parameter and d0 represents the initial depth parameter;

[0034] Set the complexity threshold τ when the maximum tree depth d max When the complexity threshold τ is greater than or equal to it, the splitting is stopped.

[0035] Furthermore, the real-time monitoring includes real-time display of the oilfield production process data and the oilfield output prediction results; the method also includes: performing alarm processing when the oilfield output prediction results are abnormal.

[0036] According to another aspect of the present invention, an oilfield production prediction system based on digital twin technology is proposed, the system comprising:

[0037] A data acquisition module configured to acquire oilfield production process data and oilfield historical production data; the oilfield production process data includes: displacement, pump depth, production days, water content, dynamic liquid level, gas-oil ratio, liquid production of surrounding oil wells, and water injection of surrounding water injection wells;

[0038] A preprocessing module is configured to preprocess the oilfield production process data; the preprocessing includes: forming a data group from the oilfield production process data collected at different times or on different dates within a day, and calculating the average value and variance of the data group; judging whether the data in the data group is an outlier according to the average value and variance, and correcting the outlier by using a linear interpolation method; performing initial normalization on the corrected data group, calculating the standard deviation and mean of the data group after initial normalization, defining the ratio of the standard deviation to the mean as a fluctuation coefficient, and if the fluctuation coefficient is less than or equal to a preset threshold, renormalizing the corrected data group by using a maximum and minimum normalization method, and if the fluctuation coefficient is greater than the preset threshold, renormalizing the corrected data group by using a logarithmic normalization method; wherein, for the surrounding oil well liquid production and the surrounding water injection well water injection in the oilfield production process data, a time increase factor is introduced to weight them, and the weighted predicted water injection of the oil well adjacent to the water injection well and the predicted oil well liquid production replace the original surrounding oil well liquid production and the surrounding water injection well water injection;

[0039] The production prediction module is configured to construct a twin model, input the pre-processed oil field production process data and the oil field historical production data into the twin model to perform oil field production prediction and obtain the oil field production prediction result; the twin model includes data prediction and real-time monitoring.

[0040] The beneficial technical effects of the present invention are:

[0041] The present invention proposes an oilfield production prediction method and system based on digital twin technology. First, the oilfield production process data and the oilfield historical production data are obtained; the oilfield production process data are preprocessed; a twin model is constructed, and the preprocessed oilfield production process data and the oilfield historical production data are input into the twin model to perform oilfield production prediction, thereby obtaining an oilfield production prediction result.

[0042] Specifically, the present invention collects multiple key parameters in the oil field production process in real time, including displacement, pump depth, water content, dynamic liquid level, gas-oil ratio, etc. These data are then cleaned and normalized to provide high-quality input data for subsequent digital twin modeling; in the digital twin modeling, an improved random forest algorithm is used, which combines an adaptive lifting strategy and a dynamic depth control mechanism; then the output data is combined with the original data and input into the bidirectional xLSTM model for prediction, which improves the accuracy and generalization ability of production prediction. By analyzing the production data of the oil well, the model can effectively capture the complex dynamic changes in the oil field production process, thereby realizing accurate prediction of the oil field production. Furthermore, the oil field production is monitored in real time according to the prediction results, and emergency treatment measures are automatically triggered when the production is abnormal. The early warning mechanism is based on the comparison of the predicted value with historical data and the preset threshold, which can quickly identify potential production anomalies and provide targeted emergency treatment solutions to ensure the safety and stability of oil field production.

[0043] Through real-time monitoring and accurate early warning, the present invention can help oilfield managers to timely discover potential problems in the production process, reduce production losses caused by equipment failure or abnormal process parameters, and improve the production efficiency and safety of the oilfield. At the same time, the intelligent early warning mechanism can guide managers to take effective countermeasures, optimize production processes, and reduce operating costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The present invention can be better understood by referring to the description given below in conjunction with the accompanying drawings, which together with the following detailed description are included in this specification and form a part of this specification, and are used to further illustrate the preferred embodiments of the present invention and explain the principles and advantages of the present invention.

[0045] Figure 1 It is a flow chart of an oil field production prediction method based on digital twin technology described in an embodiment of the present invention.

[0046] Figure 2 It is a structural schematic diagram of an oil field production prediction system based on digital twin technology described in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, exemplary implementations or embodiments of the present invention will be described below in conjunction with the accompanying drawings. Obviously, the described implementations or embodiments are only implementations or embodiments of a part of the present invention, not all of them. Based on the implementations or embodiments of the present invention, all other implementations or embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present invention.

[0048] The embodiment of the present invention proposes an oilfield intelligent management optimization method based on digital twin technology, such as Figure 1 As shown, the method comprises the following steps:

[0049] S1. Obtain oil field production process data and oil field historical production data;

[0050] S2, preprocessing the oil field production process data;

[0051] S3. Construct a twin model, input the pre-processed oil field production process data and the oil field historical production data into the twin model to predict the oil field production, and obtain the oil field production prediction result; the twin model includes data prediction and real-time monitoring.

[0052] The method starts from S1. In S1, oil field production process data and oil field historical production data are obtained.

[0053] According to the embodiment of the present invention, high-precision sensors and monitoring equipment are used, combined with wireless communication and data acquisition instruments, to achieve efficient collection and transmission of oilfield production data. Key data of a single oil well in the oilfield production process is collected in real time, with a focus on parameter indicators that have a direct impact on production prediction. The oilfield production process data includes displacement, pump depth, production days, water content, dynamic liquid level, gas-oil ratio, liquid production of surrounding oil wells, water injection of surrounding water injection wells, and historical oil well production.

[0054] Displacement: refers to the volume of liquid delivered by the pump per unit time, in cubic meters per day (m 3 / d). The flow sensor installed at the outlet of the oil well pump monitors the liquid displacement in real time. The flow sensor is based on the principle of electromagnetic induction and can accurately measure the volume of liquid delivered by the pump per unit time. The data is collected every 2 hours and the displacement value per unit time is recorded.

[0055] Pump depth: refers to the installation depth of the pump in the oil well, measured in meters (m). The installation depth of the pump is determined by installing a depth sensor in the oil well or using existing wellbore depth data. The depth sensor uses ultrasonic measurement technology to accurately measure the installation depth of the pump. A one-time measurement is performed during pump installation or maintenance and recorded.

[0056] Production days: refers to the cumulative production days of the oil wells. The cumulative production days of the oil wells are recorded by the oil well production management personnel.

[0057] Water content: refers to the volume percentage of water contained in the produced fluid. An online water content analyzer is installed at the outlet of the oil well. The analyzer analyzes the water content in the produced fluid in real time. The data is collected every 2 hours and the percentage value of the water content is recorded.

[0058] Dynamic liquid level: refers to the height of the liquid level in the wellbore during the production process of the oil well, measured in meters (m). Use an acoustic logging instrument to monitor the liquid level in the wellbore in real time. The acoustic logging instrument transmits acoustic pulses, calculates the time difference of the sound waves reflecting from the liquid surface, and accurately measures the liquid level. Collect and record the height of the dynamic liquid level every 2 hours.

[0059] Gas-oil ratio: refers to the ratio of gas produced by an oil well to crude oil produced, expressed in cubic meters per cubic meter (m3). 3 / m 3 ) as a unit. The ratio of produced gas to produced crude oil is measured in real time by a gas-liquid two-phase flowmeter installed at the outlet of the oil well. The flowmeter is based on a capacitive sensor and can accurately measure the volume flow of the two-phase flow. The gas-oil ratio is recorded every 2 hours.

[0060] Liquid production of surrounding oil wells: refers to the total amount of liquid produced by the oil well per unit time, usually including crude oil and accompanying water. The unit is cubic meters. The flow sensor of the oil well is used to collect and record the liquid production of surrounding oil wells every 2 hours.

[0061] Water injection volume of surrounding water injection wells: refers to the amount of water injected into the oil layer through the water injection wells to maintain the oil layer pressure or improve the oil layer recovery rate. The unit is cubic meters. The flow sensor of the oil well is used to collect and record the water injection volume of surrounding water injection wells every 2 hours.

[0062] Oil field historical production data: refers to the production of a certain oil well on a certain day in history, in cubic meters, recorded once a day.

[0063] Then S2 is executed, in which the oilfield production process data is preprocessed. The preprocessing includes: forming a data group from the oilfield production process data collected at different times or different dates within a day, and calculating the mean and variance of the data group; judging whether the data in the data group is an outlier according to the mean and variance, and correcting the outlier using a linear interpolation method; performing initial normalization on the corrected data group, calculating the standard deviation and mean of the data group after initial normalization, defining the ratio of the standard deviation to the mean as a fluctuation coefficient, and if the fluctuation coefficient is less than or equal to a preset threshold, renormalizing the corrected data group using a maximum and minimum normalization method, and if the fluctuation coefficient is greater than a preset threshold, renormalizing the corrected data group using a logarithmic normalization method; wherein, for the surrounding oil well liquid production and the surrounding water injection well water injection in the oilfield production process data, a time increase factor is introduced to weight them, and the weighted predicted water injection of the oil well adjacent to the water injection well and the predicted oil well adjacent to the oil well liquid production replace the original surrounding oil well liquid production and surrounding water injection.

[0064] According to an embodiment of the present invention, the collected multi-dimensional data is preprocessed, including data cleaning, outlier processing and normalization, to provide high-quality input data for the production prediction model. In actual oil reservoirs, the number of water injection wells and oil wells adjacent to each oil well is uncertain. To facilitate calculation, the input sample matrix of the production prediction model is required to have a fixed number of columns. When analyzing and predicting the output of oil wells, the distance to neighboring oil wells should be considered as an important factor. Generally speaking, the distance to neighboring oil wells has a proportional effect on the predicted oil wells: the influence of closer oil wells on the predicted oil wells is more significant, while the influence of farther distance oil wells is relatively small. Therefore, a time increase factor is introduced:

[0065]

[0066] In the formula, ω α and ω β represents the time increase factor, represents the influence weight of water injection volume over time, represents the influence weight of the liquid production over time, λ is the time attenuation coefficient, which represents the decay speed of the weight over time, d j is the distance between the jth production well and the predicted oil well, t is the time; W is the water injection volume of the injection wells near the predicted oil well; a is the number of injection wells around the predicted oil well; W i is the injection volume of the ith injection well; Q represents the predicted liquid production of the adjacent oil wells; b is the number of production wells around the predicted oil well; Q j is the liquid production of the jth production well.

[0067] After the above processing, the daily data or multi-day data is taken as a set of data. Each sample x includes multiple parameter inputs, x = [displacement, pump depth, production time, water content, dynamic liquid level, gas-oil ratio, liquid production of surrounding oil wells, water injection of surrounding water injection wells]; the number of input layer nodes of the production prediction model is set to 8. Finally, a set of data x can be obtained. ij :

[0068]

[0069] Then we can process the data. First, we can process the outliers and use the 3σ criterion. ij The average value μ can be calculated i and variance σ i :

[0070]

[0071] If each data set x ij A data value in exceeds μ i +3σ i or less than μi -3σ i , then the value is considered an outlier and is corrected using interpolation. For detected outliers or missing values, linear interpolation can be used to correct the data set x i ' j .

[0072]

[0073] In this embodiment, a decision mechanism for the normalization method is set, and the decision mechanism is used to select a normalization processing method to perform normalization processing on the corrected data group; specifically:

[0074] Initially normalize the corrected data set to [0,1]; calculate the standard deviation σ and mean μ of the initial normalized data set; set the decision mechanism of the normalization method as follows: the ratio of the standard deviation σ to the mean μ is the fluctuation coefficient C v ; If C v ≤0.1 (preset threshold), the corrected data set is normalized using maximum and minimum normalization, expressed as:

[0075]

[0076] In the formula, x i ' j is the i-th parameter value of the j-th sample in the modified data set, max(x′ j ) and min(x′ j ) are the maximum and minimum values ​​of the jth sample respectively; x i ' j ′ is the normalized data set; x′ j Represents the jth column of data in the data group;

[0077] If C v > 0.1, the corrected data set is normalized using logarithmic normalization, expressed as:

[0078]

[0079] The normalized data set is represented as a matrix, where each row represents the oil field production data for a certain day and the columns represent different parameters. Each data point is the normalized value of a specific parameter in the oil field production process.

[0080] Then execute S3, in which a twin model is constructed, and the preprocessed oil field production process data and the oil field historical production data are input into the twin model to predict the oil field production, so as to obtain the oil field production prediction result; specifically including: constructing a random forest algorithm with an adaptive boosting strategy, inputting the preprocessed oil field production process data into the random forest algorithm with an adaptive boosting strategy, and obtaining the preliminary prediction result of the oil field production; wherein the adaptive boosting strategy is: during the training process, each decision tree weights the training samples according to the prediction error of the previous decision tree to automatically adjust the calculation depth of the decision tree; constructing a bidirectional xLSTM algorithm, inputting the preliminary prediction result of the oil field production into the bidirectional xLSTM algorithm, and obtaining the final oil field production prediction result; wherein the bidirectional xLSTM algorithm includes a forward xLSTM and a backward xLSTM.

[0081] According to an embodiment of the present invention, oil field production is predicted by an improved random forest algorithm and a bidirectional xLSTM model, wherein the random forest algorithm introduces an adaptive boosting strategy and dynamically controls the depth of each tree according to data characteristics; the bidirectional xLSTM model improves the generalization ability and parallel processing efficiency of the model by introducing exponential gating and an enhanced memory structure.

[0082] 1) Improved Random Forest Algorithm

[0083] The traditional random forest algorithm uses a random sampling method to extract training data when constructing each decision tree, and simply averages the output results of each tree, and then takes the average of the prediction results of all decision trees as the final prediction result. First, an adaptive boosting strategy is introduced in the embodiment of the present invention: each tree in the training process weights the samples according to the error of the previous tree. The process of adaptive boosting is as follows:

[0084] 11) Initialize the same weight for each training sample Where N is the total number of training samples, and the training sample is each row in the oil field production process data set.

[0085] 12) Use the existing sample weight ω i , build a decision tree and calculate the prediction error; the prediction error is expressed as:

[0086]

[0087] Among them, y i is the true value of oilfield production process data, is the predicted value of oilfield production process data, is an indicator function, where a prediction error equals 1 and a prediction accuracy equals 0. i = 1, 2, ..., N

[0088] 13) Set the error threshold. For samples whose prediction error is greater than the error threshold, their weights will be increased in the next iteration, and finally the error rate of the decision tree is calculated; the weight update formula is:

[0089]

[0090] Among them, α represents the learning rate, ω i ″ represents the current iteration sample weight, ω i ′ represents the sample weight of the next iteration;

[0091] Each round of iteration builds a new decision tree and updates the sample weights based on the prediction error until the predetermined number of trees are completed. Through this process, subsequent decision trees will pay more attention to samples that are difficult to predict, thereby enhancing the generalization ability and accuracy of the model.

[0092] Secondly, the traditional random forest algorithm usually sets a fixed maximum depth for each tree. The embodiment of the present invention introduces a dynamic control mechanism to allow each tree to automatically adjust its depth according to the complexity of the features to avoid overfitting of the model. The specific process is:

[0093] 14) At each node split, calculate the sample complexity of the current node. The complexity C can be evaluated using the variance of the oil field generation process data.

[0094] In a group of samples, the greater the variance difference between the displacement and pump depth of different oil wells on a certain day, the higher the complexity of the data. Nodes with higher complexity require more split operations, while nodes with lower complexity can stop splitting in advance. The formula for calculating variance is as follows:

[0095]

[0096] 15) The sample complexity of the current node is C, and the maximum tree depth of the model is set to d max Proportional to the complexity C:

[0097] d max =α·C+d0

[0098] Among them, α is a tuning parameter used to control the rate of change of the depth of the tree, which is the sensitivity regulator of the model. It controls the response speed of the model to the complexity of the data. If the data complexity is high, the tuning parameter is large, and the depth of the decision tree can be quickly increased to adapt to the complex oil field production conditions. d0 is an initial depth parameter used to prevent the tree depth from being too shallow, which is a response to the basic oil field production law. For nodes with high complexity, a larger depth is allowed to improve the model fitting ability. For simple nodes, the depth of the tree is limited.

[0099] 16) Set the complexity threshold τ, when the maximum tree depth dmax When the complexity threshold τ is greater than or equal to it, the splitting is stopped.

[0100] To avoid overfitting, the dynamic stop splitting condition can be set according to the complexity threshold τ. According to the production data of different oil wells, if the parameters such as displacement and water content do not change much, setting a lower τ value will allow the model to stop splitting in advance and generate a simple tree to improve efficiency; if the production data fluctuates greatly and is affected by geological conditions or equipment status, setting a higher τ value can allow the model to continue splitting and deeply analyze complex production patterns. max If the value is greater than τ, the splitting stops, otherwise the splitting continues. By adjusting the threshold τ, the depth of the tree can be automatically controlled during model training, ensuring that the splitting of simple nodes is stopped in advance to avoid overfitting, while complex nodes are allowed to continue splitting.

[0101] Through the improved random forest algorithm, the average prediction value y for a certain day can be obtained by calculating the average value of each tree. i , and then combined with historical oil field production data to form new data z i =[x i ,y i ], as the input of the bidirectional xLSTM.

[0102] In summary, the specific process of using the improved random forest algorithm to obtain the preliminary prediction results of oil field production is as follows:

[0103] First, randomly select the i-th row of data from the corrected data set, split it according to the selected data, and get a child node; then, for each child node, split it according to the randomly selected features, and use the dynamic control mechanism to automatically adjust the depth of each tree until the tree growth reaches the preset depth and stops splitting, that is, the dynamic stop splitting condition is met; repeat the above process to generate multiple decision trees, and for each decision tree, use the adaptive boosting strategy to adjust the training sample weight according to the error of the previous iteration to increase the weight of the difficult-to-predict samples; take the average of all decision trees and output the average prediction value.

[0104] The improved random forest algorithm calculates the sample complexity of each node and automatically adjusts the depth of the decision tree according to the complexity of the features, thus avoiding model overfitting.

[0105] 2) Bidirectional xLSTM (Extended LSTM) Algorithm

[0106] The traditional LSTM model has the ability to capture long-term dependencies in time series analysis. However, it has limited memory capacity when processing long sequence data and large-scale data. Bidirectional LSTM provides the ability to capture previous and next information, but it is still insufficient when processing large-scale data. In the embodiment of the present invention, the bidirectional LSTM is transformed into an xLSTM structure by introducing exponential gating and enhanced memory structure, thereby improving the generalization ability and parallel processing efficiency of the model.

[0107] The bidirectional xLSTM consists of a forward xLSTM and a backward xLSTM, which can process the previous and next information of the sequence at the same time, providing richer contextual information for each time step. The forward and backward xLSTMs introduce exponential gating and enhanced memory structures respectively, and contain two variants sLSTM (scalar LSTM): adding exponential gating and memory mixing. mLSTM (matrix LSTM): using matrix memory and covariance update rules to support more efficient parallel processing.

[0108] Due to the previous data Since it is a scalar, sLSTM in xLSTM is used. The specific process is as follows.

[0109] 21) Input gate: i t =σ(W i xz t +W i hh t-1 +b i )

[0110] In the formula, i t is the activation value of the input gate, which controls the input z i The impact on the LSTM memory unit. A larger input gate activation value means that the input contributes more to the memory unit, and vice versa. σ is the activation function, which ensures that the activation value i of the input gate t is limited to a reasonable range, between 0 and 1. If the oil field production data of a certain day contributes more to the prediction, σ generates an activation value close to 1; otherwise, it generates a value close to 0, indicating that the current input has little effect on the model memory. i x is the weight matrix of input features and input gates. Oilfield production data is given different importance through the weight matrix, which determines the impact of each production parameter on the input gate. i h is the weight matrix of the hidden state and input gate of the previous time step. It is used to combine historical information to adjust the impact of the input data of the current time step on the memory unit. The historical oil well production trend is crucial to the current prediction. It will give higher weight to historical information so that the model can capture long-term dependencies. i is the bias term for the input gate, which allows it to process the data appropriately even when there is no significant input change.

[0111] 22) Forget gate: f t =σ(W f xz t +W f hh t-1 +b f )

[0112] In the formula, f t is the activation value of the forget gate, which controls the importance of oilfield historical data, such as production parameters in the past few days, to the current prediction. A larger forget gate value means that the memory unit retains more historical production data, and vice versa, it forgets more old information. f x is the weight matrix of input features and forget gates, which determines the impact of oilfield production data at the current time step. f h is the weight matrix of the hidden state and forget gate of the previous time step, which determines the impact of the historical production state on the current time step and ensures that the production data of the previous few days can affect the current prediction decision when necessary. f is the bias term of the forget gate.

[0113] 23) Candidate memory cells:

[0114] In the formula, is the value of the candidate memory cell, which represents the new memory state inferred from the current oil field production data. This is the "candidate" data generated based on the current input and used to update the state of the memory cell. Γ t is the exponential gating, which is used to control the replacement of old information by new information. If the exponential gating value is large, it means that the current production data has a greater impact on the prediction of future output, and the impact of old information is weakened. ⊙ represents element-by-element multiplication. Each element in the current input data will be multiplied element-by-element by the weight matrix to form a contribution to the candidate memory. tanh is the hyperbolic tangent activation function, which is used to generate the value of the candidate memory unit. This is equivalent to limiting the change of production data within a certain range, ensuring that the model has better adaptability to data fluctuations. W c x is the input feature matrix, the influence of the current oil field production data matrix on the candidate memory. W c h, the weight matrix of the candidate memory unit, represents the influence of historical data on the current candidate memory. b c is the bias term of the candidate memory cell.

[0115] 24) Update memory unit:

[0116] In the formula, C t is an updated memory unit, representing the internal state of the current forecast model, which combines the production information of the previous few days and the input data of the current day to generate a forecast of future oil field production. tDetermines the retention of old memory units to current memory units. If the historical field production data is stable, the model will continue to retain this data through the control of the forget gate to ensure the impact on future predictions. t The new candidate memory unit updates the current memory unit. If there is a significant change in the historical oil field production data on a certain day, the model will reflect these changes in the updated memory unit through the input gate and adjust future predictions in time.

[0117] 25) Output Gate:

[0118] In the formula, It is the hidden state of the current time step, and the influence of the current time step on the future time step. It combines the memory state of the current time step and the influence of the current input, and finally outputs the prediction data of future oil field generation. t is the activation value of the output gate, which determines the degree of influence of the information in the memory unit on the hidden state. t ) is used to perform nonlinear transformations on memory cells.

[0119] The backward xLSTM processes the reverse information of the input sequence, that is, the input data is The final output result is Concatenating the forward and backward xLSTM outputs gives us the final input result: That is, the predicted oil field production result. The average of the forward oil field production prediction result and the backward oil field production prediction result can also be taken as the final oil field production prediction result.

[0120] In this embodiment, optionally, real-time monitoring includes real-time display of oilfield production process data and oilfield output prediction results.

[0121] Furthermore, the method of the present invention further comprises S4: performing alarm processing when the oil field production prediction result is abnormal.

[0122] According to an embodiment of the present invention, the obtained oil field production prediction result is compared with the warning threshold to make corresponding emergency treatment measures, including alarm, cause diagnosis and execution of emergency treatment plan. By setting the warning threshold of different oil wells, the current production status is judged according to the comparison of the production prediction warning threshold, including displacement, pump depth, production days, water content, dynamic liquid level, gas-oil ratio and other parameters, and the emergency treatment mechanism is automatically triggered when the oil field prediction data exceeds the set threshold. The emergency treatment mechanism includes triggering an alarm signal, notifying oil field management personnel, analyzing the causes of abnormal production, and monitoring the production status of the oil well in real time until the production returns to normal levels. According to the output results of the production prediction model, the oil field production is monitored and warned in real time to ensure safe and efficient production operation.

[0123] By performing real-time analysis on the predicted production of each oil well, determine whether the current production status is normal, and when the predicted value is abnormal, execute corresponding emergency handling. The basic steps are as follows:

[0124] Compare the oilfield production prediction result with the warning threshold. The warning threshold is set manually by humans and consists of a safety interval [L, H], where L is the lower production limit. If the production is lower than this value, it is considered abnormal and emergency handling needs to be triggered; H is the upper production limit. If the production is higher than this value, it is considered normal and no measures need to be taken. Based on the predicted value P, determine the production status of the current oil well. If P < L, enter the emergency handling process. If L ≤ P ≤ H, maintain normal production. If P > H, the production status is considered normal and no special treatment is required.

[0125] When the predicted production value P is lower than the set threshold L, automatically trigger the emergency handling mechanism to ensure production safety and minimize production losses as much as possible. The emergency handling mechanism includes two handling methods, which can be handled by staff or processed according to the following process: when the predicted value is lower than the threshold L, immediately trigger an alarm signal, which can alert the oilfield management personnel. The alarm information includes the oil well number, the production status parameters of the oil well, the current predicted value, and the corresponding threshold information, reminding the management personnel to take measures; after the emergency handling, continuously monitor the production status of the oil well and update the data in real time. If the production resumes to the normal level (P ≥ L), exit the emergency state and resume normal production.

[0126] The present invention constructs a digital twin model based on oilfield production data, which simulates the production environment of the oilfield through real-time collected oilfield production data and historical production data to achieve prediction of future production. The digital twin model is constructed based on key parameters involved in the oilfield production process, including but not limited to: displacement, pump depth, production days, water content, dynamic liquid level, gas-oil ratio, etc., as well as historical production data of the oilfield. These parameters reflect the dynamic changes in the oilfield production process. Through interaction with historical data and real-time data, the production process of the oilfield can be accurately simulated to form a virtual production environment. The model receives a preprocessed data set as input. The input data is first cleaned and normalized to ensure the quality and consistency of the data. The processed data set includes oilfield production parameters of multiple dimensions, such as displacement, pump depth, water content, etc., which can fully reflect the production status of the oilfield. These data are input into the digital twin model as the basis for model training and prediction. The digital twin model is trained in combination with historical production data. By introducing the improved random forest algorithm and the bidirectional xLSTM algorithm, the model can effectively capture the complex dynamic changes in the oil field production process. The improved random forest algorithm extracts data features through an adaptive boosting strategy, and the bidirectional xLSTM algorithm further processes time series data to improve the model's ability to capture long-term dependencies. The trained model can accurately predict future production based on input real-time data.

[0127] Another embodiment of the present invention provides an oilfield production prediction system based on digital twin technology, such as Figure 2 As shown, the system includes:

[0128] The data acquisition module 210 is configured to acquire oilfield production process data and oilfield historical production data; the oilfield production process data includes: displacement, pump depth, production days, water content, dynamic liquid level, gas-oil ratio, liquid production of surrounding oil wells, and water injection of surrounding water injection wells;

[0129] A preprocessing module 220 is configured to preprocess the oilfield production process data; the preprocessing includes: forming a data group from the oilfield production process data collected at different times or on different dates within a day, and calculating the average value and variance of the data group; judging whether the data in the data group is an outlier according to the average value and variance, and correcting the outlier by using a linear interpolation method; performing initial normalization on the corrected data group, calculating the standard deviation and mean of the data group after initial normalization, defining the ratio of the standard deviation to the mean as a fluctuation coefficient, and if the fluctuation coefficient is less than or equal to a preset threshold, renormalizing the corrected data group by using a maximum and minimum normalization method, and if the fluctuation coefficient is greater than the preset threshold, renormalizing the corrected data group by using a logarithmic normalization method; wherein, for the surrounding oil well liquid production and the surrounding water injection well water injection in the oilfield production process data, a time increase factor is introduced to weight them, and the weighted predicted water injection of the oil well adjacent to the water injection well and the predicted oil well liquid production replace the original surrounding oil well liquid production and the surrounding water injection well water injection;

[0130] The production prediction module 230 is configured to construct a twin model, input the pre-processed oil field production process data and the oil field historical production data into the twin model to perform oil field production prediction and obtain the oil field production prediction result; the twin model includes data prediction and real-time monitoring.

[0131] In this embodiment, optionally, the system further includes an early warning module 240, which is configured to perform an alarm process when the oilfield production prediction result is abnormal.

[0132] The function of the oilfield production prediction system based on digital twin technology described in an embodiment of the present invention can be explained by the aforementioned oilfield production prediction method based on digital twin technology. Therefore, for the parts not described in detail in the system embodiment, please refer to the above method embodiment and will not be repeated here.

[0133] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments are contemplated within the scope of the invention thus described. The disclosure of the present invention is intended to be illustrative rather than restrictive of the scope of the invention, which is defined by the appended claims.

Claims

1. A method for predicting oil field production based on digital twin technology, characterized in that: The following steps are involved: Obtain oil field production process data and oil field historical production data; Preprocessing the oilfield production process data; A twin model is constructed, and the pre-processed oil field production process data and the oil field historical production data are input into the twin model to predict the oil field production and obtain the oil field production prediction result; the twin model includes data prediction and real-time monitoring.

2. The oilfield production prediction method based on digital twin technology according to claim 1 is characterized in that: The oilfield production process data include: displacement, pump depth, production days, water content, dynamic liquid level, gas-oil ratio, liquid production of surrounding oil wells, and water injection of surrounding water injection wells.

3. The oilfield production prediction method based on digital twin technology according to claim 2 is characterized in that: The pre-processing comprises: The oilfield production process data collected at different times or on different dates in a day are formed into a data group, and the mean value and variance of the data group are calculated; whether the data in the data group is an outlier is determined based on the mean value and variance, and the outlier is corrected using a linear interpolation method; the corrected data group is initially normalized, the standard deviation and mean of the data group after initial normalization are calculated, and the ratio of the standard deviation to the mean is defined as a fluctuation coefficient. If the fluctuation coefficient is less than or equal to a preset threshold, the maximum and minimum normalization method is used to renormalize the corrected data group. If the fluctuation coefficient is greater than the preset threshold, the logarithmic normalization method is used to renormalize the corrected data group.

4. The oilfield production prediction and optimization method based on digital twin technology according to claim 3 is characterized in that: The preprocessing also includes: for the surrounding oil well liquid production and surrounding water injection well water injection in the oil field production process data, introducing a time increase factor to weight them, and replacing the original surrounding oil well liquid production and surrounding water injection with the weighted predicted water injection of the oil well adjacent water injection well and the predicted oil well adjacent oil well liquid production.

5. The oilfield production prediction and optimization method based on digital twin technology according to claim 4 is characterized in that: The weighted predicted water injection volume of the adjacent water injection wells of the oil well and the predicted liquid production volume of the adjacent oil wells of the oil well are expressed as: Where W represents the predicted water injection volume of the adjacent water injection wells; Q represents the predicted liquid production volume of the adjacent oil wells; ω α and ω β represents the time increase factor, represents the influence weight of water injection volume over time, represents the influence weight of the liquid production over time, λ is the time attenuation coefficient, d j is the distance between the jth production well and the predicted oil well, t represents time; a is the number of water injection wells around the predicted oil well; W i is the injection volume of the ith injection well; b is the number of production wells around the predicted oil well; Q j is the liquid production of the jth production well.

6. The oilfield production prediction method based on digital twin technology according to claim 1 is characterized in that: The step of inputting the pre-processed oilfield production process data and the oilfield historical production data into the twin model to predict the oilfield production includes: An improved random forest algorithm is constructed, and the pre-processed oilfield production process data is input into the improved random forest algorithm for processing to obtain a preliminary prediction result of the oilfield output; wherein the improved random forest algorithm includes: for each decision tree, the sample weight is adjusted according to the error of the previous iteration using an adaptive boosting strategy; in the process of node splitting, the calculation depth of the decision tree is automatically adjusted using a dynamic control mechanism; A bidirectional xLSTM algorithm is constructed, and the preliminary prediction results of oil field production and the historical production data of the oil field are input into the bidirectional xLSTM algorithm to obtain the final oil field production prediction results; wherein the bidirectional xLSTM algorithm includes a forward xLSTM and a backward xLSTM.

7. The oilfield production prediction method based on digital twin technology according to claim 6 is characterized in that: The method of inputting the preliminary prediction result of oil field production and the historical production data of the oil field into the bidirectional xLSTM algorithm to obtain the final prediction result of oil field production includes: The historical production data of the oil field and the preliminary prediction result of the oil field production are sequentially input into the forward xLSTM, and sequentially pass through the input gate, the forget gate, the candidate memory unit, the update memory unit and the output gate to obtain the forward oil field production prediction result; The preliminary prediction results of oil field production and the historical production data of oil fields are sequentially input into the backward xLSTM, and then pass through the input gate, forget gate, candidate memory unit, update memory unit and output gate in turn to obtain the backward oil field production prediction results; The average value of the forward oilfield production prediction result and the backward oilfield production prediction result is taken as the final oilfield production prediction result.

8. The oilfield production prediction method based on digital twin technology according to claim 6 or 7, characterized in that: For each decision tree, using an adaptive boosting strategy to adjust the sample weight according to the error of the previous iteration includes: Initialize the same weights for each sample Where N is the total number of samples; weight ω is used i Construct a decision tree and calculate the prediction error. The prediction error is expressed as: Among them, y i is the true value of oilfield production process data, is the predicted value of oilfield production process data, is an indicator function, where a prediction error equals 1 and a prediction accuracy equals 0; i = 1, 2, ..., N Set the error threshold. For samples whose prediction error is greater than the error threshold, their weights will increase in the next iteration. The weight update formula is: Among them, α represents the learning rate, ω i ″ represents the current iteration sample weight, ω i ′ represents the sample weight of the next iteration; In the process of node splitting, the calculation depth of the decision tree is automatically adjusted by using a dynamic control mechanism, including: When each node splits, calculate the sample complexity C of the current node; Calculate the maximum tree depth d based on sample complexity C max :d max =α·C+d0, where α represents the adjustment parameter and d0 represents the initial depth parameter; Set the complexity threshold τ when the maximum tree depth d max When the complexity threshold τ is greater than or equal to it, the splitting is stopped.

9. The oilfield production prediction method based on digital twin technology according to claim 1 is characterized in that: The real-time monitoring includes real-time display of the oilfield production process data and the oilfield output prediction results; the method also includes: performing alarm processing when the oilfield output prediction results are abnormal.

10. An oilfield production prediction system based on digital twin technology, characterized in that: include: A data acquisition module configured to acquire oilfield production process data and oilfield historical production data; The oilfield production process data include: displacement, pump depth, production days, water content, dynamic liquid level, gas-oil ratio, liquid production of surrounding oil wells, and water injection of surrounding water injection wells; A preprocessing module is configured to preprocess the oilfield production process data; the preprocessing includes: forming a data group from the oilfield production process data collected at different times or on different dates within a day, and calculating the average value and variance of the data group; judging whether the data in the data group is an outlier according to the average value and variance, and correcting the outlier by using a linear interpolation method; performing initial normalization on the corrected data group, calculating the standard deviation and mean of the data group after initial normalization, defining the ratio of the standard deviation to the mean as a fluctuation coefficient, and if the fluctuation coefficient is less than or equal to a preset threshold, renormalizing the corrected data group by using a maximum and minimum normalization method, and if the fluctuation coefficient is greater than the preset threshold, renormalizing the corrected data group by using a logarithmic normalization method; wherein, for the surrounding oil well liquid production and the surrounding water injection well water injection in the oilfield production process data, a time increase factor is introduced to weight them, and the weighted predicted water injection of the oil well adjacent to the water injection well and the predicted oil well liquid production replace the original surrounding oil well liquid production and the surrounding water injection well water injection; The production prediction module is configured to construct a twin model, input the pre-processed oil field production process data and the oil field historical production data into the twin model to perform oil field production prediction and obtain the oil field production prediction result; the twin model includes data prediction and real-time monitoring.

Citation Information

Patent Citations

  • Apparatus and method for oil production forecasting

    CA3123281A1

  • Method for estimating water injection rate of water injection well

    CN117077844A

  • Oil and gas well yield prediction method and prediction system based on deep learning

    CN117408396A

  • Oil and gas field productivity prediction method and system based on deep learning optimization

    CN117807480A

  • Water plant digital twin application enhancement method and device, storage medium and electronic equipment

    CN118095103A

Cited By

  • Method and system for predicting yield of oil and gas well

    CN120197098A

  • Intelligent monitoring method for operation of oil well system based on digital twinning

    CN120216939A

  • Construction method and device for digital oil reservoir twinning

    CN120597729A