Well test interpretation method and system based on image processing algorithm and machine learning algorithm

By applying image processing and machine learning algorithms in well test interpretation technology, we automatically match the well test interpretation curve and calculate reservoir parameters, the problem of noise and outliers in the existing technology is solved, and the accuracy and efficiency of well test interpretation is improved. .

CN119091278BActive Publication Date: 2025-02-18CHENGDU UNIV OF INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411588577.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-18
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

Existing well test interpretation technology faces the problems of noise, outliers or missing data when acquiring physical parameters of oil and gas reservoirs, which makes the interpretation process time-consuming and limited to qualitative evaluation and lacks judgment on the degree of quantitative fitting.

Method used

Using a well trial interpretation method based on image processing algorithms and machine learning algorithms, the data set is constructed and data is expanded by generating images of dimensionless pressure and derivative curves, and the convolutional neural network model is used for training. , interpret the curve to automatically match the most matched well test and calculate the reservoir parameters.

Benefits of technology

It significantly improves the accuracy and efficiency of well test interpretation, reduces the subjectivity and error of artificial explanations, realizes automated processing of well test data, and enhances the diversity of data sets and the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091278B_ABST
    Figure CN119091278B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of oil and gas development in petroleum and natural gas, and discloses a well test interpretation method and system based on image processing algorithm and machine learning algorithm, selects corresponding well test interpretation chart according to oil and gas reservoir type; generates an image for each curve in the well test interpretation chart, converts the image into a grayscale image, performs binarization processing, constructs a dimensionless pressure data set and a dimensionless pressure derivative data set, and generates a label data set according to the order of the curves; generates an extended disturbance data set and adds labels; trains the model through a training function to obtain a trained model for processing pressure data and a model for processing derivative data; obtains discrete data, converts it, and uses the trained model for prediction, calculates the degree of fit and sorts it, selects the best matching well test interpretation curve, and calculates the corresponding reservoir parameters. Through the present invention, efficient and safe exploitation of oil and gas resources can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil and gas development in petroleum and natural gas, and in particular to a well testing interpretation method and system based on image processing algorithm and machine learning algorithm. Background Art

[0002] Oil and gas resources are indispensable energy sources for social development. Therefore, formulating a reasonable development plan is crucial for the efficient exploitation of underground oil and gas resources. In order to scientifically develop oil and gas resources, it is necessary to obtain various physical parameters of oil and gas reservoirs, such as porosity, permeability and saturation, so as to quantify development indicators and formulate reasonable development strategies. Well test interpretation, as an effective means, can help engineers obtain these key physical parameters. These parameters play an important role in evaluating reservoir characteristics, predicting oil and gas well productivity, and optimizing production strategies. However, in the process of obtaining oil and gas reservoir physical parameters using well test interpretation technology, it is first necessary to fit the corresponding curves in the well test interpretation chart with the downhole measured pressure data. Only after the curve is successfully fitted can the oil and gas reservoir be accurately interpreted. However, there are many challenges in this process: the downhole measured pressure data may contain noise, outliers or missing data, which requires the interpreter to manually find a curve that matches the measured data. In addition, different oil and gas reservoir models correspond to different well test interpretation charts. Therefore, in the matching process, the interpreter often needs to rely on experience to judge which chart the data matches. This not only consumes a lot of manpower, but the matching process is limited to qualitative rather than quantitative evaluation of the degree of fit. Therefore, how to improve the efficiency of well test interpretation has become a technical problem that needs to be solved urgently. In recent years, the application of image processing algorithms and machine learning algorithms in the field of oil and gas engineering has received increasing attention, providing new solutions to complex problems. Summary of the invention

[0003] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a well test interpretation method based on image processing algorithm and machine learning algorithm, comprising the following steps:

[0004] Step 1: selecting a corresponding well test interpretation chart according to the type of oil and gas reservoir, wherein the well test interpretation chart includes a plurality of dimensionless pressure curves and dimensionless pressure derivative curves, and the dimensionless pressure curves and the dimensionless pressure derivative curves correspond to each other one by one;

[0005] Step 2: Generate an image for each curve in the well test interpretation chart, convert the image into a grayscale image, perform binarization, extract pixel coordinate points with a value of 0, and standardize the pixel coordinate points; save the standardized pixel coordinate points, construct a dimensionless pressure data set and a dimensionless pressure derivative data set, and generate a label data set according to the curve sequence;

[0006] Step 3, expanding the dimensionless pressure data set and the dimensionless pressure derivative data set to generate an expanded disturbance data set, and adding labels;

[0007] Step 4: Convert the perturbation data in the expanded perturbation data set into an image format through an image conversion function, and perform data segmentation into a training set and a test set;

[0008] Step 5: dynamically set the output size according to the number of labels, build a convolutional neural network model, and obtain a model for processing pressure data and a model for processing derivative data; train the model through a training function to obtain a trained model for processing pressure data and a model for processing derivative data;

[0009] Step six: Obtain discrete data, convert them, and use the trained model to make predictions, calculate the degree of fit and sort them, select the best matching well test interpretation curve, and calculate the corresponding reservoir parameters.

[0010] Furthermore, the step of constructing a dimensionless pressure data set and a dimensionless pressure derivative data set, and generating a label data set in curve order, includes:

[0011] The standardized coordinate values ​​are constructed into a standardized dimensionless pressure data set and a standardized dimensionless pressure derivative data set corresponding to the dimensionless pressure data set and the dimensionless pressure derivative data set in the well test interpretation chart. A label data set is generated according to the order of the curves on the well test interpretation chart, and the serial number of each curve is saved as a label.

[0012] Furthermore, the expansion of the dimensionless pressure data set and the dimensionless pressure derivative data set to generate a disturbance data set and add labels includes:

[0013] Step 11: construct a data augmentation function dataAugmentation, wherein the data augmentation function is used to receive the original data, the label and the number of disturbance data to be generated; wherein the original data is a dimensionless pressure data set and a dimensionless pressure derivative data set;

[0014] Step 12: Construct a perturbation function inside the data expansion function, where the perturbation function is used to add random perturbations to the original data;

[0015] Step 13: Generate perturbed data using a loop, and add the generated perturbed data and corresponding labels to the expanded dataset and label set;

[0016] Step 14: Apply the data expansion function to the standardized dimensionless pressure data and the standardized dimensionless pressure derivative data respectively to generate an expanded perturbation data set and a label set.

[0017] Furthermore, the perturbation data in the expanded perturbation data set is converted into an image format through an image conversion function, and the data is segmented into a training set and a test set, including:

[0018] Step 21: construct an image conversion function dataToImage, wherein the image conversion function converts the disturbance data in the disturbance data set into an image format; and uses the image conversion function to convert the expanded disturbance data set into an image to obtain an image data set, wherein the image data set includes an expanded dimensionless pressure image and an expanded dimensionless pressure derivative image; Step 22: construct a data segmentation function, wherein the segmentation function is used to segment the data into a training set and a test set; use the data segmentation function to segment the expanded dimensionless pressure image and the expanded dimensionless pressure derivative image and their corresponding labels into a training set and a test set.

[0019] Furthermore, the output size is dynamically set according to the number of labels, a convolutional neural network model is constructed, and a model for processing pressure data and a model for processing pressure derivative data are obtained, including:

[0020] Step 31: Convert the label into a code that can be recognized by the neural network;

[0021] Step 32: construct a convolutional neural network model, wherein the convolutional neural network model includes a convolutional layer, a batch normalization layer, an activation function, a pooling layer, a global pooling layer and a fully connected layer connected in sequence;

[0022] Step 33: Set the model parameters according to the number of labels, dynamically adjust the output size of the classification layer according to the number of labels, and obtain two independent convolutional neural network models to classify the pressure data and pressure derivative data respectively.

[0023] Furthermore, the discrete data is obtained, converted, predicted using the trained model, the degree of fit is calculated and sorted, the best matching well test interpretation curve is selected, and the corresponding reservoir parameters are calculated, including:

[0024] Step 41: converting the obtained discrete data into a discrete point graph of pressure changing with time and pressure derivative changing with time; wherein the discrete data is a set of discrete point data of pressure changing with time that needs to be interpreted by well test;

[0025] Step 42: After the image is processed, the curve coordinates are extracted and normalized to be within the range of [0,1];

[0026] Step 43: offset the normalized coordinates according to the set range, the horizontal coordinates according to the set step length, and the vertical coordinates according to the set step length, generate an image and record the offset;

[0027] Step 44: using the two independent trained convolutional neural network models to process the images respectively, and obtaining the fitting degree of the output results of the two independent convolutional neural network models;

[0028] Step 45: Calculate the composite fit degree according to the fit degree of the output results of the two independent convolutional neural network models, select the best matching well test interpretation curve, and output the corresponding label;

[0029] Step 46: Calculate the corresponding reservoir parameters based on the matched well test interpretation curve and the offset.

[0030] Furthermore, the composite degree of fit is calculated based on the degree of fit of the output results of the two independent convolutional neural network models, using the following formula:

[0031] P = (w 1 ×P 1 +w 2 ×P 2 ) / (w 1 +w 2 )

[0032] Where P 1 and P 2 are the fitting degrees of the two convolutional neural network models, where w 1 and w 2 P 1 and P 2 Weights indicate the relative importance of each degree of fit in the composite degree of fit.

[0033] Furthermore, the corresponding reservoir parameters are calculated according to the matched well test interpretation curve and the offset, including:

[0034] According to the calculated composite fitting degree, the pressure curve and pressure derivative curve with the highest fitting degree are obtained. According to the recorded offset and the label corresponding to the curve in the well test interpretation plate, the variable C of the well test curve corresponding to the infinite homogeneous reservoir is obtained according to the label. D e 2s Take the value and get the well test interpretation parameters.

[0035] A well test interpretation system based on image processing algorithm and machine learning algorithm, applying the well test interpretation method based on image processing algorithm and machine learning algorithm, including a well test interpretation chart database, a data processing module, a convolutional neural network module, a data acquisition module and a communication module;

[0036] The convolutional neural network module, data acquisition module and communication module are respectively connected to the data processing module; the well test interpretation chart database is communicatively connected to the communication module.

[0037] The beneficial effects of the present invention are as follows: through the intelligent interpretation method of well testing based on machine learning algorithm, the well testing data is automatically processed, the subjectivity and error of human interpretation are reduced, and the accuracy and efficiency of well testing interpretation are significantly improved; the image processing technology effectively eliminates the influence of double logarithmic coordinates, realizes the standardization of data, provides convenience for subsequent data processing and model training, and further improves the accuracy and efficiency of well testing interpretation; the use of extension technology to generate perturbation data sets and add labels effectively increases the diversity of data sets, so that the trained model has stronger generalization ability and robustness; through the trained convolutional neural network model, the most suitable well testing interpretation curve can be automatically matched, which greatly simplifies the curve matching steps in the traditional well testing interpretation process. The method of the present invention has a clear process, a high degree of automation, is easy to promote and apply in the oil and gas field industry, and helps to improve the well testing interpretation level of the entire industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is a flow chart of the well test interpretation method based on image processing algorithm and machine learning algorithm.

[0039] Figure 2 It is a schematic diagram of a single well test curve of an infinite homogeneous oil reservoir involved in an embodiment of the method of the present invention.

[0040] Figure 3 It is a schematic diagram of a set of pressure curves in the well test curve involved in the method embodiment of the present invention.

[0041] Figure 4 It is a schematic diagram of a set of pressure derivative curves in the well test curve involved in the method embodiment of the present invention.

[0042] Figure 5 It is a schematic diagram of a pressure curve in a well test curve involved in an embodiment of the method of the present invention after being processed.

[0043] Figure 6 It is a schematic diagram of a pressure derivative curve in a well test curve involved in an embodiment of the method of the present invention after being processed.

[0044] Figure 7 It is a schematic diagram of single well pressure data and pressure derivative data involved in the method embodiment of the present invention.

[0045] Figure 8 A schematic diagram of the offset of single well pressure data involved in the method embodiment of the present invention.

[0046] Fig. 9A schematic diagram of the offset of single well pressure derivative data involved in the method embodiment of the present invention. DETAILED DESCRIPTION

[0047] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following.

[0048] The features and performance of the present invention are further described in detail below in conjunction with the embodiments.

[0049] like Figure 1 As shown in FIG. 1 , the well test interpretation method based on the image processing algorithm and the machine learning algorithm includes the following steps:

[0050] Step 1: selecting a corresponding well test interpretation chart according to the type of oil and gas reservoir, wherein the well test interpretation chart includes a plurality of dimensionless pressure curves and dimensionless pressure derivative curves, and the dimensionless pressure curves and the dimensionless pressure derivative curves correspond to each other one by one;

[0051] Step 2: Generate an image for each curve in the well test interpretation chart, convert the image into a grayscale image, perform binarization, extract pixel coordinate points with a value of 0, and standardize the pixel coordinate points; save the standardized pixel coordinate points, construct a dimensionless pressure data set and a dimensionless pressure derivative data set, and generate a label data set according to the curve sequence;

[0052] Step 3, expanding the dimensionless pressure data set and the dimensionless pressure derivative data set to generate an expanded disturbance data set, and adding labels;

[0053] Step 4: Convert the perturbation data in the expanded perturbation data set into an image format through an image conversion function, and perform data segmentation into a training set and a test set;

[0054] Step 5: dynamically set the output size according to the number of labels, build a convolutional neural network model, and obtain a model for processing pressure data and a model for processing derivative data; train the model through a training function to obtain a trained model for processing pressure data and a model for processing derivative data;

[0055] Step six: Obtain discrete data, convert them, and use the trained model to make predictions, calculate the degree of fit and sort them, select the best matching well test interpretation curve, and calculate the corresponding reservoir parameters.

[0056] The step of constructing a dimensionless pressure data set and a dimensionless pressure derivative data set, and generating a label data set in curve order, includes:

[0057] The standardized coordinate values ​​are constructed into a standardized dimensionless pressure data set and a standardized dimensionless pressure derivative data set corresponding to the dimensionless pressure data set and the dimensionless pressure derivative data set in the well test interpretation chart. A label data set is generated according to the order of the curves on the well test interpretation chart, and the serial number of each curve is saved as a label.

[0058] The expansion of the dimensionless pressure data set and the dimensionless pressure derivative data set to generate a disturbance data set and add labels includes:

[0059] Step 11: construct a data expansion function, wherein the data expansion function is used to receive the original data, the label, and the number of perturbation data to be generated;

[0060] Step 12: Construct a perturbation function inside the data expansion function, where the perturbation function is used to add random perturbations to the original data;

[0061] Step 13: Generate perturbed data using a loop, and add the generated perturbed data and corresponding labels to the expanded dataset and label set;

[0062] Step 14: Apply the data expansion function to the standardized dimensionless pressure data and the standardized dimensionless pressure derivative data respectively to generate an expanded perturbation data set and a label set.

[0063] The original data here refers to the dimensionless pressure data set and the dimensionless pressure derivative data set. The data augmentation function dataAugmentation aims to generate new data samples by adding random perturbations to the original data to enhance the diversity of the data set. This function receives three parameters: the original data set data (including the dimensionless pressure data set and the dimensionless pressure derivative data set), the corresponding label set labels, and the number of perturbation data to be generated numAugmented.

[0064] Inside the data expansion function, a perturbation function perturb is defined. This function is responsible for adding random perturbations to the input data samples. The amplitude of the perturbation is controlled within a certain range according to the data size (for example, between -0.05 and 0.05), and the dimension of the perturbation matches the dimension of the input data sample.

[0065] The process of generating a perturbed data set is:

[0066] 1. Initialize two empty lists augmentedData and augmentedLabels to store the generated perturbation data and their corresponding labels.

[0067] 2. Use two loops to generate perturbed data: the outer loop iterates over every sample in the original dataset, and the inner loop generates a specified amount of perturbed data for each sample.

[0068] 3. In each inner loop, call the perturbation function perturb to add random perturbations to the current sample, and add the generated perturbation data to the augmentedData list.

[0069] 4. At the same time, add the label of the current sample to the augmentedLabels list to ensure that each perturbed data has a corresponding label.

[0070] 5. Repeat the above process until the specified number of perturbation data has been generated for each sample in the original dataset.

[0071] 6. Finally, the function returns the expanded data set augmentedData and its corresponding label set augmentedLabels.

[0072] The perturbation data in the expanded perturbation data set is converted into an image format through the image conversion function, and the data is segmented into a training set and a test set, including:

[0073] Step 21: constructing an image conversion function, wherein the image conversion function converts the disturbance data in the disturbance data set into an image format; using the image conversion function to convert the expanded disturbance data set into an image to obtain an image data set, wherein the image data set includes an expanded dimensionless pressure image and an expanded dimensionless pressure derivative image;

[0074] Step 22: construct a data segmentation function, wherein the segmentation function is used to segment the data into a training set and a test set; use the data segmentation function to segment the expanded dimensionless pressure image and the expanded dimensionless pressure derivative image and their corresponding labels into a training set and a test set.

[0075] Specifically, the image conversion function is the dataToImage function, which converts the input data (here, the data in the perturbation data set) into an image format. This function receives a dataset as input, processes each data sample in the set, and finally generates a corresponding image set.

[0076] Image data processing process:

[0077] 1. Data input: The function receives a dataset as input, which contains the data samples that need to be converted into images.

[0078] 2. Data visualization: For each data sample in the set, visualize it. Generate a line graph in double logarithmic coordinates, where the points of the data samples are connected to form a curve. Make sure that all data points are included in the generated image.

[0079] 3. Image resizing: The generated image is resized, for example, to a width of 500 pixels, for ease of subsequent processing.

[0080] 4. Image set generation: The above image generation and resizing process is performed on each data sample in the input data set, and finally a set containing all converted images is generated.

[0081] 5. Function output: The function returns the generated image set.

[0082] The method of dynamically setting the output size according to the number of labels, constructing a convolutional neural network model, and obtaining a model for processing pressure data and a model for processing pressure derivative data includes:

[0083] Step 31: Convert the label into a code that can be recognized by the neural network;

[0084] Step 32: construct a convolutional neural network model, wherein the convolutional neural network model includes a convolutional layer, a batch normalization layer, an activation function, a pooling layer, a global pooling layer and a fully connected layer connected in sequence;

[0085] Step 33: Set the model parameters according to the number of labels, dynamically adjust the output size of the classification layer according to the number of labels, and obtain two independent convolutional neural network models to classify the pressure data and pressure derivative data respectively.

[0086] The obtained discrete data is converted and predicted using the trained model, the degree of fit is calculated and sorted, the best matching well test interpretation curve is selected, and the corresponding reservoir parameters are calculated, including:

[0087] Step 41: converting the acquired discrete data into a discrete point graph showing changes of pressure over time and pressure derivative over time;

[0088] Step 42: After the image is processed, the curve coordinates are extracted and normalized to be within the range of [0,1];

[0089] Step 43: offset the normalized coordinates within a certain range, with the horizontal coordinates offsetting according to a certain step length and the vertical coordinates offsetting according to a certain step length, and record the offset amount and the generated image;

[0090] Step 44: Use the two trained independent convolutional neural network models to process the images respectively, and calculate the degree of fit of the output results of the two independent convolutional neural network models;

[0091] Step 45: Calculate the composite fitting length according to the fitting degree of the output results of the two independent convolutional neural network models, select the best matching well test interpretation curve, and output the corresponding label;

[0092] Step 46: Calculate the corresponding reservoir parameters based on the matched well test interpretation curve and the offset.

[0093] The composite degree of fit is calculated based on the degree of fit of the output results of the two independent convolutional neural network models, using the following formula:

[0094] P = (w 1 ×P 1 +w 2 ×P 2 ) / (w 1 +w 2 )

[0095] Where P 1 and P 2 are the fitting degrees of the two convolutional neural network models, where w 1 and w 2 P 1 and P 2 Weights indicate the relative importance of each degree of fit in the composite degree of fit.

[0096] The calculation of the corresponding reservoir parameters according to the matched well test interpretation curve and the offset includes:

[0097] According to the calculated composite fitting degree, the pressure curve and pressure derivative curve with the highest fitting degree are obtained. According to the recorded offset and the label corresponding to the curve in the well test interpretation plate, the variable C of the well test curve corresponding to the infinite homogeneous reservoir is obtained according to the label. D e 2s Take the value and get the well test interpretation parameters.

[0098] A well test interpretation system based on image processing algorithm and machine learning algorithm, applying the well test interpretation method based on image processing algorithm and machine learning algorithm, including a well test interpretation chart database, a data processing module, a convolutional neural network module, a data acquisition module and a communication module;

[0099] The convolutional neural network module, data acquisition module and communication module are respectively connected to the data processing module; the well test interpretation chart database is communicatively connected to the communication module.

[0100] Specifically, the embodiment provides a well test interpretation method based on an image processing algorithm and a machine learning algorithm, and the specific steps are as follows:

[0101] Step 1: Generate a well test interpretation plate and a plate set of a single curve in the interpretation plate.

[0102] (1) Select the corresponding well testing mathematical model according to the type of oil and gas reservoir.

[0103] (2) Generate a well test interpretation chart, which is a double logarithmic coordinate system, in which the horizontal axis represents dimensionless time and the vertical axis represents dimensionless pressure and dimensionless pressure derivative. On an interpretation chart, a mathematical model is used to draw multiple one-to-one corresponding dimensionless pressure curves and dimensionless pressure derivative curves.

[0104] (3) Use mathematical models to draw each curve on the interpretation chart separately, forming a collection of multiple single well test curve charts.

[0105] Step 2: Perform image processing on a collection of multiple single well test curve plates to eliminate the influence of double logarithmic coordinates.

[0106] (1) Convert each single well test curve plate into a grayscale image;

[0107] (2) Binarize the grayscale image and convert it into two values: 0 (black) or 1 (white);

[0108] (3) Extract the pixel coordinates with a value of 0 in the binary image. These coordinates represent the points on the curve.

[0109] (4) The extracted coordinate points are standardized to the range of [0, 1] to eliminate the dimension effect and facilitate subsequent processing.

[0110] (5) Redraw the graph using the standardized coordinates for subsequent data processing and model training.

[0111] Step 3: Generate standardized datasets and labels.

[0112] (1) The standardized coordinate values ​​of each well test curve in step 2 are constructed into a dimensionless pressure data set and a dimensionless pressure derivative data set.

[0113] (2) Generate a label data set according to the order of each single curve on the well test interpretation chart, and save the sequence number of each curve as a label.

[0114] Step 4: Expand the data based on the standardized data set to meet the needs of training neural networks.

[0115] (1) Define the data expansion function, which receives the original data, the label, and the number of perturbation data to be generated.

[0116] (2) Define a perturbation function inside the function to add random perturbations to the original data.

[0117] (3) Generate perturbation data cyclically and add it to the expanded dataset and label set.

[0118] (4) Apply the expansion function to the standardized dimensionless pressure data and dimensionless derivative data to generate the perturbation data set and label set, respectively.

[0119] Step 5: Perform data conversion and segmentation to generate the data set required for the final training.

[0120] (1) Convert the expanded perturbation dataset into images.

[0121] (2) Define the data splitting function to split the data set into training set and test set.

[0122] (3) Use the data segmentation function to split the images and their labels into training and test sets.

[0123] Step 6: Define the convolutional neural network model.

[0124] (1) Convert the label into an encoding that the neural network can recognize.

[0125] (2) Define a convolutional neural network model, including convolutional layers, batch normalization layers, activation functions, pooling layers, global pooling layers, and fully connected layers.

[0126] (3) Set model parameters according to the number of labels and dynamically adjust the output size of the classification layer.

[0127] (4) Define two independent convolutional neural network models to process pressure data and derivative data respectively.

[0128] Step 7: Train the convolutional network model based on the data generated in step 5.

[0129] (1) Define the training function for training the convolutional neural network model.

[0130] (2) Use the training function to train the model and obtain the trained model.

[0131] Step 8: Use the trained model to interpret the measured downhole pressure data.

[0132] (1) Convert the new discrete data into a discrete point graph showing pressure versus time and pressure derivative versus time.

[0133] (2) Process the image and extract and standardize the curve coordinates according to step 2.

[0134] (3) The standardized coordinates are offset to generate a set of multiple images with certain intervals between the horizontal coordinates and the vertical coordinates.

[0135] (4) Use the trained model to process the image collection and calculate the degree of fit.

[0136] (5) The composite fitting degree is calculated based on the fitting degrees of the two neural networks, the best matching well test interpretation curve is selected, and the corresponding labels and the coordinate offset values ​​between the measured curve and the well test curve are output.

[0137] (6) Calculate the corresponding reservoir parameters based on the coordinate offset value and the matching well test curve.

[0138] The embodiments are further described below in conjunction with specific examples.

[0139] Step 1: Select the well test model according to the oil and gas reservoir type, and use the corresponding mathematical model to generate the well test interpretation chart, such as Figure 2 As shown, it is a single well test curve plate of infinite homogeneous reservoir, with a total of 16 groups, namely 16 groups of dimensionless pressure curves and 16 groups of dimensionless pressure derivative curves, corresponding to the infinite homogeneous reservoir well test curve variables C D e 2s , C D e 2s The value range is {10^(-1), 3×10^(-1), 1, 3, 10, 10^2, 10^3, 10^4, 10^6, 10^8, 10^10, 10^15, 10^20, 10^30, 10^40, 10^50}. Then, the dimensionless pressure curve and the dimensionless pressure derivative curve in the well test interpretation chart are extracted by using the mathematical model, and each curve is drawn separately. Figure 3 and Figure 4 shown.

[0140] Step 2: Grayscale the pressure curve and the pressure derivative curve, extract the curve coordinates and normalize them, and then redraw the graph with the normalized coordinates, such as Figure 5 and Figure 6 shown.

[0141] The third step is to Figure 5 and Figure 6 The coordinate values ​​of the middle curve are saved. Figure 5 The coordinate values ​​in the curve correspond to the dimensionless pressure data set, Figure 6The coordinate values ​​in the curves correspond to the dimensionless pressure derivative data set, and each curve is numbered according to its position in the well test interpretation chart to generate a data label set. In this embodiment, the data labels are {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, a total of 16 curves, and the number of dimensionless pressure curves is consistent with that of dimensionless pressure derivative curves, corresponding to the infinite homogeneous reservoir well test curve variable C D e 2s Get the value.

[0142] The fourth step is to perturb the data set generated in the third step to generate an extended data set, which corresponds to the dimensionless pressure data perturbation set and the dimensionless pressure derivative data set. Specifically, random numbers can be added to the pressure values ​​and pressure derivative values ​​in the original data set. Each time a random number is added, the range is controlled within 30% error, and then the corresponding label is added to the generated perturbed data set. For example, the label corresponding to the first curve is 1. If the first curve perturbation generates 20 perturbed curves corresponding to the perturbation data sets, then the labels corresponding to these 20 perturbed data sets are all 1.

[0143] In the fifth step, 80% of the generated perturbation data set is used as a training set and 20% of the data is used as a test set, and finally the training set and test set of pressure data and the training set and test set of pressure derivative data are obtained.

[0144] The sixth step is to convert the data labels into one-bit valid codes. For example, label 1 is converted to {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0} and label 2 is converted to {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}.

[0145] The seventh step is to build a convolutional neural network, one for each pressure data and one for each pressure derivative. The convolutional neural network model consists of a series of convolutional layers, batch normalization layers, activation functions, pooling layers, global pooling layers, and fully connected layers. The mathematical model of the convolutional neural network is constructed in the following way:

[0146] Assume that the input image size is (𝐻 0 ,𝑊 0 ,𝐶 0 ), the number of categories is K , K In the embodiment, it is the number of curves in the well test interpretation chart:

[0147] 1. Input image: 𝑋∈𝑅 𝐻0×𝑊0×𝐶0

[0148] 2. The first convolutional layer: the convolution kernel size is 5×5, the number of convolution kernels is 32, and the padding size is 2

[0149] Output: 𝑌 1 =Conv(𝑋;𝑊 1 ,𝑏 1 )

[0150] 𝑊 1 ∈𝑅 5×5×𝐶0×32 ,𝑏 1 ∈𝑅 32

[0151] 3. The first batch normalization layer + activation function (ReLU):

[0152] Batch Normalization: 𝑌 2 =BatchNorm(𝑌 1 )

[0153] Activation function: 𝑌 3 =ReLU(𝑌 2 )

[0154] 4. The first pooling layer: the pooling window size is 2×2

[0155] Output: 𝑌 4 =Pooling(𝑌 3 ;2×2)

[0156] Pooling halves the size, and the output size is (𝐻 0 / 2,𝑊 0 / 2,32)

[0157] 5. The second convolutional layer: the convolution kernel size is 5×5, the number of convolution kernels is 64, and the padding size is 2

[0158] Output: 𝑌 5 =Conv(𝑌 4 ;𝑊 2 ,𝑏 2 )

[0159] 𝑊 2 ∈𝑅 5×5×32×64 ,𝑏2∈𝑅 64

[0160] 6. The second batch normalization layer + activation function (ReLU):

[0161] Batch Normalization: 𝑌 6 =BatchNorm(𝑌 5 )

[0162] Activation function: 𝑌 7 =ReLU(𝑌 6 )

[0163] 7. The second pooling layer: the pooling window size is 2×2

[0164] Output: 𝑌8=Pooling(𝑌 7 ;2×2)

[0165] Pooling halves the size, and the output size is (𝐻 0 / 4,𝑊 0 / 4,64)

[0166] 8. The third convolution layer: the convolution kernel size is 5×5, the number of convolution kernels is 128, and the padding size is 2

[0167] Output: 𝑌 9 =Conv(𝑌 8 ;𝑊 3 ,𝑏 3 )

[0168] 𝑊 3 ∈𝑅 5×5×64×128 , 𝑏 3 ∈𝑅 128

[0169] 9. The third batch normalization layer + activation function (ReLU):

[0170] Batch Normalization: 𝑌 10 =BatchNorm(𝑌 9 )

[0171] Activation function: 𝑌 11 =ReLU(𝑌 10 )

[0172] 10. The third pooling layer: the pooling window size is 2×2

[0173] Output: 𝑌 12 =Pooling(𝑌 11 ;2×2)

[0174] 11. Global average pooling layer:

[0175] Output: 𝑌 13 =GlobalAvgPooling(𝑌 12 )

[0176] Convert a tensor of dimension (𝐻,𝑊,𝐶) to (1,1,𝐶) where 𝐶=128.

[0177] 12. Fully connected layer 1:

[0178] Output: 𝑌 14 =𝑌 13 ⋅𝑊 4 +𝑏 4

[0179] · W 4 ∈R 128×128 ,𝑏 4 ∈𝑅 128

[0180] 13. Activation function (ReLU):

[0181] Output: 𝑌 15 =ReLU(𝑌 14 )

[0182] 14. Fully connected layer 2:

[0183] Output: 𝑌 16 =𝑌 15 ⋅𝑊 5 +𝑏 5

[0184] 𝑊 5 ∈𝑅 128×𝐾 ,𝑏 5 ∈𝑅 𝐾

[0185] 15. Final Softmax layer:

[0186] Output: 𝑌 17 =Softmax(𝑌 16 )

[0187] Softmax converts the output into a probability distribution, 𝑌 17 ∈𝑅 𝐾

[0188] in

[0189] Conv(𝑋;𝑊,𝑏)Conv( X ; W , b ) represents the convolution operation.

[0190] BatchNorm(𝑋) X ) represents the batch normalization operation.

[0191] ReLU(𝑋)ReLU( X ) represents the ReLU activation function.

[0192] Pooling(𝑋;𝑘) X ; k ) represents the pooling operation, and the window size is 𝑘.

[0193] GlobalAvgPooling(𝑋) represents the global average pooling operation.

[0194] Softmax(𝑋) represents the Softmax operation.

[0195] Step 8: Define the training function for training the convolutional neural network model in the following form:

[0196] 1. Define training data and test data:

[0197] Training Dataset: , where 𝑋 𝑖 is the training input and 𝑦 is the training label.

[0198] Test Dataset: , where 𝑋 𝑗 𝑣𝑎l is the validation input, 𝑦 𝑗 𝑣𝑎l Is the verification tag.

[0199] 2. Define model parameters:

[0200] The neural network model 𝑀 has the parameter set θ , these parameters will be updated during the training process.

[0201] 3. Define the loss function (cross entropy loss function):

[0202] For a single sample (𝑋,𝑦), the model predicts output ,in is the probability output of the model.

[0203] The formula for the cross entropy loss function is:

[0204] in y k represents the encoding of the true label, Represents the predicted probability of the corresponding category.

[0205] 4. Training process: Use gradient descent to minimize the loss function.

[0206] Assume that the learning rate for each gradient descent step 𝑡 is 𝜂:

[0207] Calculate the gradient of the loss function:

[0208] Update parameters:

[0209] 5. Validation process: After each round of training, the validation set is used to evaluate the model performance.

[0210] Validation loss:

[0211] 6. Save checkpoints during training:

[0212] After each round of training, save the model parameters 𝜃 and store them in the specified directory.

[0213] 7. Maximum number of training rounds: The maximum number of training rounds is set to 1000.

[0214] The ninth step is to train the model using the training function to obtain a trained model, which can be used to predict the degree of fit between new data and each curve in the well test interpretation chart.

[0215] The tenth step is to plot the single well pressure data that needs to be interpreted as a double logarithmic graph of pressure versus time and pressure derivative versus time. The graph directly uses discrete points, such as Figure 7 Then Figure 7 The pressure data and pressure derivative data in the image are offset by a certain amount to offset the horizontal and vertical coordinates of the data, and generate multiple offset curve graphs, such as Figure 8 and Fig. 9 As shown, Figure 8 This is the data after the pressure data is offset left and right. Fig. 9 In order to offset the pressure derivative data left and right, it is actually necessary to offset the data up, down, left and right so that the curve covers all areas of the plate as much as possible, and record the horizontal and vertical offsets of each plate relative to the original coordinates {0,0}.

[0216] In the eleventh step, the images generated in the tenth step are respectively brought into the convolutional neural network model trained in the ninth step to calculate the fitting degree of the 16 curves in the well test interpretation chart corresponding to each image. The convolutional neural network model corresponding to the pressure data calculates a set of fitting degrees, and the convolutional neural network model corresponding to the pressure derivative data calculates a set of fitting degrees. Then, a weighted composite fitting degree is calculated. Let P 1 and P 2 They are the fitting degree calculated by two convolutional neural network models for a pair of images generated in the tenth step and a curve for the well test interpretation chart, w 1 and w 2is the corresponding weight, then the weighted composite fitting degree can be calculated by the following formula:

[0217] P = (w 1 ×P 1 +w 2 ×P 2 ) / (w 1 +w 2 )

[0218] Weight w 1 and w 2 Non-negative, indicating the relative importance of each degree of fit in the composite degree of fit.

[0219] Step 12: Sort by the calculated composite fitting degree and select the pressure curve and pressure derivative curve with the highest fitting degree. After finding them, we can obtain the corresponding infinite homogeneous reservoir well test curve variable C according to the label based on the horizontal and vertical coordinate offsets recorded in step 10 and the labels corresponding to the curves in the well test interpretation chart. D e 2s Take the values ​​and calculate the well test interpretation parameters of the well.

Claims

1. A well test interpretation method based on image processing algorithm and machine learning algorithm, characterized in that: The steps include: Step 1: selecting a corresponding well test interpretation chart according to the type of oil and gas reservoir, wherein the well test interpretation chart includes a plurality of dimensionless pressure curves and dimensionless pressure derivative curves, and the dimensionless pressure curves and the dimensionless pressure derivative curves correspond to each other one by one; Step 2: Generate an image for each curve in the well test interpretation chart, convert the image into a grayscale image, perform binarization, extract pixel coordinate points with a value of 0, and standardize the pixel coordinate points; save the standardized pixel coordinate points, construct a dimensionless pressure data set and a dimensionless pressure derivative data set, and generate a label data set according to the curve sequence; Step 3, expanding the dimensionless pressure data set and the dimensionless pressure derivative data set to generate an expanded disturbance data set, and adding labels; Step 4: Convert the perturbation data in the expanded perturbation data set into an image format through an image conversion function, and perform data segmentation into a training set and a test set; Step 5: dynamically set the output size according to the number of labels, build a convolutional neural network model, and obtain a model for processing pressure data and a model for processing derivative data; train the model through a training function to obtain a trained model for processing pressure data and a model for processing derivative data; Step 6: Obtain discrete data, convert them, and use the trained model to make predictions, calculate the degree of fit and sort them, select the best matching well test interpretation curve, and calculate the corresponding reservoir parameters; The discrete data is obtained, converted, and predicted using the trained model, the degree of fit is calculated and sorted, the best matching well test interpretation curve is selected, and the corresponding reservoir parameters are calculated, including: Step 41: converting the obtained discrete data into a discrete point graph of pressure changing with time and pressure derivative changing with time; wherein the discrete data is a set of discrete point data of pressure changing with time that needs to be interpreted by well test; Step 42: After the image is processed, the curve coordinates are extracted and normalized to be within the range of [0,1]; Step 43: offset the normalized coordinates according to the set range, the horizontal coordinates according to the set step length, and the vertical coordinates according to the set step length, generate an image and record the offset; Step 44: using the two independent trained convolutional neural network models to process the images respectively, and obtaining the fitting degree of the output results of the two independent convolutional neural network models; Step 45: Calculate the composite fit degree according to the fit degree of the output results of the two independent convolutional neural network models, select the best matching well test interpretation curve, and output the corresponding label; Step 46: Calculate corresponding reservoir parameters according to the matched well test interpretation curve and the offset; The composite degree of fit is calculated based on the degree of fit of the output results of the two independent convolutional neural network models, using the following formula: P = (w1×P1+w2×P2) / (w1+w2) Where P1 and P2 are the fit degrees of the two convolutional neural network models, respectively, and w1 and w2 are the weights of P1 and P2, respectively, indicating the relative importance of each fit degree in the composite fit degree; The calculation of the corresponding reservoir parameters according to the matched well test interpretation curve and the offset includes: According to the calculated composite fitting degree, the pressure curve and pressure derivative curve with the highest fitting degree are obtained. According to the recorded offset and the label corresponding to the curve in the well test interpretation plate, the variable C of the well test curve corresponding to the infinite homogeneous reservoir is obtained according to the label. D e 2s Take the value and get the well test interpretation parameters.

2. The well test interpretation method based on image processing algorithm and machine learning algorithm according to claim 1, characterized in that: The step of constructing a dimensionless pressure data set and a dimensionless pressure derivative data set, and generating a label data set in curve order, includes: The standardized coordinate values ​​are constructed into a standardized dimensionless pressure data set and a standardized dimensionless pressure derivative data set corresponding to the dimensionless pressure data set and the dimensionless pressure derivative data set in the well test interpretation chart. A label data set is generated according to the order of the curves on the well test interpretation chart, and the serial number of each curve is saved as a label.

3. The well test interpretation method based on image processing algorithm and machine learning algorithm according to claim 2, characterized in that: The expansion of the dimensionless pressure data set and the dimensionless pressure derivative data set to generate a disturbance data set and add labels includes: Step 11: construct a data augmentation function dataAugmentation, wherein the data augmentation function is used to receive the original data, the label and the number of disturbance data to be generated; wherein the original data is a dimensionless pressure data set and a dimensionless pressure derivative data set; Step 12: Construct a perturbation function inside the data expansion function, where the perturbation function is used to add random perturbations to the original data; Step 13: Generate perturbed data using a loop, and add the generated perturbed data and corresponding labels to the expanded dataset and label set; Step 14: Apply the data expansion function to the standardized dimensionless pressure data and the standardized dimensionless pressure derivative data respectively to generate an expanded perturbation data set and a label set.

4. The well test interpretation method based on image processing algorithm and machine learning algorithm according to claim 3, characterized in that: The perturbation data in the expanded perturbation data set is converted into an image format through the image conversion function, and the data is segmented into a training set and a test set, including: Step 21: construct an image conversion function dataToImage, wherein the image conversion function converts the disturbance data in the disturbance data set into an image format; and uses the image conversion function to convert the expanded disturbance data set into an image to obtain an image data set, wherein the image data set includes an expanded dimensionless pressure image and an expanded dimensionless pressure derivative image; Step 22: construct a data segmentation function, wherein the segmentation function is used to segment the data into a training set and a test set; use the data segmentation function to segment the expanded dimensionless pressure image and the expanded dimensionless pressure derivative image and their corresponding labels into a training set and a test set.

5. The well test interpretation method based on image processing algorithm and machine learning algorithm according to claim 4, characterized in that: The method of dynamically setting the output size according to the number of labels, constructing a convolutional neural network model, and obtaining a model for processing pressure data and a model for processing pressure derivative data includes: Step 31: Convert the label into a code that can be recognized by the neural network; Step 32: construct a convolutional neural network model, wherein the convolutional neural network model includes a convolutional layer, a batch normalization layer, an activation function, a pooling layer, a global pooling layer and a fully connected layer connected in sequence; Step 33: Set the model parameters according to the number of labels, dynamically adjust the output size of the classification layer according to the number of labels, and obtain two independent convolutional neural network models to classify the pressure data and pressure derivative data respectively.

6. A well test interpretation system based on image processing algorithm and machine learning algorithm, characterized in that: A well test interpretation method based on an image processing algorithm and a machine learning algorithm according to any one of claims 1 to 5 is applied, comprising a well test interpretation plate database, a data processing module, a convolutional neural network module, a data acquisition module and a communication module; The convolutional neural network module, data acquisition module and communication module are respectively connected to the data processing module; the well test interpretation chart database is communicatively connected to the communication module.

Citation Information

Patent Citations

  • Well test interpretation method and device, storage medium and computer equipment

    CN114086934A

  • Oil reservoir model identification training sample generation method and device, and electronic equipment

    CN116150596A