An unsupervised pre-training method for a dynamometer diagnosis model

By using a flood filling algorithm to fill the dynamometer diagram of an oil production machine, generating filling data and calculating reconstruction error, the problem of dependence on labeled samples in dynamometer diagram diagnosis is solved, achieving efficient unsupervised pre-training and accurate diagnostic results.

CN116596057BActive Publication Date: 2025-12-19NANJING FUDAO OIL & GAS INTELLIGENT CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211621423.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2025-12-19
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

In the current technology, deep learning models cannot be effectively applied to unsupervised learning in image classification tasks. Existing technologies cannot effectively solve the problem of sparse features in image classification tasks, especially in the field of dynamometer card diagnosis, where the reliance on a large number of labeled samples leads to high training costs and low efficiency.

Method used

A flood filling algorithm is used to fill the dynamometer diagram of the oil production machine. By generating filled dynamometer diagram data and calculating reconstruction error, unsupervised pre-training of the deep learning model is carried out, which reduces the dependence on labeled samples, shortens the training cycle and improves diagnostic accuracy.

Benefits of technology

This approach improves the accuracy of dynamogram diagnosis through unsupervised pre-training without requiring a large number of labeled samples, thus shortening training time and reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116596057B_ABST
    Figure CN116596057B_ABST
Patent Text Reader

Abstract

The application discloses an unsupervised pre-training method of a dynamometer diagram diagnosis model. The method is aimed at the characteristics that the dynamometer diagram itself only has lines and the central region is blank. First, the central region of the dynamometer diagram data is filled by using a flood fill algorithm. Then, a feature vector is output by the diagnosis model, and a filled dynamometer diagram data is output by the inverse convolution model. The reconstruction error of the generated image and the filled image is calculated to pre-train the deep learning model, thereby reducing the dependence of model training on a large number of labeled dynamometer diagram samples, shortening the training period and ensuring the accuracy of the dynamometer diagram diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of oil well pumping unit fault diagnosis, and in particular to unsupervised pre-training of a model by having a deep learning model learn a proxy task of filling in a dynamometer card. BACKGROUND

[0002] As the main means of crude oil production, the working condition of the pumping unit is directly related to the overall economic benefit of the oil field. The dynamometer card, as an important means of reflecting the working condition of the deep well pump, is widely used in pumping unit fault diagnosis. With the development of artificial intelligence technology, the use of deep learning models for dynamometer card diagnosis has achieved high diagnostic accuracy. However, the current mainstream deep learning models rely on a large number of labeled samples for supervised training, and the labeling of dynamometer cards not only requires a large amount of human cost, but also relies on professional knowledge.

[0003] In recent years, there have been many methods of training deep learning models using unsupervised algorithms, but these methods are mostly used for natural image training. However, since the dynamometer card is a hollow polygon surrounded by thin lines, there are many invalid blank areas and the features are sparse, and the effect in the field of dynamometer card diagnosis is not ideal. Filling in the center area of the dynamometer card can increase the feature information of the dynamometer card and help improve the accuracy of dynamometer card diagnosis.

[0004] In existing methods, filling in the dynamometer card is used for supervised training of the model, which improves the classification accuracy, but still cannot avoid the dependence on a large number of labeled samples. Using filled dynamometer cards as a proxy task for unsupervised pre-training is expected to improve accuracy and does not require labeled samples, but there is currently little research in this direction.

[0005] Therefore, there is an urgent need for an unsupervised pre-training method for dynamometer card diagnosis models that addresses the characteristics of dynamometer cards by pre-training the model through a proxy task of filling in the dynamometer card to reduce the dependence of model training on a large number of labeled dynamometer card samples, shorten the training cycle, and ensure the accuracy of dynamometer card diagnosis. SUMMARY

[0006] To solve the above problems, the present application discloses an unsupervised pre-training method for a dynamometer card diagnosis model, which uses a flood fill algorithm to fill in the dynamometer card of the pumping unit, has the model learn to generate filled dynamometer card data, calculates the reconstruction error of the generated image and the filled image, and pre-trains the deep learning model, thereby reducing the dependence of model training on a large number of labeled samples, shortening the training cycle, and ensuring the accuracy of diagnosis.

[0007] The method specifically includes the following steps:

[0008] 1) Collect the historical dynamometer diagram of the oil production machine, form a dynamometer diagram dataset S, and divide it into training set, validation set and test set using the leave-one-out method, with a ratio of 8:1:1;

[0009] 2) Traverse S and find any inner point P in each dynamometer diagram sample using the median scan method, which has the following steps:

[0010] 2-1) Taking the upper left corner of the dynamometer diagram as the origin, calculate the horizontal coordinate of the median line x = l / 2 according to the column number l of the dynamometer diagram data;

[0011] 2-2) Find the coordinates (x, y1) of the intersection point p1 of the median line and the upstroke line of the dynamometer diagram;

[0012] 2-3) Find the coordinates (x, y2) of the intersection point p2 of the median line and the downstroke line of the dynamometer diagram;

[0013] 2-4) Calculate the vertical coordinate of the inner point P y = (y1 + y2) / 2, then the coordinates of P are (x, y).

[0014] 3) Take P as the starting point of the flood fill algorithm, fill the samples in S to get the filled dynamometer diagram dataset Y;

[0015] 4) Take the dataset S before filling as the input of the target deep learning model, and output an n-dimensional feature vector V, where 128 ≤ n ≤ 2048;

[0016] 5) Take the vector V as the input of the deconvolution deep learning model to generate the filled dynamometer diagram Y';

[0017] 6) Calculate the reconstruction error L train , complete m rounds of unsupervised pre-training, where the training rounds 0 < m ≤ 300, and the reconstruction error calculation formula is as follows:

[0018]

[0019] Where i is the subscript of the sample, k is the total number of samples, L train is the reconstruction error calculated on the training set,

[0020] L test is the reconstruction error calculated on the test set, Y i represents the i-th filled dataset sample, Y i ' represents the i-th generated filled data output.

[0021] 7) Calculate the test set reconstruction error L test , judge whether L test is less than the error threshold L min , if lower than L minIf yes, the pre-training ends, otherwise go to step 5), wherein 0 < L min ≤0.01;

[0022] 8) Using the labeled performance diagram data to perform transfer learning of the pre-trained model, and using the trained model to perform working condition type diagnosis.

[0023] Beneficial effects:

[0024] The unsupervised pre-training method of the performance diagram diagnosis model disclosed in the present application is characterized by filling the performance diagram of the oil pumping machine by using the flood fill algorithm, learning and generating the filled performance diagram data by the model, calculating the reconstruction error of the generated image and the filled image, and pre-training the deep learning model, so as to reduce the dependence of model training on a large number of labeled performance diagram samples, shorten the training cycle and ensure the accuracy of performance diagram diagnosis. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 The method flowchart in the present application;

[0026] Figure 2 The loss value curves of the training set and the validation set of the model in the specific example of the present application. DETAILED DESCRIPTION

[0027] The detailed calculation process and specific operation process will be given below in combination with the drawings and specific examples to further illustrate the present application. The present embodiment is implemented on the premise of the technical solution of the present application, but the protection scope of the present application is not limited to the following embodiment.

[0028] The present example takes a certain oil production enterprise as an example to illustrate the effectiveness and implementation process of the method, and the work flow is as shown in Figure 1 The training set, the validation set and the test set are constructed by using the data between July 2021 and August 2021, and the effectiveness of the method in improving the diagnosis accuracy without relying on a large number of labeled samples is analyzed.

[0029] The specific implementation steps are as follows:

[0030] 1) Collect 49852 historical performance diagrams of the oil pumping machine to form a performance diagram data set S, and divide the data set S into a training set S train 39882, a validation set S val 4985 and a test set S test 4985.

[0031] 2) Calculate the coordinates of the inner points P of all samples in the data set, and the inner points P of part of the performance diagrams are shown in Table 1:

[0032] Table 1 P point coordinates of part of the performance diagrams

[0033]

[0034]

[0035] 3) Take P point as the starting point, fill the indicator diagram by using the flood fill algorithm, and obtain the filled indicator diagram data set, and part of the filled indicator diagram samples are shown in Table 2:

[0036] Table 2 Part of the filled indicator diagram sample

[0037]

[0038]

[0039] 4) In this embodiment, taking the convolutional neural network model Resnet18 as an example, n = 512 is taken, and after model calculation, part of the feature vectors are shown in Table 3:

[0040] Table 3 Part of the indicator diagram feature vector

[0041] Indicated work diagram number Feature vector V 1 [[0.213, 0.971,..., 0.023] 1×512 ]] 2 [[0.182, 0.294,..., 0.737] 1×512 ]] 3 [[0.856, 0.913,..., 0.354] 1×512 ]] 4 [[0.761, 0.673,..., 0.209] 1×512 ]]

[0042] 5) The feature vector is taken as the input of the deconvolutional neural network, and the filled indicator diagram data is output.

[0043] 6) Taking m = 300, calculating the training set reconstruction error L according to the output image data and the actual filled sample data train , and completing 300 rounds of unsupervised pre-training.

[0044] 7) Taking L min = 0.05, calculating the test set reconstruction error judging whether the test set reconstruction error L test <L min , meeting the loss requirement, and the pre-training is completed.

[0045] 8) The Resnet18 model completed pre-training is used for supervised transfer learning on 3000 labeled data sets, and the model training results are shown in Table 4:

[0046] Table 4 Comparison of model training results

[0047] Training method Amount of labeled data Amount of unlabeled data Recognition accuracy Supervised learning 39882 0 91.2% Unsupervised pre-training + transfer learning 10000 39882 90.8% Supervised learning 10000 0 85.1%

[0048] From the above analysis, it can be seen that the indicator diagram diagnosis model unsupervised pre-training method can achieve similar diagnostic accuracy to the model using a large number of labeled data for supervised learning training without relying on a large number of labeled data sets, through the pre-training method of filling the indicator diagram, which fully illustrates the effectiveness of the method.

Claims

1. An unsupervised pre-training method of a dynamometer diagnosis model, characterized in that The work graph history data is collected, the work graph data set is filled according to the flood filling algorithm, the agent task of the filled work graph is used instead of manual label annotation as the training signal of the model, the model is pre-trained unsupervisedly, and dependence of model training on a large number of labeled samples is avoided, including the following steps: 1) Collecting the historical work graph of the oil pumping machine, forming a work graph data set S, and using the leave-one-out method to divide it into a training set, a validation set and a test set; 2) Traverse S, and find any inner point P in each work graph sample using the midline scanning method; 3) Taking P as the starting point of the flood filling algorithm, fill the samples in S to obtain the filled work graph data set Y; 4) Taking the data set S before filling as the input of the target deep learning model, outputting an n-dimensional feature vector V; 5) Taking the vector V as the input of the deconvolution deep learning model, generating the filled work graph Y'; 6) Calculate training set reconstruction error L from Y and Y' train , complete m rounds of unsupervised pre-training; 7) Calculate the reconstruction error L of the test set. test Determine L test Is it less than the error threshold L? min If it is lower than L min If so, pre-training ends; otherwise, proceed to step 5. 8) Using labeled work graph data to perform transfer learning of the pre-trained model, and using the trained model to diagnose the working condition type.

2. The unsupervised pre-training method of a dynamometer diagnostic model according to claim 1, characterized in that The ratio of the leave-one-out method in step 1) is 8:1:

1.

3. The unsupervised pre-training method of a diagnostic model of a dynamometer diagram according to claim 1, characterized in that The midline scanning method in step 2) has the following steps: 1-1) Taking the upper left corner of the work graph as the origin, calculating the horizontal coordinate x of the midline according to the column number l of the work graph data x = l / 2; 1-2) Finding the coordinates (x, y1) of the intersection point p1 of the midline and the work graph upper stroke line; 1-3) Finding the coordinates (x, y2) of the intersection point p2 of the midline and the work graph lower stroke line; 1-4) Calculate the vertical coordinate y of the inner point P y = (y1 + y2) / 2, then the coordinates of P are (x, y).

4. The unsupervised pre-training method of a diagnostic model of a dynamometer diagram according to claim 1, characterized in that The feature vector dimension in step 4) is 128 ≤ n ≤ 2048.

5. The unsupervised pre-training method of a diagnostic model of a dynamometer diagram according to claim 1, characterized in that The reconstruction error calculation formula in step 6) is as follows: where i is the index of the sample, k is the total number of samples, L train is the reconstruction error computed on the training set, L test is the reconstruction error computed on the test set, Y i represents the i-th padded dataset sample, Y i represents the i-th generated padded data output.

6. The unsupervised pre-training method of a diagnostic model of a dynamometer diagram according to claim 1, characterized in that The number of training rounds in step 6) is 0 < m ≤ 300.

7. The unsupervised pre-training method of a diagnostic model of a dynamometer diagram according to claim 1, characterized in that Step 7) the error threshold 0 < L min ≤ 0.01.

Citation Information

Patent Citations

  • Depth ultralimit indicator diagram learning method

    CN110288257A

  • Fault diagnosis method for pumping well based on GAN

    CN110318731A