A Method for Identifying Pumping Working Conditions Based on Indicator Diagram Content Retrieval and Fusion Inference
Through the method based on the content retrieval of the power diagram, combined with CBIR technology and fusion reasoning methods, the problem of differences in the identification results in the oil well condition recognition and the inability to identify multiple working conditions at the same time is solved, and efficient and accurate working conditions recognition is achieved.
Patent Information
- Application Number
- CN202210091694.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-01-26
AI Technical Summary
The prior art has problems in the identification of oil well conditions in the identification results and the inability to identify multiple operating conditions at the same time, and the traditional methods are inefficient and difficult to meet the needs of the industry.
Using a method based on the content retrieval of the power diagram, combined with CBIR technology, matching algorithm and fusion reasoning methods, the feature extraction and working condition recognition of the power diagram of the pumping well is achieved through the Resnet50 feature extraction and the Pearson correlation coefficient algorithm.
This method can accurately identify a single working condition and comprehensively judge multiple working conditions, improving the recognition accuracy and efficiency, and is suitable for load and displacement changes caused by aging of the oil pump.
Smart Images

Figure CN114581687B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of oil well production and pumping, and particularly to a pumping condition identification method based on dynamometer card content retrieval and fusion reasoning. Background Technique
[0002] The pumping dynamometer card is the main means to understand the working conditions of the tubing, rod, and pump downhole of the pumping unit. Analyzing and interpreting the dynamometer card is a main means to directly understand the working condition of the deep well pump. All abnormal phenomena during the operation of the deep well pump can be relatively intuitively reflected on the dynamometer card.
[0003] The pumping unit is a core device in the oil extraction link. Judging the working condition of the pumping unit and operating the operation of the pumping unit by simple manpower has low efficiency and cannot meet the needs of industry development.
[0004] Under the background of the current artificial intelligence trend, especially using deep learning technology to mine the information expressed by the dynamometer card, it is of great significance to improve the accuracy and efficiency of pumping unit condition or fault identification and ensure the stable and reliable operation of the pumping unit. At present, traditional pumping well identification methods include mechanical model analysis, sucker rod pump well fault diagnosis expert system, etc. However, due to geological differences and machine aging problems in different regions, there will be large differences in the identification results if traditional dynamometer card identification methods are used. Moreover, most of these mainstream methods can only identify one pumping condition, which has a large deviation from the actual condition, and there are widespread problems of multiple conditions occurring simultaneously during the pumping process.
[0005] Content-based image retrieval (CBIR, Content Based Image Retrieval) includes key technical links such as feature extraction, similarity measurement, and image retrieval, and is widely used in fields such as industrial search engines for image search by image, similar product search on e-commerce websites, and similar content recommendation on social platforms. Currently, in the field of pumping condition identification, common neural network and machine learning methods are used, and there is no public report on the application of content-based image retrieval technology in the field of pumping condition identification. Summary of the Invention
[0006] The present invention discloses a pumping condition identification method based on dynamometer card content retrieval and fusion reasoning, starting from engineering applicability and combining CBIR technology, matching algorithms, and fusion reasoning means. The specific steps of the method of the present invention are as follows:
[0007] A pumping condition identification method based on dynamometer card content retrieval and fusion reasoning includes the following processes:
[0008] (1) Obtaining, annotating, classifying, and training the dynamometer card.
[0009] (2) Use the trained Resnet50 to extract features from each image in the sample set and save the feature vectors. (Use the trained Resnet50 network to extract features from the labeled training set and save the feature results of all avgpool layers.)
[0010] (3) Obtain the load and displacement data collected by the dynamometer of the pumping well to be detected and draw a dynamometer diagram. (Obtain the load and displacement data collected by the dynamometer of the pumping well to be detected and use opencv to draw the dynamometer diagram to be recognized with the load and displacement data.)
[0011] (4) Retrieve recommended matching diagrams based on the content of the dynamometer diagram and perform working condition fusion inference and judgment.
[0012] (5) Send the working condition judgment result to the upper layer for display.
[0013] Preferably, the steps of obtaining, annotating, classifying, and training the dynamometer diagram include obtaining the dynamometer diagram, annotating and classifying the existing dynamometer diagram data set, and training Resnet50 with the labeled dynamometer diagram data set and saving the weights after training; the specific steps are as follows:
[0014] (1-1) Obtain the load and displacement data collected by the dynamometer of the pumping well. Use the displacement as the abscissa x and the load as the ordinate y, and use the polygon drawing function toolkit in opencv to draw the data into a dynamometer diagram;
[0015] (1-2) The business expert preprocesses the dynamometer diagram, eliminates the dynamometer diagrams with obvious errors, and forms a dynamometer diagram data set;
[0016] (1-3) The business expert annotates and classifies the dynamometer diagrams in the dynamometer diagram data set, and divides the labeled and classified data set into a training set and a test set according to a ratio of 7:3;
[0017] (1-4) Put the training set into the Resnet50 neural network for training, where the activation function is ReLu, the pooling method uses Max pooling for the input layer, and Avg pooling for the last output layer. The optimization cost function is Cross-entropy cross entropy, and batch_size is 16;
[0018] (1-5) After the training is completed, save the weights of the trained Resnet50.
[0019] Preferably, the steps of retrieving recommended matching diagrams based on the content of the dynamometer diagram and performing working condition fusion inference and judgment specifically include:
[0020] (4-1) Use Resnet50 to extract the features of the dynamometer diagram to be detected
[0021] Put the incoming dynamometer diagram to be detected into the trained Resnet50, and extract the feature vector T = [t1, t2,..., t 2048 of the diagram to be detected in the avgpool layer;
[0022] (4-2) Retrieve the feature vector S i = [si1, si2,... si 2048 of the i-th diagram in the sample set, where 0 < i ≤ n and n is the number of sample diagrams in the sample set;
[0023] (4-3) Calculate the similarity between the diagram to be detected and the i-th diagram in the sample set based on the Pearson correlation coefficient algorithm;
[0024] (4-4) Calculate the similarity between the dynamometer diagram to be detected and the i-th diagram in the sample set, and obtain the similarity P i (X) between the diagram to be detected and the i-th matching diagram marked as X condition, where X = a1, a2... a k , a k is one of all conditions in the sample set;
[0025] (4-5) Compare P i (X) with the pre-set similarity threshold Ps,
[0026] (4-5-1) If P i (X) > Ps, store this diagram in the preliminary recommended diagram library and proceed to the next step;
[0027] (4-5-2) If P i (X) ≤ Ps, skip this matching picture and proceed to the next step;
[0028] (4-6) Judge whether all sample diagrams in the database have been compared
[0029] (4-6-1) If not all have been calculated, take the next sample diagram to compare with the diagram to be detected, and then return to step (4-2) to repeat the loop;
[0030] (4-6-2) If all have been calculated, enter the next link;
[0031] (4-7) Judge whether there are similar matching photos
[0032] (4-7-1) If there are recommended matching photos, list all the recommended matching pictures and proceed to the next step;
[0033] (4-7-2) If there are no recommended matching photos, the system prompts that there are no matching photos, and only business experts can judge the classification, mark it and put it into the training set for the next round of training to update the Resnet neural network;
[0034] (4-8) Perform working condition fusion inference and judgment based on all the pictures in the preliminary recommended picture library;
[0035] (4-9) Output the judgment result of the current working condition state.
[0036] Preferably, the specific steps for calculating the similarity between the picture to be detected and the i-th picture in the sample set are as follows:
[0037] It is known that the feature vectors of the picture to be detected and the i-th picture in the sample set are respectively: T = [t1, t2,..., t 2048 , S i = [si1, si2,... si 2048 ;
[0038] The Pearson correlation coefficient between the feature vectors of the picture to be detected and the i-th picture in the sample set is:
[0039]
[0040] where cov is the covariance, is the vector average.
[0041] Preferably, the steps for performing working condition fusion inference and judgment based on all the pictures in the preliminary recommended picture library specifically include:
[0042] (4-8-1) Form a matching picture library
[0043] Among all the matching pictures in the preliminary recommended picture library, take the highest similarity of each working condition in the matching pictures, and list the top three pictures; thus form a matching picture library, and there are n pictures in the library, where the pictures have information on the similarity between the marked working conditions and the picture to be detected;
[0044] (4-8-2) Extract the evidence of n matching pictures
[0045] Extract the evidence of the n matching pictures in the matching picture library in the previous step. The basic probability assignment (BPA) of the i-th matching picture evidence is expressed as:
[0046]
[0047] where:
[0048] m i (A1) is the BPA value when the i-th matching picture proves that the picture to be detected is in working condition A1,
[0049] m i (A2) is the BPA value when the i-th matching picture proves that the picture to be detected is in working condition A2,
[0050] m i(A3) Prove the BPA value of the test graph under A3 working condition for the i-th matching graph,
[0051] m i (Θ) Prove the BPA value of the test graph under the working condition of "unknown" for the i-th matching graph;
[0052] P i (A1) is the similarity between the test graph and the i-th matching graph marked with A1 working condition,
[0053] P i (A2) is the similarity between the test graph and the i-th matching graph marked with A2 working condition,
[0054] P i (A3) is the similarity between the test graph and the i-th matching graph marked with A3 working condition;
[0055] The similarity of each working condition picture is used as the probability assignment of this picture to this working condition. Since the picture working condition has been calibrated, the probability assignments of the remaining working conditions of this picture must be 0;
[0056] (4-8-3) Fuse n evidences
[0057] Collect and fuse the basic probability assignments BPA of n graphs to obtain the comprehensive probability assignment value m(A x ), and summarize them into a set Q after calculation;
[0058] (4-8-4) Comprehensive judgment of the fusion result.
[0059] Preferably, the fusion calculation method of set Q is:
[0060]
[0061] where A j , j = 1, 2, 3 represent A1, A2, A3 working conditions; X i represents one of the four situations of A1, A2, A3 corresponding to three working conditions and one "unknown", i = 1, 2,..., n; m i (X i ) is the BPA value of the i-th graph for X i situation; among them:
[0062]
[0063] ∩X i = X1∩X2∩...∩X n
[0064]
[0065] The set Q is Q = {m(A1), m(A2), m(A3)}.
[0066] Preferably, the comprehensive judgment of the fusion result includes:
[0067] (4-8-4-1) Statistically analyze the probability assignment values in Q that are greater than or equal to 0.32 and the corresponding working conditions; list these one or more working conditions as the current working conditions and arrange them according to their probability assignment values;
[0068] (4-8-4-2) Statistically analyze the probability assignment values in Q that are greater than 0.28 and less than 0.32 and the corresponding working conditions; list these one or more working conditions as the current possible working conditions and arrange them according to their probability assignment values.
[0069] Beneficial effects:
[0070] 1. The entire system uses CBIR technology, matching algorithms, and fusion reasoning methods, breaking through the limitations of traditional recognition methods. Starting from engineering practice, it can accurately identify one working condition when there is indeed only one working condition, and at the same time, it can also comprehensively judge up to three faults occurring simultaneously, making it more valuable in practical applications.
[0071] 2. The Pearson algorithm is used. The most commonly used algorithm for calculating vector matching in image matching is the cosine distance algorithm, but the cosine distance algorithm has obvious defects and is easily affected by the translation amount of the picture. The Pearson correlation coefficient algorithm used in this paper has translational invariance and scale invariance, and can overcome the influence of picture translation.
[0072] It is very suitable for the situation where the overall load of the pumping unit increases due to long-term use or the displacement amount shifts as a whole in a certain direction, resulting in the overall shift of the indicator diagram. It can avoid the decrease in the recognition rate caused by machine aging to a certain extent.
[0073] 3. A working condition fusion method is proposed. Multiple similar pictures with working condition information can be fused through the working condition fusion method, and several pieces of evidence of working condition information can be fused to achieve the function of comprehensively judging up to three faults occurring simultaneously. And this method also has the functions of traditional recognition methods through certain technical means, and can also identify one working condition when the indicator diagram to be detected indeed only has one piece of working condition information.
[0074] 4. The entire system has a dynamic learning function. After each recognition, the judgment result will be sent to the upper layer, and pictures of multiple working conditions will be put into the matching picture library to upgrade and iterate the matching picture library. When fusing working conditions in the future, the recognition accuracy will be gradually improved, and the recognition of multiple working conditions will also be more sensitive. Description of the Drawings
[0075] Figure 1 It is the overall flowchart of the method of the present invention
[0076] Figure 2 This is a dynamometer card showing valve leakage for the present invention.
[0077] Figure 3 This is the feature map of the valve leakage dynamometer card of the present invention in the avgpool layer.
[0078] Figure 4 This is the standard dynamometer card for the piston to hit the pump during downward movement of the present invention.
[0079] Figure 5 This is the feature map of the standard schematic diagram of the piston hitting the pump during downward movement of the present invention in the avgpool layer.
[0080] Figure 6 This is the dynamometer card acquisition, annotation classification, and training diagram of the present invention.
[0081] Figure 7 This is the retrieval recommendation matching diagram based on dynamometer card content and the working condition fusion inference judgment diagram of the present invention.
[0082] Figure 8 This is the dynamometer card to be detected of the present invention.
[0083] Figure 9 This is the feature map of the dynamometer card to be detected of the present invention in the avgpool layer.
[0084] Figure 10 This is the comparison diagram between the sample diagram and the diagram to be measured of the present invention.
[0085] Figure 11 This is the working condition fusion inference judgment flow chart of the present invention. Detailed implementation manners
[0086] An oil pumping working condition recognition method based on dynamometer card content retrieval and fusion inference, combined with Figure 1 , includes the following processes:
[0087] (1) Dynamometer card acquisition, annotation classification, and training.
[0088] (2) Use the trained Resnet50 to extract features from each graph in the sample set and save the feature vectors.
[0089] Use the trained Resnet50 network to extract features from the labeled training set and save all the feature results of the avgpool layer. An example of the feature extraction process is as follows:
[0090] (2-1) Take a dynamometer card showing valve leakage, such as Figure 2 .
[0091] This dynamometer card is converted into an array with a dimension of 256×256×3.
[0092] After a series of feature extractions, save the data of the avgpool layer and visualize it as Figure 3 .
[0093] At this time, on the avgpool layer, this indicator diagram becomes an array with a dimension of 1×2048, simplifying the original 256×256×3 = 196608 features to 2048 features, and saving this set of feature vectors.
[0094] (2-2) Also, take an indicator diagram showing the piston moving downward and hitting the pump, such as Figure 4 .
[0095] This indicator diagram is converted into an array with a dimension of 256×256×3.
[0096] After a series of feature extractions, save the data of the avgpool layer and visualize it as Figure 5 .
[0097] At this time, on the avgpool layer, this indicator diagram becomes an array with a dimension of 1×2048, simplifying the original 256×256×3 = 196608 features to 2048 features, and saving this set of feature vectors.
[0098] (3) Obtain the load and displacement data collected by the indicator instrument of the pumping well to be detected, and draw an indicator diagram.
[0099] Obtain the load and displacement data collected by the indicator instrument of the pumping well to be detected, and use opencv to draw the load and displacement data into an indicator diagram to be recognized. (The method of drawing the indicator diagram is to use the displacement as the abscissa x and the load as the ordinate y, and use the polygon drawing function in opencv to draw the data into the form of an indicator diagram.)
[0100] (4) Conduct working condition recognition and judgment based on the content retrieval and fusion inference of the indicator diagram.
[0101] (5) Send the working condition judgment result to the upper computer for display.
[0102] In the overall process, the acquisition, annotation classification, and training of the indicator diagram mainly include the acquisition of the indicator diagram, the annotation classification of the existing indicator diagram data set, the training of Resnet50 using the annotated indicator diagram data set, and the saving of the training weights. Combined with Figure 6 , the specific steps are as follows:
[0103] (1-1) Obtain the load and displacement data collected by the indicator instrument of the pumping well, use the displacement as the abscissa x and the load as the ordinate y, and use the polygon drawing function toolkit in opencv to draw the data into an indicator diagram.
[0104] (1-2) Business experts preprocess the indicator diagrams, removing the indicator diagrams with obvious errors to form an indicator diagram dataset;
[0105] (1-3) Business experts label and classify the indicator diagrams in the indicator diagram dataset, and divide the labeled and classified dataset into a training set and a test set according to a
[0106] 7:3 ratio;
[0107] (1-4) Put the training set into the Resnet50 neural network for training. The activation function is ReLu, the pooling method uses Max pooling for the input layer, and Avg pooling for the last output layer. The optimization cost function is Cross-entropy, and the batch_size is 16.
[0108] (1-5) After training is completed, save the weights of the trained Resnet50.
[0109] Combined with Figure 7 , the retrieval, recommendation, matching graph and working condition fusion inference judgment based on the indicator diagram content described in the overall process specifically include:
[0110] (4-1) Use Resnet50 to extract the features of the indicator diagram to be detected
[0111] Put the incoming indicator diagram to be detected (as Figure 8 shown) into the trained Resnet50, and extract the feature vector T = [t1, t2,..., t 2048 (as Figure 9 shown) of the diagram to be detected in the avgpool layer.
[0112] (4-2) Retrieve the feature vector S i = [si1, si2,... si 2048 of the i-th diagram in the sample set, where 0 < i ≤ n, and n is the number of sample diagrams in the sample set.
[0113] (4-3) Compare the diagram to be detected with the sample diagram. As Figure 10 shown, calculate the similarity between the diagram to be detected and the i-th diagram in the sample set based on the Pearson correlation coefficient algorithm and the locality-sensitive hashing algorithm respectively. Given that the feature vectors of the diagram to be detected and the i-th diagram in the sample set are: T = [t1, t2,..., t 2048 , S i = [si1, si2,... si 2048 .
[0114] The Pearson correlation coefficient between the feature vectors of the diagram to be detected and the i-th diagram in the sample set is:
[0115]
[0116] where cov is the covariance, is the vector mean.
[0117] Under normal circumstances, the Pearson correlation coefficient algorithm judges the correlation strength of variables through the following value ranges:
[0118] Table 1 Correlation relationship corresponding to the correlation coefficient of the Pearson correlation coefficient algorithm
[0119]
[0120] Use Figure 4 the standard schematic diagram of the piston moving downward and hitting the pump and Figure 8 two pictures of the diagram to be detected as examples, Figure 4 The eigenvector is S1 = [0.14989834, 0.25044987, 0.01442009,..., 0.04498396, 0....0.13138881], Figure 8 The eigenvector T = [0.14860852, 0.35052535, 0.04173719...0.03383199, 0....0.14634456].
[0121] The correlation coefficient using the Pearson correlation coefficient algorithm:
[0122]
[0123]
[0124]
[0125]
[0126]
[0127] The Pearson correlation coefficient is 0.9595958626455949.
[0128] (4 - 4) Calculate the similarity between the diagram to be measured and the i-th diagram in the sample set, and obtain the similarity P between the diagram to be measured and the i-th matching diagram marked as the X working condition i (X), X = a1, a2...a k (a k is one of all working conditions in the sample set).
[0129] (4 - 5) P i (X) is compared with the preset similarity threshold Ps,
[0130] (4 - 5 - 1) If Pi (X) > Ps, store this figure in the preliminary recommended figure library and proceed to the next step;
[0131] (4 - 5 - 2) If P i (X) > Ps, skip this matching picture and proceed to the next step;
[0132] (4 - 6) Determine whether all sample pictures in the database have been compared
[0133] (4 - 6 - 1) If not all have been calculated, take the next sample picture to compare with the picture to be tested, then return to step 2 and repeat the loop;
[0134] (4 - 6 - 2) If all have been calculated, enter the next link;
[0135] (4 - 7) Determine whether there are similar matching photos
[0136] (4 - 7 - 1) If there are recommended matching photos, list all the recommended matching pictures and proceed to the next step;
[0137] (4 - 7 - 2) If there are no recommended matching photos, the system prompts that there are no matching photos, and it can only be judged and classified by process experts, and then marked and put into the training set for the next round of training to update the Resnet neural network.
[0138] (4 - 8) Based on all the pictures in the preliminary recommended figure library, conduct working condition fusion reasoning and judgment.
[0139] (4 - 9) Output the judgment result of the current working condition state.
[0140] Combined with Figure 11 , the specific process of conducting working condition fusion reasoning and judgment based on all the pictures in the preliminary recommended figure library is as follows:
[0141] (4 - 8 - 1) Form a matching figure library
[0142] Among all the matching pictures in the preliminary recommended figure library, take the highest similarity of each working condition in the matching pictures and list the top three pictures. Thus, a matching figure library is formed. There are n pictures in the library, and the pictures have information on the similarity between the marked working conditions and the pictures to be detected.
[0143] (4 - 8 - 2) Extract the evidence of n matching pictures
[0144] Extract the evidence of the n matching pictures in the matching figure library in the previous step. The basic probability assignment (BPA) of the i-th matching picture evidence is expressed as:
[0145]
[0146] Where:
[0147] m i (A1) is the BPA value when the i-th matching graph proves that the graph to be measured is in condition A1.
[0148] m i (A2) is the BPA value when the i-th matching graph proves that the graph to be measured is in condition A2.
[0149] m i (A3) is the BPA value when the i-th matching graph proves that the graph to be measured is in condition A3.
[0150] m i (Θ) is the BPA value when the i-th matching graph proves that the condition of the graph to be measured is "unknown".
[0151] P i (A1) is the similarity between the graph to be measured and the i-th matching graph marked with condition A1.
[0152] P i (A2) is the similarity between the graph to be measured and the i-th matching graph marked with condition A2.
[0153] P i (A3) is the similarity between the graph to be measured and the i-th matching graph marked with condition A3.
[0154] The similarity of each working condition picture is used as the probability assignment of this picture for this working condition. Since the working condition of the picture has been calibrated, the probability assignment of the remaining working conditions of this picture must be 0.
[0155] For example:
[0156] Example 1: Now the first picture is in condition A1, and the similarity between the graph to be measured and the first picture is P1(A1). Then the basic probability assignment (BPA) of the i-th matching graph evidence is expressed as the probability assignment m1(A1) of the first picture for condition A1 is P1(A1), and the probability assignment for other conditions is 0, denoted as In tabular form as Table 2.
[0157] Table 2 Tabular form
[0158]
[0159] Example 2: After secondary screening, there are five pictures. The similarity between the first picture and condition A1 is P1(A1), the similarity between the second picture and condition A2 is P2(A2), the similarity between the third picture and condition A1 is P3(A1), the similarity between the fourth picture and condition A2 is P4(A2), and the similarity between the fifth picture and condition A3 is P5(A3). Then the basic probability assignments (BPA) of these five matching graph evidences are respectively expressed as
[0160]
[0161]
[0162] The form of the table is shown in Table 3.
[0163] Table 3 in tabular form
[0164]
[0165] (4 - 8 - 3) Fuse n pieces of evidence
[0166] Collect and fuse the basic probability assignments (BPAs) of n graphs to obtain the comprehensive probability assignment value m(A j ) for each working condition after fusion, and summarize them into a set Q after calculation. The specific fusion calculation method is as follows:
[0167]
[0168] where A j , j = 1, 2, 3 represent the working conditions A1, A2, and A3; X i represents one of the three working conditions A1, A2, A3 and Θ and one "unknown" situation, i = 1, 2,..., n; m i (X i ) is the BPA value of the i-th graph for the X i situation; among them:
[0169]
[0170] ∩X i = X1 ∩ X2 ∩... ∩ X n
[0171]
[0172] After assigning values to Table 3 in (4 - 8 - 2) as an example, it is shown in Table 4:
[0173] Table 4 in tabular form
[0174]
[0175] 1). The probability assignment values after fusing the working conditions A1, A2, and A3 in Table 4 are:
[0176] ① The comprehensive probability assignment value for the working condition A1, tubing leakage is:
[0177]
[0178] m(A1) = [m1(A1) * m2(Θ) * m3(A1) * m4(Θ) * m5(Θ) + m1(A1) * m2(Θ) * m3(Θ) * m4(Θ) * m5(Θ) + m1(Θ) * m2(Θ) * m3(A1) * m4(Θ) * m5(Θ)] / K = 0.0329 / 0.06005 = 0.5478
[0179] ② For operating condition A2, the comprehensive probability assignment value of the tubing string break-off is:
[0180]
[0181] m(A2) = [m1(Θ) * m2(A2) * m3(Θ) * m4(A2) * m5(Θ) + m1(Θ) * m2(A2) * m3(Θ) * m4(Θ) * m5(Θ) + m1(Θ) * m2(Θ) * m3(Θ) * m4(A2) * m5(Θ)] / K = 0.0219 / 0.06005 = 0.3647
[0182] ③ For operating condition A3, the comprehensive probability assignment value of the heavy oil is:
[0183]
[0184] m(A3) = m1(Θ) * m2(Θ) * m3(Θ) * m4(Θ) * m5(A3) / K = 0.0525
[0185] 2). The coefficient K in Table 4 is:
[0186]
[0187] K = m1(A1) * m2(Θ) * m3(A1) * m4(Θ) * m5(Θ) + m1(A1) * m2(Θ) * m3(Θ) * m4(Θ) * m5(Θ) + m1(Θ) * m2(A2) * m3(Θ) * m4(A2) * m5(Θ) + m1(Θ) * m2(A2) * m3(Θ) * m4(Θ) * m5(Θ) +
[0188] m1(Θ) * m2(Θ) * m3(A1) * m4(Θ) * m5(Θ) + m1(Θ) * m2(Θ) * m3(Θ) * m4(A2) * m5(Θ) +
[0189] m1(Θ) * m2(Θ) * m3(Θ) * m4(Θ) * m5(A3) + m1(Θ) * m2 (Θ) * m3(Θ) * m4(Θ) * m5(Θ)
[0190] = 0.06005
[0191] 3). The set Q is Q = {m(A1), m(A2), m(A3)} = {0.5478, 0.3647, 0.0525}
[0192] (4 - 8 - 4) Comprehensive judgment of the fusion result
[0193] (4 - 8 - 4 - 1) Statistically analyze the probability assignment values in Q that are greater than or equal to 0.32 and the corresponding working conditions; list these one or more working conditions as the current working conditions and arrange them according to their probability assignment values.
[0194] (4 - 8 - 4 - 2) Statistically analyze the probability assignment values in Q that are greater than 0.28 and less than 0.32 and the corresponding working conditions; list these one or more working conditions as the current possible working conditions and arrange them according to their probability assignment values.
[0195] For example, according to step (4 - 8 - 3), the set of comprehensive probability assignment values is Q = {0.5478, 0.3647, 0.0525}.
[0196] 1) After statistically analyzing the probability assignment values greater than or equal to 0.32, there are 0.5478 and 0.3647. The working conditions corresponding to these two probability assignment values are tubing leakage and sucker rod breakage. Therefore, the comprehensive working condition is tubing leakage and sucker rod breakage.
[0197] 2) After statistically analyzing the probability assignment values greater than 0.28 and less than 0.32, there is no data in the set that meets the requirements of this step. Then there are no other possible working conditions.
[0198] For example, after processing according to the fusion result of step (4), the comprehensive working condition is tubing leakage and sucker rod breakage, and there are no other possible working conditions.
Claims
1. A pumping unit working condition identification method based on indicator diagram content retrieval and fusion reasoning, characterized in that It includes the following processes: (1) Obtaining, annotating, classifying, and training the indicator diagram; (2) Using the trained Resnet50 to extract features from each image in the sample set and saving the feature vectors; (3) Obtaining the load and displacement data collected by the dynamometer of the pumping well to be detected and drawing the indicator diagram; (4) Retrieving, recommending, and matching diagrams based on the content of the indicator diagram and performing condition fusion inference and judgment; (5) Sending the condition judgment result to the upper-level for display.
2. The method according to claim 1, wherein The steps of obtaining, annotating, classifying, and training the indicator diagram include obtaining the indicator diagram, annotating and classifying the existing indicator diagram data set, training Resnet50 using the annotated indicator diagram data set, and saving the weights after training; The specific steps are as follows: (1-1) Obtaining the load and displacement data collected by the dynamometer of the pumping well, taking the displacement as the abscissa x and the load as the ordinate y, and using the polygon drawing function toolkit in opencv to draw the data into an indicator diagram; (1-2) The business expert preprocesses the indicator diagram, eliminates the indicator diagrams with obvious errors, and forms an indicator diagram data set; (1-3) The business expert annotates and classifies the indicator diagrams in the indicator diagram data set, and divides the well-annotated and classified data set into a training set and a test set according to a ratio of 7:3; (1-4) Putting the training set into the Resnet50 neural network for training, where the activation function is ReLu, the pooling method uses Max pooling for the input layer, and Avg pooling for the last output layer, the optimization cost function is Cross-entropy cross entropy, and batch_size is 16; (1-5) After the training is completed, save the weights of the trained Resnet50.
3. The method according to claim 1, characterized in that, The steps of retrieving, recommending, and matching diagrams based on the content of the indicator diagram and performing condition fusion inference and judgment specifically include: (4-1) Using Resnet50 to extract the features of the indicator diagram to be detected Put the incoming dynamometer diagram to be detected into the trained Resnet50, and extract the feature vector T = [t1, t2,..., t 2048 of the diagram to be detected in the avgpool layer; (4-2) Retrieve the feature vector S of the i-th image in the sample set i = [si1, si2,... si 2048 , 0 < i ≤ n, where n is the number of sample images in the sample set; (4-3) Based on the Pearson correlation coefficient algorithm, calculating the similarity between the diagram to be detected and the i-th diagram in the sample set; (4-4) Calculate the similarity between the measured indicator diagram and the i-th diagram in the sample set, and obtain the similarity P between the measured diagram and the i-th matching diagram marked with working condition X. i (X), where X = a1, a2... a k , a k is one of all the working conditions in the sample set; (4-5)P i (X) is compared with a preset similarity threshold Ps. (4-5-1) If P i (X) > Ps, store this figure in the preliminary recommended figure library and proceed to the next step; (4-5-2) If P i (X) ≤ Ps, skip this matching picture and proceed to the next step; (4-6) Judging whether all the sample diagrams in the database have been compared (4-6-1) If not all have been calculated, take the next sample diagram to compare with the diagram to be detected, and then return to step (4-2) to repeat the loop; (4-6-2) After all calculations are completed, enter the next link; (4-7) Judging whether there are similar matching photos (4-7-1) If there are recommended matching photos, list all the recommended matching pictures and transfer to the next step; (4-7-2) If there are no recommended matching photos, the system prompts that there are no matching photos, and it can only be judged and classified by the business expert, and after annotation, it is put into the training set for the next round of training to update the Resnet neural network; (4-8) Based on all the pictures in the preliminary recommended picture library, performing condition fusion inference and judgment; (4-9) Outputting the current condition status judgment result.
4. The method according to claim 3, wherein The specific steps for calculating the similarity between the diagram to be detected and the i-th diagram in the sample set are as follows: The feature vectors of the known image to be detected and the i-th image in the sample set are respectively: T = [t1, t2,..., t 2048 , S i = [si1, si2,... si 2048 ; The Pearson correlation coefficient between the feature vectors of the diagram to be detected and the i-th diagram in the sample set is: where cov is the covariance, is the vector mean.
5. The method according to claim 3, wherein The steps of performing condition fusion inference and judgment based on all the pictures in the preliminary recommended picture library specifically include: (4-8-1) Forming a matching picture library Among all the matching images in the preliminary recommended image library, take the highest similarity of each working condition in the matching images and list the top three images; thus, a matching image library is formed. There are n images in the library, and the images have information on the similarity between the marked working conditions and the image to be detected. (4-8-2) Extract n pieces of evidence of the matching images Extract the evidence of the n matching images in the matching image library in the previous step. The basic probability assignment (BPA) of the i-th matching image evidence is expressed as: Where: m i (A1) Prove the BPA value of the test graph when the test graph is in the A1 working condition for the i-th matching graph. m i (A2) Prove the BPA value of the to-be-tested graph when the to-be-tested graph is in the A2 operating condition for the i-th matching graph. m i (A3) Prove the BPA value of the to-be-tested graph when it is in A3 working condition for the i-th matching graph. m i (Θ) is the BPA value when it is proved that the working condition of the graph to be measured is "unknown" for the i-th matching graph; P i (A1) is the similarity between the graph to be measured and the i-th matching graph marked with the A1 working condition, P i (A2) is the similarity between the test chart and the i-th matching chart marked with the A2 working condition, P i (A3) is the similarity between the graph to be measured and the i-th matching graph marked with the A3 working condition; The similarity of each working condition image is used as the probability assignment of this image to this working condition. Since the working condition of the image has been calibrated, the probability assignment of the remaining working conditions of this image must be 0. (4-8-3) Fuse the n pieces of evidence Collect and fuse the basic probability assignment (BPA) of n pictures to obtain the comprehensive probability assignment value m(A x ) for each working condition after fusion. After the calculation, summarize them into a set Q; (4-8-4) Comprehensive judgment of the fusion result.
6. The method according to claim 5, characterized in that, The fusion calculation method for set Q is: Among which A j , j = 1, 2, 3 represent the working conditions of A1, A2, and A3; X i represents one of the three working conditions corresponding to A1, A2, A3 and Θ and one "unknown" situation, i = 1, 2,..., n; m i (X i ) is the BPA value of the i-th graph for the X i situation; where: ∩X i = X1 ∩ X2 ∩... ∩ X n Set Q is Q = {m(A1), m(A2), m(A3)}.
7. The method according to claim 6, wherein The comprehensive judgment of the fusion result includes: (4-8-4-1) Count the probability assignments and corresponding working conditions in Q whose probability assignments are greater than or equal to 0.32; list these one or more working conditions as the current working conditions and arrange them according to their probability assignments. (4-8-4-2) Count the probability assignments and corresponding working conditions in Q whose probability assignments are greater than 0.28 and less than 0.32; list these one or more working conditions as the current possible working conditions and arrange them according to their probability assignments.
Citation Information
Patent Citations
Technology event detection, analysis, and reporting system
CA2604690A1
Indicator diagram similarity detection method fusing dichotomy and triad
CN112836719A