Route planning method, system, equipment and medium based on B-spline curve equation

The route is smoothed through the B-spline curve equation, which solves the problem of path non-smoothing in traditional route planning, and improves the efficiency of route planning and the smoothness of route planning.

CN117948978BActive Publication Date: 2024-11-15CHINA SOUTHERN AIRLINES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410070239.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-17
Publication Date
2024-11-15
Estimated Expiration
2044-01-17

AI Technical Summary

Technical Problem

Traditional route planning methods will produce spikes at the turn of the route, resulting in unsmooth planned paths, affecting the efficiency and fit of the actual route.

Method used

The route is smoothed based on the B-spline equation, and smoothed the route by discrete nodes, filtering important nodes, dividing the set of nodes to be processed and smoothing it using the B-spline equation to generate a smooth route.

Benefits of technology

The efficiency of route planning is improved, making the planned path smoother and more in line with the actual route.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117948978B_ABST
    Figure CN117948978B_ABST
Patent Text Reader

Abstract

The present invention provides a route planning method, system, device and medium based on B-spline curve equation, including: performing route planning according to a start node and an end node by a preset route planning algorithm to generate a first route; and smoothing the first route by a B-spline curve equation to obtain a second route. The route planning efficiency can be improved, and the planned path can be made smoother.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of aviation operation command technology, and in particular to a route planning method, system, equipment and medium based on a B-spline curve equation. Background Art

[0002] With the investment of a large amount of funds and manpower, more and more aircraft are being put into production and life. Aircraft are divided into two categories: civil and military. Civil aircraft have become an indispensable part of traffic and transportation, providing people with a more convenient and efficient way of life and production. In order to reduce the burden on pilots, more and more aviation missions are currently calculated and planned with the help of computers. Route planning uses computers instead of manual selection and planning of routes, which can not only improve efficiency, but also assist pilots in responding in time when the aircraft is in a dangerous emergency environment.

[0003] Traditional route planning methods are mainly divided into four types: graph search-based, sampling-based, curve interpolation-based, and bio-inspired. Among them, the route planning method based on graph search is more suitable for route planning of aircraft (such as airplanes) because of its fast, efficient, and stable characteristics. The essence of graph search is to traverse a state space from the starting point to the target point, and find an optimal passable route in the state space. The route planning method based on graph search rasterizes the map to achieve fast search, and is currently the most widely used path planning method. However, the waypoints it selects can only be the center of the grid, and spikes will be generated at the turning points of the path, resulting in an uneven planned path. Summary of the invention

[0004] The present invention provides a route planning method, system, device and medium based on a B-spline curve equation, which can improve the route planning efficiency and make the planned path smoother.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a route planning method based on a B-spline curve equation, the method comprising:

[0006] According to the starting node and the ending node, a route is planned by using a preset route planning algorithm to generate a first route;

[0007] The first route is smoothed by using a B-spline curve equation to obtain a second route.

[0008] Preferably, the step of smoothing the first route using a B-spline curve equation to obtain a second route comprises:

[0009] Discretize the first route to obtain a first discrete node set;

[0010] Filtering the first discrete node set according to preset important nodes to obtain a second discrete node set;

[0011] Dividing the second discrete node set into multiple discrete node sets to obtain multiple to-be-processed node sets;

[0012] The node set to be processed is smoothed by the B-spline curve equation to obtain multiple routes;

[0013] Connecting the multiple routes in sequence to obtain the second route;

[0014] Among them, the important nodes include route intersection points, preset major city nodes, and preset important route nodes.

[0015] Preferably, the method further comprises:

[0016] The second route is smoothed again to obtain a third route.

[0017] Preferably, before the to-be-processed set is smoothed by the B-spline curve equation to obtain a plurality of corresponding routes, the method further includes:

[0018] Create a memo to store the calculated basis function values;

[0019] When it is necessary to calculate the basis function value, check whether there is a corresponding calculation result in the memorandum;

[0020] If so, return the checked calculation result and terminate the calculation;

[0021] If not, perform basis function calculation and store the calculation result in the memo.

[0022] Preferably, the generating of the first route by performing route planning according to the starting node and the ending node by using a preset route planning algorithm includes:

[0023] Converting the map where the starting node and the ending node are located into a grid map;

[0024] Create an open table and a close table, and add the start node to the open table;

[0025] According to the starting node, a first route is generated by performing route planning by using an A-star algorithm;

[0026] Wherein, each grid in the grid map contains a node, and the node is located at the center of the grid; the open table adopts a minimum binary heap data structure.

[0027] Preferably, the generating the first route by performing route planning according to the starting node by using an A-star algorithm includes:

[0028] Obtaining a first set of nodes to be expanded by screening out the starting node and preset obstacle nodes in the grid map;

[0029] Constructing a heuristic function according to the starting node, the ending node and the first set of nodes to be expanded;

[0030] According to the starting node, calculating the first generation value of each node in the first set of nodes to be expanded by using the heuristic function;

[0031] Select the node with the smallest value in the first generation to update the current node, and add the updated current node to the close table;

[0032] Acquire a second set of nodes to be expanded from the first set of nodes to be expanded according to the updated current node and the preset constraint condition;

[0033] According to the updated current node, the second generation value of each node in the second set of nodes to be expanded is calculated by the heuristic function, the node with the smallest second generation value is selected as the target node, and the target node is added to the close table;

[0034] Detecting whether the target node is a termination node;

[0035] If not, the target node is updated to the current node, and the second set of nodes to be expanded is reacquired according to the updated current node and the preset constraint condition, and the target node is recalculated, until the calculated target node is the termination node;

[0036] If so, output the first route according to the nodes in the close table and the target node.

[0037] Preferably, constructing a heuristic function according to the starting node, the ending node and the first set of nodes to be expanded includes:

[0038] Generate a first path and a second path according to the starting node, the ending node and the first set of nodes to be expanded; wherein the first path is a straight line path from the starting node to the ending node, and the second path is a straight line path between the starting node and any node in the first set of nodes to be expanded;

[0039] Calculating the distance of the first path to obtain a first distance;

[0040] Calculating the distance of the second path to obtain a second distance;

[0041] Obtaining a current position according to an angle between the second path and the first path;

[0042] The heuristic function is constructed according to the first distance, the second distance and the current position.

[0043] Compared with the prior art, the present invention provides a route planning method based on a B-spline curve equation, including: according to the starting node and the ending node, route planning is performed by a preset route planning algorithm to generate a first route; the first route is smoothed by the B-spline curve equation to obtain a second route. The generated first route is smoothed by the B-spline curve equation, the peaks in the first route are eliminated, and a smooth second route is generated as the target route obtained by planning, so that the obtained target route is more consistent with the actual route; therefore, the route planning efficiency can be improved, and the planned path can be made smoother.

[0044] In order to solve the above technical problems, an embodiment of the present invention further provides a route planning system based on a B-spline curve equation, the system comprising:

[0045] A first route generation module, used to perform route planning according to the starting node and the ending node by using a preset route planning algorithm to generate a first route;

[0046] The second route generating module is used to perform smoothing processing on the first route by using a B-spline curve equation to obtain a second route.

[0047] Preferably, the step of smoothing the first route using a B-spline curve equation to obtain a second route comprises:

[0048] Discretize the first route to obtain a first discrete node set;

[0049] Filtering the first discrete node set according to preset important nodes to obtain a second discrete node set;

[0050] Dividing the second discrete node set into multiple discrete node sets to obtain multiple to-be-processed node sets;

[0051] The node set to be processed is smoothed by the B-spline curve equation to obtain multiple routes;

[0052] Connecting the multiple routes in sequence to obtain the second route;

[0053] Among them, the important nodes include route intersection points, preset major city nodes, and preset important route nodes.

[0054] Preferably, the system further comprises:

[0055] The third route generating module is used to perform smoothing processing on the second route again to obtain a third route.

[0056] Preferably, before the to-be-processed set is smoothed by the B-spline curve equation to obtain a plurality of corresponding routes, the method further includes:

[0057] Create a memo to store the calculated basis function values;

[0058] When it is necessary to calculate the basis function value, check whether there is a corresponding calculation result in the memorandum;

[0059] If so, return the checked calculation result and terminate the calculation;

[0060] If not, perform basis function calculation and store the calculation result in the memo.

[0061] Preferably, the generating of the first route by performing route planning according to the starting node and the ending node by using a preset route planning algorithm includes:

[0062] Converting the map where the starting node and the ending node are located into a grid map;

[0063] Create an open table and a close table, and add the start node to the open table;

[0064] According to the starting node, a first route is generated by performing route planning by using an A-star algorithm;

[0065] Wherein, each grid in the grid map contains a node, and the node is located at the center of the grid; the open table adopts a minimum binary heap data structure.

[0066] Preferably, the generating the first route by performing route planning according to the starting node by using an A-star algorithm includes:

[0067] Obtaining a first set of nodes to be expanded by screening out the starting node and preset obstacle nodes in the grid map;

[0068] Constructing a heuristic function according to the starting node, the ending node and the first set of nodes to be expanded;

[0069] According to the starting node, calculating the first generation value of each node in the first set of nodes to be expanded by using the heuristic function;

[0070] Select the node with the smallest value in the first generation to update the current node, and add the updated current node to the close table;

[0071] Acquire a second set of nodes to be expanded from the first set of nodes to be expanded according to the updated current node and the preset constraint condition;

[0072] According to the updated current node, the second generation value of each node in the second set of nodes to be expanded is calculated by the heuristic function, the node with the smallest second generation value is selected as the target node, and the target node is added to the close table;

[0073] Detecting whether the target node is a termination node;

[0074] If not, the target node is updated to the current node, and the second set of nodes to be expanded is reacquired according to the updated current node and the preset constraint condition, and the target node is recalculated, until the calculated target node is the termination node;

[0075] If so, output the first route according to the nodes in the close table and the target node.

[0076] Preferably, constructing a heuristic function according to the starting node, the ending node and the first set of nodes to be expanded includes:

[0077] Generate a first path and a second path according to the starting node, the ending node and the first set of nodes to be expanded; wherein the first path is a straight line path from the starting node to the ending node, and the second path is a straight line path between the starting node and any node in the first set of nodes to be expanded;

[0078] Calculating the distance of the first path to obtain a first distance;

[0079] Calculating the distance of the second path to obtain a second distance;

[0080] Obtaining a current position according to an angle between the second path and the first path;

[0081] The heuristic function is constructed according to the first distance, the second distance and the current position.

[0082] In order to solve the above technical problems, an embodiment of the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the above-mentioned route planning methods based on B-spline curve equations when executing the computer program.

[0083] In order to solve the above technical problems, an embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute any one of the above-mentioned route planning methods based on B-spline curve equations.

[0084] The present invention provides a route planning method, system, device and medium based on B-spline curve equation, including: performing route planning according to a start node and an end node by a preset route planning algorithm to generate a first route; and smoothing the first route by a B-spline curve equation to obtain a second route. The route planning efficiency can be improved, and the planned path can be made smoother. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 It is a flowchart of a route planning method based on a B-spline curve equation provided by an embodiment of the present invention.

[0086] Figure 2 This is a schematic diagram of a preferred grid map provided by an embodiment of the present invention.

[0087] Figure 3 A schematic diagram of obtaining a second set of nodes to be expanded provided by an embodiment of the present invention

[0088] Figure 4 It is a structural block diagram of a route planning system based on B-spline curve equation provided by an embodiment of the present invention.

[0089] Figure 5 It is a structural block diagram of a preferred embodiment of a terminal device provided by the present invention. DETAILED DESCRIPTION

[0090] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0091] The embodiment of the present invention provides a route planning method based on a B-spline curve equation, see Figure 1 , is a flow chart of a route planning method based on a B-spline curve equation provided by an embodiment of the present invention, including steps S10 to S11:

[0092] S10, performing route planning according to the starting node and the ending node by using a preset route planning algorithm to generate a first route;

[0093] S11. Smoothing the first route using a B-spline curve equation to obtain a second route.

[0094] Specifically, it can be understood that the first route generated by route planning is the minimum cost route from the starting node to the ending node, and its corresponding path should meet the smoothness requirement so that the final route is more in line with the actual aircraft route. According to the foregoing and prior knowledge, when planning the route, peaks will be generated at the turns, so the embodiment of the present invention uses the B-spline curve equation to smooth the first route, including: based on a set composed of nodes contained in the first route. Each node in the node set is used as a control point; wherein the control point is used for calculation in the B-spline curve equation. The second route is generated based on the control point combined with the B-spline curve equation.

[0095] The present invention provides a route planning method based on a B-spline curve equation, comprising: performing route planning according to a start node and an end node by a preset route planning algorithm to generate a first route; and smoothing the first route by a B-spline curve equation to obtain a second route. The generated first route is smoothed by a B-spline curve equation, and the peaks in the first route are eliminated, and a smooth second route is generated as a target route obtained by planning, so that the obtained target route is more consistent with the actual route; therefore, the route planning efficiency can be improved, and the planned path can be made smoother.

[0096] In another embodiment of the present invention, the step of smoothing the first route using a B-spline curve equation to obtain the second route includes:

[0097] Discretize the first route to obtain a first discrete node set;

[0098] Filtering the first discrete node set according to preset important nodes to obtain a second discrete node set;

[0099] Dividing the second discrete node set into multiple discrete node sets to obtain multiple to-be-processed node sets;

[0100] The node set to be processed is smoothed by the B-spline curve equation to obtain multiple routes;

[0101] Connecting the multiple routes in sequence to obtain the second route;

[0102] Among them, the important nodes include route intersection points, preset major city nodes, and preset important route nodes.

[0103] When this embodiment is implemented, the first route is first discretized to obtain all the nodes that the route passes through, and then the nodes are screened according to the range of important nodes to obtain the appropriate number of nodes; the selection of node vectors will directly affect the shape and smoothness of the curve. Reasonable selection of node vectors can reduce the complexity of curve calculation. Unlike the conventional practice of putting all nodes into calculation, the present invention will only select important nodes and directly adjacent reachable nodes of important nodes, thereby greatly reducing the number of nodes. There are three main points in the selection of important nodes. The first point is the intersection of many route nodes; for example, when the node is passed by more than 3 routes, the point is the intersection point; the second point is the main city node, that is, the first-tier cities, high-frequency tourist cities and provincial capital cities passed during the flight; the third point is the important nodes selected by the route company, and these nodes can be added according to the needs of the route company; thus, the second discrete node set is obtained.

[0104] Then, the second discrete node set is divided into multiple discrete node sets, which are calculated and processed separately to achieve parallel calculation; because when faced with large-scale curve calculations, a single calculation unit will consume a lot of time and resources for calculation. Therefore, the curve calculation of the present invention will be based on the discrete node set corresponding to the path segment, so as to divide a long path into multiple short paths, and the specific number of divisions is arranged according to the computing resources available to the user. After the route is divided into N equal segments, each segment is simultaneously placed in different computing devices for parallel calculation, and multiple smooth curves are quickly obtained.

[0105] Finally, the two adjacent curves are connected using the shortest path method to eventually form a smooth overall curve segment, which is the second route.

[0106] In another embodiment provided by the present invention, the second route is smoothed again to obtain a third route.

[0107] In the specific implementation of this embodiment, when multiple routes are connected, there is still a possibility of generating new peaks at the connection. Therefore, after obtaining the second route, the entire route is smoothed again, which is conducive to ensuring the overall smoothness of the route.

[0108] In another embodiment provided by the present invention, before the to-be-processed set is smoothed by the B-spline curve equation to obtain a plurality of corresponding routes, the method further includes:

[0109] Create a memo to store the calculated basis function values;

[0110] When it is necessary to calculate the basis function value, check whether there is a corresponding calculation result in the memorandum;

[0111] If so, return the checked calculation result and terminate the calculation;

[0112] If not, perform basis function calculation and store the calculation result in the memo.

[0113] In the specific implementation of this embodiment, since the B-spline calculation process is a recursive process, its bottom layer is implemented as a tree structure, which means that there will be a large number of repeated operations in the recursion, which further increases the time complexity. Therefore, the present invention establishes a memorandum and uses a red-black tree as the bottom layer hash table to<key,value> The calculated basis function values ​​are stored in the form of . Whenever a basis function value needs to be calculated, first check whether the corresponding result already exists in the memo. If so, return the result directly. Otherwise, calculate and store the result in the memo.

[0114] In another embodiment of the present invention, the method of performing route planning according to the starting node and the ending node by using a preset route planning algorithm to generate a first route includes:

[0115] S20, converting the map where the starting node and the ending node are located into a grid map;

[0116] S21, create an open table and a close table, and add the start node to the open table;

[0117] S22, generating a first route by performing route planning according to the starting node by using the A-star algorithm;

[0118] Wherein, each grid in the grid map contains a node, and the node is located at the center of the grid; the open table adopts a minimum binary heap data structure.

[0119] In the specific implementation of this embodiment, step S20 specifically includes converting the map where the starting node and the ending node are located into a grid map; wherein each grid in the grid map contains a node, and the node includes the starting node corresponding to the starting point and the target node corresponding to the ending node.

[0120] It is understandable that the A-star algorithm used in the route planning of the embodiment of the present invention cannot directly use the map, and the information corresponding to the map needs to be expressed in the form of data. Specifically, in the embodiment of the present invention, the search space (map) where the route planning is located is rasterized, and the map is converted into a two-dimensional square grid structure, such as Figure 2By converting the map into a grid map, not only does it provide a source of map information for route planning, but it also simplifies the map information by merging the same blocks in the map into a regular or irregular graph (grid) and using the data (node) at the center point of the graph to represent the entire block, thereby reducing the memory usage in the route planning process and improving the efficiency of route planning.

[0121] Step S21 specifically includes creating an open table and a close table, and adding the starting node to the open table; wherein the open table adopts a minimum binary heap data structure. The open table is used to store the nodes to be searched, and the nodes in the open table are sorted from small to large according to the cost value, and the close table is used to store the nodes that have been searched. It can be understood that in the process of route planning, it is necessary to frequently take out the nodes with the minimum cost value searched from the open table and add them to the close table.

[0122] It is understandable that the A-star algorithm used in the route planning of the embodiment of the present invention needs to frequently perform insertion, deletion, and sorting operations on the nodes in the open table. At the same time, the number of nodes in the open table is relatively large, and the open table needs to be sorted after each insertion and deletion operation. The prior art uses an open table with a sequential storage structure, and the time complexity of performing insertion and deletion operations is O(n), and the time complexity of sorting is O(n2). Among them, since the node with the smallest cost value is deleted from the open table during the search, and the open table is an ordered table sorted according to the size of the node cost value, the actual time complexity when performing the deletion operation is O(1); when a new node is inserted, the open table needs to be sorted to make the open table in an ordered state. From this analysis, it is concluded that a large part of the performance consumption in the route planning process is in the sorting of the open table.

[0123] Specifically, in order to improve the efficiency of route planning, the embodiment of the present invention improves the data structure of the open table and manages the open table by adopting a tree data structure. Among them, the minimum binary heap is a typical tree data structure, and the time complexity of sorting nodes by the minimum binary heap is O(nlog2 n). Compared with the sequential storage structure adopted in the prior art, the time cost of executing node sorting in the open table is reduced.

[0124] Step S22 specifically includes, based on the starting node, using the A-star algorithm to perform route planning to generate a first route; wherein the first route is the minimum cost route from the starting node to the target node.

[0125] In another embodiment provided by the present invention, the step S22 can be further divided into the following steps S220-S227:

[0126] Step S220: determining a first set of nodes to be expanded according to the grid map;

[0127] The first set of nodes to be expanded is a set of nodes in grids other than the grid where the starting node is located and the grid where the obstacle point is located in the grid map.

[0128] Reference Figure 2 , the grid where the obstacle point is located is determined by the grid map. Specifically, the grid map of the embodiment of the present invention adopts the 0 / 1 grid division method, marking each grid with 0 or 1, wherein the grid marked with 0 represents a passable grid, and the grid marked with 1 represents an inaccessible grid, that is, the grid where the obstacle point is located. It can be understood that when performing route planning, the nodes contained in the grid where the obstacle point is located are not within the node search direction, so the embodiment of the present invention first determines the first set of nodes to be expanded according to the grid map to facilitate subsequent node searches.

[0129] Step S221: construct a heuristic function according to the starting node, the ending node and the first set of nodes to be expanded; wherein the heuristic function is used to calculate the cost value of each node.

[0130] Step S222: Based on the starting node, calculate the first generation value of each node in the first set of nodes to be expanded according to the heuristic function;

[0131] In one embodiment of the present invention, before calculating the first generation value, the open table is checked to determine whether the open table is empty. If so, the A-star algorithm ends; if not, the first generation value calculation begins.

[0132] Specifically, based on the constructed heuristic function, the starting node and each node in the first set of nodes to be expanded are respectively substituted into the heuristic function to calculate the first generation value of each node in the first set of nodes to be expanded.

[0133] Step S223: Select the node with the smallest value in the first generation as the current node, and add the current node to the close table;

[0134] Specifically, in one embodiment of the present invention, before executing subsequent steps, it is first determined whether the current node is the target node. If so, the route planning process ends; if not, the distance from the current node to the target node is calculated. If the distance from the current node to the target node is less than the specified minimum flight distance, the starting node is used as the current node, and the route planning process ends; if the distance from the current node to the target node is greater than or equal to the specified minimum flight distance, the subsequent steps are executed.

[0135] Step S224: acquiring a second set of nodes to be expanded from the first set of nodes to be expanded according to the current node and preset constraints;

[0136] Specifically, refer to Figure 3 In one embodiment of the present invention, the preset constraint condition is based on the eight-neighborhood node expansion method, and the node is further expanded according to the current node P. The A-star algorithm uses nodes B, C, D, E, F, G, H, and I (the nodes of the eight grids adjacent to the grid where the current node P is located) as nodes to be expanded, that is, as nodes in the second set of nodes to be expanded. It can be understood that the second set of nodes to be expanded in the embodiment of the present invention is obtained on the basis of the first set of nodes to be expanded. When the grid where the obstacle node is located is included in the neighborhood of the current node P, the nodes of the grid where the obstacle point is located are not in the second set of nodes to be expanded.

[0137] Step S225: Based on the current node, calculate the second generation value of each node in the second set of nodes to be expanded according to the heuristic function, select the node with the smallest second generation value as the target node, and add the target node to the close table;

[0138] Specifically, based on the heuristic function constructed in step S221, the current node and each node in the second set of nodes to be expanded are respectively substituted into the heuristic function, the second generation value of each node in the second set of nodes to be expanded is calculated, and the node with the smallest second generation value is selected from the second set of nodes to be expanded as the target node, and the target node is added to the close table. At this time, in the close table, the current node is the parent node of the target node.

[0139] In one embodiment of the present invention, before adding the target node to the close table, it is determined whether the target node already exists in the close table. If so, the cost values ​​of the two are compared, the node with the smaller cost value is retained in the close table, and the node with the larger cost value is transferred to the open table.

[0140] Step S226: confirm that the target node is not the target node, use the target node as the current node, and return to step S224;

[0141] Specifically, if the searched target node is not the termination node, the target node is used as the current node to continue to obtain the second set of nodes to be expanded to expand the next node.

[0142] Step S227, confirm that the target node is the termination node, and output the first route according to the nodes in the close table and the target node.

[0143] Specifically, if the searched target node is the end node, the end node and the nodes stored in the close table are traced back to the start node, thereby generating the minimum cost route from the start node to the target node, that is, the first route.

[0144] In another embodiment provided by the present invention, the step of constructing a heuristic function according to the starting node, the ending node and the first set of nodes to be expanded includes:

[0145] Generate a first path and a second path according to the starting node, the ending node and the first set of nodes to be expanded; wherein the first path is a straight line path from the starting node to the ending node, and the second path is a straight line path between the starting node and any node in the first set of nodes to be expanded;

[0146] Calculating the distance of the first path to obtain a first distance;

[0147] Calculating the distance of the second path to obtain a second distance;

[0148] Obtaining a current position according to an angle between the second path and the first path;

[0149] The heuristic function is constructed according to the first distance, the second distance and the current position.

[0150] When this embodiment is implemented, the heuristic function constructed is as follows:

[0151] h(n i )=w(n i , n j )-W(d(n i , n j )D(s,t))

[0152] Among them, n i Indicates the current node, n j represents one of the successor nodes of the current node, that is, one of the nodes to be searched, and takes the first path as the zero-degree baseline, w(n i ,n j ) represents n i With n j The angle between the connecting line (second path) and the zero-degree reference line is expressed in radians, that is, the current orientation; d(n i ,n j ) represents n i With n j The distance between them, i.e. the second distance; D(n i ,n j) represents the distance from the starting node to the target node, that is, the first distance; W is the weighting coefficient. The heuristic function constructed in the embodiment of the present invention increases the amount of heuristic information by introducing two factors, distance and orientation, and improves the efficiency and accuracy of cost value calculation in the process of route planning.

[0153] The embodiment of the present invention also provides a route planning system based on the B-spline curve equation, see Figure 4 , is a structural block diagram of a route planning system based on a B-spline curve equation provided by an embodiment of the present invention, the system comprising:

[0154] A first route generating module 40 is used to perform route planning according to the starting node and the ending node by using a preset route planning algorithm to generate a first route;

[0155] The second route generating module 41 is used to perform smoothing processing on the first route by using a B-spline curve equation to obtain a second route.

[0156] The system and modules can implement all the processes of the method described in any of the above embodiments. The functions and technical effects achieved by each module and unit in the system are respectively the same as the functions and technical effects achieved by a route planning method based on a B-spline curve equation described in the above embodiments, and will not be repeated here.

[0157] The embodiment of the present invention also provides a terminal device, see Figure 5 As shown, it is a structural block diagram of a preferred embodiment of a terminal device provided by the present invention, wherein the terminal device includes a processor 50, a memory 51, and a computer program stored in the memory 51 and configured to be executed by the processor 50, and the processor 50 implements the method described in any of the above embodiments when executing the computer program.

[0158] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory 51 and executed by the processor 50 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.

[0159] The processor 50 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor, or the processor 50 can be any conventional processor. The processor 50 is the control center of the terminal device, and various parts of the terminal device are connected using various interfaces and lines.

[0160] The memory 51 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory 51 can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory 51 can also be other volatile solid-state storage devices.

[0161] An embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute any of the above-mentioned route planning methods based on B-spline curve equations.

[0162] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0163] In summary, the present invention provides a route planning method, system, device and medium based on B-spline curve equation, including: performing route planning according to a start node and an end node by a preset route planning algorithm to generate a first route; and smoothing the first route by a B-spline curve equation to obtain a second route. The route planning efficiency can be improved, and the planned path can be made smoother.

[0164] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A route planning method based on B-spline curve equation, characterized in that: The method comprises: According to the starting node and the ending node, a route is planned by using a preset route planning algorithm to generate a first route; Smoothing the first route using a B-spline curve equation to obtain a second route; The step of smoothing the first route by using a B-spline curve equation to obtain a second route includes: Discretize the first route to obtain a first discrete node set; Filtering the first discrete node set according to preset important nodes to obtain a second discrete node set; Dividing the second discrete node set into multiple discrete node sets to obtain multiple to-be-processed node sets; The node set to be processed is smoothed by the B-spline curve equation to obtain multiple routes; Connecting the multiple routes in sequence to obtain the second route; Among them, the important nodes include route intersection points, preset major city nodes, and preset important route nodes.

2. A route planning method based on B-spline curve equation as claimed in claim 1, characterized in that: The method further comprises: The second route is smoothed again to obtain a third route.

3. A route planning method based on B-spline curve equation as claimed in claim 1, characterized in that: Before the set of nodes to be processed is smoothed by the B-spline curve equation to obtain a plurality of routes, the method further includes: Create a memo to store the calculated basis function values; When it is necessary to calculate the basis function value, check whether there is a corresponding calculation result in the memorandum; If so, return the checked calculation result and terminate the calculation; If not, perform basis function calculation and store the calculation result in the memo.

4. A route planning method based on B-spline curve equation as claimed in claim 1, characterized in that: The method of performing route planning according to the starting node and the ending node by using a preset route planning algorithm to generate a first route includes: Converting the map where the starting node and the ending node are located into a grid map; Create an open table and a close table, and add the start node to the open table; According to the starting node, a first route is generated by performing route planning using an A-star algorithm; Wherein, each grid in the grid map contains a node, and the node is located at the center of the grid; the open table adopts a minimum binary heap data structure.

5. A route planning method based on B-spline curve equation as claimed in claim 4, characterized in that: The generating a first route by performing route planning according to the starting node by using an A-star algorithm includes: Obtaining a first set of nodes to be expanded by screening out the starting node and preset obstacle nodes in the grid map; Constructing a heuristic function according to the starting node, the ending node and the first set of nodes to be expanded; According to the starting node, calculating the first generation value of each node in the first set of nodes to be expanded by using the heuristic function; Select the node with the smallest value in the first generation to update the current node, and add the updated current node to the close table; Acquire a second set of nodes to be expanded from the first set of nodes to be expanded according to the updated current node and the preset constraint condition; According to the updated current node, the second generation value of each node in the second set of nodes to be expanded is calculated by the heuristic function, the node with the smallest second generation value is selected as the target node, and the target node is added to the close table; Detecting whether the target node is a termination node; If not, the target node is updated to the current node, and the second set of nodes to be expanded is reacquired according to the updated current node and the preset constraint condition, and the target node is recalculated, until the calculated target node is the termination node; If so, output the first route according to the nodes in the close table and the target node.

6. A route planning method based on B-spline curve equation as claimed in claim 5, characterized in that: The constructing a heuristic function according to the starting node, the ending node and the first set of nodes to be expanded includes: Generate a first path and a second path according to the starting node, the ending node and the first set of nodes to be expanded; wherein the first path is a straight line path from the starting node to the ending node, and the second path is a straight line path between the starting node and any node in the first set of nodes to be expanded; Calculating the distance of the first path to obtain a first distance; Calculating the distance of the second path to obtain a second distance; Obtaining a current position according to an angle between the second path and the first path; The heuristic function is constructed according to the first distance, the second distance and the current position.

7. A route planning system based on B-spline curve equation, characterized in that: The system comprises: A first route generation module, used to perform route planning according to a starting node and an ending node by using a preset route planning algorithm to generate a first route; A second route generating module, configured to smooth the first route using a B-spline curve equation to obtain a second route; The step of smoothing the first route by using a B-spline curve equation to obtain a second route includes: Discretize the first route to obtain a first discrete node set; Filtering the first discrete node set according to preset important nodes to obtain a second discrete node set; Dividing the second discrete node set into multiple discrete node sets to obtain multiple to-be-processed node sets; The node set to be processed is smoothed by the B-spline curve equation to obtain multiple routes; Connecting the multiple routes in sequence to obtain the second route; Among them, the important nodes include route intersection points, preset major city nodes, and preset important route nodes.

8. A terminal device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements a route planning method based on a B-spline curve equation as claimed in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program; wherein, when the computer program is run, it controls the device where the computer-readable storage medium is located to execute a route planning method based on a B-spline curve equation as described in any one of claims 1 to 6.