Route planning method and device
By dynamically planning new passenger travel sites in the online bus system, the problem of high computational complexity of traditional public transportation route planning systems is solved, and rapid and optimized route planning and driver-passenger matching are achieved.
Patent Information
- Application Number
- CN202411857330.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2044-12-16
AI Technical Summary
Traditional fixed route planning systems for public transportation cannot flexibly respond to changes in traffic conditions, resulting in high computational complexity and difficulty in meeting the needs of real-time dynamic public transportation route planning.
By obtaining new passenger travel requests, determining the matching online bus, and dynamically planning a new site sequence based on the distance and relative position relationship between the original site and the travel site, inserting the new passenger's travel site into the original driving route of the online bus near to reduce the calculation amount.
On the basis of meeting the needs of real-time dynamic planning, the calculation amount of new driving route planning of online buses is reduced, the speed of determining the target planned route is accelerated, and the optimal driver-passenger matching is achieved.
Smart Images

Figure CN119809070B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of route planning, and in particular to a route planning method and device. Background Art
[0002] With increasing urban traffic congestion, traditional fixed public transportation route planning systems are no longer able to meet the growing travel demand and are unable to flexibly respond to changing traffic conditions, resulting in low public transportation efficiency and long passenger wait times. To address these issues, dynamic public transportation has emerged. Dynamic public transportation route planning is a vehicle routing problem (VRP). The computational complexity of dynamic public transportation increases with the factorial complexity of the number of passengers, n. Each time a new passenger is added, the calculations must be recalculated, resulting in high computational complexity and difficulty meeting the needs of real-time dynamic public transportation route planning. Summary of the Invention
[0003] In view of this, an embodiment of the present invention provides a route planning method and device to determine a new station sequence based on the distance and relative position relationship between the new passenger's travel stations and some of the original stations, and insert the newly added passenger's travel stations into the original travel route of the online bus as close as possible. On the basis of meeting the needs of real-time dynamic planning of the online bus route, the computational complexity of planning the new route of the online bus is reduced.
[0004] In a first aspect, an embodiment of the present invention provides a route planning method, the method comprising:
[0005] Acquire a new passenger travel request, where the new passenger travel request includes a travel destination;
[0006] Determining at least one online-hailing bus that matches the new passenger travel request;
[0007] Determine the original station sequence corresponding to each of the online-hailing buses, where the original station sequence is a sequence consisting of original stations that the online-hailing bus has not passed through;
[0008] Determining, based on distances between at least some of the original sites and the travel sites, relevant sites in each of the original site sequences corresponding to the travel sites;
[0009] Determining at least one first candidate site sequence according to the relative position relationship between each of the travel sites and the corresponding related sites;
[0010] A target planning route is determined based on at least one of the first candidate site sequences.
[0011] In a second aspect, an embodiment of the present invention provides a route planning device, the device comprising:
[0012] An acquisition module, configured to acquire a new passenger travel request, wherein the new passenger travel request includes a travel destination;
[0013] A first determining module is configured to determine at least one online-hailing bus that matches the new passenger's travel request;
[0014] A second determining module is configured to determine a sequence of original stops corresponding to each of the online-hailing buses, wherein the sequence of original stops is a sequence of stops that the online-hailing bus has not passed through;
[0015] a third determining module, configured to determine, based on distances between at least some of the original stations and the travel stations, relevant stations in each of the original station sequences corresponding to the travel stations;
[0016] a fourth determining module, configured to determine at least one first candidate site sequence according to a relative position relationship between each of the travel sites and the corresponding related sites;
[0017] A fifth determination module is used to determine a target planned route based on at least one of the first candidate site sequences.
[0018] According to a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in the first aspect above.
[0019] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0020] In a fifth aspect, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the method described in the first aspect above.
[0021] An embodiment of the present invention includes obtaining a new passenger travel request, wherein the new passenger travel request includes a travel stop, determining at least one online-hailing bus that matches the new passenger travel request, determining an original stop sequence corresponding to each of the online-hailing buses, wherein the original stop sequence is a sequence composed of original stops that the online-hailing bus has not passed through, and determining the relevant stops corresponding to the travel stops in each of the original stop sequences based on the distance between at least some of the original stops and the travel stops, determining at least one first candidate stop sequence based on the relative position relationship between each of the travel stops and the corresponding relevant stops, and determining a target planned route based on at least one of the first candidate stop sequences. This embodiment determines a new stop sequence based on the distance and relative position relationship between the new passenger's travel stop and some of the original stops, and can insert the travel stop of the newly added passenger into the original route of the online-hailing bus as close as possible. On the basis of meeting the needs of real-time dynamic planning of the online-hailing bus route, the computational complexity of the new route planning of the online-hailing bus is reduced, and the speed of determining the target planned route is accelerated. At the same time, the target planned route is determined based on the stop sequences of multiple online-hailing buses, and optimal driver-passenger matching can also be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0023] Figure 1 This is a system block diagram of the online bus-hailing service system according to an embodiment of the present invention;
[0024] Figure 2 is a flow chart of a route planning method according to an embodiment of the present invention;
[0025] Figure 3 This is a flow chart of a method for determining an online bus booking method according to an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of the relative positions of an online-hailing bus and a boarding station according to an embodiment of the present invention;
[0027] Figure 5 A schematic diagram of inserting the original site sequence into the relevant sites of an embodiment of the present invention;
[0028] Figure 6 This is a flow chart of a method for determining a target planning route according to an embodiment of the present invention;
[0029] Figure 7 is a flow chart of a route planning method according to an embodiment of the present invention;
[0030] Figure 8 is a schematic diagram of a route planning device according to an embodiment of the present invention;
[0031] Figure 9FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The present application is described below based on the following embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without the description of these details. To avoid obscuring the essence of the present application, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0033] Furthermore, persons of ordinary skill in the art will appreciate that the figures provided herein are for illustration purposes only and are not necessarily drawn to scale.
[0034] Unless the context clearly requires otherwise, words like “include”, “comprising” and the like throughout this application should be interpreted as including rather than exclusive or exhaustive; that is, as meaning “including but not limited to”.
[0035] In the description of this application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.
[0036] Where the solutions described in this specification and in the examples involve the processing of personal information, such processing will be conducted with a legitimate basis (e.g., with the consent of the personal information subject or as necessary for the performance of a contract) and only within the prescribed or agreed scope. A user's refusal to process personal information other than that required for basic functions will not affect the user's use of these basic functions.
[0037] Figure 1 FIG is a system block diagram of the online bus booking service system according to an embodiment of the present invention. Figure 1 As shown, the online bus booking service system of this embodiment includes a server 1, a passenger terminal 2, and a driver terminal 3. The server 1, the passenger terminal 2, and the driver terminal 3 are connected to each other through a network 4 to realize the interaction of information and data. It should be understood that although Figure 1 Only a certain number of servers 1, passenger terminals 2 and driver terminals 3 are shown, but this does not mean that their respective numbers are limited. The system can include multiple servers 1, passenger terminals 2 and driver terminals 3.
[0038] Server 1 should be understood as a device that provides data processing, database, and communication facilities. For example, server 1 may refer to a single physical server with associated communication data storage and database facilities, or may refer to a collection of networked or clustered processors, associated network and storage devices, and operates software and one or more database systems and application software that supports the services provided by the server. Server 1 can be a monolithic server or a distributed server across multiple computers or computer data centers, or it can be various types of cloud servers. In some embodiments, each server may include hardware, software, or embedded logic components for performing appropriate functions supported or implemented by the server, or a combination of two or more such components.
[0039] The passenger terminal 2 and the driver terminal 3 are communication terminals capable of running computer programs. These communication terminals can be terminal devices such as mobile phones, tablet computers, PDAs, wearable devices, and vehicle-mounted terminals integrated with vehicles. Both the passenger terminal 2 and the driver terminal 3 have a communication module that can perform wired or wireless communication. In some embodiments, the passenger terminal 2 and the driver terminal 3 include at least one remote communication module, such as a communication circuit for WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. The passenger terminal 2 and the driver terminal 3 also have a display device and an input device. The display device can be a liquid crystal display, an LED display, or a projection device. The input device can include, for example, a touch screen, a button, a pressure sensor, etc. The passenger terminal 2 and the driver terminal 3 receive instructions from the passenger through the input device and interact with the passenger or the driver through the display device.
[0040] The passenger client 21 can run on the passenger terminal 2. The driver client 31 can run on the driver terminal 3. Meanwhile, the server 1 runs a server application 11. The server 1, the passenger terminal 2, and the driver terminal 3 can communicate via a network 4. In some application scenarios, a passenger can issue a travel request by operating the passenger client 21. The server 1 receives the travel request and matches a suitable driver terminal 3 based on, for example, the location information reported by the driver terminal 3 and the location information of the passenger's travel request. The server 1 then sends the travel request to one or more matching driver terminals 3. This can then generate a ride order.
[0041] The online bus service of this embodiment differs somewhat from existing online ride-hailing services. Existing online ride-hailing services typically do not have fixed stops. Instead, online ride-hailing vehicles cruise within a specific area of a city. Server 1 matches passenger travel requests based on the location of the online ride-hailing vehicle, creates a ride order, and sends the passenger's selected boarding location to the driver. The driver then picks up and drops off the passenger at the selected boarding and drop-off locations based on the ride order. In this service, the boarding and drop-off locations are selected by the passenger through the passenger client and can be any location accessible by the online ride-hailing vehicle. This service offers the same flexible, personalized service as a taxi, allowing passengers to enjoy door-to-door travel. However, like taxis, this type of online ride-hailing service is relatively expensive. To reduce prices, carpooling services have emerged. This involves multiple, unknown passengers sending carpooling service requests to a server. The server then matches these requests, converting multiple requests for rides along the same route into a carpooling service task and assigning it to a specific online ride-hailing vehicle driver. The driver then sequentially picks up and drops off multiple passengers to different locations based on the carpooling service task. Ride-sharing services significantly reduce prices and improve vehicle utilization. However, the selection and determination of pick-up and drop-off points for ride-sharing services remain the same as for online ride-hailing services; passengers still select them. Ride-hailing platforms only recommend several locations with high pick-up or drop-off frequency within the area to assist passengers in selecting a pick-up location.
[0042] However, there remains a need to further reduce travel costs, as well as to enjoy more flexible and convenient travel services than existing public transportation while maintaining lower prices. This demand has led to the emergence of online bus-hailing services. These services operate at fixed stops and incorporate the logic of existing ride-sharing services. However, they differ from existing bus services, which are based on distinct bus routes, each operating on a completely fixed route. Online bus-hailing services generate ride orders based on user requests, inheriting the online initiation mechanism of ride-hailing and ride-sharing services. Furthermore, online bus-hailing services limit boarding and alighting locations to fixed stops whenever possible. The advantage of fixed stops is that they offer a higher probability of picking up and dropping off multiple passengers at once, improving efficiency. Furthermore, with fixed stops, passengers can initiate their requests online or directly at fixed stops by scanning a QR code. Furthermore, online bus-hailing services retain a high degree of flexibility, with servers able to match ride orders based on the location of the requesting passenger, using a similar logic to ride-sharing. Furthermore, online-hailing buses do not operate on fixed routes throughout the day and at all times. Instead, they operate around the city, covering multiple stops, retaining the flexibility of online-hailing and taxi services. Furthermore, in certain modes, online-hailing bus routes can dynamically change during travel, demonstrating a high degree of intelligence and the ability to meet passengers' travel needs with exceptional efficiency.
[0043] exist Figure 1 In the online bus-hailing business system shown, in a typical example, the passenger terminal 2 can initiate a passenger travel request to the server 1 through the passenger client 21. The passenger travel request can include the passenger's selected boarding station and alighting station (both are fixed stations). The server 1 can match and send the corresponding ride task to the driver terminal 3 of the online bus running around the boarding station to the near-boarding station to form a ride order. The driver terminal 3 guides the online bus to the boarding station through the driver client 31, and sends the passenger to the alighting station along the predetermined route through multiple fixed stations. During this process, the driver terminal 3 of the online bus is still in the order-accepting state, and can continuously match new passenger travel requests, pick up passengers at the corresponding boarding station and send them to the alighting station. The server 1 can plan the route of the online bus in real time based on the actual distribution of the received passenger travel requests, so that the online bus runs between different stations to pick up passengers according to the planned route.
[0044] This embodiment is used to enable server 1 to match at least one suitable online-hailing bus for a new passenger when it receives a travel request, then replan the route of the online-hailing bus, recall multiple replanned routes, and perform optimal driver-passenger matching to determine the target planned route.
[0045] Figure 2 FIG. 1 is a flow chart of a route planning method according to an embodiment of the present invention. Figure 2 As shown, the route planning method includes the following steps:
[0046] Step S201: Obtain a new passenger travel request.
[0047] Among them, new passenger travel requests refer to new passenger travel requests that appear when the online bus starts operating. New passenger travel requests contain all information used to ensure the smooth operation of passenger travel services, such as the passenger's location, departure place, destination, travel time, itinerary preferences, etc. This information meets relevant security and privacy requirements.
[0048] In one possible implementation, a new passenger travel request includes at least travel stops, which include stops that the passenger will pass through during their trip, such as boarding stops, alighting stops, and / or transit stops. Transit stops are stops that the passenger must pass through during their desired travel route. Transit stops are important for route planning. To simplify the description, the following example will assume that travel stops only include boarding stops and alighting stops. However, it should be understood that travel stops can also include important stops such as transit stops. When these important stops are included, the processing is similar to that for alighting stops and will not be further elaborated here.
[0049] In one possible implementation, the boarding and alighting stops are selected by the passenger based on the passenger client 21. Specifically, when the passenger operates the passenger client 21, the passenger client 21 displays recommended stops, and the passenger selects the boarding and alighting stops from the recommended stops. The passenger client 21 then sends a new passenger travel request containing the travel stops to the server.
[0050] Optionally, when the passenger operates the passenger client 21 to input the desired boarding point, the server 1 or the passenger terminal 2 determines the corresponding recommended boarding station based on the desired boarding point, so that the passenger client 21 displays the recommended boarding station, and the passenger selects the boarding station from the recommended boarding stations. The method for determining the boarding station is the same as the boarding station.
[0051] Optionally, when the passenger operates the passenger client 21 to input the desired boarding point, the server 1 or the passenger terminal 2 directly uses the desired boarding point as the boarding station, and the alighting station is determined in the same manner as the boarding station.
[0052] Step S202: Determine at least one online-booked bus that matches the new passenger's travel request.
[0053] Figure 3 The present invention is a flowchart of a method for determining an online bus hailing service according to an embodiment of the present invention. Figure 4Schematic diagram of the relative positions of online bus booking and boarding stations according to an embodiment of the present invention. Figure 4 right Figure 3 The method shown is explained below. Figure 3 As shown, the online bus booking method includes the following steps:
[0054] Step S301, determining the vehicle location and travel direction of the online-hailing bus.
[0055] The vehicle position is also the location of the online-hailing bus, and the current driving direction of the online-hailing bus can be as follows: Figure 4 The direction shown is when the online bus is traveling from the location of the online bus to the next original stop, or it can also be the direction when the online bus is traveling to the original stop closest to the boarding stop.
[0056] Step S302: Determine the relative position relationship between the vehicle position and the boarding location.
[0057] The relative position relationship may include the distance and / or direction between the vehicle position and the boarding station.
[0058] Step S303: Determine at least one online-hailing bus that matches the new passenger's travel request based on the driving direction and the relative position relationship.
[0059] In one possible implementation, the angle α between the travel direction of any online-hailing bus and the direction from the boarding station to the vehicle location is determined, and it is judged whether the angle α is within a preset angle threshold. If it is within the preset angle threshold, it is determined that the online-hailing bus matches the travel request of the new passenger.
[0060] In one possible implementation, the distance L between any online-hailing bus and the boarding station is determined, and it is judged whether the distance L is within a first preset length threshold. If it is within the first preset length threshold, it is determined that the online-hailing bus matches the travel request of the new passenger.
[0061] In one possible implementation, the original station closest to the boarding station among the original stations corresponding to any online-hailing bus is determined, and the distance D between the boarding station and the original station closest to it is determined, and it is judged whether the distance D is within a second preset length threshold. If it is within the second preset length threshold, it is determined that the online-hailing bus matches the travel request of the new passenger.
[0062] In a possible implementation, online car-hailing matching judgment can also be made based on multiple items of the angle α, distance L, and distance D.
[0063] It is worth noting that for each travel station, there is at least one corresponding related station in the original station sequence.
[0064] Step S203, determining the original station sequence corresponding to each of the online-hailing buses, wherein the original station sequence is a sequence composed of the original stations that the online-hailing bus has not passed through.
[0065] Specifically, a sequence of original stops that have not been visited in the predetermined route corresponding to each online-hailing bus is determined.
[0066] Step S204 : determining, based on the distances between at least some of the original stations and the travel stations, the relevant stations corresponding to the travel stations in each of the original station sequences.
[0067] In one possible implementation, based on the distance between at least part of the original site and the boarding station, the first related site corresponding to the boarding station in each original site sequence is determined. At the same time, based on the distance between at least part of the original site and the boarding station, the second related site corresponding to the boarding station in each original site sequence is determined.
[0068] Specifically, the distance between at least some of the original stations and the boarding station is determined, and then the original stations whose distances meet a first distance threshold are determined as related stations corresponding to the boarding station, i.e., first related stations. The distance between at least some of the original stations and the alighting station is determined, and then the original stations whose distances meet a second distance threshold are determined as related stations corresponding to the alighting station, i.e., second related stations. The first distance threshold and the second distance threshold can be the same or different.
[0069] Step S205: determining at least one first candidate site sequence according to the relative position relationship between each of the travel sites and the corresponding related sites.
[0070] The relative position relationship includes the travel station being located before the relevant station and the travel station being located after the relevant station. Specifically, the boarding station can be located before or after the first relevant station, and the alighting station can be located before or after the second relevant station. The location selection of the boarding station and the location selection of the alighting station can be cross-matched to obtain a first candidate station sequence corresponding to different arrangements.
[0071] Specifically, at least one first candidate site sequence is determined based on the relative position relationship between the boarding site and the first related site, and the relative position relationship between the alighting site and the second related site.
[0072] Figure 5 Schematic diagram of inserting the original site sequence into the relevant sites of the embodiment of the present invention. Figure 5As shown, there are four ways to insert relevant stations into the original station sequence. The first is to insert the boarding station a into the pre-sequence position of the first relevant station A, and insert the alighting station b into the pre-sequence position of the second relevant station B. The second is to insert the boarding station a into the post-sequence position of the first relevant station A, and insert the alighting station b into the pre-sequence position of the second relevant station B. The third is to insert the boarding station a into the pre-sequence position of the first relevant station A, and insert the alighting station b into the post-sequence position of the second relevant station B. The fourth is to insert the boarding station a into the post-sequence position of the first relevant station A, and insert the alighting station b into the post-sequence position of the second relevant station B.
[0073] It is worth noting that Figure 5 The premise for inserting the related sites shown in the original site sequence is that there is only one first related site and second related site in the original site sequence. It should be understood that although Figure 5 Only one first related site and one second related site are shown, but this does not mean that their numbers are limited. In this embodiment, there may be multiple first related sites and multiple second related sites in the original site sequence.
[0074] In a possible implementation, the travel stations and all original stations in the original station sequence may be combined into a new station combination to be sorted, and then the stations in the station combination to be sorted may be sorted using a nearest neighbor algorithm to determine the corresponding first candidate station sequence.
[0075] Optionally, a new combination of sites to be sorted is formed based on each of the original site sequences, the boarding sites and the alighting sites, and the first candidate site sequence corresponding to each of the site combinations to be sorted is determined using a nearest neighbor algorithm with the boarding site as the starting point.
[0076] Optionally, a new combination of sites to be sorted is formed based on each of the original site sequences, the boarding sites and the alighting sites, and the vehicle position of each of the online-hailing buses is determined. Taking the vehicle position as the starting point, the nearest neighbor algorithm is used to determine the first candidate site sequence corresponding to each of the site combinations to be sorted.
[0077] Optionally, a greedy algorithm and a nearest neighbor algorithm may be used to determine the first candidate site sequence corresponding to each combination of sites to be sorted.
[0078] Step S206: determining a target planned route based on at least one of the first candidate site sequences.
[0079] Figure 6 Flowchart of the target planning route determination method according to an embodiment of the present invention. Figure 6 As shown, the target planning route determination method includes the following steps:
[0080] Step S601: Determine the travel cost corresponding to each of the first candidate site sequences.
[0081] The travel cost includes at least one of the route start-end distance, route length, travel time and passenger waiting time.
[0082] Specifically, the method for determining the route start-end distance is: determine the geographical location of each original site in the first candidate site sequence, and determine the route start-end distance based on the geographical location of the first original site and the geographical location of the last original site in the first candidate site sequence. The route start-end distance can be the straight-line distance or Manhattan distance between the first original site and the last original site.
[0083] The method for determining the route length is as follows: determining the corresponding route length according to the geographical location of each original site in the first candidate site sequence, that is, determining the distance between each two adjacent sites in the first candidate site sequence in turn, and then summing them up to obtain the total length of the route.
[0084] The method for determining the travel time is: determining the travel time based on the route length and the average travel speed of the online bus.
[0085] The method for determining the passenger waiting time is as follows: determining the distance between the geographic location of the online-hailing bus and the boarding station, and determining the passenger waiting time based on the distance and the average travel speed of the online-hailing bus. Specifically, multiple stations between the geographic location of the online-hailing bus and the boarding station are determined, the distance between each two adjacent stations is determined, and the sum of the distances is used to obtain the route length from the online-hailing bus to the boarding station. The passenger waiting time is then determined based on the route length and the average travel speed.
[0086] Step S602: Determine a target site sequence from the first candidate site sequence according to the travel cost.
[0087] Specifically, the first candidate site sequence with the lowest travel cost may be determined as the target site sequence.
[0088] In a possible implementation, the first candidate site sequence may be screened multiple times according to different travel costs to determine the target site sequence, thereby reducing the amount of data processing.
[0089] Specifically, each new passenger travel request can match multiple online-hailing buses, and each new passenger travel request also corresponds to multiple travel stations, such as boarding stations, alighting stations, transit stations, and other important stations. Each online-hailing bus's original station sequence can also have multiple related stations corresponding to the travel station. For example, the original station sequence can have multiple related stations corresponding to the boarding station, and multiple related stations corresponding to the alighting station. Each related station has two relative positional relationships with the corresponding travel station. The positions of the various related stations are combined to generate multiple first candidate station sequences. Therefore, the number of first candidate station sequences may be large, and therefore, they can be screened in a hierarchical manner to reduce the amount of data processing.
[0090] For example, the second candidate site sequence can be determined from the first candidate site sequence based on the route start-end distances corresponding to each of the first candidate site sequences, and then the target site sequence can be determined from the second candidate site sequence based on the route length, the travel time and the passenger waiting time.
[0091] Since the calculation amount of the route start-end distance is relatively small, the route start-end distance can be used for the first round of screening, and then the target site sequence is determined from the second candidate site sequence obtained by screening based on other travel costs.
[0092] In addition, you can also choose other travel costs for the first round of screening, which are not listed here exhaustively.
[0093] Step S603: determining a target planned route corresponding to the target site sequence.
[0094] Specifically, the target planning route is determined according to the order of the sites in the target site sequence and the geographical locations of the sites.
[0095] Figure 2 The method shown is a route planning method for a single new passenger travel request. In actual situations, the online bus service system will receive a large number of new passenger travel requests. If multiple new passenger travel requests match different online buses, they can be processed separately. If multiple new passenger travel requests match the same online bus, multiple rounds of processing will be performed in sequence. The processing order can be chronological order or the order of the first related station in the original station sequence, etc.
[0096] The method of an embodiment of the present invention includes obtaining a travel request from a new passenger, wherein the travel request from the new passenger includes a travel stop, determining at least one online-hailing bus that matches the travel request from the new passenger, determining an original stop sequence corresponding to each of the online-hailing buses, wherein the original stop sequence is a sequence composed of original stops that the online-hailing bus has not passed through, and determining the relevant stops corresponding to the travel stops in each of the original stop sequences based on the distance between at least some of the original stops and the travel stops, determining at least one first candidate stop sequence based on the relative position relationship between each of the travel stops and the corresponding relevant stops, and determining a target planned route based on at least one of the first candidate stop sequences. This embodiment determines a new stop sequence based on the distance and relative position relationship between the new passenger's travel stop and some of the original stops, and can insert the travel stop of the newly added passenger into the original route of the online-hailing bus as close as possible. On the basis of meeting the needs of real-time dynamic planning of the online-hailing bus's travel route, the computational complexity of the new route planning of the online-hailing bus is reduced, and the speed of determining the target planned route is accelerated. At the same time, the target planned route is determined based on the stop sequences of multiple online-hailing buses, and optimal driver-passenger matching can also be achieved.
[0097] Figure 7 FIG. 1 is a flow chart of a route planning method according to an embodiment of the present invention. Figure 7 As shown, the route planning method includes the following steps:
[0098] Step S701: Obtain a new passenger travel request.
[0099] The new passenger travel request includes travel stops, and the travel stops include at least a boarding stop and an alighting stop.
[0100] Step S702: Determine at least one online-booked bus that matches the new passenger's travel request.
[0101] Step S703: Determine the original station sequence corresponding to each of the online-hailing buses, where the original station sequence is a sequence consisting of the original stations that the online-hailing bus has not passed through.
[0102] Step S704: determining a first related site corresponding to the boarding site in each of the original site sequences based on the distances between at least part of the original sites and the boarding site.
[0103] Step S705: determining a second related site corresponding to the getting-off site in each of the original site sequences based on the distances between at least part of the original sites and the getting-off site.
[0104] Step S706: Determine at least one first candidate site sequence based on the relative position relationship between the boarding site and the first related site, and the relative position relationship between the alighting site and the second related site.
[0105] Among them, the relative position relationship between the boarding station and the first related station includes the boarding station being located at the front position of the corresponding related station and the boarding station being located at the back position of the corresponding related station, and the relative position relationship between the alighting station and the second related station includes the alighting station being located at the front position of the corresponding related station and the alighting station being located at the back position of the corresponding related station.
[0106] Step S707: construct a new combination of stations to be sorted according to the original station sequences, the boarding stations and the alighting stations.
[0107] Step S708 : Taking the boarding station as a starting point, a nearest neighbor algorithm is used to determine a first candidate station sequence corresponding to each combination of stations to be sorted.
[0108] Step S709: Determine the vehicle location of each of the online-hailing buses.
[0109] Step S710 : Taking the vehicle position as a starting point, a nearest neighbor algorithm is used to determine a first candidate site sequence corresponding to each combination of sites to be sorted.
[0110] Step S711 : determining a second candidate site sequence from the first candidate site sequences according to the route start-end distances corresponding to the first candidate site sequences.
[0111] Step S712: Determine the target site sequence from the second candidate site sequence based on the route length, the travel time, and the passenger waiting time.
[0112] Step S713: Determine the target planned route corresponding to the target site sequence.
[0113] The specific implementation process of the above steps S701 to S713 is as described in the above embodiment and will not be repeated here.
[0114] This embodiment determines a new station sequence based on the distance and relative position relationship between the new passenger's travel station and some of the original stations. The travel station of the newly added passenger can be inserted into the original travel route of the online bus as close as possible. On the basis of meeting the needs of real-time dynamic planning of the online bus route, the calculation amount of the new travel route planning of the online bus is reduced, and the speed of determining the target planned route is accelerated. At the same time, the target planned route is determined based on the station sequences of multiple online buses, and the optimal driver-passenger matching can also be achieved.
[0115] Figure 8 Schematic diagram of a route planning device according to an embodiment of the present invention. Figure 8 As shown, the route planning device includes:
[0116] The acquisition module 801 is used to acquire a new passenger travel request, where the new passenger travel request includes a travel stop.
[0117] The first determination module 802 is used to determine at least one online-hailing bus that matches the travel request of the new passenger.
[0118] The second determination module 803 is used to determine the original station sequence corresponding to each of the online-hailing buses, where the original station sequence is a sequence composed of the original stations that the online-hailing bus has not passed through.
[0119] The third determining module 804 is configured to determine, based on distances between at least some of the original stations and the travel stations, relevant stations in each original station sequence corresponding to the travel stations.
[0120] The fourth determining module 805 is configured to determine at least one first candidate site sequence according to the relative position relationship between each of the travel sites and the corresponding related sites.
[0121] The fifth determining module 806 is configured to determine a target planned route according to at least one of the first candidate site sequences.
[0122] The device of an embodiment of the present invention is used to perform the following operations: obtaining a new passenger travel request, the new passenger travel request including a travel stop, determining at least one online-hailing bus matching the new passenger travel request, determining an original stop sequence corresponding to each of the online-hailing buses, the original stop sequence being a sequence of original stops that the online-hailing bus has not passed through, determining the relevant stops corresponding to the travel stops in each of the original stop sequences based on the distance between at least some of the original stops and the travel stop, determining at least one first candidate stop sequence based on the relative positional relationship between each of the travel stops and the corresponding relevant stops, and determining a target planned route based on at least one of the first candidate stop sequences. The device of this embodiment determines a new stop sequence based on the distance and relative positional relationship between the new passenger's travel stop and some of the original stops, and can insert the travel stop of the newly added passenger into the original route of the online-hailing bus as close as possible. On the basis of meeting the needs of real-time dynamic planning of the online-hailing bus's route, the computational complexity of the new route planning of the online-hailing bus is reduced, and the speed of determining the target planned route is accelerated. At the same time, the target planned route is determined based on the stop sequences of multiple online-hailing buses, and optimal driver-passenger matching can also be achieved.
[0123] Figure 9 FIG is a schematic diagram of an electronic device according to an embodiment of the present invention. Figure 9 As shown, Figure 9The electronic device shown is a route planning device, which includes a general computer hardware structure, including at least a processor 901 and a memory 902. The processor 901 and the memory 902 are connected via a bus 903. The memory 902 is suitable for storing instructions or programs executable by the processor 901. The processor 901 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 901 executes the instructions stored in the memory 902, thereby performing the method flow of the embodiment of the present invention described above to process data and control other devices. The bus 903 connects the above-mentioned multiple components together and also connects them to the display controller 904 and the display device as well as the input / output (I / O) device 905. The input / output (I / O) device 905 can be a mouse, keyboard, modem, network interface, touch input device, somatosensory input device, printer, and other devices known in the art. Typically, the input / output device 905 is connected to the system via an input / output (I / O) controller 906.
[0124] It will be understood by those skilled in the art that the embodiments of the present application may be provided as methods, devices (equipment), or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0125] The present application is described with reference to flowcharts of methods, apparatuses (devices), and computer program products according to embodiments of the present application. It should be understood that each process in the flowcharts can be implemented by computer program instructions.
[0126] These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.
[0127] These computer program instructions can also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the instructions for implementing the process Figure 1 A device that specifies functions in a process or multiple processes.
[0128] An embodiment of the present invention includes obtaining a new passenger travel request, wherein the new passenger travel request includes a travel stop, determining at least one online-hailing bus that matches the new passenger travel request, determining an original stop sequence corresponding to each of the online-hailing buses, wherein the original stop sequence is a sequence composed of original stops that the online-hailing bus has not passed through, and determining the relevant stops corresponding to the travel stops in each of the original stop sequences based on the distance between at least some of the original stops and the travel stops, determining at least one first candidate stop sequence based on the relative position relationship between each of the travel stops and the corresponding relevant stops, and determining a target planned route based on at least one of the first candidate stop sequences. This embodiment determines a new stop sequence based on the distance and relative position relationship between the new passenger's travel stop and some of the original stops, and can insert the travel stop of the newly added passenger into the original route of the online-hailing bus as close as possible. On the basis of meeting the needs of real-time dynamic planning of the online-hailing bus route, the computational complexity of the new route planning of the online-hailing bus is reduced, and the speed of determining the target planned route is accelerated. At the same time, the target planned route is determined based on the stop sequences of multiple online-hailing buses, and optimal driver-passenger matching can also be achieved.
[0129] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used to enable a computer to execute part or all of the above method embodiments.
[0130] Another embodiment of the present invention relates to a computer program product, comprising a computer program / instruction, which implements part or all of the above method embodiments when executed by a processor.
[0131] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by specifying relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0132] The foregoing is merely a preferred embodiment of the present application and is not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application are intended to be within the scope of protection of the present application.
Claims
1. A route planning method, characterized in that: The method comprises: Acquire a new passenger travel request, where the new passenger travel request includes a travel destination; Determining at least one online-hailing bus that matches the new passenger travel request; Determine the original station sequence corresponding to each of the online-hailing buses, where the original station sequence is a sequence consisting of original stations that the online-hailing bus has not passed through; Determining, based on distances between at least some of the original sites and the travel sites, relevant sites in each of the original site sequences corresponding to the travel sites; Determining at least one first candidate site sequence based on a relative position relationship between each of the travel sites and the corresponding related site, wherein the relative position relationship indicates whether the travel site is located at a preceding position or a subsequent position of the related site; Determining a target planning route based on at least one of the first candidate site sequences; The travel site, the original site and the related site are all fixed sites; The method further comprises: In response to the existence of multiple new passenger travel requests and the multiple new passenger travel requests matching the same online bus, the new passenger travel requests are processed in sequence according to the chronological order or the order of the relevant stations in the original station sequence.
2. The method according to claim 1, characterized in that The travel site includes at least a boarding site; The determining of at least one online-hailing bus that matches the new passenger's travel request includes: Determine the vehicle location and travel direction of the online-hailing bus; Determining the relative position relationship between the vehicle position and the boarding location; At least one online-hailing bus that matches the new passenger's travel request is determined based on the driving direction and the relative position relationship.
3. The method according to claim 1, characterized in that The travel site includes at least a boarding site and an alighting site; The determining, based on the distances between at least some of the original stations and the travel stations, the relevant stations corresponding to the travel stations in each of the original station sequences includes: Determining a first related site corresponding to the boarding site in each of the original site sequences based on distances between at least some of the original sites and the boarding site; Based on the distance between at least part of the original stations and the alighting station, a second related station corresponding to the alighting station in each original station sequence is determined.
4. The method according to claim 3, characterized in that The relative position relationship includes the travel station being located at a preceding position of the relevant station and the travel station being located at a subsequent position of the relevant station.
5. The method according to claim 4, characterized in that The determining of at least one first candidate site sequence according to the relative position relationship between each of the travel sites and the corresponding related sites includes: At least one first candidate site sequence is determined based on the relative position relationship between the boarding site and the first related site, and the relative position relationship between the alighting site and the second related site.
6. The method according to claim 1, characterized in that The determining of a target planning route according to at least one of the first candidate site sequences includes: Determine a travel cost corresponding to each of the first candidate site sequences, where the travel cost includes at least one of a route start-end distance, a route length, a travel time, and a passenger waiting time; determining a target site sequence from the first candidate site sequence according to the travel cost; Determine a target planning route corresponding to the target site sequence.
7. The method according to claim 6, characterized in that The determining of the travel costs corresponding to each of the first candidate site sequences includes: Determining the geographical location of each original site in each of the first candidate site sequences; Determining the route start-to-end distance based on the geographical location of the first original site and the geographical location of the last original site in the first candidate site sequence; Determining the corresponding route length according to the geographical location of each original site in each of the first candidate site sequences; Determining the travel time based on the route length and the average travel speed of the online-hailing bus; Determine the distance between the geographic location of the online bus and the boarding station; The passenger waiting time is determined based on the distance and the average travel speed of the online-hailing bus.
8. The method according to claim 6, characterized in that Determining a target site sequence from the first candidate site sequence according to the travel cost includes: determining a second candidate site sequence from the first candidate site sequences according to the route start-end distances corresponding to the first candidate site sequences; The target site sequence is determined from the second candidate site sequence according to the route length, the travel time, and the passenger waiting time.
9. The method according to claim 3, characterized in that The method further comprises: According to each of the original station sequences, the boarding stations and the alighting stations, a new station combination to be sorted is formed; Determining the vehicle location of each of the online-hailing buses; Taking the vehicle position and the boarding station as starting points respectively, a nearest neighbor algorithm is used to determine a first candidate station sequence corresponding to each combination of stations to be sorted.
10. A route planning device, characterized in that: The device comprises: An acquisition module, configured to acquire a new passenger travel request, wherein the new passenger travel request includes a travel destination; A first determining module is configured to determine at least one online-hailing bus that matches the new passenger's travel request; A second determining module is configured to determine a sequence of original stops corresponding to each of the online-hailing buses, wherein the sequence of original stops is a sequence of stops that the online-hailing bus has not passed through; a third determining module, configured to determine, based on distances between at least some of the original stations and the travel stations, relevant stations in each of the original station sequences corresponding to the travel stations; a fourth determining module, configured to determine at least one first candidate site sequence based on a relative position relationship between each of the travel sites and the corresponding related site, wherein the relative position relationship indicates whether the travel site is located at a preceding position or a subsequent position of the related site; a fifth determining module, configured to determine a target planned route according to at least one of the first candidate site sequences; The device is further configured to, in response to the presence of multiple new passenger travel requests and the multiple new passenger travel requests matching the same online-booked bus, sequentially process the new passenger travel requests according to chronological order or the order of the relevant stations in the original station sequence; Among them, the travel site, the original site and the related sites are all fixed sites.
11. An electronic device comprising a memory and a processor, characterized in that: The memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Unmanned bus route planning method in multi-passenger mode
CN112781610A
Tail end distribution path planning method for new customer two-stage entry
CN115689431A