Method and device for planning a custom path for a haul truck in an open pit mine

By preprocessing the path graph structure during path planning in open-pit mines and combining it with a grid indexing mechanism, the problems of low path matching efficiency and high real-time search complexity are solved, achieving efficient support for dynamic road networks and multi-threaded safety.

CN120947680BActive Publication Date: 2026-01-27SHANXI KEDA AUTOMATION CONTROL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511467926.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2026-01-27
Estimated Expiration
2045-10-15

AI Technical Summary

Technical Problem

Existing technologies for path planning in open-pit mines suffer from problems such as low path matching efficiency, high computational complexity of real-time path search, frequent road changes leading to repeated graph structure reconstruction, and difficulty in resolving path conflicts in scenarios with concurrent scheduling of multiple vehicles.

Method used

The path graph structure is generated through preprocessing and combined with a grid indexing mechanism to improve the efficiency of path mapping and search. Fast rejection and cross-jump tests are used to determine intersections, path segment weights are calculated, and the grid spread algorithm and A* algorithm are used for path planning.

Benefits of technology

It significantly improves the execution efficiency and accuracy of path planning, supports flexible adaptation to dynamic road networks, and has good scene adaptability and multi-threaded safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120947680B_ABST
    Figure CN120947680B_ABST
Patent Text Reader

Abstract

The application provides a method and device for planning a self-defined path based on an open-pit mine transport vehicle, and belongs to the field of path planning; solves the problems of low path matching efficiency, high calculation complexity and high maintenance cost existing in traditional path planning methods; the method comprises the following steps: road data preprocessing, splitting the road data and fence data of the open-pit mine area into line segments, calculating the intersection points between the road line segments and between the road line segments and the fence line segments, taking the intersection points and the road start point and end point as nodes, and dividing the path segments according to the nodes; path segment data pre-generation; road grid index construction: mapping the road line segments to a two-dimensional grid space to establish a corresponding relationship between the line segments and the grids; path graph construction; path planning, reading the pre-generated data and mapping the start and end points; inserting the start and end points and updating the path graph; performing path search; and generating an actual driving path coordinate set; the application is applied to open-pit mine area path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of path planning technology, and in particular to a custom path planning method and apparatus based on open-pit mine transport vehicles. Background Technology

[0002] In open-pit mines, roads are not fixed and need to be adjusted according to the needs of mining operations. Traditional path planning methods typically rely on global map models and static graph structures, which present the following problems when dealing with frequently changing road networks:

[0003] 1) The path matching efficiency is low, making it difficult to quickly map GPS coordinates to the nearest road;

[0004] 2) Real-time path search has high computational complexity, which affects the system response speed;

[0005] 3) Frequent road changes necessitate the repeated reconstruction of the graph structure, resulting in high maintenance costs;

[0006] 4) Path conflicts are difficult to resolve effectively in scenarios with concurrent scheduling of multiple vehicles.

[0007] Therefore, a technical solution is needed that can adapt to the dynamic road network of open-pit mines and support efficient path planning. Summary of the Invention

[0008] To address the aforementioned technical issues, this application proposes a custom path planning method and apparatus based on open-pit mine transport vehicles. By preprocessing to generate a path graph structure and combining it with a grid indexing mechanism, the efficiency of path mapping and search is improved, thereby achieving efficient support for dynamically changing road networks.

[0009] The technical solution adopted in this application is: a custom route planning method based on open-pit mine transport vehicles, comprising the following steps:

[0010] Step S1: Road data preprocessing, specifically including:

[0011] Step S101: Divide the road data and fence data of the open-pit mine into line segments, calculate the intersection points between road line segments and between road line segments and fence line segments, and use the intersection points, the starting point and the ending point of the road as nodes, and divide the path segments according to the nodes;

[0012] Step S102: Pre-generation of path segment data;

[0013] Step S103: Road grid index construction: Map road segments to a two-dimensional grid space and establish a correspondence between "segment-grid";

[0014] Step S104: Path graph construction;

[0015] Step S2: Path planning, specifically including:

[0016] Step S201: Read the pre-generated path segment data and map the start and end points;

[0017] Step S202: Insert start and end points in the path graph and update the path graph;

[0018] Step S203: Perform path search;

[0019] Step S204: Generate the set of coordinates of the actual driving path.

[0020] Furthermore, in step S101, a rapid rejection test and a cross-jump test are used to determine the intersection between road segments and between road segments and fence segments, and the coordinates of the intersection points are calculated; then the path segment weight is calculated, where the path segment weight refers to the distance or travel time of the path segment between adjacent intersection points.

[0021] Furthermore, step S102 specifically includes:

[0022] (1) Traverse the original line segments of the road and their intersection information to construct an ordered list of key points;

[0023] (2) Divide the continuous line segment into independent path segments according to the intersection position, and assign a unique identifier to each path segment;

[0024] (3) Record the starting point, ending point, and intermediate coordinates of each path segment;

[0025] (4) Calculate the length and weight of the path segment and establish the mapping relationship between the node and the path segment.

[0026] Furthermore, step S103 specifically includes:

[0027] (1) Define the mesh density;

[0028] (2) Use a grid-based coordinate mapping algorithm to convert latitude and longitude into integer grid coordinates;

[0029] (3) Use the mesh spread algorithm to determine all the meshes that the line segment passes through;

[0030] (4) Use the grid graph-based nearest road search algorithm to obtain and record the set of line segment IDs contained in each grid;

[0031] (5) Output results: Output the grid index table of road segments.

[0032] Furthermore, the implementation steps of the grid-based coordinate mapping algorithm are as follows:

[0033] The floating-point coordinate value is converted to an integer using a magnification factor. The magnified integer is then converted to a string and split. The last digit is separated, and the high-order part is retained. The granularity range of the last digit is calculated. The high-order part is then concatenated with the calculated left boundary of the lowest digit to obtain the complete left boundary value.

[0034] Furthermore, the implementation steps of the mesh propagation algorithm are as follows:

[0035] 1. Determine the start and end grid points:

[0036] Calculate the grid values ​​corresponding to the x-axis and y-axis of the starting and ending points respectively to determine the grid where the starting and ending points are located;

[0037] Calculate the line segment directions xAdd and yAdd, where xAdd and yAdd represent the extension directions of the line segment on the X-axis and Y-axis, respectively;

[0038] 2. Initialize parameters:

[0039] Create an empty list to store the result grid;

[0040] Set the starting grid to the grid where the starting point is located;

[0041] Define the grid range around the endpoint;

[0042] Set the search scope;

[0043] 3. Grid traversal algorithm:

[0044] By iteratively checking the intersections of line segments with grids, the process progresses to the next grid, eventually identifying all the grids through which the line segment passes.

[0045] Furthermore, the implementation steps of the grid traversal algorithm are as follows:

[0046] Each time the intersection point of the line segment and the grid is determined, extend to the right (xAdd > 0), calculate the coordinates rightY of the intersection point between the right grid boundary and the line segment, and determine the next grid based on the intersection point position:

[0047] If the intersection point is at the top, then the top square is used;

[0048] If the intersection point is at the bottom, then take the bottom square;

[0049] If the intersection point is in the upper right corner, then take the upper right square.

[0050] If the intersection point is in the bottom right corner, then take the bottom right square.

[0051] In other cases, take the right-hand square;

[0052] Extending to the left (xAdd < 0), calculate the coordinates leftY of the intersection point between the left grid boundary and the line segment, and determine the next grid based on the intersection point position:

[0053] If the intersection point is at the top, then the top square is used;

[0054] If the intersection point is at the bottom, then take the bottom square;

[0055] If the intersection point is in the upper left corner, then take the upper left square.

[0056] If the intersection point is in the bottom left corner, then take the bottom left square.

[0057] In other cases, take the left square;

[0058] If the line segment is vertical, i.e. xAdd==0, determine whether to extend upward or downward based on yAdd;

[0059] If yAdd>0, then extend upwards;

[0060] If yAdd<=0, then extend downwards.

[0061] Furthermore, the implementation steps of the grid graph-based nearest road search algorithm are as follows:

[0062] Obtain the current coordinates and grid map structure, use a grid-based coordinate mapping algorithm to obtain the grid to which the current coordinates belong, traverse all grids to obtain the grids with roads at the nearest and next-next levels to the grid where the coordinates are located, search for the nearest road by grid method, determine the grid where the road is located to speed up the mapping, and finally match the line segment ID contained in the nearest road grid.

[0063] Furthermore, the pre-generated data in step S201 includes road node data, path map, and grid index.

[0064] A computer device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.

[0065] The advantages of this application over the prior art are as follows:

[0066] High efficiency: By moving complex calculations to the preprocessing stage and combining them with a grid indexing mechanism, the execution efficiency of coordinate point mapping and path search is significantly improved.

[0067] Accuracy: Geometric projection algorithm and heuristic function optimization strategy are adopted to ensure high accuracy of path mapping results and optimality of path search results;

[0068] Scalability: Supports dynamic updates of road data and path weights, enabling flexible adaptation to changes in the mining area road network;

[0069] Versatility: Applicable to the path planning needs of various moving targets such as open-pit mine transport vehicles, with good adaptability to different scenarios;

[0070] Security: In a multi-threaded concurrent access environment, the read-only nature of preprocessed data and the temporary modification mechanism ensure the stability and consistency of system operation. Attached Figure Description

[0071] The following description, in conjunction with the accompanying drawings, further illustrates this application:

[0072] Figure 1 A road example simulation diagram provided for embodiments of this application;

[0073] Figure 2 A schematic diagram of key road points provided for embodiments of this application;

[0074] Figure 3 This is a schematic diagram of the pre-calculated road segments provided in an embodiment of this application;

[0075] Figure 4 A schematic diagram of road nodes provided for embodiments of this application;

[0076] Figure 5 This is a schematic diagram of path segment division provided for an embodiment of this application;

[0077] Figure 6 A flowchart illustrating the rectification implementation of the path planning method provided in this application embodiment;

[0078] Figure 7 This is a schematic diagram of line segment mesh propagation provided in an embodiment of this application;

[0079] Figure 8 This is a schematic diagram of a grid graph search for the nearest path provided in an embodiment of this application;

[0080] Figure 9 A flowchart of the grid search for the nearest road provided in this application embodiment;

[0081] Figure 10 The actual road simulation diagram provided for the embodiments of this application;

[0082] Figure 11 The path grid diagram provided for the embodiments of this application;

[0083] Figure 12 The image shows the actual path planning result obtained using the path planning method described in this application. Detailed Implementation

[0084] like Figures 1 to 12As shown, this application provides a custom path planning method for open-pit mine transport vehicles. This method is based on grid indexing and preprocessed graph structures, and is suitable for path planning of moving targets in complex environments such as open-pit mines. By constructing a grid index for road segments and generating path map data through preprocessing, combined with geometric projection and heuristic search algorithms, fast coordinate point mapping and shortest path search are achieved. This method significantly reduces the computational complexity of real-time path planning, supports dynamic insertion of start and end points and updating of the path map, and is suitable for open-pit mine transport vehicle scenarios, exhibiting high efficiency, accuracy, and multi-threaded safety.

[0085] To facilitate understanding of the technical solution of this application, the key technical terms involved in this application are defined and explained below.

[0086] (1) Road

[0087] A broken line segment composed of multiple key road points represents the basic unit of a vehicle's travel path.

[0088] Example: such as Figure 1 In the example, Road 1 and Road 2 are typical road examples, such as... Figure 2 The points marked in red are the key points of the road.

[0089] In practice, key points on roads do not have a specific definition and can be obtained from two sources:

[0090] The first type: If the user adds the road directly in the backend, then each added point can be used as a key point of the road;

[0091] The second method generates roads based on the user's vehicle trajectory, marking inflection points and straight-line points as key road points.

[0092] (2) Line segment

[0093] Composed of two adjacent road key points, it is the smallest unit that constitutes a road. Figure 3 In the diagram, road 1_segment1, road 1_segment2, road 2_segment1, etc., are all line segments.

[0094] (3) Node

[0095] It consists of road intersections, starting points, and ending points, and is used to identify the connection relationships of path segments. Figure 4 In the diagram, the red-marked points are nodes.

[0096] (4) Route Segment

[0097] The set of road segments between two nodes, which do not contain other nodes. Figure 5In the code, road1_route1, road1_route2, road2_route1, road2_route2, etc. are all path segments.

[0098] (5) Path Graph

[0099] A topological structure (graph structure) consisting of all path segments and their node relationships is used for path search and shortest path calculation. The path graph only contains the connection relationships between nodes and their weight information.

[0100] (6) Grid Index

[0101] After dividing the latitude and longitude space into a regular two-dimensional grid, a correspondence between "line segments and grids" is established to accelerate the mapping process from coordinate points to road segments.

[0102] (7) Cartesian Coordinate System

[0103] To facilitate path planning calculations, the latitude and longitude coordinate system is converted into a two-dimensional Cartesian coordinate system, where longitude corresponds to the x-axis and latitude corresponds to the y-axis.

[0104] (8) A* (A-Star) Algorithm

[0105] A heuristic graph search algorithm for finding the optimal path from the start point to the end point in a graph structure.

[0106] In this embodiment, road and fence data are described using a common latitude and longitude coordinate system (such as the Mars coordinate system). To facilitate subsequent spatial calculations, the latitude and longitude coordinates are mapped to a two-dimensional Cartesian coordinate system. All path calculations are performed based on this two-dimensional Cartesian coordinate system to improve computational efficiency and avoid spherical projection errors.

[0107] Applicability description of the solution:

[0108] Since this application is mainly applied to localized scenarios such as open-pit mines, where there is no large geographical span or spherical curvature, coordinate transformation and path calculation can be safely performed using a planar approximation method without introducing significant errors.

[0109] Based on the above explanation of technical terms, the overall concept of the path planning method of this application will be described below.

[0110] The path planning method in this application mainly includes two core stages:

[0111] 1. Road Data Preprocessing and Route Map Construction: To improve route planning efficiency, road data is preprocessed during the system initialization phase to generate reusable intermediate data structures and construct a route map model. This phase can achieve the following functions:

[0112] 1) Road segment extraction: The original road data is split into line segments;

[0113] 2) Node identification and extraction: Identify road intersections, start points, and end points as nodes;

[0114] 3) Path segmentation: Divide the path into segments based on nodes;

[0115] 4) Path graph construction: Establish the connection relationships between nodes and path weights (such as distance, travel time, etc.);

[0116] 5) Grid index construction: Record the grid to which each line segment belongs, which is used to quickly locate the target coordinates of the mapped line segment.

[0117] Through the above preprocessing, the complex path matching and search task is transformed into an efficient graph traversal problem, which significantly reduces the computational complexity of real-time path planning.

[0118] 2. Real-time route planning execution: The route planning process is divided into two sub-stages:

[0119] 1) Map the start and end point coordinates onto the road:

[0120] Because GPS-acquired vehicle positions have drift errors, the coordinates cannot be accurately placed on the road. Therefore, before route planning, the coordinates of the start, end, and target points must be mapped to the nearest road segments to ensure the accuracy of the route search.

[0121] The mapping process is as follows:

[0122] Find the grid cell containing the target based on its coordinates;

[0123] Obtain the candidate line segment set using the grid index;

[0124] Calculate the shortest distance between the target coordinates and each candidate line segment;

[0125] Select the line segment with the smallest distance as the target mapping line segment;

[0126] Project the target coordinates along the direction of the line segment to obtain the mapped point.

[0127] 2) Shortest path search based on the A* algorithm:

[0128] Based on the completed path graph construction, the A* algorithm is used for path search:

[0129] Use Manhattan distance as the heuristic function h(n);

[0130] Use the actual path segment length or time cost as the actual cost function g(n);

[0131] Node expansion is performed according to the evaluation function f(n) = g(n) + h(n);

[0132] The final output is the optimal path sequence from the starting node to the ending node;

[0133] The path sequence is restored to the actual combination of road segments and returned to the scheduling system.

[0134] Based on the above description of the main stages of the path planning method of this application, the specific implementation steps of the path planning method of this application will be described in detail below.

[0135] Step S1: Road Data Preprocessing; This step aims to preprocess the road and fence data of the open-pit mine, identify intersections between roads and between roads and fences, divide path segments based on intersections, construct a graph structure (i.e., a path graph) that can be used for path search, and generate the computational data required by the A* algorithm. This preprocessing stage eliminates a large amount of repetitive computation, significantly improving the efficiency and response speed of real-time path planning.

[0136] The fence refers to the loading and unloading area of ​​the open-pit mine, which is a ring-shaped area composed of n points; open-pit mine path planning is the planning of the path for ore trucks from their current location to the loading and unloading area.

[0137] Starting point: The vehicle's current location;

[0138] End point: could be a specified coordinate (e.g., excavator location) or a fence (e.g., xx unloading area);

[0139] Therefore, there are two types of path planning: point-to-point planning and point-to-fence planning. The intersection of the road and the fence is the point-to-fence planning point. The vehicle only needs to enter the fence to complete the path planning. Only the path planning from the starting point to the intersection of the road and the fence is required.

[0140] The main steps of road data preprocessing are as follows:

[0141] S101: Calculate the intersection data of the road and the fence, including:

[0142] (1) Calculation of road intersections:

[0143] The road is composed of multiple straight line segments, each of which consists of two endpoints.

[0144] For any two line segments, determine whether they intersect and calculate the intersection point using the following steps:

[0145] ① Bounding Box Test:

[0146] Determine whether the projections of two line segments in the X and Y axes overlap;

[0147] If there is no overlap, the intersection point calculation is directly excluded;

[0148] Example condition: If the maximum x value of line segment A is less than the minimum x value of line segment B, then they do not intersect.

[0149] ②Crossing Test:

[0150] Determine whether line segments cross each other based on the cross product of vectors;

[0151] If the condition that the cross product sign is opposite is met, then the line segments are confirmed to intersect.

[0152] ③ The formula for calculating the coordinates (x, y) of the intersection point is as follows:

[0153] x = (b2 - b1) / (k1 - k2);

[0154] y = (k1x + b1 + k2x + b2) / 2;

[0155] Where: k1 and k2 are the slopes of the two line segments, respectively; b1 and b2 are the intercepts of the two line segments, respectively.

[0156] (2) Calculation of the intersection of the fences:

[0157] The fence is composed of N ordered points connected end to end to form a closed area;

[0158] The same method is used to determine whether the road segment intersects with the fence segment;

[0159] Each road and fence may have multiple intersections.

[0160] (3) Fault tolerance mechanism:

[0161] Due to the precision issues of floating-point numbers, the intersection point may not fall accurately on the expected line segment. An error threshold ε = 0.00001 (approximately 10 meters) is set, and the intersection point is considered valid within this range.

[0162] Applicable to the following scenarios:

[0163] When checking road intersections, the intersections are slightly off-center from the line segments;

[0164] Minor deviations at the T-junction due to precision issues.

[0165] (4) Path segment weight calculation:

[0166] For path segments between adjacent intersections, calculate their distance or travel time as weights;

[0167] Example of the formula for weight w:

[0168] w=d / v;

[0169] Where: d is the Euclidean distance between the two points; v is the average permissible speed of the road (e.g., 30 km / h).

[0170] Step S102: Path Segment Data Pre-generation: After completing road intersection identification and fence intersection calculation, the original road segments need to be segmented to form the smallest unit that can be used for path search—the path segment (Route). This step ensures that each path segment does not contain other nodes, thereby achieving standardized path modeling for complex road networks. This step provides an efficient and consistent data foundation for subsequent path graph construction and shortest path search.

[0171] The main steps for pre-generating path segment data are as follows:

[0172] (1) Traverse the original line segments of the road and their intersection information to construct an ordered list of key points;

[0173] (2) Divide the continuous line segment into independent path segments according to the intersection position, and assign a unique identifier to each path segment;

[0174] (3) Record the starting point, ending point, and intermediate coordinates of each path segment;

[0175] (4) Calculate the length and weight of the path segment and establish the mapping relationship between the node and the path segment.

[0176] Step S103: Road grid index construction; This step establishes a "segment-grid" correspondence by mapping road segments to a two-dimensional grid space, which is used to quickly find candidate segments and improves the efficiency of coordinate point mapping.

[0177] The main steps in constructing a road grid index are as follows:

[0178] (1) Define the grid density (e.g., grid density = 0.00001 degrees / grid).

[0179] (2) Use a grid-based coordinate mapping algorithm to convert latitude and longitude into integer grid coordinates;

[0180] (3) Use the mesh spread algorithm to determine all the meshes that the line segment passes through;

[0181] (4) Construct the SquareGridVO structure, use the grid graph-based nearest road search algorithm to obtain the set of line segment IDs contained in each grid, and record the set of line segment IDs in the SquareGridVO structure; where SquareGridVO (Square Grid Value Object) is a data structure used to represent a two-dimensional square grid;

[0182] (5) Output results: Output the grid index table of road segments to support subsequent fast queries.

[0183] Among them, the grid-based coordinate mapping algorithm can calculate the lower left boundary value of the grid to which the latitude and longitude value of the coordinate point belongs at a specific granularity. Its core idea is to convert the floating-point number corresponding to latitude and longitude into an integer operation to avoid the precision problem of floating-point number, thereby more accurately determining the grid area where the coordinate point is located.

[0184] The following is the detailed calculation process:

[0185] 1. Parameter Description

[0186] x: The given floating-point coordinate value (e.g., 10.58966);

[0187] expansionFactor: Magnification factor, usually calculated as a power of 10 based on the number of decimal places of the granularity (e.g., if the granularity is 0.001, then it is magnified by 1000 times).

[0188] granularityValue: The integer value corresponding to the granularity (e.g., granularity 0.001 corresponds to granularityValue=1).

[0189] 2. Magnify the coordinates to eliminate the decimal part.

[0190] Multiplying the original floating-point coordinates by the expansionFactor forces them to be converted to integers in order to eliminate the issue of decimal precision.

[0191] For example: x=10.58966, expansionFactor=1000→xExpansion=10589.

[0192] 3. Calculated value high-order bits and granularity-based partitioning

[0193] Convert the enlarged integer into a string format for easier bitwise processing;

[0194] Extract the last digit (to determine which granularity range it falls into), and save the rest as a substring as the high digit.

[0195] 4. Determine the granularity range where the lowest position is located.

[0196] Iterate through numbers 0 to 9 to find the granularity range of the last digit.

[0197] For example: If granularityValue = 1, then:

[0198] Interval partitioning: [0,1), [1,2), ..., [9,10);

[0199] If the last digit is 9, then it belongs to the 9th interval, and the corresponding left boundary leftLowestIndexValue is 1*9=9.

[0200] If granularityValue=2, then:

[0201] Interval partitioning: [0,2), [2,4), ..., [8,10);

[0202] If the last digit is 5, then it belongs to the 3rd interval, and the corresponding left boundary leftLowestIndexValue is 2*3=6.

[0203] 5. Combine to generate the final left boundary.

[0204] The previously retained high-order part is concatenated with the calculated lowest-order left boundary to form a complete left boundary value;

[0205] For example: substring="1058", leftLowestIndexValue=9→"10589";

[0206] This algorithm achieves accurate grid positioning in the following way:

[0207] Use a magnification factor to convert floating-point numbers to integers to avoid precision issues;

[0208] Break down the numbers and analyze them digit by digit to determine the granularity range they fall into;

[0209] Calculate the left boundary value of this point in the grid system;

[0210] The final return value is an integer, which can be used for fast comparison and indexing, and is suitable for determining the accurate assignment of coordinates in a grid system.

[0211] The grid spreading algorithm uses a predefined grid granularity to truncate latitude and longitude coordinates to the appropriate number of bits using a grid-based coordinate mapping algorithm. It calculates the grid values ​​for the starting point's x and y coordinates and then spreads the algorithm sequentially towards the ending point, ultimately obtaining all the grids the road traverses. Grid values ​​are represented as positive integers to avoid precision errors.

[0212] This algorithm is used to calculate all the grid cells that a given line segment passes through in a planar grid. Through mathematical calculations and iterative searches, it accurately determines the grid area covered by the line segment path, specifying the propagation results. Figure 7 As shown. The following is the specific calculation process.

[0213] 1. Determine the start and end grid points.

[0214] Calculate the grid values ​​corresponding to the x-axis and y-axis of the starting and ending points respectively to determine the grid where the starting and ending points are located;

[0215] Calculate the line segment directions xAdd and yAdd, which represent the extension directions of the line segment on the X and Y axes.

[0216] 2. Initialize parameters

[0217] Create an empty list `gridList` to store the result grid;

[0218] Set the starting grid nextGrid to the grid where the starting point is located;

[0219] Define the grid range around the endpoint: endAroundGrid;

[0220] Set the search scope to be larger than the data range to handle boundary cases.

[0221] 3. Grid traversal algorithm

[0222] By continuously checking the intersection points of the line segment and the grid, the process gradually moves to the next grid, eventually finding all the grids that the line segment passes through.

[0223] Each time the intersection point of the line segment and the grid is determined, extend to the right (xAdd>0) to calculate the coordinates rightY of the intersection point between the right grid boundary and the line segment, and determine the next grid based on the intersection point position:

[0224] The intersection point is at the top → take the top square;

[0225] The intersection point is below → take the square below;

[0226] The intersection point is in the upper right corner → take the upper right square;

[0227] The intersection point is at the bottom right corner → take the bottom right square;

[0228] In other cases, take the right-hand square;

[0229] Extending to the left (xAdd<0), calculate the coordinates leftY of the intersection point between the left grid boundary and the line segment, and determine the next grid based on the intersection point position:

[0230] The intersection point is at the top → take the top square;

[0231] The intersection point is below → take the square below;

[0232] The intersection point is at the top left corner → take the top left square;

[0233] The intersection point is at the bottom left corner → take the bottom left square;

[0234] In other cases, take the left square.

[0235] If the line segment is vertical (xAdd==0), determine whether to extend upwards or downwards based on yAdd;

[0236] yAdd>0 → Extend upwards;

[0237] yAdd<=0→Extend downwards.

[0238] 4. Exception Handling

[0239] Loop count limit: to prevent infinite loops from causing program blocking;

[0240] Search range limitation: Stop the calculation in time when the expected range is exceeded or the end grid is reached.

[0241] The grid-based algorithm for finding the nearest road to a given coordinate point efficiently uses a grid to find the nearest road in two-dimensional space. The core idea is that the grid consists of standard squares. By traversing all grids, the algorithm calculates the level (blue area in Figure (8a)) containing the nearest road to the coordinate point. Simultaneously, considering that some roads are located on edge grids, a ring of grids is extended outwards. This ensures that the outer grid (green area in Figure (8a)) completely encompasses the inner grid area, including the edges. Roads in these two grid layers must contain the nearest road to the coordinate point. The algorithm searches for the nearest road using a grid-based approach, determining the grid where the road is located to speed up the mapping process. Finally, the algorithm matches the nearest road grid (as shown in Figure (8b)). Then, it only needs to determine the nearest line segment among the roads (line segments) in these grids; the road containing that line segment is the nearest road to the coordinate point.

[0242] A circle is drawn with the mapping point as the center and the distance from the mapping point to the farthest point of the inner grid as the radius. This circular area is actually the circle containing the nearest road. The grid search searches a total of two layers. The inner layer is the nearest grid containing the road. However, since the grid is a rectangular area, if only the inner layer is scanned, the part of the road in the outer layer may be missed. This part of the road may be closer than the roads at the four corners of the inner layer. Therefore, to solve the above problem, the scanning grid in this application adds an outer layer to ensure that the outer grid (the green area in Figure (8a)) completely contains the circular area mentioned above.

[0243] The specific calculation process is as follows:

[0244] 1. Input parameter preparation

[0245] enter:

[0246] Current coordinates point (of type LinePoint);

[0247] Grid data structure gridMap (of type Map)<String,SquareGridVO> Each grid contains a set of line segment IDs that it covers.

[0248] 2. Obtain the grid where the current point is located.

[0249] The grid to which the current point belongs is calculated using a grid-based coordinate mapping algorithm. This grid is uniquely identified by the coordinates of its lower left corner.

[0250] 3. Determine the minimum distance grid level

[0251] Traverse all grids, calculate the Manhattan distance between each grid and the grid containing the current point (take the maximum value in the X and Y directions), and then convert it to grid unit distance (gridLength) based on the grid granularityValue.

[0252] Maintain two lists based on the distance:

[0253] gridList: A collection of grids that store the shortest distances;

[0254] parentGridList: Stores a collection of grids with the next-highest distance (i.e., one unit greater than the minimum distance).

[0255] 4. Collect candidate line segments

[0256] Extract the segment IDs contained in all grids of gridList and parentGridList, merge and remove duplicates to form a candidate segment set segmentSet.

[0257] 5. Output Results

[0258] Returns a set of candidate line segments (segmentSet), which can be used to further determine which line segment is closest to the current point and perform path mapping.

[0259] Step S104: A* Path Graph Data Processing; This step is mainly used to construct path graph data suitable for the A* algorithm, including node number mapping, bidirectional adjacency list and path weight information, to provide a basic data structure for efficient access in subsequent path search.

[0260] The main steps for processing A* path graph data are as follows:

[0261] (1) Traverse all path segments and retain the path with the smallest weight using the start and end node pairs as keys to ensure path uniqueness;

[0262] (2) Assign a unique integer ID to each node and establish a mapping relationship between the node and the coordinates;

[0263] (3) Use an adjacency list to represent the connection relationship between nodes and record the path weight information;

[0264] (4) Finally, the constructed path graph is encapsulated into a path planning object as the basic input data for subsequent path search.

[0265] Step S2: Path planning; This step, based on existing preprocessed data and combined with dynamically input start and end point information, completes the search for the shortest path from the start point to the end point and returns the coordinate sequence of the actual driving path.

[0266] The main steps of path planning are as follows:

[0267] Step S201: Read the pre-generated data and map the start and end points:

[0268] Read pre-generated road node data, path map, and grid index;

[0269] Get the road segment closest to the start / end point and its mapping point:

[0270] Calculate the foot of the perpendicular for each line segment;

[0271] If the foot of the perpendicular lies within the line segment, then it is a valid mapping point;

[0272] Otherwise, take the point that is closer between the two endpoints of the line segment as the mapping point.

[0273] Step S202: Insert start and end points and update the path graph:

[0274] Insert the mapping point into the current path segment;

[0275] Split the original path segment into two parts (left segment: from the starting point to the mapping point, right segment: from the mapping point to the end point);

[0276] Update the path graph, remove the original path segments, and add the newly split path segments;

[0277] The original pre-generated data remains unchanged; only the temporary road change data is modified to ensure the safety of multi-threaded concurrent calls.

[0278] Step S203: Run the A* algorithm for path search:

[0279] enter:

[0280] Starting point mapping (already converted to a node);

[0281] End point mapping (converted to a node);

[0282] Using the A* algorithm for shortest path search:

[0283] Output: The sequence of nodes along the shortest path.

[0284] Step S204: Generate the set of actual driving path coordinates:

[0285] The path node sequence is restored to the actual road segment combination, including: the connecting path between the mapping point and the original road segment and all intermediate path segments;

[0286] Final output: A complete list of coordinate points for the driving route, for use by the scheduling system.

[0287] After completing the road data preprocessing and constructing the path graph, this application adopts the A* algorithm as the implementation method for path search. The A* algorithm is a classic heuristic graph search algorithm, widely used in the optimal path finding problem in static map environments. Its core idea is to introduce a heuristic function based on Dijkstra's algorithm, and select the expanded nodes through the evaluation function f(n)=g(n)+h(n).

[0288] in:

[0289] g(n): represents the actual cost from the starting point to the current node, calculated by dividing the road distance (meters) by the road's allowed operating speed (km / h);

[0290] h(n): Represents the estimated cost from the current node to the destination, using Manhattan distance combined with a preset speed (30km / h) to estimate the arrival time.

[0291] f(n): The comprehensive evaluation value determines the node to be expanded next.

[0292] like Figure 10 This is a simulation of the actual road. Figure 11 This is a path grid map obtained using the road data preprocessing method of this application. Figure 12 For based on Figure 11 The actual path planning result diagram obtained using the path planning method of this application.

[0293] This application generates a path graph structure through preprocessing and improves the efficiency of path mapping and search by combining a grid indexing mechanism, thereby achieving efficient support for dynamically changing road networks.

[0294] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A custom route planning method based on open-pit mine transport vehicles, characterized in that: Includes the following steps: Step S1: Road data preprocessing, specifically including: Step S101: Divide the road data and fence data of the open-pit mine into line segments, calculate the intersection points between road line segments and between road line segments and fence line segments, and use the intersection points, the starting point and the ending point of the road as nodes, and divide the path segments according to the nodes; Step S102: Pre-generation of path segment data; Step S103: Road Grid Index Construction: Mapping road segments to a two-dimensional grid space, establishing a "segment-grid" correspondence, specifically including: (1) Define the mesh density; (2) Use a grid-based coordinate mapping algorithm to convert latitude and longitude into integer grid coordinates; (3) Use the mesh propagation algorithm to determine all the meshes that the line segment passes through. The implementation steps of the mesh propagation algorithm are as follows:

1. Determine the start and end grid points: Calculate the grid values ​​corresponding to the x-axis and y-axis of the starting and ending points respectively to determine the grid where the starting and ending points are located; Calculate the line segment directions xAdd and yAdd, where xAdd and yAdd represent the extension directions of the line segment on the X-axis and Y-axis, respectively; 2. Initialize parameters: Create an empty list to store the result grid; Set the starting grid to the grid where the starting point is located; Define the grid range around the endpoint; Set the search scope; 3. Grid traversal algorithm: By iteratively checking the intersection points of the line segment and the grid, we gradually move to the next grid and eventually find all the grids that the line segment passes through. (4) Construct the SquareGridVO structure, use the grid graph-based nearest road search algorithm to obtain the set of line segment IDs contained in each grid, and record the set of line segment IDs in the SquareGridVO structure; where SquareGridVO is a data structure used to represent a two-dimensional square grid; The implementation steps of the grid graph-based algorithm for finding the nearest road are as follows: Obtain the current coordinates and grid map structure, use a grid-based coordinate mapping algorithm to obtain the grid to which the current coordinates belong, traverse all grids to obtain the grids with roads at the nearest and next-next levels to the grid where the coordinates are located, search for the nearest road by grid method, determine the grid where the road is located to speed up the mapping speed, and finally match the line segment ID contained in the nearest road grid. (5) Output results: Output a grid index table of road segments to support subsequent fast queries; Step S104: Path graph construction; Step S2: Path planning, specifically including: Step S201: Read the pre-generated path segment data and map the start and end points: Read the pre-generated road node data, path map and grid index; obtain the road segment closest to the start / end point and its mapping point: Calculate the foot of the perpendicular of each line segment; if the foot of the perpendicular is inside the line segment, it is a valid mapping point; otherwise, take the point that is closer between the two ends of the line segment as the mapping point; Step S202: Insert start and end points in the path graph and update the path graph: Insert the mapping point into the current path segment; split the original path segment into left and right segments; update the path graph, remove the original path segment, and add the newly split path segment; Step S203: Perform path search; Step S204: Generate the set of coordinates of the actual driving path.

2. The custom route planning method based on open-pit mine transport vehicles according to claim 1, characterized in that: In step S101, a rapid rejection test and a cross-jump test are used to determine the intersection between road segments and between road segments and fence segments, and the coordinates of the intersection points are calculated; then the path segment weights are calculated, where the path segment weights refer to the distance or travel time of the path segments between adjacent intersection points.

3. The custom route planning method based on open-pit mine transport vehicles according to claim 1, characterized in that: Step S102 specifically includes: (1) Traverse the original line segments of the road and their intersection information to construct an ordered list of key points; (2) Divide the continuous line segment into independent path segments according to the intersection position, and assign a unique identifier to each path segment; (3) Record the starting point, ending point, and intermediate coordinates of each path segment; (4) Calculate the length and weight of the path segment and establish the mapping relationship between the node and the path segment.

4. The custom route planning method based on open-pit mine transport vehicles according to claim 1, characterized in that: The implementation steps of the grid-based coordinate mapping algorithm are as follows: The floating-point coordinate value is converted to an integer using a magnification factor. The magnified integer is then converted to a string and split. The last digit is separated, and the high-order part is retained. The granularity range of the last digit is calculated. The high-order part is then concatenated with the calculated left boundary of the lowest digit to obtain the complete left boundary value.

5. The custom route planning method based on open-pit mine transport vehicles according to claim 1, characterized in that: The implementation steps of the grid traversal algorithm are as follows: Each time the intersection point of the line segment and the grid is determined, extend to the right (xAdd > 0), calculate the coordinates rightY of the intersection point between the right grid boundary and the line segment, and determine the next grid based on the intersection point position: If the intersection point is at the top, then the top square is used; If the intersection point is at the bottom, then take the bottom square; If the intersection point is in the upper right corner, then take the upper right square. If the intersection point is in the bottom right corner, then take the bottom right square. In other cases, take the right-hand square; Extending to the left (xAdd < 0), calculate the coordinates leftY of the intersection point between the left grid boundary and the line segment, and determine the next grid based on the intersection point position: If the intersection point is at the top, then the top square is used; If the intersection point is at the bottom, then take the bottom square; If the intersection point is in the upper left corner, then take the upper left square. If the intersection point is in the bottom left corner, then take the bottom left square. In other cases, take the left square; If the line segment is vertical, i.e. xAdd==0, determine whether to extend upward or downward based on yAdd; If yAdd>0, then extend upwards; If yAdd <= 0, then extend downwards.

6. The custom route planning method based on open-pit mine transport vehicles according to claim 4, characterized in that: The pre-generated data in step S201 includes road node data, path map, and grid index.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Inter-city road network index and matching method

    CN102997928A

  • Road-free path planning method based on graph search

    CN111121785A