A method and device for preparing a set of indicator diagram samples based on unsupervised learning

By using unsupervised learning and clustering algorithms, a big data system for fault diagnosis is constructed using oilfield data. This solves the problem of high manpower and time costs in fault diagnosis of pumping wells, improves the accuracy of fault diagnosis, and reduces manual labeling errors.

CN115510983BActive Publication Date: 2026-01-02CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211204326.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2026-01-02
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Current fault diagnosis of pumping wells relies on a large number of labeled samples, which leads to high labor and time costs, and the low accuracy of manual labeling affects the accuracy of fault diagnosis.

Method used

An unsupervised learning method is adopted to construct a big data system for fault diagnosis by acquiring oilfield data. Clustering algorithms are used to cluster preprocessed sample vectors to find the optimal number of categories. Fault diagnosis categories are labeled in combination with expert experience to reduce manual labeling steps.

Benefits of technology

It reduced manpower and time costs, improved the accuracy of fault diagnosis, reduced manual marking errors, and enhanced the quality of the dynamometer card sample set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115510983B_ABST
    Figure CN115510983B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on unsupervised learning's indicator diagram sample set preparation method and device, comprising: obtaining oilfield data, and constructing fault diagnosis big data system according to oilfield data;According to the fault diagnosis big data system, obtain detection sample vector and carry out pre-processing operation;The sample vector after pre-processing is clustered using clustering algorithm to find optimal classification number, and the marking of fault diagnosis category is realized according to optimal classification result.The indicator diagram sample set preparation method provided by the application, when there are fewer marked examples, the learning performance is improved by a large number of unmarked examples, the optimal classification number is determined using the profile coefficient in clustering algorithm, the same vector is plotted into indicator diagram according to classification result, and judgment is carried out in combination with expert experience, the problem that learning performance is poor in sample marking and artificial marking is prone to error is avoided, the human and time cost is reduced, and the accuracy of fault diagnosis classification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of oil production fault diagnosis, and particularly relates to a dynamometer card sample set preparation method and device based on unsupervised learning. BACKGROUND

[0002] Pumping unit is the main equipment in oil field development, and is prone to failure due to temperature and formation factors in oil production. Pumping unit well fault diagnosis is one of the key problems in the field of oil production. The dynamometer card is the key basis for fault diagnosis. With the rapid development of data mining and storage technology, various types of data collected by sensors are transmitted to the oil field data center, forming oil well production fault diagnosis big data.

[0003] The existing pumping unit well fault diagnosis accuracy depends on the number and quality of the dynamometer card sample set. On the one hand, fault diagnosis needs to rely on a large number of labeled samples, and sample labeling consumes a lot of human and time costs. On the other hand, due to the influence of human knowledge and energy, the accuracy of manual labeling is low. SUMMARY

[0004] This section aims to summarize some aspects of the embodiments of the present application and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of the specification to avoid obscuring the purpose of this section, abstract and title, and such simplifications or omissions cannot be used to limit the scope of the present application.

[0005] In view of the above existing problems, the present application is proposed.

[0006] Therefore, the present application provides a dynamometer card sample set preparation method and device based on unsupervised learning to solve the problems of high labor and time cost in preparing the existing dynamometer card sample set, and low fault diagnosis accuracy of manual labeling.

[0007] To solve the above technical problems, the present application provides the following technical solutions:

[0008] In a first aspect, the present application provides a dynamometer card sample set preparation method based on unsupervised learning, comprising:

[0009] Obtaining oil field data, and constructing a fault diagnosis big data system according to the oil field data;

[0010] Obtaining a detection sample vector according to the fault diagnosis big data system and performing a preprocessing operation;

[0011] Using a clustering algorithm to cluster the preprocessed sample vector to find the optimal classification number, and labeling the fault diagnosis categories according to the optimal classification result.

[0012] As a preferred scheme of the method for preparing a dynamometer sample set based on unsupervised learning, the fault diagnosis big data system comprises a hash symbol, a collection time, displacement, and load.

[0013] As a preferred scheme of the method for preparing a dynamometer sample set based on unsupervised learning, the method comprises the following steps of: obtaining a detection sample vector from the fault diagnosis big data system and performing a preprocessing operation.

[0014] The displacement and load vectors during the operation of the pumping unit are preprocessed to retain information conducive to classification.

[0015] It is determined whether the vectors all contain sample points, and if the vectors are empty due to errors in data center transmission or data grabbing, the empty vectors are deleted, and the vectors containing sample points are retained.

[0016] The displacement and load vectors containing sample points are merged to form displacement and load vectors, and when the vectors lack sample points, missing value filling is performed.

[0017] As a preferred scheme of the method for preparing a dynamometer sample set based on unsupervised learning, the missing value filling comprises using the average values of the sample points before and after the missing position for sample filling.

[0018] The missing value filling is represented as:

[0019] A n =(a n-1 +a n+1 ) / 2,1≤n≤400

[0020] wherein n is a missing in the nth position in the vector, and a is the value of the sample point in the vector.

[0021] As a preferred scheme of the method for preparing a dynamometer sample set based on unsupervised learning, the method comprises the following steps of: clustering the preprocessed sample vectors by using a clustering algorithm.

[0022] The number of classifications is set, each centroid is a class, the Euclidean distances of the remaining vectors to each centroid are calculated, and the vectors are divided into the cluster where the distance to the minimum centroid is the smallest.

[0023] After the vector division is completed, the vector with the minimum Euclidean distance to other points in the cluster is taken as a new centroid, and all vectors are re-divided.

[0024] When the centroid no longer changes or the maximum number of iterations is reached, the iteration is stopped, and the clustering is completed.

[0025] As a preferred scheme of the method for preparing a sample set of a dynamometer diagram based on unsupervised learning, in the method, the Euclidean distance is represented as:

[0026]

[0027] where d is the Euclidean distance, x and y are two vectors in the sample set, x i and y i are the i-th sample points of the two vectors.

[0028] As a preferred scheme of the method for preparing a sample set of a dynamometer diagram based on unsupervised learning, in the method, finding the optimal number of classifications comprises:

[0029] According to the upper limit of the number of clusters of the displacement load vectors to be clustered, the number of classifications is clustered, and the silhouette coefficients corresponding to different numbers of classifications are calculated.

[0030] If the value of the silhouette coefficient continuously rises without a downward trend within the upper limit of the number of clusters, the upper limit needs to be expanded, and the optimization needs to be iterated.

[0031] If the value of the silhouette coefficient rises and then appears a downward trend within the upper limit of the number of clusters, the number of classifications corresponding to the maximum value of the silhouette coefficient is the optimal number of classifications.

[0032] As a preferred scheme of the method for preparing a sample set of a dynamometer diagram based on unsupervised learning, in the method, the silhouette coefficient is represented as:

[0033]

[0034] where a(i) is the intra-cluster dissimilarity, that is, the average value of the dissimilarity of vector i to other vectors in the same cluster, b(i) is the inter-cluster dissimilarity, that is, the minimum value of the average dissimilarity of vector i to other clusters, and the value range of the silhouette coefficient S(i) is [-1, 1].

[0035] As a preferred scheme of the method for preparing a sample set of a dynamometer diagram based on unsupervised learning, in the method, according to the optimal classification result, the marking of the fault diagnosis categories is implemented, and the marking comprises:

[0036] According to the optimal classification result, the displacement load vectors of the same category are grouped into the same cluster, and a dynamometer diagram of the displacement load vectors is drawn; according to the expert experience, the clustering result is screened, the dynamometer diagram samples with inconsistent categories are removed, and the fault diagnosis categories are marked.

[0037] In a second aspect, an embodiment of the present application provides a device for preparing a sample set of a dynamometer diagram based on unsupervised learning, and the device comprises:

[0038] An information acquisition module is configured to acquire oilfield data and construct a fault diagnosis big data system based on the oilfield data.

[0039] A preprocessing module is configured to acquire a detection sample vector based on the fault diagnosis big data system and perform a preprocessing operation.

[0040] A clustering optimization module is configured to perform clustering on the preprocessed sample vector by using a clustering algorithm to find an optimal classification number, and realize labeling of a fault diagnosis category based on the optimal classification result.

[0041] Compared with the prior art, the method provided by the application can improve learning performance by using a large number of unmarked examples when there are few marked examples, determine an optimal classification number by using a silhouette coefficient in a clustering algorithm, and draw a vector into a indicator diagram according to a classification result and combine expert experience to make a judgment, thereby avoiding the problems of poor learning performance in sample labeling and errors in manual labeling, reducing labor and time costs, and improving the accuracy of fault diagnosis classification. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor. Among them:

[0043] Figure 1 A sample set preparation flowchart of the indicator diagram sample set preparation method and device based on unsupervised learning according to an embodiment of the application;

[0044] Figure 2 A silhouette coefficient schematic diagram of the indicator diagram sample set preparation method and device based on unsupervised learning according to an embodiment of the application;

[0045] Figure 3 An indicator diagram drawn by a vector of the indicator diagram sample set preparation method and device based on unsupervised learning according to an embodiment of the application;

[0046] Figure 4 An intra-indicator diagram schematic diagram of the indicator diagram sample set preparation method and device based on unsupervised learning according to an embodiment of the application. DETAILED DESCRIPTION

[0047] In order to make the above objectives, characteristics and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application are described in detail below with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present application.

[0048] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The present application, however, can be practiced in a variety of ways beyond the specific details set forth herein without departing from the scope of the present application. It can be appreciated by those skilled in the art that the present application can be practiced without such specific details.

[0049] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. The "in one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an embodiment that is independent of or selected from other embodiments.

[0050] The present application is described in detail in conjunction with the schematic diagram. In the detailed description of the embodiments of the present application, the cross-sectional view of the device structure is partially enlarged without the general proportion for the convenience of description, and the schematic diagram is only an example, which should not limit the scope of protection of the present application. In addition, the three-dimensional spatial dimensions of length, width and depth should be included in actual manufacture.

[0051] Meanwhile, in the description of the present application, it should be noted that the terms "upper, lower, inner and outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first, second or third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.

[0052] In the present application, unless otherwise explicitly specified and limited, the terms "mounting, connection, connection" should be understood broadly, for example: it can be fixed connection, detachable connection or integral connection; it can also be mechanical connection, electrical connection or direct connection, it can also be indirectly connected through an intermediate medium, or it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0053] Example 1

[0054] Reference Figure 1For the first embodiment of the present application, the embodiment provides a dynamometer sample set preparation method based on unsupervised learning, comprising:

[0055] S1: obtaining oilfield data, and constructing a fault diagnosis big data system according to the oilfield data;

[0056] Further, the fault diagnosis big data system comprises well number, collection time, displacement, and load.

[0057] S2: obtaining a detection sample vector according to the fault diagnosis big data system and performing a pretreatment operation;

[0058] Further, obtaining the detection sample vector according to the fault diagnosis big data system and performing the pretreatment operation comprise:

[0059] The displacement and load vectors during the operation of the pumping unit are pretreated to retain information conducive to classification;

[0060] It should be noted that the data is obtained based on the achievements of oilfield informatization construction, and the data transmitted by the sensor to the oilfield data center in a certain historical time period is randomly sampled and pretreated to make the retention result more objective and improve the accuracy.

[0061] It is checked whether the vectors all contain sample points, and if the vectors are empty due to errors in the data transmitted by the sensor to the data center or data grabbing, the empty vectors are deleted, and the vectors containing sample points are retained;

[0062] It should be noted that the purpose of deleting the entire empty vector is to facilitate reading information and avoid interference with the classification result.

[0063] The displacement and load vectors containing sample points are merged to form displacement and load vectors, and when the vectors lack sample points, missing value filling is performed.

[0064] It should be noted that the individual missing values of the vectors are processed to ensure that each vector contains 2N sample points, and the M displacement and load vectors are divided into columns to obtain an M*2N matrix, which is convenient for observation and processing.

[0065] Further, the missing value filling comprises: using the average value of the two sample points before and after the missing position to fill the sample;

[0066] The missing value filling is represented as:

[0067] A n =(a n-1 +a n+1 ) / 2,1≤n≤400

[0068] Wherein, n is a missing in the nth position of the vector, and a is the value of the sample point in the vector.

[0069] S3: using a clustering algorithm to cluster the pre-processed sample vectors to find the optimal number of classifications, and implementing the labeling of the fault diagnosis categories according to the optimal classification result;

[0070] Further, the pre-processed sample vectors are clustered using a clustering algorithm, including:

[0071] Set the number of classifications, each centroid is a class, calculate the Euclidean distance of the remaining vectors to each centroid and divide into the cluster where the minimum distance centroid is located;

[0072] After the vector division is completed, the vector with the minimum Euclidean distance to the mean of other points in the cluster is taken as a new centroid, and all vectors are re-divided;

[0073] When the centroid no longer changes or reaches the maximum number of iterations, stop iteration and complete clustering.

[0074] Further, the Euclidean distance is represented as:

[0075]

[0076] Wherein, d is the Euclidean distance, x and y are two vectors in the sample set, x i and y i are the i-th sample points of the two vectors.

[0077] Further, finding the optimal number of classifications includes:

[0078] According to the cluster number limit value of the displacement load vector to be clustered, the clustering of the number of classifications is performed and the silhouette coefficient corresponding to different numbers of classifications is calculated;

[0079] If the silhouette coefficient value continues to rise without a downward trend within the cluster number limit value, the upper limit value needs to be expanded and the optimal iteration is continued;

[0080] If the silhouette coefficient value rises and then appears a downward trend within the cluster number limit value, the number of classifications corresponding to the maximum silhouette coefficient is the optimal number of classifications.

[0081] It should be noted that the cluster number limit value k of the displacement load vector to be clustered is within the range of [a, b], wherein the values of a and b are constants, and a>0, b>0.

[0082] Further, the silhouette coefficient is represented as:

[0083]

[0084] Wherein, a(i) is the intra-cluster dissimilarity, i.e., the average of the dissimilarity of vector i to other vectors in the same cluster, b(i) is the inter-cluster dissimilarity, i.e., the minimum of the average dissimilarity of vector i to other clusters, and the value range of the silhouette coefficient S(i) is [-1, 1].

[0085] It should be noted that the cohesion and separation of clustering can be reflected through the intra-cluster dissimilarity and the inter-cluster dissimilarity, and the larger the silhouette coefficient is, the better the clustering effect is.

[0086] Further, according to the optimal classification result, the marking of the fault diagnosis category is implemented, including:

[0087] According to the optimal classification result, the displacement load vectors of the same category are grouped into the same cluster, and a displacement load vector indicator diagram is drawn; according to expert experience, the clustering result is screened, and the indicator diagram samples with inconsistent categories are removed, and the fault diagnosis category is marked.

[0088] The above is a schematic scheme of the method for preparing the indicator diagram sample set based on unsupervised learning. It should be noted that the technical scheme of the device for preparing the indicator diagram sample set based on unsupervised learning is the same as the technical scheme of the method for preparing the indicator diagram sample set based on unsupervised learning described above, and the technical scheme of the device for preparing the indicator diagram sample set based on unsupervised learning in this embodiment is not described in detail, and can be referred to the description of the technical scheme of the method for preparing the indicator diagram sample set based on unsupervised learning.

[0089] The device for preparing the indicator diagram sample set based on unsupervised learning in this embodiment includes:

[0090] The information acquisition module is configured to acquire oilfield data and construct a fault diagnosis big data system according to the oilfield data.

[0091] The preprocessing module is configured to acquire detection sample vectors according to the fault diagnosis big data system and perform a preprocessing operation.

[0092] The clustering optimization module is configured to perform clustering on the preprocessed sample vectors by using a clustering algorithm to find an optimal classification number, and mark a fault diagnosis category according to the optimal classification result.

[0093] Embodiment 2

[0094] Reference Figures 2 to 4 This is an embodiment of the present application, based on the above method, scientific demonstration is carried out through specific experiments, and the beneficial effects are verified.

[0095] According to the fault diagnosis big data, 1000 displacement and load vectors of the pumping unit during work are extracted, wherein each displacement and load vector includes 200 sample points, the sample points are separated by commas, and 400 sample points of the two vectors constitute a dynamometer card, and the sample point data of the dynamometer card is shown in Table 1:

[0096] Table 1: Sample point data of the dynamometer card

[0097]

[0098] The displacement and load are combined to form 1000 displacement and load vectors, that is, one vector includes 400 sample points, the vectors are divided into columns, a sample point occupies one cell, and finally a 1000*400 matrix is obtained, and the processed displacement and load vectors are shown in Table 2:

[0099] Table 2: Displacement and load vector data

[0100]

[0101] The K-means clustering analysis is adopted for the dynamometer card vector, the lower limit a of the cluster number of the vector to be clustered is set to 5, the upper limit b is set to 12, the 1000 vectors in the matrix are clustered in the classification number in [5, 12], the contour coefficients corresponding to different classification numbers i in [5, 12] are calculated, as shown in Table 3, and the cluster number 9 corresponding to the maximum contour coefficient S(i) is the appropriate classification number. Figure 2

[0102] The K is set to 9 for clustering, and the classification results are saved in the last column of the matrix, and the 401st column is the category into which the vector is divided, and the classification results are shown in Table 3:

[0103] Table 3: Classification results

[0104]

[0105] According to the classification results, the vectors of the same category are classified into the same cluster, that is, similar vectors are divided into a category, and the vectors are drawn into a dynamometer card according to the classified clusters, that is, similar dynamometer cards are drawn in the same category cluster, each row of vectors is a dynamometer card, the first two hundred points are displacement, and the last two hundred points are load, each cluster is a folder, Figure 3 a dynamometer card drawn according to one vector in Table 2.

[0106] The partial dynamometer card cluster in category 3 is shown in Table 3. Figure 4 According to the expert experience, the 2nd and 9th dynamometer card samples are removed to improve the quality of the sample set, and the category is marked as gas influence.

[0107] ​It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.

Claims

1. A method for preparing a dynamometer card sample set based on unsupervised learning, characterized in that, include: Acquire oilfield data and construct a big data system for fault diagnosis based on the oilfield data; The fault diagnosis big data system includes: well number, acquisition time, displacement, and load; The detection sample vector is obtained and preprocessed according to the fault diagnosis big data system. The preprocessed sample vectors are clustered using a clustering algorithm to find the optimal number of clusters, and the fault diagnosis categories are labeled based on the optimal classification results. The clustering of the preprocessed sample vectors using a clustering algorithm includes: Set the number of categories, with each centroid representing a class. Calculate the Euclidean distance of the remaining vectors to each centroid and assign them to the cluster containing the centroid with the smallest distance. After the vectors are partitioned, the vector with the smallest mean Euclidean distance to other points in the cluster is taken as the new centroid, and all vectors are repartitioned. When the centroids no longer change or the maximum number of iterations is reached, stop iterating and complete the clustering. Finding the optimal number of classifications includes: Clustering is performed based on the cluster number limit of the displacement load vector to be clustered, and the silhouette coefficients corresponding to different numbers of clusters are calculated. If the profile coefficient value continues to rise without decreasing within the cluster number limit, the upper limit needs to be expanded and iterative optimization should continue. If the silhouette coefficient value increases within the cluster number limit and then shows a decreasing trend, then the number of categories corresponding to the maximum silhouette coefficient is the optimal number of categories.

2. The method for preparing a dynamometer card sample set based on unsupervised learning as described in claim 1, characterized in that, Based on the aforementioned fault diagnosis big data system, detection sample vectors are obtained and preprocessed, including: Preprocess the displacement and load vectors of the oil pumping unit during operation, retaining information that is beneficial for classification; Check whether all vectors contain sample points. If the vector is empty due to an error in the sensor's transmission to the data center or data capture, delete the empty vector and keep the vector containing sample points. The displacement and load vectors containing sample points are merged to form a displacement-load vector. When the vector is missing sample points, missing values ​​are filled in.

3. The method for preparing a dynamometer card sample set based on unsupervised learning as described in claim 2, characterized in that, The missing value filling includes: filling the sample with the average of the two sample points before and after the missing position; The missing value imputation is represented as follows: ; in, For the first vector The missing information exists in this location. represents the value of a sample point in the vector.

4. The method for preparing a dynamometer card sample set based on unsupervised learning as described in claim 3, characterized in that: Euclidean distance, expressed as: ; in, For Euclidean distance, and These are two vectors from the sample set. and The two vectors are respectively the first and second. 1 sample point.

5. The method for preparing a dynamometer diagram sample set based on unsupervised learning as described in claim 4, characterized in that: Profile coefficient, expressed as: ; in, Intra-cluster dissimilarity, i.e., vector dissimilarity. The average dissimilarity of other vectors within the same cluster. The dissimilarity between clusters, i.e., vectors The minimum of the average dissimilarity of other clusters, the silhouette coefficient. The value range is [-1, 1].

6. The method for preparing a dynamometer map sample set based on unsupervised learning as described in claim 5, characterized in that, The fault diagnosis category is labeled based on the optimal classification result, including: Based on the optimal classification results, displacement load vectors of the same category are grouped into the same cluster and a displacement load vector dynamometer diagram is drawn. Based on expert experience, the clustering results are screened, dynamometer diagram samples with inconsistent categories are removed, and the fault diagnosis category is marked.

7. A device for preparing a dynamometer diagram sample set based on unsupervised learning, applied to the method described in any one of claims 1-6, characterized in that, include: The information acquisition module is used to acquire oilfield data and construct a fault diagnosis big data system based on the oilfield data; The preprocessing module is used to obtain detection sample vectors based on the fault diagnosis big data system and perform preprocessing operations. The clustering optimization module is used to use a clustering algorithm to cluster the preprocessed sample vectors to find the optimal number of categories, and to label the fault diagnosis categories based on the optimal classification results.