Automatic inspection route generation methods, systems, program products and media

CN119472669BActive Publication Date: 2026-09-01GUANGDONG POWER GRID CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411594067.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2026-09-01
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

[0005]本发明实施例提供了一种自动巡视航线生成方法、系统、程序产品及介质,以至少解决现有的直线塔的飞行航线生成方面存在拍照距离远、拍照点位少、拍照方位单一、人工配置拍照点操作繁琐的技术问题

Benefits of technology

[0019]根据本发明实施例的第四方面,还提供了一种非易失性存储介质,非易失性存储介质中存储有计算机程序,其中,计算机程序被设置为在计算机或处理器上运行时,执行上述第一方面任一实施例中所述的自动巡视航线生成方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472669B_ABST
    Figure CN119472669B_ABST
Patent Text Reader

Abstract

This invention discloses an automatic inspection route generation method, system, program product, and medium, comprising: acquiring equipment tag data, wherein the equipment tag data includes equipment name and equipment spatial coordinates; initializing the equipment tag data to obtain initialization data; extracting the initialization data in units of tower units to obtain data groups; determining the route generation algorithm based on the number of data groups; and generating an automatic inspection route using the route generation algorithm. This invention solves the technical problems of existing linear tower flight route generation methods, such as long photographing distance, few photographing points, single photographing orientation, and cumbersome manual configuration of photographing points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power transmission line inspection, and specifically relates to an automatic inspection route generation method, system, program product and medium. Background Technology

[0002] Unmanned aerial vehicle (UAV) automated precision inspections of power transmission lines are an important part of the daily operation and maintenance of power transmission lines. After three years of development, the operation process has become quite mature. The current operation process for UAV automated precision inspections is as follows: collecting laser data of the power transmission line, marking the photo points of key equipment on the laser data, generating flight paths based on the photo points, conducting safety checks on the flight paths, and executing the flight paths on site.

[0003] The following problems exist in the current flight path generation for straight-line towers: 1. Long shooting distance and insufficient clarity of visible light photos. Current flight operation aircraft are mainly infrared dual-light models. There is a significant focal length difference between the visible light lens and the infrared lens. For example, the mainstream DJI M3T model integrates the infrared and visible light lenses on a single gimbal. The visible light lens has a focal length of 24mm, and the infrared lens has a focal length of 40mm. To accommodate dual-light photo shooting, the distance between the drone and the equipment must be maintained at more than 3 meters when planning the flight path. 2. Few shooting points and limited shooting orientation. Currently, equipment shooting points require manual addition of equipment tags to the laser point cloud. Then, the flight path system generates frontal shooting points for the equipment based on the equipment tags. Therefore, each piece of equipment on the straight-line tower only has 1-3 frontal shooting points, lacking multi-angle and multi-directional shooting points for ground wire clamps, ground wire vibration dampers, insulator hanging points, suspension clamps, and conductor vibration dampers. 3. Manual setting of shooting points results in low accuracy and low efficiency. The current route system also supports manually adding photo points, but the orientation, angle, and distance between the photo points and the equipment are entirely based on the operator's intuition. It cannot match the precise photo point settings of equipment that can mass-produce high-quality, efficient, and standardized products.

[0004] In summary, existing methods for generating flight paths using linear towers suffer from problems such as long photographing distances, limited photographing locations, limited photographing orientations, and cumbersome manual configuration of photographing locations. Summary of the Invention

[0005] This invention provides an automatic inspection route generation method, system, program product, and medium to at least solve the technical problems of existing linear tower flight route generation, such as long photographing distance, few photographing points, single photographing orientation, and cumbersome manual configuration of photographing points.

[0006] According to a first aspect of the present invention, an automatic inspection route generation method is provided, comprising: acquiring equipment tag data, wherein the equipment tag data includes equipment name and equipment spatial coordinates; initializing the equipment tag 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 inspection route using the route generation algorithm.

[0007] Optionally, the equipment tag data is initialized to obtain initialization data, including: extracting a list of straight-line towers from a preset ledger database, wherein the list of straight-line towers includes the line name and tower number; querying the tower midpoint coordinates from a preset coordinate database based on the line name and tower number; determining the midpoint coordinates of the ground wire suspension points 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 calibration midpoint coordinates of the tower based on the coordinate offset; determining the reference vector based on the calibration midpoint coordinates, wherein the reference vector is the coordinates of two adjacent towers; and determining the straight-line tower type based on the reference vector and the tower tag.

[0008] Optionally, the route generation algorithm is determined based on the number of data groups, including: in response to two data groups, a first preset algorithm is determined as the route generation algorithm, or in response to three data groups, a second preset algorithm is determined as the route generation algorithm, wherein the first preset algorithm performs route planning for the drum-shaped tower, and the second preset algorithm performs navigation planning for the owl-shaped tower.

[0009] Optionally, the device tag data is initialized to obtain initialization data, including: cleaning the device tag data according to a preset cleaning strategy to obtain cleaned data; and initializing the cleaned data to obtain initialization data.

[0010] Optionally, the route generation algorithm is a first preset algorithm, which generates an automatic inspection route, including: initializing the basic parameters of the route and initializing the waypoint array; reading the data of the left label array and the right label array in sequence; determining the ground wire attachment point waypoint according to the first preset waypoint generation method; determining the insulator string waypoint according to the second preset waypoint generation method; and generating the automatic inspection route based on the ground wire attachment point waypoint and the insulator string waypoint.

[0011] Optionally, the route generation algorithm is a second preset algorithm. Using this algorithm, an automatic inspection route is generated, including: initializing basic route parameters and waypoint arrays; sequentially reading data from the left and right label arrays; determining ground wire attachment point waypoints according to the first preset waypoint generation method; determining insulator string positions; determining a third preset waypoint generation method based on the insulator string positions; generating insulator string waypoints according to the third preset waypoint generation method; and generating the automatic inspection route based on the ground wire attachment point waypoints and the insulator string waypoints.

[0012] Optionally, the first preset waypoint generation method includes: calculating the reference direction vector of the ground wire attachment point tag; determining 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 according to the fourth preset waypoint generation method; and determining the ground wire attachment point waypoint based on 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.

[0013] Optionally, the second preset waypoint generation algorithm includes: calculating the reference direction vectors of the upper and lower suspension points of the insulator string and the coordinates of the midpoint of the insulator string; determining the first distance shooting waypoint of the upper suspension point, the first distance top-view frontal shooting waypoint of the lower suspension point, the second distance frontal shooting waypoint, the second distance anti-vibration hammer shooting waypoint, the first distance clockwise side top-view waypoint of the lower suspension point, the lower suspension point safety path waypoint, the first distance counterclockwise side top-view waypoint of the lower suspension point, and the third distance counterclockwise side upward shooting waypoint of the insulator midpoint based on the first distance shooting waypoint of the upper suspension point, the first distance top-view frontal shooting waypoint of the lower suspension point, the second distance frontal shooting waypoint, the second distance anti-vibration hammer shooting waypoint, the first distance clockwise side top-view waypoint of the lower suspension point, the lower suspension point safety path waypoint, the first distance counterclockwise side top-view waypoint of the lower suspension point, and the third distance counterclockwise side upward shooting waypoint of the insulator midpoint, and determining the insulator string waypoint.

[0014] Optionally, the third preset waypoint generation method includes: determining a first direction and a second direction based on the coordinates of a first preset point and a second preset point; determining a third distance safety path waypoint at the top of the first direction, a first distance shooting waypoint at the top of the first direction, a first distance overhead frontal shooting waypoint at the bottom of the first direction, a second distance shooting waypoint at the insulator string, and an overhead shooting waypoint at the insulator string, to obtain first waypoint data; determining a third distance safety path waypoint at the top of the second direction, a first distance overhead frontal shooting waypoint at the bottom of the first direction, and a second distance shooting waypoint at the insulator string, to obtain second waypoint data; and determining the insulator string waypoint based on the first waypoint data and the second waypoint data.

[0015] Optionally, the automatic inspection route generation method also includes: performing safety checks on the automatic inspection route according to a preset route safety detection strategy, and obtaining the detection results.

[0016] According to a second aspect of the present invention, an automatic inspection route generation system is also provided, comprising:

[0017] The module is used to acquire equipment tag data, which includes equipment name and equipment spatial coordinates; the module is used to initialize the equipment tag data to obtain initial data; the module is used to extract the initial data in units of tower units to obtain data groups; the module is used to determine the route generation algorithm based on the number of data groups; and the module is used to generate an automatic inspection route using the route generation algorithm.

[0018] According to a third aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the automatic inspection route generation method as described in any of the embodiments of the first aspect above.

[0019] According to a fourth aspect of the present invention, a non-volatile storage medium is also provided, wherein a computer program is stored in the non-volatile storage medium, 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 processor.

[0020] In this embodiment of the invention, equipment tag data is acquired, including the equipment name and spatial coordinates; the equipment tag data is initialized to obtain initialization data; the initialization data is extracted in units of tower units to obtain data groups; based on the number of data groups, a flight path generation algorithm is determined; and the flight path generation algorithm is used to generate an automatic inspection flight path. The automatic inspection flight path obtained by the present invention uses waypoints generated by the algorithm, including various photographing distances and photographing points, thereby solving the technical problems of existing straight-line tower flight path generation, such as long photographing distances, few photographing points, single photographing orientation, and cumbersome manual configuration of photographing points. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0022] Figure 1 This is a flowchart of an automatic inspection route generation method according to one embodiment of the present invention;

[0023] Figure 2This is a structural block diagram of an automatic patrol route generation system according to one embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort 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, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] According to an embodiment of the present invention, an embodiment of an automatic inspection route generation method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system containing at least one set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] This method embodiment can also be executed in an electronic device including a memory and a processor, a similar control device, or in the 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 for communication functions and a display device. Those skilled in the art will understand that the above structural description is merely illustrative and does not limit the structure of the electronic device. For example, the electronic device may include more or fewer components than described above, or have a different configuration than described above.

[0028] A processor may include one or more processing units. For example, a 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 processing unit (NPU), a tensor processing unit (TPU), or an artificial intelligence (AI) processor. Different processing units may be independent components or integrated into one or more processors. In some instances, electronic devices may also include one or more processors.

[0029] The memory can be used to store computer programs, such as the computer program corresponding to the automatic patrol route generation method in this embodiment of the invention. The processor implements the automatic patrol route generation method by running the computer program stored in the memory. The memory may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to electronic devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0030] The communication device is used to receive or send data via a network. Specific examples of the network mentioned above may include a wireless network provided by the mobile terminal's communication provider. In one example, the communication device includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the communication device may be a radio frequency (RF) module, used for wireless communication with the Internet. In some embodiments of this solution, the communication device is used to connect to mobile devices such as mobile phones and tablets, enabling the mobile device to send commands to the electronic device.

[0031] The display device can be a touchscreen liquid crystal display (LCD) or a touch display (also referred to as a "touchscreen" or "touch display screen"). The LCD allows a user to interact with the user interface of the electronic device. In some embodiments, the electronic device has a graphical user interface (GUI), which allows the user to interact with the GUI by touching a touch-sensitive surface with fingers and / or gestures. Executable instructions for performing these human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0032] Figure 1 This is a flowchart of an automatic inspection route generation method according to one embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0033] Step S101: Obtain device tag data, wherein the device tag data includes device name and device spatial coordinates.

[0034] Step S102: Initialize the device tag data to obtain initialization data.

[0035] Step S103: Extract the initialization data in units of tower units to obtain data groups.

[0036] Step S104: Determine the route generation algorithm based on the number of data groups.

[0037] Step S105: Use the route generation algorithm to generate an automatic inspection route.

[0038] In this embodiment of the invention, equipment tag data is acquired, including the equipment name and spatial coordinates; the equipment tag data is initialized to obtain initialization data; the initialization data is extracted in units of tower units to obtain data groups; based on the number of data groups, a flight path generation algorithm is determined; and the flight path generation algorithm is used to generate an automatic inspection flight path. The automatic inspection flight path obtained by the present invention uses waypoints generated by the algorithm, including various photographing distances and photographing points, thereby solving the technical problems of existing straight-line tower flight path generation, such as long photographing distances, few photographing points, single photographing orientation, and cumbersome manual configuration of photographing points.

[0039] Optionally, the equipment tag data is initialized to obtain initialization data, including: extracting a list of straight-line towers from a preset ledger database, wherein the list of straight-line towers includes the line name and tower number; querying the tower midpoint coordinates from a preset coordinate database based on the line name and tower number; determining the midpoint coordinates of the ground wire suspension points 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 calibration midpoint coordinates of the tower based on the coordinate offset; determining the reference vector based on the calibration midpoint coordinates, wherein the reference vector is the coordinates of two adjacent towers; and determining the straight-line tower type based on the reference vector and the tower tag.

[0040] Optionally, the route generation algorithm is determined based on the number of data groups, including: in response to two data groups, a first preset algorithm is determined as the route generation algorithm, or in response to three data groups, a second preset algorithm is determined as the route generation algorithm, wherein the first preset algorithm performs route planning for the drum-shaped tower, and the second preset algorithm performs navigation planning for the owl-shaped tower.

[0041] Optionally, the device tag data is initialized to obtain initialization data, including: cleaning the device tag data according to a preset cleaning strategy to obtain cleaned data; and initializing the cleaned data to obtain initialization data.

[0042] Optionally, the route generation algorithm is a first preset algorithm, which generates an automatic inspection route, including: initializing the basic parameters of the route and initializing the waypoint array; reading the data of the left label array and the right label array in sequence; determining the ground wire attachment point waypoint according to the first preset waypoint generation method; determining the insulator string waypoint according to the second preset waypoint generation method; and generating the automatic inspection route based on the ground wire attachment point waypoint and the insulator string waypoint.

[0043] Optionally, the route generation algorithm is a second preset algorithm. Using this algorithm, an automatic inspection route is generated, including: initializing basic route parameters and waypoint arrays; sequentially reading data from the left and right label arrays; determining ground wire attachment point waypoints according to the first preset waypoint generation method; determining insulator string positions; determining a third preset waypoint generation method based on the insulator string positions; generating insulator string waypoints according to the third preset waypoint generation method; and generating the automatic inspection route based on the ground wire attachment point waypoints and the insulator string waypoints.

[0044] Optionally, the first preset waypoint generation method includes: calculating the reference direction vector of the ground wire attachment point tag; determining 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 according to the fourth preset waypoint generation method; and determining the ground wire attachment point waypoint based on 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.

[0045] Optionally, the second preset waypoint generation algorithm includes: calculating the reference direction vectors of the upper and lower suspension points of the insulator string and the coordinates of the midpoint of the insulator string; determining the first distance shooting waypoint of the upper suspension point, the first distance top-view frontal shooting waypoint of the lower suspension point, the second distance frontal shooting waypoint, the second distance anti-vibration hammer shooting waypoint, the first distance clockwise side top-view waypoint of the lower suspension point, the lower suspension point safety path waypoint, the first distance counterclockwise side top-view waypoint of the lower suspension point, and the third distance counterclockwise side upward shooting waypoint of the insulator midpoint based on the first distance shooting waypoint of the upper suspension point, the first distance top-view frontal shooting waypoint of the lower suspension point, the second distance frontal shooting waypoint, the second distance anti-vibration hammer shooting waypoint, the first distance clockwise side top-view waypoint of the lower suspension point, the lower suspension point safety path waypoint, the first distance counterclockwise side top-view waypoint of the lower suspension point, and the third distance counterclockwise side upward shooting waypoint of the insulator midpoint, and determining the insulator string waypoint.

[0046] Optionally, the third preset waypoint generation method includes: determining a first direction and a second direction based on the coordinates of a first preset point and a second preset point; determining a third distance safety path waypoint at the top of the first direction, a first distance shooting waypoint at the top of the first direction, a first distance overhead frontal shooting waypoint at the bottom of the first direction, a second distance shooting waypoint at the insulator string, and an overhead shooting waypoint at the insulator string, to obtain first waypoint data; determining a third distance safety path waypoint at the top of the second direction, a first distance overhead frontal shooting waypoint at the bottom of the first direction, and a second distance shooting waypoint at the insulator string, to obtain second waypoint data; and determining the insulator string waypoint based on the first waypoint data and the second waypoint data.

[0047] Optionally, the automatic inspection route generation method also includes: performing safety checks on the automatic inspection route according to a preset route safety detection strategy, and obtaining the detection results.

[0048] Specifically, the above steps of this method are performed as follows:

[0049] The first step is to initialize the device tag data. Here, device tags refer to the marking of device points on the laser point cloud data when planning flight paths using laser data. A tag contains the device name and UTM spatial coordinates, such as the tag for a ground wire anchor point ['GroundwireAnchor', 796118.5861053467, 2355604.129760742, 52.117000579833984]. Data initialization mainly includes the following steps:

[0050] 1. Extract a list of straight-line towers from the transmission line tower ledger. The list includes the line name and tower number.

[0051] 2. Find the coordinates of the tower center point from the coordinate database based on the line name and tower number.

[0052] 3. Based on the line name and tower number, extract the coordinates of the left and right ground wire attachment points of the current tower unit, and calculate the coordinates of the midpoint between the two attachment points.

[0053] 4. Calculate the coordinate offset between the reservoir coordinates and the midpoint of the ground wire anchor point. If the offset is greater than 5 meters, the reservoir coordinates are deemed invalid, and the midpoint coordinates of the two ground wire anchor points are used to replace the reservoir coordinates. The formula for calculating the plane coordinate distance is as follows (the z-axis coordinate does not need to be considered; the spatial coordinates can be projected onto the xy plane for calculation): d=√[(x2-x1)2+(y2-y1)2].

[0054] 5. Extract the center coordinates P1 of the adjacent small side tower unit and the center coordinates P2 of this tower unit to form a reference vector P12: P12 = P2 - P1.

[0055] 6. Determine the relative position of each label on this tower to the reference vector P12. The z-axis coordinate does not need to be considered during the calculation; simply project the coordinates onto the xy-plane. There are three relative positions: left, middle, and right. The determination method is as follows:

[0056] Let the coordinates of the label be P3, and let the coordinates of P1 form a vector P13 = P3 - P1. Find the cross product of vectors P13 and P12, Result = P13 x P12.

[0057] If the cross product of Result is positive, then P3 is on the left side of the vector; if the result is negative, then P3 is on the right side of the vector. Next, calculate the perpendicular distance from point P3 to vector P12. The coordinates of point P1 are (x1, y1), the coordinates of point P2 are (x2, y2), and the coordinates of point P3 are (x3, y3). Vectors P12 = (x2 - x1, y2 - y1) and P13 = (x3 - x1, y3 - y1). 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 cross product is used as the orientation; if d < 1 meter, the result is replaced with "middle". Using the tower center vector as a reference, if the distance between the label point and the center vector is less than 1 meter (the width of the 110kV line tower head is 3 meters), the label is considered to be located at the center of the tower; otherwise, the label is considered to be located on either side. 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 only has two options, right and left, the tower type is drum-shaped. If the tower label has three options, right, left, and middle, the tower type is cat-head-shaped.

[0061] The second step is to clean and organize the label data.

[0062] The reason for cleaning and organizing the tag data is that the current flight routes are all manually created. During the creation process, the setting of photo points is not standardized, especially on the tags of insulator strings, where there are redundant or missing tags. Therefore, when generating flight routes, it is necessary to clean and organize the tag data of the insulator strings, delete redundant data, and eliminate abnormal data to ensure that the flight route generation algorithm operates normally.

[0063] 1. First, taking the tower unit as the unit, read the coordinates of the tag named 'IshapedInsulator' in groups according to the tag orientation, and sort them in descending order of the z-axis value within the group.

[0064] 2. Set the coordinate cleaning scale according to the voltage level of the tower unit. The cleaning scale is 1 meter for 110kV, 1.7 meters for 220kV, and 3.5 meters for 500kV. The cleaning scale is set according to the insulator string length of each voltage level * 0.7.

[0065] 3. Group by location and clean and organize the data group by group. The location grouping of the labels is based on the grouping calculated in step 2, and the groups are right, left, and middle.

[0066] 4. Perform a loop check on the tags within each group. First, set the coordinates of the first tag in the group to the coordinates of the upper suspension point of the insulator string. Then, read the coordinates of the next tag and calculate the vertical distance between the current tag coordinates and the upper suspension point coordinates. If the vertical distance is less than the cleaning scale value, the current tag is redundant and should be deleted. After deletion, read the next tag and continue the check. If the vertical distance is greater than the cleaning scale value, set the current tag to the coordinates of the lower suspension point of the insulator. Then, read the next tag and check if the vertical distance between the current tag coordinates and the lower suspension point coordinates is greater than the cleaning scale value. If it is less, set the current coordinates to the new lower suspension point coordinates, delete the old lower suspension point coordinates, and continue the check. If it is greater, it means that the upper and lower suspension point coordinates of the insulator string have been successfully matched. Repeat the above check process within the group until the current group check is completed.

[0067] 5. Repeat the process of grouping all labels until all label data has been cleaned and organized.

[0068] The third step is to generate flight routes.

[0069] 1. Extract tag data by tower unit, forming data groups. Data within each group is sorted in descending order of z-coordinate value. 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 P1 of the center point of the adjacent smaller side tower unit, and extract the coordinates P2 of this tower unit.

[0072] 3. Determine the number of tag groups. If the tags are in two groups, call the drum-shaped tower route generation algorithm; if the tags are in three groups, call the cat-shaped tower route generation algorithm. The parameters required to call the drum-shaped tower route generation algorithm include "voltage level, line name, tower name, route storage path, left tag array, right tag array, P1, P2" (these are general parameters for tower unit route generation). The parameters required to call the cat-shaped tower route generation algorithm are "voltage level, line name, tower name, ", left tag array, right tag array, middle tag array, P1, P2".

[0073] (a) Basic algorithms required for route calculation:

[0074] 1. The method for calculating the reference orientation vector of the label is count_center_point(P1, P2, P3). Given the coordinates of the midpoints of the two tower units, P1[x1, y1], P2[x2, y2], and the coordinates of the label point P3[x3, y3], use the midpoint coordinates to write the equation of the straight line passing through the two points, Line_s (ignoring z, only operating in the xy plane).

[0075] Slope k = (y2 - y1) / (x2 - x1);

[0076] The equation of the line from P1 to P2 is y-y1=k*(x-x1);

[0077] The equation of the line passing through P3 and perpendicular to the line Line_s is y - y3 = -1 / k*(x - x3);

[0078] Solve the two equations simultaneously to get P4[x4, y4];

[0079] Calculate the reference orientation vector of the tag: P43 = P3 - P4;

[0080] 2. Waypoint coordinate calculation method: count_point_d(v, d, point1). Given the plane vector v, the starting coordinates point1, and the distance d, find the coordinates of the point point2 on vector v with a distance d from point1 as the starting point. 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)`. Given that 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 a UAV is count_aircraftHeading(pt). Given the vector pt, the heading angle of the UAV is calculated. The heading angle of the UAV is the angle between the vector pt and the north direction within ±180°. The 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 the PT vector and the north vector, dot = PT·north;

[0096] Calculate the angle between vectors using the cosine value: cosine = dot_product / (dis_pt);

[0097] Calculate the value in radians: angle_rad = acos(cosine);

[0098] Then convert the radians to degrees: angle_deg = angle_rad × (180 / π);

[0099] 5. Determine the quadrant in which the PT vector lies. The heading angle between the first and fourth quadrants is angle_deg.

[0100] The heading angles in 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 the following 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, and device name bz_name.

[0102] Calculate the heading vector P53 = P3 - P5 (the vector from the waypoint to the equipment, taking x3 and y3 of P3 into the calculation);

[0103] Call the heading angle calculation method: Heading angle β = count_aircraftHeading(P43);

[0104] Convert the gimbal angle 'a' to radians: a_rad = a × π / 180;

[0105] Calculate the waypoint altitude based on the gimbal angle, where the angle is a regular expression: h = z³ + tan(a_rad) × d;

[0106] If the angle is negative: h = z³ - tan(a_rad) × d;

[0107] The final calculation result is as follows:

[0108] hd_point = [x5, y5, h];

[0109] hd_action=[-a, β, hd_type];

[0110] The method returns [hd_point, hd_action, follow_or_fix, bz_name];

[0111] hd_type has two values: one is 'waypoint', which represents a waypoint.

[0112] Secondly, 'takephoto' represents the photo-taking location.

[0113] The `follow_or_fix` option has two values: 'followway' means the drone's heading will move towards the next waypoint after the current waypoint is reached; 'fixed' means the heading is locked and the current direction is maintained.

[0114] 7. Method for calculating waypoints for anti-vibration hammer photography:

[0115] `count_fzc_hd(P3, P4, a, γ, d, type_hd, follow_or_fix, bz_name)`. Waypoint calculation requires the following parameters: device tag coordinates P3[x3, y3, z3], waypoint coordinates P4[x4, y4], gimbal angle a, fuselage rotation angle γ, distance d, waypoint type_hd, heading mode follow_or_fix, and device name bz_name.

[0116] Calculate the heading vector P43 = P3 - P4 (the vector from the waypoint to the equipment, taking x3 and y3 of P3 into the calculation);

[0117] Call the heading angle calculation method: Heading angle β = count_aircraftHeading(P43);

[0118] Convert the gimbal angle 'a' to radians: a_rad = a × π / 180;

[0119] Calculate the waypoint altitude based on the gimbal angle: h = z³ + tan(a_rad) × d;

[0120] Calculate the heading angles for left and right rotations based on β:

[0121] l_angle = β + γ;

[0122] r_angle = β - γ;

[0123] l_angle may be greater than 180°. If it is greater than 180°, it will enter 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 will enter the second quadrant. r_angle = r_angle + 360.

[0125] The final calculation result is as follows:

[0126] hd_point = [x4, y4, h];

[0127] hd_action = [[-a, β, hd_type], [-a, l_angle, hd_type], [-a, r_angle, hd_type]], which includes three photo-taking actions: taking a photo from the front, taking a photo by turning left by γ degrees, and taking a photo by turning right by γ degrees.

[0128] The method returns [hd_point, hd_action, follow_or_fix, bz_name];

[0129] The meanings of the remaining values ​​are the same as those of count_hd;

[0130] (II) Drum-shaped tower route generation algorithm:

[0131] 1. Initialize the basic parameters for flight path generation. The parameters that need to be initialized are: close distance, medium distance, and long distance (these three values ​​represent the horizontal distance that the UAV and the target need to maintain), close distance gimbal angle, long distance gimbal angle (representing the angle that the gimbal needs to be adjusted when the UAV is shooting the target), anti-vibration hammer shooting body rotation angle, side shooting angle (the angle that the UAV needs to rotate for insulated infrared thermography and cable clamp shooting), cable clamp side shooting gimbal angle, upward shooting gimbal angle, waypoint array, and temporary waypoint data group.

[0132] 2. The waypoint generation algorithm for ground wire anchor point photography is called on the first group of data in the azimuth group data. The azimuth group data is arranged in descending order of z-axis coordinate data, and the ground wire is located at the highest point of the tower. Therefore, the first data in each azimuth group data is the ground wire anchor point P3.

[0133] 2.1 The algorithm for generating waypoints on the ground line is as follows:

[0134] 2.1.1 First, call the label's reference azimuth vector calculation method count_center_point(P1, P2, P3) to calculate the ground line reference azimuth vector P43.

[0135] 2.1.2 Call the waypoint coordinate calculation method to calculate the long-distance safe path waypoint coordinates P5 = count_point_d(P43, distance, P3), call count_hd(P3, P5, distance gimbal angle, 'waypoint', 'fixed', 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 waypoint coordinates of the ground wire attachment point for frontal photography: P5 = count_point_d(P43, near distance, P3), call count_hd(P3, P5, near distance gimbal angle, 'takephoto', 'fixed', near distance, 'Ground') to calculate the waypoint, and create a temporary waypoint group for the ground wire attachment point for frontal photography.

[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 photo coordinates P5 = count_point_d(P43, center distance, P3), and call the anti-vibration hammer waypoint calculation method.

[0139] The `count_fzc_hd(P3, P5, long-range gimbal angle, anti-vibration hammer camera body rotation angle, mid-range, 'takephoto', 'fixed', 'Ground')` function calculates the waypoints for the anti-vibration hammer photography and adds them to a 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-shot angle), calculates the coordinates of the clockwise close-range side-shot waypoint at the ground wire attachment point. P5 = count_point_d(P43_theta_s, close-range, P3), calls the waypoint calculation method count_hd(P3, P5, gimbal angle of side-shot with wire clamp, 'takephoto', 'fixed', close-range, 'Ground') to calculate the waypoint, and adds 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-shot angle), calculates the coordinates of the counter-clockwise close-range side-shot waypoint P5 = count_point_d(P43_theta_n, close-range, P3), calls the waypoint calculation method count_hd(P3, P5, gimbal angle of side-shot with cable clamp, 'takephoto', 'fixed', close-range, 'Ground') to calculate the waypoint, and adds 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 completing the above 9 steps, the waypoint for taking photos of the ground wire attachment point is generated. The waypoint includes 3 safe waypoints, 1 close-up frontal photo point, 2 close-up side photo points, and 1 vibration damper photo point.

[0147] Once 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, the coordinates of the upper hanging point label P3 and the lower hanging point label P5 of the insulator string need to be read in groups of 2.

[0149] 3.1 First, the reference orientation vector calculation method `count_center_point(P1, P2, P3)` is called to calculate the reference orientation vector P43 for the upper hanging point. Then, `count_center_point(P1, P2, P5)` is called to calculate the reference orientation vector P45 for the lower hanging point. The coordinates of the midpoint of the insulator string are P6 = (P3 + P5) / 2, and the reference vector for the midpoint coordinates is `count_center_point(P1, P2, P6)`, P46.

[0150] 3.2 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the long-distance safe path from the mounting point: P7 = count_point_d(P43, distance, P3), call count_hd(P3, P7, distance gimbal angle, 'waypoint', 'fixed', 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 attachment point for close-range photography: P7 = count_point_d(P43, close range, P5), call count_hd(P3, P7, close range gimbal angle, 'takephoto', 'fixed', close range, '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 under-mounted point for close-up overhead photography: P7 = count_point_d(P45, close-up, P5), call count_hd(P5, P7, gimbal angle for side-view shooting with cable clamp, 'takephoto', 'fixed', close-up, '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 frontal photo of the midpoint of the insulation string: P7 = count_point_d(P46, midpoint distance, P6), call count_hd(P6, P7, gimbal angle of the side shot of the wire clamp, 'takephoto', 'fixed', midpoint 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 photo coordinates P7 = count_point_d(P45, center distance, P5), and call the anti-vibration hammer waypoint calculation method.

[0155] The `count_fzc_hd(P5, P7, long-range gimbal angle, anti-vibration hammer camera body rotation angle, mid-range, 'takephoto', 'fixed'Insulator')` function calculates the waypoints for the anti-vibration hammer photography and adds them to a temporary waypoint group.

[0156] 3.7 Call the vector rotation method to rotate P45 clockwise.

[0157] P45_theta_s = rotate_vector_2d(P45, -side-shot angle), calculates the coordinates of the clockwise close-range side-shot waypoint at the ground wire attachment point. P7 = count_point_d(P45_theta_s, close-range, P5), calls the waypoint calculation method count_hd(P5, P7, gimbal angle of the side-shot with the cable clamp, 'takephoto', 'fixed', close-range, 'Insulator') to calculate the waypoint, and adds the waypoint to the temporary waypoint group.

[0158] 3.8 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the far safe path under the attachment point P7 = count_point_d(P45, far distance, P5), call count_hd(P5, P7, far distance gimbal angle, 'waypoint', 'fixed', far distance, 'Insulator'), and add the waypoint to the temporary waypoint array.

[0159] 3.9 Call the vector rotation method to rotate P45 counterclockwise: P45_theta_n = rotate_vector_2d(P45, side-shot angle). Calculate the coordinates of the counterclockwise close-range side-shot waypoint P7 = count_point_d(P45_theta_n, close-range, P5). Call the waypoint calculation method count_hd(P5, P7, gimbal angle of the side-shot with the cable clamp, 'takephoto', 'fixed', close-range, 'Insulator') to calculate the waypoint and add it 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 angle), calculates the coordinates of the waypoint for long-distance upward shooting of the insulating string. P7 = count_point_d(P46_theta_n, distance, P6), calls the waypoint calculation method count_hd(P6, P7, - angle of upward shooting gimbal, 'takephoto', 'fixed', distance, 'Insulator') to calculate the waypoint, and adds the waypoint to the temporary waypoint group.

[0162] 3.11 If the current insulation is the last string in the group, add a tower foundation photo point. Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the overhead photo from the midpoint of the hanging point: P7 = count_point_d(P45, midpoint, P5). Directly set the gimbal angle to 65 degrees, call count_hd(P5, P7, 65, 'takephoto', 'fixed', midpoint, 'Insulator'), and add the waypoint to the temporary waypoint array.

[0163] The above 11 steps complete the generation of the ground wire attachment point photography waypoint. The waypoint includes 2 safe waypoints, 2 close-up frontal photography points, 1 medium-range photography point, 2 close-up side photography points, 1 side upward photography point, 1 vibration damper photography point, and 1 tower foundation photography point.

[0164] Once 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) Owl Tower Route Generation Algorithm:

[0166] The parameters required for generating the cat-head flight path are the same as those for the drum-shaped tower, and the overall generation process is also similar. The only difference is the addition of a check to determine whether the current insulator string is an intermediate insulator string. If it is not an intermediate string, the insulator string generation algorithm in the drum-shaped tower flight path generation algorithm is called; if it is an intermediate string, the intermediate insulator string waypoint generation algorithm is called. The coordinates of the upper insulator string label are P3, and the coordinates of the lower insulator string label are P5. See below:

[0167] 1.1 The reference vector P12 = P2 - P1 is 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 angle).

[0170] The coordinates of the midpoint of the insulator string are P6 = (P3 + P5) / 2.

[0171] 1.2 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the far safe path of the upper attachment point in the direction of P12_s: P7 = count_point_d(P12_s, far distance, P3). After increasing the height of P3, we get P3_h = [x3, y3, z3+8]. Call count_hd(P3_h, P7, far distance gimbal angle, 'waypoint', 'fixed', far distance, 'Insulator') to add the waypoint to the temporary waypoint array.

[0172] 1.3 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the upper attachment point for close-range photography: P7 = count_point_d(P12_s, close range, P3), call count_hd(P3, P7, close range gimbal angle, 'takephoto', 'fixed', close range, '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 down-angle close-up shot at the P12_s direction. P7 = count_point_d(P12_s, close-up, P5), call count_hd(P5, P7, gimbal angle for side shot with cable clamp, 'takephoto', 'fixed', close-up, '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 midpoint of the insulation string in the P12_s direction for frontal photography. P7 = count_point_d(P12_s, midpoint distance, P6), call count_hd(P6, P7, gimbal angle for side shooting with wire clamp, 'takephoto', 'fixed', midpoint distance, 'Insulator'), and add the waypoint to the temporary waypoint array.

[0175] 1.6 Calculate the coordinates of the waypoint for long-distance upward shooting of the insulating string in the direction of P12_s. P7 = count_point_d(P12_s, distance, P6), call the waypoint calculation method count_hd(P6, P7, - angle of upward shooting gimbal, 'takephoto', 'fixed', distance, 'Insulator') to calculate the waypoint, and add the waypoint to the temporary waypoint group.

[0176] 1.7 Add the long-distance safe waypoints in the P12_s direction calculated in 1.2.

[0177] 1.8 Call the waypoint coordinate calculation method to calculate the long-distance safe path waypoint coordinates of the upper attachment point in the P12_s direction: P7 = count_point_d(P12_n, distance, P3). After increasing the height of P3, we get P3_h = [x3, y3, z3+8]. Call count_hd(P3_h, P7, distance gimbal angle, 'waypoint', 'fixed', distance, 'Insulator') to add the waypoint to the temporary waypoint array.

[0178] 1.9 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the down-angle overhead photo taken from the P12_n direction: P7 = count_point_d(P12_n, close distance, P5), call count_hd(P5, P7, gimbal angle for side shot with cable clamp, '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 midpoint of the insulation string in the P12_n direction for frontal photography. P7 = count_point_d(P12_n, midpoint distance, P6), call count_hd(P6, P7, gimbal angle for side shooting with wire clamp, 'takephoto', 'fixed', midpoint distance, 'Insulator'), and add the waypoint to the temporary waypoint array.

[0180] 2.1 Add the long-distance safe waypoints along the P12_n direction calculated in 1.7.

[0181] The system generates four safe path points: one image point for the upper hanging point of the insulator string, two image points for the lower hanging point, and two image points for the insulator string itself. These four safe path points ensure that the drone can safely pass through both sides of the middle phase without colliding with the tower head.

[0182] Once 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 waypoints are generated, call the route generation algorithm to generate KMZ route files in accordance with DJI’s WPML specification;

[0184] Simultaneously, waypoints are saved as PLY files, and route segments are saved as SHP files for loading and viewing. All generated files are stored in the location specified by the "Route Storage Path" variable.

[0185] The fourth step is route safety inspection. Safety inspection is conducted on a route-by-route basis, with one laser point cloud file corresponding to each route. The safety inspection process is as follows:

[0186] 1. Set the path of the flight path 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 if the file is larger than 3GB. If it is smaller than 3GB, read it completely. If it is larger than 3GB, read it in segments iteratively. Some lines have laser point cloud data as high as 30GB. Reading it completely will cause a computer memory overflow error. Therefore, the size of each file read needs to be configured according to the computer's memory to prevent memory overflow from causing the detection to be interrupted.

[0190] 5. Using the read waypoint coordinates as the center, create an 80m x 80m square. Filter laser points whose x and y coordinates fall within the square. If the number of filtered points is greater than 1000, the corresponding tower unit is considered found; if it is less than 1000, the tower unit is considered not found. If no point cloud is found after iterative reading of the point cloud, the detection process ends directly.

[0191] 6. If the point cloud of a tower element is found, initiate a safe distance detection. The safe distance threshold is d, and the safe distance anomaly array is used. The detection process is as follows:

[0192] 6.1 Read waypoint coordinates from the ply file sequentially.

[0193] 6.2 Set up a cube with a side length of d*4 centered on the waypoint.

[0194] 6.3 Filter the point set that falls into the cube in the point cloud of the tower unit.

[0195] 6.4 Calculate the distance between the point set point and the waypoint in a loop, and save the minimum distance. If the minimum distance is less than d, add the waypoint and the point with the minimum distance to the safe distance exception array.

[0196] Repeat the above process until the test is complete.

[0197] 6.5 After the inspection is completed, enter the inspection results into the route folder. The results include waypoint number, waypoint coordinates, and minimum distance point coordinates. Enter the shapefile (shp file) of the line segments with insufficient safety distance for visualization. Save the laser data filtered to the tower unit for further review.

[0198] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0199] This embodiment also provides an automatic patrol route generation system, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" refers to a combination of software and / or hardware capable of performing a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0200] Figure 2 This is a structural block diagram of an automatic patrol route generation system 200 according to one embodiment of the present invention, such as... Figure 2 As shown, taking the automatic inspection route generation system 200 as an example, it includes: an acquisition module 201 for acquiring equipment tag data, wherein the equipment tag data includes equipment name and equipment spatial coordinates; an initialization module 202 for initializing the equipment tag data to obtain initialization data; an extraction module 203 for extracting the initialization data in units of tower units to obtain data groups; a determination module 204 for determining the route generation algorithm based on the number of data groups; and a generation module 205 for generating an automatic inspection route using the route generation algorithm.

[0201] Embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the automatic inspection route generation method as described in any of the above embodiments.

[0202] Optionally, in this embodiment, the computer program described above performs the following steps when executed by the processor:

[0203] Step S101: Obtain device tag data, wherein the device tag data includes device name and device spatial coordinates.

[0204] Step S102: Initialize the device tag data to obtain initialization data.

[0205] Step S103: Extract the initialization data in units of tower units to obtain data groups.

[0206] Step S104: Determine the route generation algorithm based on the number of data groups.

[0207] Step S105: Use the route generation algorithm to generate an automatic inspection route.

[0208] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0209] Embodiments of the present invention also provide 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 processor.

[0210] Optionally, in this embodiment, the computer program described above may be configured to store a computer program for performing the following steps:

[0211] Step S101: Obtain device tag data, wherein the device tag data includes device name and device spatial coordinates.

[0212] Step S102: Initialize the device tag data to obtain initialization data.

[0213] Step S103: Extract the initialization data in units of tower units to obtain data groups.

[0214] Step S104: Determine the route generation algorithm based on the number of data groups.

[0215] Step S105: Use the route generation algorithm to generate an automatic inspection route.

[0216] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0217] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0218] In the embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of modules can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between modules may be electrical or other forms.

[0219] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0220] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0221] If the integrated module is implemented as a software functional 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0222] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for generating an automatic inspection route, characterized in that, include: Obtain device tag data, wherein the device tag data includes device name and device spatial coordinates; The device tag data is initialized to obtain initialization data; The initialization data is extracted in units of tower units to obtain data groups; In response to the fact that there are two data groups, an automatic inspection route is generated using a first preset algorithm, wherein the first preset algorithm is used for route planning for drum-shaped towers. The first preset algorithm includes the following steps:

1. Initialize the basic parameters for generating flight routes, including close-range, medium-range, long-range, close-range gimbal angle, long-range gimbal angle, anti-vibration hammer camera body rotation angle, side-shooting angle, gimbal angle for side-shooting with cable clamp, gimbal angle for upward-shooting, waypoint array, and temporary waypoint data group.

2. Call the ground line waypoint generation algorithm for the first group of data in the azimuth group data. The azimuth group data is arranged in descending order of z-axis coordinate data. The first data in each azimuth group data is the ground line hanging point P3. The ground line waypoint generation algorithm described in 2.1 is as follows: 2.1.1 Call the tag's reference azimuth vector calculation method count_center_point(P1, P2, P3) to calculate the ground line reference azimuth vector P43; 2.1.2 Call the waypoint coordinate calculation method to calculate the long-distance safe path waypoint coordinates P5=count_point_d(P43, distance, P3), call count_hd(P3, P5, distance gimbal angle, 'waypoint', 'fixed', distance, 'Ground') to calculate the safe waypoint, and add the safe waypoint to the temporary waypoint group; 2.1.3 Call the waypoint coordinate calculation method to calculate the waypoint coordinates for frontal photography of the ground wire attachment point P5=count_point_d(P43, near distance, P3), call count_hd(P3, P5, near distance gimbal angle, 'takephoto', 'fixed', near distance, 'Ground') to calculate the waypoint, and create a temporary waypoint group for frontal photography of the ground wire attachment point; 2.1.4 Add the safe path waypoints calculated in 2.1.2 to the temporary waypoint group; 2.1.5 Call the waypoint coordinate calculation method to calculate the ground line vibration damper photo coordinates P5=count_point_d(P43, center distance, P3), and call the vibration damper waypoint calculation method; count_fzc_hd(P3, P5, long distance gimbal angle, anti-vibration hammer camera body rotation angle, medium distance, 'takephoto', 'fixed', 'Ground') calculates the anti-vibration hammer photography waypoints and adds the waypoints to the temporary waypoint group; 2.1.6 Call the vector rotation method to rotate P43 clockwise; P43_theta_s=rotate_vector_2d(P43, -side-shot angle), calculates the coordinates of the clockwise close-range side-shot waypoint at the ground wire attachment point. P5=count_point_d(P43_theta_s, close-range, P3), calls the waypoint calculation method count_hd(P3, P5, gimbal angle of side-shot with wire clamp, 'takephoto', 'fixed', close-range, 'Ground') to calculate the waypoint, and adds the waypoint to the temporary waypoint group. 2.1.7 Add the safe path waypoints calculated in 2.1.2 to the temporary waypoint group; 2.1.8 Call the vector rotation method to rotate page 43 counterclockwise; P43_theta_n=rotate_vector_2d(P43, side-shot angle), calculates the coordinates of the counter-clockwise close-range side-shot waypoint at the ground wire attachment point. P5=count_point_d(P43_theta_n, close-range, P3), calls the waypoint calculation method count_hd(P3, P5, gimbal angle of the side-shot with the cable clamp, 'takephoto', 'fixed', close-range, 'Ground') to calculate the waypoint, and adds the waypoint to the temporary waypoint group. 2.1.9 Add the safe waypoints calculated in 2.1.2 to the temporary waypoint group; After the above 9 steps, the waypoint for taking pictures of the ground wire attachment point is generated. The waypoint includes 3 safe waypoints, 1 close-up frontal picture point, 2 close-up side picture points, and 1 anti-vibration hammer picture point. 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 at the same time.

3. Call the insulator string photo point generation algorithm. The algorithm is as follows: When calling the insulator string photo point generation algorithm, the coordinates of the upper hanging point label P3 and the lower hanging point label P5 of the insulator string need to be read in groups of 2. 3.1 First, call the tag's reference orientation vector calculation method count_center_point(P1, P2, P3) to calculate the upper hanging point reference orientation vector P43, count_center_point(P1, P2, P5), calculate the lower hanging point reference orientation vector P45, the insulator string midpoint coordinate P6=(P3+P5) / 2, and the midpoint coordinate reference vector, count_center_point(P1, P2, P6), P46; 3.2 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the long-distance safe path from the mounting point P7=count_point_d(P43, distance, P3), call count_hd(P3, P7, distance gimbal angle, 'waypoint', 'fixed', distance, 'Insulator'), and add the waypoint to the temporary waypoint array; 3.3 Call the waypoint coordinate calculation method to calculate the waypoint coordinates for close-up photography at the mounting point: P7 = count_point_d(P43, close-up, P5), call count_hd(P3, P7, close-up gimbal angle, 'takephoto', 'fixed', close-up, 'Insulator'), and add the waypoint to the temporary waypoint array; 3.4 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the under-mounted point for close-up overhead photography: P7=count_point_d(P45, close-up, P5), call count_hd(P5, P7, gimbal angle for side-view shooting with cable clamp, 'takephoto', 'fixed', close-up, 'Insulator'), and add the waypoint to the temporary waypoint array; 3.5 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the front-facing photo of the midpoint of the insulation string: P7=count_point_d(P46, midpoint distance, P6), call count_hd(P6, P7, gimbal angle of the side shot of the wire clamp, 'takephoto', 'fixed', midpoint distance, 'Insulator'), and add the waypoint to the temporary waypoint array; 3.6 Call the waypoint coordinate calculation method to calculate the ground line vibration damper photo coordinates P7=count_point_d(P45, center distance, P5), and call the vibration damper waypoint calculation method; count_fzc_hd(P5, P7, long distance gimbal angle, anti-vibration hammer camera body rotation angle, medium distance, 'takephoto', 'fixed', 'Insulator') calculates the waypoints for the anti-vibration hammer photography and adds the waypoints to the temporary waypoint group; 3.7 Call the vector rotation method to rotate P45 clockwise; P45_theta_s=rotate_vector_2d(P45, -side-shot angle), calculates the coordinates of the clockwise close-range side-shot waypoint at the ground wire attachment point. P7=count_point_d(P45_theta_s, close-range, P5), calls the waypoint calculation method count_hd(P5, P7, gimbal angle of the side-shot with the wire clamp, 'takephoto', 'fixed', close-range, 'Insulator') to calculate the waypoint, and adds the waypoint to the temporary waypoint group. 3.8 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the far safe path under the attachment point P7=count_point_d(P45, far distance, P5), call count_hd(P5, P7, far distance gimbal angle, 'waypoint', 'fixed', far distance, 'Insulator'), and add the waypoint to the temporary waypoint array; 3.9 Call the vector rotation method to rotate P45 counterclockwise: P45_theta_n = rotate_vector_2d(P45, side shot angle). Calculate the coordinates of the counterclockwise close-range side shot waypoint P7 = count_point_d(P45_theta_n, close range, P5). Call the waypoint calculation method count_hd(P5, P7, gimbal angle of the side shot with the cable clamp, 'takephoto', 'fixed', close range, 'Insulator') to calculate the waypoint and add it to the temporary waypoint group. 3.10 Call the vector rotation method to rotate P46 counterclockwise; P46_theta_n=rotate_vector_2d(P46, side angle), calculates the coordinates of the waypoint for long-distance upward shooting of the insulating string. P7=count_point_d(P46_theta_n, distance, P6), calls the waypoint calculation method count_hd(P6, P7, - angle of upward shooting gimbal, 'takephoto', 'fixed', distance, 'Insulator') to calculate the waypoint, and adds the waypoint to the temporary waypoint group; 3.11 If the current insulation is the last string in the group, add a tower foundation photo point, call the waypoint coordinate calculation method, calculate the waypoint coordinates of the overhead photo at the midpoint of the hanging point P7=count_point_d(P45, midpoint, P5), directly set the gimbal angle to 65 degrees, call count_hd(P5, P7, 65, 'takephoto', 'fixed', midpoint, 'Insulator'), and add the waypoint to the temporary waypoint array; After completing the above 11 steps, the waypoints for taking photos of the ground wire attachment point are generated. The waypoints include 2 safe waypoints, 2 close-up frontal photo points, 1 medium-range photo point, 2 close-up side photo points, 1 side upward photo point, 1 vibration damper photo point, and 1 tower foundation photo point. 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.

2. An automatic inspection route generation method, characterized in that it includes: Obtain device tag data, wherein the device tag data includes device name and device spatial coordinates; The device tag data is initialized to obtain initialization data; The initialization data is extracted in units of tower units to obtain data groups; In response to the fact that the number of data groups is three, the automatic patrol route is generated using a second preset algorithm, wherein the second preset algorithm performs navigation planning for the catapult. The second preset algorithm includes the following steps: 1.1 The reference vector P12 = P2 - P1 is obtained by rotating the reference vector P12 clockwise; P12_s = rotate_vector_2d(P12, -side angle), obtained by rotating P12 counterclockwise; P12_n = rotate_vector_2d(P12, 180 - side angle); The coordinates of the midpoint of the insulator string are P6 = (P3 + P5) / 2; 1.2 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the far safe path of the upper attachment point in the direction of P12_s: P7 = count_point_d(P12_s, far distance, P3). After increasing the height of P3, we get P3_h = [x3, y3, z3+8]. Call count_hd(P3_h, P7, far distance gimbal angle, 'waypoint', 'fixed', far distance, 'Insulator') to add the waypoint to the temporary waypoint array. 1.3 Call the waypoint coordinate calculation method to calculate the waypoint coordinates for close-up photography at the mounting point: P7 = count_point_d(P12_s, close-up, P3), call count_hd(P3, P7, close-up gimbal angle, 'takephoto', 'fixed', close-up, 'Insulator'), and add the waypoint to the temporary waypoint array; 1.4 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the down-angle close-up shot at the P12_s direction: P7=count_point_d(P12_s, close-up, P5), call count_hd(P5, P7, gimbal angle for side shot with cable clamp, 'takephoto', 'fixed', close-up, 'Insulator'), and add the waypoint to the temporary waypoint array; 1.5 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the front-facing photo of the midpoint of the insulation string in the P12_s direction. P7=count_point_d(P12_s, midpoint distance, P6), call count_hd(P6, P7, gimbal angle of the side shot of the wire clamp, 'takephoto', 'fixed', midpoint distance, 'Insulator'), and add the waypoint to the temporary waypoint array; 1.6 Calculate the coordinates of the waypoint for long-distance upward shooting of the insulating string in the direction of P12_s. P7=count_point_d(P12_s, distance, P6), call the waypoint calculation method count_hd(P6, P7, - angle of upward shooting gimbal, 'takephoto', 'fixed', distance, 'Insulator') to calculate the waypoint, and add the waypoint to the temporary waypoint group; 1.7 Add the long-distance safe waypoints in the P12_s direction calculated in 1.2; 1.8 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the far safe path of the upper attachment point in the direction of P12_s: P7 = count_point_d(P12_n, far distance, P3). After increasing the height of P3, we get P3_h = [x3, y3, z3+8]. Call count_hd(P3_h, P7, far distance gimbal angle, 'waypoint', 'fixed', far distance, 'Insulator') to add the waypoint to the temporary waypoint array. 1.9 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the close-up overhead photo taken from the down-mounted point in the P12_n direction: P7=count_point_d(P12_n, close-up, P5), call count_hd(P5, P7, gimbal angle for side shot with cable clamp, 'takephoto', 'fixed', close-up, 'Insulator'), and add the waypoint to the temporary waypoint array; 2.0 Call the waypoint coordinate calculation method to calculate the waypoint coordinates of the front-facing photo of the midpoint of the insulation string in the P12_n direction. P7=count_point_d(P12_n, midpoint distance, P6), call count_hd(P6, P7, gimbal angle of the side shot of the wire clamp, 'takephoto', 'fixed', midpoint distance, 'Insulator'), and add the waypoint to the temporary waypoint array; 2.1 Add the long-distance safe waypoints along the P12_n direction calculated in 1.7; In response to the completion of waypoint generation, the waypoints in the temporary waypoint array are added to the formal waypoint array, and the temporary waypoint array is cleared.

3. The automatic inspection route generation method according to claim 1 or claim 2, characterized in that, The initialization of the device tag data to obtain initialization data includes: A list of straight-line towers is extracted from a pre-set ledger database, wherein the list of straight-line towers includes the line name and tower number; Based on the line name and the tower number, query the coordinates of the tower midpoint from the preset coordinate database; Determine the midpoint of the coordinates of the ground wire suspension points on both the left and right sides of the tower; The coordinate offset is determined based on the coordinates of the midpoint of the coordinate system and the midpoint of the tower. Based on the coordinate offset, determine the coordinates of the tower's calibration midpoint; Based on the coordinates of the calibration midpoint, a reference vector is determined, wherein the reference vector is between two adjacent towers; The tower type of the straight-line tower is determined based on the reference vector and the tower label.

4. The automatic inspection route generation method according to claim 1 or claim 2, characterized in that, The initialization of the device tag data to obtain initialization data includes: The device tag data is cleaned according to a preset cleaning strategy to obtain cleaned data. The cleaned data is initialized to obtain the initialization data.

5. The automatic inspection route generation method according to claim 1 or claim 2, characterized in that, Also includes: According to the preset route safety detection strategy, the automatic patrol route is subjected to safety detection, and the detection results are obtained.

6. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the automatic patrol route generation method as described in any one of claims 1 to 5.

7. 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 as described in any one of claims 1 to 5 when running on a computer or processor.

Citation Information

Patent Citations

  • Electric power inspection route full-autonomous planning method based on three-dimensional space target point extraction

    CN117826854A