Pump indicator diagram effective stroke identification method, device and equipment for rod-pumped well and medium

The opening and closing points of the swimming valve in the pump well pumping projection are identified through the Gibbs fluctuation equation and the YOLO-Pose model, which solves the problem of identification errors under abnormal working conditions, and achieves high-precision output estimation and real-time monitoring.

CN120259844APending Publication Date: 2025-07-04CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510390487.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The prior art is prone to errors when identifying the opening and closing points of the sliding valve in the pump well pumping diagram of the oil pump, especially in abnormal working conditions, which affects the accuracy of the output estimation.

Method used

The Gibbs one-dimensional viscous damping wave equation is used to transform the ground power diagram into the downhole pump power diagram, and a pump power diagram sample set is constructed with a variety of working conditions. The YOLO-Pose model is used for deep learning training, identify the opening and closing points of the swimming valve, and calculate the effective stroke through pixel coordinate mapping to the actual displacement.

Benefits of technology

It improves the identification accuracy and stability under abnormal operating conditions, reduces the dependence on manual experience, improves the accuracy of output estimation, is suitable for a variety of well conditions, and has good engineering integration and real-time monitoring capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259844A_ABST
    Figure CN120259844A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision and petroleum engineering, in particular to an effective stroke recognition method, device and equipment for a pumping unit well pump indicator diagram and a medium, and the method comprises the steps that ground indicator diagram data are collected and converted into an underground pump indicator diagram based on a Gibbs wave equation; constructing a pump indicator diagram sample set; converting the sample into a data set in a YOLO format, and dividing the data set into a training set and a test set; using the YOLO format data set to train a YOLO-Pose model, and constructing a traveling valve opening and closing point identification model; a traveling valve opening and closing point in the target pump indicator diagram is recognized; the effective stroke is calculated, and the yield of the rod-pumped well is determined; the pump indicator diagram recognition sample set containing multiple working conditions is constructed, and deep learning training is performed by using YOLO-Pose, so that the recognition model has higher anti-interference capability, the opening and closing point of the traveling valve can be accurately recognized, the recognition precision is high, and the method is suitable for multiple abnormal working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of computer vision and petroleum engineering, and particularly to a method, device, equipment and medium for identifying the effective stroke of a pump dynamometer card in a pumping well. Background Art

[0002] Identifying the effective stroke of a pump dynamometer card is an important task for measuring the oil production of a pumping well by using the dynamometer card. The aim is to accurately identify the opening and closing points of the traveling valve from the pump dynamometer card to obtain the effective stroke, so as to calculate the production of a single dynamometer card.

[0003] The commonly adopted method in the current industry is as follows: the load and displacement data are collected by a dynamometer installed on the horsehead of a beam pumping unit to generate a ground dynamometer card; subsequently, the ground dynamometer card is converted into a downhole pump dynamometer card through the Gibbs one-dimensional viscous damping wave equation; then, the five-point curvature method is used to identify the opening and closing points of the traveling valve in the downstroke interval, calculate the effective stroke of the pump, and estimate the production accordingly.

[0004] However, due to the fluctuation of the actual curvature of the pump dynamometer card, the five-point curvature method only has a good recognition effect when the oil well conditions are normal. In the face of abnormal conditions such as insufficient liquid supply, gas interference, sand production, wax deposition, etc., the curvature of the pump dynamometer card changes violently, which easily leads to inaccurate identification of the opening and closing points of the traveling valve, resulting in errors in the calculation of the effective stroke and affecting the accuracy of the production estimation.

[0005] The information disclosed in this background art section is only intended to deepen the understanding of the overall background art of the present invention, and should not be regarded as an admission or any form of implication that this information constitutes the prior art already known to those skilled in the art. Summary of the Invention

[0006] The present invention provides a method, device, equipment and medium for identifying the effective stroke of a pump dynamometer card in a pumping well, so as to effectively solve the problems in the background art.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows: a method for identifying the effective stroke of a pump dynamometer card in a pumping well, including the following steps: S10: Collect the ground dynamometer card data, and convert the ground dynamometer card data into the displacement and load data of the downhole pump dynamometer card based on the Gibbs one-dimensional viscous damping wave equation; S20: Select typical pump dynamometer cards according to the converted downhole pump dynamometer card, and construct a pump dynamometer card sample set; S30: Manually label the pump dynamometer card sample set to obtain an identification sample set including the opening and closing points of the traveling valve; S40: Based on the identification sample set, convert the labeled pump dynamometer card data into a YOLO format data set, and divide it into a training set and a test set; S50: Train the YOLO-Pose model using the YOLO format dataset to construct a model for identifying the opening and closing points of the traveling valve; S60: Identify the opening and closing points of the traveling valve in the target pump dynamometer card using the model for identifying the opening and closing points of the traveling valve; S70: Calculate the effective stroke based on the identified opening and closing points of the traveling valve and determine the production of the pumping well.

[0008] Further, in step S10, the Gibbs one-dimensional viscous damping wave equation is: ; where, U ( x, t ) is the displacement function of the sucker rod at different times at the x section, t is the velocity of the stress wave propagating in the sucker rod string; a is the viscous damping coefficient. c

[0009] Further, in step S20, the pump dynamometer card sample set includes at least the pump dynamometer cards under the following working conditions: normal production condition, insufficient liquid supply, gas influence, sand production in the oil well, wax deposition in the oil well, and abnormal conditions such as pump valve leakage.

[0010] Further, in step S30, the method of manually marking the opening and closing points of the traveling valve includes one or both of the following two methods: Mark the complete pump dynamometer card image, including marking the contour area of the pump dynamometer card and the opening and closing points of the traveling valve; Perform local marking on the download load area in the pump dynamometer card, including marking the opening and closing points of the traveling valve within the area.

[0011] Further, in step S60, train and optimize the model by adjusting various built-in parameters in the YOLO-Pose model to obtain a trained and optimized model for identifying the opening and closing points of the traveling valve. The built-in parameters include at least the LoU threshold, the image input size, and the number of training epochs.

[0012] Further, in step S60, evaluate the model with accuracy to obtain a model with good pump valve recognition effect. The formula for accuracy is: ; where, TP is the number of samples of positive examples correctly recognized by the model, FP is the number of samples of negative examples correctly recognized by the model.

[0013] Further, in step S70, the closing point and opening point of the traveling valve within the downward stroke region are identified, and the actual displacement coordinates of the two points are restored based on the correspondence between the pixel coordinates and the target displacement. The effective stroke is calculated according to the difference between the abscissas of the two points.

[0014] Further, in step S70, the formula for calculating the effective stroke is; ; In the formula, L stoke is the effective stroke, x close is the displacement at the closing point of the traveling valve, x open is the displacement at the opening point of the traveling valve, d is the ratio of the abscissa of the pixel point to the real point coordinate of the pump dynamometer diagram.

[0015] The present invention also includes an effective stroke identification device for a pump dynamometer diagram of a pumping well, using the method as described above, including: A data acquisition and conversion module, configured to acquire surface dynamometer diagram data and convert the surface dynamometer diagram data into displacement and load data of an underground pump dynamometer diagram based on the Gibbs one-dimensional viscous damping wave equation; A sample construction module, configured to select typical pump dynamometer diagrams according to the converted underground pump dynamometer diagram and construct a pump dynamometer diagram sample set; A marking module, configured to manually mark the pump dynamometer diagram sample set to obtain an identification sample set including the opening and closing points of the traveling valve; A data preprocessing module, configured to convert the marked pump dynamometer diagram data into a YOLO format data set based on the identification sample set and divide it into a training set and a test set; A model training module, configured to train a YOLO-Pose model using the YOLO format data set to construct a traveling valve opening and closing point identification model; An identification module, configured to identify the opening and closing points of the traveling valve in a target pump dynamometer diagram through the traveling valve opening and closing point identification model; A stroke calculation module, configured to calculate the effective stroke based on the identified opening and closing points of the traveling valve and determine the production of the pumping well.

[0016] The present invention also includes a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method as described above is implemented.

[0017] The present invention also includes a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method as described above is implemented.

[0018] The beneficial effects of the present invention are as follows: By constructing a pump dynamometer identification sample set containing various working conditions and using YOLO-Pose for deep learning training, the identification model has stronger anti-interference ability and can accurately identify the opening and closing points of the traveling valve. Especially in abnormal situations such as insufficient liquid supply, gas interference, sand production, and wax deposition, it can still maintain a high identification accuracy.

[0019] Compared with the traditional five-point curvature method, this method replaces manual analysis or the curvature method with an image recognition algorithm, improves the consistency and stability of identification, is applicable to various well conditions, reduces the dependence on manual experience; the effective stroke is an important basis for production calculation, and the improvement of identification accuracy directly leads to the reduction of production calculation errors, thereby improving the accuracy of oil well production estimation and contributing to scientific decision-making and dynamic management. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0021] Figure 1 It is a schematic flow diagram of the method for identifying the effective stroke of the pump dynamometer of a pumping unit well; Figure 2 It is the conversion of the surface dynamometer diagram to the pump dynamometer diagram; Figure 3 It is a diagram of the method for annotating the dynamometer diagram and the traveling valve; Figure 4 It is a diagram of the method for annotating the lower load area and the traveling valve; Figure 5 It is the prediction effect diagram of the test set for the pump dynamometer diagram and the annotation method of the opening and closing points of the traveling valve; Figure 6 It is a diagram of the relationship between the accuracy rate and the number of iterations; Figure 7 It is the prediction effect of the test set for the annotation method of the lower load and the opening and closing points of the traveling valve; Figure 8 It is a schematic diagram of the device for identifying the effective stroke of the pump dynamometer of a pumping unit well; Figure 9 It is a schematic diagram of the structure of a computer device. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments.

[0023] As Figures 1 to 8 shown: A method for identifying the effective stroke of the pump dynamometer diagram of a pumping unit well includes the following steps: S10: Collect the surface dynamometer diagram data, and convert the surface dynamometer diagram data into the displacement and load data of the downhole pump dynamometer diagram based on the Gibbs one-dimensional viscous damping wave equation; S20: Select typical pump dynamometer diagrams according to the converted downhole pump dynamometer diagram, and construct a pump dynamometer diagram sample set; S30: Manually annotate the pump dynamometer diagram sample set to obtain an identification sample set containing the opening and closing points of the traveling valve; S40: Based on the identification sample set, convert the annotated pump dynamometer diagram data into a YOLO format data set, and divide it into a training set and a test set; S50: Use the YOLO format data set to train the YOLO-Pose model and construct a traveling valve opening and closing point identification model; S60: Identify the opening and closing points of the traveling valve in the target pump dynamometer diagram through the traveling valve opening and closing point identification model; S70: Calculate the effective stroke based on the identified opening and closing points of the traveling valve, and determine the production of the pumping unit well.

[0024] YOLO-Pose is mainly used to identify and locate key points in images and is widely applied in fields such as intelligent detection, autonomous driving, and pose recognition. Its main network structure consists of an input end (input), a backbone network (Backbone), a neck (Neck), and a detection head (Head). Compared with the YOLO object detection algorithm, YOLO-Pose has made the following main improvements. In the Backbone part, YOLO-Pose introduces the CBS module, C2f module, SPPF module, CSP idea, and ELAN structure, which enhances the model's feature fusion ability and lightweight; in the Head part, YOLO-Pose adopts Anchor-Free to adapt to objects of different shapes and sizes and improve the robustness of model detection.

[0025] By constructing a pump dynamometer diagram identification sample set containing multiple working conditions and using YOLO-Pose for deep learning training, the identification model has stronger anti-interference ability and can accurately identify the opening and closing points of the traveling valve, especially maintaining a high identification accuracy under abnormal conditions such as insufficient liquid supply, gas interference, sand production, and wax deposition.

[0026] Compared with the traditional five-point curvature method, this method uses image recognition algorithm instead of manual analysis or curvature method, which improves the consistency and stability of recognition, is applicable to various well conditions, and reduces dependence on manual experience; effective stroke is an important basis for production calculation, and the improvement of recognition accuracy directly leads to a reduction in production calculation errors, thereby improving the accuracy of oil well production estimation and facilitating scientific decision-making and dynamic management.

[0027] By collecting and annotating diverse samples of pump performance diagrams and combining them with the efficient feature extraction capability of YOLO-Pose, the model can adapt to a variety of downhole working conditions, improving the versatility and promotion value of the model in actual oilfield production. From raw data collection, model training to automatic recognition and calculation, a complete process is formed, which has good engineering integration and can be used to build real-time monitoring and intelligent decision support systems.

[0028] Wherein, in step S10, the Gibbs one-dimensional viscous damping wave equation is: ; In the formula, U ( x, t ) is the sucker rod x Cross-section at different times t Displacement function, a is the speed at which stress waves propagate in the sucker rod string; c is the viscous damping coefficient. The use of Gibbs one-dimensional viscous damping wave equation can more realistically simulate the propagation and damping effect of stress waves in the sucker rod string, which helps to accurately restore the actual working conditions of the downhole pump from the ground indicator diagram and improve the accuracy of the pump diagram data.

[0029] This patent uses a 10-meter-long first-stage sucker rod and divides the grid to solve the pump work diagram data using finite differences. Before using finite differences to solve, the wave velocity, viscous damping coefficient and grid size are also required. Figure 2 The surface performance diagram of the oil well with a 10-meter-long first-stage sucker rod is converted into a pump performance diagram.

[0030] In this embodiment, in step S20, the pump performance diagram sample set includes at least the pump performance diagrams under the following working conditions: normal production conditions, insufficient fluid supply, gas influence, oil well sanding, oil well wax deposition, pump valve leakage and other abnormal conditions, so that the training model has stronger adaptability, can accurately identify the opening and closing points of the floating valve under various working conditions, and reduce the misjudgment rate of the model under non-ideal conditions. This patent manually selects 200 typical performance diagrams with large shape differences as the pump performance diagram sample set, which ensures the representativeness and richness of the image data, helps the model better learn the characteristic changes of different pump performance diagrams, and improves the overall recognition stability.

[0031] As an optimization of the above embodiments, in step S30, the method of manually marking the opening and closing points of the traveling valve includes one or a combination of the following two methods: Mark the complete pump dynamometer card image, including marking the contour area of the pump dynamometer card and the opening and closing points of the traveling valve; Perform local marking on the downhole load area in the pump dynamometer card, including marking the opening and closing points of the traveling valve within the area.

[0032] Since the default input of the YOLO-Pose pre-trained model is 640*640, in order to ensure the accuracy of the pump valve marking points, it is necessary to resize the pump dynamometer card image to 640*640 before training and then perform manual marking.

[0033] This patent uses the labelme tool to mark the pump dynamometer card, and two marking methods are used. There are two types of marked categories, namely rectangular frames and marking points. The first is to mark the entire pump dynamometer card and the opening and closing points of the traveling valve. The marking method is as Figure 3 shown; the other is to mark the downhole load area and the opening and closing points of the traveling valve. The marking method is as Figure 4 shown. The red points in the figure are the opening points of the traveling valve, the yellow points are the closing points of the traveling valve, and the rectangular frames are the detection targets.

[0034] In step S40, the ratio of the training set to the test set in this patent is 8:2.

[0035] In step S50, the manually marked data of each pump dynamometer card in the training set and the test set is converted into an array. The marked picture data file is converted into an array readable by YOLO. A 640*640 pixel grayscale image is converted so that the domain of the abscissa and ordinate is adjusted to the range from 0 to 1, thereby obtaining the coordinate information of the marked data in the new coordinate system.

[0036] For example, the marked data is converted into [0 0.46406 0.63906 0.62500 0.04219 0.17188 0.63594 2 0.75313 0.63438 2]. Among them, 0 is the category of the first rectangular frame, and the following four arrays 0.46406 0.63906 0.62500 0.04219 represent the position of the matrix frame. 2 is the category of marking the opening and closing points of the traveling valve. 0.17188 0.63594 represents the coordinates of the opening point of the traveling valve, and 0.75313 0.63438 represents the coordinates of the closing point of the traveling valve.

[0037] Among them, in step S60, the YOLO-Pose model is trained and optimized by adjusting various built-in parameters in the model to obtain a trained and optimized recognition model for the opening and closing points of the traveling valve. The built-in parameters include at least the LoU threshold, the image input size (image_size), and the number of training epochs (Epoch). By specifically optimizing the core parameters in the YOLO-Pose model, such as the LoU threshold, the image input size, and the number of training epochs, etc., the positioning accuracy of the model for key points can be effectively improved, and the false recognition rate and missed recognition rate can be reduced.

[0038] In this embodiment, in step S60, a model with good pump valve recognition effect is obtained by evaluating the accuracy rate. The formula for the accuracy rate is: ; In the formula, TP is the number of samples where the model correctly recognizes positive examples, FP is the number of samples where the model correctly recognizes negative examples. It should be noted that YOLO-Pose determines whether a sample is correctly recognized through LoU (the overlap degree between the predicted box and the manually annotated true box).

[0039] Based on the YOLO-Pose pre-trained model, the sample sets made by the two annotation methods in step S30 are respectively trained. The initial training parameter LoU is set to 0.7, and Epoch is set to 100.

[0040] The YOLO model is trained using the pump power diagram and the annotation method for the opening and closing points of the traveling valve. The prediction effect on the test set is as Figure 5 shown. It can be seen from the figure that the YOLO model trained by this annotation method cannot accurately recognize the pump power diagram, and the recognition effect of the opening and closing points of the traveling valve is poor.

[0041] The YOLO model is trained using the method of annotating the downloaded load area and the annotation method for the opening and closing points of the traveling valve. The relationship between the recognition accuracy rate and the number of iterations is as Figure 6 shown. As the number of iterations increases, the recognition accuracy rate of the model improves. The prediction effect on the test set is shown in the figure. It can be seen from Figure 7 the figure that the YOLO model trained by this annotation method can accurately recognize the downloaded load area in the pump power diagram, and the recognition effect of the opening and closing points of the traveling valve is better.

[0042] As a preferred embodiment of the above, in step S70, the closing point and opening point of the floating valve in the lower stroke area are identified, and the actual displacement coordinates of the two points are restored based on the corresponding relationship between the pixel coordinates and the target displacement, and the effective stroke is calculated according to the difference between the horizontal coordinates of the two points. Specifically, by accurately mapping the horizontal coordinates of the pixels in the image to the physical displacement coordinates, the precise positioning of the opening and closing points of the floating valve is achieved, making the calculation result of the effective stroke more real and reliable. The mapping relationship between pixels and target displacement is constructed, and the link from image feature recognition to actual engineering parameter calculation is opened, providing physical support for subsequent production estimation based on image recognition.

[0043] Wherein, in step S70, the formula for calculating the effective stroke is: ; In the formula, L stoke is the effective stroke, x close is the displacement of the traveling valve at the closing point, x open is the displacement of the floating valve at the opening point, d It is the ratio of the horizontal coordinate of the pixel point to the coordinate of the real point in the pump work diagram.

[0044] The image recognition results (pixel coordinates) are accurately mapped to the actual displacement in the physical space through the formula. The calculation method of effective stroke is clear, repeatable, easy to implement, and highly practical for engineering. The accurate calculation of effective stroke in a formulaic way can avoid subjective errors caused by manual estimation or empirical judgment, and ensure the stability and accuracy of production calculation. The image pixel horizontal coordinate is converted into the actual displacement distance through the proportional coefficient ddd, which opens up the path from computer vision recognition to the calculation of oilfield engineering physical quantities, and enhances the automation and intelligence level of the entire system.

[0045] The present invention also includes a device for identifying effective strokes of a pumping well pump diagram, using the method described above, such as Figure 8 As shown, including: The data acquisition and conversion module is used to collect the surface dynamometer data and convert the surface dynamometer data into the displacement and load data of the downhole pump dynamometer based on the Gibbs one-dimensional viscous damping wave equation; A sample construction module is used to select typical pump performance diagrams according to the converted downhole pump performance diagrams and construct a pump performance diagram sample set; A labeling module is used to manually label the pump performance diagram sample set to obtain an identification sample set containing the opening and closing points of the traveling valve; The data preprocessing module is used to convert the labeled pump performance diagram data into a YOLO format data set based on the identification sample set, and divide it into a training set and a test set; A model training module for training a YOLO-Pose model using a YOLO format dataset to construct a recognition model for the opening and closing points of a traveling valve. A recognition module for identifying the opening and closing points of the traveling valve in a target pump dynamometer card through the recognition model for the opening and closing points of the traveling valve. A stroke calculation module for calculating the effective stroke based on the identified opening and closing points of the traveling valve and determining the production of the pumping well.

[0046] Please refer to Figure 9 The structural schematic diagram of the computer device provided by the embodiment of the present application shown in the figure. A computer device 400 provided by the embodiment of the present application includes: a processor 410 and a memory 420. The memory 420 stores a computer program executable by the processor 410. When the computer program is executed by the processor 410, the above method is executed.

[0047] The embodiment of the present application also provides a storage medium 430. A computer program is stored on the storage medium 430. When the computer program is run by the processor 410, the above method is executed.

[0048] Among them, the storage medium 430 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (abbreviated as SRAM), electrically erasable programmable read-only memory (abbreviated as EEPROM), erasable programmable read-only memory (abbreviated as EPROM), programmable read-only memory (abbreviated as PROM), read-only memory (abbreviated as ROM), magnetic memory, flash memory, magnetic disk or optical disc.

[0049] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The meaning of "plurality" is two or more unless otherwise specifically defined.

[0050] In the present invention, unless otherwise clearly defined and limited, the terms "installed", "connected", "coupled", "fixed", etc. shall be construed in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0051] In the description of this specification, the descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0052] Any process or method description shown in a flowchart or described in other ways herein may be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in the reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0053] The logic and / or steps represented in the flowchart or otherwise described herein can, for example, be considered a definitional sequence of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, as the program can be obtained, for example, electronically by optically scanning the paper or other medium, followed by editing, interpretation, or otherwise processing as appropriate, and then stored in a computer memory.

[0054] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following techniques known in the art or a combination thereof can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.

[0055] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of the above-described embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0056] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, or the like. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for identifying the effective stroke of the pump power diagram of a pumping unit well, characterized in that, It includes the following steps: S10: Collect the surface dynamometer card data, and convert the surface dynamometer card data into the displacement and load data of the downhole pump dynamometer card based on the Gibbs one-dimensional viscous damping wave equation; S20: According to the converted downhole pump dynamometer card, select typical pump dynamometer cards to construct a pump dynamometer card sample set; S30: Manually label the pump dynamometer card sample set to obtain an identification sample set containing the opening and closing points of the traveling valve; S40: Based on the identification sample set, convert the labeled pump dynamometer card data into a YOLO format data set and divide it into a training set and a test set; S50: Use the YOLO format data set to train the YOLO-Pose model to construct a traveling valve opening and closing point identification model; S60: Identify the opening and closing points of the traveling valve in the target pump dynamometer card through the traveling valve opening and closing point identification model; S70: Based on the identified opening and closing points of the traveling valve, calculate the effective stroke and determine the production of the pumping well.

2. The method for identifying the effective stroke of the pump power diagram of a pumping unit well according to claim 1, characterized in that In step S10, the Gibbs one-dimensional viscous damping wave equation is: ; In the formula, U ( x,t ) is the displacement function of the sucker rod at different times of the x cross-section, t and a is the velocity of the stress wave propagating in the sucker rod string; c is the viscous damping coefficient.

3. The method for identifying the effective stroke of the pump power diagram of a pumping unit well according to claim 1, wherein In step S20, the pump dynamometer card sample set includes at least the pump dynamometer cards under the following working conditions: normal production working condition, insufficient liquid supply, gas influence, sand production in the oil well, wax deposition in the oil well, and abnormal working conditions such as pump valve leakage.

4. The method for identifying the effective stroke of the pump power diagram of a pumping unit well according to claim 1, characterized in that, In step S30, the method of manually labeling the opening and closing points of the traveling valve includes one or a combination of the following two: Label the complete pump dynamometer card image, including labeling the contour area of the pump dynamometer card and the opening and closing points of the traveling valve; Perform local labeling on the download load area in the pump dynamometer card, including labeling the opening and closing points of the traveling valve within the area.

5. The method for identifying the effective stroke of the pump power diagram of a pumping unit well according to claim 1, wherein, In step S60, the model is trained and optimized by adjusting various built-in parameters in the YOLO-Pose model to obtain a trained and optimized traveling valve opening and closing point identification model. The built-in parameters include at least the LoU threshold, the image input size, and the number of training epochs.

6. The method for identifying the effective stroke of the pump power diagram of a pumping unit well according to claim 1, wherein, In step S60, a model with good pump valve identification effect is evaluated by accuracy. The formula for accuracy is: ; In the formula, TP is the number of samples for which the model correctly identifies positive examples, FP is the number of samples for which the model correctly identifies negative examples.

7. The method for identifying the effective stroke of the pump power diagram of a pumping unit well according to claim 1, characterized in that, In step S70, identify the closing point and opening point of the traveling valve in the downstroke area, restore the actual displacement coordinates of the two points based on the correspondence between the pixel coordinates and the target displacement, and calculate the effective stroke according to the difference between the abscissas of the two points.

8. The method for identifying the effective stroke of the pump power diagram of a pumping unit well according to claim 1, wherein In step S70, the formula for calculating the effective stroke is; ; Wherein, L stoke is the effective stroke, x close is the displacement at the closing point of the traveling valve, x open is the displacement at the opening point of the traveling valve, d is the ratio of the abscissa of the pixel point to the coordinate of the true point of the pump dynamometer card.

9. An identification device for the effective stroke of the pump power diagram of a pumping unit well, characterized in that, Using the method according to any one of claims 1 to 8, includes: A data acquisition and conversion module for collecting surface dynamometer card data and converting the surface dynamometer card data into the displacement and load data of the downhole pump dynamometer card based on the Gibbs one-dimensional viscous damping wave equation; A sample construction module for selecting typical pump dynamometer cards according to the converted downhole pump dynamometer card to construct a pump dynamometer card sample set; A labeling module for manually labeling the pump dynamometer card sample set to obtain an identification sample set containing the opening and closing points of the traveling valve; A data preprocessing module for converting the labeled pump dynamometer card data into a YOLO format data set based on the identification sample set and dividing it into a training set and a test set; A model training module, which is used to train a YOLO-Pose model by using the YOLO format data set and construct a recognition model for the opening and closing points of the traveling valve; A recognition module, which is used to recognize the opening and closing points of the traveling valve in the target pump dynamometer card through the recognition model for the opening and closing points of the traveling valve; A stroke calculation module, which is used to calculate the effective stroke based on the recognized opening and closing points of the traveling valve and determine the production of the pumping well.

10. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the method described in any one of claims 1-8 is implemented.

11. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the method described in any one of claims 1-8 is implemented.