Method for improving efficiency of invoicing according to travel by user
By introducing invoice data tables and monthly tables into the online ride-hailing platform, the invoice data is aggregated, which solves the problems of low query efficiency and high pressure on the billing system during the invoice process, and achieves a more efficient invoice process and system performance improvement .
Patent Information
- Application Number
- CN202411501235.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-07
AI Technical Summary
During the user invoice issuance process, existing online ride-hailing platforms face the problems of low query efficiency and high pressure on the billing system due to the excessive amount of online order table data.
By introducing invoice data tables into the online ride-hailing platform, and listing historical invoice itinerary data by month, aggregating invoice-related data, reducing dependence on online order tables, and processing invoice requests through message middleware.
It improves the efficiency of users inquiring invoicable itinerary lists, reduces the pressure to query online order tables and billing systems, and improves the overall system performance.
Smart Images

Figure CN119398858A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of online car-hailing, and specifically relates to a method for improving the efficiency of issuing tickets according to user itineraries. Background Art
[0002] In the process of online car-hailing platforms, after the trip is over and the user has paid for the order, the user can request an invoice from the historical invoicing orders. The invoicing data mainly involves several aspects of data: basic order information (such as pick-up and drop-off addresses, car use time) and settlement-related information (such as the invoicable amount, whether the order has been invoiced). The order information is stored in the order system, and the settlement information is stored in the billing system. The existing technical solutions are:
[0003] 1) Users can query the historical order records in the online order table through the passenger terminal by using the user ID;
[0004] 2) Request the billing system in batches by order number to obtain settlement information: settlement amount and invoicable amount;
[0005] 3) Invoicing needs to be connected with a third-party service. After each invoice is issued, a callback is made to update the order mark: whether the invoice has been issued, completing the entire invoicing process;
[0006] Technical defects:
[0007] The current mainstream online ride-hailing platforms store more and more data due to the daily order volume and historical order accumulation. With an average daily increase of tens of millions of orders, covering all users' historical invoicable orders, the time span is very large. After several years of accumulation, the online order table data volume is basically in the hundreds of millions or even billions.
[0008] In this context, as the amount of data in the online order table increases, users may encounter slow database queries or performance bottlenecks when querying the list of invoicable itineraries during the invoicing process.
[0009] For the invoicing business, invoicing information query only requires knowing the order boarding and alighting points, basic vehicle usage information and invoicing amount data. However, the online order table will add new fields due to business needs, so there will be more and more fields in the online order table. The frequent addition and subtraction of fields in the large data table will affect the stability of trip invoicing. At the same time, each invoicing request requires a batch query of the billing system, which greatly increases the pressure on the billing system.
[0010] To this end, the present invention designs a method for improving the efficiency of issuing tickets according to the itinerary of users. Summary of the invention
[0011] The purpose of the present invention is to provide a method for improving the efficiency of ticketing by user according to itinerary, so as to solve the problems raised in the above background technology.
[0012] To achieve the above object, the present invention provides the following technical solutions: A method for improving the efficiency of issuing tickets by user according to the itinerary, S1: the user places an order at the entrance of the online car-hailing platform, enters the boarding and alighting address and the time of use to estimate the cost;
[0013] S2: The platform agent layer assembles order information to request the order system;
[0014] S3: The order is successfully placed in the order system, an order is generated, and it is bound to the estimated key, and the order number is returned to the platform agent layer;
[0015] S4: The platform proxy layer receives the order number returned by the order system, assembles the order information and requests the order;
[0016] S5: The dispatch system receives the dispatch request and starts screening drivers;
[0017] S6: After selecting the driver, bind the driver to the order;
[0018] S7: The driver slides to start the service and heads to the scheduled pick-up point. The driver completes the service and requests the billing system.
[0019] S8: Billing receives the completion request and generates a bill based on the actual mileage, actual duration and other cost items;
[0020] S9: The user pays the order, payment is completed, and the order status is updated;
[0021] S10: Send payment order MQ message, send the message through RocketMQ;
[0022] S11: Historical ticketing trip data is tabulated by month;
[0023] S12: Write to the invoicing data table;
[0024] New user invoicing process steps:
[0025] A1: The user at the online car-hailing platform portal initiates a request to query the list of available invoices, and the user selects the invoiced order;
[0026] A2: Grayscale switch for invoicing, whether to start the new process;
[0027] A21: If no, then request the online order form to obtain the completed trip list data;
[0028] 1) Request the billing system: obtain the invoice status status and the invoicable amount applyAmount;
[0029] 2) Whether the order has been invoiced;
[0030] If yes, the order has been invoiced and the process ends;
[0031] If not, then issue an invoice based on the amount applyAmount in the invoice data table, request the third-party service to issue the invoice successfully, and update the invoice status status;
[0032] A22: If yes, then request a new billing data table and locate the current year and month number nextMouth according to the request time;
[0033] 1) Locate the designated itinerary ticketing table based on nextMouth;
[0034] 2) Whether the order has been invoiced;
[0035] If yes, the order has been invoiced and the process ends;
[0036] If not, then issue an invoice based on the amount applyAmount in the invoice data table, request the third-party service to issue the invoice successfully, and update the invoice status status;
[0037] A3: The process is completed.
[0038] Preferably, in step S10, the MQ message includes the billing details and the order invoicable amount applyAmount, the order number orderNo, the user ID, the scheduled boarding and alighting points, the vehicle usage time bookingDate, and the status whether the invoice has been issued.
[0039] Preferably, in step S2, the order information includes: the online car-hailing platform order number, the city, the longitude and latitude of getting on and off the car, the reservation time, and the basic information of the passenger.
[0040] Preferably, historical data of the invoicing data table is written by scheduled tasks; preparation before going online: use scheduled tasks to write historical data from the online order table into the invoicing data table according to the monthly table of reserved car use time, and write the invoicable orders into the invoicing data table to ensure that after the grayscale switch is turned on, the data in the invoicing data table can meet the business invoicing needs.
[0041] Preferably, in step A22, the query condition is: the user ID userId and the invoicing status status both show the uninvoiced status, and the invoice status status and the invoicable amount applyAmount are obtained.
[0042] Compared with the prior art, the beneficial effects of the present invention are as follows: by adding an invoicing data table and aggregating the invoicing-related data into the invoicing data table when the user completes payment, the query efficiency problem caused by the accumulation of data in the online data table can be avoided, and the table division by month can greatly reduce the amount of data in a single table and improve the query efficiency of invoicing; dividing the data into tables by month can solve the problem of historical order accumulation and reduce the amount of data in a single table; in the invoicing process, there is no need to request the billing system, and the pressure on the billing system will also be greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of the invoicing data table aggregation process of the present invention.
[0044] Figure 2 This is a schematic diagram of the invoicing process for new users of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] See also Figure 1-2 The present invention provides a technical solution: a method for improving the efficiency of invoicing for users by itinerary. The present invention is to solve the problem that when online car-hailing requests an order to obtain a list of invoicable itineraries during the invoicing process, as the online order table data increases with the business, the storage volume of all historical data of users accumulates year by year, resulting in slow database queries and performance bottlenecks and a large number of query billing system requests. A new process solution for invoicable itineraries can improve the efficiency of obtaining a list of invoicable itineraries for users. The new process mainly divides the historical itinerary list into tables and aggregates the invoicing data, so as to reduce the pressure of the invoicing process on the online order table. At the same time, by aggregating data, the problem that each query needs to query the billing system is solved, thereby reducing the query pressure on the billing system. At the same time, it is decoupled from the online order table to improve the overall performance.
[0047] Order system description:
[0048] Basic information of database
[0049] Database: 1
[0050] Order table: order
[0051] Table structure: List some fields
[0052]
[0053] Number Rules:
[0054] Prefix (BX|PX) + yyMMddHHmmss (12 digits) + last three digits of the machine IP + auto-increment sequence (4 digits)
[0055] Case: BX2109081758561620001
[0056] Invoicing data table: order_invoice202401-order_invoice202312 (the order number field is the same as the order table)
[0057] Table structure: List some fields:
[0058]
[0059] Order number rules:
[0060] Prefix BX|PX)+yyMMddHHmmss(12 digits)+last three digits of machine IP+auto-increment sequence(4 digits);
[0061] Case: BX2109081758561620001
[0062] Table division strategy: divide the table into monthly tables according to the order number (yyMM) year and month;
[0063] Order message middleware MQ;
[0064] Message middleware: RocketMQ
[0065] Locate the table number: Use the vehicle usage time in MQ, for example, 2023-01-2310:00:00 to reverse the table number;
[0066] Java code:
[0067] tableNo = new SimpleDateFormat ('yyyyMM').format (bookingDate), which can locate the month number of the car booking time;
[0068] Invoicing data aggregation process steps:
[0069] S1: The user places an order at the online car-hailing platform entrance, enters the pick-up and drop-off address and the time of use to estimate the cost;
[0070] S2: The platform proxy layer assembles order information to request the order system, including: online car-hailing platform order number, city, longitude and latitude of boarding and alighting, booking time, basic information of the passenger, etc., including all public order information;
[0071] S3: The order is successfully placed in the order system, an order is generated, and it is bound to the estimated key, and the order number is returned to the platform agent layer;
[0072] S4: The platform proxy layer receives the order number returned by the order system, assembles the order information and requests the order;
[0073] S5: The dispatch system receives the dispatch request and starts screening drivers;
[0074] S6: After selecting the driver, bind the driver to the order;
[0075] S7: The driver slides to start the service and heads to the scheduled pick-up point. The driver completes the service and requests the billing system.
[0076] S8: Billing receives the completion request and generates a bill based on the actual mileage, actual duration and other cost items;
[0077] S9: The user pays the order, payment is completed, and the order status is updated;
[0078] S10: Send a payment order MQ message, and send the message through RocketMQ (the MQ message contains the bill details and the order invoicable amount applyAmount, order number orderNo, user ID, scheduled pick-up and drop-off points, car use time bookingDate, status whether the invoice has been issued (enumeration value: 0 and 1, default value 0 not issued))
[0079] S11: Historical ticketing itinerary data sub-table: Sub-table strategy: Sub-table by month,
[0080] Such as order_invoice202301, order_invoice202302;
[0081] S12: Write to the invoicing data table;
[0082] New user invoicing flow chart operation steps:
[0083] A1: The user at the online car-hailing platform portal initiates a request to query the list of available invoices, and the user selects the invoiced order;
[0084] A2: Grayscale switch for invoicing, whether to start the new process;
[0085] Case 1: If no, request the online order form to obtain the completed trip list data;
[0086] 1) Request the billing system: obtain the invoice status status and the invoicable amount applyAmount;
[0087] 2) Has the order been invoiced? (status=1);
[0088] If yes, the order has been invoiced and the process ends;
[0089] If not, then issue an invoice based on the applyAmount amount in the invoice data table, request the third-party service to issue the invoice successfully, and update the status value to 1;
[0090] Second case: If yes, then request a new invoicing data table and locate the current year and month number according to the request time: nextMouth (for example: 202401);
[0091] 1) Locate the designated itinerary invoicing table based on nextMouth: order_invoice202401
[0092] Query conditions: userId and status = 0, get the invoice status status and the invoicable amount applyAmount;
[0093] 2) Has the order been invoiced? (status=1)
[0094] If yes, the order has been invoiced and the process ends;
[0095] If not, then issue an invoice based on the applyAmount amount in the invoice data table, request the third-party service to issue the invoice successfully, and update the status value to 1;
[0096] A3: The process ends;
[0097] The historical data of the invoicing data table is written into the scheduled task:
[0098] Preparation before going online: Use a scheduled task to write the historical data from the online order table into the invoicing data table according to the monthly table of the scheduled car use time. This ensures that after the grayscale switch is turned on, the data in the invoicing data table can meet the business invoicing needs.
[0099] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for improving the efficiency of issuing tickets by itinerary for users, characterized by: Invoicing data aggregation process steps: S1: The user places an order at the online car-hailing platform entrance, enters the pick-up and drop-off address and the time of use to estimate the cost; S2: The platform agent layer assembles order information to request the order system; S3: The order is successfully placed in the order system, an order is generated, and it is bound to the estimated key, and the order number is returned to the platform agent layer; S4: The platform proxy layer receives the order number returned by the order system, assembles the order information and requests the order; S5: The dispatch system receives the dispatch request and starts screening drivers; S6: After selecting the driver, bind the driver to the order; S7: The driver slides to start the service and heads to the scheduled pick-up point. The driver completes the service and requests the billing system. S8: Billing receives the completion request and generates a bill based on the actual mileage, actual duration and other cost items; S9: The user pays the order, payment is completed, and the order status is updated; S10: Send payment order MQ message, send the message through RocketMQ; S11: Historical ticketing trip data is tabulated by month; S12: Write to the invoicing data table; New user invoicing process steps: A1: The user at the online car-hailing platform portal initiates a request to query the list of available invoices, and the user selects the invoiced order; A2: Grayscale switch for invoicing, whether to start the new process; A21: If no, then request the online order form to obtain the completed trip list data; 1) Request the billing system: obtain the invoice status status and the invoicable amount applyAmount; 2) Whether the order has been invoiced; If yes, the order has been invoiced and the process ends; If not, then issue an invoice based on the amount applyAmount in the invoice data table, request the third-party service to issue the invoice successfully, and update the invoice status status; A22: If yes, then request a new billing data table and locate the current year and month number nextMouth according to the request time; 1) Locate the designated itinerary ticketing table based on nextMouth; 2) Whether the order has been invoiced; If yes, the order has been invoiced and the process ends; If not, then issue an invoice based on the amount applyAmount in the invoice data table, request the third-party service to issue the invoice successfully, and update the invoice status status; A3: The process is completed.
2. A method for improving the efficiency of issuing tickets by itinerary according to claim 1, characterized in that: In step S10, the MQ message includes the billing details and the order invoicable amount applyAmount, order number orderNo, user ID, scheduled pick-up and drop-off points, vehicle usage time bookingDate, and status whether the invoice has been issued.
3. A method for improving the efficiency of issuing tickets by itinerary according to claim 1, characterized in that: In step S2, the order information includes: the order number of the online car-hailing platform, the city, the longitude and latitude of getting on and off the car, the reservation time, and the basic information of the passenger.
4. A method for improving the efficiency of issuing tickets by itinerary according to claim 1, characterized in that: Write historical data to the invoicing data table in a scheduled task; Preparation before going online: Use a scheduled task to write historical data from the online order table into the invoicing data table according to the monthly table of reserved car use time, and write the invoicable orders into the invoicing data table to ensure that after the grayscale switch is turned on, the data in the invoicing data table can meet the business invoicing needs.
5. The method for improving the efficiency of issuing tickets by itinerary according to claim 1, characterized in that: In step A22, the query conditions are: if the user ID userId and the invoicing status status both show the uninvoiced status, the invoice status status and the invoicable amount applyAmount are obtained.