Path planning method, device and readable storage medium
By obtaining the user's travel information and interest points, calculating the total duration of multiple alternative paths, and selecting the shortest path as the target path, solving the efficiency of public transportation route selection and improving travel efficiency.
Patent Information
- Application Number
- CN202211139608.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-09-19
AI Technical Summary
When traveling with public transportation, it is difficult to accurately and conveniently choose the most suitable route and the points of interest passing by, resulting in inefficient travel.
By obtaining the user's starting point, end point and interest points to be accessed, multiple alternative paths are determined, and the total duration of each path is calculated, and the path with the smallest sum of the pass time and the duration of the interest points to be passed is selected as the target path.
It realizes that when passing through the points of interest that users are to visit, the shortest time-consuming alternative route is determined, and the user's travel efficiency is improved.
Smart Images

Figure CN115493607B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a path planning method, device, and readable storage medium. Background Art
[0002] As people's pace of life accelerates, when they use public transportation to travel to their destinations, they often need to transfer in the middle of the journey to visit some points of interest along the way. For example, points of interest can be supermarkets, hospitals, or shopping malls. However, the locations of supermarkets, hospitals, or shopping malls on the route can only be observed subjectively on the map, which is not accurate and convenient enough. Therefore, how to choose the most suitable public transportation route and points of interest to improve travel efficiency has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The present application provides a path planning method, device and readable storage medium for determining the most suitable public transportation travel routes and points of interest to improve travel efficiency.
[0004] In order to achieve the above objectives, this application adopts the following technical solutions:
[0005] In a first aspect, a path planning method is provided, including: obtaining a starting point, an end point, and a point of interest to be visited planned by a user; determining multiple alternative paths according to the starting point and the end point, each alternative path including multiple nodes, and the multiple nodes including a starting point, an end point, and multiple public transportation stations; for a first alternative path, determining a total duration of the first alternative path, and obtaining multiple total durations; the first alternative path is any one of the multiple alternative paths, the total duration is the sum of a first travel duration and a second travel duration, the first travel duration is the travel duration of the user on the first alternative path, and the second travel duration is the travel duration of the user starting from the target node and passing through the target point of interest and returning to the target node; the target node is one of the multiple nodes, the target point of interest is of the same type as the point of interest to be visited by the user, and the distance between the target point of interest and the target node is less than or equal to a first threshold;
[0006] When the total duration of the first candidate path is the minimum value among the multiple total durations, the first candidate path is determined as the target path.
[0007] Based on the technical solution provided by the embodiment of the present application, the path planning device can determine multiple alternative paths according to the starting point and the end point planned by the user, and can plan multiple routes from the starting point to the end point for the user, enriching the user's options, and determine the target node and the target point of interest in each alternative path according to the user's points of interest to be visited. In this way, after determining multiple alternative paths and the target points of interest in each alternative path, the path planning device can determine the travel time on each alternative path, as well as the travel time of the user returning to the target node after starting from the target node and passing through the target point of interest, determine the total time on each alternative path, and determine the alternative path corresponding to the minimum value of the multiple total times as the target path. Through this target path, the shortest alternative route can be determined when passing through the points of interest to be visited by the user, thereby improving the user's travel efficiency.
[0008] Optionally, in the case that the point of interest to be visited by the user is a type of point of interest, the path planning method also includes: for the first station in the first alternative path, if there is a point of interest to be visited by the user within a range less than or equal to a first threshold from the first station, then the first station is determined as the target node; wherein the first station is the first station or the last station among the multiple public transportation stations included in the first alternative path; if there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first station, and there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second station, then the second station is determined as the target node; the second station is any station between the first station and the last station.
[0009] In this way, the path planning device can determine that there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the first station, determine the first station as the target node, and only when it is determined that there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first station, will it determine whether there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second station. Because the user can go to the point of interest to be visited before taking the transportation at the first station or after leaving the transportation at the first station without transferring, the user's waiting time for the transportation is reduced, and the user's travel efficiency is improved.
[0010] Optionally, when there are multiple points of interest to be visited by the user, the path planning method also includes: if there are multiple points of interest within a range less than or equal to a first threshold from the first node, determining the first node as the target node; the first node is any one of the multiple nodes.
[0011] In this way, the path planning device can prioritize the minimum number of nodes, including each point of interest to be visited by the user, which can minimize the number of transfers, reduce the user's waiting time for transportation, and improve the user's travel efficiency.
[0012] Optionally, the path planning method also includes: if there are no points of interest to be visited by the user within a range less than or equal to the first threshold from the first site and within a range less than or equal to the first threshold from the second site, adjusting the first threshold, and the adjusted first threshold is greater than the first threshold before adjustment.
[0013] In this way, the search range of the points of interest to be visited can be increased, so as to avoid the user being unable to search for the points of interest to be visited on the first alternative path, thereby improving the user experience.
[0014] In a second aspect, a path planning device is provided, the device comprising an acquisition unit and a determination unit; the acquisition unit is used to acquire a starting point, an end point and a point of interest to be visited planned by a user; the determination unit is used to determine multiple alternative paths according to the starting point and the end point, each alternative path comprising multiple nodes, and the multiple nodes comprising a starting point, an end point and multiple public transportation stations; the determination unit is also used to determine the total duration of the first alternative path for a first alternative path, and obtain multiple total durations; the first alternative path is any one of the multiple alternative paths, the total duration is the sum of a first travel duration and a second travel duration, the first travel duration is the travel duration of the user on the first alternative path, and the second travel duration is the travel duration of the user after starting from the target node and passing through the target point of interest and returning to the target node; the target node is one of the multiple nodes, the target point of interest is of the same type as the point of interest to be visited by the user, and the distance between the target point of interest and the target node is less than or equal to a first threshold; the determination unit is also used to determine the first alternative path as the target path when the total duration of the first alternative path is the minimum value among the multiple total durations.
[0015] Optionally, the determination unit is also used to: for the first station in the first alternative path, if there is a point of interest to be visited by the user within a range less than or equal to a first threshold from the first station, determine the first station as the target node; wherein the first station is the first station or the last station among the multiple public transportation stations included in the first alternative path; if there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first station, and there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second station, determine the second station as the target node; the second station is any station between the first station and the last station.
[0016] Optionally, when there are multiple points of interest to be visited by the user, the determination unit is further used to: determine the first node as the target node when each of the multiple points of interest is included within a range less than or equal to a first threshold from the first node; the first node is any one of the multiple nodes.
[0017] Optionally, the path planning device also includes an adjustment unit, which is used to adjust the first threshold when there are no points of interest to be visited by the user within a range less than or equal to the first threshold from the first site and within a range less than or equal to the first threshold from the second site, and the adjusted first threshold is greater than the first threshold before adjustment.
[0018] In a third aspect, a path planning device is provided, which can implement the functions performed by the path planning device in the above-mentioned aspects or possible designs. The functions can be implemented through hardware, such as: in one possible design, the path planning device may include: a processor and a communication interface, and the processor can be used to support the path planning device to implement the functions involved in the above-mentioned first aspect or any possible design of the first aspect.
[0019] In another possible design, the path planning device may further include a memory for storing computer-executable instructions and data necessary for the path planning device. When the path planning device is running, the processor executes the computer-executable instructions stored in the memory so that the path planning device executes the first aspect or any possible path planning method of the first aspect.
[0020] In a fourth aspect, a computer-readable storage medium is provided, which may be a readable non-volatile storage medium, and which stores computer instructions or programs. When the computer-readable storage medium is run on a computer, the computer can execute the first aspect or any possible path planning method of the above aspects.
[0021] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the path planning method of the first aspect or any possible design of the above aspects.
[0022] In a sixth aspect, a path planning device is provided, the path planning device comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the path planning device executes the path planning method as described in the first aspect or any possible design of the first aspect.
[0023] In a seventh aspect, a chip system is provided, the chip system including a processor and a communication interface, the chip system can be used to implement the functions performed by the path planning device in the first aspect or any possible design of the first aspect, for example, the processor is used to obtain a first request message from the terminal device through the communication interface. In one possible design, the chip system also includes a memory, the memory is used to store program instructions and / or data. The chip system can be composed of a chip, or it can include a chip and other discrete devices, without limitation. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a path planning system provided in an embodiment of the present application;
[0025] Figure 2 A schematic diagram of the structure of a path planning device provided in an embodiment of the present application;
[0026] Figure 3 A schematic diagram of a flow chart of a path planning method provided in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of an alternative path provided in an embodiment of the present application;
[0028] Figure 5 A flowchart of another path planning method provided in an embodiment of the present application;
[0029] Figure 6 A schematic diagram of a first threshold range for a first site provided in an embodiment of the present application;
[0030] Figure 7 A schematic diagram of a first threshold range of a terminal station provided in an embodiment of the present application;
[0031] Figure 8 A schematic diagram of a first threshold range of a second site provided in an embodiment of the present application;
[0032] Fig. 9 A flowchart of another path planning method provided in an embodiment of the present application;
[0033] Fig.10 A schematic diagram of the structure of a path planning device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0036] It should also be understood that the term “comprising” indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or components.
[0037] As people's pace of life accelerates, when they use public transportation to travel to their destinations, they often need to transfer in the middle of the journey to visit some points of interest. For example, points of interest can be supermarkets, hospitals, or shopping malls. However, the locations of supermarkets, hospitals, or shopping malls on the route can only be observed subjectively on the map, which is not accurate and convenient enough.
[0038] Therefore, how to accurately choose the most convenient public transportation route to visit the most suitable point of interest has become a technical problem that needs to be solved urgently.
[0039] In view of this, an embodiment of the present application provides a path planning method, including: obtaining a starting point, an end point and a point of interest to be visited planned by a user; determining multiple alternative paths according to the starting point and the end point, each alternative path including multiple nodes, and the multiple nodes including a starting point, an end point and multiple public transportation stations; for a first alternative path, determining the total duration of the first alternative path to obtain multiple total durations; the first alternative path is any one of the multiple alternative paths, and the total duration is the sum of a first travel duration and a second travel duration, the first travel duration is the travel duration of the user on the first alternative path, and the second travel duration is the travel duration of the user returning to the target node after starting from the target node and passing through the target point of interest; the target node is one of the multiple nodes, the target point of interest is of the same type as the point of interest to be visited by the user, and the distance between the target point of interest and the target node is less than or equal to a first threshold; when the total duration of the first alternative path is the minimum value among the multiple total durations, the first alternative path is determined as the target path.
[0040] The method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0041] It should be noted that the network system described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of network systems and the emergence of other network systems, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0042] Figure 1 FIG. 1 is a schematic diagram of a path planning system provided by an embodiment of the present application. Figure 1 As shown, the path planning system may include a path planning device 11 and a terminal device 12. The path planning device 11 is connected to the terminal device 12. The path planning device 11 and the terminal device 12 may be connected wirelessly.
[0043] The path planning device 11 involved in the embodiment of the present application may also be referred to as a server, a data center, etc. In the embodiment of the present application, the specific technology and specific device form used by the path planning device 11 are not limited.
[0044] The terminal device 12 involved in the embodiments of the present application may also be a terminal, a mobile station (MS), a mobile terminal (MT), etc. For example, the terminal device 12 may be a computer, a handheld computer, a tablet computer, a vehicle-mounted terminal, etc. The embodiments of the present application do not limit the specific technology, specific number, and specific device form adopted by the terminal device 12.
[0045] The terminal device 12 is used to obtain the starting point, end point and points of interest planned by the user, and send the acquired starting point, end point and points of interest planned by the user to the path planning device 11. The path planning device 11 is used to receive the starting point, end point and points of interest planned by the user sent by the terminal device 12, and plan the target path according to the starting point, end point and points of interest planned by the user.
[0046] In different application scenarios, the path planning device 11 and the terminal device 12 may be independent devices or integrated into the same device, which is not specifically limited in the embodiment of the present invention.
[0047] It should be noted that Figure 1 This is just an exemplary framework diagram. Figure 1 The names of the individual devices included in the Figure 1 In addition to the functional nodes shown, other nodes may also be included, which is not limited in the embodiments of the present application.
[0048] When implementing it specifically, Figure 1Each device in the Figure 2 The structure shown, or including Figure 2 Parts shown. Figure 2 The present invention provides a schematic diagram of the composition of a path planning device 200, which can be a chip or a system on a chip in an IP device. Alternatively, the path planning device 200 can be a chip or a system on a chip in a server. Figure 2 As shown, the path planning device 200 includes a processor 201 , a communication interface 202 and a communication line 203 .
[0049] Furthermore, the path planning device 200 may further include a memory 204 . The processor 201 , the memory 204 and the communication interface 202 may be connected via a communication line 203 .
[0050] The processor 201 is a CPU, a general processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 201 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.
[0051] The communication interface 202 is used to communicate with other devices or other communication networks. The communication interface 202 can be a module, a circuit, a communication interface or any device capable of implementing communication.
[0052] The communication line 203 is used to transmit information between the components included in the path planning device 200.
[0053] The memory 204 is used to store instructions, where the instructions may be computer programs.
[0054] The memory 204 may be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.
[0055] It should be noted that the memory 204 can exist independently of the processor 201, or can be integrated with the processor 201. The memory 204 can be used to store instructions or program codes or some data, etc. The memory 204 can be located in the path planning device 200, or can be located outside the path planning device 200, without limitation. The processor 201 is used to execute the instructions stored in the memory 204 to implement the path planning method provided in the following embodiments of the present application.
[0056] In one example, the processor 201 may include one or more CPUs, for example, Figure 2 CPU0 and CPU1 in.
[0057] As an optional implementation, the path planning device 200 includes multiple processors, for example, Figure 2 In addition to the processor 201, a processor 205 may also be included.
[0058] It should be pointed out that Figure 2 The composition shown in the Figure 1 The limitations of each device in Figure 2 In addition to the parts shown, Figure 1 The various devices in the Figure 2 More or fewer components, or combinations of certain components, or different arrangements of components.
[0059] In the embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.
[0060] In addition, the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiments of the present application is only an example, and other names can also be used in the specific implementation without limitation.
[0061] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0062] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0063] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0064] Combine the following Figure 1 The path planning system shown describes the path planning method provided in the embodiment of the present application.
[0065] Figure 3 A path planning method is provided in an embodiment of the present application, which is applied to a path planning device, a terminal device, or a server. The path planning device can be Figure 1 The path planning device 11 in the present application may also be a device in the path planning device 11, such as a chip. The present application embodiment is described by taking the application in the path planning device as an example. Figure 3 As shown, the method includes the following S301-S304:
[0066] S301. The route planning device obtains the starting point, the end point and the points of interest to be visited by the user.
[0067] The starting point may be the user's current geographical location. For example, the current location may be a residential address, a company, a school, etc. The end point may be the user's final destination. For example, when the starting point is a residential address, the end point may be a company, a school, etc. For another example, when the starting point is a company, the end point may be a residential address, a school, etc.
[0068] Among them, the point of interest can be other places that the user needs to go to on the way from the starting point to the end point. For example, the point of interest can be a supermarket, a hospital, a restaurant or a shopping mall, etc. This application does not limit this.
[0069] As a possible implementation, the terminal device may obtain the starting point, end point, and points of interest to be visited by the user in response to the user's input operation. After obtaining the starting point, end point, and points of interest to be visited by the user, the terminal device may send first information to the path planning device, where the first information includes the starting point, end point, and points of interest to be visited by the user. Correspondingly, the path planning device may obtain the starting point, end point, and points of interest to be visited by the user by receiving the first information sent by the terminal device.
[0070] The terminal device may be Figure 1 The terminal device 12 may also be a device in the terminal device 12, such as a chip.
[0071] S302: The path planning device determines a plurality of candidate paths according to the starting point and the end point.
[0072] Each candidate path includes a plurality of nodes, and the plurality of nodes include a starting point, an end point, and a plurality of public transportation stations. For example, a public transportation station may be a bus station, a subway station, a light rail station, and the like.
[0073] The multiple public transportation stops in each alternative route are not exactly the same. Figure 4 As shown, the alternative paths may include alternative path 1, alternative path 2, and alternative path 3. The multiple nodes in alternative path 1 may include a starting point, site 1, site 2, and an end point. The multiple nodes in alternative path 2 may include a starting point, site 1, site 3, and an end point. The multiple nodes in alternative path 3 may include a starting point, site 4, site 2, and an end point.
[0074] As a possible implementation, a database is provided inside the path planning device, and the database pre-stores the identifiers of all public transportation and the station information corresponding to the identifiers. For example, the identifiers of public transportation may be 101, 102, 202, etc., or may be Line 1, Line 2, Line 3, etc. The station information corresponding to the identifier may be Station 1, Station 2, Station 3, etc. After obtaining the starting point and end point planned by the user, the path planning device may determine multiple alternative paths according to the pre-stored identifiers of public transportation and the corresponding station information.
[0075] It should be noted that the number of multiple alternative routes and the order of the multiple alternative routes can be set as needed. For example, the number of multiple alternative routes can be 3, 5, 6, etc. The order of the multiple alternative routes can be: ordering according to the number of transfers, or ordering according to the time taken to pass through the alternative routes, etc.
[0076] In some embodiments, the route planning device can also filter the alternative routes according to the user's travel time. For example, the route planning device can delete the alternative routes whose waiting time exceeds a preset value, and the preset value can be 15 minutes, 20 minutes, 30 minutes, etc.
[0077] S303: The path planning device determines the total duration of the first candidate path for the first candidate path, and obtains multiple total durations.
[0078] The first alternative path is any one of the multiple alternative paths, and the total duration is the sum of the first travel duration and the second travel duration. The first travel duration is the travel duration of the user on the first alternative path, and the second travel duration is the travel duration of the user returning to the target node after starting from the target node and passing through the target point of interest. The target node is one of the multiple nodes, the target point of interest is of the same type as the point of interest to be visited by the user, and the distance between the target point of interest and the target node is less than or equal to the first threshold.
[0079] In one example, the path planning device can determine the first travel time according to a preset database.
[0080] In one example, when starting from a target node and passing through a target point of interest, the path planning device can determine the second travel time according to the user's travel mode and the distance between the target node and the target point of interest. For example, when the distance between the target node and the target point of interest is s, and the user's travel mode is walking, and the corresponding walking speed is x, the second travel time is s / x. When the user's travel mode is cycling, and the corresponding walking speed is y, the second travel time is s / y.
[0081] In some embodiments, the route planning device can also filter the target points of interest according to the business hours of the points of interest. For example, the route planning device can delete the points of interest that are not open at the current time.
[0082] S304: When the total duration of the first candidate path is the minimum value among multiple total durations, the path planning device determines the first candidate path as the target path.
[0083] As a possible implementation method, a comparator is provided inside the path planning device. After obtaining the total duration of each alternative path, the comparator can compare the total duration of each alternative path to determine whether the total duration of the first alternative path is the minimum among multiple total durations.
[0084] Furthermore, after determining the target path, the path planning device may send push information including the target path to the terminal device, so that a display in the terminal device displays the target path.
[0085] It should be noted that the push information may also include other candidate paths. For example, after obtaining the total duration of each candidate path, the path planning device may add the first three candidate paths with the smallest total duration to the push information.
[0086] In some embodiments, the target path can also be selected according to the user's preferences. For example, the target path can also be an alternative path with the least number of transfers, or can be an alternative path with the shortest walking time for the user. The user can also select the priority of public transportation, etc. For example, when the public transportation available to the user includes subways and buses, the priority of subways can be greater than the priority of buses.
[0087] In some other embodiments, the target path may also be the alternative path with the highest comprehensive score among the alternative paths. The comprehensive score is determined based on multiple factors and the weights corresponding to each factor. For example, when the multiple factors are total time, walking / riding time, and number of transfers, the weight corresponding to the total time is w1, the weight corresponding to the walking / riding time is w2, and the weight corresponding to the number of transfers is w3, if the total time of the first alternative path is x1, the walking / riding time is x2, and the number of transfers is x3, then the comprehensive score of the first alternative path is determined to be x1*w1+x2*w2+x2*w3. The path planning device can determine that the first alternative path is the target path when the comprehensive score of the first alternative path is the highest among multiple comprehensive scores.
[0088] The target path may also be an alternative path with the least number of transfers, or an alternative path with the shortest walking time for the user. The user may also select the priority of public transportation. For example, if the public transportation available to the user includes subways and buses, the priority of subways may be greater than the priority of buses.
[0089] Based on the technical solution provided by the embodiment of the present application, based on the technical solution provided by the embodiment of the present application, the path planning device can determine multiple alternative paths according to the starting point and the end point planned by the user, and can plan multiple routes for the user to reach the end point from the starting point, enriching the user's options, and determine the target node and the target point of interest in each alternative path according to the user's points of interest to be visited. In this way, after determining multiple alternative paths and the target points of interest in each alternative path, the path planning device can determine the travel time on each alternative path, and the travel time of the user returning to the target node after starting from the target node and passing through the target point of interest, determine the total time on each alternative path, and determine the alternative path corresponding to the minimum value of the multiple total times as the target path. Through this target path, the shortest alternative route can be determined when passing through the points of interest to be visited by the user, thereby improving the user's travel efficiency.
[0090] The points of interest to be visited by the user may include one point of interest and multiple points of interest. The following describes the case where the point of interest to be visited by the user is one point of interest and the case where the point of interest to be visited by the user is multiple points of interest.
[0091] 1. When the point of interest to be visited by the user is a point of interest, such as Figure 5 As shown, the path planning method of the present application may include the following S401-S403.
[0092] S401. For a first site in a first candidate path, if there is a point of interest to be visited by a user within a range less than or equal to a first threshold from the first site, the path planning device determines the first site as a target node.
[0093] The first station is the first station or the last station among the multiple public transportation stations included in the first alternative route.
[0094] The first threshold can be set as required, for example, 1 km or 2 km.
[0095] It should be noted that, in the case where both the first station and the last station have points of interest to be visited by the user, the path planning device can determine a first distance between the point of interest and the first station that is less than or equal to the first threshold, and a second distance between the point of interest and the last station that is less than or equal to the first threshold. In the case where the first distance is greater than the second distance, the path planning device can determine the last station as the target node. In the case where the first distance is greater than the second distance, the path planning device can determine the first station as the target node.
[0096] In one example, Figure 6 As shown, the range less than or equal to the first threshold from the first site may include 1 kilometer from the starting point, 1 kilometer from the first site, and a range extending 1 kilometer to both sides with the route between the starting point and the first site as the baseline.
[0097] In one example, Figure 7 As shown, the range within which the distance to the last station is less than or equal to the first threshold may include 1.5 kilometers from the last station, 1.5 kilometers from the end point, and a range extending 1.5 kilometers to both sides with the route between the end point and the last station as the baseline.
[0098] S402: If there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first site, and there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second site, the path planning device determines the second site as the target node.
[0099] The second site is any site between the first site and the last site.
[0100] In one example, Figure 8 As shown, the range less than or equal to the first threshold from the second site may include a range of 0.5 kilometers from the second site.
[0101] It should be noted that when there are points of interest to be visited by the user within the range of the first threshold of multiple second stations, the path planning device can determine the distance between each second station and the points of interest within the range of the first threshold of the second station, and determine the second station corresponding to the shortest distance as the target node.
[0102] S403: If there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first site and within a range less than or equal to the first threshold from the second site, the path planning device adjusts the first threshold.
[0103] The adjusted first threshold is greater than the first threshold before adjustment.
[0104] As a possible implementation, the path planning device may increase the size of the first threshold by a preset step length until there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second site. For example, the preset step length may be 0.1 km, or 0.05 km, etc., without limitation.
[0105] As another possible implementation, the path planning device may increase the first threshold by a preset multiple until there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second site. For example, the preset multiple may be 2 times, or 1.5 times, etc., without limitation.
[0106] In this way, the path planning device can determine that there is a point of interest to be visited by the user within the range of the first threshold of the first station, determine the first station as the target node, and only when it is determined that there is no point of interest to be visited by the user within the range of the first threshold of the first station, will it determine whether there is a point of interest to be visited by the user within the range of the first threshold of the second station. Because before taking a vehicle at the first station or after leaving a vehicle at the first station, the user can go to the point of interest to be visited without transferring, which reduces the time the user spends waiting for the vehicle and improves the user's travel efficiency.
[0107] Second, when the user's points of interest to be visited are multiple points of interest, such as Fig. 9 As shown, the path planning method of the present application may include the following S801-S802.
[0108] S801: When a first threshold range of a first node includes multiple points of interest, a path planning device determines the first node as a target node.
[0109] The first node is any one of the multiple nodes.
[0110] It should be noted that the priority of the first station is higher than that of the second station. For example, when each of the multiple points of interest is included within the first threshold range of the first station and the first threshold range of the second station, the path planning device determines the first station as the target node.
[0111] When the priorities of two or more nodes are the same, the path planning device can determine the travel time for the user to return to the node after starting from each node and passing through multiple points of interest, and determine the node corresponding to the shortest travel time as the target node. For example, when each of the multiple points of interest is included within the first threshold range of the first station and the first threshold range of the last station, if the travel time for the user to return to the first station after starting from the first station and passing through multiple points of interest is less than the travel time for the user to return to the first station after starting from the last station and passing through multiple points of interest, the path planning device determines the first station as the target node.
[0112] S802: When each of the multiple points of interest is not included within the first threshold range of the first node, the path planning device determines the combined node as the target node.
[0113] The combined node is a combination of multiple nodes, and the combined node includes each of the multiple points of interest.
[0114] As a possible implementation manner, the path planning device may determine multiple combination nodes, and determine the combination node including the least number of nodes among the multiple combination nodes as the target node.
[0115] For example, in the case where multiple combined nodes include combined node 1 and combined node 2, if the number of nodes included in combined node 1 is 3 and the number of nodes included in combined node 2 is 2, the path planning device can determine that combined node 2 is the target node.
[0116] As another possible implementation, the path planning device may preferentially determine a first combination node that includes the largest number of points of interest among the multiple points of interest, and determine a second combination node based on the first combination node, the second combination node being a node that includes the largest number of missing points of interest, where the missing points of interest are points of interest that are missing from the first combination node among the multiple points of interest to be visited by the user, and so on, until the combination node includes each type of point of interest to be visited by the user.
[0117] For example, if the number of multiple points of interest to be visited by the user is 5 (point of interest 1, point of interest 2, point of interest 3, point of interest 4, point of interest 5), the number of nodes of the alternative path is 3 (node 1, node 2, node 3), the first threshold range of node 1 includes points of interest 1, point of interest 2, and point of interest 3, the first threshold range of node 2 includes points of interest 1 and point of interest 4, and the first threshold range of node 3 includes points of interest 4 and point of interest 5. Then the path planning device can determine node 1 as the first combined node, determine node 3 as the second combined node, and the combined node corresponding to the first combined node and the second combined node is the target node.
[0118] In this way, the path planning device can prioritize the minimum number of nodes, including each point of interest to be visited by the user, which can minimize the number of transfers, reduce the user's waiting time for transportation, and improve the user's travel efficiency.
[0119] The various solutions in the above embodiments of the present application can be combined without contradiction.
[0120] The embodiment of the present application can divide the path planning device into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic, which is only a logical function division, and there may be other division methods in actual implementation.
[0121] In the case of dividing each functional module into corresponding functional modules, Fig.10 A schematic structural diagram of a path planning device is shown. The path planning device may be a terminal device or a chip applied to the terminal device. The path planning device may be used to execute the functions of the terminal device involved in the above embodiments. Fig.10 The path planning device shown may include: an acquisition unit 901 and a determination unit 902 .
[0122] The acquisition unit 901 is used to acquire the starting point, the end point and the points of interest to be visited by the user;
[0123] A determination unit 902 is used to determine a plurality of candidate paths according to a starting point and an end point, each candidate path includes a plurality of nodes, and the plurality of nodes include a starting point, an end point and a plurality of public transportation stations;
[0124] The determining unit 902 is further configured to determine the total duration of the first alternative path for the first alternative path, and obtain multiple total durations; the first alternative path is any one of the multiple alternative paths, the total duration is the sum of the first travel duration and the second travel duration, the first travel duration is the travel duration of the user on the first alternative path, and the second travel duration is the travel duration of the user starting from the target node and passing through the target point of interest and returning to the target node; the target node is one of the multiple nodes, the target point of interest is of the same type as the point of interest to be visited by the user, and the distance between the target point of interest and the target node is less than or equal to the first threshold;
[0125] The determining unit 902 is further configured to determine the first candidate path as the target path when the total duration of the first candidate path is a minimum value among multiple total durations.
[0126] In one possible design, the determination unit 902 provided in the embodiment of the present application is also used to: for the first station in the first alternative path, if there is a point of interest to be visited by the user within a range less than or equal to a first threshold from the first station, then determine the first station as the target node; wherein the first station is the first station or the last station among the multiple public transportation stations included in the first alternative path; if there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first station, and there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second station, then determine the second station as the target node; the second station is any station between the first station and the last station.
[0127] In one possible design, when there are multiple points of interest to be visited by the user, the determination unit 902 provided in the embodiment of the present application is also used to: if there are multiple points of interest within a range less than or equal to a first threshold from the first node, determine the first node as the target node; the first node is any one of the multiple nodes.
[0128] In one possible design, the path planning device provided in an embodiment of the present application also includes an adjustment unit 903, which is used to adjust the first threshold when there are no points of interest to be visited by the user within a range less than or equal to the first threshold from the first site and within a range less than or equal to the first threshold from the second site, and the adjusted first threshold is greater than the first threshold before adjustment.
[0129] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by a computer program to instruct the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be an internal storage unit of the path planning device (including a data sending end and / or a data receiving end) of any of the above embodiments, such as a hard disk or memory of the path planning device. The above computer-readable storage medium can also be an external storage device of the above terminal device, such as a plug-in hard disk equipped on the above terminal device, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. Further, the above computer-readable storage medium can also include both the internal storage unit of the above path planning device and an external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above path planning device. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0130] It should be noted that the terms "first" and "second" in the specification, claims and drawings of the present application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0131] It should be understood that in the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0132] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0133] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device 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 device, 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.
[0134] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0135] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0136] 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 readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0137] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A path planning method, characterized in that: The method comprises: Obtain the starting point, end point and points of interest that the user plans to visit; Determine a plurality of candidate paths according to the starting point and the end point, each candidate path comprising a plurality of nodes, the plurality of nodes comprising the starting point, the end point and a plurality of public transportation stations; For a first candidate path, determine the total duration of the first candidate path to obtain multiple total durations; the first candidate path is any one of the multiple candidate paths, the total duration is the sum of a first travel duration and a second travel duration, the first travel duration is the travel duration of the user on the first candidate path, and the second travel duration is the travel duration of the user starting from the target node and passing through the target point of interest and returning to the target node; the target node is one of the multiple nodes, the target point of interest is of the same type as the point of interest to be visited by the user, and the distance between the target point of interest and the target node is less than or equal to a first threshold; When the total duration of the first candidate path is the minimum value among the multiple total durations, the first candidate path is determined as the target path.
2. The method according to claim 1, characterized in that In the case where the point of interest to be visited by the user is a point of interest, the method further includes: For a first site in the first candidate path, if there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the first site, determining the first site as the target node; The first station is the first station or the last station among the multiple public transportation stations included in the first alternative route; If there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first site, and there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second site, the second site is determined to be the target node; the second site is any site between the first site and the last site.
3. The method according to claim 1, characterized in that In the case where the points of interest to be visited by the user are multiple points of interest, the method further includes: If the multiple interest points are included in a range less than or equal to the first threshold from the first node, the first node is determined to be the target node; the first node is any one of the multiple nodes.
4. The method according to claim 2, characterized in that: The method further comprises: If there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first site and within a range less than or equal to the first threshold from the second site, the first threshold is adjusted, and the adjusted first threshold is greater than the first threshold before adjustment.
5. A path planning device, characterized in that: The device comprises an acquisition unit and a determination unit; The acquisition unit is used to acquire the starting point and the end point planned by the user and the points of interest to be visited by the user; The determining unit is used to determine a plurality of candidate paths according to the starting point and the end point, each candidate path includes a plurality of nodes, and the plurality of nodes include the starting point, the end point and a plurality of public transportation stations; The determining unit is further configured to determine, for a first alternative path, a total duration of the first alternative path, and obtain multiple total durations; the first alternative path is any one of the multiple alternative paths, and the total duration is the sum of a first travel duration and a second travel duration, the first travel duration is the travel duration of the user on the first alternative path, and the second travel duration is the travel duration of the user starting from a target node and passing through a target point of interest and returning to the target node; The target node is one of the multiple nodes, the target point of interest is of the same type as the point of interest to be visited by the user, and the distance between the target point of interest and the target node is less than or equal to a first threshold; The determining unit is further configured to determine the first candidate path as the target path when the total duration of the first candidate path is a minimum value among the multiple total durations.
6. The device according to claim 5, characterized in that In the case that the point of interest to be visited by the user is a point of interest, the determining unit is further configured to: For a first site in the first candidate path, if there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the first site, determining the first site as the target node; The first station is the first station or the last station among the multiple public transportation stations included in the first alternative route; When there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first site, and there is a point of interest to be visited by the user within a range less than or equal to the first threshold from the second site, the second site is determined as the target node; the second site is any site between the first site and the last site.
7. The device according to claim 5, characterized in that In the case that the points of interest to be visited by the user are multiple points of interest, the determining unit is further configured to: In the case that the multiple interest points are included in a range less than or equal to the first threshold from a first node, the first node is determined to be the target node; the first node is any one of the multiple nodes.
8. The device according to claim 6, characterized in that The device also includes an adjustment unit: The adjustment unit is used to adjust the first threshold when there is no point of interest to be visited by the user within a range less than or equal to the first threshold from the first site and within a range less than or equal to the first threshold from the second site, and the adjusted first threshold is greater than the first threshold before adjustment.
9. A computer-readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 4 is implemented.
10. A path planning device, characterized in that: include: A processor, a memory and a communication interface; wherein the communication interface is used for the path planning device to communicate; The memory is used to store one or more programs, which include computer-executable instructions. When the path planning device is running, the processor executes the computer-executable instructions stored in the memory to enable the path planning device to perform the method described in any one of claims 1-4.
Citation Information
Patent Citations
Method and device for planning traffic paths
CN107202587A
Method and system for geographic search for public transportation commuters
US8600659B1