Invoicing method allowing channel security

CN119579265APending Publication Date: 2025-03-07SHOUYUE TECH BEIJING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411590938.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

[0002]在一次网约车服务完成之后,渠道的乘客会对这次行程进行开发票的操作,然后渠道会调用运力的申请开发票的接口进行开发票.在实际开发票的过程中,关于开票的安全性和数据的安全性都是十分重要的,如果直接给渠道方返回发票的id,则渠道可能从中发现一些商业机密,比如运力实际服务的订单数量大致范围,或者渠道可以根据id进行尝试查询其他渠道申请的发票,另外与渠道之间没有幂等的校验,可能导致一个订单开多个发票的问题

Benefits of technology

[0023] Compared with the prior art, the beneficial effect of the present invention is: from the perspective of channel and capacity, the present invention checks from the table whether the invoice of the capacity has been applied for invoices, to ensure the idempotence of the channel invoice, encrypts the id of the capacity invoice to ensure the security of the capacity invoice information. At the same time, after the invoice issuance is successful, in order to ensure that the invoice can truly reach the channel party and prevent the failure of the invoice back pass to cause complaints from the channel passengers, a certain number of retry callbacks are provided to provide a safe and reliable invoice process to ensure the security of the invoice issuance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579265A_ABST
    Figure CN119579265A_ABST
Patent Text Reader

Abstract

The invention discloses an invoicing method allowing channel security. A channel invoicing request channel side sends an invoicing request; the corresponding relation table of the channel invoices and the transport capacity is recorded as partnervoicemapping, and the data structure composition comprises an invoice id (identity), a channel number channel, a channel invoice partnervoiceid, an encrypted invoice inviceid, an invoice pdflash and an invoice state statue, and the data structure composition comprises the invoice id, the channel number channel, the channel invoice partnervoiceid, the encrypted invoice inviceid, the invoice pdflash and the invoice state statue; from the aspects of the channel and the transport capacity, whether the invoice of the transport capacity has been applied or not is inquired from the table to ensure idempotence of the invoice issued by the channel and encrypt the id of the transport capacity invoice so as to ensure safety of transport capacity invoice information, and meanwhile, after the invoice is issued successfully, in order to ensure that the invoice can really arrive at the channel party, the method can be applied to the channel party. The method prevents channel passengers from complaint caused by invoice return failure and retry to callback for a certain number of times, and provides a safe and reliable invoice flow to ensure the safety of invoicing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of online car-hailing platforms, and specifically relates to an invoicing method that allows channel security. Background Art

[0002] After an online car-hailing service is completed, the passenger of the channel will apply for an invoice for the trip, and then the channel will call the transport capacity's invoice application interface to issue the invoice. In the actual invoicing process, the security of invoicing and data security are very important. If the invoice ID is returned directly to the channel, the channel may discover some commercial secrets, such as the approximate range of the number of orders actually served by the transport capacity, or the channel may try to query invoices applied for by other channels based on the ID. In addition, there is no idempotence check between the channels, which may lead to the problem of multiple invoices for one order.

[0003] To this end, the present invention designs an invoicing method that allows channel security. Summary of the invention

[0004] The object of the present invention is to provide an invoicing method that allows channel security to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for issuing invoices allowing channels to be safe, the specific steps comprising: S1: a channel issuing invoice request: a channel party sends an invoice request;

[0006] S2: The channel invoice and transportation capacity correspondence table is recorded as partner_invoice_mapping, and the data structure includes: invoice id, channel number channel, channel invoice partner_invoice_id, encrypted invoice invoice_id, invoice pdf_url, invoice status status;

[0007] S3: First, check whether there is an invoice application. According to the channel number channel and the channel invoice partner_invoice_id, query the channel invoice and transportation capacity correspondence table to determine whether an invoice application has been made.

[0008] S4: If the invoice has not been issued, the transport capacity records the invoice ID and channel number of the channel, generates the application invoice ID, uses the channel number channel and invoice ID for MD5 encryption, generates the encrypted invoice invoice_id, and returns it to the channel;

[0009] S5: If an invoice has been issued, the encrypted invoice invoice_id is returned;

[0010] S6: Asynchronously call the third-party invoice supplier interface to issue an invoice, obtain the invoice PDF and store it in the invoice pdf_url field, and update the invoice status status;

[0011] S7: Asynchronously notify the channel of the billing result;

[0012] S8: If the invoice is issued successfully, query the channel invoice issuance success URL configuration, then call the channel invoice issuance notification interface, and pass in the encrypted invoice invoice_id, channel invoice partner_invoice_id and invoice pdf_url;

[0013] S9: If the call to the channel invoicing notification interface fails, the record is stored in the retry table;

[0014] S10: Retry invoicing, and query the retry table for scheduled tasks;

[0015] S11: If there is no data in the retry table, then end;

[0016] S12: If there is a retry record, loop;

[0017] S13: If the number of retries retry_num is greater than or equal to a, the retry record is deleted and the process ends;

[0018] S14: If the number of retries retry_num is less than a, query the channel invoice and transportation capacity correspondence table according to the encrypted invoice invoice_id, obtain the encrypted invoice invoice_id and invoice pdf_url, call the channel invoice billing success interface, and pass in the encrypted invoice invoice_id, channel invoice partner_invoice_id and invoice pdf_url. If successful, delete the retry record. If failed, update the retry number retry_num in the retry table plus 1;

[0019] S15: End.

[0020] Preferably, step S1 includes necessary parameters, including channel number channel and channel invoice partner_invoice_id.

[0021] Preferably, in step S10, when the scheduled task queries the retry table, 100 records are queried each time.

[0022] Preferably, in step S13 and step S14, a is the same threshold value, which can be set manually according to the platform conditions.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: starting from the aspects of channels and capacity, the present invention queries from the table whether the invoice of the capacity has been applied for, to ensure the idempotence of channel invoicing, encrypts the ID of the capacity invoice to ensure the security of the capacity invoice information, and at the same time, after the invoice is successfully issued, in order to ensure that the invoice can actually reach the channel party and prevent channel passengers from complaining due to the failure of invoice return, the callback is retried a certain number of times, providing a safe and reliable invoice process to ensure the security of invoicing. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 The figure is a schematic diagram of the channel invoicing process of the present invention.

[0025] Figure 2 The figure is a schematic diagram of the retry invoicing process of the present invention. DETAILED DESCRIPTION

[0026] 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.

[0027] See also Figure 1-2 ,The present invention provides a technical solution: a method for issuing invoices that allows channels to be secure, and the specific steps include: S1: channel invoice request The channel party sends an invoice request, which contains necessary parameters, such as the channel number channel, and the invoice id is recorded as partner_invoice_id;

[0028] S2: The channel invoice and transportation capacity correspondence table is recorded as partner_invoice_mapping, and the data structure is as follows:

[0029]

[0030] S3: First, check whether there is an invoice application. According to the channel number channel and the channel invoice partner_invoice_id, query the channel invoice and transportation capacity correspondence table to determine whether an invoice application has been made.

[0031] S4: If the invoice has not been issued, the transport capacity records the invoice ID and channel number of the channel, generates the application invoice ID, uses the channel number channel and invoice ID for MD5 encryption, generates the encrypted invoice invoice_id, and returns it to the channel;

[0032] S5: If an invoice has been issued, the encrypted invoice invoice_id is returned;

[0033] S6: Asynchronously call the third-party invoice supplier interface to issue an invoice, obtain the invoice PDF and store it in the pdf_url field, and update the invoice status;

[0034] S7: Asynchronously notify the channel of the billing result.

[0035] S8: If the invoice is issued successfully, query the channel invoice issuance success URL configuration, then call the channel invoice issuance notification interface, and pass in the encrypted invoice_id, channel invoice partner_invoice_id and invoice pdf_url;

[0036] S9: If the call to the channel invoicing notification interface fails, the record is stored in the retry table;

[0037] S10: Retry invoicing, and query the retry table through a scheduled task, querying 100 records each time;

[0038] S11: If there is no data in the retry table, then end;

[0039] S12: If there is a retry record, loop;

[0040] S13: If the number of retries retry_num is greater than or equal to 5, the retry record is deleted and the process ends.

[0041] S14: If the number of retries retry_num is less than 5, query the channel capacity invoice correspondence table according to invoice_id, obtain the encrypted invoice_id and invoice pdf_url, call the channel invoice billing success interface, and pass in the encrypted invoice_id and channel invoice partner_invoice_id and invoice pdf_url. If successful, delete the retry record. If unsuccessful, update the retry_num of the retry table plus 1.

[0042] S15: End.

[0043] 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 of invoicing that allows for channel security, characterized by: The specific steps include: S1: channel invoicing request The channel party sends an invoicing request; S2: The channel invoice and transportation capacity correspondence table is recorded as partner_invoice_mapping, and the data structure includes: invoice id, channel number channel, channel invoice partner_invoice_id, encrypted invoice invoice_id, invoice pdf_url, invoice status status; S3: First, check whether there is an invoice application. According to the channel number channel and the channel invoice partner_invoice_id, query the channel invoice and transportation capacity correspondence table to determine whether an invoice application has been made. S4: If the invoice has not been issued, the transport capacity records the invoice ID and channel number of the channel, generates the application invoice ID, uses the channel number channel and invoice ID for MD5 encryption, generates the encrypted invoice invoice_id, and returns it to the channel; S5: If an invoice has been issued, the encrypted invoice invoice_id is returned; S6: Asynchronously call the third-party invoice supplier interface to issue an invoice, obtain the invoice PDF and store it in the invoice pdf_url field, and update the invoice status status; S7: Asynchronously notify the channel of the billing result; S8: If the invoice is issued successfully, query the channel invoice issuance success URL configuration, then call the channel invoice issuance notification interface, and pass in the encrypted invoice invoice_id, channel invoice partner_invoice_id and invoice pdf_url; S9: If the call to the channel invoicing notification interface fails, the record is stored in the retry table; S10: Retry invoicing, and query the retry table for scheduled tasks; S11: If there is no data in the retry table, then end; S12: If there is a retry record, loop; S13: If the number of retries retry_num is greater than or equal to a, the retry record is deleted and the process ends; S14: If the number of retries retry_num is less than a, query the channel invoice and transportation capacity correspondence table according to the encrypted invoice invoice_id, obtain the encrypted invoice invoice_id and invoice pdf_url, call the channel invoice billing success interface, and pass in the encrypted invoice invoice_id, channel invoice partner_invoice_id and invoice pdf_url. If successful, delete the retry record. If failed, update the retry number retry_num in the retry table plus 1; S15: End.

2. A method of invoicing that allows channel security according to claim 1, characterized in that: Step S1 contains necessary parameters, including channel number channel and channel invoice partner_invoice_id.

3. A method of invoicing that allows channel security according to claim 1, characterized in that: In step S10, when the scheduled task queries the retry table, 100 records are queried each time.

4. A method of invoicing that allows channel security according to claim 1, characterized in that: In step S13 and step S14, a is the same threshold value, which can be set manually according to the platform conditions.