Method and device for calculating total service time of driver, equipment and storage medium
Patent Information
- Application Number
- CN202610772051.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]然而,上述方式仅适用于普通单场景,针对连环单或者是拼车单等复杂场景时,由于无法做到更进一步的区分,因此,导致对司机服务时间的计算不准确
存储器存储有可被至少一个处理器执行的计算机指令,计算机指令被至少一个处理器执行,以使至少一个处理器能够执行上述第一方面中涉及的方法。
Smart Images

Figure CN122928079A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of ride-hailing service technology, and in particular to a method, apparatus, device, and storage medium for calculating the total service time of a driver. Background Technology
[0002] As is well known, the ride-hailing industry is developing rapidly, and driver service time has become a core indicator for platforms to manage drivers, such as service time assessment and fatigue driving warnings; order scheduling, such as matching orders based on service efficiency; fee settlement, such as time-related subsidy calculation; and service quality evaluation, such as average service time efficiency analysis. Furthermore, with the diversification and upgrading of ride-hailing business models, order types have gradually expanded from single ordinary orders to composite models such as chain orders and carpooling orders. Among them, the chain order model is widely used because it can improve driver order acceptance efficiency and reduce empty driving losses; while the carpooling order model has become one of the mainstream models in the industry because it can reduce passenger travel costs and improve vehicle utilization. Precisely because the service process of the aforementioned two composite order models is relatively complex, higher requirements are placed on the statistical accuracy of driver service time. Ride-hailing platforms are also transforming from "extensive operation" to "refined operation," gradually increasing the time granularity of data statistics from the traditional hourly and ten-minute levels to the second level, in order to meet the refined management needs such as second-level service efficiency evaluation.
[0003] In the traditional implementation, the driver service time is usually calculated by taking the difference between the order start time (when the driver clicks "Start Service") and the order end time (when the driver clicks "Complete Service"), without distinguishing between order types or making different calculations based on order types.
[0004] However, the above method only applies to ordinary single scenarios. For complex scenarios such as chain orders or carpooling orders, it cannot make further distinctions, resulting in inaccurate calculation of driver service time. Therefore, it cannot meet the need for refined calculation of the driver's total service time. Summary of the Invention
[0005] Based on this, this application provides a method, apparatus, device, and storage medium for calculating the total service time of a driver. By collecting user order information and driver departure and arrival information from the driver's terminal, the order types of corresponding orders can be distinguished, and then the total service time of the driver can be calculated based on the order type, thereby improving the accuracy and precision of the calculation of the total service time of the driver and enhancing the reliability of the data.
[0006] Firstly, a method for calculating the total service time of a driver is provided, the method comprising: Collect user order information and driver arrival / departure information from the driver's terminal. User order information refers to all user order information from the start to the end of the driver's order service. User order information includes at least the order number, number of orders, order status, and order start and end time. Based on the order start and end time, number of orders, order status, and driver pick-up and drop-off information, the corresponding scenario of the order is identified to obtain the order type information of the corresponding order; The driver's service time is calculated based on the order type, order number, and order start and end times to obtain the driver's total service time.
[0007] According to one achievable method in this application embodiment, driver departure and arrival information includes driver departure information. Based on the order start and end times, number of orders, order status, and driver departure and arrival information, the scenario to which the corresponding order belongs is identified to obtain the order type information of the corresponding order, including: If the driver's vehicle dispatch and pickup information indicates that the driver has dispatched the vehicle, and the order has the same start and end time, and the number of orders is 1, then the order type of the corresponding order is determined to be a regular order type. If there are multiple orders, then retrieve the order status of the corresponding orders; When all the order statuses of the corresponding order are in an unfinished state, the order type of the corresponding order is determined to be a composite order type.
[0008] According to one achievable method in the embodiments of this application, the composite order type includes the chain order type, the carpooling order type, and the chain carpooling order type. The unfinished status includes "in progress" and "pick-up in progress". When the order status of the corresponding order is unfinished, the order type of the corresponding order is determined to be the composite order type, including: When all orders for the corresponding order are in the "trip in progress" status, the order type for the corresponding order is determined to be a carpooling order. When multiple orders have multiple order statuses that are "pick-up in progress" and one that is "in progress," the order type of the corresponding order is determined to be a chain order type. When one or more of the orders are in the process of being picked up, and multiple orders are in the process of being on the trip, the order type of the corresponding orders is determined to be a chain carpooling order type.
[0009] According to one feasible method in the embodiments of this application, the driver's service time is calculated based on user order information and corresponding order type information to obtain the driver's total service time, including: When the order type is a regular order, the driver's service time is calculated based on the start and end times of the order to obtain the driver's total service time.
[0010] According to one achievable method in an embodiment of this application, the method further includes: When the order type of the corresponding order is a chain order, the effective service duration of the corresponding order and the connection service duration of adjacent orders are obtained based on the start and end times of the corresponding order. The driver's total service time is calculated based on the effective service time of the order and the service time of adjacent orders.
[0011] According to one achievable method in an embodiment of this application, the method further includes: When the order type of the corresponding order is a carpooling order, the order-exclusive service duration and the shared service duration of multiple orders are obtained based on the start and end times of the corresponding order. The driver's total service time is calculated based on the service time dedicated to each order and the service time shared by multiple orders.
[0012] According to one achievable method in an embodiment of this application, the method further includes: When the order type of the corresponding order is a chain carpooling order, the effective service duration of the corresponding order, the service duration of adjacent order connection, the service duration of the order-specific service duration, and the service duration shared by multiple orders are obtained based on the start and end times of the corresponding order. The driver's total service time is calculated based on the effective service time of the order, the service time of adjacent orders, the service time dedicated to the order, and the service time shared by multiple orders.
[0013] Secondly, a device for calculating the total service time of a driver is provided, the device comprising: The data collection unit is used to collect user order information and driver start and end information from the driver's terminal. User order information refers to all user order information from the start to the end of the driver's order service. User order information includes at least the order number, number of orders, order status, and order start and end time. The type identification unit is used to identify the scenario to which the corresponding order belongs based on the order start and end time, the number of orders, the order status, and the driver's departure and arrival information, so as to obtain the order type information of the corresponding order; The total service time calculation unit is used to calculate the driver's service time based on the order type information, order number, and order start and end time to obtain the driver's total service time.
[0014] Thirdly, a computer device is provided, comprising: At least one processor; and A memory that is communicatively connected to at least one processor; wherein, The memory stores computer instructions that can be executed by at least one processor to enable the at least one processor to perform the methods involved in the first aspect above.
[0015] Fourthly, a computer-readable storage medium is provided, having stored thereon computer instructions, characterized in that the computer instructions are used to cause a computer to perform the methods involved in the first aspect above.
[0016] According to the technical content provided in the embodiments of this application, user order information and driver arrival / departure information are collected from the driver's terminal. User order information refers to all user order information from the start to the end of the driver's service, and includes at least the order number, number of orders, order status, and order start and end time. Based on the order start and end time, number of orders, order status, and driver arrival / departure information, the scenario to which the corresponding order belongs is identified to obtain the order type information of the corresponding order. Based on the order type information, order number, and order start and end time, the driver's service time is calculated to obtain the driver's total service time. The aforementioned operation, by collecting user order information and driver arrival / departure information from the driver's terminal, enables the differentiation of order types for corresponding orders, and then calculates the driver's total service time based on the order type, thereby improving the accuracy and precision of the calculation of the driver's total service time and enhancing the reliability of the data. Attached Figure Description
[0017] Figure 1 This is an application environment diagram of a method for calculating the total service time of a driver in one embodiment. Figure 2 This is a flowchart illustrating a method for calculating the total service time of a driver in one embodiment; Figure 3 A structural block diagram of a device for calculating the total service time of a driver in one embodiment; Figure 4 This is a schematic structural diagram of a computer device in one embodiment. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0019] This application provides a method for calculating the total service time of a driver, which can be applied to, for example... Figure 1In the application environment shown, the driver terminal 101 communicates with the ride-hailing service platform 103 via a network. Specifically, the ride-hailing service platform 103 collects user order information and driver arrival / departure information from the driver terminal 101. User order information refers to all user orders from the start to the end of the driver's service, including at least the order number, number of orders, order status, and start and end times. Based on the order start and end times, number of orders, order status, and driver arrival / departure information, the platform identifies the corresponding order's scenario to obtain the order type information. Based on the order type information, order number, and order start and end times, the platform calculates the driver's total service time. The driver terminal 101 refers to a smart device or mobile application specifically designed for drivers, whose core function is to help drivers complete tasks such as order acceptance, navigation, communication with the platform or passengers, trip management, and income settlement. The ride-hailing service platform 103 refers to an online service platform that provides order matching, dispatching, and payment settlement services for passengers and drivers, and can be implemented using a dedicated server or a server cluster consisting of multiple servers.
[0020] In one embodiment, such as Figure 2 As shown, a method for calculating the total service time of a driver is provided, and this method is applied to... Figure 1 Taking the ride-hailing service platform 103 as an example, the explanation includes the following steps: Step S201: Collect user order information and driver departure and arrival information from the driver's terminal.
[0021] User order information refers to all order information of the driver from the start to the end of the service, which may include, but is not limited to, order number, order status and order start and end time; driver departure and arrival information may include, but is not limited to, driver number, driver departure and driver arrival.
[0022] In one feasible approach, ride-hailing service platforms can employ real-time streaming to collect multi-dimensional information from driver terminals, including order number, number of orders, order status, order start and end times, driver ID, driver dispatch and return times, etc., to support subsequent scene recognition and accurate calculations. Specifically, the collection frequency can be set to once per second. Simultaneously, the collected information can be cleaned and abnormal data removed to avoid interfering with the calculation results, thereby increasing the reliability of the time-based data to over 99%, providing a reliable data source for subsequent scene recognition and accurate calculations.
[0023] It should be noted that streaming acquisition refers to the real-time and continuous acquisition of data generated by multiple devices, ensuring the timeliness of the data. This acquisition method can improve the accuracy of time granularity and achieve second-level duration segmentation and statistics. Compared with the hourly or ten-minute time granularity of existing technologies, the accuracy of the settings in this application can be improved by more than 60 times. This directly supports the platform's refined operation work such as second-level fatigue driving warnings, laying the foundation for subsequent scene recognition and second-level calculations.
[0024] In another feasible approach, a timed data collection method can be used to collect multi-dimensional information from the driver's terminal, including order number, number of orders, order status, order start and end time, driver number, driver dispatch time, and driver return time. The collection frequency can be set to once every 30 seconds. After collecting the aforementioned information, data cleaning and abnormal data removal operations are performed on the collected information.
[0025] It should also be noted that the real-time performance of timed collection is slightly lower than that of streaming collection. Although a collection frequency of 30 seconds can meet the needs of second-level statistics, the time accuracy is slightly worse. Delayed cleaning may cause invalid data to occupy storage resources, which is suitable for platform scenarios with small data volume.
[0026] Step S203: Based on the order start and end time, number of orders, order status, and driver departure and arrival information, identify the scenario to which the corresponding order belongs and obtain the order type information of the corresponding order.
[0027] Here, after obtaining information such as order number, number of orders, order status, order start and end time, driver number, driver dispatch and driver return information, the corresponding scenario of the order can be identified based on the order start and end time, number of orders, order status and driver dispatch information, so as to distinguish different scenarios and provide a basis for scenario-based calculation, so as to distinguish the driver's total service time in the later stage, realize second-level split statistics, and solve the problem of time statistics deviation in complex scenarios.
[0028] Step S205: Calculate the driver's service time based on the corresponding order type information, order number, and order start and end time to obtain the driver's total service time.
[0029] Here, after obtaining the corresponding order type information, the driver's service time can be calculated based on the order type information, order number, and order start and end times to obtain the driver's total service time. It can also integrate and subdivide the duration of different types of orders according to the order number to generate detailed service reports, thereby meeting the platform's diverse operational needs such as order scheduling optimization, accurate passenger fare breakdown, and detailed evaluation of driver service quality.
[0030] As can be seen, this embodiment of the application collects user order information and driver arrival / departure information from the driver's terminal. User order information refers to all user order information from the start to the end of the driver's service, and includes at least the order number, number of orders, order status, and order start and end time. Based on the order start and end time, number of orders, order status, and driver arrival / departure information, the scenario to which the corresponding order belongs is identified to obtain the order type information of the corresponding order. Based on the order type information, order number, and order start and end time, the driver's service time is calculated to obtain the driver's total service time. The aforementioned operation, by collecting user order information and driver arrival / departure information from the driver's terminal, distinguishes the order types of corresponding orders, and then calculates the driver's total service time based on the order type, thereby improving the accuracy and precision of the calculation of the driver's total service time and enhancing the reliability of the data.
[0031] The different steps in the above method flow are described in detail below. First, step S203, namely "identifying the scene to which the corresponding order belongs based on the order start and end time, the number of orders, the order status, and the driver's departure and arrival information, and obtaining the order type information of the corresponding order", will be described in detail with reference to the embodiment.
[0032] If the driver's vehicle dispatch and pickup information indicates that the driver has dispatched a vehicle, and the order start and end times are the same, and the number of orders is 1, then the order type of the corresponding order is determined to be a normal order type; if the number of orders is multiple, then the order status of the corresponding orders is obtained; if the order status of the corresponding orders is all in the "not finished" state, then the order type of the corresponding order is determined to be a composite order type.
[0033] Here, if the driver's vehicle dispatch information indicates that the driver is dispatched (meaning the driver is in a dispatched state), and if there is only one order within the same order start and end time period, then the corresponding order type is determined to be a regular order. Specifically, the number of orders can be one or more. Within the same order start and end time period, for example, if the order starts at 10:00 and ends at 12:00, and there is only one order within that time period, then the corresponding order type is determined to be a regular order.
[0034] Within the same order start and end time period, if there are multiple orders (meaning previous orders haven't reached their final state, and other order information has emerged), the order status of the corresponding order is retrieved. Specifically, within the same order start and end time period, for example, if all orders start at 10:00 and end at 12:00, and multiple orders exist within this time period, the order status of the corresponding order is retrieved. It should be noted that retrieving the order status of the corresponding order is necessary to ensure the validity of the current order.
[0035] When all corresponding orders have an "unfinished" status, the order type is determined to be a composite order type. In one feasible approach, when all corresponding orders have an "in progress" status, the order type is determined to be a carpooling order type; when multiple orders have multiple "pick-up" statuses and one "in progress" status, the order type is determined to be a chain order type; when multiple orders have one or more "pick-up" statuses and multiple "in progress" statuses, the order type is determined to be a chain carpooling order type.
[0036] The composite order types include chain orders, carpooling orders, and chain carpooling orders. A chain order refers to a continuous sequence of orders where the driver seamlessly accepts the next order after completing the current one, with no significant empty-run interval between adjacent orders. A carpooling order refers to an independent order where the same vehicle simultaneously picks up two or more passengers, requiring sequential passenger pick-up and drop-off along a designated route. A chain carpooling order is a continuous sequence of orders where the same vehicle simultaneously picks up two or more passengers, requiring sequential passenger pick-up and drop-off along a designated route, while also seamlessly accepting the next order, with no significant empty-run interval between adjacent orders. Unfinished states include "in progress" and "pick-up in progress."
[0037] Specifically, when the order status of all corresponding orders is displayed as "in progress," it is determined that the order type of all current orders is a carpooling order. When multiple orders have multiple "pick-up" statuses and one "in progress" status, it is determined that the current corresponding orders are all linked orders. When one or more of the aforementioned orders have "pick-up" statuses and multiple "in progress" statuses, it is determined that the order type of the current corresponding orders is a linked carpooling order.
[0038] The above operations, by identifying the order type, enable accurate differentiation of various scenarios such as ordinary orders, chain orders, carpooling orders, and chain carpooling orders. This solves the problem that existing technologies cannot distinguish between complex scenarios, resulting in inaccurate service timing. It provides further assurance for the complex order business of ride-hailing platforms and the accurate calculation of driver service time.
[0039] The following describes in detail step S205, namely, "calculating the driver's service time based on the corresponding order type information, order number, and order start and end time, to obtain the driver's total service time," with reference to the embodiments.
[0040] In one feasible approach, when the order type of the corresponding order is a regular order, the driver's service time is calculated based on the start and end times of the corresponding order to obtain the driver's total service time.
[0041] Specifically, for regular ride-hailing orders, the service start time is determined by the order start time (pickup time) and the trip end time. The total number of seconds between these two times is the service duration for a single order. Each second of service is recorded as "valid service," thus yielding the driver's total service time. For example, passenger C places an order through a ride-hailing platform, and the driver accepts the order and proceeds to the pick-up location. The passenger boards the car at 9:05 AM, recording the order start time as 9:05:00 AM. The passenger disembarks at 9:20 AM, recording the trip end time as 9:20:00 AM. Therefore, the driver's total service time is (20-5)*60 = 900 seconds. The ride-hailing platform can directly output the driver's total service time as 900 seconds.
[0042] In another feasible approach, when the order type of the corresponding order is a chain order type, the effective service duration of the corresponding order and the service duration of adjacent orders are obtained based on the start and end times of the corresponding order; the driver's service duration is calculated based on the effective service duration of the order and the service duration of adjacent orders to obtain the driver's total service duration.
[0043] Among them, the effective service time of an order refers to the number of seconds that the driver actually completes the transportation service with passengers; the service time of adjacent order connection refers to the number of seconds corresponding to the effective connection segment in the chain of orders, which belongs to the connection stage of the driver's continuous service; the effective connection segment refers to the time between the time when the last passenger of the previous order gets off the bus and the time when the first passenger of the next order gets on the bus in the chain of orders.
[0044] Specifically, for chain order scenarios, the chain order sequence can be broken down into the effective service time of a single order and the service time connecting adjacent orders. The calculation of the effective service time of a single order is the same as that of a regular order. The service time connecting adjacent orders is the time from the end time of the previous order when the passenger gets off to the start time of the next order when the passenger gets on. The driver's total service time is the sum of the effective service times of the corresponding single orders plus the sum of the service times connecting adjacent orders.
[0045] For example, taking two orders as an example, the driver picks up passenger A at 9:00 AM and passenger A gets off at 9:15 AM, ending order 1. The effective service time for order 1 is (15-0)*60=900s. At 9:18 AM, the driver picks up passenger B, starting order 2. At 9:35 AM, passenger B gets off, ending order 2. The effective service time for order 2 is (35-18)*60=1020s. The service time between adjacent orders is (18-15)*60=180 seconds.
[0046] The driver's total service time is: 900 + 1020 + 180 = 2100 seconds. The ride-hailing center can record the driver's service status every second. The 900 seconds of Order 1 is marked as the effective service time of a single Order 1, the 180 seconds of the connecting segment is marked as the service time of the adjacent orders, and the 1020 seconds of Order 2 is marked as the effective service time of a single Order 2.
[0047] The above settings, by distinguishing between the effective service time of a single order and the connection service time of adjacent orders, avoid the problem of miscounting the connection service time as empty driving time or ignoring the connection service time. This reduces the statistical error of the total service time of a series of consecutive orders to less than 1 second, accurately reflecting the driver's actual service time. This solves the problem in existing technologies that do not distinguish between the "effective service time" and "connection service time" of consecutive orders. This leads to an underestimation of the driver's actual service time if the connection service time is included in the empty driving time, and an error in the statistical error of the total service time of a series of consecutive orders if the start and end times of two orders are directly combined, ignoring the reasonable time consumption of the connection service time.
[0048] In another feasible approach, when the order type of the corresponding order is a carpooling order, the order-specific service duration and the shared service duration of multiple orders are obtained based on the start and end times of the corresponding order; the driver's service duration is calculated based on the order-specific service duration and the shared service duration of multiple orders to obtain the driver's total service duration.
[0049] Specifically, for carpooling orders, the service time for a single passenger and the time for multiple passengers are broken down based on the start and end times of the corresponding order. This results in a dedicated service time for the order and a shared service time for multiple orders. The dedicated service time is the time for carrying only one passenger; the shared service time is the time for carrying two or more passengers. The seconds of the dedicated service time are directly included in the dedicated time for the corresponding passenger. The seconds of the shared service time are divided equally among the orders and included in the dedicated time for each passenger. The remaining seconds are then allocated to the dedicated time for each passenger according to the order in which the passengers boarded. Therefore, the driver's total service time is the sum of the seconds of the dedicated service time for each order and the sum of the seconds of the shared service time for multiple orders.
[0050] For example, passenger A boards at 1 PM, and passenger B boards at 2 PM, leaving passengers A and B on the bus. At 3 PM, passenger C boards and passenger A disembarks, leaving passengers B and C on the bus. At 4 PM, passenger B disembarks and passenger D boards, leaving passengers C and D on the bus. At 5 PM, passenger C disembarks, leaving only passenger D on the bus. At 6 PM, passenger D disembarks.
[0051] The calculation process for the driver's total service time is as follows: From 1:00 AM to 2:00 AM is the dedicated service time for an order, only carrying driver A, lasting 3600 seconds, which is counted as 3600 seconds of dedicated service time for driver A; From 2:00 AM to 3:00 AM is the shared service time for multiple orders, carrying drivers A and B, lasting 3600 seconds, which is divided equally among the number of orders. Driver A's dedicated service time increases by 1800 seconds, i.e., 3600 + 1800 = 5400 seconds, and driver B's dedicated service time is 1800 seconds; From 3:00 AM to 4:00 AM is the shared service time for multiple orders, carrying drivers B and C, lasting 3600 seconds, which is divided equally among the number of orders. Driver B's dedicated service time... The service duration increases by 1800 seconds, i.e., 1800 + 1800 = 3600 seconds, with C's exclusive service duration being 1800 seconds; from 4:00 to 5:00, multiple orders share the service duration, including C and D, with a duration of 3600 seconds, evenly distributed according to the number of orders, C's exclusive service duration increases by 1800 seconds, i.e., 1800 + 1800 = 3600 seconds; D's exclusive service duration is 1800 seconds; from 5:00 to 6:00, orders are dedicated to a specific service duration, only including D, with a duration of 3600 seconds, so D's exclusive service duration increases by 3600 seconds, i.e., 1800 + 3600 = 5400 seconds.
[0052] The driver's total service time is: A-exclusive service time + B-exclusive service time + C-exclusive service time + D-exclusive service time = 5400 + 3600 + 3600 + 5400 = 18000 seconds. The ride-hailing platform records the driver's service status and service recipients every second, and outputs the following service details: total driver service time 18000 seconds; A-exclusive service time 5400 seconds, including 3600 seconds of dedicated service and 1800 seconds of shared service; B-exclusive service time 3600 seconds, including 0 seconds of dedicated service and 3600 seconds of shared service; C-exclusive service time 3600 seconds, including 0 seconds of dedicated service and 3600 seconds of shared service; D-exclusive service time 5400 seconds, including 3600 seconds of dedicated service and 1800 seconds of shared service.
[0053] The above settings, by splitting the service time for a single passenger and the service time shared by multiple passengers and calculating them equally, achieve accurate calculation of the passenger's exclusive service time in carpooling scenarios, with an error rate of less than or equal to 5%. This allows the platform to accurately split passenger fees based on the exclusive service time, thus solving the problem that existing technologies calculate the total time based on the start and end times of the entire ride, without considering the differences in pick-up and drop-off times of different passengers within the same carpooling ride. This makes it impossible to split the service time for a single passenger and the service time shared by multiple passengers, and also makes it impossible to accurately calculate the exclusive service time for each passenger, thus failing to meet the need for refined statistics on carpooling service time.
[0054] In another feasible approach, when the order type of the corresponding order is a chain carpooling order, the effective service time of the corresponding order, the service time connecting adjacent orders, the service time dedicated to the order, and the service time shared by multiple orders are obtained based on the start and end times of the corresponding order. The driver's service time is then calculated based on the effective service time of the order, the service time connecting adjacent orders, the service time dedicated to the order, and the service time shared by multiple orders to obtain the driver's total service time.
[0055] Specifically, for the type of consecutive carpooling orders, based on the start and end times of the corresponding orders, the effective service time of the corresponding order, the service time connecting adjacent orders, the dedicated service time of the order, and the shared service time of multiple orders are obtained. Thus, for the consecutive order part, the calculation rules of the effective service time of the order and the service time connecting adjacent orders are adopted; for the carpooling part, the calculation rules of splitting and equally allocating the dedicated service time of the order and the shared service time of the order are adopted.
[0056] For example, if the driver picks up passenger A at 9:00 AM and passenger A gets off at 9:15 AM, order 1 ends. The effective service time for order 1 is (15 = 0) * 60 = 900 seconds. If the driver picks up passenger B at 9:18 AM, order 2 is both a linked order and the first order in a carpooling order. The service time for connecting adjacent orders in the linked order is (18 - 15) * 60 = 180 seconds. Therefore, the total service time for the linked order is 900 + 180 = 1080 seconds. At 9:25 AM, passenger C was picked up. Order 3 was the second passenger in the carpooling order. Passenger B got off at 9:35 AM, and passenger C got off at 9:40 AM. The calculation process for the carpooling portion is as follows: From 9:18 AM to 9:25 AM, the service time is dedicated to this order, carrying only passenger B, lasting 420 seconds, and is counted as B's exclusive service time. From 9:25 AM to 9:35 AM, the service time is shared by multiple orders, carrying both B and C, lasting 600 seconds, and is divided equally among B's passengers. The exclusive service time is increased by 300 seconds, that is, 420 + 300 = 720 seconds, and C's exclusive service time is 300 seconds; from 9:35 to 9:40, it is the order-exclusive service time, only for C, for 300 seconds, and C's exclusive service time is increased by 300 seconds, that is, 300 + 300 = 600 seconds. Therefore, the total service time of the carpooling order is: B's exclusive service time + C's exclusive service time = 720 + 600 = 1320 seconds.
[0057] Therefore, the total service time for the driver can be calculated as: total service time of consecutive orders + total service time of carpooling orders = 1080 + 1320 = 2400 seconds. Similarly, the ride-hailing platform records the driver's service status every second and outputs the driver's service details, including: total driver service time 2400 seconds; effective service time for order 1 900 seconds, and service time connecting adjacent orders 180 seconds; exclusive service time for order 2 720 seconds, including 420 seconds of dedicated service and 300 seconds of shared service; exclusive service time for order 3 600 seconds, including 300 seconds of dedicated service and 300 seconds of shared service.
[0058] The above operations, by comprehensively applying the calculation rules of chain orders and carpooling orders, achieve accurate time statistics in complex scenarios of chain carpooling orders, thus meeting the diversified business needs of the platform.
[0059] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this application, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Furthermore, Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0060] Figure 3 This is a schematic diagram of a device for calculating the total service time of a driver, provided in an embodiment of this application. This device can be installed in... Figure 1 The server in the application environment shown is used to perform, for example... Figure 2 The method flow is shown below. Figure 3 As shown, the device may include: a data acquisition unit 301, a type identification unit 303, and a total service time calculation unit 305. The main functions of each component module are as follows: The data collection unit 301 is used to collect user order information and driver departure and arrival information from the driver's terminal. User order information refers to the order information of all users from the start to the end of the driver's order service. User order information includes at least the order number, number of orders, order status, and order start and end time. The type recognition unit 303 is used to identify the scenario to which the corresponding order belongs based on the order start and end time, the number of orders, the order status, and the driver's departure and arrival information, so as to obtain the order type information of the corresponding order. The total service time calculation unit 305 is used to calculate the driver's service time based on the order type information, order number, and order start and end time to obtain the driver's total service time.
[0061] In one embodiment, the type identification unit 303 is further configured to: If the driver's vehicle dispatch and pickup information indicates that the driver has dispatched the vehicle, and the order has the same start and end time, and the number of orders is 1, then the order type of the corresponding order is determined to be a regular order type. If there are multiple orders, then retrieve the order status of the corresponding orders; When all the order statuses of the corresponding order are in an unfinished state, the order type of the corresponding order is determined to be a composite order type.
[0062] In one embodiment, the composite order type includes a chain order type, a carpooling order type, and a chain carpooling order type, and the unfinished state includes "in progress" and "pick-up in progress". The type identification unit 303 is also used for: When all orders for the corresponding order are in the "trip in progress" status, the order type for the corresponding order is determined to be a carpooling order. When multiple orders have multiple order statuses that are "pick-up in progress" and one that is "in progress," the order type of the corresponding order is determined to be a chain order type. When one or more of the orders are in the process of being picked up, and multiple orders are in the process of being on the trip, the order type of the corresponding orders is determined to be a chain carpooling order type.
[0063] In one embodiment, the total service duration calculation unit 305 is further configured to: When the order type is a regular order, the driver's service time is calculated based on the start and end times of the order to obtain the driver's total service time.
[0064] In one embodiment, the total service duration calculation unit 305 is further configured to: When the order type of the corresponding order is a chain order, the effective service duration of the corresponding order and the connection service duration of adjacent orders are obtained based on the start and end times of the corresponding order. The driver's total service time is calculated based on the effective service time of the order and the service time of adjacent orders.
[0065] In one embodiment, the total service duration calculation unit 305 is further configured to: When the order type of the corresponding order is a carpooling order, the order-exclusive service duration and the shared service duration of multiple orders are obtained based on the start and end times of the corresponding order. The driver's total service time is calculated based on the service time dedicated to each order and the service time shared by multiple orders.
[0066] In one embodiment, the total service duration calculation unit 305 is further configured to: When the order type of the corresponding order is a chain carpooling order, the effective service duration of the corresponding order, the service duration of adjacent order connection, the service duration of the order-specific service duration, and the service duration shared by multiple orders are obtained based on the start and end times of the corresponding order. The driver's total service time is calculated based on the effective service time of the order, the service time of adjacent orders, the service time dedicated to the order, and the service time shared by multiple orders.
[0067] According to the specific embodiments provided in this application, the technical solution provided in this application can have the following advantages: By calculating driver service time differently for different scenarios, this technology solves the problem of statistical bias in the duration of consecutive orders, carpooling orders, and consecutive carpooling orders in existing technologies. Specifically, the calculation of "effective service time + connecting service time" in consecutive order scenarios reduces the total service time statistical error to less than 1 second; the time splitting and equal distribution calculation in carpooling order scenarios achieves accurate calculation of passenger-specific time with an error rate of ≤5%; at the same time, it outputs detailed data on driver service time, such as passenger-specific service time, which not only meets the total time statistical needs of existing technologies, but also provides data support for order scheduling optimization, accurate passenger fare breakdown, and detailed evaluation of driver service quality, thus expanding the application boundaries of service time data.
[0068] The same or similar parts among the above embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0069] It should be noted that the embodiments of this application may involve the use of user data. In practical applications, user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country (e.g., explicit consent from the user, actual notification to the user, explicit authorization from the user, etc.).
[0070] According to embodiments of this application, this application also provides a computer device and a computer-readable storage medium.
[0071] like Figure 4The diagram shown is a block diagram of a computer device according to an embodiment of this application. The term "computer device" is intended to represent various forms of digital computers or mobile devices. The digital computer may include a desktop computer, a portable computer, a workbench, a personal digital assistant, a server, a mainframe computer, and other suitable computers. The mobile device may include a tablet computer, a smartphone, a wearable device, etc.
[0072] like Figure 4 As shown, the computer device 400 includes a computing unit 401, a ROM 402, a RAM 403, a bus 404, and an input / output (I / O) interface 405. The computing unit 401, ROM 402, and RAM 403 are interconnected via the bus 404. The input / output (I / O) interface 405 is also connected to the bus 404.
[0073] The computing unit 401 can execute various processes in the method embodiments of this application according to computer instructions stored in the read-only memory (ROM) 402 or computer instructions loaded from the storage unit 408 into the random access memory (RAM) 403. The computing unit 401 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. The computing unit 401 can include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. In some embodiments, the methods provided in the embodiments of this application can be implemented as computer software programs, which are tangibly contained in a computer-readable storage medium, such as the storage unit 408.
[0074] RAM 403 can also store various programs and data required for the operation of computer device 400. Part or all of the computer program can be loaded and / or installed on computer device 400 via ROM 402 and / or communication unit 409.
[0075] The input unit 406, output unit 407, storage unit 408, and communication unit 409 in the computer device 400 can be connected to the I / O interface 405. The input unit 406 can be, for example, a keyboard, mouse, touchscreen, or microphone; the output unit 407 can be, for example, a monitor, speaker, or indicator light. The computer device 400 can exchange information and data with other devices through the communication unit 409.
[0076] It should be noted that the device may also include other components necessary for normal operation. It may also include only the components necessary for implementing the solution of this application, without necessarily including all the components shown in the figures.
[0077] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof.
[0078] The computer instructions used to implement the methods of this application may be written in any combination of one or more programming languages. These computer instructions may be provided to the computing unit 401 such that when executed by the computing unit 401, such as a processor, the computer instructions cause the execution of the steps involved in the embodiments of the methods of this application.
[0079] The computer-readable storage medium provided in this application can be a tangible medium that can contain or store computer instructions for performing the steps involved in the method embodiments of this application. The computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, and other forms of storage media.
[0080] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for calculating the total service time of a driver, characterized in that, The method includes: Collect user order information and driver arrival / departure information from the driver's terminal. The user order information refers to all user order information from the start to the end of the driver's order service. The user order information includes at least the order number, number of orders, order status, and order start and end time. Based on the order start and end times, the number of orders, the order status, and the driver's departure and arrival information, the scenario to which the corresponding order belongs is identified to obtain the order type information of the corresponding order; Based on the order type information, the order number, and the order start and end times, the driver's service time is calculated to obtain the driver's total service time.
2. The method according to claim 1, characterized in that, The driver departure and arrival information includes driver departure information. Based on the order start and end times, the number of orders, the order status, and the driver departure and arrival information, the corresponding scenario of each order is identified to obtain the order type information, including: If the driver's departure and arrival information indicates that the driver has departed, and the order has the same start and end time, and the number of orders in the order is 1, then the order type of the corresponding order is determined to be a normal order type. If there are multiple orders in the order, then obtain the order status of the corresponding order; When all the order statuses of the corresponding orders are in an unfinished state, the order type of the corresponding orders is determined to be a composite order type.
3. The method according to claim 2, characterized in that, The composite order type includes chain order type, carpooling order type, and chain carpooling order type. The unfinished status includes in progress and in pick-up. When all order statuses corresponding to the order are in the unfinished status, the order type corresponding to the order is determined to be a composite order type, including: When all the order statuses for the corresponding orders are in progress, the order type for the corresponding orders is determined to be a carpooling order. When multiple orders have multiple statuses of "pick-up" and one of "trip", the order type of the corresponding order is determined to be a chain order type; When one or more of the orders are in the process of picking up passengers and multiple orders are in the process of traveling, the order type of the corresponding orders is determined to be a chain carpooling order type.
4. The method according to claim 3, characterized in that, The step of calculating the driver's service time based on the user order information and the corresponding order type information to obtain the driver's total service time includes: When the order type corresponding to the order is a regular order, the driver's service time is calculated based on the start and end times of the order to obtain the driver's total service time.
5. The method according to claim 3, characterized in that, The method further includes: When the order type of the corresponding order is a chain order type, the effective service duration of the corresponding order and the connection service duration of adjacent orders are obtained according to the start and end times of the corresponding order. The driver's service time is calculated based on the effective service time of the order and the connection service time of adjacent orders, to obtain the driver's total service time.
6. The method according to claim 3, characterized in that, The method further includes: When the order type of the corresponding order is a carpooling order, the order-exclusive service duration and the shared service duration of multiple orders are obtained based on the start and end times of the corresponding order. The driver's service time is calculated based on the order-specific service time and the shared service time of multiple orders to obtain the driver's total service time.
7. The method according to claim 3, characterized in that, The method further includes: When the order type of the corresponding order is a chain carpooling order, the effective service duration of the corresponding order, the service duration of adjacent order connection, the service duration of the order-specific service, and the service duration of multiple orders shared are obtained according to the start and end times of the corresponding order. The driver's total service time is calculated based on the effective service time of the order, the service time of the adjacent order connection, the service time of the order-specific service, and the service time of the multiple orders shared.
8. A device for calculating the total service time of a driver, characterized in that, The device includes: The data collection unit is used to collect user order information and driver start and end information from the driver's terminal. The user order information refers to the order information of all users from the start to the end of the driver's order service. The user order information includes at least the order number, the number of orders, the order status, and the order start and end time. The type identification unit is used to identify the scenario to which the corresponding order belongs based on the order start and end time, the number of orders, the order status, and the driver's departure and arrival information, so as to obtain the order type information of the corresponding order; The total service time calculation unit is used to calculate the driver's service time based on the order type information, the order number, and the order start and end time, so as to obtain the driver's total service time.
9. A computer device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores computer instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions thereon, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 7.