Geometric feature-based rod-pumped well indicator diagram working condition diagnosis method

By analyzing the geometric features of the pumping well display diagram and building a feature vector matching model, the problems of low efficiency and insufficient accuracy of traditional diagnostic methods are solved, and more efficient and accurate working conditions are achieved, which can effectively monitor and manage various working conditions and improve oilfield production management capabilities.

CN119646618APending Publication Date: 2025-03-18DAQING SUOFU ELECTRONIC TECH DEV CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411764974.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Traditional tuning diagram diagnosis methods are inefficient and have limited accuracy, especially in complex working conditions, and their diagnostic capabilities are insufficient, and it is difficult to effectively monitor and manage the impact of oilfield production caused by non-failure working conditions.

Method used

By analyzing the geometric features of the pump well demonstration diagram, a database is constructed and geometric features are extracted as feature vectors, the feature vectors are matched and classified using brute force matching method and preliminary classification model to obtain the final working condition diagnosis results.

Benefits of technology

It improves the efficiency and accuracy of working condition diagnosis, can more comprehensively identify various working conditions types, including non-fault conditions, and enhances the ability of oilfield production management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646618A_ABST
    Figure CN119646618A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of working condition diagnosis, and discloses a rod-pumped well indicator diagram working condition diagnosis method based on geometrical characteristics, which comprises the following steps: S01, constructing a database; step S02, collecting basic data; step S03, acquiring target data; step S04, on the basis of the target data in the step S03, obtaining indicator diagram working condition types corresponding to the successfully matched feature vectors in the database; s05, based on the target data in the step S03, obtaining the working condition type of the classification corresponding to the feature vector; step S06, combining the working condition types in the step S04 and the step S05 to obtain a final working condition diagnosis result; through the step S03, a weight prediction model is adopted to allocate the weights of the feature vectors, so that the importance of different geometric features is reflected, the geometric features are better analyzed, and a foundation is laid for subsequently matching quantifiable feature vectors corresponding to the geometric features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of working condition diagnosis, and more specifically to a method for diagnosing working conditions of a pumping well dynamometer diagram based on geometric features. Background Art

[0002] The oil pump is a key equipment in oil production projects. It drives the multi-stage connecting rod to swing through the high-speed rotation of the motor, realizes the up and down and vertical reciprocating motion of the downhole piston, and pumps the oil out of the wellbore. The safe operation of the oil pump directly affects the output and production status of the oil field. The working conditions of major domestic oil fields are complex, and there are many types of pumping well working conditions. Diagnosing the working conditions of pumping wells can monitor and manage oil field production more efficiently and accurately.

[0003] A method for diagnosing abnormal working conditions of a pumping well based on the characteristics of an indicator diagram is disclosed in a public document with the publication number CN112031748A. The method analyzes the curve contour characteristics of the indicator diagram data collected at the suspension point of the pumping unit, and uses four characteristic points, namely, the initial point, the maximum load point, the maximum displacement point, and the minimum load point, to divide the indicator diagram data into four sections: loading, upstroke, unloading, and downstroke. Then, the least square method is used to obtain the characteristic values ​​such as the slope of the fitting straight line of the up and downstrokes and the sum of squares of the standard errors. The characteristic values ​​of the loading and unloading sections are obtained by subtracting the end point connection line of the loading and load section curve data from the data points. Finally, a diagnostic model for abnormal working conditions of the pumping well is established in combination with the calibrated characteristic value boundary error threshold, and the multi-fault field diagnosis of the pumping unit is performed based on the model. The method can control the pumping project site in real time and efficiently, and achieve the purpose of automatic diagnosis and improved safety in production.

[0004] However, the traditional dynamometer diagram diagnostic method usually relies on the establishment of models and the judgment of empirical parameters. This method is often inefficient and has limited accuracy, especially under complex working conditions, where its diagnostic capability is obviously insufficient. In addition, the existing analysis of the dynamometer diagram working conditions of pumping wells is mostly aimed at fault working conditions, while there are many non-fault working conditions in pumping wells. The pumping unit can operate normally, but the efficiency and pumping efficiency will be reduced. Such conditions will not cause pumping unit failures, but will still affect crude oil production and have an impact on oilfield production management.

[0005] In view of this, the present invention proposes a method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features. By analyzing the geometric features of the dynamometer diagram, a more intuitive and representative variation pattern can be provided, thereby improving the efficiency and accuracy of working condition diagnosis. Summary of the invention

[0006] In order to overcome the above-mentioned defects of the prior art, the present invention provides a method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features to solve the problems existing in the above-mentioned background technology.

[0007] The present invention provides the following technical solution: a method for diagnosing the working condition of a pumping well indicator diagram based on geometric features, comprising the following steps: Step S01: Building a database: collecting the indicator diagrams corresponding to various working conditions of the pumping well, and extracting the geometric features of each indicator diagram to build a database; Step S02: Collect basic data: collect the performance diagram of the pumping well under the working condition to be identified, and extract the geometric features of the performance diagram as basic data; Step S03: Obtain target data: Based on the acquired basic data, the geometric features are converted into feature vectors and fused to obtain the fused feature vectors as target data; Step S04: Based on the target data in step S03, a brute force matching method is used to perform database matching on the converted feature vectors, and the working condition type of the indicator diagram corresponding to the successfully matched feature vector in the database is obtained; Step S05: Based on the target data in step S03, the feature vector is classified using the constructed preliminary classification model to obtain the operating condition type corresponding to the feature vector; Step S06: Combine the working condition types of step S04 and step S05 to obtain the final working condition diagnosis result, and output it to the human-computer interaction terminal for display.

[0008] Preferably, the various operating conditions of the pumping well include normal operating conditions, oil-thick operating conditions, wax deposition operating conditions, vacuum operating conditions, gas lock operating conditions, insufficient liquid supply conditions, unreasonable flushing conditions, abnormal current conditions, and liquid level fluctuation conditions; The geometric features include maximum load, minimum load, load fluctuation amplitude, dynamometer diagram area, dynamometer diagram contour length and dynamometer diagram shape.

[0009] Preferably, the fusion of geometric features adopts a weighted fusion method, assigning different weights to different features in the geometric features, and performing weighted summation; the weights of different features are obtained through a weight distribution model; The training method of the weight distribution model is: A single feature in the geometric features of the indicator diagram and the corresponding working condition of the indicator diagram are taken as a group of analysis data, d groups of analysis data are collected in advance, corresponding weight distribution values ​​are set for the d groups of analysis data, d is an integer greater than 1, and the analysis data and the corresponding weight distribution values ​​are converted into a corresponding set of feature vectors; Each set of feature vectors is used as the input of the weight allocation model. The weight allocation model takes a set of predicted weight allocation values ​​corresponding to each set of analysis data as output, and takes the actual weight allocation values ​​corresponding to each set of analysis data as the prediction target. The actual weight allocation values ​​are the pre-collected weight allocation values ​​corresponding to the analysis data. The training target is to minimize the sum of the prediction errors of all analysis data. The formula of the prediction error is expressed as: , where ε p is the prediction error, p is the group number of the eigenvector corresponding to the analyzed data, θ p Assign the predicted weight value corresponding to the p-th group of analysis data, μ p The actual weight distribution value corresponding to the p-th group of analysis data is used to train the weight distribution model until the sum of the prediction errors reaches convergence and the training is stopped; The weight distribution model is specifically a deep neural network model; it includes an input layer, a hidden layer and an output layer; each hidden layer includes multiple neurons, each neuron is connected to the neurons in the next layer, the connection contains weights, and an activation function is applied to each neuron between the hidden layer and the output layer.

[0010] Preferably, the specific method of obtaining the working condition type of the dynamometer diagram corresponding to the successfully matched feature vector in the database is: Set digital labels for the feature vectors in the database, match the target data with each feature vector in the database to form feature vector pairs, and calculate the matching degree between each feature vector pair: Among them, PP mj is the matching degree between the target data and the feature vector pair formed by the jth feature vector, D mr is the coordinate point of the target data in the rth dimension, D jr is the coordinate of the jth eigenvector in the rth dimension, n is the total dimension of the space, r=1, 2, 3, ..., n; j=1, 2, 3, ..., J, J is the total number of eigenvectors in the database; The matching degree between each feature vector pair is arranged in descending order, and the feature vector pair with the highest matching degree is selected as the successfully matched feature vector pair. If there are multiple feature vector pairs with the same matching degree and they are all maximum values, they are ranked first. All successfully matched feature vector pairs are mapped to obtain all operating condition types corresponding to the feature vectors in the database in the successfully matched feature vector pairs, and recorded as the first diagnostic set.

[0011] Preferably, the construction of the preliminary classification model is specifically as follows: The geometric feature data of the historical pumping well indicator diagram and its corresponding working condition category are obtained, and the working condition category label is set. The geometric feature data of the historical pumping well indicator diagram are respectively constructed into corresponding feature vectors and fused to obtain the fused feature vector, which is recorded as the historical geometric feature vector; The historical geometric feature vectors with working condition category labels are randomly divided into training set and test set; Based on the working condition category labels, K working condition categories are obtained, and the prior probability of each working condition category and the conditional probability of each historical geometric feature vector corresponding to the working condition category are calculated; the prior probability is estimated by the sample proportion of each working condition category in the training set, and the conditional probability follows a Gaussian distribution; Based on the prior probability and conditional probability, a preliminary classification model is constructed. For a given historical geometric feature vector X, the classification model calculates ; Wherein, P(F|X) represents the probability that the sample belongs to the working condition category F under the condition of the historical geometric feature vector X, P(X|F) represents the probability of observing the historical geometric feature vector X under the condition that the known sample, i.e., the historical geometric feature vector, belongs to the fault category F, P(F) is the prior probability, which represents the probability that the sample belongs to the working condition category F, and P(X) is the evidence probability, which represents the probability of observing the historical geometric feature vector X; Select the working condition category F that maximizes P(F|X) as the predicted output of the historical geometric feature vector X; use the training set to train the preliminary classification model, define the loss function of the preliminary classification model, and select the cross entropy loss function. Use the test set to evaluate the constructed preliminary classification model. The evaluation method is to calculate the value of the loss function. If the value of the loss function does not decrease for λ consecutive times, save the preliminary classification model at this time as the final preliminary classification model.

[0012] Preferably, the method of obtaining the operating condition type corresponding to the classification of the target data is as follows: inputting the target data into a constructed preliminary classification model, which outputs the operating condition type; and setting the output operating condition type as a second diagnosis set.

[0013] Preferably, the specific method of obtaining the final working condition diagnosis result is: Obtain a first diagnosis set and a second diagnosis set, perform intersection processing on the first diagnosis set and the second diagnosis set, and obtain a final diagnosis set U, where the elements in U, namely the operating condition types, are used as the final operating condition diagnosis result; If U is an empty set, a warning notification is sent to the human-computer interaction terminal, and the first diagnosis set and the second diagnosis set are unioned, and the unioned set is used as the final diagnosis set. The elements in the set, namely the operating condition types, are used as the final operating condition diagnosis results.

[0014] A pumping well indicator diagram working condition diagnosis system based on geometric features, comprising a data acquisition module, a geometric feature processing module, a database construction module, a feature matching module, a geometric feature analysis module, a working condition acquisition module and a human-computer interaction module; The data acquisition module is used to collect the pumping well indicator diagram of the working condition to be identified, extract the geometric features of the indicator diagram as basic data, and transmit it to the geometric feature processing module; The geometric feature processing module is used to receive the basic data collected by the data collection module, convert the geometric features into feature vectors and fuse them, obtain the fused feature vectors as target data, and transmit them to the geometric feature analysis module and the feature matching module; The database construction module is used to collect the indicator diagrams corresponding to various working conditions of the pumping well, and extract the geometric features of each indicator diagram to construct a database; The feature matching module is used to receive data from the geometric feature processing module, use a brute force matching method to perform database matching on the converted feature vector, obtain the working condition type of the indicator diagram corresponding to the successfully matched feature vector in the database, and transmit it to the working condition acquisition module; The geometric feature analysis module is used to receive data from the geometric feature processing module, classify the feature vector using the constructed preliminary classification model, obtain the working condition type corresponding to the classification of the feature vector, and transmit it to the working condition acquisition module; The working condition acquisition module is used to receive data from the feature matching module and the geometric feature analysis module, obtain the final working condition diagnosis result, and output it to the human-computer interaction module; The human-computer interaction module is used to display and warn the output results.

[0015] Technical effects and advantages of the present invention: The present invention is provided with step S03, which is conducive to converting geometric features into quantifiable feature vectors, can better analyze geometric features, and lays a foundation for the subsequent matching of quantifiable feature vectors corresponding to geometric features. When the feature vectors are fused, the weight prediction model is used to allocate the weights of the feature vectors to reflect the importance of different geometric features. Therefore, when the feature vectors are fused, the fused feature vectors are more closely and accurately related to the working conditions. The present invention is provided with step S04, which is conducive to matching feature vectors through step S04, traversing and comparing feature vectors, calculating the distance between each pair of feature vectors, and finding the most similar feature vector pair. The geometric features corresponding to the feature vector pair are the most similar, so the higher the possibility that the corresponding indicator diagram working condition type is the same, all feature vectors are searched from the database to obtain the working condition type corresponding to the most similar feature vector, and the search is more comprehensive, and any possible working condition type will not be missed; the use of a brute force matching method broadens the scope of feature vector search, improves the comprehensiveness of feature vector matching, that is, improves the comprehensiveness of working condition diagnosis. The present invention is provided with step S05, which is conducive to obtaining the working condition type based on the machine learning model, establishing a preliminary classification model, being able to automatically classify the feature vector, and giving the working condition type diagnosis result. The analysis dimension is more comprehensive, the working condition diagnosis is more accurate and reliable, and the complex working condition diagnosis process is intelligent, so that the operator can easily and quickly obtain the diagnosis result, which greatly reduces the use threshold, releases human resources, and improves the accuracy and efficiency of the working condition diagnosis. The present invention is provided with step S06, which is conducive to the intersection processing of the working condition type set obtained by matching the feature vector of the geometric features with the working condition type set obtained by building the model through machine learning, that is, the intersection processing of the first diagnosis set and the second diagnosis set, the elements in the intersection are the working condition types, that is, the working condition types diagnosed by both methods, and taking them as the final working condition diagnosis result improves the diagnostic accuracy; the final working condition diagnosis result obtained by combining the two as the final working condition diagnosis result is more comprehensive and accurate. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 The present invention is a flow chart of the method for diagnosing the working condition of the pumping well dynamometer diagram based on geometric features.

[0016] Figure 2 The present invention is a flow chart of the pumping well dynamometer diagram working condition diagnosis system based on geometric features. DETAILED DESCRIPTION

[0017] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. In addition, the forms of the various structures recorded in the following embodiments are merely illustrative. The present invention involves a method for diagnosing the working conditions of a pumping well indicator diagram based on geometric features and is not limited to the various structures recorded in the following embodiments. All other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0018] like Figure 1 As shown, the present invention provides a method for diagnosing the working condition of a pumping well indicator diagram based on geometric features, comprising the following steps: Step S01: Building a database: collecting the dynamometer diagrams corresponding to various working conditions of the oil pumping well, and extracting the geometric features of each dynamometer diagram to build a database; the dynamometer diagrams corresponding to various working conditions can be collected by web crawler technology, or the dynamometer diagrams corresponding to various working conditions can be obtained by collecting the dynamometer diagrams corresponding to the working conditions of the historical oil pumping wells. The various working conditions of the oil pumping wells are all the working conditions that may occur in the oil pumping wells, including but not limited to normal working conditions, oil-thick working conditions, waxing working conditions, vacuum working conditions, gas lock working conditions, insufficient liquid supply working conditions, unreasonable flushing conditions, abnormal current working conditions, and liquid level fluctuation working conditions; the purpose of building a database is to collect the dynamometer diagrams corresponding to all working conditions of the oil pumping wells, so that the corresponding geometric features can be extracted from each dynamometer diagram, which lays the foundation for the subsequent diagnosis of the working conditions of the oil pumping wells through geometric features; Step S02: Collecting basic data: Collect the dynamometer diagram of the pumping well of the working condition to be identified, and extract the geometric features of the dynamometer diagram as basic data; the geometric features include but are not limited to the maximum load, the minimum load, the load fluctuation amplitude, the dynamometer diagram area, the dynamometer diagram contour length and the dynamometer diagram shape, etc.; the geometric features of the dynamometer diagram can provide a more intuitive and representative variation law, and extracting the geometric features of the dynamometer diagram for subsequent pumping well working condition diagnosis can improve the efficiency and accuracy of working condition diagnosis, and more accurately obtain the actual working condition under complex and changeable working conditions, so as to formulate corresponding strategies in a timely manner to efficiently manage oilfield production; Step S03: Obtaining target data: Based on the acquired basic data, the geometric features are converted into feature vectors and fused to obtain the fused feature vectors as target data; the purpose is to better analyze the geometric features after converting the geometric features into quantifiable feature vectors, laying a foundation for the subsequent matching of the quantifiable feature vectors corresponding to the geometric features; Step S04: Based on the target data in step S03, the converted feature vectors are matched in the database by a brute force matching method to obtain the working condition type of the indicator diagram corresponding to the successfully matched feature vector in the database; the purpose is to traverse and compare the feature vectors, calculate the distance between each pair of feature vectors, and find the most similar feature vector pair. The geometric features corresponding to the feature vector pair are the most similar, so the higher the possibility that the corresponding indicator diagram working condition type is the same, all feature vectors are searched from the database to obtain the working condition type corresponding to the most similar feature vector, and the search is more comprehensive without missing any possible working condition type; Step S05: Based on the target data in step S03, the feature vector is classified using the constructed preliminary classification model to obtain the working condition type corresponding to the feature vector; its purpose is to establish a preliminary classification model that can automatically classify the feature vector and provide working condition type diagnosis results, so that the analysis dimension is more comprehensive, the working condition diagnosis is more accurate and reliable, and the complex working condition diagnosis process is intelligent, so that operators can easily and quickly obtain diagnosis results, which greatly reduces the use threshold and releases human resources; Step S06: Combine the working condition types of step S04 and step S05 to obtain the final working condition diagnosis result, and output it to the human-computer interaction terminal for display.

[0019] In this embodiment, it should be specifically explained that the fusion of geometric features adopts a weighted fusion method, assigning different weights to different features in the geometric features to reflect their importance, and performing weighted summation; the weights of different features are obtained through a weight distribution model; The training method of the weight distribution model is: A single feature in the geometric features of the indicator diagram and the corresponding working condition of the indicator diagram are taken as a group of analysis data, d groups of analysis data are collected in advance, corresponding weight distribution values ​​are set for the d groups of analysis data, d is an integer greater than 1, and the analysis data and the corresponding weight distribution values ​​are converted into a corresponding set of feature vectors; the weight distribution values ​​corresponding to the analysis data are obtained by technical personnel in the field of technology in the process of evaluating the geometric feature data corresponding to the historical working conditions, d groups of analysis data are collected, and under the conditions of each group of analysis data, the changes in the geometric features under the real-time working conditions are comprehensively analyzed, and the corresponding weight distribution values ​​are set in combination with actual experience for the degree of influence on the working conditions; the weight distribution values ​​reflect the degree to which different features in the geometric features reflect the working conditions; the corresponding weight distribution values ​​are set for the d groups of analysis data in turn; Each set of feature vectors is used as the input of the weight allocation model. The weight allocation model takes a set of predicted weight allocation values ​​corresponding to each set of analysis data as output, and takes the actual weight allocation values ​​corresponding to each set of analysis data as the prediction target. The actual weight allocation values ​​are the pre-collected weight allocation values ​​corresponding to the analysis data. The training target is to minimize the sum of the prediction errors of all analysis data. The formula of the prediction error is expressed as: , where ε p is the prediction error, p is the group number of the eigenvector corresponding to the analyzed data, θ p Assign the predicted weight value corresponding to the p-th group of analysis data, μ p The actual weight distribution value corresponding to the p-th group of analysis data is used to train the weight distribution model until the sum of the prediction errors reaches convergence and the training is stopped; The weight distribution model is specifically a deep neural network model; it includes an input layer, a hidden layer and an output layer; each hidden layer includes multiple neurons, each neuron is connected to the neurons in the next layer, and the connection contains weights, which determine the importance and influence of data transmission in the neural network; an activation function is applied to each neuron between the hidden layer and the output layer, and the activation function is mapped into nonlinearity, allowing the network to learn more complex patterns and features.

[0020] In this embodiment, it should be specifically explained that the method of converting the geometric features into feature vectors can adopt any of the following methods: directly using the extracted features as vector elements, using vector quantization technology to map continuous features to a limited number of discrete values, and using unique coding or other coding methods to convert features into numerical vectors; Exemplarily, Fourier descriptors may be used to convert geometric shape features in geometric features into quantifiable feature vectors, and the specific process is as follows: First, extract the contour of the object from the image; this can be achieved through an edge detection algorithm to obtain a series of points on the contour; then normalize the contour. In order to make the descriptor unaffected by the size, position and rotation of the contour, the contour needs to be normalized, including but not limited to translating the contour so that the center of mass is located at the origin, etc.; scale the contour to a uniform size and rotate the contour so that its main axis is aligned with the coordinate axis; the contour is represented as a complex sequence: each point on the contour is represented as a complex number, where the real part is the x-coordinate of the point and the imaginary part is the y-coordinate of the point; Assuming that the sequence of points on the contour is ((x1,y1)、(x2,y2)、(x3,y3)、…、(xn,yn)), then the corresponding complex number sequence is (z1=x1+y1i、z2=x2+y2i、z3=x3+y3i、…、zn=xn+yni), where i is the imaginary unit; The Fourier transform is used to perform discrete Fourier transform on the normalized complex sequence; the Fourier transform can convert the point sequence on the contour into a set of Fourier coefficients, which reflect the frequency components of the contour. The result of the Fourier transform is a complex sequence, in which each complex number represents a specific frequency component; Then select Fourier coefficients, select a certain number of coefficients from the Fourier transform results as feature vectors of geometric shapes; usually select low-frequency coefficients because they contain the main information of the geometric shapes and are less sensitive to noise; normalize the coefficients, in order to further increase the robustness of the descriptor, the selected Fourier coefficients can be normalized, for example, by dividing by the modulus of the coefficients; Finally, the eigenvector is constructed and the normalized coefficients are arranged in order into a vector. This vector is the eigenvector used to describe the geometric shape; each element in the eigenvector corresponds to a specific frequency component of the contour.

[0021] In this embodiment, it should be specifically explained that the specific method of obtaining the working condition type of the dynamometer diagram corresponding to the successfully matched feature vector in the database is: Set digital labels for the feature vectors in the database, match the target data with each feature vector in the database to form feature vector pairs, and calculate the matching degree between each feature vector pair: Among them, PP mj is the matching degree between the target data and the feature vector pair formed by the jth feature vector, D mr is the coordinate point of the target data in the rth dimension, D jr is the coordinate of the jth eigenvector in the rth dimension, n is the total dimension of the space, r=1, 2, 3, ..., n; j=1, 2, 3, ..., J, J is the total number of eigenvectors in the database; The matching degree between each feature vector pair is arranged in descending order, and the feature vector pair with the highest matching degree is selected as the successfully matched feature vector pair. If there are multiple feature vector pairs with the same matching degree and they are all maximum values, they are ranked first. All successfully matched feature vector pairs are mapped to obtain all operating condition types corresponding to the feature vectors in the database in the successfully matched feature vector pairs, and recorded as the first diagnostic set.

[0022] In this embodiment, it should be specifically explained that the construction of the preliminary classification model is specifically as follows: The geometric feature data of the historical pumping well indicator diagram and its corresponding working condition category are obtained, and the working condition category label is set. The geometric feature data of the historical pumping well indicator diagram are respectively constructed into corresponding feature vectors and fused to obtain the fused feature vector, which is recorded as the historical geometric feature vector; The historical geometric feature vectors with working condition category labels are randomly divided into training sets and test sets, and the ratio can be set to 7:3 or other reasonable ratios; Based on the working condition category labels, K working condition categories are obtained, and the prior probability of each working condition category and the conditional probability of each historical geometric feature vector corresponding to the working condition category are calculated; the prior probability is estimated by the sample proportion of each working condition category in the training set, and the conditional probability follows a Gaussian distribution; Based on the prior probability and conditional probability, a preliminary classification model is constructed. For a given historical geometric feature vector X, the classification model calculates ; Wherein, P(F|X) represents the probability that the sample belongs to the working condition category F under the condition of the historical geometric feature vector X, P(X|F) represents the probability of observing the historical geometric feature vector X under the condition that the known sample, that is, the historical geometric feature vector, belongs to the fault category F, that is, the conditional probability distribution estimated based on the training data, P(F) is the prior probability, which represents the probability that the sample belongs to the working condition category F, without considering any characteristic information, and is calculated based on the proportion of samples of each category, P(X) is the evidence probability, which represents the probability of observing the historical geometric feature vector X, which is independent of the working condition category. Since it is the same constant value for all working condition categories, it can be ignored when comparing the probabilities of different working condition categories; Select the working condition category F that maximizes P(F|X) as the prediction output of the historical geometric feature vector X; use the training set to train the preliminary classification model, define the loss function of the preliminary classification model, and select the cross entropy loss function. Use the test set to evaluate the constructed preliminary classification model. The evaluation method is to calculate the value of the loss function. If the value of the loss function does not decrease for λ consecutive times, save the preliminary classification model at this time as the final preliminary classification model; The method of obtaining the operating condition type corresponding to the classification of the target data comprises: inputting the target data into a constructed preliminary classification model, which outputs the operating condition type; and setting the output operating condition type as the second diagnosis set.

[0023] In this embodiment, it should be specifically explained that the specific method of obtaining the final working condition diagnosis result is: Obtain a first diagnosis set and a second diagnosis set, perform intersection processing on the first diagnosis set and the second diagnosis set, and obtain a final diagnosis set U, where the elements in U, namely the operating condition types, are used as the final operating condition diagnosis result; If U is an empty set, a warning notification is sent to the human-computer interaction terminal, and the first diagnosis set and the second diagnosis set are unioned, and the unioned set is used as the final diagnosis set. The elements in the set, namely the operating condition types, are used as the final operating condition diagnosis results.

[0024] In this embodiment, it should be specifically explained that the set of working condition types obtained by matching the feature vectors of the geometric features and the set of working condition types obtained by building the model through machine learning are subjected to intersection processing, that is, the first diagnosis set and the second diagnosis set are subjected to intersection processing, and the elements in the intersection are the working condition types, that is, the working condition types diagnosed by both methods, and taking them as the final working condition diagnosis results improves the accuracy of diagnosis; step S04 matches the feature vectors and adopts a brute force matching method to broaden the range of feature vector search, improve the comprehensiveness of feature vector matching, that is, improve the comprehensiveness of working condition diagnosis, and step S05 obtains the working condition type based on the machine learning model to improve the accuracy and efficiency of working condition diagnosis; therefore, the final working condition diagnosis result obtained by combining the two is more comprehensive and accurate as the final working condition diagnosis result; at the same time, when there is no intersection between the two, it means that the working condition diagnosis types obtained by the two methods are completely different at this time, and new working condition types may appear, or there is a serious error in some way. At this time, an early warning notification is sent to the human-computer interaction terminal to remind technicians in this field to pay attention to the output working condition diagnosis results, and if necessary, the indicator diagram can be further diagnosed.

[0025] like Figure 2 As shown, the present invention provides a pumping well indicator diagram working condition diagnosis system based on geometric features, including a data acquisition module, a geometric feature processing module, a database construction module, a feature matching module, a geometric feature analysis module, a working condition acquisition module and a human-computer interaction module; The data acquisition module is used to collect the pumping well indicator diagram of the working condition to be identified, extract the geometric features of the indicator diagram as basic data, and transmit it to the geometric feature processing module; The geometric feature processing module is used to receive the basic data collected by the data collection module, convert the geometric features into feature vectors and fuse them, obtain the fused feature vectors as target data, and transmit them to the geometric feature analysis module and the feature matching module; The database construction module is used to collect the indicator diagrams corresponding to various working conditions of the pumping well, and extract the geometric features of each indicator diagram to construct a database; The feature matching module is used to receive data from the geometric feature processing module, use a brute force matching method to perform database matching on the converted feature vector, obtain the working condition type of the indicator diagram corresponding to the successfully matched feature vector in the database, and transmit it to the working condition acquisition module; The geometric feature analysis module is used to receive data from the geometric feature processing module, classify the feature vector using the constructed preliminary classification model, obtain the working condition type corresponding to the classification of the feature vector, and transmit it to the working condition acquisition module; The working condition acquisition module is used to receive data from the feature matching module and the geometric feature analysis module, obtain the final working condition diagnosis result, and output it to the human-computer interaction module; The human-computer interaction module is used to display and warn the output results.

[0026] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0027] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features, characterized in that: The following steps are involved: Step S 01: Build a database: collect the indicator diagrams corresponding to various working conditions of the pumping wells, and extract the geometric features of each indicator diagram to build a database; Step S02: Collect basic data: collect the performance diagram of the pumping well under the working condition to be identified, and extract the geometric features of the performance diagram as basic data; Step S03: Obtain target data: Based on the acquired basic data, the geometric features are converted into feature vectors and fused to obtain the fused feature vectors as target data; Step S04: Based on the target data in step S03, a brute force matching method is used to perform database matching on the converted feature vectors, and the working condition type of the indicator diagram corresponding to the successfully matched feature vector in the database is obtained; Step S05: Based on the target data in step S03, the feature vector is classified using the constructed preliminary classification model to obtain the operating condition type corresponding to the feature vector; Step S06: Combine the working condition types of step S04 and step S05 to obtain the final working condition diagnosis result, and output it to the human-computer interaction terminal for display.

2. The method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features according to claim 1, characterized in that: The various operating conditions of the pumping well include normal operating conditions, oil-thick operating conditions, wax deposition operating conditions, vacuum operating conditions, gas lock operating conditions, insufficient liquid supply conditions, unreasonable flushing conditions, abnormal current conditions, and liquid level fluctuation conditions; The geometric features include maximum load, minimum load, load fluctuation amplitude, dynamometer diagram area, dynamometer diagram contour length and dynamometer diagram shape.

3. The method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features according to claim 1, characterized in that: The fusion of geometric features adopts a weighted fusion method, assigning different weights to different features in the geometric features and performing weighted summation; the weights of different features are obtained through a weight distribution model; The training method of the weight distribution model is: A single feature in the geometric features of the indicator diagram and the corresponding working condition of the indicator diagram are taken as a group of analysis data, d groups of analysis data are collected in advance, corresponding weight distribution values ​​are set for the d groups of analysis data, d is an integer greater than 1, and the analysis data and the corresponding weight distribution values ​​are converted into a corresponding set of feature vectors; Each set of feature vectors is used as the input of the weight allocation model. The weight allocation model uses a set of predicted weight allocation values ​​corresponding to each set of analysis data as output, and uses the actual weight allocation values ​​corresponding to each set of analysis data as the prediction target. The actual weight allocation values ​​are the pre-collected weight allocation values ​​corresponding to the analysis data. The training target is to minimize the sum of the prediction errors of all analysis data. The formula for the prediction error is expressed as: , where ε p is the prediction error, p is the group number of the eigenvector corresponding to the analyzed data, θ p Assign the predicted weight value corresponding to the p-th group of analysis data, μ p The actual weight distribution value corresponding to the p-th group of analysis data is used to train the weight distribution model until the sum of the prediction errors reaches convergence and the training is stopped; The weight distribution model is specifically a deep neural network model; it includes an input layer, a hidden layer and an output layer; each hidden layer includes multiple neurons, each neuron is connected to the neurons in the next layer, the connection contains weights, and an activation function is applied to each neuron between the hidden layer and the output layer.

4. The method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features according to claim 3 is characterized in that: The specific method of obtaining the working condition type of the dynamometer diagram corresponding to the successfully matched feature vector in the database is: Set digital labels for the feature vectors in the database, match the target data with each feature vector in the database to form feature vector pairs, and calculate the matching degree between each feature vector pair: ; Among them, PP mj is the matching degree between the feature vector pair formed by the target data and the jth feature vector, D mr is the coordinate point of the target data in the rth dimension, D jr is the coordinate of the jth eigenvector in the rth dimension, n is the total dimension of the space, r=1, 2, 3, ..., n; j=1, 2, 3, ..., J, J is the total number of eigenvectors in the database; The matching degree between each feature vector pair is arranged in descending order, and the feature vector pair with the highest matching degree is selected as the successfully matched feature vector pair. If there are multiple feature vector pairs with the same matching degree and they are all maximum values, they are ranked first. All successfully matched feature vector pairs are mapped to obtain all operating condition types corresponding to the feature vectors in the database in the successfully matched feature vector pairs, and recorded as the first diagnostic set.

5. The method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features according to claim 4, characterized in that: The construction of the preliminary classification model is specifically as follows: The geometric feature data of the historical pumping well indicator diagram and its corresponding working condition category are obtained, and the working condition category label is set. The geometric feature data of the historical pumping well indicator diagram are respectively constructed into corresponding feature vectors and fused to obtain the fused feature vector, which is recorded as the historical geometric feature vector; The historical geometric feature vectors with working condition category labels are randomly divided into training set and test set; Based on the working condition category labels, K working condition categories are obtained, and the prior probability of each working condition category and the conditional probability of each historical geometric feature vector corresponding to the working condition category are calculated; The prior probability is estimated by the sample proportion of each working condition category in the training set, and the conditional probability follows a Gaussian distribution; Based on the prior probability and conditional probability, a preliminary classification model is constructed. For a given historical geometric feature vector X, the classification model calculates ; Wherein, P(F|X) represents the probability that the sample belongs to the working condition category F under the condition of the historical geometric feature vector X, P(X|F) represents the probability of observing the historical geometric feature vector X under the condition that the known sample, i.e., the historical geometric feature vector, belongs to the fault category F, P(F) is the prior probability, which represents the probability that the sample belongs to the working condition category F, and P(X) is the evidence probability, which represents the probability of observing the historical geometric feature vector X; Select the working condition category F that maximizes P(F|X) as the predicted output of the historical geometric feature vector X; use the training set to train the preliminary classification model, define the loss function of the preliminary classification model, and select the cross entropy loss function. Use the test set to evaluate the constructed preliminary classification model. The evaluation method is to calculate the value of the loss function. If the value of the loss function does not decrease for λ consecutive times, save the preliminary classification model at this time as the final preliminary classification model.

6. The method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features according to claim 5, characterized in that: The method of obtaining the operating condition type corresponding to the classification of the target data comprises: inputting the target data into a constructed preliminary classification model, which outputs the operating condition type; and setting the output operating condition type as the second diagnosis set.

7. The method for diagnosing the working condition of a pumping well dynamometer diagram based on geometric features according to claim 6, characterized in that: The specific method of obtaining the final working condition diagnosis result is: Obtain a first diagnosis set and a second diagnosis set, perform intersection processing on the first diagnosis set and the second diagnosis set, and obtain a final diagnosis set U, where the elements in U, namely the operating condition types, are used as the final operating condition diagnosis result; If U is an empty set, a warning notification is sent to the human-computer interaction terminal, and the first diagnosis set and the second diagnosis set are unioned, and the unioned set is used as the final diagnosis set. The elements in the set, namely the operating condition types, are used as the final operating condition diagnosis results.

8. A pumping well dynamometer diagram working condition diagnosis system based on geometric features, used to implement any one of the pumping well dynamometer diagram working condition diagnosis methods based on geometric features as claimed in claims 1 to 7, characterized in that: It includes data acquisition module, geometric feature processing module, database construction module, feature matching module, geometric feature analysis module, working condition acquisition module and human-computer interaction module; The data acquisition module is used to collect the pumping well indicator diagram of the working condition to be identified, extract the geometric features of the indicator diagram as basic data, and transmit it to the geometric feature processing module; The geometric feature processing module is used to receive the basic data collected by the data collection module, convert the geometric features into feature vectors and fuse them, obtain the fused feature vectors as target data, and transmit them to the geometric feature analysis module and the feature matching module; The database construction module is used to collect the indicator diagrams corresponding to various working conditions of the pumping well, and extract the geometric features of each indicator diagram to construct a database; The feature matching module is used to receive data from the geometric feature processing module, use a brute force matching method to perform database matching on the converted feature vector, obtain the working condition type of the indicator diagram corresponding to the successfully matched feature vector in the database, and transmit it to the working condition acquisition module; The geometric feature analysis module is used to receive data from the geometric feature processing module, classify the feature vector using the constructed preliminary classification model, obtain the working condition type corresponding to the classification of the feature vector, and transmit it to the working condition acquisition module; The working condition acquisition module is used to receive data from the feature matching module and the geometric feature analysis module, obtain the final working condition diagnosis result, and output it to the human-computer interaction module; The human-computer interaction module is used to display and warn the output results.

Citation Information

Patent Citations

  • Method for diagnosing abnormal working conditions of rod-pumped well based on indicator diagram characteristics

    CN112031748A