Smart energy industry Internet data management method, system, medium and server
By adopting the Internet data management method of smart energy industry in oil and gas well output prediction, combined with the adjustment model of the white box model and the BI-LSTM sub-model, the problems of low prediction accuracy and weak noise processing capabilities in the traditional method are solved, and more efficient and accurate yield forecasts.
Patent Information
- Application Number
- CN202411236962.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-05
AI Technical Summary
Traditional oil and gas well output prediction methods have problems such as low prediction accuracy, weak noise processing capability, many assumption conditions and high uncertainty in input parameters, which cannot meet the needs of modern oil fields for refined management.
The smart energy industry Internet data management method is adopted to collect and normalize the historical and real-time data of oil and gas wells, and combine the white box model and the adjustment model of the BI-LSTM sub-model to achieve the prediction of output. The white box model provides physical and chemical background support, and the BI-LSTM sub-model captures long-term dependencies in time series data to improve prediction accuracy.
It improves the accuracy and efficiency of oil and gas well output prediction, and can more accurately consider the influence of physical laws and chemical reaction principles, reduce noise, and improve the generalization ability of the model and the reliability of the prediction results.
Smart Images

Figure CN118761691B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data management, and in particular to methods, systems, media and servers for data management of smart energy industry Internet. Background Art
[0002] Oil and gas well productivity is one of the key indicators of oil and gas reservoir development. With the development of society, the concept of "smart oilfield" has been proposed, and technologies such as big data and artificial intelligence have been introduced into the development and construction process of oil and gas fields. The production prediction results are an important basis for oilfields to formulate planning plans, production and injection plans, and development adjustment plans. With the increasing demand for refined production management in oilfields, higher requirements are also placed on the accuracy and efficiency of production prediction. Traditional methods, such as the Aprs decline method for conventional oil and gas reservoirs and the decline analysis method for unconventional oil and gas reservoirs, require a long period of production data and require an obvious decline trend. They have weak noise processing capabilities, many assumptions, and large uncertainties in the input reservoir parameters (reservoir properties, fluid properties, rock properties, etc.). The prediction accuracy is low and the impact of work system adjustments cannot be considered. Therefore, the commonly used production prediction methods can no longer meet the needs of development and production research.
[0003] The Chinese invention patent with the application publication date of January 16, 2024 and the application publication number of CN117408396A provides an oil and gas well production prediction method and prediction system based on deep learning, which uses the production data and production data of existing oil and gas wells to train the established prediction model, inputs the second production data into the prediction model to obtain the predicted output value, divides and processes the second production data through different time scales to generate predicted production data, inputs the predicted production data into the prediction model and generates predicted production data according to the correlation relationship. The prediction model in this patent reduces the difference between the predicted value and the true value by reducing the loss error. In this process, the RNN model and LSTM model used are black box models, and the performance of the two models depends to a large extent on the selection and preprocessing of the input features. However, the oil and gas production process is accompanied by physical and chemical phenomena, and the physical and chemical phenomena are constantly changing with the development of time. Therefore, when predicting the production value, it is necessary to consider the influence of physical laws and chemical reaction principles to improve the prediction accuracy. Summary of the invention
[0004] In order to improve the accuracy of prediction, this application provides a smart energy industry Internet data management method, system, medium and server.
[0005] In the first aspect, this application provides a smart energy industry Internet data management method, which adopts the following technical solutions:
[0006] The smart energy industry Internet data management method includes the following steps:
[0007] First data collection and processing: collecting historical data and real-time data of various indicators of the first oil and gas well, normalizing the historical data of the first oil and gas well to obtain first data, and normalizing the real-time data of the first oil and gas well to obtain second data;
[0008] First modeling: establishing an adjustment model, the adjustment model including: a white box model and a BI-LSTM sub-model;
[0009] First model training: including obtaining predicted values, obtaining error values and obtaining outputs;
[0010] Get the predicted value: Use the first data at time t as the input of the white box model to predict the output value at time t, recorded as the third data;
[0011] Obtaining an error value: integrating the first data at time t and the third data at time t into a training set, and using the training set to train the BI-LSTM sub-model to obtain error values of the first data and the third data;
[0012] Obtain output: taking the sum of the third data and the error value as the output of the adjustment model;
[0013] First yield prediction: Use the second data as input to the trained adjustment model to predict the yield value.
[0014] By adopting the above technical solution, this application normalizes both historical data and real-time data. Through normalization, the influence of different dimensions can be eliminated; the combination of the white box model and the BI-LSTM sub-model is adopted to realize the combination of physical and chemical explanatory and nonlinear processing capabilities of the deep learning model. The white box model can provide certain physical and chemical background support (derived based on basic equations such as continuity equation, motion equation, energy equation, etc.), can clearly reflect the physical and chemical phenomena in the oil and gas production process, and reduce the noise of output characteristics. The BI-LSTM sub-model is suitable for processing time series data, can capture long-term dependencies, and improve prediction accuracy. First, the predicted value is generated by the white box model, and then the error between the predicted value and the actual value is used to train the BI-LSTM sub-model. This phased approach helps to gradually optimize the adjustment model. Finally, the normalized real-time data is used as the input of the trained adjustment model to output the predicted production value, which takes into account the influence of physical laws and chemical reaction principles, as well as the influence of error values, and is closer to the actual production value.
[0015] Optionally, after performing the first data collection and processing step and before performing the first modeling step, the method further includes:
[0016] Select indicators: Use the random forest algorithm to evaluate the importance of each indicator, sort each indicator in descending order of importance, and select the top n indicators as the first indicators;
[0017] Select data: use the historical data of the first indicator after normalization as the new first data, and use the real-time data of the first indicator after normalization as the new second data.
[0018] By adopting the above technical solution, the importance of each indicator is evaluated through the random forest algorithm, and the top n indicators with higher importance are selected as the first indicator. This process is essentially feature selection. When the data dimension is high, this method can significantly reduce the dimension of the data, thereby reducing the amount of calculation and complexity in the subsequent modeling process and improving the overall prediction efficiency. Selecting indicators that are highly relevant to the prediction target can remove redundant or noisy data, so that the adjustment model can focus more on features that have a substantial impact on the prediction results. Doing so helps to improve the prediction accuracy and generalization ability of the adjustment model and reduce the risk of overfitting. Using the historical data and real-time data of the first indicator as the new first data and second data respectively, the subsequent modeling process can focus more on those indicators that have a significant impact on the prediction results, which helps the adjustment model learn rules from more accurate data and improve the accuracy of the prediction.
[0019] Optionally, after performing the first modeling step and before performing the first model training step, the method further includes:
[0020] Determine the parameters to be optimized: determine the optimization parameters of the BI-LSTM sub-model and generate m groups of parameter combinations for the BI-LSTM sub-model;
[0021] Sub-model training: Use the i-th group of parameter combinations to train the BI-LSTM sub-model to obtain the first BI-LSTM sub-model;
[0022] Combination: Combine the white box model and the first BI-LSTM sub-model to obtain the first adjustment model;
[0023] Forecast: Using the first adjustment model Predicting the production value of the first oil and gas well at the moment to obtain a first production value;
[0024] Comparison: Compare the first output value with The actual production value of the first oil and gas well at the moment is compared to obtain a first fitness value;
[0025] Judge: judge whether i is equal to m. If so, execute the step of selecting parameter combination; if not, execute the step of replacing;
[0026] Replacement: Use the i+1th group of parameter combinations as the new ith group of parameter combinations and execute the sub-model training steps;
[0027] Select parameter combination: Select the parameter combination corresponding to the minimum first fitness value as the parameter combination of the BI-LSTM sub-model to obtain a new BI-LSTM sub-model.
[0028] By adopting the above technical solution, the tuning of the BI-LSTM sub-model parameters is achieved through the above steps. In the step of determining the parameters to be optimized, it is clarified which parameter combinations of the BI-LSTM sub-model are to be optimized. Generating multiple sets of parameter combinations allows the model to try different configurations during the training process to find the optimal solution. By training the BI-LSTM sub-model with different parameter combinations, the impact of different parameter combinations on the performance of the BI-LSTM sub-model can be observed. The white box model (a model based on chemical or physical principles) is combined with the BI-LSTM sub-model, and the combined model is used to predict the production of oil and gas wells. By comparing the predicted results with the actual production values, the first fitness value is obtained. The smaller the fitness value, the closer the prediction results of the model are to the actual, and the better the performance of the adjusted model is. Therefore, the parameter combination with the smallest fitness value is selected as the final parameter configuration of the BI-LSTM sub-model, which provides strong support for subsequent training and prediction, and helps to improve the accuracy and efficiency of oil and gas well production prediction.
[0029] Optionally, after executing the step of selecting a parameter combination and before executing the step of training the first model, the method further includes:
[0030] Sorting: Sort the first fitness values from small to large, and record the parameter combination ranked as i as the i-th combination;
[0031] Distance calculation: Use the Euclidean algorithm to calculate the distance between the jth combination and the kth combination ;
[0032] Determine the moving direction: take the direction vector of the j-th combination pointing to the k-th combination as the moving direction of the j-th combination;
[0033] Update parameters: Calculate the position of the j-th combination and obtain the updated j-th combination. The calculation model is as follows:
[0034] ;
[0035] ;
[0036] ;
[0037] ;
[0038] ;
[0039] in, is the distance between the j-th combination and the k-th combination; is the position of the kth combination at the fth iteration; is the position of the jth combination at the fth iteration; is the intermediate parameter; is the position of the jth combination at the f+1th iteration; is a random vector; , , is the convergence coefficient;
[0040] Retraining: Use the updated j-th combination to re-execute the sub-model training to the comparison step to obtain the m second fitness values at the f-th iteration;
[0041] Iteration judgment: judge whether the number of iterations f is greater than the preset number of iterations threshold F, if so, execute the step of determining the parameter combination; if not, execute the step of sorting;
[0042] Determine the parameter combination: select the smallest second fitness value among the F×m second fitness values as the new first fitness value, and execute the step of selecting the parameter combination.
[0043] By adopting the above technical solution, the Euclidean algorithm is used to calculate the distance between different parameter combinations, which helps to understand the distribution in the parameter space. Parameter combinations with close distances may have similar performance, while parameter combinations with far distances have large performance differences. The direction vector pointing from one parameter combination to another parameter combination is used as the moving direction, and an attempt is made to improve the performance of the current parameter combination by moving in the direction of the parameter combination with better performance. The formula for updating the position of the parameter combination involves multiple factors such as distance, current position, target position, random vector and convergence coefficient. The combined effect of these factors enables the parameter combination to gradually approach the optimal solution during the iteration process. The introduction of random vectors increases the randomness of the search and helps to jump out of the local optimum. The adjustment of the convergence coefficient controls the step size and speed of the search. The termination of the iteration process is controlled by judging whether the number of iterations reaches the preset threshold, so that the algorithm converges to a better solution within a reasonable time, while reducing unnecessary computational overhead. The smallest fitness value generated in all iterative processes is selected as the new first fitness value, so that the selected parameter combination performs best among all the parameter combinations tried.
[0044] Optionally, after executing the step of determining the parameters to be optimized and before executing the step of training the sub-model, the method further includes:
[0045] Initialization: Initialize the optimization parameters of the BI-LSTM model.
[0046] By adopting the above technical solution and setting reasonable initial values for the BI-LSTM sub-model parameters, the BI-LSTM sub-model can converge more stably during the training process and quickly approach the local optimal solution of the global optimal solution.
[0047] Optionally, the method further comprises:
[0048] Second modeling: Based on the deep learning algorithm, a migration model is established, wherein the migration model includes: a base model and an overlay model, wherein the base model adopts a trained adjustment model, and the overlay model adopts a ResNet model;
[0049] Second data collection and processing: collecting historical data and real-time data of various indicators of the second oil and gas well, collecting unique features and common features of the second oil and gas well, normalizing the historical data of the second oil and gas well to obtain fourth data, and normalizing the real-time data of the second oil and gas well to obtain fifth data;
[0050] Second model training: using the fourth data and the unique features and common features of the second oil and gas well to train the migration model, to obtain a trained migration model;
[0051] Second production prediction: The fifth data and the unique features and common features of the second oil and gas well are used as inputs of the trained migration model to obtain a predicted value of the production of the second oil and gas well.
[0052] By adopting the above technical solution and introducing the migration model, the existing knowledge (i.e., the trained adjustment model) is fully utilized to accelerate the learning process of the new task (predicting the production of the second oil and gas well). Migration learning can effectively reduce the risk of overfitting to new data and improve the performance of the model on new tasks. The base model adopts the trained adjustment model, which means that it has learned useful feature representations from similar or related tasks. The superposition model adopts the ResNet model, which is famous for its deep residual learning mechanism and can effectively solve the problem of gradient disappearance or explosion in deep networks, thereby improving the learning ability of the migration model. Collecting the historical data and real-time data of the second oil and gas well, as well as the unique features and common features to train the migration model, helps the migration model to more comprehensively understand the characteristics and production of the oil and gas well, and capture the multiple dimensions of information that affect the production of the oil and gas well. Since the migration model combines the prior knowledge of the trained adjustment model and the real-time information of the new data, its prediction results may be more accurate and reliable.
[0053] Optionally, in the step of executing the second model training, the base model is frozen, and the ResNet model is trained using the fourth data, the unique features of the second oil and gas well, and the common features.
[0054] By adopting the above technical solution, freezing the base model can prevent the destruction of the general features that have been learned by the pre-trained model and are effective for most tasks during the training process. Using the unique features of a specific second oil and gas well allows the model to learn specific information related to the second oil and gas well, which is very helpful for improving the performance of the ResNet model on the second oil and gas well. The combination of general features and unique features can make full use of the general knowledge learned by the pre-trained model and the data characteristics of specific tasks, thereby improving the performance of the model.
[0055] On the second aspect, this application provides a smart energy industry Internet data management system, which adopts the following technical solutions:
[0056] Smart energy industry Internet data management system, including:
[0057] A data collection and processing module, used for collecting historical data and real-time data of various indicators of the first oil and gas well, and normalizing the historical data and real-time data of various indicators of the first oil and gas well;
[0058] Modeling module: establishing an adjustment model, wherein the adjustment model includes: a white box model and a BI-LSTM sub-model;
[0059] A model training module, including a prediction value obtaining unit, an error value obtaining unit and an output obtaining unit;
[0060] The prediction value acquisition unit is used to use the normalized historical data at time t as the input of the white box model to predict the production value at time t;
[0061] An error value obtaining unit is used to integrate the normalized historical data at time t and the predicted production value at time t into a training set, and use the training set to train the BI-LSTM sub-model to obtain an error value;
[0062] Obtain an output unit, which is used to take the sum of the output value and the error value at time t as the output of the adjustment model;
[0063] The production prediction module is used to use the normalized real-time data as the input of the trained adjustment model to predict the production value of the first oil and gas well.
[0064] By adopting the above technical solutions, this system realizes the comprehensive collection and normalization of the historical and real-time data of the first oil and gas well through efficient data acquisition and processing modules, laying the foundation for subsequent accurate predictions. The modeling module cleverly combines the interpretability of the white box model with the powerful processing ability of the BI-LSTM sub-model for time series, and constructs a highly adaptable adjustment model. The model training module uses a step-by-step strategy to first use the white box model for preliminary predictions, and then uses the BI-LSTM sub-model to correct errors, ensuring the accuracy of the prediction. Finally, the production prediction module can receive the processed data in real time and quickly output the production forecast value of the first oil and gas well, providing strong support for production decisions.
[0065] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to implement the described method when processed by a processor.
[0066] In a fourth aspect, the present application provides a server, on which the system is loaded, and the server includes: a processor, and a memory communicatively connected to the processor;
[0067] The computer-readable storage medium is provided in the memory, and the computer-readable storage medium stores a computer program;
[0068] When the processor processes the computer program stored on the computer-readable storage medium, the method described above is implemented.
[0069] In summary, the present application includes at least one of the following beneficial technical effects:
[0070] 1. This application normalizes both historical data and real-time data. Through normalization, the influence of different dimensions can be eliminated. The combination of the white box model and the BI-LSTM sub-model is adopted to realize the combination of physical and chemical interpretability and the nonlinear processing ability of the deep learning model. The white box model can provide certain physical and chemical background support (derived based on basic equations such as continuity equation, motion equation, energy equation, etc.), can clearly reflect the physical and chemical phenomena in the oil and gas production process, and reduce the noise of output characteristics. The BI-LSTM sub-model is suitable for processing time series data, can capture long-term dependencies, and improve prediction accuracy. First, the predicted value is generated by the white box model, and then the error between the predicted value and the actual value is used to train the BI-LSTM sub-model. This phased approach helps to gradually optimize the adjustment model. Finally, the normalized real-time data is used as the input of the trained adjustment model to output the predicted production value, which takes into account the influence of physical laws and chemical reaction principles, as well as the influence of error values, and is closer to the actual production value.
[0071] 2. The above steps have been used to optimize the parameters of the BI-LSTM sub-model. In the step of determining the parameters to be optimized, it is clear which parameter combinations of the BI-LSTM sub-model are to be optimized. Generating multiple sets of parameter combinations allows the model to try different configurations during the training process to find the optimal solution. By training the BI-LSTM sub-model with different parameter combinations, the impact of different parameter combinations on the performance of the BI-LSTM sub-model can be observed. The white box model (a model based on chemical or physical principles) is combined with the BI-LSTM sub-model, and the combined model is used to predict the production of oil and gas wells. By comparing the predicted results with the actual production values, the first fitness value is obtained. The smaller the fitness value, the closer the prediction results of the model are to the actual results, and the better the performance of the adjusted model is. Therefore, the parameter combination with the smallest fitness value is selected as the final parameter configuration of the BI-LSTM sub-model, which provides strong support for subsequent training and prediction, and helps to improve the accuracy and efficiency of oil and gas well production prediction.
[0072] 3. By introducing the migration model, the existing knowledge (i.e., the trained adjustment model) is fully utilized to accelerate the learning process of the new task (predicting the production of the second oil and gas well). Migration learning can effectively reduce the risk of overfitting to new data and improve the performance of the model on new tasks. The base model uses the trained adjustment model, which means that it has learned useful feature representations from similar or related tasks. The superposition model uses the ResNet model, which is known for its deep residual learning mechanism and can effectively solve the problem of gradient disappearance or explosion in deep networks, thereby improving the learning ability of the migration model. Collecting historical data and real-time data of the second oil and gas well, as well as unique features and common features to train the migration model, helps the migration model to more comprehensively understand the characteristics and production of the oil and gas well, and capture multiple dimensions of information that affect the production of the oil and gas well. Since the migration model combines the prior knowledge of the trained adjustment model and the real-time information of the new data, its prediction results may be more accurate and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 is a flow chart of Example 1 of the present application;
[0074] Figure 2 This is a flow chart from S1 first data collection and processing to S2 first modeling in Example 2 of the present application;
[0075] Figure 3 This is a flowchart from S201 determining the parameters to be optimized to S216 determining the parameter combination in Example 2 of the present application;
[0076] Figure 4 This is a flow chart of Example 3 of the present application. DETAILED DESCRIPTION
[0077] The following combination Figures 1 to 4 This application is described in further detail.
[0078] Example 1: This example discloses a smart energy industry Internet data management method, referring to Figure 1 The method includes: S1 first data collection and processing, S2 first modeling, S3 first model training and S4 first yield prediction. In this embodiment, relevant data is first collected, then an adjustment model is established, then the adjustment model is trained, and then the trained adjustment model is used to predict the yield value. The specific steps of this embodiment are as follows:
[0079] S1: First data collection and processing, comprehensively and systematically collect historical data and real-time data of various indicators from the first oil and gas well, including parameters such as oil pressure, casing pressure, water temperature, oil-water ratio, and production. Use normalization technology to pre-process these historical data and real-time data to eliminate the impact of different dimensions and numerical ranges on subsequent analysis. The normalized historical data is marked as the first data and used for S3: First model training to adjust and train the adjustment model; and the real-time data is marked as the second data after normalization, as the input of the trained adjustment model in S4: First production prediction.
[0080] S2 first builds a model to establish an adjustment model, which includes: a white box model and a BI-LSTM sub-model. The output of the white box model is connected to the input of the BI-LSTM sub-model. The white box model is based on the physical and chemical reaction principles of oil and gas well operation, and can capture the laws and deterministic relationships in the operation of oil and gas wells, and provide prediction results based on physical and chemical reaction principles; while the BI-LSTM sub-model is good at processing complex dependencies in time series data, including long-term dependencies and short-term fluctuations, thereby enhancing the adaptability of the adjustment model to nonlinear dynamic changes. The combination of the two has obvious complementarity in function and characteristics, which can improve the accuracy and robustness of oil and gas well production prediction.
[0081] S3 first model training, including S31 obtaining a prediction value, S32 obtaining an error value, and S33 obtaining an output.
[0082] S31 obtains the predicted value, takes the first data at time t (a certain moment in history) as the input of the white box model, and uses the physical laws and algorithm logic within the white box model to calculate the production value at time t, which is recorded as the third data. The third data reflects the preliminary prediction results based on historical data and the physical model at time t. The first data in this step does not include the actual production value at time t.
[0083] S32 obtains the error value, integrates the first data and the third data at time t into a training set, and uses the training set to train the BI-LSTM sub-model. The first data in this step specifically refers to the actual production value in the historical data, and is the actual production value after normalization.
[0084] The BI-LSTM sub-model is trained using the actual production value at time t in the historical data and the production value at time t predicted by the white box model. This enables the BI-LSTM sub-model to capture complex patterns hidden in the data that are difficult to express directly using the white box model by learning the deviation (i.e., error value) between the actual production value and the predicted production value.
[0085] S33 obtains the output, adds the third data output by the white box model to the error value learned by the BI-LSTM sub-model, and obtains the final output of the adjustment model. This output not only includes predictions based on physical laws and chemical reaction principles, but also incorporates data-driven adjustments, making the prediction results closer to the actual situation.
[0086] S4 is the first production prediction, which uses the second data as the input of the trained adjustment model, and the adjustment model predicts the production value of the first oil and gas well based on the input second data.
[0087] This embodiment collects historical data and real-time data from the first oil and gas well, including oil pressure, casing pressure, water temperature, oil-water ratio and production, and performs normalization to eliminate dimensional differences. The processed historical data is recorded as the first data for training the adjustment model, and the real-time data is used as the second data for production prediction. This embodiment also constructs an adjustment model that combines the white box model and the BI-LSTM sub-model. The white box model provides preliminary predictions based on physical laws and chemical reaction principles, while the BI-LSTM sub-model captures complex dynamic changes in the data. The two complement each other to improve prediction accuracy. During the model training process, the production value at time t (the third data) is first predicted by the white box model, and then the BI-LSTM sub-model is trained using the deviation between the actual production value and the predicted production value. Finally, the two are combined to obtain a more accurate prediction output, and the trained adjustment model is used to predict the production value of the first oil and gas well with the second data as input.
[0088] like Figure 2 As shown, in other embodiments, after executing S1 first data collection and processing and before executing S2 first modeling, it also includes:
[0089] S11 Select indicators. In oil and gas well production prediction, not all collected indicators have the same important impact on the prediction results. Some indicators may contain a lot of noise or redundant information, while other indicators may have a decisive impact on the prediction results. Therefore, by selecting important indicators, it is possible to simplify the adjustment of model inputs and improve prediction accuracy.
[0090] The Random Forest algorithm is used to evaluate the importance of each indicator. Random Forest is an ensemble learning method that works by building multiple decision trees and outputting the average of the classification mode or regression results of these trees. When evaluating the importance of indicators, the Random Forest algorithm calculates the average of the impurities (such as Gini impurity or information gain) reduced by each indicator when building a decision tree, thereby measuring the impact of the indicator on the prediction result, including the following steps:
[0091] S111. Use the random forest algorithm to train all collected indicators.
[0092] S112. Calculate the importance score of each indicator in the random forest.
[0093] S113. Sort the indicators in descending order of importance score.
[0094] S114. Select the top n indicators as the first indicators. These first indicators are considered to have the greatest impact on the prediction results.
[0095] S12 selects data: the historical data after the first indicator is normalized is used as the new first data; the real-time data after the first indicator is normalized is used as the new second data.
[0096] By selecting important indicators and data, this embodiment can further reduce the redundancy and noise of data input and improve the prediction accuracy and efficiency of the adjustment model. By selecting important indicators, the adjustment model can focus more on factors that have a decisive influence on the prediction results, thereby making more accurate predictions. At the same time, this can also reduce the computational complexity of the adjustment model and improve the prediction speed.
[0097] Example 2: Figure 3 As shown, the difference from Example 1 is that after executing S2 first modeling and before executing S3 first model training, the parameters of the BI-LSTM sub-model are also trained, including:
[0098] S201 determines the parameters to be optimized, and determines the parameters that need to be optimized for the BI-LSTM sub-model, such as the learning rate, the number of hidden layer units, the number of layers, the dropout rate, etc.
[0099] Based on experience or preliminary experiments, a reasonable parameter range is determined to generate m groups of parameter combinations for the BI-LSTM sub-model.
[0100] Based on experience or preliminary experiments, a reasonable parameter range is determined as follows:
[0101] Learning Rate: It is used to control the step size of the weight update during the optimization process. A learning rate that is too small will lead to a slow training process, while a learning rate that is too large may cause the training process to be unstable or fail to converge to the optimal solution. The range set based on experience is 0.001 to 0.1.
[0102] Hidden Units / Neurons: refers to the number of each LSTM unit in the hidden layer. This parameter affects the capacity and complexity of the BI-LSTM sub-model. Too few LSTM units will lead to underfitting, while too many units will lead to overfitting and increased training time. The range set based on experience is 50 to 200 units.
[0103] Number of Layers: The number of LSTM layers stacked. Increasing the number of layers can increase the depth of the BI-LSTM sub-model, thereby improving the representation ability of the BI-LSTM sub-model, but it will also increase the risk of overfitting and training time. The number of layers set based on experience is 1 to 3 layers.
[0104] Dropout Rate: Randomly drop a certain proportion of network connections during training to prevent overfitting. The Dropout rate is a value between 0 (no dropout) and 1 (complete dropout), and the empirical range is 0.2 to 0.5.
[0105] The m groups of parameter combinations for generating the BI-LSTM sub-model are, for example:
[0106] Learning rate: choose three different values, such as 0.001, 0.01, 0.1;
[0107] Number of hidden layer units: select two values, such as 64 and 128;
[0108] Number of layers: fixed to 2 layers (or another adjustable parameter, but for simplicity of explanation, it is fixed to 2 layers here);
[0109] Dropout rate: Choose two values, such as 0.2 and 0.3.
[0110] Some of the generated parameter combinations are as follows:
[0111] The first set of parameter combinations: learning rate = 0.001, number of hidden layer units = 64, number of layers = 2, and dropout rate = 0.2.
[0112] The second set of parameter combinations: learning rate = 0.001, number of hidden layer units = 64, number of layers = 2, and dropout rate = 0.3.
[0113] The third set of parameter combinations: learning rate = 0.001, number of hidden layer units = 128, number of layers = 2, and dropout rate = 0.2.
[0114] The fourth set of parameter combinations, learning rate = 0.001, number of hidden layer units = 128, number of layers = 2, Dropout rate = 0.3.
[0115] The fifth set of parameter combinations: learning rate = 0.01, number of hidden layer units = 64, number of layers = 2, and dropout rate = 0.2.
[0116] When the number of parameters and the values of each parameter are larger, the number of generated combinations grows exponentially, and some strategy (such as grid search, random search, or Bayesian optimization) is used to efficiently explore these parameter spaces.
[0117] S202 initialization: initializing the optimization parameters of the BI-LSTM model.
[0118] S203 sub-model training, using the i-th group of parameter combinations to train the BI-LSTM sub-model to obtain the first BI-LSTM sub-model.
[0119] The method of using the i-th group of parameter combinations to train the BI-LSTM sub-model is as follows: using the output of the white box model as the input of the BI-LSTM sub-model, and using the i-th group of parameter combinations for training until a stopping condition is met (such as reaching a maximum number of iterations, the validation set loss no longer decreases, etc.).
[0120] S204 combines the white box model and the first BI-LSTM sub-model to obtain a first adjustment model.
[0121] S205 predicts that The data of n indicators of the first oil and gas well at the moment (excluding The actual output value at the time is input into the first adjustment model, and the first adjustment model is used to adjust The production value of the first oil and gas well at a certain moment is predicted to obtain a first production value.
[0122] S206 compares the first output value with The actual production value of the first oil and gas well at the moment is compared, the difference between the first production value and the actual production value (such as mean square error, absolute error) is calculated, and the first fitness value is obtained.
[0123] For example: Set At this moment, the actual production value of the first oil and gas well is y_actual = 100 barrels / day, and the first production value is y_pred = 98 barrels / day.
[0124] Absolute Error is the absolute value of the difference between the first output value and the actual output value. The calculation model is:
[0125] Absolute Error=∣y_pred − y_actual∣;
[0126] According to the above formula, the first production value is 2 barrels / day less than the actual production value, so the first fitness value is 2.
[0127] S207 determines whether the number i of the current parameter combination is equal to m. If so, S209 is executed to select the parameter combination; if not, S208 is executed to replace.
[0128] S208 replaces and takes the i+1th group of parameter combinations as the new ith group of parameter combinations, and executes S203 sub-model training.
[0129] S209 selects a parameter combination, compares the first fitness values corresponding to all parameter combinations, selects the parameter combination corresponding to the minimum first fitness value, and uses it as the parameter combination of the BI-LSTM sub-model to obtain a new BI-LSTM sub-model. S210 sorts, sorts the first fitness values obtained in the comparison in S206 in ascending order, and records the parameter combination ranked as i as the i-th combination.
[0130] S211 distance calculation, each parameter combination can be regarded as a point in multidimensional space, whose dimension is equal to the number of parameters, and the Euclidean algorithm is used to calculate the distance between the j-th combination and the k-th combination .
[0131] S212 determines the moving direction: takes the direction vector pointing from the jth combination to the kth combination as the moving direction of the jth combination, and the direction vector is calculated based on the position difference between the two combinations in the parameter space.
[0132] S213 updates parameters: calculates the position of the j-th combination, obtains the updated j-th combination, and the calculation model is as follows:
[0133] ;
[0134] ;
[0135] ;
[0136] ;
[0137] ;
[0138] in, is the distance between the j-th combination and the k-th combination; is the distance between the j-th combination and the k+1-th combination; is the distance between the j-th combination and the k+2-th combination; Obtained through the step of S211 distance calculation; is the position of the kth combination at the fth iteration; is the position of the k+1th combination at the fth iteration; is the position of the k+2th combination at the fth iteration; is the position of the jth combination at the fth iteration; is the intermediate parameter; is the position of the jth combination at the f+1th iteration; is a random vector, which is a vector composed of random numbers on [0, 2].
[0139] , , is the convergence coefficient, which changes according to the convergence factor a, and the value of a decreases linearly from 2 to 0. Therefore, , , The value range of is expressed as the interval [-a, a], where the initial value of a is 2 and gradually decreases to 0 during the iteration process. The calculation model of the convergence factor a is as follows:
[0140] .
[0141] When the convergence coefficient is greater than or equal to 1, a global search is performed, and when the convergence coefficient is less than 1, a more detailed local search is performed.
[0142] S214 retrains, adopts the updated j-th combination, re-executes the steps of sub-model training from S203 to S206 comparison, and obtains m second fitness values at the f-th iteration.
[0143] S215 iterative judgment, judging whether the number of iterations f is greater than the preset number of iterations threshold F, if so, executing S216 to determine the parameter combination; if not, executing S210 sorting, and continuing sorting and iteration.
[0144] S216 determines the parameter combination, selects the smallest second fitness value among F×m second fitness values (because all m combinations will be evaluated in each iteration), and uses it as the new first fitness value. Then S209 is executed to select the parameter combination. In this step, a parameter combination with the smallest fitness value is obtained from all the parameter combinations in the entire iteration process as the parameter combination of the BI-LSTM sub-model.
[0145] This embodiment optimizes the model parameters of the BI-LSTM sub-model. By calculating the difference between the predicted output value and the actual output value, a quantitative indicator is obtained to evaluate the prediction performance of the model. The parameters of the BI-LSTM sub-model are tuned accordingly. The optimal parameter combination is found by iteratively updating the parameter combination and evaluating its performance, thereby improving the prediction accuracy of the BI-LSTM sub-model.
[0146] Example 3: Figure 4 As shown, the difference between this embodiment and embodiment 1 is that the method further includes:
[0147] S5 Second modeling, based on the deep learning algorithm, establish a migration model, the migration model includes: a base model and a superposition model, the base model uses the trained adjustment model, and the superposition model uses the ResNet model. The base model is pre-trained on similar but different first oil and gas well data and has a certain generalization ability. The ResNet model is a deep convolutional neural network that solves the gradient vanishing or exploding problem in deep network training by introducing residual connections, making the network deeper and easier to train. In the migration model, the ResNet model is responsible for further feature extraction and prediction on the new task (i.e., production prediction of the second oil and gas well).
[0148] S6 Second data collection and processing, collect historical data and real-time data of various indicators of the second oil and gas well, including the production, pressure, temperature, flow rate and other data of the oil and gas well. This step also collects the unique characteristics and common characteristics of the second oil and gas well. The unique characteristics refer to the characteristics that are unique to the oil and gas well and different from other oil and gas wells; the common characteristics are the characteristics that are common and common in oil and gas wells.
[0149] The historical data and real-time data of various indicators of the second oil and gas well are normalized, and the normalized historical data of the second oil and gas well is recorded as the fourth data (including the actual production value of the second oil and gas well in history), and the normalized real-time data of the second oil and gas well is recorded as the fifth data.
[0150] S7 second model training, using the fourth data, the unique features of the second oil and gas wells and the common features to train the migration model, and obtain the trained migration model, including: freezing the base model, by freezing the parameters of the base model, it can maintain its learning results on the original task, while avoiding overfitting on the new task. The fourth data, the unique features of the second oil and gas wells and the common features are used to train the ResNet model. During the training process, the ResNet model will learn how to combine these features to predict the production of oil and gas wells.
[0151] S8 second production prediction, using the fifth data and the unique features and common features of the second oil and gas well as the input of the trained migration model to obtain the predicted value of the production of the second oil and gas well.
[0152] This embodiment uses the transfer learning method, utilizes the existing base model and ResNet model, and combines the new oil and gas well (the second oil and gas well) data to achieve a fast and accurate prediction of the production of the second oil and gas well. This method not only improves the training efficiency of the model, but also makes full use of existing knowledge and data resources.
[0153] Embodiment 4: This embodiment discloses a smart energy industry Internet data management system, the system comprising:
[0154] Data acquisition and processing module: This module uses automated sensors, remote monitoring systems and other technical means to capture the operating status data of the first oil and gas well in real time and store it in the database. At the same time, data from past time periods are extracted from the historical data warehouse for subsequent analysis. The collected raw data (historical data and real-time data) often contain noise, missing values and other problems, and need to be pre-processed by cleaning, denoising, interpolation and other operations. In addition, due to the different dimensions and ranges of different indicators, in order to improve the training efficiency and prediction accuracy of the model, it is also necessary to normalize the data (historical data and real-time data) and convert all data (historical data and real-time data) to the same scale.
[0155] Modeling module: Establish an adjustment model, which includes: a white box model and a BI-LSTM sub-model. The white box model predicts the production value at time t by inputting historical data (such as wellhead pressure, temperature, etc.) and using known oil and gas production laws. The BI-LSTM sub-model can more comprehensively capture the time series characteristics in the data. This sub-model takes the difference between the prediction result of the white box model and the actual production value (i.e., the error value) as input, learns the laws of these errors through training, and further corrects the prediction results.
[0156] The model training module includes a prediction value obtaining unit, an error value obtaining unit and an output obtaining unit.
[0157] The prediction value acquisition unit is used to use the normalized historical data at time t as the input of the white box model to predict the production value at time t.
[0158] The error value acquisition unit is used to integrate the normalized historical data at time t and the production value at time t into a training set, and use the training set to train the BI-LSTM sub-model to obtain the error value. Through continuous iterative training, the BI-LSTM sub-model can learn the changing rules of the error value and use it to correct the prediction results of the white box model.
[0159] An output unit is obtained, which is used to take the sum of the output value and the error value at time t as the output of the adjustment model.
[0160] The production prediction module is used to use the normalized real-time data as the input of the trained adjustment model to predict the production value of the first oil and gas well.
[0161] This embodiment discloses a smart energy industry Internet data management system. The data acquisition and processing module is responsible for collecting and preprocessing the historical and real-time data of the first oil and gas well, and performing normalization processing. The modeling module constructs an adjustment model including a white box model and a BI-LSTM sub-model. The former preliminarily predicts the output based on physical laws and chemical reaction principles, and the latter corrects the prediction by learning error laws. The model training module uses historical data to train the adjustment model, predicts the output value through the white box model, and corrects the predicted output value through the BI-LSTM sub-model to finally obtain an accurate prediction value. The output prediction module uses the trained model and real-time data as input to predict the future output value of the first oil and gas well, providing decision support for production management.
[0162] Embodiment 5: The present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program, when processed by a processor, is used to implement the described method.
[0163] Embodiment 6: The present application provides a server on which the system is loaded, and the server comprises: a processor, and a memory communicatively connected to the processor.
[0164] The computer-readable storage medium is disposed in the memory, and a computer program is stored in the computer-readable storage medium.
[0165] When the processor processes the computer program stored on the computer-readable storage medium, the method described above is implemented.
[0166] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A smart energy industry Internet data management method, characterized in that: include: First data collection and processing: collecting historical data and real-time data of various indicators of the first oil and gas well, normalizing the historical data of the first oil and gas well to obtain first data, and normalizing the real-time data of the first oil and gas well to obtain second data; Select indicators: Use the random forest algorithm to evaluate the importance of each indicator, sort each indicator in descending order of importance, and select the top n indicators as the first indicators; Select data: use the normalized historical data of the first indicator as new first data, and use the normalized real-time data of the first indicator as new second data; First modeling: establishing an adjustment model, the adjustment model including: a white box model and a BI-LSTM sub-model; Determine the parameters to be optimized: determine the optimization parameters of the BI-LSTM sub-model and generate m groups of parameter combinations for the BI-LSTM sub-model; Sub-model training: Use the i-th group of parameter combinations to train the BI-LSTM sub-model to obtain the first BI-LSTM sub-model; Combination: Combine the white box model and the first BI-LSTM sub-model to obtain the first adjustment model; Forecast: Using the first adjustment model Predicting the production value of the first oil and gas well at the moment to obtain a first production value; Comparison: Compare the first output value with The actual production value of the first oil and gas well at the moment is compared to obtain a first fitness value; Judge: judge whether i is equal to m. If so, execute the step of selecting parameter combination; if not, execute the step of replacing; Replacement: Use the i+1th group of parameter combinations as the new ith group of parameter combinations and execute the sub-model training steps; Select parameter combination: select the parameter combination corresponding to the minimum first fitness value as the parameter combination of the BI-LSTM sub-model to obtain a new BI-LSTM sub-model; Sorting: Sort the first fitness values from small to large, and record the parameter combination ranked as i as the i-th combination; Distance calculation: Use the Euclidean algorithm to calculate the distance between the jth combination and the kth combination ; Determine the moving direction: take the direction vector of the j-th combination pointing to the k-th combination as the moving direction of the j-th combination; Update parameters: Calculate the position of the j-th combination and obtain the updated j-th combination. The calculation model is as follows: ; ; ; ; ; in, is the distance between the j-th combination and the k-th combination; is the position of the kth combination at the fth iteration; is the position of the jth combination at the fth iteration; is the intermediate parameter; is the position of the jth combination at the f+1th iteration; is a random vector; , , is the convergence coefficient; Retraining: Use the updated j-th combination to re-execute the sub-model training to the comparison step to obtain the m second fitness values at the f-th iteration; Iteration judgment: judge whether the number of iterations f is greater than the preset number of iterations threshold F, if so, execute the step of determining the parameter combination; if not, execute the step of sorting; Determine the parameter combination: select the smallest second fitness value among the F×m second fitness values as the new first fitness value, and execute the step of selecting the parameter combination; First model training: including obtaining predicted values, obtaining error values and obtaining outputs; Get the predicted value: Use the first data at time t as the input of the white box model to predict the output value at time t, recorded as the third data; Obtaining an error value: integrating the first data at time t and the third data at time t into a training set, and using the training set to train the BI-LSTM sub-model to obtain error values of the first data and the third data; Obtain output: taking the sum of the third data and the error value as the output of the adjustment model; First yield prediction: Use the second data as input to the trained adjustment model to predict the yield value.
2. The smart energy industry Internet data management method according to claim 1 is characterized in that: After executing the step of determining the parameters to be optimized and before executing the step of training the sub-model, the method further includes: Initialization: Initialize the optimization parameters of the BI-LSTM model.
3. The smart energy industry Internet data management method according to claim 1 is characterized in that: The method further comprises: Second modeling: Based on the deep learning algorithm, a migration model is established, wherein the migration model includes: a base model and an overlay model, wherein the base model adopts a trained adjustment model, and the overlay model adopts a ResNet model; Second data collection and processing: collecting historical data and real-time data of various indicators of the second oil and gas well, collecting unique features and common features of the second oil and gas well, normalizing the historical data of the second oil and gas well to obtain fourth data, and normalizing the real-time data of the second oil and gas well to obtain fifth data; Second model training: using the fourth data, the unique features of the second oil and gas wells, and the common features to train the migration model, and obtain a trained migration model; Second production prediction: The fifth data and the unique features and common features of the second oil and gas well are used as inputs of the trained migration model to obtain a predicted value of the production of the second oil and gas well.
4. The smart energy industry Internet data management method according to claim 3 is characterized in that: In the step of executing the second model training, the base model is frozen, and the ResNet model is trained using the fourth data, the unique features of the second oil and gas well, and the common features.
5. Smart Energy Industry Internet Data Management System, characterized by: The system is used to implement the method according to any one of claims 1 to 4, and the system includes: A data collection and processing module, used for collecting historical data and real-time data of various indicators of the first oil and gas well, and normalizing the historical data and real-time data of various indicators of the first oil and gas well; Modeling module: establishing an adjustment model, the adjustment model including: a white box model and a BI-LSTM sub-model; A model training module, including a prediction value obtaining unit, an error value obtaining unit and an output obtaining unit; The prediction value acquisition unit is used to use the normalized historical data at time t as the input of the white box model to predict the production value at time t; An error value obtaining unit is used to integrate the normalized historical data at time t and the predicted production value at time t into a training set, and use the training set to train the BI-LSTM sub-model to obtain an error value; Obtain an output unit, which is used to take the sum of the output value and the error value at time t as the output of the adjustment model; The production prediction module is used to use the normalized real-time data as the input of the trained adjustment model to predict the production value of the first oil and gas well.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is processed by a processor, it is used to implement the method according to any one of claims 1 to 4.
7. A server, on which the system according to claim 5 is loaded, characterized in that: The server includes: a processor, and a memory communicatively connected to the processor; The memory is provided with a computer-readable storage medium according to claim 6, and the computer-readable storage medium stores a computer program; When the processor processes the computer program stored on the computer-readable storage medium, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Oil and gas well yield prediction method and prediction system based on deep learning
CN117408396A
Oil and gas yield prediction method and system based on multivariable error correction combination model
CN115204532A