Method and device for generating planned path and terminal equipment
By using coverage maps and dynamic energy consumption information to generate path planning in large-scale road networks, the poor performance of small-scale road network algorithms in large-scale road networks is solved, and efficient path planning is achieved.
Patent Information
- Application Number
- CN202411792942.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-11
Smart Images

Figure CN119594982A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of path planning technology, and in particular, relates to a method, device and terminal device for generating a planned path. Background Art
[0002] Currently, the path planning of new energy vehicles in the energy replenishment scenario pays more attention to the endurance issue. First, it is necessary to ensure that the entire route is accessible by charging, and then the shortest path or the route with the best resource distribution will be selected. This requires taking the vehicle's endurance factor into consideration in the algorithm.
[0003] For algorithms for small-scale road networks, due to their high flexibility, they can relatively easily convert endurance factors into costs, thereby calculating and obtaining a planned path with the minimum cost as the goal. However, applying small-scale road network algorithms to large-scale road networks will result in poor performance in path planning in large-scale road network energy replenishment scenarios due to their low processing performance and difficulty in effectively integrating endurance and charging factors. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, terminal device and storage medium for generating a planned path, which can solve the problem of poor performance of path planning in large-scale road network energy replenishment scenarios caused by the current application of small-scale road network algorithms to large-scale road networks.
[0005] In the first aspect, an embodiment of the present application provides a method for generating a planned path, including: receiving a first path planning request, the first path planning request is used to request planning a path from a starting position to a destination position; determining a first planned path from the starting position to the destination position according to the first path planning request and a coverage map of a preset area, the coverage map is composed of multiple levels, the lowest level area of the multiple levels includes road nodes or energy replenishment resources in the preset area, and the first planned path includes multiple lowest level areas; according to the path information and dynamic energy consumption corresponding to the multiple lowest level areas, determine the second planned paths in the multiple lowest level areas, the path information includes the shortest path between any entrance to any exit in the low-level area. Combine the first planned path and the second planned paths in each of the lowest level areas to generate a target planned path, the target planned path includes at least one energy replenishment resource, and the target planned path is the shortest reachable route from the starting position to the destination.
[0006] In the embodiment of the present application, after receiving the first path planning request, the first planned path from the starting position to the destination position is first determined from the coverage map of the preset area, and then the second planned paths within each first lowest-level area are generated based on the path information and dynamic energy consumption of each lowest-level area on the first planned path. The first planned path and each second planned path are combined to finally generate a target planned path. The preset coverage map and the path information and dynamic energy consumption corresponding to each first lowest-level area accelerate the generation of the target planned path, thereby improving the performance of path planning in large-scale road networks and energy replenishment scenarios.
[0007] In a possible implementation of the first aspect, the above-mentioned determining the first planned path from the starting position to the destination position based on the first path planning request and the coverage map of the preset area includes: determining the highest-level area corresponding to the starting position and the highest-level area corresponding to the destination position from the coverage map according to the first path planning request; determining the shortest path between the highest-level area corresponding to the starting position and the highest-level area corresponding to the destination position; and determining the first planned path by combining the shortest path and multiple shortest paths between adjacent areas in each of the levels.
[0008] Optionally, in another possible implementation of the first aspect, the above-mentioned determining the second planned paths within multiple lowest-level areas based on the path information and dynamic energy consumption respectively corresponding to the multiple lowest-level areas includes: determining the path cost result of at least one planned path corresponding to any of the lowest-level areas based on the dynamic energy consumption and the path information respectively corresponding to any of the lowest-level areas, the planned path being a path from one entrance of the lowest-level area to another exit of the lowest-level area; determining the planned path with the lowest path cost result among the at least one planned path corresponding to any of the lowest-level areas as the second planned path within any of the lowest-level areas, so as to obtain the second planned paths within the multiple lowest-level areas.
[0009] Optionally, in another possible implementation of the first aspect, the path cost result of at least one planned path corresponding to any of the lowest-level areas is determined based on the dynamic energy consumption and the path information corresponding to any of the lowest-level areas, including: determining at least one planned path from any entrance to any exit corresponding to the first lowest-level area from the path information corresponding to the first lowest-level area; the first lowest-level area is the lowest-level area that does not contain the supply resources; calculating the path cost based on the distance of each of the planned paths, the dynamic energy consumption corresponding to any entrance, and the dynamic energy consumption corresponding to each of the exits, to obtain the path cost result of the at least one planned path.
[0010] Optionally, in another possible implementation manner of the first aspect, determining a path cost result of at least one planned path included in each of the lowest-level areas according to the dynamic energy consumption and the path information corresponding to each of the lowest-level areas, including:
[0011] Acquire at least one planned path corresponding to the second lowest-level area from the path information corresponding to the second lowest-level area, the planned path including the shortest path between any entrance of the second lowest level and any exit of the second lowest-level area, and at least one energy replenishment resource in the second lowest-level area is located on the shortest path;
[0012] Determine the first distance, the second distance, and the third distance according to the path information corresponding to the second lowest level area, wherein the first distance is the distance of the shortest path between any entrance of the second lowest level area and the energy replenishment resource closest to the any entrance, the second distance is the distance of the shortest path between two adjacent energy replenishment resources, and the third distance is the distance of the shortest path between the energy replenishment resource closest to any exit of the second lowest level area and the any exit;
[0013] The path cost result of at least one planned path is calculated based on the first distance, the second distance, the third distance, the dynamic energy consumption corresponding to any of the entrances, the dynamic energy consumption corresponding to any of the energy supplement resources, and the dynamic energy consumption corresponding to any of the exits.
[0014] Optionally, in another possible implementation of the first aspect, after generating the target planned path by combining the first planned path and the second planned path in each of the lowest-level areas, the method provided in the embodiment of the present application also includes: when the mobile device is traveling along the target planned path, searching for one or more second energy replenishment resources within a preset range on the target planned path; if there is a second energy replenishment resource within a preset distance of any energy replenishment resource in the target planned path, and the second energy replenishment resource better meets the preset requirements than the first energy replenishment resource, then updating the target planned path, and the updated target planned path includes the second energy replenishment resource, but does not include the first energy replenishment resource.
[0015] In a second aspect, an embodiment of the present application provides a device for generating a planned path, comprising: a receiving module, configured to receive a first path planning request, wherein the first path planning request is used to request planning of a path from a starting position to a destination position;
[0016] a first determining module, configured to determine a first planned path from the starting position to the destination position according to the first path planning request and a coverage map of a preset area, wherein the coverage map is composed of a plurality of levels, a lowest level area among the plurality of levels includes a road node or a power replenishment resource in the preset area, and the first planned path includes a plurality of lowest level areas;
[0017] A second determination module is used to determine a second planned path in a plurality of the lowest-level areas according to the path information and dynamic energy consumption respectively corresponding to the plurality of the lowest-level areas, wherein the path information includes the shortest path between any entrance and any exit in the low-level area;
[0018] The third determination module is used to combine the first planned path and the second planned path in each of the lowest-level areas to generate a target planned path, wherein the target planned path includes at least one energy replenishment resource, and the target planned path is the shortest reachable route from the starting position to the destination position.
[0019] In a possible implementation manner of the second aspect, the first determining module includes:
[0020] A first determining unit, configured to determine, from the coverage map according to the first path planning request, a highest-level area corresponding to the starting position and a highest-level area corresponding to the destination position;
[0021] A second determining unit, configured to determine the shortest path between the highest level region corresponding to the starting position and the highest level region corresponding to the destination position;
[0022] The third determining unit is used to determine the first planned path by combining the shortest path and multiple shortest paths between adjacent areas in each of the levels.
[0023] Optionally, in a possible implementation manner of the second aspect, the second determining module includes:
[0024] A calculation unit, configured to determine a path cost result of at least one planned path included in each of the lowest-level regions according to the dynamic energy consumption and the path information corresponding to each of the lowest-level regions, wherein the planned path is a path from an entrance of the lowest-level region to another exit of the lowest-level region;
[0025] The fourth determining unit is used to determine the planned path with the lowest path cost result among the at least one planned path included in each of the lowest-level regions as the second planned path in the lowest-level region.
[0026] Optionally, in another possible implementation manner of the second aspect, the computing unit is specifically configured to:
[0027] Determine at least one planned path from any entrance to any exit corresponding to the first lowest level area from the path information corresponding to the first lowest level area; the first lowest level area is the lowest level area that does not contain the supply resources;
[0028] The path cost is calculated according to the distance of each of the planned paths, the dynamic energy consumption corresponding to any of the entrances, and the dynamic energy consumption corresponding to each of the exits to obtain a path cost result of the at least one planned path.
[0029] Optionally, in another possible implementation manner of the second aspect, the computing unit is specifically configured to:
[0030] Acquire at least one planned path corresponding to the second lowest-level area from the path information corresponding to the second lowest-level area, the planned path including the shortest path between any entrance of the second lowest level and any exit of the second lowest-level area, and at least one energy replenishment resource in the second lowest-level area is located on the shortest path;
[0031] Determine the first distance, the second distance, and the third distance according to the path information corresponding to the second lowest level area, wherein the first distance is the distance of the shortest path between any entrance of the second lowest level area and the energy replenishment resource closest to the any entrance, the second distance is the distance of the shortest path between two adjacent energy replenishment resources, and the third distance is the distance of the shortest path between the energy replenishment resource closest to any exit of the second lowest level area and the any exit;
[0032] The path cost result of at least one planned path is calculated based on the first distance, the second distance, the third distance, the dynamic energy consumption corresponding to any of the entrances, the dynamic energy consumption corresponding to any of the energy supplement resources, and the dynamic energy consumption corresponding to any of the exits.
[0033] Optionally, in another possible implementation manner of the second aspect, the apparatus further includes:
[0034] A search module, used to search for one or more second energy replenishment resources within a preset range on the target planned path when the mobile device travels along the target planned path;
[0035] An updating module is used to update the target planning path if there is a second energy replenishment resource within a preset distance of any of the first energy replenishment resources located on the target planning path, and the second energy replenishment resource better meets the preset requirements than the first energy replenishment resource. The updated target planning path includes the second energy replenishment resource but does not include the first energy replenishment resource.
[0036] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for generating a planned path as described above when executing the computer program.
[0037] In a possible implementation manner of the third aspect, the terminal device is a new energy vehicle.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for generating a planned path as described above is implemented.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the method for generating a planned path as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 is a schematic diagram of a coverage map provided by an embodiment of the present application;
[0042] Figure 2 A schematic diagram of a scenario applicable to a method for generating a planned path provided in an embodiment of the present application;
[0043] Figure 3 A flowchart of a method for generating a planned path provided in an embodiment of the present application;
[0044] Figure 4 Another method for generating a planned path provided in an embodiment of the present application;
[0045] Figure 5 It is a schematic diagram of a method for expanding the shortest path in hierarchical order provided by an embodiment of the present application;
[0046] Figure 6 is a flowchart of a method for generating a planned path provided in yet another embodiment of the present application;
[0047] Figure 7 is a schematic diagram of a W matrix corresponding to a cell without powered resources provided in an embodiment of the present application;
[0048] Figure 8 is a schematic diagram of a W matrix corresponding to a cell including a power-on resource provided in an embodiment of the present application;
[0049] Fig. 9 This is a schematic diagram of path cost calculation based on dynamic energy consumption provided by an embodiment of the present application;
[0050] Fig.10 is another coverage map provided by an embodiment of the present application;
[0051] Fig.11 is a flowchart of a method for generating a planned path provided in yet another embodiment of the present application;
[0052] Fig.12 It is a flowchart of a device for generating a planned path provided in an embodiment of the present application;
[0053] Fig.13 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0056] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0057] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0058] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0059] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0060] Before introducing the embodiments of the present application, the following terms are first introduced:
[0061] 1) Large-scale road network refers to a road network with a very large number of nodes and edges, which is usually applied to a large area, such as a large city, a provincial administrative region, or an area within a country.
[0062] 2) Small-scale road networks refer to road networks with relatively few nodes and edges, usually belonging to a small area, such as a town, a campus or a commercial district.
[0063] 3) The customizable route planning (CRP) algorithm is a path planning algorithm that is mainly used to process dynamically changing traffic network data to meet the needs of real-time path planning. The CRP algorithm is a path planning algorithm provided by Microsoft Research. It also adopts the idea of overlay map to not only meet the needs of real-time response, but also can be customized according to different influencing factors. In addition, it can also support local updates of the road network. It is a relatively mature algorithm in traditional path planning. However, the algorithm does not support path planning in the energy replenishment scenario, does not take the endurance factor into consideration, and cannot guarantee the accessibility of the route.
[0064] Traditional gasoline vehicles are mainly used for short and long distance travel, and are usually calculated based on the shortest path. In path planning, shortest path algorithms such as A*, D* and Dijkstra are widely used in small-scale road network data. These algorithms calculate the distance and weight between nodes to find the shortest path connecting the starting point and the end point to achieve efficient driving routes.
[0065] For large-scale road networks, traditional shortest path algorithms may face the problems of high computational complexity and performance degradation. Therefore, for large-scale road networks, commonly used algorithms include contraction hierarchies (CH) and CRP algorithms. These algorithms accelerate path search through preprocessing and hierarchical structures, improving the efficiency and performance of the algorithms.
[0066] However, the above-mentioned path planning algorithm is mainly designed for gasoline vehicles, and does not take into account the special needs of new energy vehicles, such as the charging needs and endurance of electric vehicles. Path planning in the new energy replenishment scenario focuses more on the endurance issue. First, it is necessary to ensure that the entire route is accessible by electricity, and then choose the shortest path or the route with the best resource distribution. This requires taking the vehicle's endurance factor into account in the algorithm. Therefore, with the rapid development of new energy vehicles today, it is necessary to design smarter and more applicable path planning algorithms based on the characteristics of electric vehicles to improve the travel efficiency and user experience of electric vehicles.
[0067] In the path planning of new energy vehicles, current algorithms such as A* and Dijkstra are usually applied to small-scale road networks. In such small-scale road networks, the path planning algorithm can run efficiently because the amount of calculation is relatively small and the amount of road network data is small, so the vehicle's endurance factor can be flexibly incorporated into the path planning algorithm. Specifically, a cost function can be introduced into the algorithm, which not only considers the distance, but also the current power of the vehicle, the location of the charging station, and the expected energy consumption. This enables the algorithm to dynamically adjust the path, select the optimal charging point and driving route, and find the path with the lowest cost while ensuring the vehicle's endurance.
[0068] However, when these algorithms are applied to large-scale road networks, the amount of computation increases dramatically, resulting in a significant performance degradation. In this environment, the path planning algorithm needs to process a large amount of data, which is very computationally intensive. Although these algorithms perform well in small-scale road networks, their computational time and resource consumption increase significantly when processing large-scale data, and they cannot provide effective path planning within a reasonable time.
[0069] Before introducing the method provided in the embodiment of the present application, the construction method of the coverage map involved in the present application is first introduced.
[0070] For example, the coverage map constructs the overall topological structure of the route calculation. The nodes of the road network data are used as the original data to construct the coverage map, and the nodes are divided into multiple regions (the regions in the coverage map in the embodiment of the present application are called units or cells) by using the graph segmentation method. Before the division, it is necessary to clarify the maximum number of nodes in each cell. The basis for the division is that the current cell has the least connection with the adjacent cell. The multi-level coverage map is constructed in a recursive way. The higher the level of the cell, the larger the distance span. The use of high-level cells for long-distance route calculation can skip a large number of route node details inside the cell to achieve acceleration.
[0071] The coverage map in the embodiment of the present application may include multiple levels, and the multiple levels are arranged in order from high to low. The multiple levels include the highest level, the lowest level, and multiple intermediate levels between the highest level and the lowest level. Any lowest level belongs to an upper level, and any highest level includes one or more intermediate levels. In a coverage map of two levels, the intermediate level may not be included, that is, it includes one highest level and multiple lowest levels. In a coverage map of three levels or more, at least one intermediate level is included.
[0072] like Figure 1 As shown in the figure, a three-layer coverage map is constructed from level 0 to level 2. The cells of the high-level layer contain the cells of the low-level layer, and the cell granularity of each layer of the coverage map increases step by step.
[0073] For example, in Figure 1 The middle coverage graph includes high-level cells, middle-level cells, and low-level cells. Among them, the high-level cells include one or more middle-level cells. For example, Figure 1 As shown, a high-level cell (such as cell0) includes three middle-level cells, namely cell1, cell2, and cell3. Each middle-level cell includes one or more low-level cells. The number of low-level cells included in different middle-level cells can be the same or different. For example, Figure 1 As shown, cell1 includes two lower-level cells, namely cell11 and cell12. Cell2 includes two lower-level cells, namely cell21 and cell22. Cell3 includes three lower-level cells, namely cell31, cell32 and cell33.
[0074] It can be understood that the highest level and the lowest level in the embodiment of the present application are relative concepts. If a level does not belong to any level, that is, there is no previous level above the level, or the level is the first level in the coverage diagram, then the level can be considered to be the highest level. For example, Figure 1 In the above example, cell0 can be regarded as the highest level in the overlay. If a level does not have other levels under it, that is, it is the last level in the overlay, then it is the lowest level. For example, Figure 1 Cell11, cell12, cell21, cell22, cell31, cell32, and cell33 are all the lowest levels in the coverage map.
[0075] like Figure 1 As shown, each low-level cell may include a road node or a supply resource, for example, a supply resource may refer to a resource that provides charging / refueling services for a car. For example, a replenishment resource may be a charging resource. The charging resource in the embodiment of the present application may be, for example, a resource that directly provides charging services for a car. For example, a charging resource may include a charging pile, a charging and swapping station, and a mobile charging vehicle.
[0076] It should be noted that in each level of the coverage graph, there is a shortest path clique between every two adjacent cell boundary points, and the shortest path clique will be calculated in advance during the construction of the coverage graph, thereby providing data acceleration for generating the planned path. For any cell, each of its boundary points will serve as an entrance and exit.
[0077] For example, Figure 1 As shown, cell1 and cell3 include path 1 and path 2, where path 1 represents the shortest path from the exit p of cell1 to the entrance q of cell3. Path 2 represents the shortest path from the exit p of cell3 to the entrance q of cell1.
[0078] There is a path 3 between cell1 and cell2, where path 3 represents the shortest path from the exit p of cell1 to the entrance q of cell2. There is a path 4 between cell3 and cell2, where path 4 represents the shortest path from the exit p of cell3 to the entrance q of cell2.
[0079] For example, Figure 1 In the cells of the same level, for example, there are also paths 5 and 6 between cell11 and cell12, where path 5 represents the shortest path between the exit p of cell11 and the entry q of cell12. Path 6 represents the shortest path between the exit p of cell12 and the entry q of cell11.
[0080] For example, there are also paths 7 and 8 between cell21 and cell22, where path 7 represents the shortest path between the exit p of cell21 and the entrance q of cell22. Path 8 represents the shortest path between the exit p of cell22 and the entrance q of cell21.
[0081] For example, there are also paths 9 and 10 between cell31 and cell32, where path 9 represents the shortest path between the exit p of cell31 and the entrance q of cell32. Path 10 represents the shortest path between the exit p of cell32 and the entrance q of cell31. There is also path 11 between cell31 and cell33, where path 11 represents the shortest path between the exit p of cell31 and the entrance q of cell33. There is also path 12 between cell33 and cell32, where path 12 represents the shortest path between the exit p of cell32 and the entrance q of cell33.
[0082] See also Figure 2 , Figure 2 This is a schematic diagram of the application environment of the method for generating a planned path provided in this scenario example. The method for generating a planned path is applied to Figure 2 The vehicle 1000 in the embodiment (such as a vehicle control system in the vehicle 1000), or other devices having a function of controlling the vehicle 1000 (such as Figure 2 It is understood that, in some embodiments, the electronic device 130 may be installed with a route planning application, the electronic device 130 may obtain the location information of the vehicle 1000, and the route planning application may call the method for generating a planned route provided in the present application during operation to generate the shortest achievable route from the starting position to the destination position for the vehicle 1000.
[0083] As an example, the cloud server 120 can be a server corresponding to a path planning application installed on the vehicle 1000, so that after receiving the first path planning request, the vehicle 1000 can send the first path planning request to the cloud server 120, so that the cloud server 120 can call the method for generating a planned path provided in this application to generate the shortest reachable route from the starting location to the destination location for the vehicle 1000.
[0084] As another example, the cloud server 120 can be a server corresponding to a path planning application installed on the electronic device 130, so that after receiving the first path planning request, the electronic device 130 can send the first path planning request to the cloud server 120, so that the cloud server 120 can call the method for generating a planned path provided in this application to generate the shortest reachable route from the starting location to the destination location for the vehicle 1000.
[0085] As an example, the electronic device 130 in the embodiment of the present application can be a mobile phone, a bracelet, a watch, a tablet computer, or other device that can perform path planning.
[0086] As an example, the vehicle 1000 in the embodiment of the present application may be a new energy vehicle, which may be a pure electric vehicle, a hybrid vehicle, or an extended-range vehicle, etc. A battery is provided inside the vehicle 1000, and the battery may be provided at the bottom, head, or tail of the vehicle 1000. The battery may be used to power the vehicle 1000, for example, the battery may be used as an operating power source for the vehicle 1000. In this scenario example, the battery may not only be used as an operating power source for the vehicle 1000, but may also be used as a driving power source for the vehicle 1000, replacing or partially replacing fuel or natural gas to provide driving power for the vehicle 1000. Of course, the vehicle 1000 in the embodiment of the present application may also be a fuel vehicle or a gas vehicle, which is not limited in the embodiment of the present application.
[0087] As an example, the cloud server 120 or the electronic device 130 in the embodiment of the present application may generate a coverage map of one or more regions, and then send the coverage map of one or more regions to the vehicle 1000. Alternatively, the cloud server 120 may send the coverage map of one or more regions to the electronic device 130.
[0088] Optionally, the cloud server 120 or the electronic device 130 in the embodiment of the present application may also obtain the W matrix (i.e., path information) corresponding to any lowest-level cell and the dynamic energy consumption corresponding to each lowest-level cell. The W matrix is used to determine the shortest path between any entrance of each lowest-level cell and any exit of another lowest-level cell. Optionally, the W matrix of each lowest-level cell including energy replenishment resources also includes the distance of the shortest path from any entrance in the lowest-level cell to the energy replenishment resource closest to the entrance, the distance of the shortest path from any exit to the energy replenishment resource closest to the exit, and the distance of the shortest path between each two adjacent energy replenishment resources on each path from any entrance to any exit.
[0089] The following describes in detail the method, apparatus, terminal device and storage medium for generating a planned path provided in the present application with reference to the accompanying drawings.
[0090] Figure 3 A flow chart of a method for generating a planned path provided in an embodiment of the present application is shown.
[0091] like Figure 3 As shown, a method for generating a planned path provided in an embodiment of the present application includes the following steps:
[0092] Step 301: A terminal device receives a first path planning request.
[0093] For example, the first path planning request includes at least a starting location and a destination location.
[0094] The first path planning request is used to request planning of a path from a starting location to a destination location.
[0095] It is understandable that the current location of the terminal device is the starting location. Of course, in some scenarios, the starting location may not be the current location of the terminal device, and the embodiments of the present application do not limit this. Optionally, the first path planning request may also include indication information, which is used to indicate the path planned from the starting location to the destination location.
[0096] For example, the terminal device can be a vehicle, or it can be a user's mobile phone, watch, smart bracelet and other devices.
[0097] As an example, taking the terminal device as a vehicle or a mobile phone, a user can click on a path planning application installed on the vehicle or mobile phone to trigger the vehicle or mobile phone to display a path planning interface. In the path planning interface, the user can enter the starting location and destination location, and trigger the execution operation so that the vehicle or mobile phone receives a first path planning request.
[0098] Or taking the terminal device as a vehicle or a cloud server as an example, the user can trigger a first path planning request in a path planning application installed on a mobile phone, and then the mobile phone sends the first path planning request to the vehicle.
[0099] Step 302: The terminal device generates a first planned path from the starting location to the destination location according to the first path planning request and the coverage map of the preset area.
[0100] The coverage map may be composed of multiple levels, wherein the multiple levels include at least one highest level area and at least one lowest level area covered by each highest level area.
[0101] Optionally, any highest level region includes at least one middle level region, and multiple middle level regions are arranged in order of hierarchy, and the lowest middle level region among the multiple middle level regions covers at least one lowest level region. The highest middle level region among the multiple middle level regions belongs to one highest level region. Each lowest level region includes a preset number of nodes in a preset area. It should be noted that the above nodes may include power-on resources and road nodes in a preset area.
[0102] In the coverage map, each lowest level region includes a preset number of nodes in a preset region, and any level in the multiple levels covers a preset number of lower level regions. At the same time, in each level, the division of each region is based on the minimum connection between every two adjacent regions.
[0103] As an example, the terminal device has a coverage map of a preset area. For example, after receiving the first path planning request, the terminal device can search for the coverage map of the preset area from the coverage maps of one or more preconfigured areas, or obtain the coverage map of the preset area from the server after receiving the first path planning request.
[0104] As a possible implementation method, the location of each node in the preset area can be obtained from OpenStreet Map (OSM). OSM data is road network data composed of lines and connection points. Power-on resources are energy replenishment service data, which can be projected as specific points in space. All power-on resources within the preset area are obtained, and all power-on resources are projected into OSM as nodes in OSM, and then combined with the original road nodes in OSM for data fusion, so as to serve as the data source of the coverage map corresponding to the preset area.
[0105] Among them, the first planned path may refer to a preliminary path from the starting position to the destination position determined by searching the coverage map after receiving the first path planning request. This path takes into account the shortest path between every two adjacent areas in different levels in the coverage map. For example, the first planned path represents the approximate route from the starting position to the destination position. Of course, the first planned path can also be called the initial planned path. The first planned path may include one or more planned paths.
[0106] In an embodiment of the present application, a first planned path from a starting location to a destination location is generated based on a first path planning request and a coverage map of a preset area, thereby improving the efficiency and performance of path planning. By using a multi-level structure of a coverage map, an approximate path can be quickly determined at a higher level and then refined layer by layer, thereby significantly reducing the amount of calculation in the path planning process.
[0107] Step 303: The terminal device determines a second planned path in multiple lowest-level areas according to the path information and dynamic energy consumption corresponding to the multiple lowest-level areas, wherein the path information includes the shortest path from any entrance to any exit in the low-level area.
[0108] Among them, the path information corresponding to any lowest level area (also referred to as W matrix) may refer to a matrix that pre-calculates and stores the shortest paths and corresponding cost information between each entrance and exit within each level area, which is used to accelerate the calculation of the planned path.
[0109] The second planned path may refer to a planned path within each lowest-level area that is specifically generated based on the path information and dynamic energy consumption of each lowest-level area.
[0110] First, the first planned path is generated through the first path planning request and the coverage map. The first planned path represents the approximate route from the starting location to the destination location, and then each lowest level area in the first planned path is traversed. The lowest level area is the smallest unit in the coverage map, which contains road nodes or power resources in a specific preset area. Each lowest level area has a pre-calculated target matrix, which contains the shortest paths and corresponding cost information between each entrance and exit in the lowest level area. By using this lowest level area, the shortest path from one entrance to another can be quickly found without real-time calculation, which improves efficiency.
[0111] Dynamic energy consumption is vehicle energy consumption data that is updated in real time based on actual conditions (such as weather, road conditions, driving habits, etc.). Taking dynamic energy consumption into account in path calculation can more accurately reflect the energy consumption during actual driving and ensure the feasibility of route planning. Combined with the shortest path information and dynamic energy consumption in the path information, detailed path planning is performed for each lowest level area. The second planned path generated is a specific planned path within the lowest level area, thereby ensuring that not only the general direction is correct during the path planning process, but also reasonable driving within each small range (the lowest level area).
[0112] In the embodiment of the present application, according to the path information corresponding to each lowest level area in the first planned path and the dynamic energy consumption corresponding to each lowest level area, the second planned path corresponding to each lowest level area is generated, thereby obtaining a more specific second planned path inside each lowest level area. Through the above method, it is ensured that the overall path planning is not only efficient and fast, but also can take into account the actual energy consumption, making the planned route more accurate and reliable.
[0113] Step 304: The terminal device combines the first planned path and the second planned path in each of the lowest-level areas to generate a target planned path, wherein the target planned path includes at least one energy replenishment resource, and the target planned path is the shortest reachable route from the starting position to the destination position.
[0114] The target planning path may refer to the shortest achievable route from the starting location to the destination location.
[0115] It should be noted that the target planning path is generated by connecting the first planning path and the second planning path corresponding to each lowest level area in the coverage map of the preset area in the direction from the starting position to the destination position.
[0116] In the embodiment of the present application, the target planning path is generated by combining the first planning path and the second planning path corresponding to each lowest level area. Thus, by combining the first planning path and the second planning path corresponding to each lowest level area, a complete planning path can be generated, which not only covers the planning paths between high-level areas, but also includes the specific planning paths within each lowest level area, ensuring the feasibility of the planning path under the factor of dynamic energy consumption.
[0117] The method for generating a planned path provided by the present application first receives a first path planning request, and then generates a first planned path from a starting position to a destination position according to the first path planning request and a coverage map of a preset area, wherein the coverage map is composed of multiple levels, and each high-level area in the multiple levels includes multiple low-level areas, and each lowest-level area includes a preset number of nodes in a preset area, and then generates a second planned path corresponding to each lowest-level area according to the path information corresponding to each lowest-level area in the first planned path and the dynamic energy consumption corresponding to each lowest-level area, and finally generates a target planned path by combining the first planned path and the second planned path corresponding to each lowest-level area, and the target planned path is the shortest reachable route from the starting position to the destination. Thus, the first planned path is generated faster through the coverage map, and then the cost is calculated according to the dynamic energy consumption and path information of each lowest-level area to accelerate the generation of each second planned path, and the first planned path and each second planned path are combined to generate the target planned path, thereby improving the performance of path planning in the energy replenishment scenario.
[0118] The following will be combined Figure 4 Describe how the terminal device generates a first planned path from the starting location to the destination location according to the first path planning request and the coverage map of the preset area. Figure 4 As shown, step 302 may include:
[0119] Step 3021: The terminal device determines the highest-level area corresponding to the starting position and the highest-level area corresponding to the destination position from the coverage map according to the first path planning request.
[0120] For example, the highest-level region corresponding to the starting position and the highest-level region corresponding to the destination position may be the same region or different regions, and this embodiment of the present application does not limit this.
[0121] Step 3022: The terminal device determines the shortest path between the highest-level area corresponding to the starting position and the highest-level area corresponding to the destination position.
[0122] As a possible implementation method, a bidirectional Dijkstra algorithm may be used to determine the shortest path between the highest level region corresponding to the start position and the highest level region corresponding to the destination position.
[0123] Bidirectional Dijkstra algorithm can be referred to as an optimized graph search algorithm, which improves the classic Dijkstra algorithm to improve the search efficiency of large-scale graphs. It searches from both the starting point and the end point at the same time to find the shortest path faster.
[0124] For example, in one embodiment, Figure 5 As shown, taking the highest level area as the highest level cell as an example, the coverage Figure 1 It contains three top-level cells, namely cell A, cell B and cell C. The top-level cells corresponding to the starting position and the end position are cell A and cell C, respectively. According to the bidirectional Dijkstra algorithm, first, the forward search starts from cell A and extends to its neighbor cell B, and the path cost is calculated to be 5. At the same time, the reverse search starts from cell C and extends to its neighbor cell B, and the path cost is calculated to be 3. When the forward search and the reverse search meet at cell B, the path costs are 5 (from cell A to cell B) and 3 (from cell C to cell B), respectively, and the total path cost is 5+3=8. Finally, by combining the forward and reverse paths, the shortest path from cell A to cell C is cell A→cell B→cell C, and the total path cost is 8. This process combines the two parts of the path at the intersection of the forward and reverse searches (i.e., cell B) to ensure that the path passes through cell B and the cost is minimized.
[0125] In another embodiment, if Figure 5 As shown, covering Figure 2It contains two top-level cells, namely cell A and cell B. The top-level cells corresponding to the start position and the end position are cell A and cell B. Because cell A and cell B are adjacent cells at the same level, the path between cell A and cell B can be taken as the shortest path.
[0126] In the embodiment of the present application, by determining the shortest path between the highest level cell corresponding to the starting position and the highest level cell corresponding to the end position, it is beneficial to quickly narrow the path search range, improve the calculation efficiency, and then generate the target planning path more quickly.
[0127] In one embodiment, if Figure 6The schematic diagram of the method for expanding the shortest path in hierarchical order is shown, the starting point is in the lowest level cell A-1-1, the end point is in the lowest level cell C-2-2, the highest level includes: cell A, cell B and cell C; the second highest level includes: cell A-1, cell A-2, cell B-1, cell B-2, cell C-1 and cell C-2; the lowest level includes: cell A-1-1, cell A-1-2, cell A-2-1, cell A-2-2, cell B-1-1, cell B-1-2, cell B-2-1, cell B-2-2, cell C-1-1, cell C-1-2, cell C-2-1 and cell C-2-2. First, the bidirectional Dijkstra algorithm is used to find the shortest path from the highest level Cell A to the highest level cell C: cell A→cell B→cell C. The method for obtaining the shortest path between the highest level cells can refer to the above embodiment. Then, based on the shortest paths between the highest levels, determine the shortest paths between the next highest levels: based on the shortest path between the highest level cell A and cell B, find the shortest path clique1 from cell A-1 to cell A-2, and then based on the shortest path between the highest level cell B and cell C, find the shortest path clique1 from cell B-1 to cell B-2 and the shortest path clique2 from cell C-1 to cell C-2. Then, based on the shortest paths between the next highest levels, expand the shortest paths between the lowest levels layer by layer: based on the shortest path from the next highest level cell A-1 to Cell A-2, find the shortest path clique4 from cell A-1-1 to cell A-1-2 and the shortest path clique5 from cell A-2-1 to cell A-2-2, and then based on the shortest path from the next highest level cell B-1 to CellB-2, find the shortest path clique6 from cell B-1-1 to cell B-1-2 and the shortest path clique7 from cell B-2-1 to CellB-2-2. Finally, based on the shortest path from cell C-1 to cell C-2 at the next higher level, we find the shortest path clique8 from cell C-1-1 to cell C-1-2 and the shortest path clique9 from cell C-2-1 to cell C-2-2.
[0128] In an embodiment of the present application, based on the shortest path between the highest-level Cell corresponding to the starting position and the highest-level Cell corresponding to the end position, multiple shortest paths between adjacent Cells in each level are expanded in descending order. Thus, through a layer-by-layer expansion method, from the highest-level Cell to the lowest-level Cell, the preprocessed clique data and the shortest paths across levels are used in turn to ensure the optimality and accessibility of the path in each level.
[0129] Step 3023: The terminal device generates a first planned path by combining the shortest path between the highest-level area corresponding to the starting position and the highest-level area corresponding to the destination position and multiple shortest paths between adjacent areas in each level.
[0130] In one embodiment, if Figure 6 The schematic diagram of the method of developing the shortest path in hierarchical order is shown, the starting point is in the lowest level cell A-1-1, the end point is in the lowest level cell C-2-2, the highest level includes: cell A, cell B and cell C; the second highest level includes: cell A-1, cell A-2, cell B-1, cell B-2, cell C-1 and cell C-2; the lowest level includes: cell A-1-1, cell A-1-2, cell A-2-1, cell A-2-2, cell B-1-1, cell B-1-2, cell B-2-1, cell B-2-2, cell C-1-1, cell C-1-2, cell C-2-1 and cell C-2-2. The shortest path of the highest level cell C: cell A→cell B→cell C is combined with multiple shortest paths between adjacent cells in each level: clique1, clique2...clique9 to generate the first planning path.
[0131] In a possible implementation of the embodiment of the present application, before the above step 3023, the method provided in the embodiment of the present application may further include:
[0132] According to the shortest path between the highest-level region corresponding to the starting position and the highest-level region corresponding to the destination position, multiple shortest paths between adjacent regions in each level are expanded in descending order of levels.
[0133] In one embodiment, if Figure 6As shown, first, the bidirectional Dijkstra algorithm can be selected to find the shortest path from the highest level cell A to the highest level cell C: cell A→cell B→cell C. The method for obtaining the shortest path between the highest level cells can refer to the above embodiment. Then, based on the shortest path between the highest levels, the shortest path between the next highest levels is determined. For example, based on the shortest path between the highest level cell A and cell B, the shortest path clique1 from cell A-1 to cell A-2 is found, and then based on the shortest path between the highest level cell B and cell C, the shortest path clique1 from cell B-1 to cell B-2 and the shortest path clique2 from cell C-1 to cell C-2 are found. Next, based on the shortest paths between the next-highest levels, the shortest paths between the lowest levels are expanded layer by layer: based on the shortest path from cell A-1 to cell A-2 at the next-highest level, clique4, the shortest path from cell A-1-1 to cell A-1-2, and clique5, the shortest path from cell A-2-1 to cell A-2-2, are found. Then, based on the shortest path from cell B-1 to cell B-2 at the next-highest level, clique6, the shortest path from cell B-1-1 to cell B-1-2, and clique7, the shortest path from cell B-2-1 to cell B-2-2, are found. Finally, based on the shortest path from cell C-1 to cell C-2 at the next-highest level, clique8, the shortest path from cell C-1-1 to cell C-1-2, and clique9, the shortest path from cell C-2-1 to cell C-2-2, are found.
[0134] In an embodiment of the present application, based on the shortest path between the highest-level region corresponding to the starting position and the highest-level region corresponding to the target position, multiple shortest paths between adjacent regions in each level are expanded in descending order. Thus, through a layer-by-layer expansion method, from the highest-level region to the lowest-level region, preprocessed clique data and the shortest paths across levels are used in sequence to ensure the optimality and accessibility of the path in each level.
[0135] In the embodiment of the present application, the shortest path between the highest level area corresponding to the starting position and the highest level area corresponding to the target position and multiple shortest paths between adjacent areas in each level are combined to generate the first planned path. This can efficiently find the optimal solution for the overall path, improve the accuracy and efficiency of path planning, and is particularly suitable for path planning needs in large-scale complex road network environments.
[0136] In a possible implementation of the embodiment of the present application, the above step 303 can be implemented in the following manner:
[0137] Step 3031: The terminal device determines the path cost result of at least one planned path included in each of the lowest-level areas based on the dynamic energy consumption and the path information corresponding to each of the lowest-level areas, where the planned path is a path from one entrance of the lowest-level area to another exit of the lowest-level area.
[0138] Among them, the path cost result is used to represent the cost when using the planned path. The higher the cost, the greater the cost will be when selecting the planned path. For example, the lower the cost, the greater the cost will be when selecting the planned path.
[0139] Step 3032: The terminal device determines the planned path with the lowest path cost result among at least one planned path included in each of the lowest-level areas as the second planned path in the lowest-level area.
[0140] In an embodiment of the present application, a second planned path corresponding to the lowest level area is generated based on the lowest path cost result, which can ensure that the endurance and charging needs of new energy vehicles are fully met and improve the reliability of path planning.
[0141] In the embodiment of the present application, since the lowest-level region may include powered resources or may not include powered resources, the target matrix corresponding to the lowest-level region may be divided into a target matrix corresponding to the lowest-level region without powered resources and a W matrix corresponding to the lowest-level region including powered resources.
[0142] For ease of description, the following describes the lowest level region without powered resources as the first lowest level region, wherein the path information corresponding to the first lowest level region includes the shortest path between any entrance in the first lowest level region and any exit in the first lowest level region.
[0143] In one embodiment, if Figure 7 As shown, it is a schematic diagram of the W matrix corresponding to the cell without powered resources, and the shortest paths from the entrance A to the exit C and the exit D are path AC and path AD respectively. The shortest paths from the entrance B to the exit C and the exit D are path BC and path BD respectively. Therefore, path AC, path AD, path BC and path BD can be used as the path information corresponding to the first lowest level area without powered resources in this embodiment.
[0144] For the sake of convenience in description, the lowest level region containing the power-on resource is regarded as the second lowest level region, wherein, for the second lowest level region where the power-on resource exists, the path from any entrance to the exit in the second lowest level region can be divided into three sections according to the location of the power-on resource. The target matrix corresponding to the second lowest level region consists of the shortest path between any entrance in the second lowest level region and the first power-on resource with the shortest distance to any entrance in the second lowest level region, the shortest path between any exit in the second lowest level region and the second power-on resource with the shortest distance to any exit in the second lowest level region, and the shortest path between the first power-on resource and the second power-on resource.
[0145] In one embodiment, if Figure 8 As shown in the schematic diagram of the target matrix corresponding to the Cell containing the power-on resource, assuming that there is an entrance A and an exit C in the second lowest level area, first find the power-on resource R1 closest to the entrance A, obtain the shortest path D1 between the entrance A and the power-on resource R1, then find the power-on resource R2 closest to the exit C, and obtain the shortest path D3 between the exit C and the power-on resource R2. Finally, obtain the shortest path D2 between the power-on resource R1 and the power-on resource R2. Therefore, the paths D1, D2 and D3 can be used as the target matrix corresponding to the second lowest level area in this embodiment.
[0146] In the method provided in the embodiment of the present application, when using the coverage map to determine the target planning path, the current battery life and full battery life of the vehicle need to be included in the cost calculation process to guide the route calculation process to find the shortest path. Figure 8 Take the view shown as an example. When a vehicle enters the cell through entrance A, it needs to compare the current range with D1. If the current range is greater than D1, it means that resource R1 is reachable, that is, it can reach R1 to charge and continue to drive down with full power. If the current range is less than D1, it means that the road section after entering from entrance A is unreachable. At this time, it will add a large additional cost, so that the path finding process avoids unreachable routes.
[0147] In the embodiment of the present application, the path information pre-stores the shortest path from a certain entrance to other exits and the corresponding cost information, and the dynamic energy consumption data reflects the energy consumption of the vehicle under different conditions. In path planning, according to the current dynamic energy consumption of the vehicle, it is ensured that the path calculated according to the target matrix is not only the shortest but also reachable. In this way, it can be ensured that the path planning result is more in line with the actual endurance, thereby improving the user's travel experience and the accuracy of path planning.
[0148] In a possible implementation of the embodiment of the present application, when the lowest level area is an area without power-on resources, the above step 3031 may include:
[0149] At least one planned path from any entrance to any exit corresponding to the first lowest level area is determined from the path information corresponding to the first lowest level area; the first lowest level area is the lowest level area that does not contain the supply resources.
[0150] The path cost is calculated according to the distance of each of the planned paths, the dynamic energy consumption corresponding to any of the entrances, and the dynamic energy consumption corresponding to each of the exits to obtain a path cost result of the at least one planned path.
[0151] It should be noted that if Fig. 9 As shown in the schematic diagram of path cost calculation based on dynamic energy consumption, for sections A and B, the corresponding distances are D1 and D2, and the dynamic energy consumptions of the two sections at the starting points are P1-P3 respectively. The path cost of the two sections is: Therefore, the path cost between any two points can be calculated using the following formula:
[0152]
[0153] Among them, P(n) is the dynamic energy consumption corresponding to nodes in different road sections, and D(n) is the distance of the road section.
[0154] In one embodiment, according to the above-mentioned dynamic energy consumption calculation method, when the lowest level cell is a cell without powered resources, the path cost calculation process can be performed according to the following steps: Assuming that there are entry point A and exit point B in the lowest level area, find the distance of the shortest path from entry point A to exit point B in the W matrix, which is recorded as DAB. According to the path cost calculation formula, calculate the energy consumption from entry point A to exit point B. The energy consumption of entry point A is PA, and the energy consumption of exit point B is PB. Then the cost of the shortest path from entry point A to exit point B is:
[0155] In a possible implementation manner of the embodiment of the present application, when the lowest-level cell is a cell containing a powered resource, the terminal device in the above step determines the path cost result of at least one planned path included in each of the lowest-level areas according to the dynamic energy consumption and the path information corresponding to each of the lowest-level areas, that is, step 3031, which may include:
[0156] The terminal device acquires at least one planned path corresponding to the second lowest-level area from the path information corresponding to the second lowest-level area, the planned path including the shortest path between any entrance of the second lowest level to any exit of the second lowest-level area, and at least one energy replenishment resource in the second lowest-level area is located on the shortest path;
[0157] The terminal device determines a first distance, a second distance and a third distance based on the path information corresponding to the second lowest level area, wherein the first distance is the distance of the shortest path between any entrance of the second lowest level area and the energy replenishment resource closest to the any entrance, the second distance is the distance of the shortest path between two adjacent power-on resources, and the third distance is the distance of the shortest path between the power-on resource closest to any exit of the second lowest level area and the any exit.
[0158] The terminal device calculates the path cost result of at least one planned path according to the first distance, the second distance, the third distance, the dynamic energy consumption corresponding to any of the entrances, the dynamic energy consumption corresponding to any of the powered resources, and the dynamic energy consumption corresponding to any of the exits.
[0159] In one embodiment, assuming that there are entry point A and exit point B in the lowest level cell, the shortest path from A to B is found in the path information, including: the shortest path distance D1 from point A to the nearest powered resource R1, the shortest path distance D2 from R1 to another powered resource R2, and the shortest path distance D3 from R2 to point B. Then, according to the path cost calculation formula, the cost of each path is calculated respectively. Assuming that the dynamic energy consumption at point A is PA, the dynamic energy consumption at point R1 is PR1, the dynamic energy consumption at point R2 is PR2, and the dynamic energy consumption at point B is PB, the total cost of the path is:
[0160]
[0161] In one embodiment, if Fig.10 In another coverage diagram shown in FIG. 1 , cell A and cell B are at the same level, A is the entrance of cell A, B and C are the exits of cell A, R1 and R2 are the power-on resources in cell A, and according to the W matrix of cell A, the path between cell A and cell B includes path 1 and path 2. Among them, path 1 is: A→R1→R2→B, and path 2 is: A→R1→R2→C. Fig.10 It can be seen that the path cost of path 1 is greater than the path cost of path 2, so the route with the smallest path cost, that is, path 2, is selected as the second planned path corresponding to cell A.
[0162] As a possible implementation, Fig.10As shown, the planned path from cell A to cell B is path 1: A→R1→R2→B, or path 2: A→R1→R2→C. Assuming that path 1 is selected, after R2 is charged, the cruising range cannot reach the total mileage of D3, D5 and D7, that is, it cannot reach the next power-up resource R3. However, if path 2 is selected, after R2 is charged, the cruising range can reach the total mileage of D4, D6 and D8. Therefore, path 2 can be selected as the shortest path for cell A.
[0163] The method provided in the embodiment of the present application may also include: when the mobile device (such as a vehicle) travels along the target planning path, the terminal device obtains one or more second powered resources within a preset range on the target planning path. If there is a second powered resource within a preset distance of any first powered resource in the target planning path, and the second powered resource is more in line with the preset requirements than the first powered resource, the terminal device updates the target planning path, and the updated target planning path includes the second powered resource, but does not include the first powered resource.
[0164] When the owner drives the vehicle along the target planned path, the terminal device can search for all power-on resources within a preset range in real time. If it is found that a second power-on resource is within a preset distance of any first power-on resource in the target planned path, and the second power-on resource is a better power-on resource than the first power-on resource, such as a charging pile or battery swap station with faster charging speed, shorter waiting time, and lower charging price, the terminal device can replace the original first power-on resource with the second power-on resource, and adjust the target planned path so that the mobile device can reach the above-mentioned second power-on resource. This dynamic adjustment mechanism can ensure that users always use the best power-on resources, improve charging efficiency and travel experience, and avoid wasting time and unnecessary cost increases caused by using inferior power-on resources.
[0165] The method provided in the embodiment of the present application may further include: the terminal device may further send the target planned path or the updated target planned path to the vehicle.
[0166] The method for generating a planned path provided in the present application, if there is a second power-supply resource within the preset range of each power-supply resource on the target planned path, the above-mentioned first power-supply resource is replaced by the second power-supply resource, and the target planned path is updated. In this way, it can ensure that the user always uses the best charging facilities during driving, improve charging efficiency and travel experience, and thus enhance the practicality of the overall path planning.
[0167] Fig.11 A flowchart of a method for generating a planned path provided in yet another embodiment of the present application is shown.
[0168] like Fig.11As shown, the method for generating a planned path can be divided into an offline data processing part and a real-time path calculation part.
[0169] In the offline data processing part, the coverage map corresponding to the preset area can be constructed according to the road nodes in the preset area. Optionally, multiple road nodes or power resources in the preset area can be obtained from OSM data, and then the multiple road nodes and power resources are fused to construct the coverage map corresponding to the preset area. Then, according to the coverage map corresponding to the preset area, the W matrix corresponding to each lowest level cell in the coverage map is pre-calculated.
[0170] In the implementation of the route calculation part, when a path planning request sent by the user is received, it is necessary to load the offline data and search the coverage map in the offline data to obtain the first planning path, and then calculate the cost according to the W matrix and dynamic energy consumption corresponding to each lowest level cell in the first planning path to generate the second planning path corresponding to each lowest level cell. Combine the first planning path and the second planning path corresponding to each lowest level cell to generate the target planning path, and the shortest route can be reached. After obtaining the target planning path and driving along the target planning path, you can also search along the way to obtain better power resources, such as fast charging piles and other power resources with higher charging efficiency. If a better power resource is found within the preset range of any power resource in the target planning path, the above power resource will be replaced with a better power resource, and the result of the path planning will be fed back to the user by requesting a map business. It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0171] Corresponding to the planning path generation method based on dynamic energy consumption in the above embodiment, Fig.12 A structural block diagram of an apparatus for generating a planned path provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0172] Reference Fig.12 , the device 1300 for generating a planned path includes:
[0173] The receiving module 1201 is used to receive a first path planning request, where the first path planning request at least includes a starting position and a destination position of the mobile device;
[0174] A first determining module 1202 is used to determine a first planned path from the starting position to the destination position according to the first path planning request and a coverage map of a preset area, wherein the coverage map is composed of multiple levels, the lowest level area of the multiple levels includes road nodes or energy replenishment resources in the preset area, and the first planned path includes multiple lowest level areas;
[0175] A second determination module 1203 is used to determine a second planned path in a plurality of the lowest-level areas according to the path information and dynamic energy consumption respectively corresponding to the plurality of the lowest-level areas, wherein the path information includes the shortest path from any entrance to any exit in the low-level area;
[0176] The third determination module 1204 is used to combine the first planned path and the second planned path in each of the lowest-level areas to generate a target planned path, wherein the target planned path includes at least one first energy replenishment resource, and the target planned path is the shortest reachable route from the starting position to the destination position.
[0177] In actual use, the device for generating a planned path provided in the embodiment of the present application can be configured in any terminal device, such as a chip or processing circuit in the terminal device. Of course, the device for generating a planned path can also be a terminal device to execute the aforementioned method for generating a planned path.
[0178] The device for generating a planned path provided by the present application first receives a first path planning request, and then generates a first planned path from a starting position to a destination position according to the first path planning request and a coverage map of a preset area, and then generates a second planned path corresponding to each lowest level area according to the path information corresponding to each lowest level area in the first planned path and the dynamic energy consumption corresponding to each lowest level area, and finally generates a target planned path by combining the first planned path and the second planned paths corresponding to each lowest level area, and the target planned path is the shortest reachable route from the starting position to the destination. Thus, the generation of the first planned path is accelerated by the coverage map, and then the cost is calculated according to the dynamic energy consumption and path information of each lowest level area to accelerate the generation of each second planned path, and the first planned path and each second planned path are combined to generate the target planned path, thereby improving the performance of path planning in the energy replenishment scenario.
[0179] In a possible implementation of the embodiment of the present application, the first determining module 1202 includes:
[0180] A first determining unit, configured to determine, from the coverage map according to the first path planning request, a highest-level area corresponding to the starting position and a highest-level area corresponding to the destination position;
[0181] A second determining unit, configured to determine the shortest path between the highest level region corresponding to the starting position and the highest level region corresponding to the destination position;
[0182] The third determining unit is used to determine the first planned path by combining the shortest path and multiple shortest paths between adjacent areas in each of the levels.
[0183] In a possible implementation of the embodiment of the present application, the second determining module 1203 includes:
[0184] A calculation unit, configured to determine a path cost result of at least one planned path included in each of the lowest-level regions according to the dynamic energy consumption and the path information corresponding to each of the lowest-level regions, wherein the planned path is a path from an entrance of the lowest-level region to another exit of the lowest-level region;
[0185] The fourth determining unit is used to determine the planned path with the lowest path cost result among the at least one planned path included in each of the lowest-level regions as the second planned path in the lowest-level region.
[0186] In another possible implementation of the embodiment of the present application, the above-mentioned calculation unit is specifically used to:
[0187] Determining at least one planned path from any entrance to any exit corresponding to the first lowest level area from the path information corresponding to the first lowest level area; the first lowest level area is the lowest level area that does not contain the supply resources;
[0188] The path cost is calculated according to the distance of each of the planned paths, the dynamic energy consumption corresponding to any of the entrances, and the dynamic energy consumption corresponding to each of the exits to obtain a path cost result of the at least one planned path.
[0189] In another possible implementation of the embodiment of the present application, the above-mentioned calculation unit is specifically used to:
[0190] Acquire at least one planned path corresponding to the second lowest-level area from the path information corresponding to the second lowest-level area, the planned path including the shortest path between any entrance of the second lowest level and any exit of the second lowest-level area, and at least one energy replenishment resource in the second lowest-level area is located on the shortest path;
[0191] Determine the first distance, the second distance, and the third distance according to the path information corresponding to the second lowest level area, wherein the first distance is the shortest path distance between any entrance of the second lowest level area and the energy replenishment resource closest to the any entrance, the second distance is the shortest path distance between two adjacent power-on resources, and the third distance is the shortest path distance between the power-on resource closest to any exit of the second lowest level area and the any exit;
[0192] A path cost result of at least one planned path is calculated based on the first distance, the second distance, the third distance, the dynamic energy consumption corresponding to any of the entrances, the dynamic energy consumption corresponding to any of the powered resources, and the dynamic energy consumption corresponding to any of the exits.
[0193] In another possible implementation of the embodiment of the present application, the apparatus 1200 further includes:
[0194] A search module, configured to search for one or more second powered resources within a preset range on the target planned path when the mobile device is traveling along the target planned path;
[0195] A replacement module is used to update the target planning path if there is a second power-on resource within a preset distance of any of the first power-on resources located on the target planning path, and the second power-on resource better meets the preset requirements than the first power-on resource. The updated target planning path includes the second power-on resource but does not include the first power-on resource.
[0196] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0197] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0198] In order to implement the above embodiments, the present application also proposes a terminal device.
[0199] Fig.13 A schematic diagram of the structure of a terminal device according to an embodiment of the present application.
[0200] like Fig.13 As shown, the terminal device 200 includes:
[0201] A memory 210 and at least one processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 stores a computer program, and when the processor 220 executes the program, the method for generating a planned path described in an embodiment of the present application is implemented.
[0202] Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0203] The terminal device 200 typically includes a variety of electronic device readable media, which can be any available media that can be accessed by the terminal device 200, including volatile and non-volatile media, removable and non-removable media.
[0204] The memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and / or cache memory 250. The terminal device 200 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 260 may be used to read and write non-removable, non-volatile magnetic media ( Fig.13 not shown, usually called a "hard drive"). Although Fig.13 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 230 via one or more data medium interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0205] A program / utility 280 having a set (at least one) of program modules 270 may be stored, for example, in the memory 210, such program modules 270 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 270 generally perform the functions and / or methods of the embodiments described herein.
[0206] The terminal device 200 can also communicate with one or more external devices 290 (such as display 291, etc.), and can also communicate with one or more devices that enable users to interact with the terminal device 200, and / or communicate with any device (such as a network card, a modem, etc.) that enables the terminal device 200 to communicate with one or more other computing devices. This communication can be carried out through an input / output (I / O) interface 292. In addition, the terminal device 200 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 293. As shown in the figure, the network adapter 293 communicates with other modules of the terminal device 200 through a bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the terminal device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0207] The processor 220 executes various functional applications and data processing by running the programs stored in the memory 210 .
[0208] It should be noted that the implementation process and technical principles of the terminal device of this embodiment refer to the aforementioned explanation of the method for generating a planned path in the embodiment of the present application, and will not be repeated here.
[0209] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0210] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0211] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0212] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0213] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0214] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0215] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0216] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for generating a planning path, characterized in that: include: Receiving a first path planning request, wherein the first path planning request is used to request planning of a path from a starting location to a destination location; Determine a first planned path from the starting position to the destination position according to the first path planning request and a coverage map of a preset area, wherein the coverage map is composed of multiple levels, a lowest level area among the multiple levels includes a road node or a power replenishment resource in the preset area, and the first planned path includes multiple lowest level areas; Determine a second planned path in a plurality of the lowest-level areas according to the path information and dynamic energy consumption respectively corresponding to the plurality of the lowest-level areas, wherein the path information includes the shortest path between any entrance to any exit in the low-level area; The first planned path and the second planned paths in each of the lowest-level areas are combined to generate a target planned path, wherein the target planned path includes at least one first energy replenishment resource, and the target planned path is the shortest reachable route from the starting position to the destination position.
2. The method according to claim 1, characterized in that The determining, according to the first path planning request and a coverage map of a preset area, a first planned path from the starting position to the destination position includes: Determining, from the coverage map according to the first path planning request, a highest-level area corresponding to the starting position and a highest-level area corresponding to the destination position; Determine the shortest path between the highest level region corresponding to the starting position and the highest level region corresponding to the destination position; The first planned path is determined by combining the shortest path and a plurality of shortest paths between adjacent areas in each of the levels.
3. The method according to claim 1, characterized in that The determining, according to the path information and dynamic energy consumption respectively corresponding to the plurality of the lowest level areas, the second planned paths in the plurality of the lowest level areas comprises: Determine, according to the dynamic energy consumption and the path information corresponding to each of the lowest-level regions, a path cost result of at least one planned path included in each of the lowest-level regions, wherein the planned path is a path from an entrance of the lowest-level region to another exit of the lowest-level region; A planned path with the lowest path cost result among at least one planned path included in each of the lowest-level regions is determined as the second planned path in the lowest-level region.
4. The method according to claim 3, characterized in that The determining, according to the dynamic energy consumption and the path information corresponding to each of the lowest-level regions, a path cost result of at least one planned path included in each of the lowest-level regions, comprises: Determining at least one planned path from any entrance to any exit corresponding to the first lowest level area from the path information corresponding to the first lowest level area; the first lowest level area is the lowest level area that does not contain the supply resources; The path cost is calculated according to the distance of each of the planned paths, the dynamic energy consumption corresponding to any of the entrances, and the dynamic energy consumption corresponding to each of the exits to obtain a path cost result of the at least one planned path.
5. The method according to claim 3, characterized in that The determining, according to the dynamic energy consumption and the path information corresponding to each of the lowest-level regions, a path cost result of at least one planned path included in each of the lowest-level regions, comprises: Acquire at least one planned path corresponding to the second lowest-level area from the path information corresponding to the second lowest-level area, the planned path including the shortest path between any entrance of the second lowest level and any exit of the second lowest-level area, and at least one energy replenishment resource in the second lowest-level area is located on the shortest path; Determine the first distance, the second distance, and the third distance according to the path information corresponding to the second lowest level area, wherein the first distance is the distance of the shortest path between any entrance of the second lowest level area and the energy replenishment resource closest to the any entrance, the second distance is the distance of the shortest path between two adjacent energy replenishment resources, and the third distance is the distance of the shortest path between the energy replenishment resource closest to any exit of the second lowest level area and the any exit; The path cost result of at least one planned path is calculated based on the first distance, the second distance, the third distance, the dynamic energy consumption corresponding to any of the entrances, the dynamic energy consumption corresponding to any of the energy supplement resources, and the dynamic energy consumption corresponding to any of the exits.
6. The method according to any one of claims 1 to 5, characterized in that: After combining the first planned path and the second planned paths in each of the lowest-level regions to generate a target planned path, the method further includes: When the mobile device is traveling along the target planned path, obtaining one or more second energy replenishment resources within a preset range on the target planned path; If there is a second energy replenishment resource within a preset distance of any of the first energy replenishment resources on the target planned path, and the second energy replenishment resource better meets the preset requirements than the first energy replenishment resource, the target planned path is updated, and the updated target planned path includes the second energy replenishment resource but does not include the first energy replenishment resource.
7. A device for generating a planned path, characterized in that: include: A receiving module, configured to receive a first path planning request, wherein the first path planning request is used to request planning of a path from a starting location to a destination location; a first determining module, configured to determine a first planned path from the starting position to the destination position according to the first path planning request and a coverage map of a preset area, wherein the coverage map is composed of a plurality of levels, a lowest level area among the plurality of levels includes a road node or a power replenishment resource in the preset area, and the first planned path includes a plurality of lowest level areas; A second determination module is used to determine a second planned path in a plurality of the lowest-level areas according to the path information and dynamic energy consumption respectively corresponding to the plurality of the lowest-level areas, wherein the path information includes the shortest path between any entrance and any exit in the low-level area; The third determination module is used to combine the first planned path and the second planned path in each of the lowest-level areas to generate a target planned path, wherein the target planned path includes at least one energy replenishment resource, and the target planned path is the shortest reachable route from the starting position to the destination position.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. The terminal device according to claim 8, characterized in that: The terminal device is a new energy vehicle.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.