Online car-hailing real-time order dispatching method and system considering passenger waiting endurance uncertainty
By using spatiotemporal gridded classification and cyclic probabilistic matching decision-making, the problems of greed and strong data dependence in the ride-hailing dispatch system are solved, achieving global profit maximization and second-level response, reducing order loss rate, and adapting to the randomness of passenger patience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING JIAOTONG UNIV
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-08
AI Technical Summary
Existing ride-hailing dispatching technologies suffer from suboptimal greedy matching strategies, slow response times with batch matching strategies, and strong data dependence with reinforcement learning or stochastic optimization strategies. Furthermore, they ignore the uncertainty of passenger patience, leading to misallocation of transportation resources and passenger anxiety while waiting.
By employing data feature extraction and parameter construction, and through spatiotemporal grid classification and historical statistical data, the arrival rate, average trip revenue, average waiting time, and capacity supply of various orders are calculated. A resource allocation model is constructed and the global optimal matching probability is solved. Combined with real-time order response and queue maintenance, a cyclic probabilistic matching decision and resource reservation mechanism are adopted to achieve resource allocation based on a global perspective.
It improves the system's robustness and adaptability, balances global benefits and real-time performance, reduces order loss rate, avoids the short-sightedness problem of greedy algorithms, and achieves second-level response and intelligent resource reservation for high-value orders.
Smart Images

Figure CN121998301A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent transportation systems and internet dispatching technology, and in particular to a real-time dispatching method and system for ride-hailing services that takes into account the uncertainty of passenger patience in scenarios where passenger patience is limited and random. Background Technology
[0002] With the development of mobile internet technology, ride-hailing has become an important part of urban transportation. In ride-hailing dispatch systems, the core task is to match real-time arriving passenger orders (demand) with available drivers (supply) to maximize the platform's operational efficiency and revenue.
[0003] The existing ride-hailing dispatch technology has the following limitations: (1) The greedy matching strategy has a suboptimal return: This strategy immediately assigns a vehicle to the most recent or highest-value order once an available vehicle is found. However, this "short-sighted" strategy ignores potential future opportunities and often results in high-value long-distance orders having no available vehicles upon arrival, thereby reducing the long-term global return of the system.
[0004] (2) Slow response of batch matching strategy: This strategy sets a fixed time window (e.g., 10-30 seconds), collects all orders and drivers within the window, and constructs a bipartite graph matching model to solve it. Although this improves the matching quality to some extent, the forced waiting window increases the waiting anxiety of passengers, and with the increase of concurrency, the high-frequency graph matching calculation puts a huge pressure on the system's computing power, making it difficult to meet the millisecond-level real-time response requirements.
[0005] (3) Reinforcement learning or stochastic optimization-based strategies are highly dependent on data: In recent years, methods using Markov decision processes or deep reinforcement learning have been proposed. Although these methods have superior theoretical performance, they usually assume that the probability distribution of passenger arrival and service times (such as Poisson distribution or exponential distribution) can be accurately known. However, in real operating environments, the data distribution is extremely complex and fluctuates wildly due to the influence of weather, emergencies, etc., resulting in poor robustness of algorithms that rely on specific distribution models.
[0006] Furthermore, most existing technologies assume that passengers will wait indefinitely until they are served, ignoring the uncertainty of passenger patience (i.e., passengers may cancel their orders at any time). In reality, passenger dwell time is highly random, and different types of passengers (such as long-distance and short-distance passengers) have vastly different levels of patience. Ignoring this factor can lead to deviations in the dispatch system's estimation of effective demand, resulting in a misallocation of transportation resources.
[0007] Therefore, there is an urgent need for a real-time ride-hailing dispatch method that does not require precise probability distribution information, can take into account long-term global benefits, and can adapt to the randomness of passenger patience. Summary of the Invention
[0008] This invention provides a real-time dispatching method and system for ride-hailing services that takes into account the uncertainty of passengers' waiting patience, aiming to solve the problems of short-sighted dispatching strategies, high computational latency, and strong dependence on data distribution in the prior art.
[0009] According to a first aspect of the present invention, a real-time ride-hailing dispatch method considering the uncertainty of passenger waiting patience is provided, comprising the following steps: data feature extraction and parameter construction: ride-hailing driver and passenger orders are classified into spatiotemporal grids based on historical operational data of the target service area to obtain driver supply categories and order demand categories; based on historical statistical data, driver supply categories, and order demand categories, the arrival rate, average trip revenue, average service duration, average waiting patience duration, and the capacity supply quantity of each type of order are calculated respectively; global optimal matching distribution planning: based on the average waiting patience duration, average service duration, average trip revenue, and capacity supply quantity, a resource allocation model is constructed and solved to generate a baseline matching probability between each type of driver and each type of order; real-time order response and queue maintenance: real-time received passenger orders are added to a dynamic waiting queue for waiting patience management. Heart rate verification removes passenger orders exceeding the average waiting time from the dynamic waiting queue as invalid orders, retaining valid orders as pending orders. Cyclic probabilistic matching decision: Available idle drivers in the vicinity are retrieved to form a driver set. A random traversal sequence of the driver set is generated based on driver supply categories. Based on the random traversal sequence, combined with the baseline matching probability and the current supply and demand adjustment factor, the real-time dispatch threshold between the current pending order and the currently traversed driver category is calculated and a random determination is performed. Dispatch execution and resource reservation: If the current pending order passes the cyclic probabilistic matching decision, a dispatch instruction is generated and the current pending order is removed from the dynamic waiting queue. If it still fails to pass after traversing all available driver supply categories, the current pending order is retained in the dynamic waiting queue, awaiting priority processing in the next scheduling cycle, thus achieving resource reservation and cross-cycle matching based on a global perspective.
[0010] Optionally, the step of classifying ride-hailing driver and passenger orders into spatiotemporal grids based on historical operational data of the target service area to obtain driver supply categories and order demand categories; and calculating the arrival rate, average trip revenue, average service duration, average waiting time, and the capacity supply of each type of order based on historical statistical data, driver supply categories, and order demand categories, including: dividing the electronic map of the target service area into several standard physical grids; and, based on these standard physical grids, classifying passenger orders into different order demand categories according to the origin grid, destination grid, estimated amount, and order business type of the passenger order. Based on the driver's current location grid and vehicle service level, drivers are divided into different driver supply categories. And count the categories within the target service area. The total number of online drivers is used as the quantity of transportation capacity. The historical operational data includes the origin grid, destination grid, estimated amount, and order type of passenger orders, as well as the driver's current location grid and vehicle service level; and statistically analyzes order demand categories within a set historical period. The number of orders arriving per unit time is used as the order arrival rate. Trip records based on historical orders and driver supply categories With order demand category The spatial distance between them is used to calculate the average service occupancy time, which includes pick-up time and passenger travel time. ; Statistics on order demand categories The average time difference between the creation and cancellation times of historical orders is used as the average waiting patience time. .
[0011] Optionally, the resource allocation model is constructed with the goal of maximizing the total expected revenue of the system per unit time, satisfying the following constraints: Demand response constraint: the expected number of matching orders for each type is set not to exceed the corresponding total arrivals; Capacity supply constraint: the total time spent by each type of driver on order acceptance and service is set not to exceed their total online time, wherein the service time includes the estimated empty driving time for picking up drivers and the passenger travel time, which is determined by the average service occupancy time. It is determined that the total online time is determined by the amount of transport capacity supplied. Determined; Objective function setting: Maximize the sum of the estimated revenues of all matching pairs, where the estimated revenue is obtained by subtracting the execution cost from the order amount; Parameter generation: Obtain the optimal solution of the resource allocation model as the baseline matching probability. The baseline matching probability Used to characterize the driver supply category under the ideal global optimal state. With order demand category The order matching ratio between them.
[0012] Optionally, the formula for calculating the real-time dispatch threshold is:
[0013] in, This is the real-time order dispatch threshold. As a supply and demand adjustment factor, As the baseline matching probability, For order delivery rate, This represents the average waiting time.
[0014] Optionally, the decision on whether the current pending order passes the cyclic probabilistic matching process can be determined by generating a... random numbers in an interval ;like : Passed; if The decision was not approved.
[0015] Optionally, the supply and demand adjustment factor A dynamic adjustment strategy is implemented based on the order queue length. Specifically, this dynamic adjustment strategy includes: real-time monitoring of the current order queue length in the system. When the order queue length When the backlog exceeds a preset threshold, the supply and demand adjustment factor is increased. To increase the real-time order dispatch threshold and speed up order processing; when the order queue length When the idle time is below a preset threshold, the supply and demand adjustment factor is reduced. This is to lower the real-time order dispatch threshold and reserve resources to match high-value orders.
[0016] Optionally, the dynamic candidate queue adopts a mechanism combining micro-batch processing and multi-priority sorting, specifically including: setting a small atomic processing time window; collecting and sorting all pending orders within the atomic processing time window, including: sorting in ascending order using arrival timestamp as the first key, prioritizing the processing of delayed orders with earlier arrival times; when arrival times are the same, sorting in descending order using estimated order amount as the second key, prioritizing the processing of high-value orders; and sequentially performing the cyclic probabilistic matching decision on the sorted orders.
[0017] According to a second aspect of the present invention, a real-time dispatch system for ride-hailing services that considers the uncertainty of passenger waiting patience is provided, comprising: a parameter calculation module: used to perform spatiotemporal grid-based classification of ride-hailing driver and passenger orders based on historical operational data of the target service area to obtain driver supply categories and order demand categories; and to calculate the arrival rate, average trip revenue, average service duration, average waiting patience duration, and capacity supply quantity of each type of order based on historical statistical data, driver supply categories, and order demand categories, respectively; an offline planning module: used to construct and solve a resource allocation model based on the average waiting patience duration, average service duration, average trip revenue, and capacity supply quantity to generate a baseline matching probability between each type of driver and each type of order; a real-time scheduling engine: used to maintain a dynamic waiting queue, execute cyclic probabilistic matching decisions, and generate dispatch instructions; and a dynamic monitoring module: used to monitor the system load status and update the supply and demand adjustment factors in real time according to a dynamic adjustment strategy.
[0018] According to a third aspect of the present invention, an electronic device is provided, including a processor and a memory storing a program. The program includes instructions that, when executed by the processor, cause the processor to perform the steps performed by the method of the first aspect described above.
[0019] According to a fourth aspect of the present invention, a computer storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method of the first aspect described above.
[0020] Compared with the prior art, the present invention has the following beneficial effects: (1) Strong robustness: The method of this invention does not depend on the specific probability distribution of the data, but only uses the mean (first moment) information to build the model. When facing complex and variable data in the real world that are difficult to fit accurately, it has strong adaptability and stability.
[0021] (2) Balancing global benefits and real-time performance: The present invention adopts an architecture that uses offline planning to guide online decision-making. This architecture ensures the maximization of long-term benefits through linear programming and achieves real-time performance through online probability threshold determination. Its extremely fast response time complexity enables it to support large-scale concurrent scenarios.
[0022] (3) Intelligent resource reservation mechanism: This invention innovatively introduces a probabilistic rejection mechanism, which can "intentionally" reserve resources for potential high-value orders when transportation capacity is scarce, thus avoiding the short-sightedness problem of greedy algorithms.
[0023] (4) Adapting to the randomness of patience: This invention explicitly incorporates the average patience time of passengers into the control model and combines it with the first-come, first-served (FCFS) waiting queue mechanism to effectively reduce the order loss rate caused by waiting timeout. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0025] Figure 1 This is a flowchart illustrating the overall process of a real-time ride-hailing dispatch method that takes into account the uncertainty of passenger waiting patience, as an embodiment of the present invention.
[0026] Figure 2 This is a logical diagram of online cyclic probabilistic matching decision-making in an embodiment of the present invention.
[0027] Figure 3This is a structural block diagram of a real-time ride-hailing dispatch system that considers the uncertainty of passenger waiting patience, as an embodiment of the present invention. Detailed Implementation
[0028] To provide a clearer understanding of the technical features, objectives, and effects of the embodiments of the present invention, specific implementation methods of the embodiments of the present invention will now be described with reference to the accompanying drawings.
[0029] In this document, “exemplary” means “serving as an example, illustration or description”, and any illustrations or implementations described herein as “exemplary” should not be construed as a more preferred or advantageous technical solution.
[0030] This invention provides a real-time ride-hailing dispatch method that takes into account the uncertainty of passengers' waiting patience, comprising the following steps: Data feature extraction and parameter construction: Based on the historical operation data of the target service area, ride-hailing driver and passenger orders are classified into spatiotemporal grids to obtain driver supply categories and order demand categories; based on historical statistical data, driver supply categories and order demand categories, the arrival rate, average trip revenue, average service duration, average waiting time and the number of drivers available for each type of order are calculated respectively. Global optimal matching distribution planning: Based on average waiting patience time, average service occupation time, average trip revenue and capacity supply, a resource allocation model is constructed and solved to generate the benchmark matching probability between various types of drivers and various types of orders; Real-time order response and queue maintenance: Passenger orders received in real time are added to a dynamic waiting queue for patience period verification. Passenger orders in the dynamic waiting queue that exceed the average waiting time are removed as invalid orders, and valid orders are retained as pending orders. Cyclic probabilistic matching decision: Retrieve available idle drivers in the vicinity to form a driver set, and generate a random traversal sequence of the driver set according to the driver supply category; Based on the random traversal sequence, combined with the baseline matching probability and the current supply and demand adjustment factor, calculate the real-time dispatch threshold of the current pending order and the current traversed driver category, and perform random judgment. Order dispatch execution and resource reservation: If the current pending order passes the probabilistic matching decision, an order dispatch instruction is generated and the current pending order is removed from the dynamic waiting queue; if it still fails to pass the decision after traversing all available driver supply categories, the current pending order is kept in the dynamic waiting queue and waits for priority processing in the next scheduling cycle, so as to realize resource reservation and cross-cycle matching based on a global perspective.
[0031] Optionally, the step of classifying ride-hailing driver and passenger orders into spatiotemporal grids based on historical operational data of the target service area to obtain driver supply categories and order demand categories; and calculating the arrival rate, average trip revenue, average service duration, average waiting time, and the capacity supply of each type of order based on historical statistical data, driver supply categories, and order demand categories, including: dividing the electronic map of the target service area into several standard physical grids; and, based on these standard physical grids, classifying passenger orders into different order demand categories according to the origin grid, destination grid, estimated amount, and order business type of the passenger order. Based on the driver's current location grid and vehicle service level, drivers are divided into different driver supply categories. And count the categories within the target service area. The total number of online drivers is used as the quantity of transportation capacity. The historical operational data includes the origin grid, destination grid, estimated amount, and order type of passenger orders, as well as the driver's current location grid and vehicle service level; and statistically analyzes order demand categories within a set historical period. The number of orders arriving per unit time is used as the order arrival rate. Trip records based on historical orders and driver supply categories With order demand category The spatial distance between them is used to calculate the average service occupancy time, which includes pick-up time and passenger travel time. ; Statistics on order demand categories The average time difference between the creation and cancellation times of historical orders is used as the average waiting patience time. .
[0032] It should be understood that average trip revenue is the average net revenue calculated based on historical order data, i.e., historical statistical data, after deducting average execution costs (such as fuel, vehicle depreciation, etc.) from the order amount of the corresponding category.
[0033] Optionally, the resource allocation model is constructed with the goal of maximizing the total expected revenue of the system per unit time, satisfying the following constraints: Demand response constraint: the expected number of matching orders for each type is set not to exceed the corresponding total arrivals; Capacity supply constraint: the total time spent by each type of driver on order acceptance and service is set not to exceed their total online time, wherein the service time includes the estimated empty driving time for picking up drivers and the passenger travel time, which is determined by the average service occupancy time. It is determined that the total online time is determined by the amount of transport capacity supplied. Determined; Objective function setting: Maximize the sum of the estimated revenues of all matching pairs, where the estimated revenue is obtained by subtracting the execution cost from the order amount; Parameter generation: Obtain the optimal solution of the resource allocation model as the baseline matching probability. The baseline matching probability Used to characterize the driver supply category under the ideal global optimal state. With order demand category The order matching ratio between them.
[0034] Optionally, the formula for calculating the real-time dispatch threshold is:
[0035] in, This is the real-time order dispatch threshold. As a supply and demand adjustment factor, As the baseline matching probability, For order delivery rate, This represents the average waiting time.
[0036] Optionally, the decision on whether the current pending order passes the cyclic probabilistic matching process can be determined by generating a... random numbers in an interval ;like : Passed; if The decision was not approved.
[0037] Optionally, the supply and demand adjustment factor A dynamic adjustment strategy is implemented based on the order queue length. Specifically, this dynamic adjustment strategy includes: real-time monitoring of the current order queue length in the system. When the order queue length When the backlog exceeds a preset threshold, the supply and demand adjustment factor is increased. To increase the real-time order dispatch threshold and speed up order processing; when the order queue length When the idle time is below a preset threshold, the supply and demand adjustment factor is reduced. This is to lower the real-time order dispatch threshold and reserve resources to match high-value orders.
[0038] Optionally, the dynamic candidate queue adopts a mechanism combining micro-batch processing and multi-priority sorting, specifically including: setting a small atomic processing time window; collecting and sorting all pending orders within the atomic processing time window, including: sorting in ascending order using arrival timestamp as the first key, prioritizing the processing of delayed orders with earlier arrival times; when arrival times are the same, sorting in descending order using estimated order amount as the second key, prioritizing the processing of high-value orders; and sequentially performing the cyclic probabilistic matching decision on the sorted orders.
[0039] Optionally, the method further includes a step for handling abnormal data: when a certain demand category The historical data sample size is insufficient to calculate the effective average waiting patience time. When necessary, the system automatically uses the global average patience time of all orders within the target service area as a replacement to ensure continuous operation and robustness of the system.
[0040] It should be understood that some of the techniques in this invention can be replaced in the following ways: (1) Optimization of objective substitution: The objective function of linear programming can be replaced by "maximizing the number of transactions" or "minimizing the empty driving distance", only by adjusting the weights. .
[0041] (2) Parameter calculation substitution: average patience It can be estimated using statistical methods such as survival analysis, or updated in real time using a sliding window.
[0042] (3) Alternative sorting rules: The candidate queue can be sorted by time only, or by value only, or by membership level.
[0043] (4) Regulation factor substitution: The adjustment can be based on the driver idle rate or the estimated premium multiple through proportional-integral-derivative control.
[0044] Compared with the prior art, the present invention has the following beneficial effects: (1) Strong robustness: The method of this invention does not depend on the specific probability distribution of the data, but only uses the mean (first moment) information to build the model. When facing complex and variable data in the real world that are difficult to fit accurately, it has strong adaptability and stability.
[0045] (2) Balancing global benefits and real-time performance: The present invention adopts an architecture that uses offline planning to guide online decision-making. This architecture ensures the maximization of long-term benefits through linear programming and achieves real-time performance through online probability threshold determination. Its extremely fast response time complexity enables it to support large-scale concurrent scenarios.
[0046] (3) Intelligent resource reservation mechanism: This invention innovatively introduces a probabilistic rejection mechanism, which can "intentionally" reserve resources for potential high-value orders when transportation capacity is scarce, thus avoiding the short-sightedness problem of greedy algorithms.
[0047] (4) Adapting to the randomness of patience: This invention explicitly incorporates the average patience time of passengers into the control model and combines it with the first-come, first-served (FCFS) waiting queue mechanism to effectively reduce the order loss rate caused by waiting timeout.
[0048] This invention also provides a real-time ride-hailing dispatch system that takes into account the uncertainty of passengers' waiting patience, including: Parameter calculation module: It is used to classify ride-hailing driver and passenger orders into spatiotemporal grids based on historical operational data of the target service area to obtain driver supply categories and order demand categories; based on historical statistical data, driver supply categories and order demand categories, it calculates the arrival rate, average trip revenue, average service duration, average waiting time and the capacity supply of each type of order. Offline planning module: Used to build and solve resource allocation models based on average waiting time, average service duration, average trip revenue and capacity supply, and generate benchmark matching probabilities between various types of drivers and various types of orders; Real-time scheduling engine: used to maintain a dynamic waiting queue, perform cyclic probabilistic matching decisions, and generate dispatch instructions; Dynamic monitoring module: Used to monitor the system load status and update the supply and demand adjustment factors in real time according to the dynamic adjustment strategy.
[0049] The system in this embodiment is used to implement the corresponding methods in the foregoing multiple method embodiments and has the beneficial effects of the corresponding method embodiments.
[0050] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.
[0051] Example 1 This embodiment uses a ride-hailing operation scenario in a core business district of Beijing during the morning rush hour (08:00-09:00) as an example to illustrate the technical solution of the present invention in detail.
[0052] like Figure 1 As shown, the real-time dispatching method for ride-hailing services of the present invention, which considers the uncertainty of passenger waiting patience, adopts a two-layer architecture of "offline planning + online decision-making," and specifically includes the following steps: Step S1: Data Feature Extraction and Parameter Construction First, the service area is discretized. The electronic map of the target urban area of Chengdu is divided into several standard physical grids (e.g., Based on the platform's historical operational logs over the past 30 days, supply and demand characteristic parameters are extracted. In this embodiment, to verify the effectiveness of the method, a typical demand and supply scenario is selected for construction.
[0053] (S1-1) Demand Classification and Parameter Calculation: Passenger orders are categorized into different demand types based on their origin grid, destination grid, and estimated amount. Arrival rates for each category are statistically analyzed. (Unit: orders / second) and average waiting time (Unit: seconds).
[0054] The specific parameter settings are shown in Table 1: Table 1. Examples of Order Requirement Category Parameters
[0055] Among them, the average waiting time This is the average of the time difference between the creation and cancellation times of historical orders within this category. It can be seen that... These types of passengers are more sensitive to waiting and are more likely to cancel; These types of passengers have relatively high patience.
[0056] (S1-2) Supply Classification: The system categorizes drivers into different supply categories based on their current grid location, vehicle service level (e.g., Express, Premium), and historical service ratings (e.g., star rating). The introduction of a scoring mechanism aims to accurately match high-quality transportation capacity with high-value demand, further improving service quality and user retention. In this embodiment, to demonstrate the differences in transportation capacity at different levels, two typical driver supply categories are constructed, as shown in Table 2: Table 2 Examples of Driver Supply Category Parameters
[0057] At the same time, statistics on the categories within the current service area are also collected. The total number of online drivers, as a measure of transportation capacity supply. For example, in the current time period, it belongs to Number of online drivers by category people.
[0058] (S1-3) Calculation of Revenue Weighting and Service Time: Calculate driver category Assigned to order category Estimated net income and average service duration .
[0059] Net income weighting: .
[0060] Average service duration: .
[0061] The above parameters are determined by the driver's position. From the passenger origin The spatial distance and real-time traffic conditions determine this.
[0062] In this embodiment, regarding the supply category Match the demand categories respectively and The weight calculation results are shown in Table 3: Table 3. Example of Supply and Demand Matching Revenue Weights
[0063] Step S2: Global optimal matching distribution planning (offline) Based on the parameters obtained in step S1 ( , , , , Construct a resource allocation model (linear programming model) to maximize the total expected system revenue per unit time. The resource allocation model is described as follows: Objective function:
[0064] Constraint 1 (Requirement Constraint): This means that the matching traffic allocated to each type of order does not exceed its arrival rate.
[0065] Constraint 2 (Supply Constraint): That is, the total time spent by all types of drivers on service shall not exceed their total online time (as determined by...). (Decision), among which This represents the average service duration. The optimal solution is obtained by offline solving of the above model using an optimization solver. This optimal solution constitutes the baseline matching probability, representing the best proportion of a certain type of driver serving a certain type of order under the ideal globally optimal state, and is used to guide subsequent online decision-making.
[0066] For example, the solution result might show: for category The driver, Larger and The number is relatively small, which means that from a globally optimal perspective, this type of driver should mainly be used to handle high-frequency, short-distance trips.
[0067] Step S3: Real-time order response and queue maintenance The system maintains a dynamic candidate queue.
[0068] (S3-1) Micro-batch processing and sorting: Set a tiny atomic processing time window (e.g., 1 second). All new orders arriving within this window are added to the queue.
[0069] (S3-2) Waiting time check: Traverse the queue and check the current waiting time of each order. .
[0070] like The system determines that the order has expired (the passenger cancelled) and removes it from the queue; like Please retain this order.
[0071] (S3-3) Priority sorting: Perform double priority sorting on valid orders in the queue: First key factor: Order arrival timestamp (ascending order). Orders with earlier arrival times will be processed first, following a first-come, first-served principle to ensure fairness.
[0072] Second key factor: Estimated order amount (descending order). When arrival times are similar, higher-value orders are processed first.
[0073] Step S4: Looping probabilistic matching decision It should be noted that for all pending orders in the dynamic waiting queue, the system will sequentially execute the matching decision process described in this step. Figure 2 Showing a single target order The detailed processing logic is as follows: Resource retrieval: Search for all available drivers within a specified radius (e.g., 2km) around the order, categorized by their supply category. Grouping them into candidate resource sets.
[0074] Generating a random permutation sequence: To avoid excessive preference for a particular type of driver, the system generates a random permutation sequence of driver categories in the candidate resource set. .
[0075] Cycle detection: according to the sequence The probability determination is performed on each type of driver resource in sequence: According to the formula Calculate the real-time order dispatch threshold. This is the current supply and demand adjustment factor.
[0076] The system generates one random numbers in an interval .
[0077] determination: like If the match is successful, a driver in that class is immediately identified and the iteration ends. like If the order fails, the system will select "Intentionally Skip" for that type of driver (reserving it for other orders) and continue trying different sequences. The next type of driver.
[0078] Step S5: Order Execution and Resource Reservation Match successful: If a certain type of driver is determined to be qualified in the loop of step S4, the system generates a dispatch instruction, pushes the order to the driver, and removes the order from the waiting queue.
[0079] Resource reservation (match failure): If the sequence has been traversed... All available driver categories failed the probability determination (i.e., If the condition is always true, it means the system believes that assigning these drivers to the order is not in line with the globally optimal benefit. In this case, the order is kept in the dynamic waiting queue, awaiting reordering and matching in the next time window (S3). This mechanism achieves probability-based resource reservation, avoiding the short-sightedness of greedy algorithms.
[0080] In addition, the system implements a dynamic monitoring strategy: real-time monitoring of queue length. .
[0081] when When there is a backlog, gradually increase the amount. (like ), increase threshold This makes the system "less picky" and speeds up the clearing of backlogged orders.
[0082] when (When idle) gradually reduce (like ), lower the threshold This makes the system "more selective," tending to reserve capacity for high-value orders.
[0083] Example 2 As shown in Figure 3, this embodiment provides a real-time ride-hailing dispatch system that considers the uncertainty of passengers' waiting patience. The system includes: Parameter calculation module: Used to connect to the historical database, perform the spatiotemporal gridded classification described in Example 1, and periodically update the arrival rates of various types of orders. and average patience time .
[0084] Offline planning module: Built-in optimization solver, which solves the resource allocation model periodically (e.g., daily or hourly) based on the latest parameters and benefit weights, and outputs the baseline matching probability.
[0085] Real-time scheduling engine: The core execution unit of the system. It is responsible for maintaining a dynamic waiting queue, performing micro-batch processing and dual priority sorting; receiving real-time order streams and driver status streams, performing cyclic matching decisions based on random traversal sequences, and generating the final dispatch instruction.
[0086] Dynamic monitoring module: Collects real-time data on order queue length and capacity idle rate from the system, and dynamically calculates and updates supply and demand adjustment factors based on preset strategies. The factor is then sent to the real-time scheduling engine in real time.
[0087] In summary, compared to greedy algorithms, this invention reserves capacity for high-value orders through probabilistic control, and experiments have shown that it significantly improves the platform's total revenue, resulting in better returns. Compared to batch processing algorithms, this invention does not require long-term order accumulation, and its online decision-making complexity is O(n log n). It supports real-time scheduling at the second / millisecond level, resulting in faster response times. Compared to deep learning methods, this invention does not require massive amounts of training data, is insensitive to data distribution fluctuations, exhibits strong engineering robustness, and is more adaptable. This invention also explicitly considers average patience time. In accordance with the "first-come, first-served" principle, orders that are about to expire are processed first, which effectively reduces the proportion of orders that are canceled due to long waiting times.
[0088] As another example, embodiments of the present invention also provide an electronic device, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0089] The electronic device may include a processor, a communications interface, memory, and a communications bus.
[0090] The processor, communication interface, and memory communicate with each other via a communication bus. The communication interface is used to communicate with other electronic devices or servers.
[0091] The processor is used to execute programs, specifically the relevant steps in the above method embodiments.
[0092] Specifically, the program may include program code, which includes computer operation instructions.
[0093] The processor may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in a smart device may be of the same type, such as one or more CPUs; or they may be of different types, such as one or more CPUs and one or more ASICs.
[0094] Memory is used to store programs. Memory may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.
[0095] The program, when executed by a processor, is used to cause an electronic device to perform the method of the present invention.
[0096] Furthermore, the specific implementation of each step in the program can be found in the corresponding descriptions of the steps and units in the above method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0097] An exemplary embodiment of the present invention also provides a computer storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the methods of the various embodiments of the present invention. The corresponding process descriptions in the foregoing method embodiments can be referred to, and will not be repeated here.
[0098] The methods described above according to embodiments of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.
[0099] Specific embodiments of the invention have now been described. Other embodiments are within the scope of the appended claims. In some cases, the actions described in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing can be advantageous.
[0100] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present invention, and the patent protection scope of the embodiments of the present invention should be defined by the claims.
Claims
1. A real-time ride-hailing dispatch method that considers the uncertainty of passenger waiting patience, characterized in that, Includes the following steps: Data feature extraction and parameter construction: Based on the historical operational data of the target service area, ride-hailing driver and passenger orders are classified into spatiotemporal grids to obtain driver supply categories and order demand categories; Based on historical statistics, driver supply categories, and order demand categories, the arrival rate, average trip revenue, average service duration, average waiting time, and the capacity supply of each type of driver are calculated. Global optimal matching distribution planning: Based on average waiting patience time, average service occupation time, average trip revenue and capacity supply, a resource allocation model is constructed and solved to generate the benchmark matching probability between various types of drivers and various types of orders; Real-time order response and queue maintenance: Passenger orders received in real time are added to a dynamic waiting queue for patience period verification. Passenger orders in the dynamic waiting queue that exceed the average waiting time are removed as invalid orders, and valid orders are retained as pending orders. Cyclic probabilistic matching decision: Retrieve available idle drivers in the vicinity to form a driver set, and generate a random traversal sequence of the driver set according to the driver supply category; Based on the random traversal sequence, combined with the baseline matching probability and the current supply and demand adjustment factor, calculate the real-time dispatch threshold of the current pending order and the current traversed driver category, and perform random judgment. Order dispatch execution and resource reservation: If the current pending order passes the probabilistic matching decision, an order dispatch instruction is generated and the current pending order is removed from the dynamic waiting queue; if it still fails to pass the decision after traversing all available driver supply categories, the current pending order is kept in the dynamic waiting queue and waits for priority processing in the next scheduling cycle, so as to realize resource reservation and cross-cycle matching based on a global perspective.
2. The method according to claim 1, characterized in that, The process involves classifying ride-hailing driver and passenger orders into a spatiotemporal grid based on historical operational data of the target service area, thereby obtaining driver supply categories and order demand categories. Based on historical statistical data, driver supply categories, and order demand categories, the arrival rate, average trip revenue, average service duration, average waiting time, and the capacity supply of each type of driver are calculated, including: The electronic map of the target service area is divided into several standard physical grids; Based on several standard physical grids, passenger orders are categorized into different order demand categories according to the origin grid, destination grid, estimated amount, and order business type. ; Drivers are categorized into different driver supply categories based on their current location grid and vehicle service level. And count the categories within the target service area. The total number of online drivers is used as the quantity of transportation capacity. The historical operational data includes the origin grid, destination grid, estimated amount, and order type of passenger orders, as well as the driver's current location grid and vehicle service level. Statistics on order demand categories within a set historical period The number of orders arriving per unit time is used as the order arrival rate. ; Trip records based on historical orders and driver supply categories With order demand category The spatial distance between them is used to calculate the average service occupancy time, which includes pick-up time and passenger travel time. ; Statistics on order demand categories The average time difference between the creation and cancellation times of historical orders is used as the average waiting patience time. .
3. The method according to claim 1, characterized in that, The resource allocation model is constructed with the objective of maximizing the total expected system revenue per unit time, and satisfies the following constraints: Demand response constraint: Set the expected matching quantity of each type of order to not exceed its corresponding total arrival quantity; Capacity supply constraints: The total time spent by all types of drivers on order acceptance and service cannot exceed their total online time. Service time includes estimated empty driving time for pick-up and passenger travel time, and is determined by the average service time. It is determined that the total online time is determined by the amount of transport capacity supplied. Sure; Objective function setting: Maximize the sum of the estimated revenues of all matching pairs, where the estimated revenues are obtained by subtracting the execution costs from the order amount; Parameter generation: Obtain the optimal solution of the resource allocation model as the baseline matching probability. The baseline matching probability Used to characterize the driver supply category under the ideal global optimal state. With order demand category The order matching ratio between them.
4. The method according to claim 1, characterized in that, The formula for calculating the real-time dispatch threshold is as follows: in, This is the real-time order dispatch threshold. As a supply and demand adjustment factor, As the baseline matching probability, For order delivery rate, This represents the average waiting time.
5. The method according to claim 4, characterized in that, The following method is used to determine whether the current pending order passes the probabilistic matching decision: Generate a random numbers in an interval ; like : Passed; like The decision was not approved.
6. The method according to claim 4, characterized in that, The supply and demand adjustment factor A dynamic adjustment strategy is implemented based on the order queue length. This dynamic adjustment strategy specifically includes: Real-time monitoring system for current order queue length ; When the order queue length When the backlog exceeds a preset threshold, the supply and demand adjustment factor is increased. To increase the real-time order dispatch threshold and speed up order processing; When the order queue length When the idle time is below a preset threshold, the supply and demand adjustment factor is reduced. This is to lower the real-time order dispatch threshold and reserve resources to match high-value orders.
7. The method according to claim 1, characterized in that, The dynamic candidate queue employs a mechanism combining micro-batch processing and multi-priority sorting, specifically including: Set a tiny atomic processing time window; Within this atomic processing time window, all pending orders are collected and sorted, including: ascending order based on arrival timestamp as the primary key, prioritizing the processing of backlogged orders with earlier arrival times; when arrival times are the same, descending order based on estimated order amount as the secondary key, prioritizing the processing of high-value orders. The cyclic probabilistic matching decision is executed sequentially on the sorted orders.
8. A real-time ride-hailing dispatch system that considers the uncertainty of passenger waiting patience, characterized in that, include: Parameter calculation module: used to perform spatiotemporal grid-based classification of ride-hailing driver and passenger orders based on historical operational data of the target service area, to obtain driver supply categories and order demand categories; Based on historical statistics, driver supply categories, and order demand categories, the arrival rate, average trip revenue, average service duration, average waiting time, and the capacity supply of each type of driver are calculated. Offline planning module: Used to build and solve resource allocation models based on average waiting time, average service duration, average trip revenue and capacity supply, and generate benchmark matching probabilities between various types of drivers and various types of orders; Real-time scheduling engine: used to maintain a dynamic waiting queue, perform cyclic probabilistic matching decisions, and generate dispatch instructions; Dynamic monitoring module: Used to monitor the system load status and update the supply and demand adjustment factors in real time according to the dynamic adjustment strategy.
9. An electronic device, characterized in that, include: processor; Memory for stored programs; The program includes instructions that, when executed by the processor, cause the processor to perform the steps of the method as described in any one of claims 1-7.
10. A computer storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Online car-hailing order dispatching method and system introducing passenger pick-up time satisfaction
CN112785143A
Online car-hailing intelligent order sending method and system based on multi-dimensional rule
CN120373786A