Method for predicting dynamic liquid level of oil well based on CNN_SVR electric diagram

By using power graph data combined with the CNN_SVR algorithm, a convolutional neural network and support vector machine regression model were constructed, which solved the problems of high cost, inaccurate measurement, and large workload of feature engineering in oil well dynamic fluid level detection, and achieved low-cost and efficient dynamic fluid level prediction.

CN116862046BActive Publication Date: 2026-11-27HAIMO TECHNOLOGIES (GROUP) CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310648373.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2026-11-27
Estimated Expiration
2043-06-01

AI Technical Summary

Technical Problem

Existing technologies for detecting dynamic fluid levels in oil wells suffer from problems such as high cost, inaccurate measurement, large workload of feature engineering, and difficulty in model training. In particular, dynamometer diagram measurement requires the installation of sensors and involves a large amount of data processing.

Method used

By combining electrical power diagram data with the CNN_SVR algorithm, features are extracted through a convolutional neural network and dynamic liquid level prediction is performed using support vector machine regression. This constructs a CNN_SVR model, reducing hardware requirements and improving prediction accuracy.

Benefits of technology

It achieves low-cost and efficient dynamic liquid level prediction, reduces the need for sensor installation, reduces feature engineering workload, and improves prediction speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116862046B_ABST
    Figure CN116862046B_ABST
Patent Text Reader

Abstract

The application discloses a method for predicting oil well dynamic liquid level based on a CNN_SVR electric power diagram, and the method is performed according to the following steps: collecting pumping unit electric power diagram data and corresponding oil well dynamic liquid level values to form an original data set; performing cleaning, labeling and preprocessing operations on the original data to obtain a processed data set; splitting the processed data set according to a preset proportion to obtain a training data set and a test data set; building an initial dynamic liquid level prediction CNN_SVR model; verifying, comparing and iterating the initial dynamic liquid level prediction CNN_SVR model by using the test data set, and outputting a final dynamic liquid level prediction CNN_SVR model; and applying the model, inputting current pumping unit electric power diagram data, and outputting an oil well dynamic liquid level prediction value. The method has the beneficial effects of small amount of prediction training data, fast prediction speed, low cost, accurate feature extraction and high prediction precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of oil well dynamic fluid level detection, specifically relating to a method for predicting oil well dynamic fluid level based on CNN_SVR electrical power diagram. Background Technology

[0002] Dynamic fluid level is a crucial parameter for optimizing oil well production. In existing technologies, most oilfields use dynamometer cards and downhole data to estimate dynamic fluid level. For example, the published patent document 2021114858253, "A Method for Predicting Dynamic Fluid Level Depth in Multiple Oil Wells Based on a Neural Network Fusion of Dynamic and Static Information Features," combines parameters such as dynamometer cards to establish a BP neural network for predicting dynamic fluid level depth. However, analysis has revealed the following drawbacks in the above approach:

[0003] 1. Measuring dynamometer diagrams requires purchasing and installing displacement sensors and load sensors, resulting in high production costs and certain installation difficulties.

[0004] 2. Large fluctuations in dynamometer diagram measurements lead to inaccurate measurement results;

[0005] 3. The calculation of parameters such as dynamometer diagrams still relies on human experience to manually extract key features, resulting in a large workload of feature engineering and a large error in the dynamic liquid level calculation of dynamometer diagrams.

[0006] 4. The above-mentioned scheme requires a large amount of data processing and has high hardware requirements; moreover, for a large amount of nonlinear data, model training is difficult, time-consuming, and greatly increases the workload. Summary of the Invention

[0007] To address the shortcomings of the existing technologies, the technical problem to be solved by this invention is: how to provide a method for predicting the dynamic fluid level of oil wells based on CNN_SVR power diagrams, using power diagram data as raw data and combining it with the CNN_SVR algorithm to accurately predict the dynamic fluid level value of oil wells, thereby achieving low-cost and high-efficiency production.

[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0009] A method for predicting the dynamic fluid level in oil wells based on CNN_SVR power graphs, the key technology of which is as follows: The method is carried out according to the following steps:

[0010] Step 1: Collect the pumping unit electrical power diagram data and the corresponding oil well dynamic fluid level values ​​to form the raw dataset;

[0011] Step 2: Clean, label, and preprocess the raw data to obtain the processed dataset;

[0012] Step 3: Split the dataset according to a preset ratio to obtain the training dataset and the test dataset;

[0013] Step 4: Build the CNN_SVR model framework for dynamic liquid surface prediction and train the CNN_SVR model for dynamic liquid surface prediction using the training dataset to obtain the initial CNN_SVR model for dynamic liquid surface prediction;

[0014] Step 5: After validating, comparing, and iterating the initial dynamic liquid level prediction CNN_SVR model using the test dataset, output the final dynamic liquid level prediction CNN_SVR model;

[0015] Step 6: Model application. Input the current pumping unit electrical power diagram data and output the predicted value of the oil well dynamic fluid level.

[0016] Preferably, the power output diagram data of the pumping unit in step one is the data collected when the pumping unit performs work once, and the power output diagram data of the pumping unit includes at least the displacement and current collected at N points of the pumping unit.

[0017] Preferably, the specific content of step two is as follows:

[0018] S21: Clean the original data to obtain cleaned data: delete overlapping data in the original data and keep one set of data; and remove data with negative dynamic liquid level values.

[0019] S22: Annotate the cleaning data to obtain labeled data: take the dynamic liquid level as the target variable;

[0020] S23: Preprocess the labeled data to obtain processed data:

[0021] S231: The labeled data is grouped and processed into two columns of data to obtain two data groups;

[0022] S232: Convert each set of data in the two data groups into an image to obtain an image dataset;

[0023] S233: Convert all images in the image dataset into pixel matrices of the same size and shape, and then normalize them to obtain the processed data.

[0024] Preferably, in step four, the dynamic liquid level prediction CNN_SVR model framework uses a convolutional neural network algorithm (CNN) for model training and selects a support vector machine regression algorithm (SVR) as the regression model for regression model training.

[0025] Preferably, in step five, the final dynamic liquid level prediction CNN_SVR model includes a CNN feature extraction pre-model and a support vector machine regression post-model;

[0026] The CNN feature extraction pre-model contains an 11-layer structure, specifically:

[0027] First layer: Convolutional layer, containing 64 2*2 convolutional kernels with a stride of 1, and a total of 832 parameters;

[0028] Second layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0029] The third layer is a convolutional layer, containing 32 3*3 convolutional kernels with a stride of 1, and a total of 18464 parameters.

[0030] Fourth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0031] Fifth layer: Convolutional layer, containing 16 5*5 convolutional kernels with a stride of 1, and a total of 12816 parameters;

[0032] Sixth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0033] The seventh layer is a convolutional layer containing eight 2x2 convolutional kernels with a stride of 1 and a total of 520 parameters.

[0034] Eighth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0035] Ninth layer: Convolutional layer, containing 4 3*3 convolutional kernels with a stride of 1, and a total of 292 parameters;

[0036] Layer 10: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0037] Eleventh layer: Fully connected layer, containing 64 neurons, with a total of 1088 parameters;

[0038] The CNN feature extraction early model outputs a 64-dimensional feature vector. The obtained feature vector and the corresponding dynamic liquid level value are used as input samples and input into the support vector machine regression later model.

[0039] The kernel function for the later stage of the support vector machine regression model is a Gaussian kernel function; the specific formula is:

[0040] K(x,y)=exp(-gamma*||xy||^2) (1)

[0041] Where x and y are two input samples; ||xy|| is the Euclidean distance between the two samples; and gamma is a hyperparameter.

[0042] The beneficial effects of this invention are:

[0043] This invention uses pumping unit dynamometer data as training data for dynamic fluid level prediction, and combines CNN and SVR algorithms to construct a prediction model. The CNN extracts features from the original parameters, and then SVR is used to perform model regression. This approach eliminates the need for load sensors, reducing costs; it also eliminates the need to acquire downhole parameters, resulting in a small amount of training data; it offers fast prediction speed; and it is low-cost. The model combines the advantages of convolutional neural network and support vector machine regression algorithms, achieving accurate feature extraction. Furthermore, for nonlinear data, SVR introduces a Gaussian kernel function to make the data linearly separable in high-dimensional space. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the structure of the present invention.

[0045] Figure 2 This is a diagram illustrating the labeled data.

[0046] Figure 3 This is a diagram illustrating the transformation of two columns of data.

[0047] Figure 4 This is a schematic diagram of a pixel matrix.

[0048] Figure 5 This is a schematic diagram of the model structure. Detailed Implementation

[0049] The present invention will now be described in further detail with reference to the accompanying drawings.

[0050] In practical implementation: such as Figures 1 to 5 As shown,

[0051] A method for predicting the dynamic fluid level in oil wells based on CNN_SVR power graphs is performed according to the following steps:

[0052] Step 1: Collect the pumping unit electrical power diagram data and the corresponding oil well dynamic fluid level values ​​to form the original dataset; in this embodiment, the original dataset is shown in Table 1;

[0053] The dynamometer data in step one refers to the data collected when the pumping unit performs one operation. In this embodiment, the dynamometer data includes the displacement and current at 200 points on the pumping unit, i.e., N = 200.

[0054] Table 1 Original Data Set

[0055] hashtag time Electrical power diagram Dynamic liquid surface 1 2023 / 1 / 1 0:00 [0.0,0.0],[0.0,0.0],[0.01,0.0]... 1352 1 2023 / 1 / 1 0:10 [0.0,0.0],[0.0,0.0],[0.0,0.0]... 520 1 2023 / 1 / 1 0:20 [0.0,0.0],[0.0,0.0],[0.0,0.0]... 762 1 2023 / 1 / 1 0:30 [0.0,0.0],[0.0,0.0],[0.01,0.0]... 167 1 2023 / 1 / 1 0:40 [0.0,0.0],[0.0,0.0],[0.01,0.0]... 62 1 2023 / 1 / 1 0:50 [0.01,0.0],[0.0,0.0],[0.0,0.0]... 1657 1 2023 / 1 / 1 1:00 [0.01,0.0],[0.0,0.0],[0.0,0.0]... 472 1 2023 / 1 / 1 1:10 [0.01,0.0],[0.01,0.0],[0.0,0.0]... 1563 1 2023 / 1 / 1 1:20 [0.01,0.0],[0.01,0.0],[0.01,0.0]... 343 1 2023 / 1 / 1 1:30 [0.0,0.0],[0.0,0.0],[0.0,0.0]... 1935 1 2023 / 1 / 1 1:40 [0.01,0.0],[0.0,0.0],[0.0,0.0]... 36 1 2023 / 1 / 1 1:50 [0.01,0.0],[0.01,0.0],[0.01,0.0]... 357 1 2023 / 1 / 1 2:00 [0.0,0.0],[0.0,0.0],[0.0,0.0]... 1673 1 2023 / 1 / 1 2:10 [0.01,0.0],[0.01,0.0],[0.0,0.0]... 814 1 2023 / 1 / 1 2:23 [0.01,0.0],[0.0,0.0],[0.01,0.0]... 1661 1 2023 / 1 / 1 2:30 [0.01,0.0],[0.01,0.0],[0.01,0.0]... 1819 1 2023 / 1 / 1 2:40 [0.0,0.0],[0.0,0.0],[0.0,0.0]... 232 1 2023 / 1 / 1 2:50 [0.01,0.0],[0.0,0.0],[0.0,0.0]... -22 1 2023 / 1 / 1 3:00 [0.01,0.0],[0.01,0.0],[0.0,0.0]... 817 1 2023 / 1 / 1 3:10 [0.0,0.0],[0.0,0.0],[0.01,0.0]... 1151 ... ... ... ...

[0056] Step 2: Clean, label, and preprocess the raw data to obtain the processed dataset;

[0057] S21: Clean the original data to obtain cleaned data: delete overlapping data in the original data and keep one set of data; and remove data with negative dynamic liquid level values; as shown in Table 1, at 50:00 on 2023 / 1 / 1, the dynamic liquid level value was -22, so it was directly removed.

[0058] S22: Target variable confirmation: The dynamic liquid level value is used as the target variable for data labeling to obtain labeled data;

[0059] S23: Preprocess the labeled data to obtain processed data:

[0060] S231: The labeled data is grouped and processed into two columns of data to obtain two data groups;

[0061] In this embodiment, a representative portion of the data from Table 1 is selected for preprocessing. The labeled data is saved in text format; see [link to documentation]. Figure 2 We will select a portion of the labeled data for display.

[0062] In this embodiment, the two data groups are shown in Table 2.

[0063] Table 2 shows two columns of data sets.

[0064] Displacement Current 0 0 0 0 0.01 0 0.01 0 0.02 0 0.02 0 0.03 0 0.03 0 0.04 0 0.04 0 0.05 0 0.06 0 0.06 0 0.07 0 0.08 0 0.09 0 0.1 0 0.1 0 0.11 0 0.12 0 0.13 0 0.14 0 0.15 0 0.16 0 0.17 0 0.18 0 0.19 0 0.2 0 0.21 0 0.22 0 0.23 0

[0065] S232: Convert each data set in the two columns into an image, resulting in an image dataset; see details. Figure 3 .

[0066] S233: Convert all images in the image dataset into pixel matrices of the same size and shape, and then normalize them to obtain the processed data.

[0067] In this embodiment, all images in the image dataset are converted into a 3D [28, 28, 3] pixel matrix. See details below. Figure 4 .

[0068] Step 3: Split the dataset into training and testing datasets according to a preset ratio of 8:2.

[0069] Step 4: Build the CNN_SVR model framework for dynamic liquid surface prediction and train the CNN_SVR model for dynamic liquid surface prediction using the training dataset to obtain the initial CNN_SVR model for dynamic liquid surface prediction;

[0070] In step four, the CNN_SVR model framework for predicting the dynamic liquid level uses the Convolutional Neural Network (CNN) algorithm for model training and selects the Support Vector Machine (SVR) algorithm as the regression model for regression model training.

[0071] Step 5: After validating, comparing, and iterating the initial dynamic liquid level prediction CNN_SVR model using the test dataset, output the final dynamic liquid level prediction CNN_SVR model;

[0072] In step five, the final dynamic liquid level prediction CNN_SVR model includes a CNN feature extraction pre-model and a support vector machine regression post-model.

[0073] The CNN feature extraction pre-model contains an 11-layer structure, specifically:

[0074] First layer: Convolutional layer, containing 64 2*2 convolutional kernels with a stride of 1, and a total of 832 parameters;

[0075] Second layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0076] The third layer is a convolutional layer, containing 32 3*3 convolutional kernels with a stride of 1, and a total of 18464 parameters.

[0077] Fourth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0078] Fifth layer: Convolutional layer, containing 16 5*5 convolutional kernels with a stride of 1, and a total of 12816 parameters;

[0079] Sixth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0080] The seventh layer is a convolutional layer containing eight 2x2 convolutional kernels with a stride of 1 and a total of 520 parameters.

[0081] Eighth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0082] Ninth layer: Convolutional layer, containing 4 3*3 convolutional kernels with a stride of 1, and a total of 292 parameters;

[0083] Layer 10: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0;

[0084] The eleventh layer is a fully connected layer containing 64 neurons with a total of 1088 parameters.

[0085] The CNN feature extraction early model outputs a 64-dimensional feature vector. The obtained feature vector and the corresponding dynamic liquid level value are used as input samples and input into the support vector machine regression later model.

[0086] The kernel function for the later stage of the support vector machine regression model is a Gaussian kernel function; the specific formula is:

[0087] K(x,y)=exp(-gamma*||xy||^2) (1)

[0088] Where x and y are two input samples, x is a 64-dimensional feature vector output by the CNN feature extraction model in the early stage, and y is the dynamic liquid level value corresponding to the 64-dimensional feature vector;

[0089] ||xy|| is the Euclidean distance between two samples;

[0090] gamma is a hyperparameter; in this embodiment, the value of gamma is 0.3.

[0091] Step 6: Model application. Input the current pumping unit electrical power diagram data and output the predicted value of the oil well dynamic fluid level.

[0092] In this embodiment, the saved model is deployed and published as an asynchronous service and integrated into the production optimization system. When a well requires calculation of the dynamic fluid level, the user inputs the model's electrical power diagram data, calls this service, and the interface returns the calculated dynamic fluid level value for that well. Model output results are shown in Table 3. Production application results are detailed in Table 4.

[0093] Table 3. Model Output Results Data Display Table

[0094]

[0095] Table 4 Production Application Results

[0096] Well Number Block Predicted dynamic fluid level Alarm production time Processing status operate **1 **Area 832.5 2023 / 4 / 8 6:00 Pending processing Handling Ignore **2 **Area 98.66 2023 / 4 / 8 6:00 Pending processing Handling Ignore **3 **Area 396.65 2023 / 4 / 8 6:00 Pending processing Handling Ignore ... ... ... ... ... ...

[0097] In this embodiment, the CNN_LR, CNN_RIDGE, CNN-Polynomial-Regression, and CNN_SVR algorithms were used to predict the dynamic fluid level of three wells. The prediction results are detailed in Table 5. Table 5 shows that the CNN_SVR algorithm generally outperforms the other three algorithms in terms of average prediction error, which is less than 10%. Furthermore, compared to manually extracting key features using traditional machine learning algorithms, this method reduces the workload by 15 working days, demonstrating a significant improvement in performance.

[0098] Table 5 Comparison and Analysis of Four Algorithms for Predicting Dynamic Liquid Surface

[0099]

[0100] The above are merely preferred embodiments of the present invention. It should be noted that any modifications and improvements made by those skilled in the art without departing from the present technical solution should also be considered to fall within the scope of protection claimed in this claim.

Claims

1. A method for predicting the dynamic fluid level of an oil well based on CNN_SVR electrical power diagram, characterized in that: Follow these steps: Step 1: Collect the pumping unit electrical power diagram data and the corresponding oil well dynamic fluid level values ​​to form the raw dataset; Step 2: Clean, label, and preprocess the raw data to obtain the processed dataset; Step 3: Split the dataset according to a preset ratio to obtain the training dataset and the test dataset; Step 4: Build the CNN_SVR model framework for dynamic liquid surface prediction and train the CNN_SVR model for dynamic liquid surface prediction using the training dataset to obtain the initial CNN_SVR model for dynamic liquid surface prediction; Step 5: After validating, comparing, and iterating the initial dynamic liquid level prediction CNN_SVR model using the test dataset, output the final dynamic liquid level prediction CNN_SVR model; Step 6: Model application. Input the current pumping unit electrical power diagram data and output the predicted value of the oil well dynamic fluid level.

2. The method for predicting the dynamic fluid level of an oil well based on CNN_SVR electrical power diagram according to claim 1, characterized in that: The power diagram data of the pumping unit in step one should include at least the displacement and current collected from N points of the pumping unit.

3. The method for predicting the dynamic fluid level of an oil well based on CNN_SVR electrical power diagram according to claim 1, characterized in that: The specific details of step two are as follows: S21: Clean the original data to obtain cleaned data: delete overlapping data in the original data and keep one set of data; and remove data with negative dynamic liquid level values. S22: Annotate the cleaning data to obtain labeled data: take the dynamic liquid level as the target variable; S23: Preprocess the labeled data to obtain processed data: S231: The labeled data is grouped and processed into two columns of data to obtain two data groups; S232: Convert each set of data in the two data groups into an image to obtain an image dataset; S233: Convert all images in the image dataset into pixel matrices of the same size and shape, and then normalize them to obtain the processed data.

4. The method for predicting the dynamic fluid level of an oil well based on CNN_SVR electrical power diagram according to claim 1, characterized in that: In step four, the CNN_SVR model framework for predicting the dynamic liquid level uses the Convolutional Neural Network (CNN) algorithm for model training and selects the Support Vector Machine (SVR) algorithm as the regression model for regression model training.

5. The method for predicting the dynamic fluid level of an oil well based on CNN_SVR electrical power diagram according to claim 4, characterized in that: In step five, the final dynamic liquid level prediction CNN_SVR model includes a CNN feature extraction pre-model and a support vector machine regression post-model. The CNN feature extraction pre-model contains an 11-layer structure, specifically: First layer: Convolutional layer, containing 64 2*2 convolutional kernels with a stride of 1, and a total of 832 parameters; Second layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0; The third layer is a convolutional layer, containing 32 3*3 convolutional kernels with a stride of 1, and a total of 18464 parameters. Fourth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0; Fifth layer: Convolutional layer, containing 16 5*5 convolutional kernels with a stride of 1, and a total of 12816 parameters; Sixth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0; The seventh layer is a convolutional layer containing eight 2x2 convolutional kernels with a stride of 1 and a total of 520 parameters. Eighth layer: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0; Ninth layer: Convolutional layer, containing 4 3*3 convolutional kernels with a stride of 1, and a total of 292 parameters; Layer 10: Max pooling layer, pooling size: 2*2, step size: 2, total number of parameters: 0; Eleventh layer: Fully connected layer, containing 64 neurons, with a total of 1088 parameters; The CNN feature extraction early model outputs a 64-dimensional feature vector. The obtained feature vector and the corresponding dynamic liquid level value are used as input samples and input into the support vector machine regression later model. The kernel function for the later stage of the support vector machine regression model is a Gaussian kernel function; the specific formula is: K(x, y) = exp(-gamma * ||x - y||^2) (1) Where x and y are two input samples; ||xy|| is the Euclidean distance between the two samples; and gamma is a hyperparameter.

Citation Information

Patent Citations

  • Diagnostic method for measuring annular working fluid level and working conditions of rod-pumped well by electric parameters

    CN104373113A

  • Method for electric submersible pump well working fluid level calculation based on ground real-time monitoring electrical parameters

    CN106777709A