Beam pumping unit state determination method, device, storage medium and system
Through image acquisition and deep learning models, the coordinate information of key points of the gaze beam pump is extracted, and the degree of angle change is calculated, which solves the problem of low coverage of the state monitoring of the pump pump in the prior art, and achieves accurate and efficient state determination.
Patent Information
- Application Number
- CN202510105882.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-23
AI Technical Summary
When determining the working status of the buoy oil pump, the prior art relies on manual supervision and inspection, and there are problems such as wide management areas, few supervisors and low supervision coverage, making it difficult to achieve effective information management.
By collecting multiple images, the coordinate information of the target key point of the gaze beam pump is extracted, the angle value between the gaze beam and the horizontal plane and its degree of change are calculated, and the working state of the gaze pump is determined based on this information.
The working state of the buzzer type oil pump is achieved with a relatively accurate determination, reducing the requirements for environmental background, and improving the efficiency of state determination through a smaller calculation amount, ensuring the stable operation of the equipment and personnel safety.
Smart Images

Figure CN119540247B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of oil and gas production safety, and in particular, relates to a method, device, storage medium and system for determining the state of a beam pumping unit. Background Art
[0002] The oil pump is an important part of oilfield production. Keeping track of the start and stop status of the oil pump can effectively ensure the stable operation of production and the personal safety of well site workers.
[0003] At present, the working status of the oil pumping unit is determined by video monitoring and production data analysis, and the supervision and inspection are mainly carried out manually. There are problems such as a wide management area, few supervisors and low monitoring coverage.
[0004] Therefore, effective information management methods are urgently needed to provide support for oilfield equipment management. Summary of the invention
[0005] The embodiments of the present application provide a method, device, storage medium and system for determining the state of a beam pumping unit, which can more accurately determine the working state of the beam pumping unit with a relatively small amount of calculation.
[0006] In a first aspect, an embodiment of the present application provides a method for determining the state of a beam pumping unit, comprising: acquiring multiple images of the beam pumping unit; extracting coordinate information of target key points in the multiple images, the target key points being at least two points on the beam of the beam pumping unit; determining the angle value between the beam and the horizontal plane in each image based on the coordinate information of the target key points in each image; determining the degree of change in the angle value between the beam and the horizontal plane in the multiple images; and determining the working state of the beam pumping unit based on the degree of change.
[0007] In an optional implementation of the first aspect, determining the degree of change in the angle value between the swimming beam and the horizontal plane in multiple images includes: determining the angle value between the swimming beam and the horizontal plane in a first image, and the absolute value of the difference between the angle value between the swimming beam and the horizontal plane in multiple second images, to obtain multiple angle change values, the multiple angle change values are used to characterize the degree of change in the angle value between the swimming beam and the horizontal plane in the multiple images, the first image is the first image of the multiple images, and the second image is an image other than the first image of the multiple images.
[0008] In an optional implementation of the first aspect, the working state of the walking beam pump is determined based on the degree of change, including: when multiple angle change values are less than or equal to a predetermined change value, determining that the walking beam pump is in a shutdown state; when there is an angle change value greater than the predetermined change value, determining that the walking beam pump is in a startup state.
[0009] In an optional implementation of the first aspect, the target key point includes a first key point and a second key point, the first key point is located in the middle of the walking beam, and the second key point is located at the tail of the walking beam.
[0010] In an optional implementation of the first aspect, the coordinate information of the target key points in multiple images is extracted, including: based on a target model, the coordinate information of the target key points in multiple images is extracted, the target model is pre-trained through a training data set, the training data set includes multiple training images and multiple data labels, the training images and the data labels correspond one to one, and the target model is constructed based on a deep learning model that has been lightweight.
[0011] In an optional implementation of the first aspect, the method for determining the state of a walking beam pumping unit also includes: based on the target model, extracting coordinate information of a rectangular box in multiple images, the rectangular box is used to surround the walking beam pumping unit; based on the coordinate information of the rectangular box in the multiple images, detecting whether the multiple images correspond to the same walking beam pumping unit to obtain a detection result.
[0012] In an optional implementation of the first aspect, based on the coordinate information of the rectangular frames in the multiple images, a detection is performed to determine whether the multiple images correspond to the same walking beam pump to obtain a detection result, including: calculating the intersection-and-union ratio between the rectangular frames of the multiple images based on the coordinate information of the rectangular frames in the multiple images; and obtaining the detection result by comparing the intersection-and-union ratio between the rectangular frames of the multiple images with a preset intersection-and-union ratio.
[0013] In an optional implementation of the first aspect, the method for determining the state of a walking beam pump also includes: extracting coordinate information of an initial rectangular frame in multiple images based on a target model; performing redundant filtering on the initial rectangular frame in multiple images to obtain coordinate information of the rectangular frame in multiple images.
[0014] In an optional implementation of the first aspect, the method for determining the state of a walking beam pumping unit also includes: before extracting the coordinate information of target key points in multiple images, receiving a video stream sent by an image acquisition device; performing frame extraction processing on the video stream according to a predetermined frame interval to obtain multiple images; and decoding the multiple images to obtain multiple decoded images.
[0015] In the second aspect, an embodiment of the present application provides a device for determining the state of a walking beam pumping unit, comprising: an acquisition unit, used to acquire multiple images of the walking beam pumping unit; a first extraction unit, used to extract coordinate information of target key points in the multiple images, the target key points being at least two points on the walking beam of the walking beam pumping unit; a first determination unit, used to determine the angle value between the walking beam and the horizontal plane in each image based on the coordinate information of the target key points in each image; a second determination unit, used to determine the degree of change of the angle value between the walking beam and the horizontal plane in the multiple images; and a third determination unit, used to determine the working state of the walking beam pumping unit based on the degree of change.
[0016] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method for determining the state of a beam pumping unit of the first aspect is implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a beam pumping unit state determination system, comprising a beam pumping unit state determination device and an image acquisition device. The beam pumping unit state determination device is used to execute the beam pumping unit state determination method of the first aspect; the image acquisition device is connected to the beam pumping unit state determination device in communication, and the image acquisition device is used to acquire images of the beam pumping unit.
[0018] In the embodiment of the present application, since the multiple images collected include walking beam pumps, the coordinate information of at least two points on the walking beam of the walking beam pumps in each image can be extracted. Based on the coordinate information of at least two points on the walking beam of the walking beam pumps in each image, the angle value between the walking beam of the walking beam pumps and the horizontal plane in each image can be quickly and accurately determined. Based on the angle value between the walking beam and the horizontal plane in multiple images, the degree of change of the walking beam of the walking beam pumps can be determined. Finally, based on the degree of change of the walking beam of the walking beam pumps, the working state of the walking beam pumps can be determined relatively quickly and accurately. It can be seen that the present application determines the degree of change of the walking beam of the beam pumping unit by extracting the coordinate information of at least two points on the walking beam of the beam pumping unit in multiple images. This not only has low requirements on the environmental background of the beam pumping unit in the image, but also can accurately determine the degree of change of the walking beam of the beam pumping unit with a smaller amount of calculation. Based on the degree of change of the walking beam, the working state of the beam pumping unit can be quickly and accurately determined, so that the beam pumping unit can operate stably, ensure the personal safety of on-site workers, and improve the overall efficiency of oilfield equipment management. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 It is a schematic diagram of the architecture of a beam pumping unit state determination system provided by an embodiment of the present application;
[0021] Figure 2 is a flow chart of a method for determining a state of a beam pumping unit provided by an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a beam pumping unit provided by an embodiment of the present application;
[0023] Figure 4 is a flow chart for determining whether multiple images correspond to the same beam pumping unit, provided by an embodiment of the present application;
[0024] Figure 5 is a flow chart of a method for determining a state of a beam pumping unit provided by another embodiment of the present application;
[0025] Figure 6 is a flow chart of a method for determining a state of a beam pumping unit provided by another embodiment of the present application;
[0026] Figure 7 is a structural schematic diagram of a device for determining a state of a beam pumping unit provided in yet another embodiment of the present application;
[0027] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application.
[0028] The above drawings include the following reference numerals:
[0029] 100, image acquisition device; 200, electronic device; 301, first key point; 302, second key point; 303, angle; 304, walking beam head; 3041, first point; 3042, second point; 3043, third point; 305, fourth point; 306, fifth point; 700, walking beam pumping unit state determination device; 701, acquisition unit; 702, first extraction unit; 703, first determination unit; 704, second determination unit; 705, third determination unit; 801, processor; 802, memory; 803, communication interface; 810, bus. DETAILED DESCRIPTION
[0030] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0031] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0032] The oil pump is an important part of oilfield production. Keeping track of the start and stop status of the oil pump can effectively ensure the stable operation of production and the personal safety of well site workers.
[0033] At present, the working status of the pumping unit is determined by video monitoring and production data analysis, and the supervision and inspection are mainly carried out manually. There are problems such as a wide management area, few supervisors, and low monitoring coverage. Therefore, effective information management methods are urgently needed to support oilfield production safety and production efficiency.
[0034] The image of the pump is analyzed based on the neural network model to determine the working status of the pump. However, there are problems such as large amount of calculation of the neural network model and high requirements on the background environment of the pump, which makes it difficult to accurately determine the working status of the pump, and thus leads to low overall efficiency of oilfield equipment management.
[0035] The embodiment of the present application provides a method, device, storage medium and system for determining the state of a beam pumping unit. Since the beam pumping unit is included in the multiple images collected, the coordinate information of at least two points on the beam of the beam pumping unit in each image can be extracted, and based on the coordinate information of at least two points on the beam of the beam pumping unit in each image, the angle value between the beam of the beam pumping unit and the horizontal plane in each image can be quickly and accurately determined, and based on the angle value between the beam of the beam pumping unit and the horizontal plane in multiple images, the degree of change of the beam of the beam pumping unit can be determined, and finally, based on the degree of change of the beam of the beam pumping unit, the working state of the beam pumping unit can be determined relatively quickly and accurately. It can be seen that the present application determines the degree of change of the walking beam of the beam pumping unit by extracting the coordinate information of at least two points on the walking beam of the beam pumping unit in multiple images. This not only has low requirements on the environmental background of the beam pumping unit in the image, but also can accurately determine the degree of change of the walking beam of the beam pumping unit with a smaller amount of calculation. Based on the degree of change of the walking beam, the working state of the beam pumping unit can be quickly and accurately determined, so that the beam pumping unit can operate stably, ensure the personal safety of on-site workers, and improve the overall efficiency of oilfield equipment management.
[0036] For ease of understanding, here, taking determining the working status of a beam pumping unit as an example, a brief introduction is given to the application architecture of the method, device, storage medium and system for determining the status of a beam pumping unit provided in the present application. Figure 1 A schematic diagram of the application architecture of a beam pumping unit state determination system provided in an embodiment of the present application. The beam pumping unit state determination system includes an image acquisition device 100 and an electronic device 200. The image acquisition device 100 takes multiple images of the beam pumping unit at the production site. After receiving the multiple images taken by the image acquisition device 100, the electronic device 200 determines the working state of the beam pumping unit according to the beam pumping unit state determination method provided in the present application.
[0037] In actual applications, in the embodiments of the present application, the method for determining the state of a beam pumping unit provided in the embodiments of the present application can be implemented when a processor of an electronic device executes a program or instruction. However, in some embodiments, an image acquisition device or other device may also have similar functions. For example, an image acquisition device at a production site of a beam pumping unit implements the method for determining the state of a beam pumping unit provided in the embodiments of the present application when executing a program or instruction. The embodiments of the present application do not limit this.
[0038] It should be noted that the application scenarios described in the above embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. A person skilled in the art will know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems. The method for determining the state of a beam pumping unit provided in the embodiments of the present application can be applied to various application scenarios where the working state of a beam pumping unit needs to be determined.
[0039] The following first introduces the method for determining the state of a beam pumping unit provided in an embodiment of the present application.
[0040] Figure 2 FIG. 2 is a flow chart of a method for determining the state of a beam pumping unit provided by an embodiment of the present application. Figure 2 As shown, the method for determining the state of a beam pumping unit provided in the embodiment of the present application includes steps S201 to S205.
[0041] S201, collecting multiple images of the beam pumping unit.
[0042] Among them, the multiple images collected include beam pumping units.
[0043] There are many ways to collect multiple images of a beam pumping unit. For example, you can collect multiple images of a beam pumping unit by using a handheld image acquisition device, or you can collect multiple images of a beam pumping unit based on an image acquisition device configured by a drone. Of course, you can also collect multiple images of a beam pumping unit through videos of the oil field production site sent by surveillance cameras.
[0044] In one embodiment, if a plurality of images of a beam pumping unit are collected through a video of an oil field production site sent by a monitoring camera, the video stream sent by the monitoring camera may be subjected to frame extraction processing to obtain a plurality of images of the beam pumping unit.
[0045] In addition, multiple methods can be used to perform frame extraction on the video stream sent by the surveillance camera. For example, frame extraction can be performed on the video stream sent by the surveillance camera based on a time interval, or frame extraction can be performed on the video stream sent by the surveillance camera based on a key frame.
[0046] S202, extracting coordinate information of target key points in multiple images, where the target key points are at least two points on a walking beam of a walking beam pumping unit.
[0047] For each image, the coordinate information of the target key points in the image in the corresponding image coordinate system is extracted.
[0048] There are many ways to extract the coordinate information of target key points in multiple images.
[0049] In one embodiment, the coordinate information of target key points in multiple images can be extracted by manual annotation.
[0050] In another embodiment, the coordinate information of the target key points in the multiple images can be extracted through a neural network model. Specifically, based on the target model, the coordinate information of the target key points in the multiple images is extracted. The target model is pre-trained through a training data set. The training data set includes multiple training images and multiple data labels. The training images correspond to the data labels one by one. The target model is constructed based on a deep learning model that has been lightweight.
[0051] The training images may be screened from existing monitoring videos, and the training images may be images including beam pumping units. Of course, the training images may also be images including other types of pumping units except beam pumping units.
[0052] The data labels have a one-to-one correspondence with the training images. The data labels are used to characterize whether the target object in the corresponding training image is a beam pumping unit, the rectangular box corresponding to the target object, and the location information of the target key points. For the data labels corresponding to the training images, the data labels can be annotated for the training images by manual annotation, or the training images can be pre-classified by a neural network model and then annotated for the training images by manual annotation. Among them, a training data set is composed of multiple training images and multiple data labels corresponding to multiple training images.
[0053] The target model is trained based on the training data set until the training stop condition is met to obtain the trained target model. The training stop condition includes that the number of training times for the target model has reached a predetermined number of iterations, the loss function has reached a convergence state, the accuracy of the verification samples in the training data set no longer improves, etc.
[0054] Optionally, before using the training data set to train the target model, a data enhancement method may be used to enhance the training data set, and then the target model is trained using the enhanced training data set. For example, the data enhancement method may include geometric transformation, color transformation, noise addition, blurring and sharpening, and the like.
[0055] In some examples, based on the training data set, the process of training a target model may include a first construction step, a second construction step, and a training step.
[0056] In the first construction step, obtain the monitoring video of the beam pumping unit at the production site , and from surveillance video Filter out multiple training images of beam pumping units . For multiple training images Perform manual annotation to obtain each training image The corresponding data labels.
[0057] The data labels include the target category, target rectangle, target key points and visibility. For example, for a training image , the target model is used to train the image Perform the test and if detected Figure 3 The first key point 301 in the middle of the walking beam, the second key point 302 in the tail of the walking beam, the first point 3041, the second point 3042 and the third point 3043 in the head 304 of the walking beam, and the fourth point 305 and the fifth point 306 at the bottom of the walking beam pumping unit are determined. The target object in the figure is a beam pumping unit. The target rectangle is the training image. A rectangular box enclosing the target object.
[0058] From multiple training images And each training image The corresponding data labels constitute the training data set, which can be divided into training sample sets and validation sample set Based on the Mosaic data enhancement method, the training data set is enhanced to obtain the data-enhanced training data set.
[0059] In the second construction step, a target model is constructed based on a neural network model that can provide key point detection, and the neural network model that can provide key point detection is lightweight to improve the reasoning speed of the target model. For example, YOLOv8-Pose is a key point detection model based on Bottom-up, which can identify the coordinate information of the rectangular frame of the target object and the coordinate information of the key points of the target object, so the target model can be constructed based on YOLOv8-Pose. For MobileNetV4, it introduces a universal inverted bottleneck (Universal Inverted Bottleneck, UIB) search block and Mobile MQA (Mobile Model Quality Assessment), which not only optimizes the network structure, but also reduces the amount of calculation and the number of parameters and improves the accuracy of the model. Therefore, the backbone network (Backbone network) of YOLOv8-Pose can be replaced with MobileNetV4, so that the YOLOv8-Pose model is lightweight and constructed to obtain the target model. Optionally, the target model of this embodiment can improve the reasoning speed by 39%.
[0060] In the training step, the target model is trained using the data-enhanced training data set until the loss function of the target model reaches a convergence state, thereby obtaining a trained target model.
[0061] The coordinate information of the target key points in multiple images is extracted based on the target model, so that the coordinate information of the target key points in multiple images can be extracted more efficiently and accurately.
[0062] In one embodiment, when the target key points are two points, such as Figure 3 As shown, the target key points include a first key point 301 and a second key point 302 , the first key point 301 is located in the middle of the beam, and the second key point 302 is located at the tail of the beam.
[0063] One end of the walking beam is the balance weight end, and the other end of the walking beam is the pumping end. The tail of the walking beam is located at the balance weight end of the walking beam, and the middle of the walking beam is located in the middle of the balance weight end of the walking beam and the pumping end of the walking beam.
[0064] In another embodiment, since the tail of the walking beam forms a corresponding angle with the horizontal plane, when there are three or more target key points, at least one of the key points needs to be located at the tail of the walking beam.
[0065] Since the areas where the middle and tail of the walking beam are located are relatively easy to identify on the walking beam, by extracting points on the middle and tail of the walking beam, the first key point and the second key point can be extracted relatively quickly and accurately. Subsequently, based on the first and second key points, the angle value between the walking beam and the horizontal plane can be determined relatively accurately and quickly.
[0066] S203, based on the coordinate information of the target key point in each image, determine the angle value between the swimming beam and the horizontal plane in each image.
[0067] The angle between the beam of the beam pumping unit and the horizontal plane in each image can be Figure 3 The angle 303 shown is shown. It should be noted that the horizontal plane proposed in this embodiment is a horizontal plane parallel to the ground, and the horizontal plane proposed in this embodiment is to form Figure 3 Angle 303 is shown.
[0068] In one embodiment, if the target key point includes a first key point and a second key point, and after the coordinate information of the first key point and the coordinate information of the second key point are extracted, the angle between the walking beam and the horizontal plane can be determined based on the following formula:
[0069]
[0070] in, Used to represent the coordinate information of the first key point. Used to represent the coordinate information of the second key point. Used to represent the horizontal coordinate of the first key point in the image coordinate system. Used to represent the vertical coordinate of the first key point in the image coordinate system. Used to represent the horizontal coordinate of the second key point in the image coordinate system. Used to represent the vertical coordinate of the second key point in the image coordinate system.
[0071] S204, determining the degree of change of the angle between the swimming beam and the horizontal plane in the multiple images.
[0072] In the actual production process, the state of the beam of the beam pumping unit will constantly change. Based on the change degree of the angle value between the beam and the horizontal plane in multiple images, the change degree of the beam can be quickly and accurately determined.
[0073] In the process of determining the degree of change of the walking beam of a beam pumping unit based on the angle values between the walking beam and the horizontal plane in multiple images, due to the constantly changing nature of the walking beam of the beam pumping unit, any one of the multiple images can be selected as the first image, that is, the angle value between the walking beam and the horizontal plane in the first image is used as a reference, and the angle values between the walking beam and the horizontal plane of images other than the first image in the multiple images are compared with the angle value between the walking beam and the horizontal plane in the first image, so as to determine the degree of change of the walking beam of the beam pumping unit.
[0074] If the multiple images are arranged in chronological order, the first image among the multiple images is taken the earliest, and the state of the walking beam in the other images except the first image among the multiple images is compared with the state of the walking beam in the first image, so that the degree of change of the walking beam of the walking beam pumping unit can be determined more intuitively. For example, the first image among the multiple images can be used as the first image, that is, the angle value between the walking beam in the first image and the horizontal plane is used as a reference, and the angle values between the walking beam in the multiple second images and the horizontal plane are compared with the angle value between the walking beam in the first image and the horizontal plane, so as to more accurately determine the degree of change of the walking beam of the walking beam pumping unit.
[0075] Based on the above analysis, in one embodiment, determining the degree of change of the angle value between the upstream beam and the horizontal plane in multiple images includes: determining the angle value between the upstream beam and the horizontal plane in the first image, and the absolute value of the difference between the angle value between the upstream beam and the horizontal plane in multiple second images, to obtain multiple angle change values, the multiple angle change values are used to characterize the degree of change of the angle value between the upstream beam and the horizontal plane in the multiple images, the first image is the first image in the multiple images, and the second image is the image other than the first image in the multiple images.
[0076] Based on the absolute value of the difference between the angle value between the upstream beam and the horizontal plane in the first image and the angle values between the upstream beam and the horizontal plane in multiple second images, the degree of change of the angle value between the upstream beam and the horizontal plane in multiple images is reflected. In this way, the degree of change of the angle value between the upstream beam and the horizontal plane in multiple images can be determined more intuitively and quickly.
[0077] For example, for three images, namely , and .and , and Sort by the time they were taken. The shooting time is earlier than , The shooting time is earlier than .like The angle between the midstream beam and the horizontal plane is , The angle between the midstream beam and the horizontal plane is ,as well as The angle between the midstream beam and the horizontal plane is ,calculate The angle between the midstream beam and the horizontal plane and The angle between the midstream beam and the horizontal plane The absolute value of the difference is
[0078] =
[0079] calculate The angle between the midstream beam and the horizontal plane and The angle between the midstream beam and the horizontal plane The absolute value of the difference is
[0080] =
[0081] pass as well as , to reflect , and The degree of change in the angle between the midstream beam and the horizontal plane.
[0082] S205, determining the working state of the beam pumping unit based on the degree of change.
[0083] The working state may include a shutdown state and a startup state.
[0084] In one embodiment, the working state of the walking beam pump is determined based on the degree of change, including: when multiple angle change values are less than or equal to a predetermined change value, determining that the walking beam pump is in a shutdown state; when there is an angle change value greater than the predetermined change value, determining that the walking beam pump is in a startup state.
[0085] When multiple angle change values are all less than the predetermined change value, it indicates that the beam of the beam pumping unit is in a stationary state, that is, the beam pumping unit is in a shutdown state. When there is an angle change value greater than the predetermined change value, it indicates that the beam of the beam pumping unit is in a moving state, that is, the beam pumping unit is in a starting state, so that the working state of the beam pumping unit can be determined quickly and accurately.
[0086] In some examples, the predetermined change value may be 5°.
[0087] For example, in as well as If both are less than 5°, it is determined that the beam pumping unit is in shutdown state. as well as If there is an angle greater than 5°, it is determined that the walking beam pump is in the starting state.
[0088] In another embodiment, the working state of the beam pumping unit may be determined by analyzing the coordinate information of the target key points in multiple images.
[0089] For example, if the target key points extracted from each image are the middle point and the tail point of the walking beam, respectively. Since the tail of the walking beam does not change when the walking beam pump is working, the coordinate information of the same point in the middle of the walking beam in multiple images can be compared to determine the working state of the walking beam pump. For example, in multiple images, if the coordinate information of the same point in the middle of the walking beam is constantly increasing, it indicates that the walking beam pump is in the starting state. If the coordinate information of the same point in the middle of the walking beam is constantly decreasing, it indicates that the walking beam pump is in the stopping state.
[0090] In the embodiment of the present application, since the multiple images collected include walking beam pumps, the coordinate information of at least two points on the walking beam of the walking beam pumps in each image can be extracted. Based on the coordinate information of at least two points on the walking beam of the walking beam pumps in each image, the angle value between the walking beam of the walking beam pumps and the horizontal plane in each image can be quickly and accurately determined. Based on the angle value between the walking beam and the horizontal plane in multiple images, the degree of change of the walking beam of the walking beam pumps can be determined. Finally, based on the degree of change of the walking beam of the walking beam pumps, the working state of the walking beam pumps can be determined relatively quickly and accurately. It can be seen that the present application determines the degree of change of the walking beam of the beam pumping unit by extracting the coordinate information of at least two points on the walking beam of the beam pumping unit in multiple images. This not only has low requirements on the environmental background of the beam pumping unit in the image, but also can accurately determine the degree of change of the walking beam of the beam pumping unit with a smaller amount of calculation. Based on the degree of change of the walking beam, the working state of the beam pumping unit can be quickly and accurately determined, so that the beam pumping unit can operate stably, ensure the personal safety of on-site workers, and improve the overall efficiency of oilfield equipment management.
[0091] Figure 4 FIG. 1 is a schematic diagram showing a flow chart of determining whether multiple images correspond to the same beam pumping unit according to an embodiment of the present application. Figure 4 As shown, this embodiment includes step S401 and step S402.
[0092] S401, based on the target model, extracting coordinate information of a rectangular box in multiple images, where the rectangular box is used to surround the beam pumping unit.
[0093] In the process of detecting the beam pumping unit in multiple images based on the target model, if the beam pumping unit is detected from the image, the beam pumping unit can be marked in the image by a rectangular frame, so that the coordinate information of the rectangular frame can be obtained. Subsequently, the position of the beam pumping unit in the image can be determined based on the coordinate information of the rectangular frame.
[0094] In the process of detecting beam pumps in multiple images based on the target model, due to the generalization ability of the target model or window sliding and other reasons, one beam pump may correspond to multiple initial rectangular frames, so it is necessary to perform redundant filtering on the detected multiple initial rectangular frames to avoid confusion and misjudgment caused by multiple frames. Specifically, based on the target model, the coordinate information of the initial rectangular frames in multiple images is extracted; the initial rectangular frames in multiple images are redundantly filtered to obtain the coordinate information of the rectangular frames in multiple images.
[0095] In one embodiment, non-maximum suppression (NMS) can be used to perform redundant filtering on multiple initial rectangular boxes, and adaptive NMS can be used to perform redundant filtering on multiple initial rectangular boxes. Of course, weighted box fusion (WBF) can also be used to perform redundant filtering on multiple initial rectangular boxes.
[0096] Redundancy filtering is performed on the initial rectangular frames in multiple images, so that repeated or unnecessary detection results (i.e., the initial rectangular frames) can be removed, so that the detection results output by the target model are more concise as a whole, and the coordinate information of the rectangular frame surrounding the walking beam pumping unit can be determined more accurately. Subsequently, based on the coordinate information of the rectangular frame, it can be more accurately determined whether multiple images correspond to a walking beam pumping unit.
[0097] S402, based on the coordinate information of the rectangular frames in the multiple images, detect whether the multiple images correspond to the same beam pumping unit to obtain a detection result.
[0098] There are many ways to detect whether multiple images correspond to the same beam pumping unit.
[0099] For example, feature matching can be performed on the regions corresponding to the rectangular boxes in multiple images to determine whether the multiple images correspond to the same beam pumping unit. Convolutional neural networks can also be used to extract features from the regions corresponding to the rectangular boxes in multiple images and calculate the distance between feature vectors to determine whether the multiple images correspond to the same beam pumping unit. Of course, the intersection-and-union ratio of the rectangular boxes in multiple images can also be used to determine whether the multiple images correspond to the same beam pumping unit.
[0100] Based on the coordinate information of the rectangular frames in the multiple images, it is detected whether the multiple images correspond to the same beam pumping unit, so that it can be determined whether the multiple images correspond to the same beam pumping unit relatively quickly and efficiently.
[0101] By using the intersection-and-union ratio of the rectangular frames in the multiple images, it is determined whether the multiple images correspond to the same walking beam pumping unit. Specifically, it can be as follows: based on the coordinate information of the rectangular frames in the multiple images, the intersection-and-union ratio between the rectangular frames of the multiple images is calculated; and the detection result is obtained by comparing the intersection-and-union ratio between the rectangular frames of the multiple images with a preset intersection-and-union ratio.
[0102] When the multiple images are sorted in the order of shooting time, the rectangular frame of the first image among the multiple images is compared with the rectangular frames of other images except the first image to determine whether the multiple images correspond to a beam pumping unit.
[0103] For example, three images, namely , and .and , and The images are sorted in the order of the shooting time. The shooting time is earlier than , The shooting time is earlier than .based on The coordinate information of the rectangular box in The coordinate information of the rectangular box in and The IOU value (Intersection over Union, IOU) is
[0104] IOU , )=
[0105] in, Used to indicate The rectangular frame in Used to indicate The rectangular frame in .
[0106] based on The coordinate information of the rectangular box in The coordinate information of the rectangular box in and The IOU value is
[0107] IOU , )=
[0108] in, Used to indicate The rectangular frame in .
[0109] If IOU( , ) and IOU ( , ) are greater than the preset intersection-combination ratio, indicating , and Corresponding to the same beam pumping unit.
[0110] In some examples, the preset intersection-over-union ratio may be 0.8.
[0111] By comparing the intersection-and-union ratio between the rectangular frames of multiple images with the preset intersection-and-union ratio, it can be determined more intuitively and efficiently whether the multiple images correspond to the same beam pumping unit.
[0112] like Figure 5 As shown, the method for determining the state of a beam pumping unit of the present application may further include steps S206 to S208.
[0113] S206, receiving a video stream sent by the image acquisition device.
[0114] When receiving the video stream sent by the image acquisition device, the electronic device may receive it via a wired or wireless method.
[0115] S207, performing frame extraction processing on the video stream according to a predetermined frame interval to obtain multiple images.
[0116] Since the difference between two adjacent frames of images in the video stream sent by the image acquisition device is small, and in order to reduce the computational burden of the target model and speed up the inference speed of the target model, the image frames in the video stream can be extracted at a predetermined frame interval. The predetermined frame interval can be determined based on the inference speed of the target model and the task requirements.
[0117] In one embodiment, a tool with functions such as video encoding, decoding, and post-processing may be used to extract frames from a video stream at a predetermined frame interval to obtain multiple images.
[0118] For example, a tool with functions such as video encoding, decoding, and post-processing may be FFmpeg. Based on FFmpeg, the video stream sent by the surveillance camera is processed by frame extraction to obtain multiple images of the beam pumping unit. Specifically, one frame of image may be extracted from the video stream every N frames, thereby obtaining multiple images of the beam pumping unit. Among them, N may be determined according to the inference speed of the target model and the task requirements. In the default state, N=1.
[0119] S208, decoding the multiple images to obtain multiple decoded images.
[0120] Since the multiple images obtained after the frame extraction process are encoded in base64 format, the multiple images can be decoded by using a codec that integrates multiple image formats before inputting into the target model.
[0121] For example, a codec that integrates multiple image formats may be the PIL (Python Imaging Library) library.
[0122] The received video stream sent by the image acquisition device is subjected to frame extraction processing to obtain multiple images, so that the change amplitude of the walking beam in the obtained multiple images is more obvious. Since the target model does not need to detect each frame of the video stream sent by the image acquisition device, the calculation amount of the target model can be reduced. The decoded image is input into the target model, so that the target model does not need to decode the image again, and the calculation amount of the target model can be reduced, thereby improving the reasoning speed of the target model, and further making the overall robustness of the target model in the present application higher.
[0123] For ease of understanding, the embodiments of the present application are based on Figure 6 The method for determining the state of a beam pumping unit is further described. The method for determining the state of a beam pumping unit includes steps S601 to S607.
[0124] In step S601, a plurality of training images of a beam pumping unit are obtained. For example, monitoring video of an oil field production site is obtained using monitoring equipment. ,Multiple training images of beam pumping units were selected from the surveillance videos.
[0125] In step S602, multiple training images of the beam pumping unit are manually labeled to obtain data labels corresponding to each training image, and a training data set is formed by multiple training images and multiple data labels. The Mosaic data enhancement method is used to enhance the training data set to obtain a data-enhanced training data set.
[0126] In step S603, the target model is constructed and trained. The Backbone network of YOLOv8-Pose is replaced with MobileNetV4 to construct the target model. The target model is trained using the data-enhanced training data set until the loss function corresponding to the target model reaches a convergence state, thereby obtaining the trained target model.
[0127] In step S604, multiple images of the beam pumping unit are collected. For example, the electronic device is connected to the video stream of the monitoring device at the production site, and FFmpeg can be used to extract frames, and one frame is extracted as an image every N frames. , thus obtaining multiple images of the beam pumping unit Wherein, N can be determined based on the reasoning speed and task requirements at the scene. In the default state, N=1.
[0128] In step S605, the multiple images of the beam pumping unit are decoded, and the decoded multiple images are input into the target model to obtain the coordinate information of the rectangular frames of the multiple images and the coordinate information of the target key points. Base64 format encoding is used for data transmission, so the PIL library can be used to encode multiple images before passing them to the target model. Decode the multiple images. Input into the target model, and use NMS to filter redundant and repeated rectangular boxes to obtain the pumping unit category , coordinate information of the rectangular frame , coordinate information of target key points , where c is used to represent the pumping unit category, b is used to represent the rectangular box, and p is used to represent the target key point. To detect an image, the number of beam pumping units is obtained. Used to represent the real number space.
[0129] In step S606, based on the coordinate information of the rectangular frames in the multiple images, it is detected whether the multiple images correspond to the same beam pumping unit to obtain a detection result.
[0130] For example, for three images, namely , and .and , and The images are sorted in the order of the shooting time. The shooting time is earlier than , The shooting time is earlier than .based on The coordinate information of the rectangular box in The coordinate information of the rectangular box in and The IOU value (Intersection over Union, IOU) is
[0131] IOU , )=
[0132] in, Used to indicate The rectangular frame in Used to indicate The rectangular frame in .
[0133] based on The coordinate information of the rectangular box in The coordinate information of the rectangular box in and The IOU value is
[0134] IOU , )=
[0135] in, Used to indicate The rectangular frame in .
[0136] If IOU( , ) and IOU ( , ) are greater than 0.8, indicating , and Corresponding to the same beam pumping unit.
[0137] In step S607, when the multiple images correspond to the same beam pumping unit, the angle values between the beam pumping unit and the horizontal plane in the multiple images are determined based on the coordinate information of the target key points in the multiple images. The working state of the beam pumping unit is determined based on the degree of change of the angle values between the beam pumping unit and the horizontal plane in the multiple images.
[0138] For example, based on , and The coordinate information of the target key points in are calculated separately , and The angle between the midstream beam and the horizontal plane is , as well as .
[0139] calculate The angle between the midstream beam and the horizontal plane and The angle between the midstream beam and the horizontal plane The absolute value of the difference is
[0140] =
[0141] calculate The angle between the midstream beam and the horizontal plane and The angle between the midstream beam and the horizontal plane The absolute value of the difference is
[0142] =
[0143] exist as well as If both are less than the predetermined change value, it is determined that the beam pumping unit is in the shutdown state. as well as If there is a change value greater than a predetermined value, it is determined that the walking beam pump is in the starting state.
[0144] It should be noted that the device for determining the state of a beam pumping unit is a device corresponding to the above-mentioned method for determining the state of a beam pumping unit. All implementation methods in the above-mentioned method embodiment are applicable to the embodiments of the device and can achieve the same technical effects, which will not be repeated here.
[0145] Based on the same inventive concept, the embodiment of the present application also provides a device for determining the state of a beam pumping unit. Figure 7 The device for determining the state of a beam pumping unit provided in an embodiment of the present application is described in detail.
[0146] Figure 7 Schematic diagram of a device for determining the state of a beam pumping unit provided in an embodiment of the present application. Figure 7 As shown, the device 700 for determining the state of a beam pumping unit includes a collection unit 701 , a first extraction unit 702 , a first determination unit 703 , a second determination unit 704 and a third determination unit 705 .
[0147] The acquisition unit 701 can be used to acquire multiple images of the beam pumping unit.
[0148] The first extraction unit 702 can be used to extract coordinate information of target key points in multiple images, where the target key points are at least two points on the walking beam of the walking beam pumping unit.
[0149] The first determination unit 703 may be used to determine the angle between the swimming beam and the horizontal plane in each image based on the coordinate information of the target key point in each image.
[0150] The second determining unit 704 may be used to determine the degree of change of the angle between the swimming beam and the horizontal plane in the plurality of images.
[0151] The third determination unit 705 may be used to determine the working state of the beam pumping unit based on the degree of change.
[0152] In one embodiment, the second determination unit can also be used to determine the angle value between the swimming beam and the horizontal plane in the first image, and the absolute value of the difference between the angle values between the swimming beam and the horizontal plane in multiple second images, to obtain multiple angle change values, and the multiple angle change values are used to characterize the degree of change of the angle value between the swimming beam and the horizontal plane in multiple images. The first image is the first image among the multiple images, and the second image is the image other than the first image among the multiple images.
[0153] In one embodiment, the third determination unit can also be used to determine that the walking beam pump is in a shutdown state when multiple angle change values are less than or equal to a predetermined change value; and to determine that the walking beam pump is in a startup state when there is an angle change value greater than a predetermined change value.
[0154] In one embodiment, the target key point includes a first key point and a second key point, the first key point is located at the middle of the beam, and the second key point is located at the tail of the beam.
[0155] In one embodiment, the first extraction unit can also be used to extract coordinate information of target key points in multiple images based on the target model. The target model is pre-trained through a training data set. The training data set includes multiple training images and multiple data labels. The training images and data labels correspond one to one. The target model is constructed based on a deep learning model that has been lightweight.
[0156] In one embodiment, the apparatus for determining the state of a beam pumping unit further includes a second extraction unit and a detection unit. The second extraction unit can be used to extract coordinate information of a rectangular frame in multiple images based on the target model, and the rectangular frame is used to surround the beam pumping unit; the detection unit can be used to detect whether the multiple images correspond to the same beam pumping unit based on the coordinate information of the rectangular frame in the multiple images to obtain a detection result.
[0157] In one embodiment, the above-mentioned detection unit can also be used to calculate the intersection-and-union ratio between the rectangular frames of multiple images based on the coordinate information of the rectangular frames in the multiple images; and obtain the detection result by comparing the intersection-and-union ratio between the rectangular frames of multiple images with the preset intersection-and-union ratio.
[0158] In one embodiment, the apparatus for determining the state of a beam pumping unit further includes a third extraction unit and a redundant filtering unit. The third extraction unit can be used to extract the coordinate information of the initial rectangular frame in the multiple images based on the target model; the redundant filtering unit can be used to perform redundant filtering on the initial rectangular frame in the multiple images to obtain the coordinate information of the rectangular frame in the multiple images.
[0159] In one embodiment, the apparatus for determining the state of a beam pumping unit further includes a receiving unit, a frame extraction unit, and a decoding unit. The receiving unit can be used to receive a video stream sent by an image acquisition device before extracting coordinate information of target key points in multiple images; the frame extraction unit can be used to extract frames from the video stream at a predetermined frame interval to obtain multiple images; and the decoding unit can be used to decode the multiple images to obtain multiple decoded images.
[0160] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0161] The electronic device may include a processor 801 and a memory 802 storing computer program instructions.
[0162] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0163] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.
[0164] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of the present application.
[0165] The processor 801 reads and executes the computer program instructions stored in the memory 802 to implement any one of the beam pumping unit state determination methods in the above embodiments.
[0166] In one example, the electronic device may further include a communication interface 803 and a bus 810. Figure 8 As shown, the processor 801, the memory 802, the communication interface 803 and the bus 810 are connected and communicate with each other.
[0167] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0168] Bus 810 includes hardware, software or both components coupled to each other. For example and not limitation, the bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnect (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. Where appropriate, bus 810 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0169] In addition, in combination with the beam pumping unit state determination method in the above embodiment, the present application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any of the beam pumping unit state determination methods in the above embodiment is implemented.
[0170] The embodiment of the present application also provides a computer program product. When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device executes the method for determining the state of a walking beam pump as provided in the embodiment of the present application.
[0171] The embodiment of the present application also provides a beam pumping unit state determination system. The system includes a beam pumping unit state determination device and an image acquisition device. The beam pumping unit state determination device is used to execute any one of the beam pumping unit state determination methods in the embodiment of the present application, and the image acquisition device is connected to the beam pumping unit state determination device in communication, and the image acquisition device is used to acquire images of the beam pumping unit.
[0172] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0173] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0174] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0175] The above describes various aspects of the present application with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0176] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for determining the state of a beam pumping unit, characterized in that: include: Collect multiple images of a beam pumping unit; Extracting coordinate information of target key points in the multiple images, wherein the target key points are at least two points on the walking beam of the walking beam pumping unit; Based on the coordinate information of the target key point in each of the images, determining the angle value between the walking beam and the horizontal plane in each of the images; Determining the degree of change of the angle between the walking beam and the horizontal plane in the plurality of images; Based on the degree of change, determining the working state of the beam pumping unit; The target key points include a first key point and a second key point, the first key point is located in the middle of the walking beam, and the second key point is located at the tail of the walking beam; Determining the degree of change of the angle between the walking beam and the horizontal plane in the multiple images includes: Determine an absolute value of a difference between an angle value between the walking beam and the horizontal plane in a first image and an angle value between the walking beam and the horizontal plane in a plurality of second images, and obtain a plurality of angle change values, wherein the plurality of angle change values are used to characterize a degree of change of the angle value between the walking beam and the horizontal plane in the plurality of images, wherein the first image is a first image in the plurality of images, and the second image is an image in the plurality of images other than the first image; Based on the degree of change, determining the working state of the beam pumping unit includes: When the plurality of angle change values are all less than or equal to the predetermined change value, determining that the beam pumping unit is in a shutdown state; In the event that there is a value of the angle change that is greater than the predetermined change value, it is determined that the beam pumping unit is in the startup state.
2. The method according to claim 1, characterized in that Extracting coordinate information of target key points in the multiple images includes: Based on the target model, the coordinate information of the target key points in the multiple images is extracted, the target model is pre-trained through a training data set, the training data set includes multiple training images and multiple data labels, the training images correspond to the data labels one by one, and the target model is constructed based on a deep learning model that has been lightweight.
3. The method according to claim 2, characterized in that The method further comprises: Based on the target model, extracting coordinate information of a rectangular frame in the multiple images, wherein the rectangular frame is used to surround the beam pumping unit; Based on the coordinate information of the rectangular frames in the multiple images, whether the multiple images correspond to the same beam pumping unit is detected to obtain a detection result.
4. The method according to claim 3, characterized in that Based on the coordinate information of the rectangular frames in the multiple images, whether the multiple images correspond to the same beam pumping unit is detected to obtain the detection results, including: Calculating intersection-and-union ratios between the rectangular frames of the multiple images based on the coordinate information of the rectangular frames in the multiple images; The detection result is obtained by comparing the intersection-and-union ratios between the rectangular frames of the multiple images with a preset intersection-and-union ratio.
5. The method according to claim 3, characterized in that: The method further comprises: Based on the target model, extracting coordinate information of the initial rectangular frame in the multiple images; Redundancy filtering is performed on the initial rectangular frames in the multiple images to obtain coordinate information of the rectangular frames in the multiple images.
6. The method according to any one of claims 1 to 5, characterized in that Before extracting the coordinate information of the target key points in the multiple images, the method further includes: Receive the video stream sent by the image acquisition device; Performing frame extraction processing on the video stream according to a predetermined frame interval to obtain the multiple images; The multiple images are decoded to obtain the multiple images after decoding.
7. A device for determining the state of a beam pumping unit, characterized in that: include: An acquisition unit, used for acquiring multiple images of the beam pumping unit; A first extraction unit is used to extract coordinate information of target key points in the multiple images, wherein the target key points are at least two points on the walking beam of the walking beam pumping unit; A first determining unit, configured to determine an angle value between the walking beam and a horizontal plane in each of the images based on coordinate information of the target key point in each of the images; A second determining unit is used to determine the degree of change of the angle between the walking beam and the horizontal plane in the multiple images; a third determining unit, configured to determine the working state of the beam pumping unit based on the degree of change; The target key points include a first key point and a second key point, the first key point is located in the middle of the walking beam, and the second key point is located at the tail of the walking beam; Determining the degree of change of the angle between the walking beam and the horizontal plane in the multiple images includes: Determine an absolute value of a difference between an angle value between the walking beam and the horizontal plane in a first image and an angle value between the walking beam and the horizontal plane in a plurality of second images, and obtain a plurality of angle change values, wherein the plurality of angle change values are used to characterize a degree of change of the angle value between the walking beam and the horizontal plane in the plurality of images, wherein the first image is a first image in the plurality of images, and the second image is an image in the plurality of images other than the first image; Based on the degree of change, determining the working state of the beam pumping unit includes: When the plurality of angle change values are all less than or equal to the predetermined change value, determining that the beam pumping unit is in a shutdown state; In the event that there is a value of the angle change that is greater than the predetermined change value, it is determined that the beam pumping unit is in the startup state.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for determining the state of a beam pumping unit according to any one of claims 1 to 6 is implemented.
9. A beam pumping unit state determination system, characterized in that: include: A beam pumping unit state determination device, the beam pumping unit state determination device is used to execute the beam pumping unit state determination method according to any one of claims 1 to 6; An image acquisition device is communicatively connected with the beam pumping unit state determination device, and is used to acquire images of the beam pumping unit.
Citation Information
Patent Citations
System, method and equipment for detecting operation state of oil pumping unit through infrared panoramic artificial intelligence and storage medium
CN113095225A
Pumping unit key position inspection method based on artificial intelligence video identification technology
CN119007068A