Automatic patrol route generation method and system, program product and medium
By automatically obtaining and initializing equipment label data, determining the route generation algorithm and generating automatic patrol routes, the problems of long photography distances, few points, single orientations and cumbersome manual configuration generated by straight tower flight routes in the existing technology are solved, and the problem of long photography distances, few points, single orientations and cumbersome manual configurations are realized. More efficient and refined route generation.
Patent Information
- Application Number
- CN202411594067.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The existing straight-line tower flight route generation has problems such as long distances for taking photos, fewer locations for taking photos, single locations for taking photos, and cumbersome manual configuration of taking photos.
By obtaining device tag data, initializing and extracting data groups, determining the route generation algorithm based on the number of data groups, and using the algorithm to generate automatic patrol routes, including multiple photo distances and photo locations.
It solves the problems of long distances, fewer photo locations, single photo locations, and cumbersome manual photo locations, and more efficient and more refined linear tower flight route generation.
Smart Images

Figure CN119472669A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power transmission line detection, and in particular, relates to an automatic patrol route generation method, system, program product and medium. Background Art
[0002] The automatic and refined inspection of transmission lines by drones is an important part of the daily operation and maintenance of transmission lines. After three years of development, the operation process has become quite mature. The current operation process of automatic and refined inspection by drones is: collecting laser data of transmission lines, marking the photo points of key equipment on the laser data, generating flight routes based on the photo points, conducting safety inspections on the routes, and executing the routes on site.
[0003] The following problems exist in the existing flight route generation of straight towers: 1. The shooting distance is far and the clarity of visible light photos is not enough. The current flight operation aircraft is mainly infrared dual-light models, and there is a large focal length difference between the visible light lens and the infrared lens. For example, the current mainstream DJI M3T model has an infrared lens and a visible light lens integrated on a gimbal, with a focal length of 24mm for the visible light lens and a focal length of 40mm for the infrared lens. In order to take into account dual-light photo shooting, the distance between the drone and the equipment must be kept above 3m when planning the route. 2. There are few photo points and a single photo orientation. The current device photo points need to be manually added to the laser point cloud by the device label, and then the route system generates the front photo point of the device according to the device label. Therefore, each device of the straight tower has only 1-3 front photo points, and there are no multi-angle and multi-directional photo points for ground wire clamps, ground wire anti-vibration hammers, insulator hanging points, suspension wire clamps, and conductor anti-vibration hammers. 3. Manually set photo points, low setting accuracy and low setting efficiency. The current route system also supports manually adding photo points, but the position, angle, and distance between the photo points and the equipment are all set by the staff. It is impossible to produce precise photo waypoints for equipment in batches, with high efficiency and high quality.
[0004] In summary, the existing straight tower flight route generation has problems such as long shooting distance, few shooting points, single shooting direction, and cumbersome operation of manually configuring shooting points. Summary of the invention
[0005] The embodiments of the present invention provide a method, system, program product and medium for generating an automatic patrol route, so as to at least solve the technical problems in the existing flight route generation of a straight tower, such as long shooting distance, few shooting points, single shooting orientation and cumbersome operation of manually configuring shooting points.
[0006] According to a first aspect of an embodiment of the present invention, there is provided a method for generating an automatic patrol route, comprising: acquiring device label data, wherein the device label data includes a device name and device spatial coordinates; initializing the device label data to obtain initialization data; extracting the initialization data in units of tower units to obtain data groups; determining a route generation algorithm based on the number of data groups; and generating an automatic patrol route using the route generation algorithm.
[0007] Optionally, the device label data is initialized to obtain initialization data, including: extracting a list of straight towers from a preset inventory library, wherein the list of straight towers includes line names and tower numbers; querying the tower midpoint coordinates from a preset coordinate library based on the line name and tower number; determining the coordinate midpoint of the ground wire hanging point coordinates on the left and right sides of the tower; determining the coordinate offset based on the coordinate midpoint and the tower midpoint coordinates; determining the calibrated midpoint coordinates of the tower based on the coordinate offset; determining a reference vector based on the calibrated midpoint coordinates, wherein the reference vector is two adjacent towers; determining the tower type of the straight tower based on the reference vector and the tower label.
[0008] Optionally, a route generation algorithm is determined based on the number of data groups, including: in response to the number of data groups being two, a first preset algorithm is determined as the route generation algorithm, or, in response to the number of data groups being three, a second preset algorithm is determined as the route generation algorithm, wherein the first preset algorithm performs route planning for drum-type towers and the second preset algorithm performs navigation planning for cathead towers.
[0009] Optionally, initializing the device tag data to obtain the initialized data includes: performing data cleansing on the device tag data according to a preset cleansing strategy to obtain cleansed data; and initializing the cleansed data to obtain the initialized data.
[0010] Optionally, the route generation algorithm is a first preset algorithm, and an automatic patrol route is generated using the route generation algorithm, including: initializing basic route parameters and initializing waypoint arrays; reading data from a left label array and a right label array in sequence; determining a ground wire hanging point waypoint according to a first preset waypoint generation method; determining an insulator string waypoint according to a second preset waypoint generation method; and generating an automatic patrol route based on the ground wire hanging point waypoint and the insulator string waypoint.
[0011] Optionally, the route generation algorithm is a second preset algorithm, and an automatic patrol route is generated using the route generation algorithm, including: initializing basic route parameters and initializing waypoint arrays; reading data from the left label array and the right label array in sequence; determining ground wire hanging point waypoints according to the first preset waypoint generation method; determining the insulator string position; determining a third preset waypoint generation method according to the insulator string position; generating insulator string waypoints according to the third preset waypoint generation method; and generating an automatic patrol route based on the ground wire hanging point waypoints and the insulator string waypoints.
[0012] Optionally, the first preset waypoint generation method includes: calculating the reference direction vector of the ground line hanging point label; determining the first distance safe path waypoint, the second distance shooting waypoint, the first distance shooting waypoint, the second distance clockwise side overhead waypoint, and the second distance counterclockwise side overhead waypoint according to the fourth preset waypoint generation method; determining the ground line hanging point waypoint according to the first distance safe path waypoint, the second distance shooting waypoint, the first distance shooting waypoint, the second distance clockwise side overhead waypoint, and the second distance counterclockwise side overhead waypoint.
[0013] Optionally, the second preset waypoint generation algorithm includes: calculating the reference direction vector of the upper and lower hanging points of the insulator string and the coordinates of the midpoint of the insulator string; determining, according to the fifth preset waypoint generation method, the shooting waypoint at the first distance of the upper hanging point, the front shooting waypoint at the first distance of the lower hanging point, the front shooting waypoint at the second distance, the shock-proof hammer shooting waypoint at the second distance, the clockwise side overhead shooting waypoint at the first distance of the lower hanging point, the lower hanging point safety path waypoint, the counterclockwise side overhead shooting waypoint at the first distance of the lower hanging point, and the counterclockwise side upward shooting waypoint at the third distance of the insulator midpoint; determine the insulator string waypoint according to the shooting waypoint at the first distance of the upper hanging point, the front shooting waypoint at the first distance of the lower hanging point, the front shooting waypoint at the second distance, the shock-proof hammer shooting waypoint at the second distance, the clockwise side overhead shooting waypoint at the first distance of the lower hanging point, the lower hanging point safety path waypoint, the counterclockwise side overhead shooting waypoint at the first distance of the lower hanging point, and the counterclockwise side upward shooting waypoint at the third distance of the insulator midpoint.
[0014] Optionally, the third preset waypoint generation method includes: determining the first direction and the second direction according to the coordinates of the first preset point and the coordinates of the second preset point; determining a safe path waypoint of the upper hanging point at a third distance in the first direction, a shooting waypoint of the upper hanging point at the first distance, a frontal shooting waypoint of the lower hanging point at the first distance, a shooting waypoint of the insulator string at the second distance, and an upward shooting waypoint of the insulator string to obtain first waypoint data; determining a safe path waypoint of the upper hanging point at a third distance in the second direction, a frontal shooting waypoint of the lower hanging point at the first distance, and a shooting waypoint of the insulator string at the second distance to obtain second waypoint data; determining the insulator string waypoint according to the first waypoint data and the second waypoint data.
[0015] Optionally, the automatic patrol route generation method further includes: performing a safety test on the automatic patrol route according to a preset route safety test strategy to obtain a test result.
[0016] According to a second aspect of an embodiment of the present invention, there is also provided an automatic patrol route generation system, comprising:
[0017] An acquisition module is used to acquire device tag data, wherein the device tag data includes the device name and the device spatial coordinates; an initialization module is used to initialize the device tag data to obtain initialization data; an extraction module is used to extract the initialization data in units of tower units to obtain data groups; a determination module is used to determine a route generation algorithm based on the number of data groups; and a generation module is used to generate an automatic patrol route using the route generation algorithm.
[0018] According to a third aspect of an embodiment of the present invention, a computer program product is also provided, including a computer program, which, when executed by a processor, implements the automatic patrol route generation method as described in any embodiment of the first aspect above.
[0019] According to a fourth aspect of an embodiment of the present invention, a non-volatile storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the automatic patrol route generation method described in any embodiment of the first aspect when running on a computer or a processor.
[0020] In an embodiment of the present invention, the device tag data is obtained, wherein the device tag data includes the device name and the device spatial coordinates; the device tag data is initialized to obtain the initialization data; the initialization data is extracted in units of tower units to obtain a data group; a route generation algorithm is determined according to the number of data groups; and an automatic patrol route is generated using the route generation algorithm. The automatic patrol route obtained by the present invention through the above steps uses waypoints generated by an algorithm, including a variety of photographing distances and photographing points, thereby solving the technical problems of the existing flight route generation of straight towers, such as long photographing distances, few photographing points, single photographing orientation, and cumbersome operation of manually configuring photographing points. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0022] Figure 1 is a flow chart of a method for automatically generating patrol routes according to one embodiment of the present invention;
[0023] Figure 24 is a structural block diagram of an automatic patrol route generation system according to one embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] According to an embodiment of the present invention, an embodiment of a method for generating an automatic patrol route is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system containing at least one set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] The method embodiment can also be executed in an electronic device including a memory and a processor, a similar control device or a cloud. Taking an electronic device as an example, the electronic device may include one or more processors and a memory for storing data. Optionally, the electronic device may also include a communication device and a display device for communication functions. It can be understood by a person of ordinary skill in the art that the above structural description is only illustrative and does not limit the structure of the above electronic device. For example, the electronic device may also include more or fewer components than the above structural description, or have a configuration different from the above structural description.
[0028] The processor may include one or more processing units. For example, the processor may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field-programmable gate array (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, and the like. Among them, different processing units may be independent components or integrated into one or more processors. In some instances, the electronic device may also include one or more processors.
[0029] The memory can be used to store computer programs, for example, to store the computer program corresponding to the automatic patrol route generation method in the embodiment of the present invention. The processor implements the above-mentioned automatic patrol route generation method by running the computer program stored in the memory. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0030] The communication device is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the communication device includes a network adapter (network interface controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the communication device can be a radio frequency (radio frequency, RF) module, which is used to communicate with the Internet wirelessly. In some embodiments of the present solution, the communication device is used to connect to mobile devices such as mobile phones and tablets, and instructions can be sent to electronic devices through the mobile device.
[0031] The display device may be a touch screen type liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the electronic device. In some embodiments, the electronic device has a graphical user interface (GUI), and a user may interact with the GUI by touching a finger release and / or gestures on a touch-sensitive surface, and executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.
[0032] Figure 1 is a flow chart of a method for generating an automatic patrol route according to one embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0033] Step S101, obtaining device tag data, wherein the device tag data includes a device name and device space coordinates.
[0034] Step S102, initializing the device tag data to obtain initialization data.
[0035] Step S103, extracting the initialization data in units of towers to obtain a data group.
[0036] Step S104, determining a route generation algorithm according to the number of data groups.
[0037] Step S105, using a route generation algorithm to generate an automatic patrol route.
[0038] In an embodiment of the present invention, the device tag data is obtained, wherein the device tag data includes the device name and the device spatial coordinates; the device tag data is initialized to obtain the initialization data; the initialization data is extracted in units of tower units to obtain a data group; a route generation algorithm is determined according to the number of data groups; and an automatic patrol route is generated using the route generation algorithm. The automatic patrol route obtained by the present invention through the above steps uses waypoints generated by an algorithm, including a variety of photographing distances and photographing points, thereby solving the technical problems of the existing flight route generation of straight towers, such as long photographing distances, few photographing points, single photographing orientation, and cumbersome operation of manually configuring photographing points.
[0039] Optionally, the device label data is initialized to obtain initialization data, including: extracting a list of straight towers from a preset inventory library, wherein the list of straight towers includes line names and tower numbers; querying the tower midpoint coordinates from a preset coordinate library based on the line name and tower number; determining the coordinate midpoint of the ground wire hanging point coordinates on the left and right sides of the tower; determining the coordinate offset based on the coordinate midpoint and the tower midpoint coordinates; determining the calibrated midpoint coordinates of the tower based on the coordinate offset; determining a reference vector based on the calibrated midpoint coordinates, wherein the reference vector is two adjacent towers; determining the tower type of the straight tower based on the reference vector and the tower label.
[0040] Optionally, a route generation algorithm is determined based on the number of data groups, including: in response to the number of data groups being two, a first preset algorithm is determined as the route generation algorithm, or, in response to the number of data groups being three, a second preset algorithm is determined as the route generation algorithm, wherein the first preset algorithm performs route planning for drum-type towers and the second preset algorithm performs navigation planning for cathead towers.
[0041] Optionally, initializing the device tag data to obtain the initialized data includes: performing data cleansing on the device tag data according to a preset cleansing strategy to obtain cleansed data; and initializing the cleansed data to obtain the initialized data.
[0042] Optionally, the route generation algorithm is a first preset algorithm, and an automatic patrol route is generated using the route generation algorithm, including: initializing basic route parameters and initializing waypoint arrays; reading data from a left label array and a right label array in sequence; determining a ground wire hanging point waypoint according to a first preset waypoint generation method; determining an insulator string waypoint according to a second preset waypoint generation method; and generating an automatic patrol route based on the ground wire hanging point waypoint and the insulator string waypoint.
[0043] Optionally, the route generation algorithm is a second preset algorithm, and an automatic patrol route is generated using the route generation algorithm, including: initializing basic route parameters and initializing waypoint arrays; reading data from the left label array and the right label array in sequence; determining ground wire hanging point waypoints according to the first preset waypoint generation method; determining the insulator string position; determining a third preset waypoint generation method according to the insulator string position; generating insulator string waypoints according to the third preset waypoint generation method; and generating an automatic patrol route based on the ground wire hanging point waypoints and the insulator string waypoints.
[0044] Optionally, the first preset waypoint generation method includes: calculating the reference direction vector of the ground line hanging point label; determining the first distance safe path waypoint, the second distance shooting waypoint, the first distance shooting waypoint, the second distance clockwise side overhead waypoint, and the second distance counterclockwise side overhead waypoint according to the fourth preset waypoint generation method; determining the ground line hanging point waypoint according to the first distance safe path waypoint, the second distance shooting waypoint, the first distance shooting waypoint, the second distance clockwise side overhead waypoint, and the second distance counterclockwise side overhead waypoint.
[0045] Optionally, the second preset waypoint generation algorithm includes: calculating the reference direction vector of the upper and lower hanging points of the insulator string and the coordinates of the midpoint of the insulator string; determining, according to the fifth preset waypoint generation method, the shooting waypoint at the first distance of the upper hanging point, the front shooting waypoint at the first distance of the lower hanging point, the front shooting waypoint at the second distance, the shock-proof hammer shooting waypoint at the second distance, the clockwise side overhead shooting waypoint at the first distance of the lower hanging point, the lower hanging point safety path waypoint, the counterclockwise side overhead shooting waypoint at the first distance of the lower hanging point, and the counterclockwise side upward shooting waypoint at the third distance of the insulator midpoint; determine the insulator string waypoint according to the shooting waypoint at the first distance of the upper hanging point, the front shooting waypoint at the first distance of the lower hanging point, the front shooting waypoint at the second distance, the shock-proof hammer shooting waypoint at the second distance, the clockwise side overhead shooting waypoint at the first distance of the lower hanging point, the lower hanging point safety path waypoint, the counterclockwise side overhead shooting waypoint at the first distance of the lower hanging point, and the counterclockwise side upward shooting waypoint at the third distance of the insulator midpoint.
[0046] Optionally, the third preset waypoint generation method includes: determining the first direction and the second direction according to the coordinates of the first preset point and the coordinates of the second preset point; determining a safe path waypoint of the upper hanging point at a third distance in the first direction, a shooting waypoint of the upper hanging point at the first distance, a frontal shooting waypoint of the lower hanging point at the first distance, a shooting waypoint of the insulator string at the second distance, and an upward shooting waypoint of the insulator string to obtain first waypoint data; determining a safe path waypoint of the upper hanging point at a third distance in the second direction, a frontal shooting waypoint of the lower hanging point at the first distance, and a shooting waypoint of the insulator string at the second distance to obtain second waypoint data; determining the insulator string waypoint according to the first waypoint data and the second waypoint data.
[0047] Optionally, the automatic patrol route generation method further includes: performing a safety test on the automatic patrol route according to a preset route safety test strategy to obtain a test result.
[0048] Specifically, the above steps of this method are performed as follows:
[0049] The first step is to initialize the device label data. The device label here refers to marking the device point on the laser point cloud data when using laser data to plan the route. A label contains the device name and UTM space coordinates, such as the label of the ground wire anchor point ['GroundwireAnchor', 796118.5861053467, 2355604.129760742, 52.117000579833984]. Data initialization mainly includes the following steps:
[0050] 1. Extract the list of straight line towers from the transmission line tower inventory database, which includes the line name and tower number.
[0051] 2. Find the coordinates of the tower center point from the coordinate library based on the line name and tower number.
[0052] 3. According to the line name and tower number, extract the coordinates of the left and right ground wire hanging points of the current tower unit, and calculate the midpoint coordinates of the two hanging points.
[0053] 4. Calculate the coordinate offset between the library coordinate and the midpoint of the ground wire hanging point. If the offset is greater than 5 meters, the library coordinate is considered invalid and the midpoint coordinate of the 2 ground wire hanging points is used to replace the library coordinate. The plane coordinate distance calculation formula is as follows (no need to consider the z-axis coordinate, the space coordinate can be used for xy plane calculation): d = √[(x2-x1)2+(y2-y1)2].
[0054] 5. Extract the center coordinate P1 of the adjacent small side tower unit and the center coordinate P2 of the tower unit to form a reference vector P12: P12 = P2-P1.
[0055] 6. Determine the relative position of the label and the reference vector P12 one by one according to the extraction of the tower. When calculating, there is no need to consider the z-axis coordinate, and the coordinate can be projected onto the xy plane for calculation. There are three relative positions: left, middle, and right. The determination method is:
[0056] Suppose the label coordinate point is P3, and it forms a vector with the coordinate of P1 as P13=P3-P1. Find the cross product of vector P13 and P12 as Result=P13xP12.
[0057] If the result cross product is positive, P3 is on the left side of the vector, if the result is negative, P3 is on the right side of the vector. Next, calculate the vertical distance from point P3 to vector P12. The coordinates of P1 are (x1, y1), the coordinates of point P2 are (x2, y2), and the coordinates of point P3 are (x3, y3). Vector P12 = (x2-x1, y2-y1), P13 = (x3-x1, y3-y1), and the distance from P3 to P12 is:
[0058] d=|(y2-y1)*x3-(x2-x1)*y3+x2*y1-y2*x1| / sqrt((x2-x1)^2+(y2-y1)^2);
[0059] If d>1 meter, the result of the cross product is used as the orientation. If d<1 meter, the result is replaced by middle. Based on the center vector of the tower, if the distance between the label point and the center vector is less than 1 meter (the width of the tower head of a 110kV line is 3 meters), the label can be considered to be located at the center of the tower. Otherwise, the label is considered to be located on both sides. The calculation results are stored in the database.
[0060] 7. The tower type can be determined by the type of label orientation. If the tower label has only two types, right and left, the tower type is a drum-shaped tower. If the tower label has three types, right, left, and middle, the tower type is a cathead tower.
[0061] The second step is to clean and organize the label data.
[0062] Label data cleaning and sorting: The current routes are all manually generated. During the production process, the setting of the photo points is not standardized, especially on the labels of the insulator strings, there are redundant or missing hanging point labels. Therefore, when generating routes, the label data of the insulator string needs to be cleaned and sorted, redundant data needs to be deleted, and abnormal data needs to be excluded to ensure the normal operation of the route generation algorithm.
[0063] 1. First, read the label coordinates of the label named 'IshapedInsulator' in the tower unit and group them by label orientation, and arrange them in descending order according to the z-axis value within the group.
[0064] 2. Set the scale of coordinate cleaning according to the voltage level of the tower unit. The cleaning scale of 110kV is 1 meter, the cleaning scale of 220kV is 1.7 meters, and the cleaning scale of 500kV is 3.5 meters. The cleaning scale is set according to the insulator string length * 0.7 of each voltage level.
[0065] 3. Group by direction and clean and sort the data group by group. The direction grouping of the label is the grouping calculated in step 2, which is divided into three groups: right, left, and middle.
[0066] 4. Perform a cyclic judgment of the label within the group. First, set the coordinates of the first label in the group to the upper hanging point coordinates of the insulator string. Then read the coordinates of the next label, calculate the vertical distance between the current label coordinates and the upper hanging point coordinates. If the vertical distance is less than the cleaning scale value, the current label is a redundant label and should be deleted. After deletion, read the next label to continue the judgment. If the vertical distance is greater than the cleaning scale value, set the current label to the lower hanging point coordinates of the insulator, and then read the next label. Then judge whether the vertical distance between the current label coordinates and the lower hanging point coordinates is greater than the cleaning scale value. If less than, set the current coordinates to the new lower hanging point coordinates, delete the old lower hanging point coordinates, and continue to judge. If greater than, it means that the upper and lower hanging point coordinates of the insulator string have been successfully matched. Repeat the above judgment process in the group until the current group judgment is completed.
[0067] 5. Loop through all tag groups until all tag data is cleaned and sorted.
[0068] The third step is to generate routes.
[0069] 1. Extract label data based on tower units to form data groups, and arrange the data in the group in descending order according to the value of the z coordinate. The format is as follows [left_or_right, coor, devicetype], where left_or_right = 'left',
[0070] coor=[796118.5861053467, 2355604.129760742, 52.117000579833984], devicetype='GroundwireAnchor'.
[0071] 2. Extract the coordinates of the center point of the adjacent small side tower unit as P1, and extract the coordinates of the tower unit as P2.
[0072] 3. Determine the number of groupings of labels. If the labels are divided into two groups, the drum-type tower route generation algorithm is called. If the labels are divided into three groups, the cathead tower route generation algorithm is called. The parameters that need to be passed when calling the drum-type tower route generation algorithm include "voltage level, line name, tower name, route storage path, left label array, right label array, P1, P2" (the above parameters are common parameters for tower unit route generation). When calling the cathead tower route generation algorithm, the parameters "voltage level, line name, tower name, "", left label array, right label array, middle label array, P1, P2" need to be passed.
[0073] (I) Basic algorithms required for route calculation:
[0074] 1. The method for calculating the reference orientation vector of the tag is count_center_point(P1, P2, P3). Given the coordinates of the midpoints of the two tower units, P1[x1, y1] and P2[x2, y2], the tag coordinate point P3[x3, y3] uses the midpoint coordinates to write the equation of the straight line between the two points Line_s (ignoring z, only calculating in the xy plane).
[0075] Slope k = (y2-y1) / (x2-x1);
[0076] The equation of the straight line from P1 to P2 is y-y1=k*(x-x1);
[0077] The equation y-y3=-1 / k*(x-x3) passing through P3 and perpendicular to the straight line Line_s;
[0078] Solve the two equations together to get P4[x4, y4];
[0079] Calculate the reference orientation vector P43 of the tag = P3-P4;
[0080] 2. Waypoint coordinate calculation method count_point_d(v, d, point1). Given the plane vector v, the starting point coordinate point1, and the distance d, find the coordinate point point2 on the vector v with a distance d from point1 starting from point1. The calculation process is as follows:
[0081] Find the length of vector v: v_length = √(v[0]^2+v[1]^2);
[0082] Calculate the displacement in the x direction: scaled_vector_x = (d / v_length)*v[0];
[0083] Calculate the displacement in the y direction: scaled_vector_y = (d / v_length)*v[1];
[0084] x_1=point1[0]+scaled_vector_x;
[0085] y_1=point1[1]+scaled_vector_y;
[0086] point2 = [x_1, y_1];
[0087] 3. The vector rotation method rotate_vector_2d(v, theta). It is known that the vector v and the rotation angle theta satisfy the following formula:
[0088] x = v[0];
[0089] y=v[1];
[0090] x_rotated=x*cos(theta_rad)-y*sin(theta_rad);
[0091] y_rotated=x*sin(theta_rad)+y*cos(theta_rad);
[0092] The rotated vector v_theta = [x_rotated, y_rotated];
[0093] 4. The method for calculating the heading angle of the drone is count_aircraftHeading(pt). Given the vector pt, the heading angle of the drone is calculated. The heading angle of the drone is the angle between the vector pt and the true north direction within positive and negative 180°. The true north direction vector is north = [0, 1];
[0094] Calculate the modulus of the PT vector dis_pt = √(pt[0]^2+pt[1]^2);
[0095] Find the dot product of PT vector and north vector dot = PT·north;
[0096] Calculate the cosine value of the angle between the vectors: cosine = dot_product / (dis_pt);
[0097] Calculate the radian value angle_rad = acos(cosine);
[0098] Then convert the radian into an angle: angle_deg = angle_rad × (180 / π);
[0099] 5. Determine the quadrant where the PT vector is located. The heading angle between the first and fourth quadrants is angle_deg;
[0100] The heading angles of the second and third quadrants are -angle_deg;
[0101] 6. Waypoint calculation method count_hd(P3, P5, a, type_hd, follow_or_fix, d, bz_name). Waypoint calculation requires passing parameters: device tag coordinates P3[x3, y3, z3], waypoint coordinates P5[x5, y5], gimbal angle a, distance d, waypoint type_hd, heading mode follow_or_fix, device name bz_name.
[0102] Calculate the heading vector P53 = P3 - P5 (the vector of the waypoint pointing to the device, taking x3 and y3 of P3 for calculation);
[0103] Call the heading angle calculation method: heading angle β = count_aircraftHeading (P43);
[0104] Convert the gimbal angle a into radians a_rad=a×π / 180;
[0105] Calculate the waypoint height according to the gimbal angle, the angle is regular: h = z3 + tan (a_rad) × d;
[0106] If the angle is negative, then: h = z3-tan(a_rad)×d;
[0107] The final calculated result is:
[0108] hd_point = [x5, y5, h];
[0109] hd_action=[-a, β, hd_type];
[0110] Method return value [hd_point, hd_action, follow_or_fix, bz_name];
[0111] hd_type has two values, one is 'waypoint' which represents a waypoint;
[0112] Second, 'takephoto' represents the photo taking point.
[0113] follow_or_fix has two values, one is 'followway', which means the drone will head towards the next point after the current waypoint is completed. The other is 'fixed', which means the heading is locked to maintain the current direction.
[0114] 7. Calculation method of waypoints for anti-vibration hammer shooting:
[0115] count_fzc_hd(P3, P4, a, γ, d, type_hd, follow_or_fix, bz_name). Waypoint calculation requires passing parameters: device tag coordinates P3[x3, y3, z3], waypoint coordinates P4[x4, y4], gimbal angle a, body rotation angle γ, distance d, waypoint type_hd, heading mode follow_or_fix, device name bz_name.
[0116] Calculate the heading vector P43 = P3-P4 (the vector of the waypoint pointing to the device, taking x3 and y3 of P3 for calculation);
[0117] Call the heading angle calculation method: heading angle β = count_aircraftHeading (P43);
[0118] Convert the gimbal angle a into radians a_rad=a×π / 180;
[0119] Calculate the waypoint height according to the gimbal angle: h = z3 + tan (a_rad) × d;
[0120] Calculate the heading angle of left and right rotation based on β:
[0121] l_angle=β+γ;
[0122] r_angle = β - γ;
[0123] l_angle may be greater than 180°. If it is greater than 180°, it enters the third quadrant l_angle=l_angle-360;
[0124] r_angle may be less than -180 degrees. If it is less than -180 degrees, it enters the second quadrant r_angle = r_angle + 360;
[0125] The final calculated result is:
[0126] hd_point = [x4, y4, h];
[0127] hd_action = [[-a, β, hd_type], [-a, l_angle, hd_type], [-a, r_angle, hd_type]], which includes 3 photo actions: front photo, left turn γ degrees to take photo, right turn γ degrees to take photo.
[0128] Method return value [hd_point, hd_action, follow_or_fix, bz_name];
[0129] The meanings of other values are consistent with count_hd;
[0130] (II) Drum tower route generation algorithm:
[0131] 1. Initialize the basic parameters for route generation. The parameters that need to be initialized are close distance, medium distance, and long distance (the three values represent the horizontal distance that needs to be maintained between the drone and the shooting target), close-range gimbal angle, long-range gimbal angle (representing the angle that the gimbal needs to be adjusted when the drone shoots the target), body rotation angle for anti-vibration hammer shooting, side shooting angle (the angle that the drone needs to rotate for insulated infrared temperature measurement and wire clamp shooting), gimbal angle for side shooting with wire clamp, gimbal angle for upward shooting, waypoint array, and temporary waypoint data group.
[0132] 2. The ground wire hanging point shooting waypoint generation algorithm is called for the first group of data in the orientation group data. The orientation group data is arranged in descending order according to the z-axis coordinate data, and the ground wire is located at the highest point of the tower, so the first data in each orientation group data is the ground wire hanging point P3.
[0133] 2.1 The ground line waypoint generation algorithm is as follows:
[0134] 2.1.1 First, call the tag's reference orientation vector calculation method count_center_point(P1, P2, P3) to calculate the ground reference orientation vector P43.
[0135] 2.1.2 Call the waypoint coordinate calculation method to calculate the long-range safe path waypoint coordinates P5 = count_point_d (P43, long distance, P3), call count_hd (P3, P5, long-range gimbal angle, 'waypoint', 'fixed', long distance, 'Ground') to calculate the safe waypoint, and add the safe waypoint to the temporary waypoint group.
[0136] 2.1.3 Call the waypoint coordinate calculation method to calculate the coordinates of the ground line hanging point for taking photos from the front. P5 = count_point_d (P43, close distance, P3), call count_hd (P3, P5, close distance gimbal angle, 'takephoto', 'fixed', close distance, 'Ground') to calculate the waypoint, and set the temporary waypoint group for taking photos from the ground line hanging point.
[0137] 2.1.4 Add the safe path waypoints calculated in 2.1.2 to the temporary waypoint group.
[0138] 2.1.5 Call the waypoint coordinate calculation method to calculate the ground line anti-vibration hammer photography coordinates P5 = count_point_d (P43, middle distance, P3), and call the anti-vibration hammer waypoint calculation method.
[0139] count_fzc_hd(P3, P5, long-range gimbal angle, anti-vibration hammer shooting body rotation angle, medium distance, 'takephoto', 'fixed', 'Ground') calculates the anti-vibration hammer shooting waypoints and adds the waypoints to the temporary waypoint group.
[0140] 2.1.6 Call the vector rotation method to rotate P43 clockwise.
[0141] P43_theta_s = rotate_vector_2d(P43, - side shooting angle), calculate the clockwise close-up side shooting waypoint coordinates of the ground wire hanging point P5 = count_point_d(P43_theta_s, close distance, P3), call the waypoint calculation method count_hd(P3, P5, gimbal angle of the side shooting with the wire clamp, 'takephoto', 'fixed', close distance, 'Ground') to calculate the waypoint, and add the waypoint to the temporary waypoint group.
[0142] 2.1.7 Add the safe path waypoints calculated in 2.1.2 to the temporary waypoint group.
[0143] 2.1.8 Call the vector rotation method to rotate P43 counterclockwise.
[0144] P43_theta_n = rotate_vector_2d (P43, side shooting angle), calculate the counterclockwise close-up side shooting waypoint coordinates of the ground wire hanging point P5 = count_point_d (P43_theta_n, close distance, P3), call the waypoint calculation method count_hd (P3, P5, gimbal angle of side shooting with wire clamp, 'takephoto', 'fixed', close distance, 'Ground') to calculate the waypoint, and add the waypoint to the temporary waypoint group.
[0145] 2.1.9 Add the safe waypoints calculated in 2.1.2 to the temporary waypoint group.
[0146] After the above 9 steps, the generation of ground wire hanging point photography waypoints is completed. The waypoints include 3 safe path points, 1 close-range front photography point, 2 close-range side photography points, and 1 shock-proof hammer photography point.
[0147] After the waypoints are generated, the waypoints in the temporary waypoint array are added to the formal waypoint array, and the temporary waypoint array is cleared.
[0148] 3. Call the insulator string photo point generation algorithm, the algorithm is as follows: When calling the insulator string photo point generation algorithm, it is necessary to read the upper hanging point label coordinates P3 and the lower hanging point label coordinates P5 of the insulator string in groups of 2.
[0149] 3.1 First, call the label's reference azimuth vector calculation method count_center_point(P1, P2, P3) to calculate the upper hanging point reference azimuth vector P43. count_center_point(P1, P2, P5) to calculate the lower hanging point reference azimuth vector P45. The insulator string midpoint coordinate P6 = (P3 + P5) / 2, and the midpoint coordinate reference vector, count_center_point(P1, P2, P6), P46.
[0150] 3.2 Call the waypoint coordinate calculation method to calculate the long-distance safe path waypoint coordinates of the upper hanging point P7 = count_point_d (P43, long distance, P3), call count_hd (P3, P7, long-distance gimbal angle, 'waypoint', 'fixed', long distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0151] 3.3 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the upper hanging point close-range photography P7 = count_point_d (P43, close distance, P5), call count_hd (P3, P7, close-range gimbal angle, 'takephoto', 'fixed', close distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0152] 3.4 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the lower hanging point close-up overlooking photo shooting P7 = count_point_d (P45, close distance, P5), call count_hd (P5, P7, gimbal angle of the side shooting of the wire clamp, 'takephoto', 'fixed', close distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0153] 3.5 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the front photo of the midpoint of the insulation string P7 = count_point_d (P46, middle distance, P6), call count_hd (P6, P7, gimbal angle of the side photo of the wire clamp, 'takephoto', 'fixed', middle distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0154] 3.6 Call the waypoint coordinate calculation method to calculate the ground line anti-vibration hammer photography coordinates P7 = count_point_d (P45, middle distance, P5), and call the anti-vibration hammer waypoint calculation method.
[0155] count_fzc_hd(P5, P7, long-range gimbal angle, anti-vibration hammer shooting body rotation angle, medium distance, 'takephoto', 'fixed"Insulator') calculates the anti-vibration hammer shooting waypoint and adds the waypoint to the temporary waypoint group.
[0156] 3.7 Call the vector rotation method to rotate P45 clockwise.
[0157] P45_theta_s = rotate_vector_2d(P45, - side shooting angle), calculate the clockwise close-up side shooting waypoint coordinates of the ground wire hanging point P7 = count_point_d(P45_theta_s, close distance, P5), call the waypoint calculation method count_hd(P5, P7, gimbal angle of side shooting with wire clamp, 'takephoto', 'fixed', close distance, 'Insulator') to calculate the waypoint, and add the waypoint to the temporary waypoint group.
[0158] 3.8 Call the waypoint coordinate calculation method to calculate the long-distance safe path waypoint coordinates of the lower hanging point P7 = count_point_d (P45, long distance, P5), call count_hd (P5, P7, long-distance gimbal angle, 'waypoint', 'fixed', long distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0159] 3.9 Call the vector rotation method, rotate P45 counterclockwise, P45_theta_n = rotate_vector_2d (P45, side shooting angle), calculate the counterclockwise close-up side shooting waypoint coordinates of the ground wire hanging point P7 = count_point_d (P45_theta_n, close distance, P5), call the waypoint calculation method count_hd (P5, P7, gimbal angle of the side shooting with the wire clamp, 'takephoto', 'fixed', close distance, 'Insulator') to calculate the waypoint, and add the waypoint to the temporary waypoint group.
[0160] 3.10 Call the vector rotation method to rotate P46 counterclockwise.
[0161] P46_theta_n=rotate_vector_2d(P46, side-viewing angle), calculate the coordinates of the long-distance upward shooting waypoint of the insulation string P7=count_point_d(P46_theta_n, long distance, P6), call the waypoint calculation method count_hd(P6, P7, - upward shooting gimbal angle, 'takephoto', 'fixed', long distance, 'Insulator') to calculate the waypoint, and add the waypoint to the temporary waypoint group.
[0162] 3.11 If the current insulation is the last string in the group, add a pole tower base photo point. Call the waypoint coordinate calculation method to calculate the coordinates of the mid-distance overhead photography waypoint of the lower hanging point P7 = count_point_d (P45, mid-distance, P5), directly set the gimbal angle to 65 degrees, call count_hd (P5, P7, 65, 'takephoto', 'fixed', mid-distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0163] After the above 11 steps, the generation of ground wire hanging point photography waypoints is completed. The waypoints include 2 safe path points, 2 close-range front photography points, 1 medium-range photography point, 2 close-range side photography points, 1 side upward photography point, 1 shock-absorbing hammer photography point and 1 pole tower foundation photography point.
[0164] After the waypoints are generated, the waypoints in the temporary waypoint array are added to the formal waypoint array, and the temporary waypoint array is cleared.
[0165] (III) Cathead Tower Route Generation Algorithm:
[0166] The parameters required for cathead route generation are the same as those for drum towers, and the overall generation process is similar to that of drum towers. The only difference is that it adds a judgment on whether the current insulator string is an intermediate string insulator. If it is not an intermediate string, the insulator string generation algorithm in the drum tower route generation algorithm is called. If it is an intermediate string, the intermediate string insulator string waypoint generation algorithm is called. The upper hanging point label coordinates of the insulator string are P3, and the lower hanging point label coordinates are P5. As follows:
[0167] 1.1 Reference vector P12=P2-P1, obtained by rotating the reference vector P12 clockwise.
[0168] P12_s=rotate_vector_2d(P12, - side angle), obtained by rotating P12 counterclockwise;
[0169] P12_n=rotate_vector_2d(P12, 180-side shot angle).
[0170] The coordinate of the midpoint of the insulator string is P6 = (P3 + P5) / 2.
[0171] 1.2 Call the waypoint coordinate calculation method to calculate the long-range safe path waypoint coordinates of the upper hanging point in the direction of P12_s P7 = count_point_d (P12_s, long distance, P3), add the height of P3 to get P3_h = [x3, y3, z3 + 8], call count_hd (P3_h, P7, long-range gimbal angle, 'waypoint', 'fixed', long distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0172] 1.3 Call the waypoint coordinate calculation method to calculate the coordinates of the upper hanging point close-range photography waypoint P7 = count_point_d (P12_s, close distance, P3), call count_hd (P3, P7, close-range gimbal angle, 'takephoto', 'fixed', close distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0173] 1.4 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the close-up overhead photography at the hanging point in the direction of P12_s, P7 = count_point_d (P12_s, close distance, P5), call count_hd (P5, P7, gimbal angle of the side shot with the wire clip, 'takephoto', 'fixed', close distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0174] 1.5 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the front photo of the midpoint of the insulation string in the P12_s direction P7 = count_point_d (P12_s, middle distance, P6), call count_hd (P6, P7, gimbal angle of the side shot of the wire clamp, 'takephoto', 'fixed', middle distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0175] 1.6 Calculate the coordinates of the long-distance upward shooting waypoint of the insulation string in the direction of P12_s, P7 = count_point_d (P12_s, long distance, P6), call the waypoint calculation method count_hd (P6, P7, - upward shooting gimbal angle, 'takephoto', 'fixed', long distance, 'Insulator') to calculate the waypoint, and add the waypoint to the temporary waypoint group.
[0176] 1.7 Add the long-range safety waypoint of the hanging point in the P12_s direction calculated in 1.2.
[0177] 1.8 Call the waypoint coordinate calculation method to calculate the long-range safe path waypoint coordinates of the upper hanging point in the direction of P12_s P7 = count_point_d (P12_n, long distance, P3), add the height of P3 to get P3_h = [x3, y3, z3+8], call count_hd (P3_h, P7, long-range gimbal angle, 'waypoint', 'fixed', long distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0178] 1.9 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the close-up overhead photography at the hanging point in the direction of P12_n (P7 = count_point_d (P12_n, close distance, P5), call count_hd (P5, P7, gimbal angle of the side shot with the wire clip, 'takephoto', 'fixed', close distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0179] 2.0 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the front photo of the midpoint of the insulation string in the P12_n direction P7 = count_point_d (P12_n, middle distance, P6), call count_hd (P6, P7, gimbal angle of the side shot of the wire clamp, 'takephoto', 'fixed', middle distance, 'Insulator'), and add the waypoint to the temporary waypoint array.
[0180] 2.1 Add the long-distance safety waypoint of the hanging point in the P12_n direction calculated in 1.7.
[0181] Generate 4 safe path points, 1 photo point on the upper hanging point of the insulator string, 2 photo points on the lower hanging point, and 2 photo points on the insulation string body. The 4 safe path points can ensure that the drone can safely pass through both sides of the middle phase without hitting the tower head.
[0182] After the waypoints are generated, the waypoints in the temporary waypoint array are added to the formal waypoint array, and the temporary waypoint array is cleared.
[0183] (iv) After the waypoints are generated, the route generation algorithm is called to generate the KMZ route file in accordance with DJI's WPML specification;
[0184] At the same time, the waypoints are saved as ply files and the route segments are saved as shp files for loading and viewing. The generated related files are all stored in the location of the "route storage path" variable.
[0185] The fourth step is route safety inspection. The safety inspection is carried out on a route basis. One route corresponds to one laser point cloud file. The safety inspection process is as follows:
[0186] 1. Set the path of the route folder airline_path and the path of the laser point cloud file las_path.
[0187] 2. Search for the ply file in the route folder and read the waypoint coordinates from the ply file.
[0188] 3. Read the size information of the laser point cloud file.
[0189] 4. Determine whether the file is larger than 3GB. If it is less than 3GB, read it in full. If it is larger than 3GB, read it in segments. The laser point cloud data of some lines is as high as 30GB. Reading it in full will cause a computer memory overflow error. Therefore, the size of a single file read must be configured according to the computer memory to prevent memory overflow from causing detection interruption.
[0190] 5. Use the read waypoint coordinates as the center to create a 80m*80m square, and filter the laser points whose x and y coordinates fall into the square. If the number of filtered points is greater than 1000, it is determined that the corresponding tower unit is found. If it is less than 1000, it is considered that the tower unit is not found. If the iterative reading of the point cloud is completed and the point cloud is not found, the detection process is terminated directly.
[0191] 6. If the point cloud of the tower unit is found, the safety distance detection is started. The safety distance threshold is d, the safety distance abnormal array, and the detection process is as follows:
[0192] 6.1 Read the waypoint coordinates in ply sequentially.
[0193] 6.2 Set a cube with a side length of d*4 with the waypoint as the center.
[0194] 6.3 Filter the point set in the tower unit point cloud that falls into the cube.
[0195] 6.4 Loop to calculate the distance between the points in the point set and the waypoint, and save the minimum distance. If the minimum distance is less than d, add the waypoint and the minimum distance point to the safety distance exception array.
[0196] The above process is executed repeatedly until the detection is completed.
[0197] 6.5 After the inspection is completed, enter the inspection results in the route folder. The results include the waypoint number, waypoint coordinates, and minimum distance point coordinates. Enter the line segment shp file with insufficient safety distance for visual viewing. Save the filtered tower unit laser data for auxiliary viewing.
[0198] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0199] In this embodiment, an automatic patrol route generation system is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" is a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0200] Figure 2 FIG. 2 is a block diagram of an automatic patrol route generation system 200 according to one embodiment of the present invention. Figure 2 As shown, an automatic patrol route generation system 200 is used as an example, including: an acquisition module 201, used to acquire equipment label data, wherein the equipment label data includes equipment name and equipment space coordinates; an initialization module 202, used to initialize the equipment label data to obtain initialization data; an extraction module 203, used to extract the initialization data in units of tower units to obtain data groups; a determination module 204, used to determine a route generation algorithm according to the number of data groups; a generation module 205, used to generate an automatic patrol route using the route generation algorithm.
[0201] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the automatic patrol route generation method as described in any of the above embodiments.
[0202] Optionally, in this embodiment, the above computer program implements the following steps when executed by a processor:
[0203] Step S101, obtaining device tag data, wherein the device tag data includes a device name and device space coordinates.
[0204] Step S102, initializing the device tag data to obtain initialization data.
[0205] Step S103, extracting the initialization data in units of towers to obtain a data group.
[0206] Step S104, determining a route generation algorithm according to the number of data groups.
[0207] Step S105, using a route generation algorithm to generate an automatic patrol route.
[0208] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0209] An embodiment of the present invention further provides a non-volatile storage medium storing a computer program, wherein the computer program is configured to execute the automatic patrol route generation method described in any of the above embodiments when running on a computer or a processor.
[0210] Optionally, in this embodiment, the above-mentioned computer program may be configured to store a computer program for performing the following steps:
[0211] Step S101, obtaining device tag data, wherein the device tag data includes a device name and device space coordinates.
[0212] Step S102, initializing the device tag data to obtain initialization data.
[0213] Step S103, extracting the initialization data in units of towers to obtain a data group.
[0214] Step S104, determining a route generation algorithm according to the number of data groups.
[0215] Step S105, using a route generation algorithm to generate an automatic patrol route.
[0216] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0217] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0218] In some embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the modules can be a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.
[0219] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0220] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.
[0221] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0222] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for generating an automatic patrol route, characterized in that: include: Acquire device tag data, wherein the device tag data includes a device name and device space coordinates; Initializing the device tag data to obtain initialization data; Extracting the initialization data in units of towers, grouping and aggregating the data according to the label orientation to obtain a data group; Determining a route generation algorithm according to the number of the data groups; Use the route generation algorithm to generate automatic patrol routes.
2. The method for generating an automatic patrol route according to claim 1, characterized in that: Initializing the device tag data to obtain initialization data includes: Extracting a straight line tower list from a preset ledger library, wherein the straight line tower list includes line names and tower numbers; According to the line name and the tower number, query the midpoint coordinates of the tower from a preset coordinate library; Determine the coordinate midpoint of the ground wire hanging points on the left and right sides of the tower; Determine the coordinate offset according to the coordinate midpoint and the pole tower midpoint coordinate; Determining the calibration midpoint coordinates of the tower according to the coordinate offset; Determine a reference vector according to the calibration midpoint coordinates, wherein the reference vector is two adjacent towers; According to the reference vector and the tower label, the straight tower type is determined.
3. The method for generating an automatic patrol route according to claim 1, characterized in that: Determining a route generation algorithm according to the number of the data groups includes: In response to the number of the data groups being two, determining a first preset algorithm as the route generation algorithm, or, In response to the number of the data groups being three, a second preset algorithm is determined as the route generation algorithm, wherein the first preset algorithm performs route planning for a drum-type tower, and the second preset algorithm performs navigation planning for a cathead tower.
4. The method for generating an automatic patrol route according to claim 1, characterized in that: Initializing the device tag data to obtain initialization data includes: Cleaning the device tag data according to a preset cleaning strategy to obtain cleaned data; Initializing the cleaned data to obtain the initialized data.
5. The method for generating an automatic patrol route according to claim 3, characterized in that: The route generation algorithm is a first preset algorithm. The route generation algorithm is used to generate an automatic patrol route, including: Initialize basic route parameters and waypoint array; Read the data of the left label array and the right label array in sequence; Determine the ground line hanging point waypoint according to the first preset waypoint generation method; Determine the insulator string waypoint according to the second preset waypoint generation method; The automatic patrol route is generated according to the ground wire hanging point waypoint and the insulator string waypoint.
6. The method for generating an automatic patrol route according to claim 3, characterized in that: The route generation algorithm is a second preset algorithm. The route generation algorithm is used to generate an automatic patrol route, including: Initialize basic route parameters and waypoint array; Read the data of the left label array and the right label array in sequence; Determine the ground line hanging point waypoint according to the first preset waypoint generation method; Determine the position of insulator strings; Determining a third preset waypoint generation method according to the insulator string position; Generate an insulator string waypoint according to the third preset waypoint generation method; The automatic patrol route is generated according to the ground wire hanging point waypoint and the insulator string waypoint.
7. The method for generating an automatic patrol route according to claim 5 or 6, characterized in that: The first preset waypoint generation method comprises: Calculate the reference direction vector of the ground wire hanging point label; According to the fourth preset waypoint generation method, determine the first distance safe path waypoint, the second distance shooting waypoint, the first distance shooting waypoint, the second distance clockwise side overhead shooting waypoint, and the second distance counterclockwise side overhead shooting waypoint; The ground line hanging point waypoint is determined according to the first distance safety path waypoint, the second distance shooting waypoint, the first distance shooting waypoint, the second distance clockwise side overhead shooting waypoint, and the second distance counterclockwise side overhead shooting waypoint.
8. The method for generating an automatic patrol route according to claim 5, characterized in that: The second preset waypoint generation algorithm includes: Calculate the reference direction vector of the upper and lower hanging points of the insulator string and the coordinates of the midpoint of the insulator string; According to the fifth preset waypoint generation method, determine the shooting waypoint at the first distance of the upper hanging point, the front shooting waypoint at the first distance of the lower hanging point, the front shooting waypoint at the second distance, the shock-proof hammer shooting waypoint at the second distance, the clockwise side shooting waypoint at the first distance of the lower hanging point, the lower hanging point safety path waypoint, the counterclockwise side shooting waypoint at the first distance of the lower hanging point, and the counterclockwise side shooting waypoint at the third distance of the insulator midpoint; The insulator string waypoint is determined according to the waypoint shot at the first distance of the upper hanging point, the waypoint shot from the front at the first distance of the lower hanging point, the waypoint shot from the front at the second distance, the waypoint shot from the shock-proof hammer at the second distance, the waypoint shot from the clockwise side at the first distance of the lower hanging point, the waypoint of the lower hanging point safety path, the waypoint shot from the counterclockwise side at the first distance of the lower hanging point, and the waypoint shot from the counterclockwise side at the third distance of the insulator midpoint.
9. The method for generating an automatic patrol route according to claim 6, characterized in that: The third preset waypoint generation method comprises: Determine a first direction and a second direction according to the first preset point coordinates and the second preset point coordinates; Determine the safe path waypoint of the upper hanging point at the third distance in the first direction, the shooting waypoint of the upper hanging point at the first distance, the overlooking front shooting waypoint of the lower hanging point at the first distance, the shooting waypoint of the insulator string at the second distance, and the upward shooting waypoint of the insulator string, and obtain the first waypoint data; Determine a safe path waypoint of the upper hanging point at a third distance in the second direction, a frontal shooting waypoint of the lower hanging point at the first distance, and a shooting waypoint of the insulator string at the second distance, and obtain second waypoint data; The insulator string waypoint is determined according to the first waypoint data and the second waypoint data.
10. The method for generating an automatic patrol route according to claim 1, characterized in that: Also includes: According to the preset route safety detection strategy, the automatic patrol route is subjected to safety detection to obtain the detection result.
11. An automatic patrol route generation system, characterized in that: include: An acquisition module, used to acquire device tag data, wherein the device tag data includes a device name and a device space coordinate; An initialization module, used to initialize the device tag data to obtain initialization data; An extraction module, used for extracting the initialization data in units of towers to obtain a data group; A determination module, used for determining a route generation algorithm according to the number of the data groups; The generation module is used to generate an automatic patrol route using a route generation algorithm.
12. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the steps of the automatic patrol route generation method according to any one of claims 1 to 10.
13. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the computer program is configured to execute the automatic patrol route generation method described in any one of claims 1 to 10 when running on a computer or a processor.
Citation Information
Patent Citations
Method and device for generating automatic inspection route of unmanned aerial vehicle
CN109358644A
Overhead power line unmanned aerial vehicle inspection route generation method and device and n unmanned aerial vehicle.
CN112859905A
Tower inspection route design method
CN113485424A
Automatic planning method for tower pole inspection route of unmanned aerial vehicle
CN115629617A
Electric power inspection route full-autonomous planning method based on three-dimensional space target point extraction
CN117826854A