Travel fee calculation method and system based on stepped commission extraction
By collecting and processing order settlement data in the order system on the online car rental platform, and using the user definition function to calculate the itinerary fee after the ladder commission, solve the problem of incorrect problem calculation errors caused by incomplete configuration in the existing technology. , Achieve more accurate and efficient itinerary calculations.
Patent Information
- Application Number
- CN202411292196.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-21
AI Technical Summary
When the existing itinerary fee calculation system based on ladder commission is processed, if the commission data is configured for only one service type, the commission type cannot be calculated correctly, which affects the data accuracy and the fairness of driver's income. sex.
By collecting order settlement data in real time or regularly or regularly in the order system of the online car rental platform, data cleaning and pre -processing are merged, and the multi -line staircase dispatched configuration data is merged, and the itinerary fee is adjusted according to the price change, refund and appeal amount. Then, the processed data is passed into the user -defined function (UDF), resolved the data of the commission configuration, obtained the number and proportion of the commissioned democracy of each ladder, calculated the cost of the commission and accumulated it.
It realizes the adaptive acquisition of other types of configuration data under the framework of ladder commission technology, avoids data calculation errors, improves the accuracy and efficiency of data processing, and ensures the fairness of driver income and the accuracy of calculations.
Smart Images

Figure CN119338532A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of online car-hailing, and in particular to a method for calculating travel fees for online car-hailing, and in particular to a method and system for calculating travel fees based on a tiered commission system. Background Art
[0002] Within the operational framework of the online car-hailing industry, the calculation mechanism of trip fees constitutes a core component of the driver service process. Its importance is not only reflected in the accuracy of market positioning, but also has a profound impact on the driver's refined operation strategy and the improvement of driver stickiness, activity, service quality and income level. Although the traditional single commission model has certain advantages in ease of operation and calculation efficiency, it is difficult to adapt to the complex and changing market environment and personalized calculation needs. Therefore, the current trip fee calculation system and method based on tiered commission is particularly important.
[0003] The core logic of the tiered commission system lies in its flexibility and adaptability. By setting a multi-level commission ladder, it aims to balance the interests of both the platform and the driver in different application scenarios. Specifically, the system configures the commission ratio preset by the platform, combined with key information such as the trip fee and starting price in the order details, and triggers the calculation process when the order is completed (that is, the order status reaches 95000). The system first extracts the relevant dimensional information of the order, including channel, business type, service type, city, platform and driver type, and matches it with the configuration data preset by the platform. Its logic is:
[0004] For example, when the order is in the 95000 status, that is, when the order is completed, the relevant information on the order (channel, business type, service type, city, platform, driver type) is taken to match the configuration data set by the platform. At the same time, the commission configuration data is specifically formatted and converted into a format that can be recognized by the program, such as "0,-2,78; -2,23,75; 23,45,72; 45,-1,70", where "-2" represents the starting price range, "0,-2,78" represents that the commission rate for the trip fee in the range of 0 to the starting price is 78%, "-2,23,75" means that the commission rate is 75% for the range from the starting price to 23 yuan, and so on, until "45,-1,70" means that the commission rate is 70% for the range above 45 yuan. This mechanism allows the commissioned fees to be calculated separately according to the different tiered intervals of the trip fee amount, and the calculation results of each tier are accumulated to obtain the final tiered commissioned trip fee.
[0005] However, the effective implementation of the current tiered commission calculation logic is highly dependent on the integrity and accuracy of the platform configuration data. If the platform provides multiple service types (such as ordinary cars, airport pick-up cars, airport drop-off cars, chartered cars, etc.), but only configures commission data for one of them (such as ordinary cars), other service types will not be able to calculate commissions correctly due to lack of corresponding configuration, which will affect data accuracy and fairness of drivers' earnings.
[0006] To this end, the present invention proposes a method and system for calculating travel expenses based on a stepped commission. Summary of the invention
[0007] In view of this, the present invention hopes to provide a method and system for calculating trip fees based on tiered commissions to solve or alleviate the technical problems existing in the prior art, namely, how to adaptively obtain other types of configuration data under the technical framework based on tiered commissions to avoid data calculation errors, and at least provide a beneficial option for this; the technical solution of the present invention is implemented as follows:
[0008] First, a method for calculating trip fees based on a tiered commission:
[0009] 1. Overview:
[0010] The present invention aims to solve the problem of adaptive configuration data acquisition in the tiered commission calculation of the online car-hailing platform, and ensure the accuracy and efficiency of the commission calculation by implementing a series of data processing processes. The solution first collects order settlement data in real time or regularly from the order system of the online car-hailing platform, including key information such as service type, trip fee, price change amount, refund amount, appeal amount, starting price and commission configuration. Subsequently, the data is cleaned and preprocessed, multiple rows of tiered commission configuration data are merged, and the trip fee is adjusted to consider the impact of price change, refund and appeal. The processed data is passed to the user-defined function (UDF) for commission calculation. The UDF calculates the commission-posted fee and accumulates it according to the different tiered intervals of the trip fee amount and the corresponding commission rules. Finally, the calculated trip fee after the tiered commission is output to the designated storage location or database table for platform use and analysis.
[0011] (II) Technical solution:
[0012] In order to achieve the above technical objectives, the present invention selects to execute the following operation steps.
[0013] 2.1 Step S1, data collection:
[0014] Collect order settlement data from ODPS in real time or periodically to form data set D.
[0015] The required fields for collected order settlement data include:
[0016] Service Types t , travel fee f 、Price change amount p ca 、The party responsible for price change cp 、Refund amount a 、Refund Provider p 、Amount of complaint c a , starting price p and commission configuration c c ;
[0017] The data set D is: D = {(s t ,t f ,p ca ,p cp ,r a ,r p ,c a ,s p ,c c )|i=1,2,…,n};
[0018] Where n represents the number of collected order settlement data.
[0019] 2.2 Step S2, preprocessing:
[0020] Combine multiple rows of tiered commission configuration data from dataset D into one row. Adjust the trip fare based on the price change, refund, and appeal amount to get the final trip fare amount used for calculation.
[0021] 2.2.1 Step S200, merging:
[0022] Each commission configuration cc i is a list containing multiple ladder configurations, where each ladder configuration is a tuple: cc i =[lower limit of tier, upper limit of tier, commission ratio];
[0023] For each commission configuration cc i Perform the merge operation to obtain the merged tiered commission configuration cc i ′.
[0024] 2.2.2 Step S201, adjustment:
[0025] Adjust the trip fee according to the price change, refund and appeal amount to get the final trip fee amount used for calculation tf i ′:
[0026]
[0027] Among them, p cai is the i-th price change amount, r pi is the i-th refund undertaker, rai is the i-th refund amount, c ai is the i-th complaint amount.
[0028] 2.3 Step S3, data calculation:
[0029] The processed travel fee amount is passed as a parameter to the UDF function to parse the commission configuration data and obtain the commission rules and ratios for each tier.
[0030] According to the different levels of the itinerary fee amount, the fees after commission are calculated separately and accumulated according to logic.
[0031] 2.3.1 Step S300, obtain the commission rules and ratios for each tier:
[0032] The processed travel fee amount is passed as a parameter to the UDF function to parse the commission configuration data and obtain the commission rules and ratios for each tier.
[0033] The first UDF function definition: commission rules =parse commission config (cc);
[0034] Among them: the input is the commission configuration data cc; the output is the parsed commission rule list commission rules , where each element is a tuple containing the step lower limit, step upper limit and commission rate. The algorithm is as follows:
[0035]
[0036] 2.3.2 Step S301, accumulation:
[0037] The second UDF function definition: total commission =calculate commission (tf',commission rules );
[0038] The input is the processed trip fee amount tf' and the parsed commission rule list commission rules ; Output is the total commission fee total commission ; The algorithm form is:
[0039]
[0040] That is, first initialize the total commission fee total commission Set to 0 and set the remaining fee remaining feeis the processed trip fee amount tf'. Then, traverse the parsed commission rule list commission rules , for each step interval, determine whether the remaining fee falls within the interval, and calculate the commission fee according to the commission ratio, add it to the total commission fee, and update the remaining fee. If the remaining fee is less than the lower limit of the current step, jump out of the loop. Finally, return the total commission fee.
[0041] 2.4 Step S4, result output:
[0042] The calculated trip fee after the tiered commission is output to a specified storage location or database table.
[0043] (III) Mechanism for solving technical problems:
[0044] The UDF function implements the calculation logic of the tiered commission, such as charging a certain percentage when the trip fee is less than the starting price, charging a percentage when the trip fee is within a certain tiered range, etc. The commission fees between different tiers are accumulated through loops or conditional judgment statements. The platform can perform operations such as driver settlement, fee statistics, and data analysis based on the calculation results to ensure the accuracy and efficiency of the tiered commission calculation.
[0045] In addition, this solution supports dynamic acquisition and update of tiered commission configuration data, ensuring that the latest configuration information can be referenced in real time during the calculation process. It can flexibly respond to changes in tiered commission configurations for different service types and time periods to avoid data calculation errors.
[0046] Second, a system for calculating trip fees based on a tiered commission system:
[0047] The system includes a processor and a memory connected to the processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the processor executes the trip fee calculation method as described above. The processor is also connected to:
[0048] (1) A data collection module for collecting order settlement data from the order system of the online ride-hailing platform in real time or periodically;
[0049] The order settlement data includes the service type and its corresponding itinerary fee, price change amount, price change bearer, refund amount, refund bearer, appeal amount, starting price, and commission configuration. The output forms data set D for use in subsequent steps.
[0050] (2) a preprocessing module for cleaning and transforming the dataset D;
[0051] Responsible for cleaning the dataset D and removing invalid or erroneous records. Merge multiple rows of tiered commission configuration data into one row for easy subsequent processing. Adjust the trip fee according to the price change, refund and appeal amount to obtain the final trip fee amount used for calculation.
[0052] The output forms a cleaned and transformed dataset D', where each record contains a valid trip fare amount and commission configuration.
[0053] (3) a data calculation module for calculating the travel fee after commission for each order;
[0054] Responsible for passing the processed trip fee amount as a parameter to the UDF function, parsing the commission configuration data, and obtaining the commission rules and ratios for each tier. According to the different tiers of the trip fee amount, the commissioned fees are calculated separately and accumulated according to the logic.
[0055] The output forms the commissioned trip fee for each order.
[0056] (4) an output module for outputting the calculated trip fare after the tiered commission to a designated storage location or database table;
[0057] Responsible for organizing the commissioned trip costs for each order into an appropriate format. Output the results to a specified storage location or database table for subsequent analysis and use. Also stores the tiered commissioned trip cost data in the database table.
[0058] Compared with the prior art, the present invention has the following beneficial effects:
[0059] 1. Improve the accuracy and efficiency of data processing: The present invention ensures the quality and consistency of data by collecting order settlement data of online ride-hailing platforms in real time or regularly, and performing cleaning and preprocessing. It can adaptively obtain and update the tiered commission configuration data to ensure that the latest configuration information can be referenced in real time during the calculation process. The UDF function can flexibly respond to changes in tiered commission configurations for different service types and different time periods.
[0060] 2. Optimize the calculation logic of commission: The UDF function implements the calculation logic of tiered commission, which can accurately calculate the commission fees in different tiered intervals and accumulate them, avoiding errors and omissions that may be caused by traditional manual calculations or simple script processing.
[0061] 3. Improve business operation efficiency and driver settlement experience: Accurate commission calculation results provide the platform with a reliable settlement basis, reducing disputes caused by calculation errors. It improves the timeliness and accuracy of driver settlement, and improves driver satisfaction and loyalty. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0063] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0064] Figure 2 It is a schematic diagram of the system composition of the present invention. DETAILED DESCRIPTION
[0065] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;
[0066] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0067] Terminology explanation:
[0068] (1) Ordinary commission: The platform can set the commission ratio for drivers in the management background. For example, platform A sets the commission ratio for drivers to be 70%, the platform to be 30%, and the transportation company to be 0%. The commission ratio for drivers is 70%, which means that no matter how much profit the driver makes from this order, he can only get 70% of the trip fee for this order. For example, if the trip fee for an order is 100 yuan, the driver will settle 100*70%=70 yuan.
[0069] (2) Tiered commission: Different from ordinary commission, different commission ratios are set according to different amounts. For example, platform B sets the driver commission from 0 to the starting price, 80%; from the starting price to 50, 78%, from 50 to 100, 76%, and above 100, 70%; for another example, the starting price of an order in city C is 15 yuan, and the order trip fee is 100 yuan. According to the above commission configuration, the driver's income is: 15*80%+(50-15)*78%+(100-50)*76%=77.3 yuan.
[0070] (3) Trip fee: the sum of mileage fees, time fees, waiting fees, etc. incurred by the driver during the service process.
[0071] (4) Starting price: It refers only to the price within the starting mileage. Because the consumption levels in different regions of the country are different, the starting price in each region is also different. Generally, the starting price includes 3 kilometers or 2.5 kilometers. The specific mileage varies from region to region and depends on the actual situation.
[0072] (5) ODPS: An Alibaba Cloud commercial data warehouse tool, also called Maxcompute. It includes functions such as data storage, data computing, task scheduling, and metadata management.
[0073] (6) UDF function: A data processing logic developed in ODPS (or other data processing tools such as Hive) using a user-defined function (UserDefinedFunction) written in languages such as Java or Python.
[0074] Embodiment 1: Figure 1 As shown, this embodiment will provide a method for calculating travel expenses based on a tiered commission, and its specific implementation method is as follows.
[0075] In this embodiment, regarding step S1, data collection:
[0076] Collect order settlement data from ODPS in real time or periodically to form a data set D, which is as follows:
[0077]
[0078] Among them, each order settlement data includes fields such as service type, itinerary fee, price change amount, party responsible for price change, refund amount, party responsible for refund, appeal amount, starting price and commission configuration.
[0079] In this embodiment, regarding step S2: pre-processing:
[0080] (1) Merge: For each commission configuration cc i , perform the merge operation and obtain the merged step commission configuration cci'.
[0081] For example, for the commission configuration of the first order [(0, starting price, 0.79), (starting price, 50, 0.76), (50, 100, 0.75), (100, +∞, 0.70)], the merged tiered commission configuration is still [(0, 20, 0.79), (20, 50, 0.76), (50, 100, 0.75), (100, +∞, 0.70)] (assuming the starting price is 20).
[0082] (2) Adjustment: Adjust the trip fee based on the price change, refund, and appeal amount to obtain the final trip fee amount used for calculation tf i '.
[0083] For example, for the first order, the adjusted itinerary fare amount is 100-0+0=100 (the price change and refund are borne by the passenger or the platform and do not affect the itinerary fare).
[0084] In this embodiment, regarding step S3, data calculation: the processed travel fee amount is passed as a parameter to the UDF function to parse the commission configuration data and obtain the commission rules and ratios of each tier.
[0085] According to the different levels of the itinerary fee amount, the fees after commission are calculated separately and accumulated according to logic.
[0086] Specifically, step S300, obtain the commission rules and ratios for each tier:
[0087] The processed travel fee amount is passed as a parameter to the UDF function to parse the commission configuration data and obtain the commission rules and ratios for each tier.
[0088] The first UDF function definition: commission rules =parse commission config (cc);
[0089] Among them: the input is the commission configuration data cc; the output is the parsed commission rule list commission rules , where each element is a tuple containing the step lower limit, step upper limit and commission rate.
[0090] For example, for the first order, the parsed commission rule list is [(0,20,0.79),(20,50,0.76),(50,100,0.75),(100,+∞,0.70)].
[0091] The algorithm form is:
[0092]
[0093] Specifically, step S301, accumulation:
[0094] The second UDF function definition: total commission =calculate commission (tf',commission rules );
[0095] For example, for the first order, the total commission fee is 20*0.79+(50-20)*0.76+(100-50)*0.75=15.8+22.8+37.5=76.1.
[0096] The input is the processed trip fee amount tf' and the parsed commission rule list commission rules ; Output is the total commission fee total commission ; The algorithm form is:
[0097]
[0098]
[0099] That is, first initialize the total commission fee total commission Set to 0 and set the remaining fee remaining fee The processed trip fee amount tf' is then traversed through the parsed commission rule list commission rules , for each step interval, determine whether the remaining fee falls within the interval, and calculate the commission fee according to the commission ratio, add it to the total commission fee, and update the remaining fee. If the remaining fee is less than the lower limit of the current step, jump out of the loop. Finally, return the total commission fee.
[0100] For further example, the commission configuration data is parsed to obtain the commission rules and ratios for each level, and then the commissioned trip fee is processed in a loop. For example, 0-starting price P, the commission is 79%; starting price -50, the commission is 76%; 50-100, the commission is 75%; above 100, the commission is 70%. Then execute the following steps:
[0101] (1) When the trip fee A is less than the starting price P, the trip fee after commission is C = A*79%;
[0102] (2) When the trip fee A is greater than the starting price P and is equal to 50, the trip fee after commission is C = P*79% + (50-A)*76%;
[0103] (3) When the trip fee A is between 50 and 100 (left open and right closed), the trip fee after commission is C = P*79% + (50-P)*76% + (A-50)*75%;
[0104] (4) When the trip fee A is greater than 100, the trip fee after commission is C = P*79% + (50-P)*76% + (100-50)*75% + (A-100)*70%.
[0105] In this embodiment, regarding step S4, the result output is: the calculated tiered commissioned trip fee is output to a designated storage location or database table. For example, the commissioned trip fee of the first order, 93.9 (100-76.1+10-5=93.9, where 10 is the refund amount and 5 is the price change amount borne by the platform), can be output to a designated database table.
[0106] In this embodiment, the Python implementation program of the above steps S1 to S4 in ODPS is as follows:
[0107]
[0108]
[0109]
[0110]
[0111] The execution logic of the above program is:
[0112] P1. Use the ODPS Python SDK to connect to the ODPS service;
[0113] P2. Read order settlement data from the ODPS table;
[0114] P3. Use Python UDF and ODPS SQL to pre-process data, including merging tiered commission configuration and adjusting trip fees;
[0115] P4. Use Python UDF and ODPS SQL to calculate the commission fee for each order and obtain the trip fee after the commission;
[0116] P5. Output the results to a CSV file or ODPS table.
[0117] The principle of the above program is to connect to the ODPS service through the ODPS Python SDK and read the order settlement data from the specified table. Use the Python UDF MergeCommissionConfig to merge the tiered commission configuration. This UDF needs to parse the commission configuration in string form and return the merged configuration list. Then use ODPS SQL to further pre-process the data, including adjusting the trip fee according to the price change, refund, and appeal amount.
[0118] The principle of data calculation is: use Python UDF CalculateCommission to parse the commission configuration data and calculate the total commission fee based on the adjusted trip fee. Use ODPSSQL to call this UDF to calculate the commission fee for each order and get the trip fee after commission.
[0119] Finally, the calculation results are output to a CSV file or ODPS table for subsequent analysis and use.
[0120] Embodiment 2: Figure 2 As shown, based on the first embodiment, this embodiment further discloses a trip fee calculation system based on a stepped commission:
[0121] The system includes a processor and a memory connected to the processor, wherein the memory stores program instructions, and when the program instructions are executed by the processor, the processor executes the trip fee calculation method as described above. The processor is also connected to:
[0122] (1) A data collection module for collecting order settlement data from the order system of the online ride-hailing platform in real time or periodically;
[0123] The order settlement data includes the service type and its corresponding itinerary fee, price change amount, price change bearer, refund amount, refund bearer, appeal amount, starting price, and commission configuration. The output forms data set D for use in subsequent steps.
[0124] (2) a preprocessing module for cleaning and transforming the dataset D;
[0125] Responsible for cleaning the dataset D and removing invalid or erroneous records. Merge multiple rows of tiered commission configuration data into one row for easy subsequent processing. Adjust the trip fee according to the price change, refund and appeal amount to obtain the final trip fee amount used for calculation.
[0126] The output forms a cleaned and transformed dataset D', where each record contains a valid trip fare amount and commission configuration.
[0127] (3) a data calculation module for calculating the travel fee after commission for each order;
[0128] Responsible for passing the processed trip fee amount as a parameter to the UDF function, parsing the commission configuration data, and obtaining the commission rules and ratios for each tier. According to the different tiers of the trip fee amount, the commissioned fees are calculated separately and accumulated according to the logic.
[0129] The output forms the commissioned trip fee for each order.
[0130] (4) an output module for outputting the calculated trip fare after the tiered commission to a designated storage location or database table;
[0131] Responsible for organizing the commissioned trip costs for each order into an appropriate format. Output the results to a specified storage location or database table for subsequent analysis and use. Also stores the tiered commissioned trip cost data in the database table.
[0132] All the above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
[0133] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0134] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Claims
1. A method for calculating trip costs based on a tiered commission, characterized in that: The following steps are included: S1, collects order settlement data from ODPS in real time or regularly to form data set D; S2, merge multiple rows of tiered commission configuration data of data set D into one row; adjust the itinerary fare according to the price change, refund and appeal amount to obtain the final itinerary fare amount used for calculation; S3: Pass the processed trip fee amount as a parameter into the UDF function to parse the commission configuration data and obtain the commission rules and ratios for each tier. According to the different tiers of the trip fee amount, calculate the fees after commission and accumulate them. S4, outputting the calculated trip fee after the tiered commission to a designated storage location or database table.
2. The method for calculating trip costs according to claim 1, characterized in that: In S1, the required fields of the collected order settlement data include: service type s t , travel fee f 、Price change amount p ca 、The party responsible for price change cp 、Refund amount a 、Refund Provider p 、Amount of complaint c a , starting price p and commission configuration c c ; The data set D is: D = {(s t ,t f ,p ca ,p cp ,r a ,r p ,c a ,s p ,c c )|i=1,2,…,n}; Where n represents the number of collected order settlement data.
3. The trip fee calculation method according to claim 2, characterized in that: In S2, the merging method is: Each commission configuration cc i are a list containing multiple ladder configurations, where each ladder configuration is a tuple; For each commission configuration cc i Perform the merge operation to obtain the merged tiered commission configuration cc i ′.
4. The method for calculating trip costs according to claim 3, characterized in that: The tuple is: cc i =[lower limit of the step, upper limit of the step, commission ratio].
5. The trip fee calculation method according to claim 2, characterized in that: In S2, the travel fee amount tf i The calculation method of ′ is: Among them, p cai is the i-th price change amount, r pi is the i-th refund undertaker, r ai is the i-th refund amount, c ai is the i-th complaint amount.
6. The method for calculating trip costs according to claim 2, characterized in that: In S3, for each step interval, it is determined whether the remaining fee falls within the interval, and the commission fee is calculated according to the commission ratio, added to the total commission fee, and the remaining fee is updated at the same time; If the remaining fee is less than the lower limit of the current tier, the loop is exited; Finally, the total commission fee is returned.
7. The trip fee calculation method according to claim 6, characterized in that: In S3, the method of parsing the commission configuration data in the UDF function is implemented using the first UDF function: commission rules =parse commissionconfig (cc); Among them: the input is the commission configuration data cc; the output is the parsed commission rule list commission rules , where each element is a tuple containing the step lower limit, step upper limit and commission rate.
8. The trip fee calculation method according to claim 7, characterized in that: In S3, the accumulation method is implemented using the second UDF function: total commission =calculate commission (tf',commission rules ); The input is the processed trip fee amount tf' and the parsed commission rule list commission rules ; Output is the total commission fee total commission .
9. A trip fee calculation system based on a tiered commission system, characterized in that: The system includes a processor and a memory connected to the processor, wherein program instructions are stored in the memory, and when the program instructions are executed by the processor, the processor executes the trip fee calculation method according to any one of claims 1 to 8.
10. The trip cost calculation system according to claim 9, characterized in that: Also included is a processor connected to the A data collection module for collecting order settlement data from the order system of the online ride-hailing platform in real time or periodically; A preprocessing module for cleaning and transforming the dataset D; A data calculation module for calculating the commissioned travel fee for each order; An output module used to output the calculated trip fare after the tiered commission to a specified storage location or database table.