Path planning method and device, computer device and storage medium

By obtaining the boundary segments and turns of the restricted area, the recommended route with the minimum passage cost is determined, which solves the problems of high resource consumption and detours in traditional path planning methods and achieves more efficient path planning.

CN116954207BActive Publication Date: 2026-07-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-04-18
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Traditional route planning methods require exploring all road segments and turns between them in restricted areas, resulting in huge resource consumption and the potential for local detours.

Method used

By receiving route planning requests, the system obtains the boundary road segments and boundary turns of the restricted area, and determines the recommended route with the minimum passage cost based on the starting point, ending point and boundary information, thus avoiding the need to mine the road segments and turns within the restricted area.

Benefits of technology

It reduces the consumption of service resources, improves the rationality of route planning, avoids local detours, and enhances the effectiveness of recommended routes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116954207B_ABST
    Figure CN116954207B_ABST
Patent Text Reader

Abstract

This application relates to a path planning method, apparatus, computer device, and storage medium. The method, applied in the field of autonomous driving, includes: receiving a path planning request, the request carrying a start point location and a target end point location; if a restricted area matching the path planning request exists, obtaining the boundary road segments and boundary turns corresponding to the restricted area; and determining a recommended route with minimum travel cost based on the start point location, the target end point location, and the boundary road segments and boundary turns corresponding to the restricted area. This method eliminates the need to discover all road segments and turns within the restricted area, reducing the consumption of service resources. Furthermore, when a restricted area exists, path planning is performed only for the identified boundary road segments and boundary turns located at the boundary of the restricted area, avoiding the problem of prioritizing other road segments to avoid the restricted area and resulting in local detours, further improving the rationality of the determined recommended route.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a path planning method, apparatus, computer device, and storage medium. Background Technology

[0002] With the development of artificial intelligence technology and increasingly stringent safety management of road traffic, in order to alleviate local traffic pressure in different regions, a method has emerged to set up restricted areas and corresponding restricted times for different restricted areas, so as to reduce the number of vehicles in the restricted areas during the specified restricted times, alleviate traffic congestion, and maintain road traffic safety.

[0003] Traditionally, when route planning is required in areas with traffic restrictions, the approach is often to avoid entering these areas as much as possible. The basic idea behind route planning is to calculate the cost of each road segment from the starting point to the destination and determine the optimal route with the lowest cost. Therefore, it is necessary to identify all road segments within the traffic restriction area and set a high cost for each segment to avoid all road segments with high costs during route planning.

[0004] However, current planning methods, which require identifying all road segments within the restricted area and setting toll costs, result in significant service memory consumption and resource waste. Furthermore, if unavoidable situations exist, such as when the destination is within a restricted area, the system may prioritize avoiding the restricted area until it becomes unavoidable, leading to partial detours and increased overall toll costs. Therefore, traditional planning methods still suffer from significant service memory consumption and inefficient route planning. Summary of the Invention

[0005] Therefore, it is necessary to provide a path planning method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can reduce resource consumption and improve the rationality of path planning in order to address the above-mentioned technical problems.

[0006] Firstly, this application provides a path planning method. The method includes:

[0007] Receive a route planning request, the route planning request carrying the starting position and the target destination position;

[0008] If a restricted area exists that matches the route planning request, obtain the boundary road segment and boundary turn corresponding to the restricted area;

[0009] Based on the starting point, the destination, and the boundary road segments and turns corresponding to the restricted area, a recommended route with the minimum travel cost is determined.

[0010] In one embodiment, determining the positional relationship between the effective road segment corresponding to each ray and the area surface based on the number of times each ray crosses the boundary of the area surface includes:

[0011] When the number of times the ray crosses the boundary of the area surface is odd, the positional relationship between the effective road segment and the area surface is determined as a first positional relationship; the first positional relationship is used to determine the boundary road segment;

[0012] When the number of times the ray crosses the boundary of the area surface is even, the positional relationship between the effective road segment and the area surface is determined as a second positional relationship; the second positional relationship is used to determine the boundary turn.

[0013] In one embodiment, filtering out the smallest road segment bounding box that intersects with the smallest region bounding box includes:

[0014] Obtain the coordinates of the first boundary vertex of the minimum region bounding box and the coordinates of the second boundary vertex of each minimum road segment bounding box;

[0015] The coordinate values ​​of each second boundary vertex are compared with the coordinate values ​​of the first boundary vertex to determine the smallest road segment bounding box that intersects with the smallest region bounding box.

[0016] Secondly, this application also provides a path planning device. The device includes:

[0017] The route planning request receiving module is used to receive a route planning request, which carries the starting position and the target destination position;

[0018] The acquisition module is used to acquire the boundary road segments and boundary turns corresponding to the restricted area if there is a restricted area that matches the path planning request;

[0019] The recommended route determination module is used to determine the recommended route with the minimum passage cost based on the starting point location, the target destination location, and the boundary road segments and boundary turns corresponding to the restricted area.

[0020] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0021] Receive a route planning request, the route planning request carrying the starting position and the target destination position;

[0022] If a restricted area exists that matches the route planning request, obtain the boundary road segment and boundary turn corresponding to the restricted area;

[0023] Based on the starting point, the destination, and the boundary road segments and turns corresponding to the restricted area, a recommended route with the minimum travel cost is determined.

[0024] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0025] Receive a route planning request, the route planning request carrying the starting position and the target destination position;

[0026] If a restricted area exists that matches the route planning request, obtain the boundary road segment and boundary turn corresponding to the restricted area;

[0027] Based on the starting point, the destination, and the boundary road segments and turns corresponding to the restricted area, a recommended route with the minimum travel cost is determined.

[0028] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0029] Receive a route planning request, the route planning request carrying the starting position and the target destination position;

[0030] If a restricted area exists that matches the route planning request, obtain the boundary road segment and boundary turn corresponding to the restricted area;

[0031] Based on the starting point, the destination, and the boundary road segments and turns corresponding to the restricted area, a recommended route with the minimum travel cost is determined.

[0032] In the aforementioned route planning method, apparatus, computer equipment, and storage medium, a route planning request is received, and the starting and ending points carried in the request are obtained. When a restricted area matching the route planning request exists, the boundary road segments and boundary turns corresponding to the restricted area are obtained. Then, based on the starting and ending points, and the boundary road segments and boundary turns corresponding to the restricted area, a recommended route with the minimum travel cost is determined. This method significantly reduces the consumption of service resources because it does not require identifying all road segments and turns within the restricted area. Furthermore, when a restricted area exists, route planning is performed only on the identified boundary road segments and boundary turns located at the boundary of the restricted area, avoiding the problem of prioritizing other road segments to avoid the restricted area and resulting in local detours, further improving the rationality of the determined recommended route. Attached Figure Description

[0033] Figure 1 This is a diagram illustrating the application environment of the path planning method in one embodiment;

[0034] Figure 2 This is a flowchart illustrating a path planning method in one embodiment;

[0035] Figure 3 This is a flowchart illustrating the process of determining valid road segments based on traffic restriction areas and road segments in road network data in one embodiment.

[0036] Figure 4 This is a schematic diagram comparing valid and invalid road segments in one embodiment;

[0037] Figure 5 This is a flowchart illustrating the positional relationship between the area surfaces of each effective road segment and the restricted area in one embodiment;

[0038] Figure 6 This is an example schematic diagram illustrating the determination of boundary road segments in a path planning method within one embodiment;

[0039] Figure 7 This is a schematic diagram illustrating the process of determining boundary turns based on the positional relationship between each effective road segment and area surface in one embodiment.

[0040] Figure 8 This is an example schematic diagram illustrating the determination of boundary turns in a path planning method within one embodiment;

[0041] Figure 9 This is a flowchart illustrating the process of determining the recommended route with the minimum toll cost in one embodiment.

[0042] Figure 10 This is a schematic diagram of a planned route obtained from a restricted area based on a traditional method in one embodiment;

[0043] Figure 11 This is a schematic diagram of a recommended route determined based on a path planning method in one embodiment;

[0044] Figure 12 This is a flowchart illustrating the path planning method in another embodiment;

[0045] Figure 13 This is a structural block diagram of a path planning device in one embodiment;

[0046] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] The path planning method provided in this application relates to artificial intelligence (AI) technology. AI is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making functions. AI technology is a comprehensive discipline involving a wide range of fields, including both hardware and software technologies. Basic AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0049] Autonomous driving technology typically includes high-precision maps, environmental perception, behavioral decision-making, path planning, and motion control. Autonomous driving technology has broad application prospects. With the research and progress of artificial intelligence technology, it is being researched and applied in many fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless cars, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0050] The path planning method provided in this application relates to artificial intelligence-based autonomous driving technology and can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process; this system can be integrated onto server 104 or located in the cloud or on another network server. Server 104 receives a route planning request from terminal 102 and obtains the starting and ending points of the request. When server 104 determines that a restricted area matching the route planning request exists, it obtains the corresponding boundary road segments and turns, and based on the starting and ending points, and the boundary road segments and turns, determines the recommended route with the minimum travel cost. Server 104 then sends the determined recommended route to terminal 102 for display and user viewing. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart voice interaction devices, smart home appliances (such as smart TVs and smart air conditioners), smart vehicle devices, and aircraft. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0051] In one embodiment, such as Figure 2 As shown, a path planning method is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:

[0052] Step S202: Receive a path planning request, which carries the starting point position and the target destination position.

[0053] Specifically, when a route planning request is received from a terminal device, the starting point and destination location carried in the route planning request are obtained. The terminal device can be an in-vehicle intelligent terminal or a mobile intelligent terminal device, such as a smartphone or tablet.

[0054] The route planning request can be generated in response to navigation operations triggered by the user on the in-vehicle smart terminal device, such as by touching the in-vehicle smart terminal device, clicking a preset button on the in-vehicle smart terminal device, or by inputting navigation voice commands. Similarly, the route planning request can also be generated based on navigation operations triggered by the user on the application installed on the mobile smart terminal device. Navigation operations can be triggered by clicking a preset button on the mobile smart terminal device, touching a preset location on the mobile smart terminal device, or by receiving navigation voice commands input by the user.

[0055] Furthermore, the route planning request carries the start point and destination point locations to determine the recommended route with the minimum travel cost between the start point and the destination point. The start point and destination point locations can be determined by navigation information input by the user. Users can input navigation information through the display screen of an in-vehicle intelligent terminal device or a mobile intelligent terminal device, or they can input navigation voice commands to the in-vehicle intelligent terminal device or mobile intelligent terminal device to determine the corresponding start point and destination point locations.

[0056] The starting point location represents the starting point of the route when planning the path. It can be the location of a specific building or a specific intersection, or a specific coordinate or latitude and longitude on the map. The destination location represents the end point of the route when planning the path. It can also be the location of a specific building or a specific intersection, or a specific coordinate or latitude and longitude on the map.

[0057] Step S204: If a restricted area exists that matches the route planning request, obtain the boundary road segment and boundary turn corresponding to the restricted area.

[0058] Specifically, the system determines whether a restricted area matches the route planning request. If a matching restricted area is found, the system obtains the corresponding boundary road segments and boundary turns. A restricted area refers to a specific area in certain provinces, cities, or regions where vehicles or pedestrians are restricted from passing. The size of the specific area included in different restricted areas varies and can be dynamically adjusted according to actual conditions at different times. Simultaneously, setting a restricted area involves setting corresponding restricted times and specific restriction parameters, such as the license plate number and vehicle type of the restricted vehicle.

[0059] Furthermore, when a route planning request is received, it needs to be further parsed. This can be done by obtaining the access attribute information carried in the route planning request and determining whether there is a restricted area that matches the route planning request.

[0060] The access attribute information can include the vehicle identifier entered by the user. The vehicle identifier can be the vehicle's license plate number or vehicle type. Based on the vehicle identifier, it can be determined whether there is a matching restricted area. Specifically, based on the vehicle's license plate number entered by the user, it can be determined whether there is a restricted area that restricts entry for that license plate number, or based on the vehicle type, it can be determined whether there is a restricted area that restricts entry for that license plate type, so as to determine whether there is a restricted area that matches the route planning request.

[0061] For example, when the vehicle identifier is the license plate number, such as a region having restricted areas for out-of-town license plates with restricted hours from 6 PM to 10 PM, vehicles with out-of-town license plates should avoid entering the restricted areas between 6 PM and 10 PM. Conversely, when the vehicle identifier is the vehicle type, such as a region having restricted areas for large trucks with restricted hours from 8 AM to 6 PM, large trucks should also avoid entering the restricted areas between 8 AM and 6 PM.

[0062] In one embodiment, upon receiving a route planning request, it is necessary to further obtain the actual traffic policies and restricted area divisions of the current region, and determine whether there are any restricted areas matching the route planning request. For example, during a pandemic, a region may establish lockdown zones based on the severity of the outbreak. These lockdown zones, as restricted areas, prohibit all vehicles from passing, rather than determining whether passage is permitted based on the vehicle's license plate number or vehicle type. Similarly, after obtaining the actual traffic policies and restricted area divisions of the current region, for example, if the region needs to host a major event, the areas involved in the event become the corresponding restricted areas, and their actual traffic policy prohibits all vehicles from entering the restricted areas during the event.

[0063] In one embodiment, upon receiving a route planning request, the request is parsed to obtain the traffic restriction avoidance parameters carried in the request. These parameters include whether to avoid restricted areas or not. When the parameter indicates avoiding restricted areas, it means the user needs to avoid restricted areas, requiring real-time access to dynamically updated restricted areas, their corresponding boundary road segments, and boundary turns. Route planning is then performed based on these restricted areas to determine the recommended route with the lowest travel cost.

[0064] When the traffic restriction avoidance parameter is set to "Do not avoid restricted areas," route planning will not consider whether or not restricted areas need to be avoided. Instead, it will determine and display the shortest path or the shortest travel time from the starting point to the destination. Multiple recommended routes can be displayed, each considering different aspects such as shortest path or shortest travel time, for the user to choose from.

[0065] In one embodiment, determining the boundary road segment and boundary turning method corresponding to the restricted area specifically includes:

[0066] Based on the restricted areas and road segments in the road network data, valid road segments are determined; valid road segments are the road segments in the road network data that intersect with the restricted areas; based on the valid road segments and the restricted areas, the boundary road segments and boundary turns corresponding to the restricted areas are determined.

[0067] Specifically, by acquiring each road segment in the current road network data, and filtering out road segments that intersect with the restricted area from the road network data, valid road segments are determined. Then, based on the valid road segments and the restricted area, the boundary road segments and boundary turns corresponding to the restricted area are further determined.

[0068] The determined boundary road segments and boundary turns are associated with and stored with the corresponding restricted areas. That is, when the restricted area avoidance parameter is to avoid restricted areas, the restricted area matching the route planning request is determined, and the boundary road segments and boundary turns corresponding to the matched restricted area are obtained. This is used to perform route planning when there is a need to avoid restricted areas, so as to determine the recommended route with the minimum passage cost.

[0069] Furthermore, when determining valid road segments, it is necessary to determine the specific provinces, cities, or regions that may be involved in the route planning based on the starting and ending points corresponding to the route planning request. Then, the road segments corresponding to these potentially involved provinces, cities, or regions are obtained from the road network data. Finally, the valid road segments are determined based on the restricted areas and the determined road segments.

[0070] For example, if the starting and ending points of a route planning request determine that the route planning might involve area A of province B, then during route planning, it's necessary to obtain the road segments included in area A of province B from the road network data. Then, based on the restricted areas and the identified road segments, the valid road segments are determined. Similarly, if the starting and ending points of a route planning request determine that the route planning might involve areas A and C of province B, then it's necessary to obtain the road segments included in areas A and C of province B from the road network data.

[0071] Step S206: Based on the starting point location, the target destination location, and the boundary road segments and boundary turns corresponding to the restricted area, determine the recommended route with the minimum traffic cost.

[0072] Specifically, when it is determined that there is a need to avoid restricted areas, restriction weights are added to the boundary road segments and boundary turns corresponding to the restricted areas, and the first passage weight of the non-boundary road segments between the starting point and the target end point, as well as the second passage weight of the non-boundary turns between each road segment, are further determined.

[0073] The first passage weight of the non-boundary road segment between the starting point and the destination point represents the passage cost of other road segments between the starting point and the destination point, excluding the boundary road segment. This first passage weight can include the sum of the passage costs of road segments not yet entering the restricted area (excluding the boundary road segment) and other road segments after entering the restricted area. Since this embodiment does not require mining and reassigning values ​​for all road segments within the restricted area, but only considers and reassigns values ​​to the boundary road segments, it reduces server memory resource usage and consumption. Furthermore, during route planning, if the in-vehicle intelligent terminal device has downloaded an offline map, route planning and recommended route display can be based on the offline map, eliminating the need for real-time acquisition of road network data and reducing the memory resource consumption of the in-vehicle intelligent terminal device.

[0074] Similarly, the second passage weight for non-boundary turns between road segments between the starting point and the destination point is represented as the passage cost of other turns between the starting point and the destination point, excluding boundary turns. Specifically, since a turn can be understood as one road segment turning into another, the second passage weight can include the sum of the passage costs of turns on road segments that have not entered the restricted area and turns on other road segments that have entered the restricted area, excluding boundary turns. Likewise, it is not necessary to mine and reassign values ​​for all turns within the restricted area; only boundary turns within the restricted area need to be considered and reassigned.

[0075] Furthermore, based on the first passage weight, the second passage weight, and the restriction weight, the recommended route with the minimum passage cost is determined. Specifically, the sum of the first passage weight, the second passage weight, and the restriction weight for each route to be recommended is calculated to obtain the total passage cost for each route to be recommended.

[0076] In one embodiment, when performing route planning for a route planning request, the starting point and the destination point may have different distributions, including: 1) both the starting point and the destination point are located within the restricted area; 2) the starting point is located outside the restricted area and the destination point is located within the restricted area; 3) the starting point is located within the restricted area and the destination point is located outside the restricted area; and 4) both the starting point and the destination point are located outside the restricted area.

[0077] Specifically, for situations 1) to 3), since it is impossible to completely avoid restricted areas, that is, no matter how the route is planned, there will be situations where it is necessary to enter or pass through restricted areas. In order to avoid the problem of local detours caused by prioritizing other road segments to bypass restricted areas, the minimum cost of each recommended route needs to be determined for other road segments when not passing through or entering restricted areas, so as to avoid detours and the resulting increase in travel time or energy consumption of the recommended route.

[0078] Furthermore, regarding scenario 4), since both the starting and ending points are outside the restricted area, there is a possibility that the recommended route may not need to cross the restricted area. However, each recommended route also includes cases where it crosses the restricted area and cases where it does not. By calculating the toll cost when crossing the restricted area and the toll cost when not crossing the restricted area, and comparing the toll costs of each recommended route, the route with the lowest toll cost is determined and identified as the recommended route.

[0079] In particular, when assigning values ​​to boundary road segments and boundary turns, the corresponding traffic restriction weights are usually much greater than the first and second traffic weights for ordinary road segments or turns. Therefore, when both the starting point and the destination are outside the traffic restriction area, the recommended route with the minimum traffic cost is usually the route that does not pass through the traffic restriction area.

[0080] In the aforementioned route planning method, a route planning request is received, and the starting and ending points carried in the request are obtained. When a restricted area matching the route planning request exists, the boundary road segments and boundary turns corresponding to the restricted area are obtained. Then, based on the starting and ending points, and the boundary road segments and boundary turns corresponding to the restricted area, a recommended route with the minimum travel cost is determined. This method significantly reduces the consumption of service resources because it does not require mining all road segments and turns within the restricted area. When a restricted area exists, route planning is only performed on the boundary road segments and boundary turns located at the boundary of the restricted area, avoiding the problem of local detours caused by prioritizing other road segments to avoid the restricted area, further improving the rationality of the determined recommended route. In this application embodiment, there are various ways to determine effective road segments, such as judging whether the minimum bounding box of each road segment intersects with the minimum bounding box of the restricted area, or whether the endpoint coordinates of the road segment enter the area coordinate range included by the restricted area.

[0081] In one embodiment, such as Figure 3 As shown, one method for determining valid road segments based on restricted areas and road network data is provided, including:

[0082] Step S302: Obtain the smallest bounding box covering the restricted area, and the smallest bounding box of each road segment in the road network data.

[0083] Specifically, by obtaining the restricted areas that match the path planning request, and based on the extreme point positions of the restricted areas in different directions, the smallest bounding box covering the restricted areas is determined. The extreme point positions of the restricted areas are determined by the extreme coordinates of the restricted areas in different directions. For example, with the center of the restricted area as the origin, the extreme point position of the upper left corner is determined by the minimum x-coordinate and the maximum y-coordinate; the extreme point position of the lower left corner is determined by the minimum x-coordinate and the minimum y-coordinate; the extreme point position of the upper right corner is determined by the maximum x-coordinate and the maximum y-coordinate; and the extreme point position of the lower right corner is determined by the maximum x-coordinate and the minimum y-coordinate.

[0084] Similarly, by obtaining the extreme point positions of each road segment in different directions from the road network data, the smallest road segment bounding box covering the corresponding road segment is determined. The extreme point positions of each road segment in different directions are also determined based on the extreme coordinates of each road segment in different directions, using the same calculation method as for determining the extreme point positions of restricted areas.

[0085] Step S304: Select the smallest road segment bounding box that intersects with the smallest region bounding box, and determine the road segment corresponding to each selected smallest road segment bounding box as a valid road segment.

[0086] Specifically, by obtaining the coordinates of the first boundary vertex of the minimum region bounding box and the coordinates of the second boundary vertex of each minimum road segment bounding box, and comparing the coordinates of each second boundary vertex with the coordinates of the first boundary vertex, the minimum road segment bounding box intersecting with the minimum region bounding box is determined, and the road segments corresponding to each determined minimum road segment bounding box are further determined as valid road segments.

[0087] For example, the coordinates of the first boundary vertex of the smallest region bounding box may include the coordinates of the first top-left vertex and the first bottom-right vertex, while the coordinates of the second boundary vertex of the smallest road segment bounding box may include the coordinates of the second top-left vertex and the second bottom-right vertex.

[0088] Specifically, this involves comparing the ordinate value of the first bottom right vertex with the ordinate value of the second top left vertex, or comparing the x-coordinate value of the first bottom right vertex with the x-coordinate value of the second top left vertex, or comparing the ordinate value of the first top left vertex with the ordinate value of the second bottom right vertex, or comparing the x-coordinate value of the first top left vertex with the x-coordinate value of the second bottom right vertex.

[0089] The minimum road segment bounding box and the minimum region bounding box can be considered to intersect when any of the following conditions are met: the ordinate value of the first lower right corner vertex is less than the ordinate value of the second upper left corner vertex; or the abscissa value of the first lower right corner vertex is greater than the abscissa value of the second upper left corner vertex; or the ordinate value of the first upper left corner vertex is greater than the ordinate value of the second lower right corner vertex; or the abscissa value of the first upper left corner vertex is less than the abscissa value of the second lower right corner vertex.

[0090] In one embodiment, such as Figure 4 As shown, this provides a comparison diagram of valid and invalid road segments. Figure 4 It can be seen that by obtaining the minimum bounding box of the restricted area, the minimum bounding box of road segment A, and the minimum bounding box of road segment B, the coordinate values ​​of the first boundary vertex of the minimum bounding box and the coordinate values ​​of the second boundary vertex of the minimum bounding boxes of road segment A and road segment B are compared to determine whether the minimum bounding boxes of road segment A and road segment B intersect with the minimum bounding box.

[0091] Among them, reference Figure 4 It can be seen that the smallest bounding box of road segment A does not intersect with the smallest bounding box of the restricted area, so road segment A is an invalid road segment. However, the smallest bounding box of road segment B intersects with the smallest bounding box of the restricted area, so road segment B can be determined as a valid road segment.

[0092] In one embodiment, the endpoint coordinates of the two endpoints of the road segment can be obtained, along with the coordinate range of the restricted area. The endpoint coordinates of the road segment can then be compared with the coordinate range of the restricted area to determine whether the endpoint coordinates of the road segment fall within the coordinate range of the restricted area. Specifically, if the endpoint coordinates of one endpoint of the road segment fall within the coordinate range of the restricted area, or if the endpoint coordinates of both endpoints fall within the coordinate range of the restricted area, then the road segment can be identified as a valid road segment.

[0093] In this embodiment, by obtaining the smallest bounding box covering the restricted area and the smallest bounding boxes of each road segment in the road network data, the smallest bounding boxes intersecting with the smallest bounding box are selected, and the road segments corresponding to each selected smallest bounding box are determined as valid road segments. This achieves preliminary screening of each road segment in the road network data, determining the road segments corresponding to the smallest bounding boxes intersecting with the smallest bounding box of the restricted area. The obtained valid road segments are used for further screening to identify the boundary road segments of the restricted area for assignment processing. This avoids mining or assigning values ​​to all road segments within the restricted area and all road segments in the road network data, reducing the occupation of service memory resources and resource consumption during the path planning process.

[0094] In one embodiment, such as Figure 5 As shown, the steps for determining the positional relationship between each effective road segment and the restricted area include:

[0095] Step S502: Determine the starting point of each effective road segment and obtain the number of times the rays starting from each starting point cross the boundary of the area surface.

[0096] Specifically, by obtaining the starting and ending points of each effective road segment, and using the starting and ending points of each effective road segment as the ray starting points corresponding to each effective road segment, a ray is drawn in any direction from the ray starting point. The number of times the ray from each ray starting point crosses the boundary of the area surface is obtained. Based on the number of times the ray crosses the boundary of the area surface, the positional relationship between the effective road segment corresponding to the ray and the area surface is determined.

[0097] Step S504: Based on the number of times each ray crosses the boundary of the area surface, determine the positional relationship between the effective road segment corresponding to the ray and the area surface.

[0098] Specifically, when the number of times the ray crosses the boundary of the area surface is odd, the positional relationship between the valid road segment and the area surface is determined as the first positional relationship. This first positional relationship is used to determine the boundary road segment. Similarly, when the number of times the ray crosses the boundary of the area surface is even, the positional relationship between the valid road segment and the area surface is determined as the second positional relationship. This second positional relationship is used to determine the boundary turn.

[0099] The positional relationship between a valid road segment and a regional surface includes the following situations: the starting point of the valid road segment is located outside the regional surface and the ending point is located inside the regional surface; both the starting point and the ending point of the valid road segment are located outside the regional surface; the starting point of the valid road segment is located inside the regional surface and the ending point is located outside the regional surface; and both the starting point and the ending point of the valid road segment are located inside the regional surface.

[0100] Furthermore, if the number of times the ray corresponding to the starting point of a valid road segment crosses the boundary of the region surface is even, then the valid road segment is located outside the region surface. If the number of times the number of times the ray corresponding to the ending point of a valid road segment crosses the boundary of the region surface is odd, then the ending point of the valid road segment is located inside the region surface. And if the number of times both the ray corresponding to the starting point and the ray corresponding to the ending point of a valid road segment cross the boundary of the region surface is even, then both the starting and ending points of the valid road segment are located outside the region surface.

[0101] In other words, the first positional relationship can include situations where the number of times the ray corresponding to the starting point of the effective road segment crosses the boundary of the area surface is even, and the number of times the ray corresponding to the ending point crosses the boundary of the area surface is odd. That is, the positional relationship between the effective road segment and the area surface is that the starting point of the effective road segment is located outside the area surface, and the ending point is located inside the area surface. This also includes situations where the number of times the rays corresponding to the starting and ending points of the effective road segment cross the boundary of the area surface is even, meaning that the positional relationship between the effective road segment and the area surface is that both the starting and ending points of the effective road segment are located outside the area surface.

[0102] Similarly, if the number of times the ray corresponding to the starting point of a valid road segment crosses the boundary of the region surface is odd, then the valid road segment is located inside the region surface. If the number of times the number of times the ray corresponding to the ending point of a valid road segment crosses the boundary of the region surface is even, then the ending point of the valid road segment is located outside the region surface. And if the number of times both the ray corresponding to the starting point and the ray corresponding to the ending point of a valid road segment cross the boundary of the region surface is odd, then both the starting and ending points of the valid road segment are located inside the region surface.

[0103] In other words, the second positional relationship can include the fact that the number of times the ray corresponding to the starting point of the valid road segment crosses the boundary of the area surface is odd, and the number of times the ray corresponding to the ending point crosses the boundary of the area surface is even. That is, the positional relationship between the valid road segment and the area surface is that the starting point of the valid road segment is located inside the area surface, and the ending point is located outside the area surface. Alternatively, it can include the fact that the number of times the rays corresponding to the starting and ending points of the valid road segment cross the boundary of the area surface is odd, that is, the positional relationship between the valid road segment and the area surface is determined to be that both the starting and ending points of the valid road segment are located inside the area surface.

[0104] In this embodiment, by determining the starting point of each effective road segment and obtaining the number of times each ray crosses the boundary of the area surface, the positional relationship between the effective road segment and the area surface corresponding to the ray is determined based on the number of times each ray crosses the boundary of the area surface. This accurately determines the positional relationship between the effective road segment and the area surface of the restricted area, thereby further identifying the boundary road segments and boundary turns that need to be mined for assignment. This avoids mining or assigning values ​​to all road segments within the restricted area and all road segments in the road network data, reducing the occupation of service memory resources and resource consumption during the path planning process.

[0105] In one embodiment, the step of determining the boundary road segment and boundary turn corresponding to the restricted area based on the valid road segment and the restricted area includes:

[0106] Determine the positional relationship between each valid road segment and the restricted area; based on the positional relationship between each valid road segment and the restricted area, select boundary road segments from the valid road segments; based on the positional relationship between each valid road segment and the restricted area, determine the boundary turns.

[0107] Specifically, by determining the starting point of each effective road segment and obtaining the number of times the rays from each starting point cross the boundary of the area surface, the positional relationship between the effective road segment corresponding to the ray and the area surface can be determined based on the number of times each ray crosses the boundary of the area surface.

[0108] Furthermore, after determining the positional relationship between each valid road segment and the restricted area, based on the positional relationship between each valid road segment and the restricted area, valid road segments whose starting point is outside the restricted area and whose other points besides the starting point contain points within the restricted area are selected and determined as boundary road segments.

[0109] Similarly, after determining the positional relationship between each valid road segment and the restricted area, based on the positional relationship between the valid road segments and the restricted area, the target road segment with its starting point on the boundary of the restricted area is obtained, and the entry road segment corresponding to the turn with the target road segment as the exit road segment is obtained. Then, when it is determined that the entry road segment does not intersect with the restricted area, the turn formed by the entry road segment and the target road segment is determined as a boundary turn.

[0110] In this embodiment, by determining the positional relationship between each valid road segment and the restricted area, boundary road segments can be selected from the valid road segments based on the positional relationship between each valid road segment and the restricted area, and boundary turns can be determined. This achieves the determination of boundary road segments and boundary turns based on the positional relationship between each valid road segment and the restricted area, facilitating subsequent value assignment. It avoids mining or assigning values ​​to all road segments within the restricted area and all road segments in the road network data, reducing the occupation of service memory resources and resource consumption during the path planning process.

[0111] In one embodiment, the step of selecting boundary road segments from the valid road segments based on the positional relationship between each valid road segment and the area surface includes:

[0112] Based on the positional relationship between valid road segments and area surfaces, valid road segments are selected where the starting point is outside the restricted area and there are points within the restricted area among the other points besides the starting point. These are then identified as boundary road segments.

[0113] Specifically, boundary road segments are determined based on the first positional relationship between valid road segments and the area surface. This first positional relationship can include situations where the starting point of a valid road segment is located outside the area surface and the ending point is located inside the area surface, or where both the starting point and ending point of a valid road segment are located outside the area surface. Furthermore, when the starting point of a valid road segment is located outside the area surface and the ending point is located inside the area surface, or when both the starting point and ending point of a valid road segment are located outside the area surface, valid road segments whose starting point is outside the restricted area and where, among the other points besides the starting point, there is a point located within the restricted area are identified as boundary road segments.

[0114] Furthermore, such as Figure 6 As shown, this is an example diagram illustrating the determination of boundary segments in a path planning method. Figure 6 It can be seen that the starting point of valid road segment C is outside the restricted area, while the ending point is within the restricted area. The starting point and ending point of valid road segment D are both outside the restricted area, but there are points within the restricted area among the other points besides the starting point and ending point. Since a valid road segment has a starting point outside the restricted area and points within the restricted area among the other points besides the starting point, it is a boundary road segment. Therefore, it can be determined that valid road segments C and D meet the criteria for boundary road segments, i.e., both valid road segments C and D are boundary road segments.

[0115] In this embodiment, based on the positional relationship between valid road segments and area surfaces, valid road segments are selected where the starting point is outside the restricted area and there are points within the restricted area among the other points besides the starting point. These are then identified as boundary road segments. This accurately identifies boundary road segments, facilitating subsequent assignment and avoiding the need to mine or assign values ​​to all road segments within the restricted area and all road segments in the road network data. This reduces the consumption of service memory resources and resources during the path planning process.

[0116] In one embodiment, such as Figure 7 As shown, the steps for determining boundary turns based on the positional relationship between each effective road segment and area surface specifically include:

[0117] Step S702: Based on the positional relationship between the effective road segment and the area surface, obtain the target road segment whose starting point is located on the boundary of the restricted area.

[0118] Specifically, based on the second positional relationship between the valid road segment and the area surface, target road segments whose starting points are located on the boundary of the restricted area are selected. The second positional relationship can include situations such as the starting point of the valid road segment being located inside the area surface and the ending point being located outside the area surface, or the starting point and ending point of the valid road segment being located inside the area surface.

[0119] For example, if the start and end points of a valid road segment are both located within the area, and the start point is located on the boundary of the restricted area, then the valid road segment can be identified as the target road segment.

[0120] Step S704: Obtain the inbound road segment corresponding to the turn with the target road segment as the outbound road segment.

[0121] Specifically, after identifying the target road segment, the next step is to obtain the entry road segments corresponding to turns that originate from the target road segment. Since the starting point of the target road segment as an exit road segment is located on the boundary of the restricted area, it is necessary to obtain the entry road segments corresponding to turns that originate from the target road segment. These entry road segments can include those that cross the restricted area and those that do not.

[0122] Among them, the entry road segment that crosses the restricted area is understood as the endpoint being located outside the restricted area, but there are points other than the endpoint located within the restricted area. The entry road segment that does not cross the restricted area can be understood as all points of the entry road segment being located outside the restricted area.

[0123] Step S706: If the entry road segment does not intersect with the area surface, the turn formed by the entry road segment and the target road segment is determined as a boundary turn.

[0124] Specifically, after obtaining all the entry road segments corresponding to the turns with the target road segment as the exit road segment, these entry road segments are further filtered to determine the entry road segments that do not intersect with the area surface of the restricted area, that is, the entry road segments that do not cross the restricted area. The turns formed by the entry road segments that do not intersect with the area surface of the restricted area and the target road segment are determined as boundary turns.

[0125] Furthermore, such as Figure 8 The diagram illustrates an example of determining boundary turns in a path planning method. Figure 8 It can be seen that the starting point and ending point of the valid road segment E are both located within the restricted area. Therefore, the positional relationship between the valid road segment E and the restricted area can be determined as the second positional relationship. Since the starting point of the valid road segment E is located on the boundary of the restricted area, the valid road segment E can be identified as the target road segment. Then, the entry road segment F corresponding to the turn with the target road segment as the exit road segment is obtained to further determine whether the entry road segment F intersects with the restricted area.

[0126] Among them, reference Figure 8 It can be seen that when the entry road segment F and the restricted area do not intersect, the turn formed by the entry road segment F and the target road segment can be defined as a boundary turn.

[0127] In this embodiment, based on the positional relationship between the effective road segment and the area surface, the target road segment with its starting point located on the boundary of the restricted area is obtained, and the inbound road segment corresponding to the turn with the target road segment as the outbound road segment is obtained. Then, when it is determined that the inbound road segment does not intersect with the area surface, the turn formed by the inbound road segment and the target road segment is identified as the boundary turn. This achieves accurate identification of boundary turns, which facilitates subsequent assignment and avoids the need to mine and assign values ​​to all road segments and turns between road segments within the restricted area, reducing the occupation of service memory resources and the resource consumption during the path planning process.

[0128] In one embodiment, such as Figure 9 As shown, the steps for determining the recommended route with the minimum traffic cost, which are based on the starting point, the destination, and the boundary road segments and turns corresponding to the restricted area, specifically include:

[0129] Step S902: Add traffic restriction weights to the boundary road segments and boundary turns corresponding to the restricted area.

[0130] Specifically, when a need to avoid restricted areas is identified, the system obtains the restricted areas that match the route planning request, along with the corresponding boundary road segments and turns. Since the restricted areas, restricted hours, and restricted license plate numbers in the road network data can be dynamically updated, the system can obtain the currently updated restricted areas, along with their corresponding boundary road segments and turns, in real time when a need to avoid restricted areas is detected.

[0131] Furthermore, when it is determined that there is a need to avoid restricted areas, the traffic attribute information carried in the route planning request is further obtained. This traffic attribute information may include the vehicle identifier entered by the user. Specifically, the vehicle identifier can be either the license plate number or the vehicle type. Based on the vehicle identifier, it can be determined whether a matching restricted area exists. Specifically, based on the license plate number entered by the user, it can be determined whether a restricted area restricts entry for that license plate number exists; or based on the vehicle type, it can be determined whether a restricted area restricts entry for that license plate type exists, thus determining whether a restricted area matches the route planning request.

[0132] After obtaining the boundary road segments and boundary turns corresponding to the restricted areas, the same restriction weight is added to both the restricted areas and the restricted turns. Since vehicles with license plates that will be restricted will incur fines or points deductions when entering the restricted areas during the corresponding restricted times, route planning needs to avoid the restricted areas as much as possible. This can be achieved by adding maximum restriction weights to the boundary road segments and boundary turns corresponding to the restricted areas, increasing the cost of passing through the restricted areas, thus achieving the goal of avoiding the restricted areas.

[0133] In one embodiment, upon receiving a route planning request, it is necessary to further obtain the actual traffic policies and restricted area divisions of the current region, and determine whether there are any restricted areas matching the route planning request. For example, during a pandemic, a region may establish lockdown zones based on the severity of the outbreak. These lockdown zones, as restricted areas, prohibit all vehicles from passing, rather than determining whether passage is permitted based on the vehicle's license plate number or vehicle type. Similarly, after obtaining the actual traffic policies and restricted area divisions of the current region, for example, if the region needs to host a major event, the areas involved in the event become the corresponding restricted areas, and their actual traffic policy prohibits all vehicles from entering the restricted areas during the event.

[0134] Step S904: Determine the first right-of-way value for the non-boundary road segment between the starting point and the target end point, and the second right-of-way value for non-boundary turns between each road segment.

[0135] Specifically, the first passage weight of the non-boundary road segment between the starting point and the destination point is represented as the passage cost of other road segments between the starting point and the destination point, excluding the boundary road segment. That is, the first passage weight can include the sum of the passage costs of road segments that have not entered the restricted area (excluding the boundary road segment) and road segments that have entered the restricted area. Here, a boundary road segment is a valid road segment where the starting point is outside the restricted area and there is a point within the restricted area among the other points besides the starting point. A non-boundary road segment is represented as road segments that have not entered the restricted area (excluding the boundary road segment) and other road segments that have entered the restricted area.

[0136] Similarly, the second passage weight for non-boundary turns between road segments between the starting point and the target endpoint is represented as the passage cost of turns other than boundary turns between the starting point and the target endpoint. Specifically, since a turn can be understood as one road segment turning into another, the second passage weight includes the sum of the passage costs of turns made by road segments that have not entered the restricted area and turns made by road segments that have entered the restricted area, excluding boundary turns. A boundary turn is a turn consisting of a target road segment whose starting point is located on the boundary of the restricted area and an inbound road segment that does not intersect the area surface. Non-boundary turns are represented as turns made by road segments that have not entered the restricted area and turns made by road segments that have entered the restricted area, excluding boundary turns.

[0137] Step S906: Based on the first passage weight, the second passage weight, and the traffic restriction weight, determine the recommended route with the minimum passage cost.

[0138] Specifically, due to the different actual use scenarios, there will be multiple recommended routes for each actual use scenario, including multiple recommended routes that pass through restricted areas and those that do not pass through restricted areas. Therefore, it is necessary to calculate the sum of the first passage weight, the second passage weight, and the restricted area weight for each route to be recommended, so as to obtain the total passage cost of each route to be recommended. The total passage costs of each route to be recommended are compared, and the route with the minimum passage cost is determined and identified as the recommended route.

[0139] In one embodiment, such as Figure 10 As shown, this provides a schematic diagram of a planned route for avoiding restricted areas based on traditional methods. The traditional approach to avoiding restricted areas involves minimizing the number of road segments within the restricted area; that is, avoiding entering the restricted area as much as possible and prioritizing other road segments outside the restricted area until no other option is available, at which point the route enters the restricted area. (Refer to...) Figure 10 It is known that under traditional methods of avoiding restricted traffic zones, in order to reduce the number of road segments within the planned restricted traffic zone, priority is given to other road segments outside the restricted traffic zone. However, when the destination is located within the restricted traffic zone, [further details are needed]. Figure 10The route planning method shown may involve local detours, leading to increased travel time and energy consumption for the recommended route, indicating that the rationality of the route planning needs to be improved.

[0140] In one embodiment, such as Figure 11 As shown, a schematic diagram of a recommended route determined based on a path planning method is provided. Figure 11 It can be seen that, compared with the traditional route planning method of avoiding restricted areas, when the destination is located inside the restricted area, the total passage weight of each recommended route entering the restricted area from different restricted area boundaries will be calculated at the same time, and the total passage weight of each recommended route will be compared to determine the route with the minimum passage cost, which will be the recommended route.

[0141] Specifically, refer to Figure 11 As can be seen, since the destination is located within the restricted area, the restricted area cannot be avoided. The minimum traffic cost can be determined by minimizing the first traffic weight of the non-boundary road segments between the starting point and the destination, and the second traffic weight of the non-boundary turns between the road segments between the starting point and the destination. This can avoid the problem of local detours caused by other road segments outside the priority restricted area.

[0142] Furthermore, since the same restriction weight is added to the boundary road segments and boundary turns of the restricted area, the focus of minimizing the travel cost is to determine the minimum value of the first travel weight corresponding to the non-boundary road segments and the minimum value of the second travel weight corresponding to the non-boundary turns. This ensures that when it is necessary to enter the restricted area, if the restriction weights are the same, the minimum first and second travel weights should be selected to determine the recommended route corresponding to the minimum travel cost. In this embodiment, by adding restriction weights to the boundary road segments and boundary turns corresponding to the restricted area, and determining the first travel weight of the non-boundary road segments between the starting point and the target destination, and the second travel weight of the non-boundary turns between each road segment, the recommended route with the minimum travel cost is determined based on the first travel weight, the second travel weight, and the restriction weights. It enables the mining and assignment of values ​​only for boundary road segments and boundary turns, without having to mine and reassign values ​​for all road segments and turns within the restricted area. This reduces the service's memory resource consumption and avoids the problem of local detours caused by prioritizing other road segments to avoid the restricted area, further improving the rationality of the determined recommended routes.

[0143] In one embodiment, such as Figure 12 As shown, a path planning method is provided, which specifically includes the following steps:

[0144] Step S1201: Receive a route planning request, parse the route planning request, and obtain the starting position, target destination position, traffic restriction avoidance parameters, and traffic attribute information carried in the route planning request.

[0145] Step S1202: When the traffic restriction avoidance parameter is to avoid restricted areas, determine whether there is a restricted area that matches the route planning request based on the traffic attribute information.

[0146] Step S1203: If there is a restricted area that matches the route planning request, obtain the minimum bounding box covering the restricted area and the minimum bounding box of each road segment in the road network data.

[0147] Step S1204: Select the smallest road segment bounding box that intersects with the smallest region bounding box, and determine the road segment corresponding to each selected smallest road segment bounding box as a valid road segment.

[0148] Step S1205: Determine the starting point of each effective road segment and obtain the number of times the rays starting from each starting point cross the boundary of the area surface.

[0149] Step S1206: Based on the number of times each ray crosses the boundary of the area surface, determine the positional relationship between the effective road segment corresponding to the ray and the area surface.

[0150] Step S1207: Based on the positional relationship between the valid road segments and the area surface, select valid road segments whose starting point is outside the restricted area and whose other points besides the starting point have points located within the restricted area, and determine them as boundary road segments.

[0151] Step S1208: Based on the positional relationship between the effective road segment and the area surface, obtain the target road segment whose starting point is located on the boundary of the restricted area, and obtain the inbound road segment corresponding to the turn with the target road segment as the outbound road segment.

[0152] Step S1209: If the entry road segment does not intersect with the area surface, the turn formed by the entry road segment and the target road segment is determined as a boundary turn.

[0153] Step S1210: Add traffic restriction weights to the boundary road segments and boundary turns corresponding to the restricted area.

[0154] Step S1211: Determine the first passage weight value of the non-boundary road segment between the starting point and the target end point, and the second passage weight value of the non-boundary turn between each road segment.

[0155] Step S1212: Based on the first passage weight, the second passage weight, and the traffic restriction weight, determine the recommended route with the minimum passage cost.

[0156] In the aforementioned route planning method, a route planning request is received, and the starting and ending points carried in the request are obtained. When a restricted area matching the route planning request exists, the boundary road segments and boundary turns corresponding to the restricted area are obtained. Then, based on the starting and ending points, and the boundary road segments and boundary turns corresponding to the restricted area, the recommended route with the minimum travel cost is determined. This method significantly reduces the consumption of service resources because it does not need to discover all road segments and turns within the restricted area. When a restricted area exists, route planning is only performed on the boundary road segments and boundary turns located at the boundary of the restricted area, avoiding the problem of prioritizing other road segments to avoid the restricted area and resulting in local detours, further improving the rationality of the determined recommended route.

[0157] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0158] Based on the same inventive concept, this application also provides a path planning apparatus for implementing the path planning method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more path planning apparatus embodiments provided below can be found in the limitations of the path planning method described above, and will not be repeated here.

[0159] In one embodiment, such as Figure 13 As shown, a route planning device is provided, including: a route planning request receiving module 1302, an acquisition module 1304, and a recommended route determination module 1306, wherein:

[0160] The route planning request receiving module 1302 is used to receive route planning requests, which carry the starting position and the target destination position.

[0161] The acquisition module 1304 is used to acquire the boundary road segment and boundary turn corresponding to the restricted area if there is a restricted area that matches the route planning request.

[0162] The recommended route determination module 1306 is used to determine the recommended route with the minimum passage cost based on the starting point location, the target destination location, and the boundary road segments and boundary turns corresponding to the restricted area.

[0163] In the aforementioned route planning device, a route planning request is received, and the starting and ending points carried in the request are obtained. When a restricted area matching the route planning request exists, the boundary road segments and boundary turns corresponding to the restricted area are obtained. Then, based on the starting and ending points, and the boundary road segments and boundary turns corresponding to the restricted area, a recommended route with the minimum travel cost is determined. Since it is not necessary to discover all road segments and turns within the restricted area, the occupation of service resources can be significantly reduced. When a restricted area exists, route planning is only performed on the boundary road segments and boundary turns located at the boundary of the restricted area, avoiding the problem of local detours caused by prioritizing other road segments to avoid the restricted area, further improving the rationality of the determined recommended route.

[0164] In one embodiment, a route planning device is provided, further comprising: an effective road segment determination module, configured to determine effective road segments based on a restricted area and road segments in road network data; the effective road segment is a road segment in the road network data that intersects with the restricted area; and a first determination module, configured to determine the boundary road segment and boundary turn corresponding to the restricted area based on the effective road segment and the restricted area.

[0165] In one embodiment, the effective road segment determination module is further configured to: obtain the minimum bounding box covering the restricted area, and the minimum road segment bounding box of each road segment in the road network data; filter out the minimum road segment bounding boxes that intersect with the minimum bounding box, and determine the road segments corresponding to each of the filtered minimum road segment bounding boxes as effective road segments.

[0166] In one embodiment, the first determining module includes: a positional relationship determining module, used to determine the positional relationship between each valid road segment and the restricted area; a boundary road segment determining module, used to select boundary road segments from the valid road segments based on the positional relationship between each valid road segment and the restricted area; and a boundary turn determining module, used to determine boundary turns based on the positional relationship between each valid road segment and the restricted area.

[0167] In one embodiment, the positional relationship determination module is further configured to: determine the ray starting point corresponding to each effective road segment, and obtain the number of times the ray starting from each ray starting point crosses the boundary of the area surface; and determine the positional relationship between the effective road segment corresponding to the ray and the area surface based on the number of times each ray crosses the boundary of the area surface.

[0168] In one embodiment, the boundary road segment determination module is further configured to: based on the positional relationship between the valid road segment and the area surface, filter out valid road segments whose starting point is outside the restricted area and whose other points besides the starting point contain points located within the restricted area, and determine them as boundary road segments.

[0169] In one embodiment, the boundary turn determination module is further configured to obtain a target road segment whose starting point is located on the boundary of the restricted area based on the positional relationship between the effective road segment and the area surface; obtain the entry road segment corresponding to the turn with the target road segment as the exit road segment; and determine the turn composed of the entry road segment and the target road segment as a boundary turn if the entry road segment does not intersect with the area surface.

[0170] In one embodiment, the recommended route determination module is further configured to: add traffic restriction weights to the boundary road segments and boundary turns corresponding to the restricted area; determine the first passage weight of the non-boundary road segments between the starting point and the target end point, and the second passage weight of the non-boundary turns between each road segment; and determine the recommended route with the minimum passage cost based on the first passage weight, the second passage weight, and the traffic restriction weights.

[0171] In one embodiment, the positional relationship determination module is further configured to: determine a first positional relationship between the effective road segment and the area surface when the number of times the ray crosses the boundary of the area surface is odd; the first positional relationship is used to determine the boundary road segment; and determine a second positional relationship between the effective road segment and the area surface when the number of times the ray crosses the boundary of the area surface is even; the second positional relationship is used to determine the boundary turn.

[0172] In one embodiment, the effective road segment determination module is further configured to: obtain the coordinate values ​​of the first boundary vertex of the minimum region bounding box and the coordinate values ​​of the second boundary vertex of each minimum road segment bounding box; compare the coordinate values ​​of each second boundary vertex with the coordinate values ​​of the first boundary vertex to determine the minimum road segment bounding box that intersects with the minimum region bounding box.

[0173] Each module in the aforementioned path planning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0174] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 14As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as starting point location, destination location, restricted areas, boundary turns, boundary road segments, and recommended routes. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a path planning method.

[0175] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0176] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0177] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0178] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0179] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0180] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0181] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0182] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A path planning method characterized by, The method includes: Receive a route planning request, the route planning request carrying the starting position and the target destination position; If a restricted area exists that matches the route planning request, obtain the boundary road segment and boundary turn corresponding to the restricted area; The method for determining the boundary road segment and boundary turn corresponding to the restricted area includes: determining valid road segments based on the restricted area and road segments in the road network data; the valid road segments are road segments in the road network data that intersect with the restricted area; determining the boundary road segment and boundary turn corresponding to the restricted area based on the valid road segments and the restricted area; wherein, the method for determining the boundary road segment includes: based on the positional relationship between the valid road segment and the area surface of the restricted area, filtering out valid road segments whose starting point is outside the restricted area and whose other points besides the starting point have points located within the restricted area, and determining them as boundary road segments; the method for determining the boundary turn includes: obtaining a target road segment whose starting point is on the boundary of the restricted area, and the entry road segment corresponding to the turn with the target road segment as the exit road segment; if the entry road segment does not intersect with the area surface, the turn formed by the entry road segment and the target road segment is determined as a boundary turn; Based on the starting point, the destination, and the boundary road segments and turns corresponding to the restricted area, a recommended route with the minimum travel cost is determined.

2. The method according to claim 1, characterized in that, The determination of valid road segments based on the restricted area and road network data includes: Obtain the smallest bounding box covering the restricted area, and the smallest bounding box of each road segment in the road network data; The smallest road segment bounding boxes that intersect with the smallest region bounding box are selected, and the road segments corresponding to each selected smallest road segment bounding box are determined as valid road segments.

3. The method according to claim 2, characterized in that, The step of determining the boundary road segment and boundary turn corresponding to the restricted area based on the effective road segment and the restricted area includes: Determine the positional relationship between the area surfaces of each effective road segment and the restricted area; Based on the positional relationship between each of the effective road segments and the area surface, boundary road segments are selected from the effective road segments; Based on the positional relationship between each effective road segment and the area surface, the boundary turns are determined.

4. The method according to claim 3, characterized in that, Determining the positional relationship between each of the effective road segments and the restricted area includes: Determine the ray starting point corresponding to each effective road segment, and obtain the number of times the ray starting from each ray starting point crosses the boundary of the area surface; Based on the number of times each ray crosses the boundary of the area surface, the positional relationship between the effective road segment corresponding to the ray and the area surface is determined.

5. The method according to claim 4, characterized in that, Determining the positional relationship between the effective road segment corresponding to each ray and the area surface based on the number of times each ray crosses the boundary of the area surface includes: When the number of times the ray crosses the boundary of the area surface is odd, the positional relationship between the effective road segment and the area surface is determined as a first positional relationship; the first positional relationship is used to determine the boundary road segment; When the number of times the ray crosses the boundary of the area surface is even, the positional relationship between the effective road segment and the area surface is determined as a second positional relationship; the second positional relationship is used to determine the boundary turn.

6. The method according to claim 3, characterized in that, The step of filtering out the smallest road segment bounding box that intersects with the smallest region bounding box includes: Obtain the coordinates of the first boundary vertex of the minimum region bounding box and the coordinates of the second boundary vertex of each minimum road segment bounding box; The coordinate values ​​of each second boundary vertex are compared with the coordinate values ​​of the first boundary vertex to determine the smallest road segment bounding box that intersects with the smallest region bounding box.

7. The method according to claim 1 or 2, characterized in that, The process of determining the recommended route with the minimum travel cost based on the starting point location, the target destination location, and the boundary road segments and boundary turns corresponding to the restricted area includes: Add traffic restriction weights to the boundary road segments and boundary turns corresponding to the restricted areas; Determine the first passage weight value for the non-boundary road segment between the starting position and the target ending position, and the second passage weight value for the non-boundary turn between each road segment; Based on the first passage weight, the second passage weight, and the restricted passage weight, a recommended route with the minimum passage cost is determined.

8. A path planning device, characterized in that, The device includes: The route planning request receiving module is used to receive a route planning request, which carries the starting position and the target destination position; The acquisition module is used to acquire the boundary road segments and boundary turns corresponding to the restricted area if there is a restricted area that matches the path planning request; The recommended route determination module is used to determine the recommended route with the minimum passage cost based on the starting point location, the target destination location, and the boundary road segments and boundary turns corresponding to the restricted area. The device further includes: The effective road segment determination module is used to determine the effective road segments based on the restricted area and each road segment in the road network data; the effective road segments are the road segments in the road network data that intersect with the restricted area; The first determining module is used to determine the boundary road segment and boundary turn corresponding to the traffic restriction area based on the valid road segment and the traffic restriction area; wherein, the method of determining the boundary road segment includes: based on the positional relationship between the valid road segment and the area surface of the traffic restriction area, filtering out valid road segments whose starting point is located outside the traffic restriction area and whose other points besides the starting point are located within the traffic restriction area, and determining them as boundary road segments; the method of determining the boundary turn includes: obtaining the target road segment whose starting point is located on the boundary of the traffic restriction area, and the entry road segment corresponding to the turn with the target road segment as the exit road segment; if the entry road segment does not intersect the area surface, the turn formed by the entry road segment and the target road segment is determined as a boundary turn.

9. The apparatus according to claim 8, characterized in that, The effective road segment determination module is also used for: Obtain the smallest bounding box covering the restricted area, and the smallest bounding box of each road segment in the road network data; filter out the smallest bounding boxes that intersect with the smallest bounding box, and determine the road segments corresponding to each filtered smallest bounding box as valid road segments.

10. The apparatus according to claim 9, characterized in that, The first determining module includes: The positional relationship determination module is used to determine the positional relationship between each of the effective road segments and the restricted area. The boundary road segment determination module is used to filter out boundary road segments from the valid road segments based on the positional relationship between each valid road segment and the area surface; The boundary turn determination module is used to determine the boundary turn based on the positional relationship between each of the effective road segments and the area surface.

11. The apparatus according to claim 10, characterized in that, The positional relationship determination module is further configured to: Determine the ray starting point corresponding to each effective road segment, and obtain the number of times the ray starting from each ray starting point crosses the boundary of the area surface; based on the number of times each ray crosses the boundary of the area surface, determine the positional relationship between the effective road segment corresponding to the ray and the area surface.

12. The apparatus according to claim 8 or 9, characterized in that, The recommended route determination module is also used for: For the boundary road segments and boundary turns corresponding to the restricted area, a traffic restriction weight is added respectively; the first traffic weight of the non-boundary road segments between the starting position and the target ending position and the second traffic weight of the non-boundary turns between each road segment are determined; based on the first traffic weight, the second traffic weight and the traffic restriction weight, the recommended route with the minimum traffic cost is determined.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.