Payment routing method, medium and device

Through dynamic payment routing method, the routing processor and transaction idempotent processor are used to optimize payment routing, which solves the problems of poor scalability and cumbersome function upgrades caused by fixed payment routing sequence in existing payment systems, and achieves more efficient payment channel expansion and routing computing.

CN119005960APending Publication Date: 2024-11-22XIAMEN JINMEIXIN CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410999656.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

When the existing payment system connects to multiple bank-enterprise direct-linked institutions and third-party payment institutions, the payment routing sequence is fixed, resulting in poor scalability and cumbersome function upgrades, making it difficult to effectively support diversified payment transactions.

Method used

A dynamic payment routing method based on payment request is proposed. By obtaining and analyzing the request type and bank card number information in the payment request, calling the routing processor to perform routing calculations based on the preset routing policy and account opening information, realizing the generation of dynamic routing results , and optimize the routing process when necessary using a transaction idempotent processor.

Benefits of technology

It improves the expansion convenience of payment channels and the efficiency of payment routing, reduces the need to adjust the payment routing sequence, and enhances the flexibility and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005960A_ABST
    Figure CN119005960A_ABST
Patent Text Reader

Abstract

The invention discloses a payment routing method, medium and device, and the method comprises the steps: obtaining a payment request which comprises a request type parameter and bank card number information; analyzing the request type parameter to obtain a request type corresponding to the payment request; identifying the bank card number information to obtain opening bank information corresponding to the bank card number information; calling a corresponding routing processor according to the request type; and the routing processor performs routing calculation according to a preset routing strategy, the opening bank information and the bank card number information to obtain a final routing result. Effective payment routing can be carried out based on the payment request; and meanwhile, the convenience of payment channel expansion is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of transaction processing technology, and in particular to a payment routing method, medium and device. Background Art

[0002] In the existing payment system, multiple bank-enterprise direct-link institutions and third-party payment institutions are often connected to realize diversified payment transactions that support payment business with multiple payment channels.

[0003] In the related art, when performing payment routing, a fixed payment routing sequence is often used. That is, payment transactions are sent in a fixed payment routing sequence. It can be understood that in this way, every time a new payment channel needs to be added, the payment routing sequence needs to be adjusted once, and the new payment channel needs to be added to the fixed payment routing sequence. Obviously, this routing method has the problem of poor scalability and cumbersome subsequent function upgrades. Summary of the invention

[0004] The present invention aims to solve one of the technical problems in the related art at least to some extent. To this end, one object of the present invention is to propose a payment routing method that can perform effective payment routing based on payment requests and at the same time improve the convenience of payment channel expansion.

[0005] In a first aspect, an embodiment of the present invention proposes a payment routing method, comprising the following steps: obtaining a payment request, the payment request comprising a request type parameter and bank card number information; parsing the request type parameter to obtain a request type corresponding to the payment request; identifying the bank card number information to obtain an account opening bank information corresponding to the bank card number information; calling a corresponding routing processor according to the request type; the routing processor performing routing calculation according to a preset routing strategy, the account opening bank information and the bank card number information to obtain a final routing result.

[0006] According to the payment routing method of an embodiment of the present invention, first, a payment request is obtained, wherein the payment request includes a request type parameter and bank card number information; then, the request type parameter is parsed to obtain the request type corresponding to the payment request; then, the bank card number information is identified to obtain the account opening bank information corresponding to the bank card number information; then, a corresponding routing processor is called according to the request type; then, the routing processor performs routing calculation according to a preset routing strategy, the account opening bank information and the bank card number information to obtain a final routing result; thereby, effective payment routing based on the payment request is realized; and at the same time, the convenience of payment channel expansion is improved.

[0007] In some embodiments, the request types include contract signing request, collection request, payment request, contract signing trial settlement request, collection trial settlement request and payment trial settlement request. Before identifying the bank card number information, it also includes: judging whether the request type is a contract signing trial settlement request, a collection trial settlement request or a payment trial settlement request; if not, calling a transaction idempotent processor; the transaction idempotent processor queries the transaction log according to the transaction serial number corresponding to the payment request; judging whether the transaction log stores the routing result corresponding to the transaction serial number; if the transaction log stores the routing result corresponding to the transaction serial number, directly using the routing result as the final routing result.

[0008] In some embodiments, when the request type is a contract signing request, a collection request, a contract signing trial settlement request, or a collection trial settlement request, the routing processor performs routing calculation according to a preset routing strategy, the account opening bank information, and the bank card number information to obtain a final routing result, including: executing a first preset routing strategy and a second preset routing strategy respectively to obtain two calculation results, and taking the intersection of the two calculation results as a first pre-selected set; traversing each payment channel in the first pre-selected set to exclude invalid payment channels therein to obtain a second pre-selected set; determining whether the request type is a contract signing request or a contract signing trial settlement request; if so, querying a protocol library according to the bank card number information to determine whether a payment channel in the second pre-selected set exists; In the protocol library corresponding to the bank card number information, and when the payment channel exists in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a third pre-selected set; if not, query the protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and when the payment channel does not exist in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a fourth pre-selected set; generate a final routing result based on the third pre-selected set or the fourth pre-selected set.

[0009] In some embodiments, generating a final routing result based on the third pre-selected set or the fourth pre-selected set includes: determining whether the request type is a contract signing request or a contract trial settlement request; for the third pre-selected set, sorting the payment channels in the third pre-selected set according to a preset priority to generate a final routing result; for the fourth pre-selected set, checking whether the collection amount corresponding to the payment channel in the fourth pre-selected set exceeds the collection limit corresponding to the account opening bank information; if the collection amount corresponding to the payment channel in the fourth pre-selected set exceeds the collection limit corresponding to the account opening bank information, eliminating the payment channel from the fourth pre-selected set; traversing the payment channels in the fourth pre-selected set to obtain a fifth pre-selected set; and sorting the payment channels in the fifth pre-selected set according to the preset priority to generate a final routing result.

[0010] In some embodiments, when the request type is a payment on behalf of another request or a payment on behalf of another request, the routing processor performs routing calculations based on a preset routing strategy, the account opening bank information, and the bank card number information to obtain a final routing result, including: executing a third preset routing strategy to obtain a sixth pre-selected set; traversing each payment channel in the sixth pre-selected set to exclude invalid payment channels therein to obtain a seventh pre-selected set; for each payment channel in the seventh pre-selected set, determining whether the single-day total amount corresponding to the payment channel is greater than the payment on behalf of another limit; if so, excluding the payment channel from the seventh pre-selected set; traversing all payment channels in the seventh pre-selected set to obtain an eighth pre-selected set; and sorting the payment channels in the eighth pre-selected set according to preset priorities to obtain a final routing result.

[0011] In some embodiments, the request type further includes a directional request, and the method further includes: determining whether the request type is a directional request; if so, taking the directional routing as the final routing result.

[0012] In a second aspect, an embodiment of the present invention provides a computer-readable storage medium on which a payment routing program is stored. When the payment routing program is executed by a processor, the payment routing method as described above is implemented.

[0013] In a third aspect, an embodiment of the present invention proposes a payment routing device, comprising: an acquisition module, the acquisition module is used to acquire a payment request, the payment request includes a request type parameter and bank card number information; a parsing module, the parsing module is used to parse the request type parameter to obtain the request type corresponding to the payment request; an identification module, the identification module is used to identify the bank card number information to obtain the opening bank information corresponding to the bank card number information; a calling module, the calling module is used to call a corresponding routing processor according to the request type; a routing processor, the routing processor is used to perform routing calculation according to a preset routing strategy, the opening bank information and the bank card number information to obtain a final routing result.

[0014] According to the payment routing device of the embodiment of the present invention, an acquisition module is set to acquire a payment request, the payment request includes a request type parameter and bank card number information; a parsing module is used to parse the request type parameter to obtain the request type corresponding to the payment request; an identification module is used to identify the bank card number information to obtain the account opening bank information corresponding to the bank card number information; a calling module is used to call a corresponding routing processor according to the request type; and a routing processor is used to perform routing calculation according to a preset routing strategy, the account opening bank information and the bank card number information to obtain a final routing result. Thus, effective payment routing based on payment requests is achieved; at the same time, the convenience of payment channel expansion is improved.

[0015] In some embodiments, the request types include contract signing request, collection request, payment request, contract signing trial settlement request, collection trial settlement request and payment trial settlement request. Before identifying the bank card number information, it also includes: judging whether the request type is a contract signing trial settlement request, a collection trial settlement request or a payment trial settlement request; if not, calling a transaction idempotent processor; the transaction idempotent processor queries the transaction log according to the transaction serial number corresponding to the payment request; judging whether the transaction log stores the routing result corresponding to the transaction serial number; if the transaction log stores the routing result corresponding to the transaction serial number, directly using the routing result as the final routing result.

[0016] In some embodiments, when the request type is a contract signing request, a collection request, a contract signing trial settlement request, or a collection trial settlement request, the routing processor performs routing calculation according to a preset routing strategy, the account opening bank information, and the bank card number information to obtain a final routing result, including: executing a first preset routing strategy and a second preset routing strategy respectively to obtain two calculation results, and taking the intersection of the two calculation results as a first pre-selected set; traversing each payment channel in the first pre-selected set to exclude invalid payment channels therein to obtain a second pre-selected set; determining whether the request type is a contract signing request or a contract signing trial settlement request; if so, querying a protocol library according to the bank card number information to determine whether a payment channel in the second pre-selected set exists; In the protocol library corresponding to the bank card number information, and when the payment channel exists in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a third pre-selected set; if not, query the protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and when the payment channel does not exist in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a fourth pre-selected set; generate a final routing result based on the third pre-selected set or the fourth pre-selected set.

[0017] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flow chart of a payment routing method according to an embodiment of the present invention;

[0019] Figure 2 is a schematic diagram of a routing calculation process according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a routing calculation process according to another embodiment of the present invention;

[0021] Figure 4 is a block diagram of a payment routing device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0023] The payment routing method according to an embodiment of the present invention is described below with reference to the accompanying drawings.

[0024] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a payment routing method according to an embodiment of the present invention. Figure 1 As shown, the payment routing method includes the following steps:

[0025] S101, obtaining a payment request, where the payment request includes a request type parameter and bank card number information.

[0026] That is, a payment request sent by a user is obtained, wherein the payment request includes a request type parameter (used to distinguish the request type corresponding to the payment request) and bank card number information.

[0027] S102: Parse the request type parameter to obtain the request type corresponding to the payment request.

[0028] S103, identifying the bank card number information to obtain the account opening bank information corresponding to the bank card number information.

[0029] S104, calling a corresponding routing processor according to the request type.

[0030] S105, the routing processor performs routing calculation according to the preset routing strategy, the account opening bank information and the bank card number information to obtain a final routing result.

[0031] In some embodiments, the request types include contract signing request, collection request, payment request, contract signing trial settlement request, collection trial settlement request and payment trial settlement request. Before identifying the bank card number information, it also includes: determining whether the request type is a contract signing trial settlement request, a collection trial settlement request or a payment trial settlement request; if not, calling the transaction idempotent processor; the transaction idempotent processor queries the transaction log according to the transaction serial number corresponding to the payment request; determining whether the transaction log stores the routing result corresponding to the transaction serial number; if the transaction log stores the routing result corresponding to the transaction serial number, directly using the routing result as the final routing result.

[0032] That is to say, a transaction idempotent processor is set in the payment system. After receiving the payment request, first, it is determined whether the payment request is a contract trial calculation request, a collection trial calculation request or a payment trial calculation request. If yes, it means that the current payment request is a trial calculation request, not an actual payment request that needs to be actually executed. Then, there is no need to call the transaction idempotent processor to process it. If the judgment result is no, it means that the current payment request is an actual payment request, and the transaction idempotent processor is called. The transaction idempotent processor will query the transaction log table according to the serial number in the transaction message in the payment request to determine whether the transaction serial number is stored in the transaction log table. If yes, it means that the transaction serial number has requested the routing engine before. And the transaction log stores the historical routing results that have been executed. Therefore, if the corresponding result is queried, the routing result stored in the transaction log can be used as the final routing result. Through this step, the computing power resources in the payment routing process can be saved and repeated calculations can be avoided.

[0033] In some embodiments, the payment system is further provided with a transaction log recording processor, which is used to store and record transaction logs in the payment routing process.

[0034] In some embodiments, when the request type is a contract signing request, a collection request, a contract signing trial settlement request, or a collection trial settlement request, the routing processor performs routing calculations based on a preset routing strategy, account opening bank information, and bank card number information to obtain a final routing result, including: executing a first preset routing strategy and a second preset routing strategy respectively to obtain two calculation results, and taking the intersection of the two calculation results as a first pre-selected set; traversing each payment channel in the first pre-selected set to exclude invalid payment channels therein to obtain a second pre-selected set; determining whether the request type is a contract signing request or a contract signing trial settlement request; if so, querying the protocol library based on the bank card number information to determine whether the payment channel in the second pre-selected set is whether the payment channel exists in the protocol library corresponding to the bank card number information, and when the payment channel exists in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a third pre-selected set; if not, query the protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and when the payment channel does not exist in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a fourth pre-selected set; generate a final routing result based on the third pre-selected set or the fourth pre-selected set.

[0035] In some embodiments, generating a final routing result based on a third pre-selected set or a fourth pre-selected set includes: for the third pre-selected set, sorting the payment channels in the third pre-selected set according to a preset priority to generate a final routing result; for the fourth pre-selected set, checking whether the collection amount corresponding to the payment channel in the fourth pre-selected set exceeds the collection limit corresponding to the account opening bank information; if the collection amount corresponding to the payment channel in the fourth pre-selected set exceeds the collection limit corresponding to the account opening bank information, eliminating the payment channel from the fourth pre-selected set; traversing the payment channels in the fourth pre-selected set to obtain a fifth pre-selected set; and sorting the payment channels in the fifth pre-selected set according to the preset priority to generate a final routing result.

[0036] As an example, Figure 2 As shown, when the request type is a contract signing request, a collection request, a contract signing trial settlement request, or a collection trial settlement request, the routing processor performs routing calculation according to the preset routing strategy and the account opening bank information to obtain the final routing result, including the following steps:

[0037] S201, executing a first preset routing strategy and a second preset routing strategy respectively to obtain two calculation results.

[0038] S202: Take the intersection of the two calculation results as the first pre-selected set.

[0039] S203, traverse each payment channel in the first pre-selected set to exclude invalid payment channels therein, and obtain a second pre-selected set.

[0040] Specifically, the first pre-selected set may be checked cyclically to determine whether the payment channels in the first pre-selected set are invalid or in a maintenance period; if the current payment channel is invalid or in a maintenance period, the payment channel is removed from the first pre-selected set.

[0041] S204, determine whether the request type is a contract signing request or a contract trial settlement request; if yes, execute step S205; if no, execute step S206.

[0042] S205, query the protocol library according to the bank card number information, determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and if the payment channel exists in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a third pre-selected set. Then execute step S207.

[0043] S206, query the protocol library according to the bank card number information, determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and if the payment channel does not exist in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a fourth pre-selected set. Then execute step S208.

[0044] S207, sorting the payment channels in the third pre-selected set according to a preset priority to generate a final routing result.

[0045] S208, checking whether the agency collection amount corresponding to the payment channel in the fourth pre-selected set exceeds the agency collection limit corresponding to the account opening bank information; if yes, removing the payment channel from the fourth pre-selected set.

[0046] S209, traverse the payment channels in the fourth pre-selected set to obtain a fifth pre-selected set.

[0047] S210, sorting the payment channels in the fifth pre-selected set according to a preset priority to generate a final routing result.

[0048] It should be noted that there are multiple ways to set the first preset routing strategy and the second preset routing strategy. Preferably, the first preset routing strategy can be set as a product routing strategy; specifically, the strategy operation element is mainly the business product number, and the strategy is applied to contract transactions and collection transactions. The specific steps of the product routing strategy are: business product indicator matching: obtain the effective strategy with the business product number. If the product routing strategy is hit, the result of this routing can only produce routing results from the payment channels configured in the product routing strategy. If it is not hit, it is assumed that all payment channels can be used as routing results. The second preset routing strategy can be set as an issuing bank routing strategy; specifically, the strategy operation element is mainly the target card issuing bank, and the strategy is applied to contract transactions and collection transactions. The specific steps of the issuing bank routing strategy are: S21, matching the issuing bank indicator: matching the payment channels in the routing strategy configuration with the issuing bank card Bin number, and outputting the payment channels configured by the corresponding strategy. S22, performing issuing bank indicator pan-matching: matching the payment channels in the routing strategy configuration with all issuing banks, and outputting the payment channels configured by the corresponding strategy. S23, perform index screening: when collecting transactions, check the payment channels whose payment channel limits are greater than or equal to the transaction amount, and output the payment channels configured by the corresponding strategy. Finally, merge the results of the two matches in S21 and S22, and eliminate the payment channels that hit the S23 step, remove duplicate payment channels, and generate routing strategy results.

[0049] In some embodiments, when the request type is a payment on behalf of another request or a payment on behalf of another request, the routing processor performs routing calculations based on a preset routing strategy, the account opening bank information, and the bank card number information to obtain a final routing result, including: executing a third preset routing strategy to obtain a sixth pre-selected set; traversing each payment channel in the sixth pre-selected set to exclude invalid payment channels therein to obtain a seventh pre-selected set; for each payment channel in the seventh pre-selected set, determining whether the single-day total amount corresponding to the payment channel is greater than the payment on behalf of another limit; if so, excluding the payment channel from the seventh pre-selected set; traversing all payment channels in the seventh pre-selected set to obtain an eighth pre-selected set; and sorting the payment channels in the eighth pre-selected set according to preset priorities to obtain a final routing result.

[0050] As an example, Figure 3 As shown, when the request type is a payment request or a payment trial calculation request, the routing processor performs routing calculation according to the preset routing strategy and the account opening bank information to obtain the final routing result, including the following steps:

[0051] S301, executing a third preset routing strategy to obtain a sixth pre-selected set.

[0052] S302, traverse each payment channel in the sixth pre-selected set to exclude invalid payment channels therein, and obtain a seventh pre-selected set.

[0053] S303, for each payment channel in the seventh pre-selected set, determine whether the single-day total amount corresponding to the payment channel is greater than the total payment limit; if so, remove the payment channel from the seventh pre-selected set.

[0054] S304, traverse all payment channels in the seventh pre-selected set to obtain an eighth pre-selected set.

[0055] S305, sorting the payment channels in the eighth pre-selected set according to a preset priority to obtain a final routing result.

[0056] It should be noted that there are multiple ways to set the third preset routing strategy. Preferably, the third preset routing strategy is set as a payment routing strategy. Specifically, in the payment routing strategy, the elements of the strategy operation include the business product number, the payment target card issuing bank, etc. The specific steps of the payment routing strategy are: S31, precise index matching: the payment routing strategy is effective by performing intersection matching on the business product number and the card Bin number of the payment target card issuing bank, and the payment channel configured by the corresponding strategy is output. S32, business product index general matching: the payment routing strategy is effective by performing intersection matching on the business product number and all issuing banks, and the payment channel configured by the corresponding strategy is output. S33, issuing bank index general matching: the payment routing strategy is effective by performing intersection matching on the card Bin number of the payment target card issuing bank and all products, and the payment channel configured by the corresponding strategy is output. S34, index general matching: the payment routing strategy is effective by performing intersection matching on all issuing banks and all products, and the payment channel configured by the corresponding strategy is output. Finally, the results of the four matches of S31, S32, S33, and S34 are merged and collected, and the repeated payment channels in the four matches are removed to generate the payment routing strategy results.

[0057] In some embodiments, the request type also includes a directional request, and the method further includes: determining whether the request type is a directional request; if so, taking the directional routing as the final routing result.

[0058] As a specific embodiment of the present invention, in the payment system, H1 can be set, and the transaction idempotent processor is used to match the transaction log data in the transaction log table according to the serial number in the transaction message. If the match is successful, the processor will directly return the generated routing result, otherwise it will continue to execute the next processor; H2, the transaction log recording processor, the transaction log recording processor is used to record the key fields in the transaction message according to the transaction message content, generate a transaction log requesting the routing engine, and continue to execute the next processor after successful processing; H3, the card Bin identification processor is used to identify the bank where the bank card is opened according to the bank card number in the transaction message, and record the identification result, and continue to execute the next processor after successful processing; H4, the contract collection routing processor is used to execute the first preset routing strategy and the second preset routing strategy, and take the intersection of the execution results of the two strategies to obtain the payment channel set. When the transaction type is a contract type, first remove the invalid and currently in maintenance payment channels from the payment channel set obtained by merging the output results of the first preset routing strategy and the second preset routing strategy, and then remove the payment channels that already exist in the protocol library according to the bank card number; when the transaction type is a collection type, first remove the invalid and currently in maintenance payment channels from the payment channel set obtained by merging the first preset routing strategy and the second preset routing strategy, and then remove the payment channels that do not exist in the protocol library according to the bank card number. Finally, sort the payment channels produced by the routing according to the priority, and output the contract collection routing result. H5, the payment routing processor, used to execute the third preset routing strategy, obtain the payment channel set that meets the policy conditions, first filter and remove the invalid and currently in maintenance payment channels, and then count and remove the payment channels that exceed the single-day payment total amount configured by the payment channel. Finally, sort the payment channels produced by the routing according to the priority, and output the payment routing result. H6, the directional routing post-processor, used to record the routing result in the routing table, assemble the transaction response parameters according to the routing result, and return the transaction result to end the process. H7, routing post-processor, used to remove duplicate payment channels in routing results, retain the routing results with the highest priority for duplicate payment channels, record the routing results in the routing table after removing duplicate payment channels, assemble transaction response parameters according to routing results, return the transaction results to end the process. H8, routing trial calculation post-processor, used to remove duplicate payment channels in routing results, assemble transaction response parameters according to routing results, return the transaction results to end the process. Preferably, corresponding to the above settings, equipped with corresponding routing factories; including: F1, directed routing factory, that is, known routing results, sequentially execute processors in the responsibility chain through the directed routing responsibility chain, record routing results with the data structure of the routing engine and complete relevant routing data, and execute the following routing processors in the directed routing factory in chain order: H1->H2->H3->H6.F2, the contracted collection routing factory, is used to calculate the payment channel that meets the policy configuration through the configured product routing strategy and the issuing bank routing strategy, and finally record the routing result. The contracted collection routing factory executes the following routing processors in a chain sequence: H1->H2->H3->H4->H7. F3, the payment routing factory, is used to calculate the payment channel that meets the policy configuration through the configured payment routing strategy, and finally record the routing result. The payment routing factory executes the following routing processors in a chain sequence: H1->H2->H3->H5->H7. F4, the contracted collection routing trial calculation factory: is used to calculate the payment channel that meets the policy configuration through the configured product routing strategy and the issuing bank routing strategy, and finally output the routing result but do not record the routing result. The contracted collection routing trial calculation factory executes the following routing processors in a chain sequence: H2->H3->H4->H8. F5, Payment Routing Calculation Factory: It is used to calculate the payment channels that meet the policy configuration through the configured payment routing strategy, and finally output the routing results but do not record the routing results. The following routing processors are executed in a chain sequence in the payment routing calculation factory: H2->H3->H5->H8.

[0059] In summary, according to the payment routing method of an embodiment of the present invention, first, a payment request is obtained, and the payment request includes a request type parameter and bank card number information; then, the request type parameter is parsed to obtain the request type corresponding to the payment request; then, the bank card number information is identified to obtain the account opening bank information corresponding to the bank card number information; then, the corresponding routing processor is called according to the request type; then, the routing processor performs routing calculation according to the preset routing strategy, the account opening bank information and the bank card number information to obtain the final routing result; thereby realizing effective payment routing based on the payment request; at the same time, improving the convenience of payment channel expansion.

[0060] In a second aspect, an embodiment of the present invention provides a computer-readable storage medium on which a payment routing program is stored. When the payment routing program is executed by a processor, the payment routing method as described above is implemented.

[0061] In a third aspect, an embodiment of the present invention provides a payment routing device, such as Figure 4 As shown, the payment routing device includes: an acquisition module 10, a parsing module 20, an identification module 30, a calling module 40 and a routing processor 50.

[0062] The acquisition module 10 is used to acquire a payment request, which includes a request type parameter and bank card number information;

[0063] The parsing module 20 is used to parse the request type parameter to obtain the request type corresponding to the payment request;

[0064] The identification module 30 is used to identify the bank card number information to obtain the account opening bank information corresponding to the bank card number information;

[0065] The calling module 40 is used to call the corresponding routing processor according to the request type;

[0066] The routing processor 50 is used to perform routing calculation according to the preset routing strategy, the account opening bank information and the bank card number information to obtain the final routing result.

[0067] In some embodiments, the request types include contract signing request, collection request, payment request, contract signing trial settlement request, collection trial settlement request and payment trial settlement request. Before identifying the bank card number information, it also includes: determining whether the request type is a contract signing trial settlement request, a collection trial settlement request or a payment trial settlement request; if not, calling the transaction idempotent processor; the transaction idempotent processor queries the transaction log according to the transaction serial number corresponding to the payment request; determining whether the transaction log stores the routing result corresponding to the transaction serial number; if the transaction log stores the routing result corresponding to the transaction serial number, directly using the routing result as the final routing result.

[0068] In some embodiments, when the request type is a contract signing request, a collection request, a contract signing trial settlement request, or a collection trial settlement request, the routing processor performs routing calculation according to a preset routing strategy, account opening bank information, and bank card number information to obtain a final routing result, including: executing a first preset routing strategy and a second preset routing strategy respectively to obtain two calculation results, and taking the intersection of the two calculation results as a first pre-selected set; traversing each payment channel in the first pre-selected set to exclude invalid payment channels therein to obtain a second pre-selected set; determining whether the request type is a contract signing request or a contract signing trial settlement request; if so, querying a protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the bank card number; The method comprises the following steps: determining a payment channel in the protocol library corresponding to the bank card number information, and when the payment channel exists in the protocol library corresponding to the bank card number information, removing the payment channel from the second pre-selected set, and traversing each payment channel in the second pre-selected set to obtain a third pre-selected set; if not, querying the protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and when the payment channel does not exist in the protocol library corresponding to the bank card number information, removing the payment channel from the second pre-selected set, and traversing each payment channel in the second pre-selected set to obtain a fourth pre-selected set; and generating a final routing result based on the third pre-selected set or the fourth pre-selected set.

[0069] It should be noted that the above description of the payment routing method is also applicable to the payment routing device and will not be elaborated here.

[0070] In summary, according to the payment routing device of the embodiment of the present invention, an acquisition module is set to acquire a payment request, the payment request includes a request type parameter and bank card number information; a parsing module is used to parse the request type parameter to obtain the request type corresponding to the payment request; an identification module is used to identify the bank card number information to obtain the account opening bank information corresponding to the bank card number information; a calling module is used to call a corresponding routing processor according to the request type; and a routing processor is used to perform routing calculation according to a preset routing strategy, account opening bank information and bank card number information to obtain a final routing result. Thus, effective payment routing based on payment requests is achieved; at the same time, the convenience of payment channel expansion is improved.

[0071] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0072] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0073] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0074] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0075] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0076] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0077] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0078] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A payment routing method, characterized in that: The following steps are involved: Obtaining a payment request, wherein the payment request includes a request type parameter and bank card number information; Parsing the request type parameter to obtain the request type corresponding to the payment request; Identify the bank card number information to obtain the account opening bank information corresponding to the bank card number information; Calling the corresponding routing processor according to the request type; The routing processor performs routing calculation according to a preset routing strategy, the account opening bank information and the bank card number information to obtain a final routing result.

2. The payment routing method according to claim 1, characterized in that: The request types include contract signing request, agency collection request, agency payment request, contract signing trial settlement request, agency collection trial settlement request and agency payment trial settlement request. Before identifying the bank card number information, the following is also included: Determining whether the request type is a contract trial settlement request, a collection trial settlement request, or a payment trial settlement request; If not, call the transaction idempotency handler; The transaction idempotent processor queries the transaction log according to the transaction serial number corresponding to the payment request; Determining whether the transaction log stores a routing result corresponding to the transaction serial number; If the transaction log stores a routing result corresponding to the transaction serial number, the routing result is directly used as the final routing result.

3. The payment routing method according to claim 2, characterized in that: When the request type is a contract signing request, a collection request, a contract signing trial settlement request, or a collection trial settlement request, the routing processor performs routing calculation according to a preset routing strategy, the account opening bank information, and the bank card number information to obtain a final routing result, including: Executing the first preset routing strategy and the second preset routing strategy respectively to obtain two calculation results, and taking the intersection of the two calculation results as the first pre-selected set; Traversing each payment channel in the first pre-selected set to exclude invalid payment channels therein, and obtaining a second pre-selected set; Determine whether the request type is a contract signing request or a contract trial settlement request; If yes, query the protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and if the payment channel exists in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a third pre-selected set; If not, query the protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and if the payment channel does not exist in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a fourth pre-selected set; A final routing result is generated based on the third pre-selected set or the fourth pre-selected set.

4. The payment routing method according to claim 3, characterized in that: Generating a final routing result based on the third pre-selected set or the fourth pre-selected set includes: For the third pre-selected set, sorting the payment channels in the third pre-selected set according to a preset priority to generate a final routing result; For the fourth pre-selected set, checking whether the agency collection amount corresponding to the payment channel in the fourth pre-selected set exceeds the agency collection limit corresponding to the account opening bank information; If the agency collection amount corresponding to the payment channel in the fourth pre-selected set exceeds the agency collection limit corresponding to the account opening bank information, the payment channel is removed from the fourth pre-selected set; Traversing the payment channels in the fourth pre-selected set to obtain a fifth pre-selected set; The payment channels in the fifth pre-selected set are sorted according to a preset priority to generate a final routing result.

5. The payment routing method according to claim 2, characterized in that: When the request type is a payment request or a payment trial calculation request, the routing processor performs routing calculation according to a preset routing strategy, the account opening bank information and the bank card number information to obtain a final routing result, including: executing a third preset routing strategy to obtain a sixth pre-selected set; Traversing each payment channel in the sixth pre-selected set to exclude invalid payment channels therein, to obtain a seventh pre-selected set; For each payment channel in the seventh pre-selected set, determining whether the single-day total amount corresponding to the payment channel is greater than the total amount limit of the payment on behalf of another; If yes, then remove the payment channel from the seventh pre-selected set; Traversing all payment channels in the seventh pre-selected set to obtain an eighth pre-selected set; The payment channels in the eighth pre-selected set are sorted according to a preset priority to obtain a final routing result.

6. The payment routing method according to claim 2, characterized in that: The request type further includes a directional request, and the method further includes: Determine whether the request type is a directional request; If yes, the directed route is taken as the final routing result.

7. A computer-readable storage medium, characterized in that A payment routing program is stored thereon, and when the payment routing program is executed by a processor, the payment routing method as described in any one of claims 1-6 is implemented.

8. A payment routing device, characterized in that: include: An acquisition module, the acquisition module is used to acquire a payment request, the payment request includes a request type parameter and bank card number information; A parsing module, the parsing module is used to parse the request type parameter to obtain the request type corresponding to the payment request; An identification module, the identification module is used to identify the bank card number information to obtain the account opening bank information corresponding to the bank card number information; A calling module, the calling module is used to call a corresponding routing processor according to the request type; The routing processor is used to perform routing calculation according to a preset routing strategy, the account opening bank information and the bank card number information to obtain a final routing result.

9. The payment routing device according to claim 8, characterized in that: The request types include contract signing request, agency collection request, agency payment request, contract signing trial settlement request, agency collection trial settlement request and agency payment trial settlement request. Before identifying the bank card number information, the following is also included: Determining whether the request type is a contract trial settlement request, a collection trial settlement request, or a payment trial settlement request; If not, call the transaction idempotency handler; The transaction idempotent processor queries the transaction log according to the transaction serial number corresponding to the payment request; Determining whether the transaction log stores a routing result corresponding to the transaction serial number; If the transaction log stores a routing result corresponding to the transaction serial number, the routing result is directly used as the final routing result.

10. The payment routing device according to claim 9, characterized in that: When the request type is a contract signing request, a collection request, a contract signing trial settlement request, or a collection trial settlement request, the routing processor performs routing calculation according to a preset routing strategy, the account opening bank information, and the bank card number information to obtain a final routing result, including: Executing the first preset routing strategy and the second preset routing strategy respectively to obtain two calculation results, and taking the intersection of the two calculation results as the first pre-selected set; Traversing each payment channel in the first pre-selected set to exclude invalid payment channels therein, and obtaining a second pre-selected set; Determine whether the request type is a contract signing request or a contract trial settlement request; If yes, query the protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and if the payment channel exists in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a third pre-selected set; If not, query the protocol library according to the bank card number information to determine whether the payment channel in the second pre-selected set exists in the protocol library corresponding to the bank card number information, and if the payment channel does not exist in the protocol library corresponding to the bank card number information, remove the payment channel from the second pre-selected set, and traverse each payment channel in the second pre-selected set to obtain a fourth pre-selected set; A final routing result is generated based on the third pre-selected set or the fourth pre-selected set.