Route planning method and device, electronic equipment and computer readable storage medium
By automatically generating test routes using electronic devices, the problem of low efficiency in manual operation is solved, and efficient city-wide generalized testing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI ANTING HORIZON INTELLIGENT TRANSP TECHNOLOGY CO LTD
- Filing Date
- 2025-08-26
- Publication Date
- 2026-04-17
AI Technical Summary
The route planning for urban generalization testing relies heavily on manual operation, resulting in low efficiency and affecting the efficiency of urban generalization testing of intelligent driving systems.
The test area and route constraints are determined by electronic devices, the area is divided, the sub-areas and points of interest along the test route are generated, the waypoints and their order are determined based on the location information, and the test route is automatically generated.
Without human intervention, route planning efficiency is improved, which in turn improves the efficiency of city-wide generalization testing.
Smart Images

Figure CN120996317B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of intelligent driving technology, and in particular to a route planning method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Urban generalization testing refers to the extensive testing of intelligent driving systems in various scenarios within the complex and ever-changing urban environment. This is to verify whether the intelligent driving system can adapt to various unknown situations and make correct decisions, thereby verifying the safety, reliability, and adaptability of the intelligent driving system.
[0003] Currently, route planning for urban generalization testing relies primarily on manual operation. Testers need to manually select and design test routes based on test objectives and requirements, combined with the actual conditions of the urban road network. However, the urban road environment is complex, with numerous influencing factors, making manual route planning inefficient, which in turn affects the efficiency of urban generalization testing of intelligent driving systems. Summary of the Invention
[0004] To address the aforementioned technical problems, this disclosure provides a route planning method, apparatus, electronic device, and computer-readable storage medium to improve the efficiency of urban generalization testing of intelligent driving systems.
[0005] A first aspect of this disclosure provides a route planning method, comprising:
[0006] Determine the route constraint information for the test area and test route;
[0007] The test area is divided into regions to obtain the first sub-region;
[0008] Based on the route constraint information of the test route and the first sub-region, the second sub-region through which the test route passes and the points of interest in the second sub-region are determined;
[0009] Based on the points of interest in the second sub-region, the waypoints along the test route are determined;
[0010] Based on the location information of the second sub-region or the location information of the waypoints, the route sequence of the waypoints is determined;
[0011] The test route is generated based on the waypoints and the route sequence.
[0012] A second aspect of this disclosure provides a route planning apparatus, comprising:
[0013] The information determination module is used to determine the route constraint information of the test area and test route;
[0014] The region division module is used to divide the test region into regions to obtain a first sub-region;
[0015] The region determination module is used to determine the second sub-region and the points of interest in the second sub-region through which the test route passes, based on the route constraint information of the test route and the first sub-region;
[0016] The waypoint determination module is used to determine the waypoints along the test route based on the points of interest in the second sub-region;
[0017] The route sequence determination module is used to determine the route sequence of the route points based on the location information of the second sub-region or the location information of the route points;
[0018] The test route generation module is used to generate the test route based on the waypoints and the route sequence.
[0019] A third aspect of this disclosure provides a computer-readable storage medium storing a computer program for executing the route planning method provided in the first aspect embodiment.
[0020] A fourth aspect of this disclosure provides an electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the route planning method provided in the first aspect embodiment described above.
[0021] A fifth aspect of this disclosure provides a computer program product that, when executed by an instruction processor, performs the route planning method provided in the first aspect of this disclosure.
[0022] This disclosure provides a route planning method, apparatus, electronic device, and computer-readable storage medium. The electronic device determines route constraint information for a test area and a test route. Then, the electronic device divides the test area into regions to obtain a first sub-region. Next, based on the route constraint information of the test route and the first sub-region, the electronic device determines the second sub-region and points of interest (POIs) traversed by the test route in the second sub-region, and determines the waypoints traversed by the test route based on the POIs of the second sub-region. Finally, based on the location information of the second sub-region or the location information of the waypoints, the electronic device determines the route order of the waypoints, and generates the test route based on the waypoints and the route order. In this way, without manual intervention, the electronic device can automatically generate a test route based on the route constraint information of the test area and the test route, thereby improving route planning efficiency and consequently improving the efficiency of urban generalization testing. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating a route planning method provided in an exemplary embodiment of this disclosure.
[0024] Figure 2 This is a flowchart illustrating a route planning method provided in another exemplary embodiment of this disclosure.
[0025] Figure 3 This is a flowchart illustrating a route planning method provided in another exemplary embodiment of this disclosure.
[0026] Figure 4 This is a flowchart illustrating a route planning method provided in another exemplary embodiment of this disclosure.
[0027] Figure 5 This is a flowchart illustrating a route planning method provided in another exemplary embodiment of this disclosure.
[0028] Figure 6 This is a schematic diagram of determining a second sub-region provided by an exemplary embodiment of this disclosure.
[0029] Figure 7 This is a flowchart illustrating a route planning method provided in another exemplary embodiment of this disclosure.
[0030] Figure 8 This is a flowchart illustrating a route planning method provided in another exemplary embodiment of this disclosure.
[0031] Figure 9 This is a schematic diagram of the structure of a route planning device provided in an exemplary embodiment of the present disclosure.
[0032] Figure 10 This is a structural diagram of an electronic device provided in an exemplary embodiment of this disclosure. Detailed Implementation
[0033] To explain this disclosure, exemplary embodiments of the disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the disclosure, and not all of them. It should be understood that the disclosure is not limited to exemplary embodiments.
[0034] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0035] Application Overview
[0036] The intelligent driving described in this disclosure encompasses multiple fields, including autonomous driving, driver assistance systems, and robotic systems. Autonomous driving technology aims to enable vehicles to drive completely autonomously in various complex road conditions without human intervention; it is also known as driverless driving and represents an advanced form of intelligent driving. Driver assistance systems, through a series of sensors and algorithms, provide drivers with real-time road condition information, warnings, and support for some driving operations, such as automatic parking and adaptive cruise control, aiming to improve driving safety and convenience. Robotic systems further extend intelligent driving technology to service robots, industrial robots, and other fields, enabling robots to autonomously navigate, avoid obstacles, and complete specific tasks in complex environments, such as logistics delivery and warehouse management, demonstrating the broad application potential of intelligent driving technology in different scenarios.
[0037] Urban generalization testing refers to the extensive testing of intelligent driving systems in various scenarios within the complex and ever-changing urban environment. This is to verify whether the intelligent driving system can adapt to various unknown situations and make correct decisions, thereby verifying the safety, reliability, and adaptability of the intelligent driving system.
[0038] Currently, route planning for urban generalization testing relies primarily on manual operation. Testers need to manually select and design test routes based on test objectives and requirements, combined with the actual conditions of the urban road network. However, the urban road environment is complex, with numerous influencing factors, making manual route planning inefficient, which in turn affects the efficiency of urban generalization testing of intelligent driving systems.
[0039] In this embodiment, the electronic device determines the route constraint information of the test area and the test route. Then, the electronic device divides the test area into regions to obtain a first sub-region. Next, based on the route constraint information of the test route and the first sub-region, the electronic device determines the second sub-region and the points of interest (POIs) traversed by the test route in the second sub-region. Based on the POIs of the second sub-region, the electronic device determines the waypoints traversed by the test route. Finally, based on the location information of the second sub-region or the location information of the waypoints, the electronic device determines the route order of the waypoints and generates the test route based on the waypoints and the route order. In this way, without manual intervention, the electronic device can automatically generate the test route based on the route constraint information of the test area and the test route, thereby improving route planning efficiency and thus improving the efficiency of urban generalization testing.
[0040] Exemplary methods
[0041] Figure 1 This is a flowchart illustrating a route planning method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices, such as... Figure 1 As shown, it includes the following steps:
[0042] Step 101: Determine the route constraint information for the test area and test route.
[0043] For example, during urban generalization testing, the electronic device needs to determine the test area and route constraint information of the test route. The test area can be an administrative region (such as Haidian District, Beijing) or a pre-defined test area; this embodiment of the disclosure does not limit this. For an administrative region, the electronic device can obtain the administrative region name or administrative region number input by the tester, and call the map service API (Application Programming Interface) to determine the test area. For a pre-defined test area, the electronic device can obtain the latitude and longitude coordinates of the corner points of the test area input by the tester, and call the map service API to determine the test area. The route constraint information of the test route is used to constrain the electronic device to generate test routes in the test area that meet the requirements of urban generalization testing. The route constraint information may include the number of planned test routes, the facility types (hereinafter referred to as point of interest types) of the facility points (hereinafter referred to as points of interest) that the test routes are expected to pass through in the test area, the number of points passed through by each test route, and the road types (one or more) included in each test route. Test area and / or road constraint information can be set as configuration information and entered into the route planning system before planning. Different configuration information can be configured with different test areas and / or route constraint information. After configuration, route planning can be performed based on the configuration information.
[0044] It should be noted that after the electronic device determines the route constraint information of the test area and test route, it can further perform data validity verification on the route constraint information of the test area and test route to check whether there are data errors in the data format, data type, numerical range, etc., so as to avoid the electronic device being unable to generate a test route or unable to generate a test route that meets the requirements of urban generalization testing.
[0045] Step 102: Divide the test area into regions to obtain the first sub-region.
[0046] For example, to ensure that the urban generalization test can fully test various complex road environments in the test area, the test route generated by the electronic device needs to pass through sub-regions at different locations within the test area. Therefore, after determining the test area, the electronic device can divide the test area into regions to obtain the first sub-region. Specifically, the electronic device can divide the test area into grids to obtain multiple region grids. Each region grid is a first sub-region; the shape of the region grid can be a square, a rectangle, or other polygons, and this embodiment does not limit this; the areas of different first sub-regions can be the same or different, and this embodiment does not limit this either. The process of the electronic device dividing the test area into regions to obtain the first sub-region will be described in detail later and will not be repeated here.
[0047] Step 103: Based on the route constraint information of the test route and the first sub-region, determine the second sub-region and the points of interest in the second sub-region through which the test route passes.
[0048] For example, to ensure that the city generalization test can fully test various complex road environments in the test area, the test route generated by the electronic device needs to pass through sub-regions at different locations within the test area. Therefore, the electronic device can determine the second sub-regions along the test route within the first sub-region. To avoid the determined second sub-regions being too concentrated, which would prevent the city generalization test from fully testing various complex road environments in the test area, the distance between any two second sub-regions determined by the electronic device needs to meet a preset distance condition. After determining the second sub-regions along the test route, the electronic device can call the map service API to obtain the facility points contained in that second sub-region. The facility points in the second sub-region refer to entities that provide public or commercial services to residents within the second sub-region. These facility points can include infrastructure points, public service facilities points, commercial facilities points, and special function facilities points. Infrastructure points can include bus stops, subway stations, gas stations, charging stations, public toilets, garbage stations, etc. Public service facilities points can include schools, hospitals, libraries, nursing homes, police stations, fire stations, etc. Commercial facilities points can include convenience stores, shopping malls, restaurants, banks, express delivery lockers, etc. Special functional facilities may include scenic spots, emergency shelters, logistics warehouses, etc. Then, the electronic device can further determine the points of interest (POIs) within the facilities included in the second sub-region, based on route constraint information. The POIs of the second sub-region can be understood as the facilities the test route of the urban generalization test is expected to pass through. The electronic device can identify facilities whose facility type matches the POI type in the route constraint information as POIs of the second sub-region. The process of determining the second sub-region and its POIs based on the route constraint information and the first sub-region will be described in detail later and will not be repeated here.
[0049] Step 104: Based on the points of interest in the second sub-region, determine the waypoints along the test route.
[0050] For example, after the electronic device determines the points of interest in the second sub-region, it can further randomly select one or more points of interest from those points to determine as waypoints for the test route. Of course, those skilled in the art can also use other algorithms to determine the waypoints for the test route based on the points of interest in the second sub-region, and this disclosure does not limit such methods.
[0051] Step 105: Determine the route sequence of the waypoints based on the location information of the second sub-region or the location information of the waypoints.
[0052] For example, after the electronic device determines the second sub-region and waypoints traversed by the test route, it can further determine the route order of the waypoints based on the location information of the second sub-region or the location information of the waypoints. The route order of the waypoints represents the sequential order in which the test route passes through all waypoints. For the case where one second sub-region corresponds to one waypoint, the electronic device can determine the route order of the waypoints in the following two ways. Method 1: For any two second sub-regions, the electronic device can determine the distance between the two second sub-regions based on their location information. The location information of the second sub-region can be the latitude and longitude coordinates of any corner point or the center point of the second sub-region. Then, for any two second sub-regions, the electronic device uses the distance between the two second sub-regions as the path cost between them. That is, the greater the distance between the two second sub-regions, the greater the path cost; the smaller the distance between the two second sub-regions, the smaller the path cost. Afterwards, the electronic device uses a breadth-first search algorithm to determine the shortest path traversing all second sub-regions based on the path cost between any two second sub-regions. In the first method, the shortest path is the path with the minimum cost traversing all second sub-regions. Finally, the electronic device can determine the passing order of the second sub-regions based on the shortest path. Since one second sub-region corresponds to one waypoint, the electronic device can determine the passing order of the second sub-regions as the passing order of the waypoints. In the second method, for any two waypoints, the electronic device can determine the distance between them based on their location information. The location information of the waypoints can be their latitude and longitude coordinates. Then, for any two waypoints, the electronic device uses the distance between them as the path cost. That is, the greater the distance between two waypoints, the greater the path cost; the smaller the distance, the smaller the path cost. Afterwards, the electronic device uses a breadth-first search algorithm to determine the shortest path traversing all waypoints based on the path cost between any two waypoints. The shortest path is the path with the minimum cost traversing all waypoints. Finally, the electronic device can determine the passing order of the waypoints based on the shortest path. In the case where a second sub-region corresponds to multiple waypoints, the electronic device can directly use the above-mentioned method two to determine the waypoints' path order. The detailed processing process is similar to that of method two above, and will not be repeated here.
[0053] Step 106: Generate a test route based on waypoints and route sequence.
[0054] For example, after the electronic device determines the waypoints and their order, it can further call the map service API to perform multi-waypoint path planning based on the location information and order of the waypoints, and generate a test route.
[0055] In this embodiment, the electronic device determines the route constraint information of the test area and the test route. Then, the electronic device divides the test area into regions to obtain a first sub-region. Next, based on the route constraint information of the test route and the first sub-region, the electronic device determines the second sub-region and the points of interest (POIs) traversed by the test route in the second sub-region. Based on the POIs of the second sub-region, the electronic device determines the waypoints traversed by the test route. Finally, based on the location information of the second sub-region or the location information of the waypoints, the electronic device determines the route order of the waypoints and generates the test route based on the waypoints and the route order. In this way, without manual intervention, the electronic device can automatically generate the test route based on the route constraint information of the test area and the test route, thereby improving route planning efficiency and thus improving the efficiency of urban generalization testing.
[0056] like Figure 2 As shown above, in the above Figure 1 Based on the illustrated embodiment, step 102 may include the following steps:
[0057] Step 201: Divide the test area into regions to obtain the third sub-region.
[0058] For example, after the electronic device determines the test area, it can divide the test area into multiple first-region grids according to the preset area of the first-region grid. Each first-region grid is a third sub-region. Since the test area is usually an irregular area, the area of the third sub-region containing the boundary of the test area is usually smaller than the preset area of the first-region grid, while the area of the third sub-region not containing the boundary of the test area is usually equal to the preset area of the first-region grid. The grid division method in step 201 is similar to the grid division method in step 102 above; for details, please refer to the grid division method in step 102 above.
[0059] Step 202: Determine the first region type of the third sub-region.
[0060] For example, in the third sub-region, some parts of the third sub-region have complex road environments, while others have simple road environments. For instance, the test area includes two main areas: urban and suburban. After the electronic device divides the test area, the third sub-region obtained from the urban area has a complex road environment, while the third sub-region obtained from the suburban area has a simple road environment.
[0061] To ensure that the urban generalization test can fully test various complex road environments in the test area, the proportion of complex road environments in the second sub-region traversed by the test route generated by the electronic device needs to be as large as possible compared to the proportion of simple road environments. Since the second sub-regions traversed by the test route are selected from the first sub-region, the electronic device needs to increase the proportion of complex road environments and decrease the proportion of simple road environments in the first sub-region. Based on this, after obtaining the third sub-region, the electronic device will not directly identify it as the first sub-region, but will first determine the first region type of the third sub-region. The first region type characterizes the complexity of the road environment in the third sub-region, and includes dense and sparse region types. Dense region types indicate complex road environments, while sparse region types indicate simple road environments. Then, for third sub-regions of different first region types, the electronic device uses different processing methods to further process the third sub-regions to increase the proportion of complex road environments and decrease the proportion of simple road environments. The process of determining the first region type of the third sub-region by the electronic device will be described in detail later and will not be repeated here.
[0062] Step 203: In response to the fact that the first region type of the third sub-region is a dense region type, the third sub-region is divided into regions to obtain the first sub-region.
[0063] For example, after the electronic device determines the first region type of the third sub-region, for a third sub-region whose first region type is a dense region type, the electronic device can further divide the third sub-region to obtain first sub-regions. Specifically, in response to the first region type of the third sub-region being a dense region type, the electronic device can further divide the third sub-region into multiple second region grids according to a preset second region grid area. Each second region grid is equivalent to one first sub-region; the area of the second region grid is smaller than the area of the first region grid; the smaller the area of the second region grid, the more first sub-regions the electronic device obtains from dividing the third sub-region; conversely, the larger the area of the second region grid, the fewer first sub-regions the electronic device obtains from dividing the third sub-region.
[0064] Step 204: In response to the fact that the first region type of the third sub-region is a sparse region type, the third sub-region is determined as the first sub-region, or the third sub-region and the fourth sub-region whose distance from the third sub-region meets the first preset distance condition and whose first region type is a sparse region type are merged into the first sub-region.
[0065] For example, after the electronic device determines the first region type of the third sub-region, for a third sub-region whose first region type is a sparse region type, the electronic device can directly determine the third sub-region as the first sub-region. Alternatively, the electronic device can also determine a fourth sub-region centered on the third sub-region, whose distance from the third sub-region satisfies a first preset distance condition and whose first region type is a sparse region type. Then, the electronic device can merge the determined fourth sub-region and the third sub-region into one sub-region, and determine the merged sub-region as the first sub-region. The first preset distance condition can be set as an integer multiple of the side length of the third sub-region, or it can be set in other ways; this embodiment of the present disclosure is not limited to this. The larger the distance in the first preset distance condition, the fewer the number of first sub-regions obtained by merging the fourth and third sub-regions. The smaller the distance in the first preset distance condition, the more the number of first sub-regions obtained by merging the fourth and third sub-regions.
[0066] In this embodiment, the electronic device divides the test area into regions to obtain a third sub-region. Then, the electronic device determines the first region type of the third sub-region. Subsequently, in response to the first region type of the third sub-region being a dense region type, the electronic device divides the third sub-region into regions to obtain a first sub-region. In response to the first region type of the third sub-region being a sparse region type, the electronic device determines the third sub-region as the first sub-region; alternatively, the electronic device merges the fourth sub-region and the third sub-region, whose distance from the third sub-region meets a first preset distance condition and whose first region type is a sparse region type, into the first sub-region. In this way, the electronic device can increase the proportion of first sub-regions with complex road environments and decrease the proportion of first sub-regions with simple road environments. This indirectly increases the proportion of second sub-regions with complex road environments and decreases the proportion of second sub-regions with simple road environments in the second sub-regions traversed by the test route, thereby ensuring that the urban generalization test can fully test various complex road environments in the test area.
[0067] like Figure 3 As shown above, in the above Figure 2 Based on the illustrated embodiment, step 202 may include the following steps:
[0068] Step 301: Obtain the number of facility points and road network length in the third sub-region.
[0069] For example, after obtaining a third sub-region, the electronic device can further call the map service API to obtain the number of facilities and the road network length of that third sub-region. The number of facilities in the third sub-region refers to the number of entities providing public or commercial services to residents within that sub-region, as detailed in the aforementioned embodiment. A larger number of facilities in the third sub-region indicates higher pedestrian traffic and a more complex road environment. A smaller number of facilities indicates lower pedestrian traffic and a simpler road environment. The road network length of the third sub-region refers to the total length of all roads (including motor vehicle lanes, non-motor vehicle lanes, pedestrian walkways, etc.) within that sub-region. A longer road network length indicates higher road network density and a more complex road environment. A shorter road network length indicates lower road network density and a simpler road environment.
[0070] Step 302: In response to the number of facility points being greater than or equal to a preset facility point number threshold and the road network length being greater than or equal to a preset road network length threshold, the first area type of the third sub-region is determined to be a dense area type.
[0071] For example, the electronic device may pre-store facility number thresholds and road network length thresholds. These thresholds can be set by technicians based on experience, and this embodiment does not limit their settings. After obtaining the facility number and road network length of the third sub-region, the electronic device can simultaneously determine whether the facility number of the third sub-region is greater than or equal to a preset facility number threshold and whether the road network length of the third sub-region is greater than or equal to a preset road network length threshold. If the facility number and road network length of the third sub-region are both greater than or equal to the preset facility number thresholds, it indicates that the road environment of the third sub-region is complex. Accordingly, the electronic device can determine that the first region type of the third sub-region is a dense region type. For example, the test area includes two main regions: urban and suburban. The urban area has a larger number of facilities and a longer road network. After the electronic device divides the test area, the number of facilities in the third sub-region obtained from the urban area is greater than or equal to the preset facility number threshold and the road network length is greater than or equal to the preset road network length threshold. Therefore, the first region type of the third sub-region obtained from the urban area is a dense region type.
[0072] Step 303: In response to the number of facility points being less than the facility point number threshold, or the road network length being less than the road network length threshold, determine the first region type of the third sub-region as a sparse region type.
[0073] For example, if the number of facilities in the third sub-region is less than a preset threshold, or the road network length is less than a preset threshold, it indicates that the road environment of the third sub-region is simple. Accordingly, the electronic device can determine that the first region type of the third sub-region is a sparse region type. For instance, the test area includes two main areas: urban and suburban. The suburban area has fewer facilities and a shorter road network. After the electronic device divides the test area, if the number of facilities in the third sub-region obtained from the suburban area is less than the threshold, or the road network length is less than the threshold, then the first region type of the third sub-region obtained from the suburban area is a sparse region type.
[0074] In this embodiment, the electronic device acquires the number of facility points and the road network length of the third sub-region, and determines whether the first region type of the third sub-region is a dense region type or a sparse region type based on the number of facility points and the road network length. By determining the first region type of the third sub-region from both the number of facility points and the road network length, the electronic device can improve the accuracy of determining the first region type of the third sub-region.
[0075] like Figure 4 As shown above, in the above Figure 1 Based on the illustrated embodiment, the route constraint information includes the number of waypoints and the type of point of interest. Step 103 may include the following steps:
[0076] Step 401: In the first sub-region, determine the number of first sub-regions with passing points, which will be used as the second sub-regions through which the test route passes.
[0077] For example, the number of waypoints in a test route refers to the total number of all waypoints traversed by the test route. Different test routes may have the same or different number of waypoints, and this disclosure does not limit this. To ensure that the urban generalization test can fully test various complex road environments in the test area, the test route generated by the electronic device needs to traverse as many different sub-regions as possible within the test area. That is, different waypoints traversed by the test route need to be located in different first sub-regions. Therefore, the electronic device can determine a number of first sub-regions with waypoints within the first sub-region as the second sub-regions traversed by the test route. To avoid the determined second sub-regions being too concentrated, which would prevent the urban generalization test from fully testing various complex road environments in the test area, the distance between any two second sub-regions determined by the electronic device needs to meet a preset distance condition. The process of the electronic device determining a number of first sub-regions with waypoints within the first sub-region as the second sub-regions traversed by the test route will be described in detail later and will not be repeated here.
[0078] Step 402: Among the facility points in the second sub-region, identify the facility points whose facility point type is point of interest and use them as points of interest in the second sub-region.
[0079] For example, the point of interest type of the test route refers to the facility type of the facilities the test route is expected to pass through in the test area. Different test routes may have the same or different point of interest types, and this embodiment of the disclosure does not limit this. After the electronic device determines the second sub-area through which the test route passes, the electronic device can call the map service API to obtain the facility points contained in the second sub-area. Here, the facility points in the second sub-area refer to entities in the second sub-area that provide public or commercial services to residents. Then, the electronic device can further determine the facility points with the point of interest type as points of interest in the second sub-area. For example, the facility point types in the second sub-area include infrastructure point types, public service point types, and commercial point types. The point of interest type of the test route is infrastructure point type and public service point type, or the point of interest type of the test route is certain specific facility point types included in the infrastructure point type (such as bus stops, subway stations, etc.) and certain specific facility point types included in the public service point type (such as schools, hospitals, libraries, etc.). Therefore, electronic devices can identify infrastructure point type and public service facility point type facilities as points of interest in the second sub-region.
[0080] In this embodiment, the electronic device identifies a number of first sub-regions as the route points within a first sub-region, which are then designated as second sub-regions traversed by the test route. Next, the electronic device identifies facility points of interest type within the second sub-region as points of interest for that second sub-region. This ensures that the urban generalization test can adequately test various complex road environments within the test area.
[0081] like Figure 5 As shown above, in the above Figure 4 Based on the illustrated embodiment, step 401 may include the following steps:
[0082] Step 501: In the first sub-region, determine a first sub-region as a second sub-region through which the test route passes.
[0083] For example, to ensure that the urban generalization test can fully test various complex road environments within the test area, the test route generated by the electronic device needs to pass through as many different sub-regions as possible within the test area. That is, different waypoints along the test route need to be located in different first sub-regions. Therefore, the electronic device can randomly select one of the first sub-regions as a second sub-region traversed by the test route. For example, as... Figure 6 As shown, the electronic device randomly selects sub-region A(6,2) within the first sub-region as a second sub-region along the test route. Here, sub-region A(6,2) represents the first sub-region located in row 6 and column 2, and the second sub-region is... Figure 6 The shaded area is indicated by the diagonal line to the left. Of course, those skilled in the art can also use other algorithms to determine a first sub-region within the first sub-region, which can then be used as a second sub-region along the test route; this disclosure does not limit this approach.
[0084] Step 502: Determine the second region type of the first sub-region whose distance from the second sub-region meets the second preset distance condition as the filtered region type.
[0085] For example, to avoid the identified second sub-regions being too concentrated, which would prevent the city-wide generalization test from fully testing the various complex road environments in the test area, after the electronic device identifies a second sub-region, it can determine the second region type of the first sub-region whose distance from the second sub-region meets a second preset distance condition as a filtered region type. The second region type of the first sub-region is used to characterize whether the first sub-region can be selected as the second sub-region. The second region type includes filtered region types and unfiltered region types. If the second region type of the first sub-region is a filtered region type, the electronic device will not determine that first sub-region as the second sub-region. If the second region type of the first sub-region is an unfiltered region type, the electronic device may determine that first sub-region as the second sub-region. The second preset distance condition can be set as an integer multiple of the side length of the first sub-region, or it can be set in other ways; this embodiment of the disclosure is not limited to this. For example, the second preset distance condition is the first sub-region adjacent to the second sub-region. After the electronic device identifies the first sub-region A(6,2) as the second sub-region, it can then identify the second region type of the first sub-regions A(5,1), A(5,2), A(5,3), A(6,1), A(6,3), A(7,1), A(7,2), and A(7,3) as the filtered region type. The first sub-region whose second region type is the filtered region type is... Figure 6 The shaded area is represented by dots.
[0086] Step 503: In the first sub-region where the second region type is an unfiltered region type, determine a first sub-region as the next second sub-region that the test route passes through, until the number of sub-regions of the second sub-regions passed through by the test route reaches the number of passing points.
[0087] For example, after the electronic device identifies the second sub-region whose distance from the second sub-region meets the second preset distance condition as a filtered region type, it further randomly selects a first sub-region from the first sub-regions whose second region type is an unfiltered region type, as the next second sub-region traversed by the test route. For example, as Figure 6 As shown, the electronic device randomly selects a first sub-region A(3, 7) from the first sub-region of the second region type (unfiltered region type) as the next second sub-region traversed by the test route. Then, after determining the next second sub-region, the electronic device can define the second region type of the first sub-region whose distance from the second sub-region meets a second preset distance condition as a filtered region type. For example, the second preset distance condition is the first sub-region adjacent to the second sub-region. After determining the first sub-region A(3, 7) as the second sub-region, the electronic device can define the second region types of the first sub-regions A(2, 6), A(2, 7), A(2, 8), A(3, 6), A(3, 8), A(4, 6), A(4, 7), and A(4, 8) as filtered region types. Afterwards, the electronic device randomly selects a first sub-region from the first sub-region of the second region type (unfiltered region type) as the next second sub-region traversed by the test route. For example, as... Figure 6 As shown, within the first sub-region of the second region type (unfiltered region type), the electronic device randomly selects the first sub-region A(7, 11) as the next second sub-region traversed by the test route. Subsequently, the electronic device determines the second region type of the first sub-region whose distance from the second sub-region meets a second preset distance condition as a filtered region type. For example, the second preset distance condition is the first sub-region adjacent to the second sub-region. After determining the first sub-region A(7, 11) as the second sub-region, the electronic device can then determine the second region types of the first sub-regions A(6, 10), A(6, 11), and A(7, 10) as filtered region types. This process continues until the number of sub-regions of the second sub-region traversed by the test route reaches the number of transit points.
[0088] In this embodiment, the electronic device determines a first sub-region within a first sub-region as a second sub-region traversed by the test route. Then, the electronic device determines the second sub-region type of the first sub-region whose distance from the second sub-region meets a second preset distance condition as a filtered region type. Subsequently, within the first sub-regions of the second region type that are not filtered, the electronic device determines another first sub-region as the next second sub-region traversed by the test route, until the number of sub-regions traversed by the test route reaches the number of waypoints. In this way, on the one hand, the test route generated by the electronic device can traverse as many sub-regions as possible in different locations within the test area, ensuring that the urban generalization test can fully test various complex road environments within the test area. On the other hand, the second sub-regions determined by the electronic device are not overly concentrated, ensuring that the urban generalization test can fully test various complex road environments within the test area.
[0089] like Figure 7 As shown above, in the above Figure 1 Based on the illustrated embodiment, the route constraint information also includes the test road type, and step 106 may include the following steps:
[0090] Step 701: Determine the first road segment that is closest to the waypoint and whose road type is the test road type.
[0091] For example, the route constraint information also includes test road types. The test road type is the road type expected to be tested in the city generalization test. Different test routes may have the same or different test road types; this embodiment does not limit this. A test route may correspond to one test road type or multiple test road types; this embodiment does not limit this. For a test route corresponding to multiple test road types, the route constraint information can include the priority of the test road types through explicit or implicit methods. For example, explicit method: [Test road type 1, priority 1], [Test road type 2, priority 3], [Test road type 3, priority 2]. Wherein, the priority of test road type 1 > the priority of test road type 3 > the priority of test road type 2. Implicit method: [Test road type 1, Test road type 2, Test road type 3]. Wherein, the order of the test road types is the priority corresponding to the test road type; the priority of test road type 1 > the priority of test road type 2 > the priority of test road type 3.
[0092] Since the waypoints along the test route are determined from the points of interest in the second sub-region, and the points of interest in the second sub-region are determined from the facility points in the second sub-region, the waypoints along the test route are facility points in the second sub-region. Furthermore, due to the limitation that the waypoints along the test route are facility points, the road types along the test route may not be consistent with the test road types expected in the city generalization test. For example, the waypoints along the test route might be schools, hospitals, and shopping malls. Correspondingly, the road types along the test route are usually urban arterial roads, urban secondary arterial roads, etc. However, the test road types expected in the city generalization test are highways and provincial roads, thus causing the generated test route to fail to achieve the testing purpose of the city generalization test. Based on this, if the road type of the road reaching the waypoint is inconsistent with the test road type expected in the city generalization test, the electronic device can use that waypoint as the center to determine the first road segment that is closest to that waypoint and has the road type of the test road. If the road type of the road reaching the waypoint is consistent with the test road type expected in the city generalization test, the electronic device does not need to process it.
[0093] It should be noted that for a test route corresponding to multiple test road types, the electronic device can determine the first road segment of the test road type that is closest to the route point, centered on the route point, according to the priority of the test road types from high to low. For example, the test road types are highways and provincial roads. Highways have a higher priority than provincial roads. The electronic device can first determine the first road segment of the highway type that is closest to the route point. If the electronic device determines the first road segment of the highway type, it stops determining the first road segment. If the electronic device does not determine the first road segment of the highway type, it can then determine the first road segment of the provincial road type that is closest to the route point.
[0094] Step 702: Update waypoints based on the first road segment.
[0095] For example, after the electronic device identifies the first road segment that is closest to the waypoint and is of the test road type, it can update the waypoint to the first road segment. Specifically, the electronic device can identify the first road segment as the new waypoint and replace the original waypoint; that is, the electronic device can update the location information of the waypoint to the location information of the first road segment.
[0096] Step 703: Generate a test route based on waypoints and route sequence.
[0097] For example, after updating waypoints, electronic devices can further call the map service API to perform multi-waypoint route planning based on the location information and route order of the waypoints, and regenerate the test route.
[0098] In this embodiment, the electronic device determines a first road segment that is closest to the waypoint and has a road type of the test road type. Then, the electronic device updates the waypoint based on the first road segment. Afterward, the electronic device generates a test route based on the waypoint and the route sequence. Thus, if the road type of the roads traversed by the test route is inconsistent with the expected test road type for the urban generalization test, the electronic device can update the waypoint to the first road segment with the road type of the test road type and regenerate the test route to ensure that the generated test route can achieve the testing objective of the urban generalization test.
[0099] like Figure 8 As shown above, in the above Figure 1 Based on the illustrated embodiment, step 106 may include the following steps:
[0100] Step 801: Determine the waypoints along the road whose road type is restricted, and determine the second road segment that is closest to the waypoints and whose road type is unrestricted.
[0101] For example, due to factors such as road construction, road closures, and vehicle restrictions, roads passing through certain points in the test route may be unable to perform urban generalization testing, thus preventing the generated test route from achieving the testing objective of urban generalization testing. The road type of the aforementioned road that the test vehicle cannot pass is a restricted road type. Restricted road types may include construction roads, closed roads, restricted roads (such as internal roads), and may also include other types of roads, which are not limited in this embodiment. After the electronic device determines the point of interest of the test route from the points of interest in the second sub-region, it can directly generate the test route based on the point of interest and the route sequence. Then, the electronic device can determine whether there are roads of the restricted road type (hereinafter referred to as restricted roads) in the generated test route. If there are restricted roads in the test route, the electronic device can further determine the point of interest passed by the restricted road. Then, for the point of interest passed by the restricted road, the electronic device can determine the second road segment that is closest to the point of interest and has a non-restricted road type, centered on that point. If there are no restricted roads in the test route, the electronic device does not need to perform any processing.
[0102] Step 802: Update waypoints based on the second road segment.
[0103] For example, after the electronic device determines the second road segment that is closest to the waypoint and is of an unrestricted road type, it can update the waypoint to the second road segment. Specifically, the electronic device can determine the first road segment as the new waypoint and replace the original waypoint; that is, the electronic device can update the location information of the waypoint to the location information of the second road segment.
[0104] Step 803: Generate a test route based on waypoints and route sequence.
[0105] For example, after updating waypoints, electronic devices can further call the map service API to perform multi-waypoint route planning based on the location information and route order of the waypoints, and regenerate the test route.
[0106] In this embodiment, for a road of restricted road type passing through a waypoint, the electronic device determines a second road segment of unrestricted road type that is closest to the waypoint. Then, the electronic device updates the waypoint based on the second road segment. Afterwards, the electronic device generates a test route based on the waypoint and the route sequence. Thus, if factors such as road construction, road closures, or vehicle restrictions prevent a road passing through a certain waypoint from being used for urban generalization testing, the electronic device can update the waypoint to the second road segment of unrestricted road type and regenerate the test route to ensure that the generated test route can achieve the testing objective of urban generalization testing.
[0107] Exemplary device
[0108] Figure 9 This is a schematic diagram of the structure of an image processing apparatus provided in an exemplary embodiment of the present disclosure. The route planning apparatus includes: an information determination module 910, a region division module 920, a region determination module 930, a waypoint determination module 940, a route sequence determination module 950, and a test route generation module 960.
[0109] The information determination module 910 is used to determine the route constraint information of the test area and test route;
[0110] The region division module 920 is used to divide the test region to obtain a first sub-region;
[0111] The region determination module 930 is used to determine the second sub-region and the points of interest in the second sub-region through which the test route passes, based on the route constraint information of the test route and the first sub-region;
[0112] The waypoint determination module 940 is used to determine the waypoints along the test route based on the points of interest in the second sub-region;
[0113] The route sequence determination module 950 is used to determine the route sequence of the route points based on the location information of the second sub-region or the location information of the route points;
[0114] The test route generation module 960 is used to generate the test route based on the waypoints and the route sequence.
[0115] In some embodiments, the region division module 920 includes:
[0116] A region division unit is used to divide the test region to obtain a third sub-region;
[0117] A region type determination unit is used to determine the first region type of the third sub-region;
[0118] The first region determination unit is configured to, in response to the first region type of the third sub-region being a dense region type, divide the third sub-region into regions to obtain the first sub-region.
[0119] The second region determination unit is configured to determine the third sub-region as the first sub-region in response to the first region type of the third sub-region being a sparse region type, or to merge the third sub-region and a fourth sub-region whose distance from the third sub-region satisfies a first preset distance condition and whose first region type is a sparse region type into the first sub-region.
[0120] In some embodiments, the region type determination unit is specifically used for:
[0121] Obtain the number of facility points and road network length of the third sub-region;
[0122] In response to the fact that the number of facility points is greater than or equal to a preset facility point number threshold and the road network length is greater than or equal to a preset road network length threshold, the first region type of the third sub-region is determined to be a dense region type.
[0123] In response to the number of facility points being less than the facility point number threshold, or the road network length being less than the road network length threshold, the first region type of the third sub-region is determined to be a sparse region type.
[0124] In some embodiments, the route constraint information includes the number of waypoints and the type of point of interest; the region determination module 930 includes:
[0125] The third region determination unit is used to determine the number of first sub-regions with the passing points in the first sub-region as the second sub-regions through which the test route passes;
[0126] The point of interest determination unit is used to determine, among the facility points in the second sub-region, facility points of the type of the point of interest, as points of interest in the second sub-region.
[0127] In some embodiments, the third region determining unit is specifically used for:
[0128] Within the first sub-region, a first sub-region is determined as a second sub-region through which the test route passes;
[0129] The second region type of the first sub-region whose distance from the second sub-region meets the second preset distance condition is determined to be the filtered region type;
[0130] In the first sub-region where the second region type is an unfiltered region type, a first sub-region is determined as the next second sub-region traversed by the test route, until the number of sub-regions of the second sub-region traversed by the test route reaches the number of traversal points.
[0131] In some embodiments, the route constraint information further includes a test road type, and the test route generation module 960 includes:
[0132] The first road determination unit is used to determine the first road segment that is closest to the waypoint and whose road type is the test road type;
[0133] The first waypoint update unit is used to update the waypoints based on the first road segment;
[0134] The first test route generation unit is used to generate the test route based on the waypoints and the route sequence.
[0135] In some embodiments, the test route generation module 960 includes:
[0136] The second road determination unit is used to determine the waypoints passed by the road of the restricted road type, and to determine the second road segment that is closest to the waypoint and is of the unrestricted road type.
[0137] The first waypoint update unit is used to update the waypoints based on the second road segment;
[0138] The second test route generation unit is used to generate the test route based on the waypoints and the route sequence.
[0139] The beneficial technical effects corresponding to the exemplary embodiments of this device can be found in the corresponding beneficial technical effects of the exemplary method section above, and will not be repeated here.
[0140] Exemplary electronic devices
[0141] Figure 10 A structural diagram of an electronic device provided in an embodiment of this disclosure includes at least one processor 11 and a memory 12.
[0142] The processor 11 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
[0143] The memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may execute one or more computer program instructions to implement the route planning methods and / or other desired functions of the various embodiments of this disclosure described above.
[0144] In one example, the electronic device 10 may also include an input device 13 and an output device 14, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0145] The input device 13 may also include, for example, a keyboard, a mouse, etc.
[0146] The output device 14 can output various information to the outside, including, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0147] Of course, for the sake of simplicity, Figure 10 Only some of the components of the electronic device 10 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 10 may include any other suitable components depending on the specific application.
[0148] Exemplary computer program products and computer-readable storage media
[0149] In addition to the methods and apparatus described above, embodiments of this disclosure may also provide a computer program product, including computer program instructions that, when executed by a processor, cause the processor to perform the steps of the route planning methods of the various embodiments of this disclosure described in the "Exemplary Methods" section above.
[0150] Computer program products can be written in any combination of one or more programming languages to perform the operations of embodiments of this disclosure. These programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0151] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps of the route planning methods of the various embodiments of this disclosure described in the "Exemplary Methods" section above.
[0152] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, but is not limited to, systems, apparatuses, or devices that are electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0153] The basic principles of this disclosure have been described above with reference to specific embodiments. However, the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0154] Various modifications and variations can be made to this disclosure without departing from its spirit and scope. Therefore, this disclosure is also intended to include such modifications and variations if they fall within the scope of the claims of this disclosure and their equivalents.
Claims
1. A route planning method, said method being applied to an electronic device, comprising: Determine the route constraint information for the test area and test route; The test area is divided into regions to obtain the first sub-region; Based on the route constraint information of the test route and the first sub-region, the second sub-region through which the test route passes and the points of interest in the second sub-region are determined; Based on the points of interest in the second sub-region, the waypoints along the test route are determined; Based on the location information of the second sub-region or the location information of the waypoints, the route sequence of the waypoints is determined; The test route is generated based on the waypoints and the route sequence; The route constraint information includes the number of waypoints and the type of points of interest; The step of determining the second sub-region and the points of interest (POIs) traversed by the test route based on the route constraint information of the test route and the first sub-region includes: determining a number of first sub-regions with the number of traversed points in the first sub-region as the second sub-region traversed by the test route; and determining, among the facility points in the second sub-region, facility points of the type of the POIs as the POIs of the second sub-region.
2. The method according to claim 1, wherein, The step of dividing the test area into regions to obtain a first sub-region includes: The test area is divided into regions to obtain a third sub-region; Determine the first region type of the third sub-region; In response to the fact that the first region type of the third sub-region is a dense region type, the third sub-region is divided into regions to obtain the first sub-region; In response to the fact that the first region type of the third sub-region is a sparse region type, the third sub-region is determined as the first sub-region, or the third sub-region and the fourth sub-region whose distance from the third sub-region meets the first preset distance condition and whose first region type is a sparse region type are merged into the first sub-region.
3. The method according to claim 2, wherein, Determining the first region type of the third sub-region includes: Obtain the number of facility points and road network length of the third sub-region; In response to the fact that the number of facility points is greater than or equal to a preset facility point number threshold and the road network length is greater than or equal to a preset road network length threshold, the first region type of the third sub-region is determined to be a dense region type. In response to the number of facility points being less than the facility point number threshold, or the road network length being less than the road network length threshold, the first region type of the third sub-region is determined to be a sparse region type.
4. The method according to claim 1, wherein, The step of determining the number of first sub-regions with the specified number of transit points within the first sub-region, as the second sub-regions traversed by the test route, includes: Within the first sub-region, a first sub-region is determined as a second sub-region through which the test route passes; The second region type of the first sub-region whose distance from the second sub-region meets the second preset distance condition is determined to be the filtered region type; In the first sub-region where the second region type is an unfiltered region type, a first sub-region is determined as the next second sub-region traversed by the test route, until the number of sub-regions of the second sub-region traversed by the test route reaches the number of traversal points.
5. The method according to claim 1, wherein, The route constraint information also includes the test road type, and the generation of the test route based on the waypoints and the route sequence includes: Determine the first road segment that is closest to the waypoint and whose road type is the test road type; Update the waypoints based on the first road segment; The test route is generated based on the waypoints and the route sequence.
6. The method according to any one of claims 1 to 3 or 5, wherein, The generation of the test route based on the waypoints and the route sequence includes: Determine the waypoints along the road whose road type is restricted, and determine the second road segment that is closest to the waypoints and whose road type is unrestricted; Update the waypoints based on the second road segment; The test route is generated based on the waypoints and the route sequence.
7. A route planning device, said device being applied to an electronic device, comprising: The information determination module is used to determine the route constraint information of the test area and test route; The region division module is used to divide the test region into regions to obtain a first sub-region; The region determination module is used to determine the second sub-region and the points of interest in the second sub-region through which the test route passes, based on the route constraint information of the test route and the first sub-region; The waypoint determination module is used to determine the waypoints along the test route based on the points of interest in the second sub-region; The route sequence determination module is used to determine the route sequence of the route points based on the location information of the second sub-region or the location information of the route points; The test route generation module is used to generate the test route based on the waypoints and the route sequence; The route constraint information includes the number of waypoints and the type of points of interest; The region determination module includes: a third region determination unit, used to determine the number of first sub-regions of the route points in the first sub-region as the second sub-regions through which the test route passes; The point of interest determination unit is used to determine, among the facility points in the second sub-region, facility points of the type of the point of interest, as points of interest in the second sub-region.
8. A computer-readable storage medium storing a computer program for performing the route planning method according to any one of claims 1-6.
9. An electronic device, the electronic device comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the route planning method according to any one of claims 1-6.
Citation Information
Patent Citations
Route generation method and device, equipment and storage medium
CN117575114A
Path planning method and device, electronic equipment and readable storage medium
CN119147002A