Method for predicting daily fluid production capacity of single well by fusing attention mechanism with characteristics of injection and production well

By using an attention mechanism to integrate injection and production characteristics in the daily fluid production forecast of oil and gas wells, the problems of low prediction accuracy and high data requirements in the existing technology are solved, and more efficient and accurate prediction results are achieved, supporting the production management of oil and gas fields.

CN119599180APending Publication Date: 2025-03-11CHINA NATIONAL OFFSHORE OIL (CHINA) CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411640385.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The prior art has problems of limited accuracy and high requirements for data quality and sample quantity in the daily liquid production forecast of oil and gas wells.

Method used

The attention mechanism is used to integrate the characteristics of injection and production wells, and by obtaining historical production data of water injection wells and oil and gas wells, data cleaning, feature selection and normalization are carried out, and a neural network model is constructed to predict the daily fluid production of a single well.

Benefits of technology

It improves the accuracy and efficiency of daily liquid volume prediction, and can accurately predict production indicators in the absence of numerical models of reservoirs, helping oil and gas fields to conduct production scheduling, resource optimization and cost control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599180A_ABST
    Figure CN119599180A_ABST
Patent Text Reader

Abstract

The invention discloses a method for predicting the daily fluid production capacity of a single well by fusing an attention mechanism with injection and production well characteristics. The method comprises the steps that S1, data of all water injection wells and oil and gas wells of an injection and production unit are obtained according to well group division; s2, preprocessing production historical data of the water injection well and the oil-gas well, and obtaining a data set by adopting a sliding window mechanism; s3, an attention mechanism is fused with injection and production well characteristics to build a daily fluid production prediction neural network model, a training set and a verification set are obtained through cross validation, and a loss function is a mean square error of the actual daily fluid production capacity of the single oil and gas well and a neural network prediction value; and S4, inputting test set data into the trained prediction model to predict the daily fluid production capacity of a single well, and the like. The method comprehensively considers the influence of long-term and short-term water injection measures of the water injection well and the current state information of the oil and gas well, and can solve the problem of inaccurate production index prediction in the petroleum production process under the condition of lack of the reservoir numerical model, thereby helping the oil and gas field to carry out production scheduling, resource optimization and cost control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of single oil and gas well daily liquid production prediction methods, and specifically relates to a method for predicting the daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism. Background Art

[0002] In the petroleum industry, accurate prediction of daily liquid production of oil and gas wells is crucial for production scheduling, resource optimization and cost control. Daily liquid production of a single well refers to the total amount of liquid produced by an oil and gas well in one day, including crude oil and accompanying water. Liquid production prediction includes statistical methods and physical model-based research. Based on statistical methods such as time series analysis and regression analysis, the trend and periodic changes of liquid production can be predicted, but due to complex nonlinear relationships and time-varying properties, the prediction accuracy is limited. Research based on physical models attempts to use knowledge in fields such as fluid mechanics to construct a physical model of liquid production in oil and gas wells. It usually takes into account formation structure, wellbore characteristics, etc., and can better explain the changing laws of liquid production, but in practical applications it is often affected by data uncertainty and model assumptions.

[0003] Domestic scholars have begun to try to use machine learning methods to predict the daily liquid production of oil and gas wells. Such as support vector machines, decision trees, random forests, etc., but usually require manual selection of features and adjustment of parameters, and have high requirements for data quality and sample quantity. With the development of deep learning technology, researchers have achieved high prediction accuracy by constructing multi-level deep neural network models and combining them with large-scale data sets for training. Summary of the invention

[0004] The present invention is proposed to solve the problems existing in the prior art, and its purpose is to provide a method for predicting the daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism.

[0005] The present invention is achieved through the following technical solutions:

[0006] A method for predicting the daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism comprises the following steps:

[0007] S1. Obtain the historical production data of all water injection wells and oil and gas wells in the injection and production unit well group where a single oil and gas well is located, and perform data cleaning on the production data;

[0008] S2, performing feature selection and normalization operations on the historical production data of all water injection wells and oil and gas wells in the injection-production unit well group obtained in step S1; using a sliding window to align the production history time series data of all water injection wells by date, and divide them into input subsequences of the same length; splicing the daily liquid production of the production status data of the oil and gas wells on the predicted date to obtain a data set for input to the neural network;

[0009] S3. Use the attention mechanism to integrate the characteristics of injection and production wells to build a daily liquid production prediction neural network model, use K-fold cross-validation evaluation to obtain the training set and validation set, use the mean square error between the actual daily liquid production of a single oil and gas well and the neural network prediction value as the loss function, and use the prediction target as the daily liquid production of the current oil and gas well for model training;

[0010] S4. The test set data is input into the trained prediction model to predict the daily liquid production of a single well.

[0011] In the above technical solution, the following steps are included: Step S1 specifically includes the following steps:

[0012] S11, obtaining the well numbers and names of all water injection wells and oil and gas wells in the injection and production unit well group where the single oil and gas well is located;

[0013] S12, extracting historical production data of corresponding water injection wells and oil and gas wells from the production database according to the well number obtained in step S11;

[0014] S13, statistics are collected on the missing features of all oil and gas wells and water injection wells. If the average missing feature rate exceeds a set threshold, it is indicated that the model training data is insufficient. Otherwise, missing value filling is performed.

[0015] S14, data missing value filling processing;

[0016] S15. Perform maximum and minimum normalization processing on the data filled with missing values.

[0017] In the above technical scheme, the historical production data of the water injection well includes the well number, production date, daily water injection volume, wellhead injection pressure, water nozzle diameter, casing pressure, injection time and total cumulative injection volume; the historical production data of the oil and gas well includes the well number, production date, oil pressure, casing pressure, oil nozzle diameter, production time, water content and daily liquid production.

[0018] In the above technical solution, the specific method of the missing data value filling process in step S14 is:

[0019] The injection pressure at the wellhead of the water injection well adopts K adjacent filling;

[0020] The daily water injection volume is filled according to the water injection duration of the day multiplied by the hourly average of the daily water injection volume of the previous 10 days;

[0021] The casing pressure of water injection wells, oil pressure and casing pressure of oil and gas wells are filled according to the 5-day moving average. The moving average calculation formula is as follows (1):

[0022] Y t+1 =(Y t +Y t-1 +? +Y t-n+1 ) / n (1)

[0023] Where: Y t+1 is the predicted value, n is the number of days of moving average, n=5; t is the current date; t+1 is the predicted date;

[0024] The daily liquid production is filled according to the production time of the day multiplied by the average daily liquid production hours of the previous 5 days;

[0025] The water content is calculated based on the water production divided by the daily liquid production.

[0026] In the above technical solution, the formula for the maximum and minimum normalization processing in step S15 is as follows (2):

[0027]

[0028] Where: x′ is the normalized data, x is the historical production characteristic time series data of water injection wells and oil and gas wells, and x min is the minimum value, x max is the maximum value.

[0029] In the above technical solution, step S2 specifically includes the following steps:

[0030] S21. Using the correlation analysis method, calculate the Pearson correlation coefficient between the characteristics of all water injection wells and oil and gas wells and the daily liquid production, measure the strength of the linear relationship between the two quantitative variables, and select the characteristics whose absolute value of the correlation coefficient is greater than the set threshold;

[0031] The characteristics of the water injection well include daily water injection volume, wellhead injection pressure, casing pressure, injection time and total cumulative injection volume;

[0032] The oil and gas well characteristics include oil pressure, production time and water content;

[0033] S22. Characteristics of water injection status of structural water injection wells and production status of oil and gas wells:

[0034] The water injection state characteristics of the structural water injection well are specifically: a value of 1 indicates water injection, and a value of 0 indicates stop injection;

[0035] The production status characteristics of the structural oil and gas wells are specifically: a value of 1 indicates production, and a value of 0 indicates shutdown;

[0036] S23, aligning and splicing all the water injection well data according to the production date, and using a sliding window to divide the daily production data of the water injection well into several subsequences. The calculation formula for the number of subsequences is as follows (3):

[0037]

[0038] Where: M is the number of training sample sequences, m is the total number of days of historical production data of water injection wells, Time_window is the size of the time sliding window, and slide_step is the moving step of the sliding window;

[0039] S24, taking the time series consisting of the daily water injection volume, wellhead injection pressure, casing pressure, injection time, total cumulative injection volume and water injection status of each water injection well in the previous Time_window as the water injection well input data, the oil pressure, production time, water content and production status of the current oil and gas well in the Time_window+1 day as the oil and gas well input data, taking the daily liquid production of the current oil and gas well in the Time_window+1 day as the target variable of the neural network model, and taking the processed M samples as the data set for neural network training;

[0040] S25. Division of training set and test set: According to the ratio of training set and test set and the date correlation relationship, the water injection well, oil and gas well samples and the predicted target single well daily liquid production data set are divided into training set and test set.

[0041] In the above technical solution, step S3 specifically includes the following steps:

[0042] S31, obtaining the training set outputted in step S25;

[0043] S32, extracting the features of all water injection wells in the injection-production unit well group, and constructing a neural network layer: the feature extraction method adopts a two-dimensional convolution method, setting the number of filters filters and the convolution kernel size kernel_size, the sliding step length strides, and the number of filters filters is consistent with the number of input features of the oil and gas wells;

[0044] S33, inputting four characteristics of the oil and gas well into the oil and gas well characteristic extraction module;

[0045] The four characteristics of the oil and gas wells include oil pressure, production time, water content and production status;

[0046] S34, fusion of water injection well and oil and gas well features: performing dot product calculation on the water injection well features and the oil and gas well features extracted in step S32 to obtain fused features;

[0047] S35, using the attention mechanism to calculate the attention weights of the fused features obtained in step S34, to achieve feature extraction after focusing on the fused features at different times, and then perform batch normalization on this basis, and then use 4 layers of one-dimensional convolution to perform feature extraction and dimensionality transformation, the number of convolution kernels in each layer is 128, 64, 32, and 16 respectively, and then through average pooling, one-dimensional convolution, and maximum pooling, output the predicted daily liquid production of a single well;

[0048] S36, the model training process inputs the training set into the constructed prediction model for parameter iteration. The training termination condition is the early stopping strategy. The test results are obtained on the test set. When the loss on the test set no longer decreases, or the degree of decrease is less than the threshold, the training is stopped and the trained neural network model is output. The mean absolute error is used as the loss function, and the optimizer is Adam.

[0049] S37, determining the parameters of the prediction model, and optimizing the model parameters using a network search algorithm;

[0050] The parameters of the prediction model include the length of the injection well time window Time_window and the learning rate;

[0051] S38. Use K-fold cross validation for model training: divide the sample set into K subsets, select K-1 as training data for each training, use the remaining subset for verification, and finally take the average of the K performance evaluation results as the evaluation effect.

[0052] In the above technical solution, step S4 specifically includes the following steps:

[0053] S41. Obtain the trained daily liquid production prediction model, predict the test set, and use the mean absolute percentage error MAPE to evaluate the results.

[0054] The calculation formula of the mean absolute value percentage error is shown in the following formula (4):

[0055]

[0056] Where: m is the number of test set samples, and the predicted value and true value are the predicted value and true value of the daily liquid production of the corresponding oil and gas wells;

[0057] S42: Continuously optimize and iterate the single well daily fluid production prediction model based on the test set evaluation results.

[0058] The beneficial effects of the present invention are:

[0059] The present invention provides a method for predicting the daily liquid production of a single well by fusing the characteristics of injection and production wells with an attention mechanism. The method comprehensively considers the impact of long-term and short-term water injection measures of the injection wells and the current status information of the oil and gas wells. In the absence of a numerical reservoir model, the method can solve the problem of inaccurate prediction of production indicators in the oil production process, thereby helping oil and gas fields to carry out production scheduling, resource optimization and cost control.

[0060] The present invention takes the daily liquid production of a single well as the prediction target, and adopts the correlation analysis method to select model features based on the production dynamic data of water injection wells and oil and gas wells. The method has strong feasibility; feature fusion is realized through one-dimensional convolution and dot product calculation, and the fused features are processed by batch normalization to realize the fusion extraction of water injection well and oil and gas well features; compared with the previous method, the attention mechanism is added to integrate the influence of water injection characteristics at different stages on the daily liquid production, and the multi-layer one-dimensional convolution method is used to further extract the fused features, and the last layer outputs the daily liquid production prediction, which improves the accuracy and efficiency of daily liquid production prediction, and provides a solution for the prediction of production indicators in intelligent water injection of water-driven oil reservoirs. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is a schematic flow chart of the method of the present invention;

[0062] Figure 2 It is a structural diagram of the daily liquid production prediction model of oil and gas wells of the present invention;

[0063] Figure 3 This is the prediction result of the daily liquid production test set of a certain oil and gas well in Example 1 of the present invention.

[0064] For ordinary technicians in this field, other relevant drawings can be obtained based on the above drawings without any creative work. DETAILED DESCRIPTION

[0065] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.

[0066] like Figure 1 As shown, a method for predicting the daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism includes the following steps:

[0067] S1. Obtain the historical production data of all water injection wells and oil and gas wells in the injection and production unit well group where a single oil and gas well is located, and clean the production data, specifically including the following steps:

[0068] S11, obtaining the well numbers and names of all water injection wells and oil and gas wells in the injection and production unit well group where the single oil and gas well is located;

[0069] S12, according to the well number obtained in step S11, extract the historical production data of the corresponding water injection well and oil and gas well from the production database,

[0070] The historical production data of the water injection wells include the well number, production date, daily water injection volume, wellhead injection pressure, nozzle diameter, casing pressure, injection time and total cumulative injection volume.

[0071] The historical production data of the oil and gas wells include the well number, production date, oil pressure, casing pressure, nozzle diameter, production time, water content and daily liquid production;

[0072] S13. Statistics of missing values:

[0073] Statistics are collected on the missing features of all oil and gas wells and water injection wells. If the average missing feature rate exceeds the set threshold, it indicates that the model training data is insufficient. Otherwise, missing value filling is performed.

[0074] S14. Data missing value filling processing:

[0075] The injection pressure at the wellhead of the water injection well adopts K adjacent filling;

[0076] The daily water injection volume is filled according to the water injection duration of the day multiplied by the hourly average of the daily water injection volume of the previous 10 days;

[0077] The casing pressure of water injection wells, oil pressure and casing pressure of oil and gas wells are filled according to the 5-day moving average. The moving average calculation formula is as follows (1):

[0078] Y t+1 =(Y t +Y t-1 +…+Y t-n+1 ) / n (1)

[0079] Where: Y t+1 is the predicted value, n is the number of days of moving average, here n is 5 days; t is the current date; t+1 refers to the predicted date;

[0080] The daily liquid production is filled according to the production time of the day multiplied by the average daily liquid production hours of the previous 5 days;

[0081] The water content is calculated and filled based on the water production divided by the daily liquid production;

[0082] S15, performing maximum and minimum normalization processing on the data filled with missing values, and scaling them to a certain interval in proportion, so that the values ​​of different features are comparable;

[0083] The formula for the maximum and minimum normalization process is as follows (2):

[0084]

[0085] Where: x′ is the normalized data, x is the historical production characteristic time series data of water injection wells and oil and gas wells, and x min is the minimum value, x max is the maximum value;

[0086] The prior art uses a method for directly predicting the daily liquid production time series, which cannot consider the impact of the water flooding strategy of the water injection well on the liquid production. Step S1 of the present invention fully considers the impact of the water flooding strategy of the injection and production unit on the daily liquid production of the oil and gas wells. Since the production data is relatively accurate and easy to obtain, the data acquisition of the method model is enhanced; at the same time, the data missing situation is considered, and the well group data exceeding the set missing rate will not be able to proceed to the next step of training; a reasonable data filling method is used to fill the missing values ​​to ensure the quality of the model training data.

[0087] S2, performing feature selection and normalization operations on the production data of all water injection wells and oil and gas wells in the injection-production unit well group obtained in step S1; aligning the historical production data of all water injection wells by date using a sliding window, and dividing them into input subsequences of the same length; splicing the daily liquid production in the production data of the oil and gas wells on the predicted date to obtain a data set for inputting into the neural network, specifically comprising the following steps:

[0088] S21. Using the correlation analysis method, calculate the Pearson correlation coefficient between the characteristics of all water injection wells and oil and gas wells and the daily liquid production, measure the strength of the linear relationship between the two quantitative variables, and select the characteristics whose absolute value of the correlation coefficient is greater than the set threshold;

[0089] The characteristics of the water injection well include daily water injection volume, wellhead injection pressure, casing pressure, injection time and total cumulative injection volume;

[0090] The oil and gas well characteristics include oil pressure, production time and water content;

[0091] S22. Characteristics of water injection status of structural water injection wells and production status of oil and gas wells:

[0092] The injection state of water injection wells and the production state of oil and gas wells have a great influence on the daily liquid production, so it is necessary to construct the injection state characteristics of water injection wells and the production state characteristics of oil and gas wells;

[0093] The water injection state characteristics of the structural water injection well are specifically: a value of 1 indicates water injection, and a value of 0 indicates stop injection;

[0094] The production status characteristics of the structural oil and gas wells are specifically: a value of 1 indicates production, and a value of 0 indicates shutdown;

[0095] S23. Considering the time lag of the effect of water injection wells on the liquid production of oil and gas wells, the relevant characteristics of water injection wells in a certain time window length of the injection-production unit well group are helpful to predict the daily liquid production. All water injection well data are aligned and spliced ​​according to the production date, and the daily production data of water injection wells are divided into several subsequences using a sliding window. The calculation formula for the number of subsequences is as follows (3):

[0096]

[0097] Where: M is the number of training sample sequences, m is the total number of days of historical production data of water injection wells, Time_window is the size of the time sliding window, and slide_step is the moving step of the sliding window;

[0098] S24, taking the time series consisting of the daily water injection volume, wellhead injection pressure, casing pressure, injection time, total cumulative injection volume and water injection status of each water injection well in the previous Time_window as the water injection well input data, the oil pressure, production time, water content and production status of the current oil and gas well in the Time_window+1 day as the oil and gas well input data, taking the daily liquid production of the current oil and gas well in the Time_window+1 day as the target variable of the neural network model, and taking the processed M samples as the data set for neural network training;

[0099] S25, division of training set and test set: according to the ratio of training set and test set and the relationship between dates, the water injection well, oil and gas well samples and the predicted target single well daily liquid production data set are divided into training set and test set;

[0100] Step S2 of the present invention selects key factors that have a greater impact on daily liquid production through correlation analysis, and sets a sliding time window to generate a feature training sequence for water injection wells, which can fully consider the time lag of water injection measures; for oil and gas well characteristics, the production status of the oil and gas wells on that day is considered; the shutdown and injection stop features of the constructed injection and production wells can improve the perception of the production status of the prediction results.

[0101] S3. Use the attention mechanism to fuse the characteristics of injection and production wells to build a daily liquid production prediction neural network model. Use K-fold cross validation to evaluate and obtain the training set and validation set. Use the mean square error between the actual daily liquid production of a single oil and gas well and the predicted value of the neural network as the loss function. The prediction target is the daily liquid production of the current oil and gas well. Model training is performed, which specifically includes the following steps:

[0102] S31, obtaining the training set outputted in step S25;

[0103] S32, extracting the features of all water injection wells in the injection-production unit well group, and constructing a neural network layer: the feature extraction method adopts a two-dimensional convolution method, setting the number of filters filters and the convolution kernel size kernel_size, the sliding step length strides, and the number of filters filters is consistent with the number of input features of the oil and gas wells;

[0104] S33, inputting four characteristics of the oil and gas well into the oil and gas well characteristic extraction module;

[0105] The four characteristics of the oil and gas wells include oil pressure, production time, water content and production status;

[0106] S34, fusion of water injection well and oil and gas well features: First, the time of the oil production well needs to correspond to the time window of the water injection well. The method is to copy the oil production well feature vector in the time dimension by the number of times of the time window size and splice it, so that the features of the water injection well on each day can be fused with the features of the oil production well on the same day. On this basis, the dot product calculation is performed on the water injection well features extracted in step S32 and the expanded and spliced ​​features of the oil and gas wells, that is, the elements of the corresponding positions of the feature extraction output vector of each water injection well in the well group and the feature vector of the oil and gas well are multiplied and then added to obtain the fused features;

[0107] S35, using the attention mechanism to calculate the attention weights of the fused features obtained in step S34, to achieve feature extraction after focusing on the fused features at different times, and then perform batch normalization on this basis, and then use 4 layers of one-dimensional convolution to perform feature extraction and dimensionality transformation, the number of convolution kernels in each layer is 128, 64, 32, and 16 respectively, and then through average pooling, one-dimensional convolution, and maximum pooling, output the predicted daily liquid production of a single well;

[0108] S36, the model training process inputs the training set into the constructed prediction model for parameter iteration, realizes the mapping relationship between the feature fusion of all water injection wells and oil and gas wells in the well group and the daily liquid production, the training termination condition is the early stopping strategy, obtains the test results on the test set, stops training when the loss on the test set no longer decreases, or the degree of decrease is less than a certain threshold, outputs the trained neural network model, uses the mean absolute error as the loss function, and uses Adam as the optimizer. The core idea is to calculate the moving average gradient and the moving average square gradient in each time step, and use them to update the model parameters;

[0109] S37, the parameters of the prediction model include the length of the injection well time window Time_window and the learning rate, and a network search algorithm is used to optimize the model parameters;

[0110] S38, using K (K=5) fold cross validation to train the model, dividing the sample set into 5 subsets, selecting K-1 (4) as training data for each training, and using the remaining subset for validation, and finally taking the average of the K (5) performance evaluation results as the evaluation effect;

[0111] Through time series convolution, the long and short cycle characteristics of water injection wells are extracted, and a fusion mechanism is established to fuse the characteristics of water injection wells and oil and gas wells. Then, one-dimensional convolution is used to reduce the dimension to realize the prediction of daily liquid production of a single well. The network search algorithm is used to search the parameters. The constructed neural network prediction model has strong water injection well feature extraction and feature fusion capabilities, avoiding the disadvantage that the prediction model established only by relying on the historical daily liquid production time series cannot be used for the optimization of intelligent injection and production decisions in oil and gas fields.

[0112] S4. Input the test set data into the trained prediction model to predict the daily liquid production of a single well, which specifically includes the following steps:

[0113] S41. Obtain the trained daily liquid production prediction model, predict the test set, and use the mean absolute percentage error MAPE to evaluate the results, as shown in formula (4):

[0114]

[0115] Among them, m is the number of test set samples, and the predicted value and true value are the predicted value and true value of the daily liquid production of the corresponding oil and gas wells;

[0116] S42: Continuously optimize and iterate the single well daily fluid production prediction model based on the test set evaluation results;

[0117] Example 1

[0118] This example takes a well group including 2 water injection wells and 4 oil and gas wells in an oil field in Zhanjiang, Guangdong as an example, and obtains the production data of water injection wells and oil and gas wells from January 1, 2019 to September 16, 2023 for prediction. Figure 1 , 2 As shown in FIG. 1 , a method for predicting the daily liquid production of a single well by fusing the characteristics of injection and production wells using an attention mechanism includes the following steps:

[0119] S1. Obtain the data of all water injection wells and oil and gas wells in the injection-production unit according to the well group division;

[0120] S11, obtaining the injection-production relationship structure of the target injection-production unit, and obtaining the well numbers and names of all water injection wells and oil and gas wells corresponding to the injection-production well group, including two water injection wells and four oil and gas wells;

[0121] S12. According to the well numbers of the two water injection wells and the four oil and gas wells in the well group, the historical production data of the corresponding water injection wells and oil and gas wells are extracted from the production database, including the well number, production date, daily water injection volume, wellhead injection pressure, water nozzle diameter, casing pressure, injection time, and total cumulative injection volume for the water injection wells; and the well number, production date, oil pressure, casing pressure, oil nozzle diameter, production time, water content, daily liquid production, etc. for the oil and gas wells;

[0122] S13. The statistical results of missing values ​​of the well group data show that the average missing rate of the features does not exceed the set threshold of 0.6, and missing value filling processing is required to facilitate model training;

[0123] S14, data missing value filling processing, the wellhead injection pressure of the water injection well is filled by K neighboring filling, the daily water injection volume is filled according to the water injection time of the day multiplied by the hourly average of the daily water injection volume in the previous 10 days, the casing pressure of the water injection well, the oil pressure and casing pressure of the oil and gas well are filled according to the 5-day moving average, the daily liquid production is filled according to the production time of the day multiplied by the hourly average of the daily liquid production in the previous 5 days, and the water content is calculated and filled according to the water production divided by the daily liquid production. The moving average formula is as follows:

[0124] Y t+1 =(Y t +Y t-1 +…+Y t-n+1 ) / n (1)

[0125] Where Y t+1 is the predicted value, n is the number of days of moving average;

[0126] S15. Perform maximum and minimum normalization on the data filled with missing values, and scale them to a certain interval according to a certain ratio, so that the values ​​of different features are comparable, as shown in formula (2):

[0127]

[0128] Where: x′ is the normalized data, x is the historical production characteristic time series data of water injection wells and oil and gas wells, and x min is the minimum value, x max is the maximum value;

[0129] In this embodiment, for the two water injection wells, the data include well number, production date, daily water injection volume, wellhead injection pressure, nozzle diameter, casing pressure, injection time, and total cumulative injection volume. For the four oil and gas wells, the data include well number, production date, oil pressure, casing pressure, nozzle diameter, production time, water content, daily liquid production, etc. Missing values ​​are filled. The data missing does not exceed the set missing threshold of 60%. Therefore, model training can be carried out.

[0130] S2, preprocessing of historical production data of water injection wells and oil and gas wells, using a sliding window mechanism to obtain a data set;

[0131] S21. Use the correlation analysis method to calculate the Pearson correlation coefficient between the characteristics of water injection wells and oil and gas wells and the daily liquid production, measure the linear relationship strength between the two quantitative variables, and select the characteristics whose absolute value of the correlation coefficient is greater than the set threshold. The characteristics of water injection wells include daily water injection volume, wellhead injection pressure, casing pressure, injection time, and total cumulative injection volume. For oil and gas wells, they include oil pressure, production time, and water content;

[0132] S22, the water injection state of the water injection well and the production state of the oil and gas well have a great influence on the daily liquid production. The water injection state characteristics of the water injection well are constructed. The value is set to 1 to indicate water injection, and the value is set to 0 to indicate stop injection. The production state characteristics of the oil and gas well are constructed. The value is set to 1 to indicate production, and the value is set to 0 to indicate stop production.

[0133] S23. Considering the time lag in the effect of water injection wells on the liquid production of oil and gas wells, the relevant characteristics of water injection wells in a certain time window length of the well group unit are helpful to predict the daily liquid production. All water injection well data are aligned and spliced ​​according to the production date, and the daily production data of water injection wells are divided into several subsequences using a sliding window. The formula is shown in formula (3):

[0134]

[0135] Among them, M is the number of training sample sequences, m is the total number of days of historical production data of water injection wells, Time_window is the time sliding window size, set to (120, 90, 60, 30), and the optimal value is 90 days through grid search. Slide_step is the sliding window moving step, set to 1;

[0136] S24. The time series consisting of the daily water injection volume, wellhead injection pressure, casing pressure, injection time, total cumulative injection volume, and water injection status of the two water injection wells before Time_window (set to 90) is used as the input data of the water injection well, and the oil pressure, production time, water content, and production status of the current oil and gas well on the Time_window+1 day are used as the input data of the oil and gas well. The daily liquid production of the current oil and gas well on the Time_window+1 day is used as the target variable of the neural network model, and the processed M samples are used as the data set for neural network training.

[0137] S25. The training set and the test set are divided in a ratio of 8:2. According to the ratio of the training set and the test set and the relationship between the dates, the water injection well, oil and gas well samples and the predicted target single well daily liquid production data set are divided into the training set and the test set.

[0138] In this embodiment, the impact of long-term water injection on daily liquid production of water injection wells needs to be considered. Therefore, in the process of generating training samples, the optimization parameter time window size is set to intercept samples of different lengths. The sizes of different well group time windows are obtained according to different data distributions. Considering the actual oilfield production business, the production status characteristics of water injection wells and oil and gas wells are constructed. Experiments have proved that these two characteristics can effectively improve the accuracy of water injection measures in prediction.

[0139] S3. Use the attention mechanism to integrate the characteristics of injection and production wells to build a daily liquid production prediction neural network model, use cross-validation to obtain the training set and validation set, and the loss function is the mean square error between the actual daily liquid production of a single oil and gas well and the value predicted by the neural network;

[0140] S31, obtaining the training set outputted in step S25;

[0141] S32, construct the neural network layer for feature extraction of all water injection wells in the well group, using a two-dimensional convolution method, setting the number of filters to 4, the convolution kernel size to 1, the sliding step length to 1, and the number of filters to be consistent with the number of input features of the oil and gas wells;

[0142] S33, oil and gas well feature extraction module, inputting four features of an oil and gas well in the well group, including oil pressure, production time, water content, and production status;

[0143] S34, fusion of water injection well and oil and gas well features, performing dot product calculation on the water injection well features extracted in step S32 and the oil and gas well features to obtain fused features;

[0144] S35, obtain the fused features, use the attention mechanism to calculate the attention weights of the fused features, realize the feature extraction after focusing on the fused features at different times, perform batch normalization on this basis, and then use 4 layers of one-dimensional convolution for feature extraction and dimension transformation, the number of convolution kernels in each layer is 128, 64, 32, and 16 respectively, and then pass through the average pooling layer, the number of convolution kernels in the one-dimensional convolution layer is 1, and then the maximum pooling layer is used to output the predicted daily liquid production of a single well;

[0145] S36, the model training process inputs the training set into the constructed prediction model for parameter iteration, realizes the mapping relationship between the feature fusion of all water injection wells and a certain oil and gas well in the well group and the daily liquid production, the training termination condition is the early stopping strategy, obtains the test results on the test set, stops training when the loss on the test set no longer decreases, or the degree of decrease is less than a certain threshold, outputs the trained neural network model, uses the mean absolute error as the loss function, and uses Adam as the optimizer;

[0146] S37, the parameters of the prediction model include the length of the injection well time window Time_window, which is set to (120, 90, 60, 30), and the learning rate, which is set to (0.001, 0.002, 0.003), and a network search algorithm is used to optimize the model parameters;

[0147] S38. Use five-fold cross validation to train the model. Divide the sample set into five subsets. Select four of them as training data for each training, and use the remaining subset for verification. Finally, take the average of the five performance evaluation results as the evaluation effect.

[0148] In this embodiment, the model optimization result is that the time window length of the water injection well is 90, the learning rate is 0.001, the number of iterations is 200, and the batch size is 64. The time window of the water injection well is relatively long, which is consistent with the implementation effect of the water flooding development measures of the oil reservoir. The optimal time window of the water injection well is different for different well groups, and it is necessary to set and optimize the parameters in combination with the actual production of the oil reservoir.

[0149] S4. The test set data is input into the trained prediction model to predict the daily liquid production of a single well.

[0150] S41. Obtain the trained daily liquid production prediction model, predict the test set, and use the mean absolute percentage error MAPE to evaluate the results, as shown in formula (4):

[0151]

[0152] Among them, m is the number of test set samples, and the predicted value and true value are the predicted value and true value of the daily liquid production of the corresponding oil and gas wells;

[0153] S42: Continuously optimize and iterate the single well daily fluid production prediction model based on the test set evaluation results.

[0154] In this embodiment, according to Figure 3 As shown in the figure, the total number of samples in the oil and gas well test set is 241, and the evaluation index MAPE is 95.3, indicating that the prediction result is relatively accurate. In the actual oil field water injection development process, we can use historical water injection well data and oil and gas well data to predict daily liquid production. Accurate daily liquid production prediction can provide important decision support for production managers. By understanding the future liquid production, managers can formulate more accurate and effective production plans, including adjusting water injection volume, oil recovery measures, etc., to maximize the production efficiency and output of oil and gas fields.

[0155] Principle of the present invention:

[0156] The method of the present invention utilizes the attention mechanism, combines the historical data of oil and gas wells and the production history data of each water injection well in the injection and production unit, and captures the complex nonlinear relationship and time-varying property by constructing an attention neural network model to achieve accurate prediction of the daily liquid production of a single oil and gas well. Neural networks have strong generalization capabilities, can handle complex nonlinear relationships and high-dimensional data, and are applicable to various types of oil and gas wells. The prediction capabilities of the present invention will provide important decision-making support for oil fields, helping them to better manage production processes, increase production, and reduce costs.

[0157] The applicant declares that the above is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Those skilled in the art should understand that any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention shall fall within the protection scope and disclosure scope of the present invention.

Claims

1. A method for predicting the daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism, characterized in that: The following steps are involved: S1. Obtain the historical production data of all water injection wells and oil and gas wells in the injection and production unit well group where a single oil and gas well is located, and perform data cleaning on the historical production data; S2, performing feature selection and normalization operations on the historical production data of all water injection wells and oil and gas wells in the injection-production unit well group obtained in step S1; using a sliding window to align the historical production data of all water injection wells by date and divide them into input subsequences of the same length; splicing the daily liquid production of the production status data of the oil and gas wells on the predicted date to obtain a data set for input into the neural network; S3. Use the attention mechanism to integrate the characteristics of injection and production wells to build a daily liquid production prediction neural network model, use K-fold cross-validation evaluation to obtain the training set and validation set, use the mean square error between the actual daily liquid production of a single oil and gas well and the neural network prediction value as the loss function, and use the prediction target as the daily liquid production of the current oil and gas well for model training; S4. The test set data is input into the trained prediction model to predict the daily liquid production of a single well.

2. The method for predicting daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism according to claim 1 is characterized in that: The following steps are involved: The step S1 specifically includes the following steps: S11, obtaining the well numbers and names of all water injection wells and oil and gas wells in the injection and production unit well group where the single oil and gas well is located; S12, extracting historical production data of corresponding water injection wells and oil and gas wells from the production database according to the well number obtained in step S11; S13, statistics are collected on the missing features of all oil and gas wells and water injection wells. If the average missing feature rate exceeds a set threshold, it is indicated that the model training data is insufficient. Otherwise, missing value filling is performed. S14, data missing value filling processing; S15. Perform maximum and minimum normalization processing on the data filled with missing values.

3. The method for predicting daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism according to claim 2, characterized in that: The historical production data of the water injection wells include the well number, production date, daily water injection volume, wellhead injection pressure, water nozzle diameter, casing pressure, injection time and total cumulative injection volume; the historical production data of the oil and gas wells include the well number, production date, oil pressure, casing pressure, oil nozzle diameter, production time, water content and daily liquid production.

4. The method for predicting daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism according to claim 1, characterized in that: The specific method of the step S14 data missing value filling process is: The injection pressure at the wellhead of the water injection well adopts K adjacent filling; The daily water injection volume is filled according to the water injection duration of the day multiplied by the hourly average of the daily water injection volume of the previous 10 days; The casing pressure of water injection wells, oil pressure and casing pressure of oil and gas wells are filled according to the moving average of n days. The calculation formula of moving average is as follows (1): AND t+1 (And t +Y t-1 +?+And t-n+1 ) / n (1) Where: Y t+1 is the predicted value, n is the number of days of moving average; t is the current date; t+1 is the predicted date; ? is the missing value; The daily liquid production is filled according to the production time of the day multiplied by the average daily liquid production hours of the previous n days; The water content is calculated based on the water production divided by the daily liquid production.

5. The method for predicting daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism according to claim 1, characterized in that: The formula for the maximum and minimum normalization processing in step S15 is as follows (2): Where: x' is the normalized data, x is the historical production characteristic time series data of water injection wells and oil and gas wells, x min is the minimum value, x max is the maximum value.

6. The method for predicting daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism according to claim 1, characterized in that: The step S2 specifically includes the following steps: S21. Using the correlation analysis method, calculate the Pearson correlation coefficient between the characteristics of all water injection wells and oil and gas wells and the daily liquid production, measure the strength of the linear relationship between the two quantitative variables, and select the characteristics whose absolute value of the correlation coefficient is greater than the set threshold; The water injection well characteristics include daily water injection volume, wellhead injection pressure, casing pressure, injection time and total cumulative injection volume; The oil and gas well characteristics include oil pressure, production time and water content; S22. Characteristics of water injection status of structural water injection wells and production status of oil and gas wells: The water injection state characteristics of the structural water injection well are specifically: a value of 1 indicates water injection, and a value of 0 indicates stop injection; The production status characteristics of the structural oil and gas wells are specifically: a value of 1 indicates production, and a value of 0 indicates shutdown; S23, align and splice all the water injection well data according to the production date, and use a sliding window to divide the daily production data of the water injection well into a number of training sample sequences. The calculation formula for the number of training sample sequences is as follows (3): Where: M is the number of training sample sequences, m is the total number of days of historical production data of water injection wells, Time_window is the size of the time sliding window, and slide_step is the moving step of the sliding window; S24, taking the time series consisting of the daily water injection volume, wellhead injection pressure, casing pressure, injection time, total cumulative injection volume and water injection status of each water injection well in the previous Time_window as the water injection well input data, the oil pressure, production time, water content and production status of the current oil and gas well in the Time_window+1 day as the oil and gas well input data, taking the daily liquid production of the current oil and gas well in the Time_window+1 day as the target variable of the neural network model, and taking the processed M samples as the data set for neural network training; S25. Division of training set and test set: According to the ratio of training set and test set and the date correlation relationship, the water injection well, oil and gas well samples and the predicted target single well daily liquid production data set are divided into training set and test set.

7. The method for predicting daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism according to claim 1, characterized in that: The step S3 specifically comprises the following steps: S31, obtaining the training set outputted in step S25; S32, extracting the features of all water injection wells in the injection-production unit well group, and constructing a neural network layer: the feature extraction method adopts a two-dimensional convolution method, setting the number of filters filters and the convolution kernel size kernel_size, the sliding step length strides, and the number of filters filters is consistent with the number of input features of the oil and gas wells; S33, inputting four characteristics of the oil and gas well into the oil and gas well characteristic extraction module; The four characteristics of the oil and gas wells include oil pressure, production time, water content and production status; S34, fusion of water injection well and oil and gas well features: performing dot product calculation on the water injection well features and the oil and gas well features extracted in step S32 to obtain fused features; S35, using the attention mechanism to calculate the attention weights of the fused features obtained in step S34, to achieve feature extraction after focusing on the fused features at different times, and then perform batch normalization on this basis, and then use 4 layers of one-dimensional convolution to perform feature extraction and dimensionality transformation, the number of convolution kernels in each layer is 128, 64, 32, and 16 respectively, and then through average pooling, one-dimensional convolution, and maximum pooling, output the predicted daily liquid production of a single well; S36, the model training process inputs the training set into the constructed prediction model for parameter iteration. The training termination condition is the early stopping strategy. The test results are obtained on the test set. When the loss on the test set no longer decreases, or the degree of decrease is less than the threshold, the training is stopped and the trained neural network model is output. The mean absolute error is used as the loss function, and the optimizer is Adam. S37, determining the parameters of the prediction model, and optimizing the model parameters using a network search algorithm; The parameters of the prediction model include the length of the injection well time window Time_window and the learning rate; S38. Use K-fold cross validation for model training: divide the sample set into K subsets, select K-1 as training data for each training, use the remaining subset for verification, and finally take the average of the K performance evaluation results as the evaluation effect.

8. The method for predicting daily liquid production of a single well by fusing injection and production well characteristics using an attention mechanism according to claim 1, characterized in that: The step S4 specifically comprises the following steps: S41. Obtain the trained daily liquid production prediction model, predict the test set, and use the mean absolute percentage error MAPE to evaluate the results. The calculation formula of the mean absolute value percentage error is shown in the following formula (4): Where: m is the number of test set samples, and the predicted value and true value are the predicted value and true value of the daily liquid production of the corresponding oil and gas wells; S42: Continuously optimize and iterate the single well daily fluid production prediction model based on the test set evaluation results.

Citation Information

Cited By

  • Real-time monitoring method for running states of wind power generation host and tower drum

    CN119691478A