Petroleum underground oil pipe lifting safety analysis method based on artificial intelligence
Technical Field
The invention relates to the field of computer vision and the field of artificial intelligence, in particular to a petroleum underground oil pipe lifting safety analysis method based on artificial intelligence.
Background
Safe production of oil field downhole operations is an important means for continuous and efficient production of products. Due to the particularity of the petroleum industry, a large number of workers are required to perform production activities in the operation process, and the intensive personnel brings more pressure to the safety work of petroleum enterprises. Therefore, petroleum enterprises set a series of operation specifications for downhole operation, so that the personal safety of operators is ensured as much as possible.
Taking the lifting operation of the oil pipe in the oil well as an example, a worker needs to lift the oil pipe in the well out of the well mouth by using a lifting system, unload and lower the oil pipe one by one on an oil pipe bridge, and then descend the oil pipe into the well one by one after cleaning, measuring, reassembling and replacing a downhole tool. The conventional operating specifications are as follows: (1) when the oil pipe is lifted, the operators must be complete, including one driller and two workers at the well head. (2) Before lifting the oil pipe, the wellhead worker A must make gestures to indicate that all the parts are ready, and the driller can lift the drill to prevent accidents caused by the fact that the oil pipe is lifted without being fastened in place or the wellhead worker does not pay attention to lifting rings and the oil pipe. (3) When the hoisting ring pipe rises to the three-meter height of the operation platform and when the hoisting ring pipe falls to the three-meter height of the operation platform and stops the hoisting ring, a wellhead worker A needs to look up and send the hoisting ring and face the hoisting ring, the worker A and the worker B pay attention to the hoisting ring and the oil pipe all the time, the worker B cannot back to the hoisting ring in the process, the worker A and the worker B need to keep a certain distance away from the oil pipe and cannot squat or bend, and the requirements are for preventing the hoisting ring and the oil pipe from colliding, smashing and other accidents in the rising or falling process. (4) The motion speed of the hoisting ring cannot be too fast when the driller operates the hoisting system. However, the prior art still lacks the analysis of the lifting operation specification of the oil pipe under the oil well, so that the personal safety of operators is still difficult to ensure. Therefore, there is a need for a safety analysis method for lifting and lowering oil pipe under oil well based on artificial intelligence to solve the above problems.
Disclosure of Invention
The invention aims to provide a petroleum underground oil pipe lifting safety analysis method based on artificial intelligence, which aims to solve the problems in the background technology.
In order to achieve the aim, the invention provides an artificial intelligence-based petroleum underground oil pipe lifting safety analysis method, which comprises the following steps of:
s1, acquiring video image information of the petroleum underground operation area by the network camera, and sending the video image information to the background server for calculation;
s2, detecting the number of the operators and identifying the identities of the operators, and if the number of the operators is not equal to the preset number, early warning;
s3, continuously detecting the speed and the running direction of the lifting ring, and immediately sending out an early warning if the speed of the lifting ring exceeds a preset threshold value;
s4, continuously detecting dangerous operation when the oil pipe ascends and descends, and detecting actions of operators with potential safety hazards when the hanging ring moves within 3 meters of the ground;
and S5, detecting and early warning gestures before the oil pipe rises.
Further, in step S1, installing a voice reminding terminal in the downhole operation area; the background server comprises a central intelligent computing node, a cloud data and service center and terminal management software.
Further, in the step S2, the preset number of operators is 3, and the operators are driller, wellhead worker a and wellhead worker b respectively; and identifying the number of the operators by adopting a pedestrian detection algorithm, and if the number of the operators exceeds or is less than 3, automatically carrying out early warning and informing background operators.
Further, the pedestrian detection algorithm comprises a gradient histogram + SVM or Adaboost algorithm and a Yolo series or fast-RCNN target detection algorithm; the method for identifying the identity of the operator comprises the following steps:
(1) recording the center x coordinate of the detected rectangular frame of the hanging ring;
(2) if the x coordinate of the center of the human body target is larger than the x coordinate of the center of the rectangular frame of the hanging ring, the human body target is a well head worker B;
(3) and in the rest two human body targets, the minimum central x coordinate is the driller, and the rest other person is the wellhead worker A.
Further, the specific implementation steps of step S3 are as follows:
(1) identifying the lifting ring by adopting a YoloV4 target detection algorithm or a template matching algorithm, and continuously tracking;
(2) acquiring the motion time of the suspension ring according to the video frame rate of the network camera, and counting the number of moving pixels of the position of the suspension ring within interval time to calculate the motion speed and the running direction of the suspension ring;
(3) and when the movement speed is larger than the set threshold value, sending an illegal event that the flying ring moves too fast.
Further, when the movement velocity v of the lifting ring at the current moment is calculated, the position information of the continuous n rectangular frames of the lifting ring before the current moment is adopted for calculation, and the calculation formula of the movement velocity v is as follows:
in formula 1), y
iAnd y
i+1Respectively are the vertical coordinates of the centers of two continuous rectangular frames at the front and the back of the hanging ring,
is n moments of the lifting ringAverage value of frame height, h
i、h
i+1The height of two continuous rectangular frames at the front and the back of the hanging ring is k, and k is a proportionality coefficient and is used for adjusting the relative size of the movement speed in the vertical direction; when the moving speed v is greater than 0, the flying ring moves downwards; when the moving speed v is less than 0, the lifting ring moves upwards; when the moving speed v is equal to 0, the suspension ring is represented to be stationary.
Further, in step S4, the specific steps of detecting the dangerous operation of the operator are as follows:
(1) continuously detecting the position of the hanging ring, and detecting dangerous operation when the hanging ring moves within 3 meters of the ground;
(2) the operator stands below the hanging ring within 50cm for dangerous operation detection; detecting the position relation between a lifting ring and an operator, and if the x coordinate of a person center and the x coordinate of the lifting ring are smaller than a preset threshold value and the y coordinates of the person center and the lifting ring are smaller than the preset threshold value, sending out an early warning;
(3) detecting the squatting danger operation of the wellhead worker A and the wellhead worker B; continuously recording the height of the human body detection rectangular frame of the operator, and calculating a highest value and an average value; if the height of the human body is detected to be lower than the maximum value by 20 percent and lower than the average value by 5 percent, the operator is considered to have dangerous operation of squatting;
(4) the detection method of the hoisting ring by the wellhead I side; the method comprises the following steps that the hanging ring on the first side of the wellhead faces or faces back to an imaging plane on an image, and the judgment rule of the hanging ring on the first side of the wellhead is that the reference width W of two shoulders when a human body faces a camera is estimated: recording the maximum distance between the left shoulder joint point and the right shoulder joint point of all human body targets until the current moment; separately calculating the width W between the two shoulders of the wellhead artificial nail through the joint points of the left shoulder and the right shoulder, and if W is more than alpha W, considering that the shoulder of the human body is wider at the moment and is faced to or back to the imaging plane;
(5) a detection method for detecting the hoisting ring by the wellhead worker A and the wellhead worker B; the wellhead I-shaped nail is back to the hanging ring, so that a human body stands leftwards on the image, and the side body faces the image imaging plane; the wellhead worker B faces the hanging ring in a back-to-back mode, namely a human body stands rightwards on an image, and the side body faces an image imaging plane; the judgment rule of the wellhead tool nail back to the hanging ring is that if the confidence degrees of the nose joint point and the neck joint point are greater than a certain threshold value, the nose joint point is on the left side of the neck joint point; the judgment rule of the wellhead tool B for the hanging ring is that if the confidence degrees of the nose joint point and the neck joint point are greater than a certain threshold value, the nose joint point is positioned on the right side of the neck joint point;
(6) the dangerous operation detection that the hanging ring is not sent by eyes when the wellhead worker A lowers the head is carried out; the detection method of the wellhead tool A without raising the head comprises the following steps: if the confidence degrees of the nose joint point and the hip joint point are larger than a certain threshold value, calculating an included angle between a vector of the hip joint point pointing to the nose joint point and the horizontal right direction, and if the included angle is smaller than 80 degrees, determining that the hip joint point is stooped, so that the hip joint point is judged not to be stooped; if the confidence degrees of the nose joint point and the right ear joint point are larger than a certain threshold value, calculating the included angle between the vector of the right ear joint point pointing to the nose joint point and the horizontal right direction, and if the included angle is smaller than 5 degrees and the nose joint point is above the right ear joint point, judging that the head is not raised.
Further, in step S5, the specific implementation steps of performing gesture detection and early warning before oil pipe lifting are as follows:
(1) judging that the hoisting ring starts to lift up to perform detection: tracing the movement speed of the lifting ring in the vertical direction from the current moment forward, and judging that the lifting ring starts to move upwards from a static state when the movement speed is less than 0 for 3 continuous times and is equal to 0 for 3 continuous times;
(2) and gesture motion detection: the gesture action is that the left hand or the right hand of the wellhead I-shaped nail lifts the hand to pass the shoulder; the confidence degrees of the wellhead artificial nail at the left-hand wrist joint point and the left-hand shoulder joint point exceed a certain threshold, the position of the left-hand wrist joint point is higher than the position of the left-hand shoulder joint point, or the confidence degrees of the right-hand wrist joint point and the right-hand shoulder joint point exceed a certain threshold, and the position of the right-hand wrist joint point is higher than the position of the right-hand shoulder joint point, the wellhead artificial nail is considered to have performed gesture.
Compared with the prior art, the invention has the following beneficial effects:
according to the invention, deep learning and artificial intelligence technologies are utilized, and according to the requirements of safety specifications of oil pipe operation in an oil well, the relation between personnel and scenes, and the relation between actions and operation steps are identified by analyzing the field video of oil well operation, so that an intelligent staring and controlling model with standard personnel operation and operation specifications is gradually established. The method of the invention automatically supervises the personnel behavior of the operation site and gives an early warning in real time, thereby realizing intelligent underground operation supervision and effectively implementing supervision while greatly reducing field supervisors. The method has great significance for well doing safety management work of petroleum projects and guaranteeing the safety of life and property.
In addition to the objects, features and advantages described above, other objects, features and advantages of the present invention are also provided. The present invention will be described in further detail below with reference to the drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic flow chart of an oil well tubing lifting safety analysis method based on artificial intelligence.
Detailed Description
Embodiments of the invention will be described in detail below with reference to the drawings, but the invention can be implemented in many different ways, which are defined and covered by the claims.
Referring to fig. 1, the present embodiment provides an oil well tubing lifting safety analysis method based on artificial intelligence, which includes the following steps:
the method comprises the following steps that firstly, a network camera covering an underground petroleum operation area is erected, the position of the network camera can meet the monitoring requirement of each operation safety, the network camera is connected with a background server through a wireless communication network, and video image information of the underground petroleum operation area is sent to the background server for calculation. Meanwhile, a voice reminding terminal can be installed in the underground operation area; the background server comprises a central intelligent computing node, a cloud data and service center and terminal management software, and closed loop functions of data acquisition, intelligent analysis and process supervision are achieved.
And step two, detecting the number of the operators and identifying the identities of the operators, and if the number of the operators is not equal to the preset number, early warning. Because the operators are complete when lifting the oil pipe, the operators comprise 3 operators including one driller and two operators A and B at the well head. And identifying the number of the operators by adopting a pedestrian detection algorithm, and if the number of the operators exceeds or is less than 3, automatically carrying out early warning and informing background operators. The implementation mode of the pedestrian detection algorithm comprises a gradient histogram + SVM or Adaboost algorithm and a Yolo series or fast-RCNN target detection algorithm. The identity recognition method of the operator comprises the following steps:
(1) recording the center x coordinate of the detected rectangular frame of the hanging ring;
(2) if the x coordinate of the center of the human body target is larger than the x coordinate of the center of the rectangular frame of the hanging ring, the human body target is a well head worker B;
(3) and in the rest two human body targets, the minimum central x coordinate is the driller, and the rest other person is the wellhead worker A.
And step three, continuously detecting the speed and the running direction of the hoisting ring. And in order to ensure safety, the speed of the lifting ring is continuously detected, and if the speed of the lifting ring exceeds a preset threshold value, early warning is immediately sent out. The method comprises the following concrete steps:
(1) identifying the lifting ring by adopting a YoloV4 target detection algorithm or a template matching algorithm, and continuously tracking;
(2) acquiring the motion time of the suspension ring according to the video frame rate of the network camera, and counting the number of moving pixels of the position of the suspension ring within interval time to calculate the motion speed and the running direction of the suspension ring;
(3) and when the movement speed is greater than the set threshold value, sending an illegal event that the movement speed of the hanging ring is too high. The calculation method of the motion speed of the lifting ring comprises the following steps: in order to eliminate the influence of vibration of the lifting ring caused by wind power and other external forces, when the movement speed v of the lifting ring at the current moment is calculated, the position information of n continuous rectangular frames before the current moment of the lifting ring is adopted for calculation, and the calculation formula of the movement speed v is as follows:
in formula 1), y
iAnd y
i+1Respectively are the vertical coordinates of the centers of two continuous rectangular frames at the front and the back of the hanging ring,
is the average value of n rectangular frame heights of the hanging ring, h
i、h
i+1The height of two continuous rectangular frames at the front and the back of the hanging ring is k, and k is a proportionality coefficient and is used for adjusting the relative size of the movement speed in the vertical direction; when the moving speed v is greater than 0, the flying ring moves downwards; when the moving speed v is less than 0, the lifting ring moves upwards; when the moving speed v is equal to 0, the suspension ring is represented to be stationary.
And step four, continuously detecting dangerous operation when the oil pipe ascends and descends. When the flying ring moves within 3 meters from the ground, the action of potential safety hazards of an operator is detected. The types of hazardous operations include: standing in the range of about 50cm below the lifting ring, facing the lifting ring or squatting backwards by a wellhead worker B, facing the lifting ring or squatting backwards by a wellhead worker A, facing the lifting ring or squatting sideways by a wellhead worker A, lowering the head or bending down by a wellhead worker A or not sending the lifting ring by eyes. The method comprises the following specific steps:
(1) and continuously detecting the position of the hanging ring, wherein the detection method is shown in the step three. When the flying ring moves within 3 meters from the ground (the judgment method is that the bottom area of the flying ring is lower than the preset height value in the monitoring image, and the height value is manually calibrated in the image according to the height position of 3 meters), dangerous operation detection is carried out.
(2) And the operator stands in the range of 50cm below the hanging ring for dangerous operation detection. The method comprises the steps of detecting the position relation between the hanging ring and an operator, and if the x coordinate of the center of the operator and the x coordinate of the hanging ring are smaller than a preset threshold value and the y coordinates of the center of the operator and the hanging ring are smaller than the preset threshold value, giving out early warning.
(3) And dangerous operation detection of the first and second workers at the well mouth. And continuously recording the height of the human body detection rectangular frame of the operator, and calculating the highest value and the average value. If the height of the human body is detected to be lower than the maximum value by 20 percent and lower than the average value by 5 percent, the operator is considered to have dangerous squatting operation.
(4) And a detection method of the hoisting ring by the wellhead tool A side. The method comprises the following steps that the hanging ring on the first side of the wellhead faces or faces back to an imaging plane on an image, and the judgment rule of the hanging ring on the first side of the wellhead is that the reference width W of two shoulders when a human body faces a camera is estimated: recording the maximum distance between the left shoulder joint point and the right shoulder joint point of all human body targets until the current moment; for the wellhead I, the width W between the two shoulders is calculated through the joint points of the left shoulder and the right shoulder, if W is larger than alpha W, the shoulder of the human body is considered to be wider at the moment, and the shoulder faces to or faces away from the imaging plane, wherein alpha can be set to be 0.6.
(5) A detection method of a wellhead I and a wellhead II which face back to a hoisting ring. The wellhead I-shaped nail is back to the hanging ring, so that a human body stands leftwards on an image, and the side body faces to an image imaging plane. The wellhead worker B faces the hanging ring, namely a human body stands rightwards on the image, and the side body faces the image imaging plane. Therefore, the judgment rule of the wellhead tool nail back to the hanging ring is that if the confidence degrees of the nose joint point and the neck joint point are greater than a certain threshold value, the nose joint point is on the left side of the neck joint point; the judgment rule of the wellhead tool B for the hanging ring is that if the confidence degrees of the nose joint point and the neck joint point are larger than a certain threshold value, the nose joint point is positioned on the right side of the neck joint point.
(6) And the wellhead worker A lowers the head without sending the hanging ring by eyes for dangerous operation detection. The detection method of the wellhead tool A without raising the head comprises the following steps: if the confidence degrees of the nose joint point and the hip joint point are larger than a certain threshold value, calculating an included angle between a vector of the hip joint point pointing to the nose joint point and the horizontal right direction, and if the included angle is smaller than 80 degrees, considering that the nose joint point bends over, and the head is unlikely to be raised simultaneously when the nose joint point bends over, so that the nose joint point is judged not to be raised; if the confidence degrees of the nose joint point and the right ear joint point are larger than a certain threshold value, calculating the included angle between the vector of the right ear joint point pointing to the nose joint point and the horizontal right direction, and if the included angle is smaller than 5 degrees and the nose joint point is above the right ear joint point, judging that the head is not raised.
And fifthly, detecting the gesture before the oil pipe rises and early warning. Before the drill is started, the wellhead working armor needs to make gesture indication and then can lift the oil pipe. The method comprises the following concrete steps:
(1) and judging that the hoisting ring starts to lift for detection. In order to obtain a stable detection result of the upward movement of the lifting ring, the movement speed of the lifting ring in the vertical direction is traced back forward from the current moment, and when the movement speed is less than 0 for 3 times continuously and is equal to 0 for 3 times continuously, the lifting ring can be judged to move upward from a static state.
(2) And gesture motion detection: the gesture action is that the left hand or the right hand of the wellhead artificial nail lifts the hand to pass the shoulder; the confidence degrees of the wellhead artificial nail at the left-hand wrist joint point and the left-hand shoulder joint point exceed a certain threshold, the position of the left-hand wrist joint point is higher than the position of the left-hand shoulder joint point, or the confidence degrees of the right-hand wrist joint point and the right-hand shoulder joint point exceed a certain threshold, and the position of the right-hand wrist joint point is higher than the position of the right-hand shoulder joint point, the wellhead artificial nail is considered to have performed gesture.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.