Obstacle environment shortest path design method and system based on point-line distance analysis and electronic equipment
By transforming the shortest path planning in the obstacle environment into a point-line problem in plane geometry, identifying standard inflection points and optimizing excessive connections, the problem of low efficiency in the shortest path planning in the obstacle environment in the prior art is solved, and more efficient and accurate path planning is achieved.
Patent Information
- Application Number
- CN202510099441.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-23
AI Technical Summary
The prior art is difficult to effectively improve the efficiency of shortest path planning under obstacle conditions, resulting in unsatisfactory search results.
Through the method based on point-line distance analysis, the analysis model of the shortest path is transformed into the dot-line problem in plane geometry, and the standard inflection points that can bypass the enclosed area of the obstacle, and the over-connection is optimized to obtain the shortest collision avoidance path closest to the obstacle.
It reduces the difficulty of calculation, improves the processing and calculation speed, and improves the output efficiency and accuracy of the shortest collision avoidance path.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer graphics and geographic information science and technology, and more specifically, to a method for designing the shortest path in an obstacle environment based on point-line distance analysis. In addition, the present invention also relates to a system and electronic equipment for designing the shortest path in an obstacle environment based on point-line distance analysis. Background Art
[0002] The collision avoidance shortest path planning method is a common task in path planning and is widely used in logistics, transportation, urban planning, tourist route planning, emergency prevention and handling and other fields.
[0003] This problem belongs to the category of shortest path, and its solution often adopts mathematical thinking such as D's algorithm or cluster thinking such as particle swarm algorithm and genetic algorithm, and analyzes multi-objective problems by simulating biological foraging behavior.
[0004] In the prior art, there is a method of optimizing and searching paths in obstacle environments by considering the maximum angle of sight. However, the maximum angle of this algorithm will expand the range, and the search results may be larger than the optimal result, so the search results are not ideal.
[0005] Therefore, how to provide a shortest path design method in an obstacle environment based on point-line distance analysis, which can overcome the existing technical problems and improve the efficiency of shortest path planning in an obstacle environment, has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a method for designing the shortest path in an obstacle environment based on point-line distance analysis, which can overcome the problems of the prior art and improve the efficiency of shortest path planning in an obstacle environment. In addition, the present invention also relates to a system and electronic device for designing the shortest path in an obstacle environment based on point-line distance analysis, which also have the above technical effects.
[0007] The technical solution provided by the present invention is as follows:
[0008] The present invention provides a shortest path design method for an obstacle environment based on point-line distance analysis, comprising the following steps: S1 constructing an initial line based on the coordinates of a starting point, and obtaining the coordinates and position information of the initial line; S2 obtaining the boundary line information of the obstacle enclosure, and analyzing to obtain the coordinate information of the obstacle enclosure area and the boundary line of the obstacle enclosure area; S3 screening out the obstacle enclosure area overlapping with the initial line; S4 identifying, based on the initial line, a standard inflection point that can bypass the obstacle enclosure area and is closest to the initial line; S5 connecting the standard inflection points in sequence from the starting point to obtain multiple sections of transition lines; S6 optimizing the multiple sections of the transition lines to obtain the standard lines that do not overlap with the obstacle enclosure area; S7 taking the line to be processed as a reference line, repeating steps S4-S6, and all the transition lines are standard lines; S8 connecting all the standard lines to obtain a first collision avoidance path.
[0009] Furthermore, in a preferred embodiment of the present invention, the step of "based on the initial line, identifying a standard turning point that can bypass the obstacle enclosed area and is closest to the initial line" specifically includes the following steps: using the initial line as a reference line; identifying the point where the obstacle enclosed area is located at the farthest point in the vertical distance on both sides of the reference line; and selecting the point with the shortest vertical distance among the farthest points on both sides as the standard turning point.
[0010] Furthermore, in a preferred embodiment of the present invention, the step of "identifying that the obstacle enclosed area is located at the point with the farthest vertical distance on both sides of the reference line" specifically includes the following steps: identifying that the obstacle enclosed area is divided by the initial line and is located at the obstacle area on both sides of the initial line; judging the two endpoints on the boundary line of the obstacle area on both sides that are farthest from the reference line based on the coordinate information of the boundary line of the obstacle enclosed area and the coordinates and position information of the initial line; these two endpoints are the points where the obstacle enclosed area is located at the farthest vertical distance on both sides of the reference line.
[0011] Furthermore, in a preferred embodiment of the present invention, the "step S6 optimizes the multiple segments of the transition lines to obtain the standard lines that do not overlap with the obstacle enclosed area" specifically includes the following steps: determining whether the transition lines overlap with the obstacle enclosed area; defining the transition lines that do not overlap with the obstacle enclosed area as standard lines; defining the transition lines that overlap with the obstacle enclosed area as lines to be processed.
[0012] Furthermore, in a preferred embodiment of the present invention, an initial connection line is constructed based on the coordinates of the starting point and the coordinates of the target point.
[0013] Furthermore, in a preferred embodiment of the present invention, an initial connection line is constructed based on the coordinates of the starting point and the target direction.
[0014] Furthermore, in a preferred embodiment of the present invention, the method for generating obstacle enclosing edge line information comprises the following steps: acquiring obstacle contour edge line information; and outputting obstacle enclosing edge line information using the obstacle contour edge line information.
[0015] Furthermore, in a preferred embodiment of the present invention, the method also includes the following steps: if in step S4, a single obstacle enclosed area is located on both sides of the initial line and has two standard inflection points that meet the requirements, the standard inflection points are used as transition standard inflection points; steps S4 to S8 are continuously executed with the two transition standard inflection points of the single obstacle enclosed area respectively; the lengths of the multiple first collision avoidance paths finally obtained are judged and selected, and the shortest first collision avoidance path is selected as the shortest collision avoidance path output.
[0016] In addition, the present invention also provides a shortest path design system under an obstacle environment based on point-line distance analysis, which is used to execute the shortest path design method under an obstacle environment based on point-line distance analysis as described above; the system includes: a first acquisition module, the first acquisition module is used to execute steps S1 and S2; a first processing module, the first processing module is used to execute step S3; a second processing module, the second processing module is used to execute steps S4 to S7; a first output module, the first output module is used to execute step S8.
[0017] In addition, the present invention also provides an electronic device, comprising: a computer program, the computer program is used to execute the shortest path design method in an obstacle environment based on point-line distance analysis as described above; a memory, the memory is used to store the computer program; and a processor, the processor is used to execute the computer program.
[0018] Compared with the prior art, in the technical solution of the shortest path design method in an obstacle environment based on point-line distance analysis provided by the present application, by converting the analysis model of the shortest path into a point-line problem in plane geometry, the computational difficulty of deriving the shortest path in the prior art is reduced, and the processing and calculation speed is improved; further, by identifying the standard turning point that can bypass the obstacle enclosed area and is closest to the initial connection line, the excessive connection line is repeatedly processed to obtain the shortest first collision avoidance path closest to the obstacle. The technical solution provided by the present application can improve the output efficiency and accuracy of the shortest collision avoidance path.
[0019] Compared with the prior art, the shortest path design method under an obstacle environment based on point-line distance analysis of the present invention has the following beneficial effects:
[0020] 1. The shortest path design method in an obstacle environment based on point-line distance analysis solves the point connection problem. The part of the direct path that passes through the obstacle is replaced by the outer line of the obstacle. It is very suitable for rapid access path analysis in the field of emergency disasters;
[0021] 2. The invention can quickly provide a better initial path connecting the target point by analyzing the distance of the feature points around the obstacle and using the minimum angle principle, thus providing the possibility for subsequent path optimization;
[0022] 3. This invention uses spatial superposition analysis technology to automatically remove and replace the part of the path that overlaps the obstacle range. The principle is simple and easy to implement, and the optimized result is closer to the optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A schematic diagram of an obstacle and a target point case involved in an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of connecting target points involved in an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of an obstacle polygon close to a central axis analysis according to an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of a nearest neighbor point 1 of a central axis connecting obstacles involved in an embodiment of the present invention;
[0028] Figure 5 Schematic diagram of the nearest neighbor point 2 of the central axis connecting obstacles involved in an embodiment of the present invention;
[0029] Figure 6 A schematic diagram of a nearest neighbor point 3 of a central axis connecting obstacles involved in an embodiment of the present invention;
[0030] Figure 7 A schematic diagram of a nearest neighbor point 4 of a central axis connecting obstacles involved in an embodiment of the present invention;
[0031] Figure 8 A schematic diagram of a nearest neighbor point 5 of a central axis connecting obstacles involved in an embodiment of the present invention;
[0032] Fig. 9 It is a schematic diagram of the final result of the nearest neighbor point of the central axis connecting obstacles involved in the embodiment of the present invention;
[0033] Fig.10 A schematic diagram of a line connecting the nearest points passing through an obstacle according to an embodiment of the present invention;
[0034] Fig.11 A schematic diagram of a case of processing a nearest point connection line crossing an obstacle according to an embodiment of the present invention;
[0035] Fig.12 A schematic diagram of the result of obstacle crossing processing according to an embodiment of the present invention;
[0036] Fig.13 This is a diagram showing a final search result example according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions 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 the field without creative work are within the scope of protection of the present invention.
[0038] It should be noted that when an element is referred to as being "fixed on" or "set on" another element, it can be directly on the other element or indirectly set on the other element; when an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0039] It should be understood that the terms "length", "width", "up", "down", "front", "back", "first", "second", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0040] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" and "several" is two or more, unless otherwise clearly and specifically defined.
[0041] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with this technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantive technical significance. Any structural modification, change in proportion or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical contents disclosed by the present invention.
[0042] like Figures 1 to 13 As shown, an embodiment of the present invention provides a method for designing the shortest path in an obstacle environment based on point-line distance analysis, including: S1 constructing an initial line based on the coordinates of a starting point, and obtaining the coordinates and position information of the initial line; S2 obtaining the obstacle enclosed edge line information, and analyzing to obtain the coordinate information of the obstacle enclosed area and the edge line of the obstacle enclosed area; S3 screening out the obstacle enclosed area overlapping with the initial line; S4 identifying, based on the initial line, a standard inflection point that can bypass the obstacle enclosed area and is closest to the initial line; S5 connecting the standard inflection points in sequence from the starting point to obtain multiple segments of transition lines; S6 optimizing the multiple segments of the transition lines to obtain the standard lines that do not overlap with the obstacle enclosed area; S7 taking the line to be processed as the reference line, repeating steps S4-S6, and all the transition lines are standard lines; S8 connecting all the standard lines to obtain the first collision avoidance path.
[0043] In the technical solution of the shortest path design method in an obstacle environment based on point-line distance analysis provided by the present application, by converting the analytical model of the shortest path into a point-line problem in plane geometry, the computational difficulty of deriving the shortest path in the prior art is reduced, and the processing and calculation speed is improved; further, by identifying the standard turning point that can bypass the obstacle enclosed area and is closest to the initial connection line, the excessive connection line is repeatedly processed to obtain the shortest first collision avoidance path closest to the obstacle. The technical solution provided by the present application can improve the output efficiency and accuracy of the shortest collision avoidance path.
[0044] Specifically, in an embodiment of the present invention, the "based on the initial line, identifying the standard inflection point that can bypass the obstacle enclosed area and is closest to the initial line;" specifically includes the following steps: taking the initial line as the reference line; identifying the point where the obstacle enclosed area is located at the farthest point in the vertical distance on both sides of the reference line; selecting the point with the shortest vertical distance among the farthest points on both sides as the standard inflection point.
[0045] It should be noted that the point with the shortest vertical distance among the points with the longest vertical distance on both sides is selected as the standard turning point to simulate that human spatial thinking is mostly self-centered, and gradually extends from far to near to a limited area through vision. Then the nearest standard turning point is selected for detour to obtain the current shortest collision avoidance path over the obstacle.
[0046] Specifically, in an embodiment of the present invention, the "identifying that the obstacle enclosed area is located at the point with the farthest vertical distance on both sides of the baseline" specifically includes the following steps: identifying that the obstacle enclosed area is divided by the initial line and is located on both sides of the initial line; judging the two endpoints on the boundary line of the obstacle area on both sides that are farthest from the baseline according to the coordinate information of the boundary line of the obstacle enclosed area and the coordinates and position information of the initial line; these two endpoints are the points with the farthest vertical distance on both sides of the obstacle enclosed area of the baseline.
[0047] It should be noted that the point-line distance analysis is combined to achieve rapid identification of the nearest standard inflection point.
[0048] Specifically, in an embodiment of the present invention, the "step S6 optimizes the multiple segments of the transition lines to obtain the standard lines that do not overlap with the obstacle enclosed area" specifically includes the following steps: determining whether the transition lines overlap with the obstacle enclosed area; defining the transition lines that do not overlap with the obstacle enclosed area as standard lines; defining the transition lines that overlap with the obstacle enclosed area as lines to be processed.
[0049] Specifically, in an embodiment of the present invention, an initial connection line is constructed based on the coordinates of the starting point and the coordinates of the target point; or an initial connection line is constructed based on the coordinates of the starting point and the target direction. Specifically, in an embodiment of the present invention, the method for generating obstacle enclosing edge information includes the following steps: obtaining obstacle contour edge information; outputting obstacle enclosing edge information using the obstacle contour edge information.
[0050] It should be noted that by judging whether the screening line overlaps with the obstacle enclosed area, the standard lines of the entire section are gradually sorted out; and then the shortest collision avoidance path is obtained.
[0051] Specifically, in an embodiment of the present invention, the method also includes the following steps: if in step S4, a single obstacle enclosed area is located on both sides of the initial line and has two standard inflection points that meet the requirements, the standard inflection points are used as transition standard inflection points; steps S4 to S8 are continuously executed with the two transition standard inflection points of the single obstacle enclosed area respectively; the lengths of the multiple first collision avoidance paths finally obtained are determined and selected, and the shortest first collision avoidance path is selected as the shortest collision avoidance path output.
[0052] It should be noted that, by comprehensively judging a plurality of possible first collision avoidance paths, the shortest first collision avoidance path is screened out and output as the shortest collision avoidance path.
[0053] In addition, an embodiment of the present invention also provides a shortest path design system under an obstacle environment based on point-line distance analysis, which is used to execute the shortest path design method under an obstacle environment based on point-line distance analysis as described above; the system includes: a first acquisition module, the first acquisition module is used to execute steps S1 and S2; a first processing module, the first processing module is used to execute step S3; a second processing module, the second processing module is used to execute steps S4 to S7; a first output module, the first output module is used to execute step S8.
[0054] In addition, an embodiment of the present invention also provides an electronic device, including: a computer program, the computer program is used to execute the shortest path design method in an obstacle environment based on point-line distance analysis as described above; a memory, the memory is used to store the computer program; and a processor, the processor is used to execute the computer program.
[0055] It should be noted that the technical solution adopted by the present invention is: a method for designing the shortest path in an obstacle environment based on point-line distance analysis, comprising the following steps:
[0056] This application discloses a method for designing the shortest path in an obstacle environment based on point-line distance analysis, taking the case of simultaneously delivering emergency supplies to an epidemic area across a river as an example for analysis, including the following steps:
[0057] like Figure 1 , S1. Extract obstacle and surface target point information;
[0058] like Figure 2 , S2. Construct a target point connection line, using it as the central axis;
[0059] like Figure 3 , S3. Extract the corner points of the obstacle polygon;
[0060] S4. According to the principle of smaller vertical distance, search for the corner point with the shortest distance to the central axis;
[0061] like Figure 4-8 , S5. Repeat step S4 until the corner points of all obstacles closest to the central axis are searched;
[0062] like Fig. 9 , S6. Connect each obstacle polygon corresponding to the nearest central axis corner point;
[0063] like Fig.10, S7. If the line crosses the obstacle polygon, repeat steps S2-S6 according to the above thinking until the line does not cross the obstacle polygon;
[0064] like Fig.11 , S8. For the line connecting two points on the polygon, if there are two options, the one with the shorter distance shall prevail;
[0065] like Fig.13 , S9. Repeat step S8 until all obstacle polygons have completed distance optimization, such as Fig.12 , the result is the optimal solution for connecting the target points in an obstacle environment;
[0066] Preferably, the path planning method is used for planar path planning.
[0067] In the scheme involved in the present invention, the mutual constraints of lines and surfaces in two-dimensional space are adopted, guided by the thinking of dimensionality increase and dimensionality reduction, and the breakthrough is entrusted by the thinking of polar coordinates. The ray divergence thinking is adopted to construct the target point range polygon, and through spatial superposition analysis, the target point connection line is transformed into a polygon adjacency analysis to cover the target point, and then each path is optimized internally, and finally the adjacent paths are optimized to achieve the unified effect of the optimal single path and the optimal overall path, and realize the goal of parallel multi-target simultaneous delivery path planning. In summary, the technical solution of the present invention can overcome the problems of the existing technology, improve the efficiency of the shortest path planning in an obstacle environment, and has outstanding substantive characteristics and significant technical progress. In addition, the present invention also relates to an obstacle environment shortest path design system and electronic equipment based on point-line distance analysis. It also has the above-mentioned technical effects.
[0068] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. The shortest path design method in an obstacle environment based on point-line distance analysis is characterized by: The method comprises the following steps: S1 constructs an initial connection line based on the coordinates of the starting point and obtains the initial connection line coordinates and position information; S2 obtains the obstacle encirclement boundary information, and analyzes and obtains the coordinate information of the obstacle encirclement area and the boundary of the obstacle encirclement area; S3 screens out the obstacle area overlapping with the initial line; S4, based on the initial connection line, identifying a standard turning point that can bypass the obstacle enclosed area and is closest to the initial connection line; S5 starts from the starting point and connects the standard inflection points in sequence to obtain multiple transition lines; S6: optimizing the multiple segments of the transition lines to obtain the standard lines that do not overlap with the obstacle enclosed area; S7 takes the connection to be processed as the reference connection, and repeats steps S4-S6, so that all the transition connections are standard connections; S8 connects all the standard lines to obtain a first collision avoidance path.
2. The shortest path design method under obstacle environment based on point-line distance analysis according to claim 1 is characterized in that: The "based on the initial connection line, identifying a standard turning point that can bypass the obstacle enclosed area and is closest to the initial connection line;" specifically includes the following steps: Using the initial connection line as a reference connection line; Identify that the obstacle enclosed area is located at the point with the longest vertical distance on both sides of the reference line; Select the point with the shortest vertical distance among the points with the longest vertical distance on both sides as the standard inflection point.
3. The shortest path design method under obstacle environment based on point-line distance analysis according to claim 2 is characterized in that: The “identifying that the obstacle enclosed area is located at the point with the longest vertical distance on both sides of the reference line” specifically includes the following steps: Identify the obstacle enclosed area divided by the initial line, and the obstacle areas located on both sides of the initial line; Determine the two endpoints on the obstacle area boundaries on both sides that are farthest from the reference line according to the coordinate information of the obstacle enclosed area boundary and the initial line coordinates and position information; These two endpoints are the points where the obstacle enclosed area is located at the farthest vertical distance on both sides of the reference line.
4. The shortest path design method under obstacle environment based on point-line distance analysis according to claim 3 is characterized in that: The "step S6 optimizes the multiple segments of the transition lines to obtain the standard lines that do not overlap with the obstacle enclosed area" specifically includes the following steps: Determining whether the transition line overlaps with the obstacle enclosed area; defining the transition line that does not overlap with the obstacle enclosed area as a standard line; The excessive link that overlaps the obstacle enclosed area is defined as a link to be processed.
5. The shortest path design method in an obstacle environment based on point-line distance analysis according to any one of claims 1 to 4, characterized in that: Construct an initial line based on the start point coordinates and the target point coordinates; or Construct an initial connection based on the starting point coordinates and the target direction.
6. The shortest path design method under obstacle environment based on point-line distance analysis according to claim 5 is characterized in that: The method for generating obstacle enclosing boundary information comprises the following steps: Obtain obstacle contour information; The obstacle contour edge information is used to output obstacle enclosing edge information.
7. The shortest path design method under obstacle environment based on point-line distance analysis according to claim 5 is characterized in that: The method further comprises the following steps: If in step S4, a single obstacle enclosed area is located on both sides of the initial line and has two standard inflection points that meet the standard, the standard inflection points are used as transition standard inflection points; Continuously executing steps S4 to S8 at two transition standard inflection points of a single obstacle enclosed area respectively; The lengths of the multiple first collision avoidance paths finally obtained are determined and selected, and the shortest first collision avoidance path is selected as the shortest collision avoidance path output.
8. The shortest path design system in an obstacle environment based on point-line distance analysis is characterized by: The system is used to execute the shortest path design method in an obstacle environment based on point-line distance analysis as described in any one of claims 1 to 7; The system includes: A first acquisition module, the first acquisition module is used to execute step S1 and step S2; A first processing module, wherein the first processing module is used to execute step S3; A second processing module, the second processing module is used to execute steps S4 to S7; A first output module, wherein the first output module is used to execute step S8.
9. An electronic device, characterized in that include: A computer program, the computer program being used to execute the shortest path design method in an obstacle environment based on point-line distance analysis as claimed in any one of claims 1 to 7; A memory, the memory being used to store the computer program; A processor is used to execute the computer program.