A real-time statistics method for driver online time
By 30-second batch division and minute accuracy segmentation of online ride-hailing driver data, the driver's duration indicators are calculated in real time and divided into minute dimensions, the problem of insufficient timeliness of data processing in the existing technology is solved, and real-time statistics of driver's online duration and business operation efficiency are improved.
Patent Information
- Application Number
- CN202411692921.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-04-01
AI Technical Summary
In the operation of online ride-hailing, due to insufficient timeliness of data processing, real-time statistics of important indicators such as drivers' online time are difficult to achieve, and the value of near-line data cannot be fully utilized.
By obtaining the status information containing time tags uploaded by the driver's side, dividing it in batches in 30 seconds, and dividing the data in the same batch based on minute accuracy, the driver's duration indicators within 30 seconds are calculated in real time, including online duration, service duration and idle duration, and dividing these indicators into minute dimensions.
Real-time statistics of drivers' online time and other indicators are realized, real-time data acquisition is improved, and the business operation needs for early insights and analysis results are met, operating costs are reduced, and operational efficiency is improved.
Smart Images

Figure CN119740997A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of online car-hailing operation, and in particular to a real-time statistics method for drivers' online time. Background Art
[0002] During the operation of online ride-hailing services, indicators such as the driver's online time, service time, and idle time are important bases for judging the driver's efficiency. As refined operations become more and more important, the requirements for the effectiveness of indicator statistics are also getting higher and higher. However, due to the lack of timeliness in current data processing, the value of near-line data cannot be fully utilized.
[0003] Currently, the driver-side APP reports status information every 4-10 seconds and calculates relevant indicators based on the data reported on that day. However, due to the large amount of data and the limitations of the technical architecture, it takes the next day to calculate the relevant indicators of the driver's working time. As the demand for refined operations continues to increase, the output indicators on the second day are difficult to meet the needs of business operations. The sooner the data is understood and the sooner the analysis indicator results are obtained, the more opportunities can be seized. Summary of the invention
[0004] The purpose of the present invention is to provide a real-time statistics method for drivers' online time to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A real-time statistics method for driver online time, the method comprising:
[0007] Obtain the status information with time tags uploaded by the driver, divide it into batches of 30 seconds, and obtain status information of different batches;
[0008] Split the data in the same batch based on minute precision;
[0009] Real-time calculation of driver time indicators within 30 seconds; the time indicators include online time, service time and idle time;
[0010] Divide the duration metrics into minutes.
[0011] Furthermore, the step of calculating the driver's driving time index within 30 seconds in real time includes:
[0012] Generate an indicator calculation instruction every 30 seconds according to the preset time trigger;
[0013] Query the driver's time in the current minute to determine whether the driver is online;
[0014] Based on the judgment result, the time interval between two reports is calculated, and the time interval is accumulated to obtain the calculation duration;
[0015] Stores calculation results.
[0016] Furthermore, the step of dividing the duration index into minute dimensions includes:
[0017] Query the driver's time in the current minute to determine whether the driver is online;
[0018] When the driver is online, the time interval between two reports is calculated, and the time interval is accumulated to calculate the duration
[0019] When the driver is not online, query the driver's time in the previous minute to determine whether the driver is online;
[0020] When the driver was online in the previous hour, the time interval between the two reports was calculated to determine whether the interval exceeded 60 seconds;
[0021] When the interval does not exceed 60 seconds, the time interval between two reports is divided into the corresponding minute dimension.
[0022] Furthermore, the method further comprises:
[0023] The driver time index calculation process is executed in a loop until the preset loop exit condition is met.
[0024] The technical solution of the present invention also provides a real-time statistics system for driver online time, the system comprising:
[0025] The information division module is used to obtain the status information with time tags uploaded by the driver, divide it into batches of 30 seconds, and obtain status information of different batches;
[0026] Data segmentation module, used to segment data in the same batch based on minute accuracy;
[0027] The time index calculation module is used to calculate the driver's time index within 30 seconds in real time; the time index includes online time, service time and idle time;
[0028] The duration division module is used to divide the duration indicators into minute dimensions.
[0029] Furthermore, the duration index calculation module includes:
[0030] An instruction generation unit, used to generate an indicator calculation instruction every 30 seconds according to a preset time trigger;
[0031] Online judgment unit, used to query the driver's time in the current minute and determine whether the driver is online;
[0032] A time accumulation unit, used to calculate the time interval between two reports based on the judgment result, accumulate the time interval, and obtain the calculation duration;
[0033] The result storage unit is used to store calculation results.
[0034] Furthermore, the duration division module includes:
[0035] The query unit is used to query the driver's time in the current minute and determine whether the driver is online;
[0036] The calculation unit is used to calculate the time interval between two reports when the driver is online, and the time interval is accumulated to calculate the duration.
[0037] The judgment unit is used to query the driver's time in the previous minute to judge whether the driver is online when the driver is not online;
[0038] The comparison unit is used to calculate the time interval between two reports when the driver was online in the previous hour, and determine whether the interval exceeds 60 seconds;
[0039] The division unit is used to divide the time interval between two reports into the corresponding minute dimension when the interval does not exceed 60 seconds.
[0040] Furthermore, the working contents of the system also include:
[0041] The driver time index calculation process is executed in a loop until the preset loop exit condition is met.
[0042] Compared with the prior art, the beneficial effects of the present invention are: the present invention obtains data every 4 seconds, divides the data into small batches, and calculates it once every 30 seconds. If the driver reports 5 times within 30 seconds, then the driver's online time within 30 seconds is 16 seconds. Then, based on the time reported by the driver, the 16 seconds of the driver's online time is divided into minute dimensions. The real-time nature of data acquisition is strong, which improves business operation efficiency and realizes the function of reducing costs and increasing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.
[0044] Figure 1 This is a flowchart of the real-time statistics method for drivers’ online time. DETAILED DESCRIPTION
[0045] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0046] Figure 1The figure is a flowchart of the in-link process of the real-time statistics method of the driver's online time. In an embodiment of the present invention, a real-time statistics method of the driver's online time is provided, and the method includes:
[0047] Obtain the status information with time tags uploaded by the driver, divide it into batches of 30 seconds, and obtain status information of different batches;
[0048] Split the data in the same batch based on minute precision;
[0049] Real-time calculation of driver time indicators within 30 seconds; the time indicators include online time, service time and idle time;
[0050] Divide the duration metrics into minutes.
[0051] In an example of the technical solution of the present invention, a specific application example is provided as follows:
[0052] The driver-side APP reports data every 4 seconds, divides the data into small batches, and calculates it every 30 seconds. If the driver reports 5 times within 30 seconds, then the driver's online time within 30 seconds is 16 seconds. Then, based on the driver's reporting time, the 16 seconds of the driver's online time is divided into minutes (the driver's 5 reporting times are 2024-09-0512:10:58, 2024-09-0512:11:02, 2024-09-0512:11:06, 2024-09-0512:11:10, 2024-09-0512:11:14, and the final calculation result is that the online time at 12:10 is 2 seconds, and the online time at 12:11 is 14 seconds).
[0053] The step-by-step process of the above content is:
[0054] 1. Data batch division: divide the data into batches of 30 seconds;
[0055] 2. Determine how many minutes of data a batch contains;
[0056] 3. Real-time calculation of driver duration indicators within 30 seconds;
[0057] 4. The duration indicator is divided into the corresponding minute dimension.
[0058] Furthermore, the step of calculating the driver's driving time index within 30 seconds in real time includes:
[0059] Generate an indicator calculation instruction every 30 seconds according to the preset time trigger;
[0060] Query the driver's time in the current minute to determine whether the driver is online;
[0061] Based on the judgment result, the time interval between two reports is calculated, and the time interval is accumulated to obtain the calculation duration;
[0062] Stores calculation results.
[0063] The step of dividing the duration indicator into minute dimensions includes:
[0064] Query the driver's time in the current minute to determine whether the driver is online;
[0065] When the driver is online, the time interval between two reports is calculated, and the time interval is accumulated to calculate the duration
[0066] When the driver is not online, query the driver's time in the previous minute to determine whether the driver is online;
[0067] When the driver was online in the previous hour, the time interval between the two reports was calculated to determine whether the interval exceeded 60 seconds;
[0068] When the interval does not exceed 60 seconds, the time interval between two reports is divided into the corresponding minute dimension.
[0069] The above process is actually a cyclic process, and the method further comprises:
[0070] The driver time index calculation process is executed in a loop until the preset loop exit condition is met.
[0071] In an example of the technical solution of the present invention, a specific implementation scheme is provided as follows:
[0072] Step 1: Divide data into batches and trigger calculation every 30 seconds;
[0073] Step 2: Query the driver's working time in the current minute to determine whether the driver is online;
[0074] Step 3_1: Yes, calculate the time interval between two reports, and add the time intervals to calculate the duration;
[0075] Step 3_2: No, query the driver's time in the previous minute to determine whether the driver is online;
[0076] Step 3_2_1: No, do not calculate;
[0077] Step 3_2_2: Yes, calculate the time interval between two reports and determine whether the interval exceeds 60 seconds;
[0078] Step 3_2_2_1: Yes, no calculation is done;
[0079] Step 3_2_2_2: No, divide the time interval between two reports into the corresponding minute dimension;
[0080] Step 4: Calculate and store the results;
[0081] Step 5: The calculation process of the next batch of data is the same as steps 2, 3, and 4;
[0082] Step 6: Obtain indicator results to support refined business operations.
[0083] In an example of the technical solution of the present invention, the technical solution of the present invention also provides a specific real-time statistics system for online time of drivers, as follows:
[0084] The information division module is used to obtain the status information with time tags uploaded by the driver, divide it into batches of 30 seconds, and obtain status information of different batches;
[0085] Data segmentation module, used to segment data in the same batch based on minute accuracy;
[0086] The time index calculation module is used to calculate the driver's time index within 30 seconds in real time; the time index includes online time, service time and idle time;
[0087] The duration division module is used to divide the duration indicators into minute dimensions.
[0088] Furthermore, the duration index calculation module includes:
[0089] An instruction generation unit, used to generate an indicator calculation instruction every 30 seconds according to a preset time trigger;
[0090] Online judgment unit, used to query the driver's time in the current minute and determine whether the driver is online;
[0091] A time accumulation unit, used to calculate the time interval between two reports based on the judgment result, accumulate the time interval, and obtain the calculation duration;
[0092] The result storage unit is used to store calculation results.
[0093] Specifically, the duration division module includes:
[0094] The query unit is used to query the driver's time in the current minute and determine whether the driver is online;
[0095] The calculation unit is used to calculate the time interval between two reports when the driver is online, and the time interval is accumulated to calculate the duration.
[0096] The judgment unit is used to query the driver's time in the previous minute to judge whether the driver is online when the driver is not online;
[0097] The comparison unit is used to calculate the time interval between two reports when the driver was online in the previous hour, and determine whether the interval exceeds 60 seconds;
[0098] The division unit is used to divide the time interval between two reports into the corresponding minute dimension when the interval does not exceed 60 seconds.
[0099] In one example of the technical solution of the present invention, the working content of the system also includes:
[0100] The driver time index calculation process is executed in a loop until the preset loop exit condition is met.
[0101] The functions that can be achieved by the real-time statistics method for the driver's online time are all completed by a computer device. The computer device includes one or more processors and one or more memories. The one or more memories store at least one program code. The program code is loaded and executed by the one or more processors to achieve the functions of the real-time statistics method for the driver's online time.
[0102] The processor takes out instructions from the memory one by one, analyzes the instructions, and then completes the corresponding operations according to the instruction requirements, generating a series of control commands, so that the various parts of the computer can automatically, continuously and coordinately move to become an organic whole, realize the input of programs, the input of data, and the calculation and output of results. The arithmetic operations or logical operations generated in this process are all completed by the operator; the memory includes a read-only memory (ROM), which is used to store computer programs, and a protection device is provided outside the memory.
[0103] Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to implement the present invention. One or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in a terminal device.
[0104] Those skilled in the art will understand that the description of the above service equipment is merely an example and does not constitute a limitation on the terminal equipment. It may include more or fewer components than described above, or a combination of certain components, or different components, for example, it may include input and output devices, network access devices, buses, etc.
[0105] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire user terminal.
[0106] The above-mentioned memory can be used to store computer programs and / or modules, and the above-mentioned processor realizes various functions of the above-mentioned terminal device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as an information collection template display function, a product information release function, etc.), etc.; the data storage area can store data created according to the use of the berth status display system (such as product information collection templates corresponding to different product types, product information that different product providers need to release, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0107] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the modules / units in the above-mentioned embodiment system, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can realize the functions of the above-mentioned various system embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0108] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0109] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A real-time statistics method for driver online time, characterized in that: The method comprises: Obtain the status information with time tags uploaded by the driver, divide it into batches of 30 seconds, and obtain status information of different batches; Split the data in the same batch based on minute precision; Real-time calculation of driver time indicators within 30 seconds; the time indicators include online time, service time and idle time; Divide the duration metrics into minutes.
2. The real-time statistics method for driver online time according to claim 1 is characterized in that: The step of calculating the driver's time index within 30 seconds in real time includes: Generate an indicator calculation instruction every 30 seconds according to the preset time trigger; Query the driver's time in the current minute to determine whether the driver is online; Based on the judgment result, the time interval between two reports is calculated, and the time interval is accumulated to obtain the calculation duration; Stores calculation results.
3. The real-time statistics method for driver online time according to claim 2 is characterized in that: The step of dividing the duration indicator into minute dimensions includes: Query the driver's time in the current minute to determine whether the driver is online; When the driver is online, the time interval between two reports is calculated, and the time interval is accumulated to calculate the duration When the driver is not online, query the driver's time in the previous minute to determine whether the driver is online; When the driver was online in the previous hour, the time interval between the two reports was calculated to determine whether the interval exceeded 60 seconds; When the interval does not exceed 60 seconds, the time interval between two reports is divided into the corresponding minute dimension.
4. The real-time statistics method for driver online time according to claim 1 is characterized in that: The method further comprises: The driver time index calculation process is executed in a loop until the preset loop exit condition is met.
5. A real-time statistics system for driver online time, characterized in that: The system comprises: The information division module is used to obtain the status information with time tags uploaded by the driver, divide it into batches of 30 seconds, and obtain status information of different batches; Data segmentation module, used to segment data in the same batch based on minute accuracy; The time index calculation module is used to calculate the driver's time index within 30 seconds in real time; the time index includes online time, service time and idle time; The duration division module is used to divide the duration indicators into minute dimensions.
6. The real-time statistics method for driver online time according to claim 5 is characterized in that: The duration index calculation module includes: An instruction generation unit, used to generate an indicator calculation instruction every 30 seconds according to a preset time trigger; Online judgment unit, used to query the driver's time in the current minute and determine whether the driver is online; A time accumulation unit, used to calculate the time interval between two reports based on the judgment result, accumulate the time interval, and obtain the calculation duration; The result storage unit is used to store calculation results.
7. The real-time statistics method for driver online time according to claim 6 is characterized in that: The duration division module comprises: The query unit is used to query the driver's time in the current minute and determine whether the driver is online; The calculation unit is used to calculate the time interval between two reports when the driver is online, and the time interval is accumulated to calculate the duration. The judgment unit is used to query the driver's time in the previous minute to judge whether the driver is online when the driver is not online; The comparison unit is used to calculate the time interval between two reports when the driver was online in the previous hour, and determine whether the interval exceeds 60 seconds; The division unit is used to divide the time interval between two reports into the corresponding minute dimension when the interval does not exceed 60 seconds.
8. The real-time statistics method for driver online time according to claim 5 is characterized in that: The system also includes: The driver time index calculation process is executed in a loop until the preset loop exit condition is met.