Method, system, device and storage medium for determining payment channel
By generating and matching the combination of attribute values, the problem of low efficiency of payment channels in existing technology has been solved, and efficient payment channel matching is achieved.
Patent Information
- Application Number
- CN202310027173.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-09
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2043-01-09
AI Technical Summary
The prior art is less efficient when determining payment channels, resulting in less efficiency in determining payment channels.
By obtaining the attribute value in the payment request, the combination of the attribute value is required according to the preset attribute combination position, and traversing the preset channel routing template table to determine the payment channel that matches the generated attribute combination.
This method can achieve the matching channels only at a time, which significantly improves the efficiency of channel routing.
Smart Images

Figure CN116308333B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial payment, and in particular to a method, system, device and storage medium for determining a payment channel. Background Art
[0002] Payment channels are channels for transferring funds, also known as funding channels and payment channels, such as WeChat, Alipay, Tonglian, and YeePay, etc. Since a trading platform may be connected to multiple payment channels, the concept of channel routing has emerged.
[0003] Channel routing refers to the process of selecting the highest priority payment channel to complete the payment based on the initiated payment request according to the configured channel routing strategy.
[0004] Currently, the process of determining payment channels based on channel routing generally includes the following steps:
[0005] After receiving a payment request initiated by a user, the various attributes used to determine the payment channel contained in the payment request are obtained; the corresponding channel routing table is obtained from the memory, and the single channel route stored in the channel routing table includes the attribute combination, the corresponding relationship between the attribute values in the attribute combination (such as the merchant, the merchant's organization and the collection business type) and the payment channel (specifically, the name or code of the payment channel); each attribute in the payment request is traversed through each attribute combination in the channel routing table one by one to determine the attribute combination that can match the attribute contained in the payment request; then, the attribute value corresponding to the attribute contained in the payment request is assigned to the attribute in the determined attribute combination to further match the payment channel corresponding to the attribute value of the attribute combination as the payment channel corresponding to the payment request. For example, the attribute combination of "merchant, merchant's organization and collection business type" may have an attribute value such as: the attribute value of the attribute "merchant" is a certain insurance group, the attribute value of the attribute "merchant organization" is the property insurance company of the group, and the attribute value of the attribute "collection business type" is "auto insurance premium".
[0006] It should be noted that, according to the prior art, the specific implementation process of "traversing each attribute combination in the channel routing table one by one for each attribute in the payment request" is as follows:
[0007] First, select the first attribute from the attributes obtained from the payment request, and match it with the attribute combinations in the channel routing table to filter out the first group of attribute combinations including the first attribute;
[0008] Then, a second attribute is selected from the attributes obtained from the payment request, and matched again with the first set of attribute combinations to obtain a second set of attribute combinations that includes both the first attribute and the second attribute;
[0009] And so on, ... until all attributes in the payment request are matched.
[0010] The problem with the above matching process is that it is inefficient, which in turn leads to inefficient determination of payment channels. Summary of the invention
[0011] The embodiments of the present application provide a method, system, device and storage medium for determining a payment channel, so as to solve the problem of low efficiency in determining a payment channel using the existing technology.
[0012] The present application embodiment adopts the following technical solutions:
[0013] A method for determining a payment channel, comprising:
[0014] Get the attribute values used to determine the payment channel contained in the payment request;
[0015] According to a preset requirement for the arrangement position of each attribute value in the attribute value combination to be generated, respectively determining the arrangement position of each attribute value in the attribute value combination to be generated;
[0016] Generating an attribute value combination according to the arrangement position and the attribute values; wherein the attribute values in the generated attribute value combination are arranged according to the determined arrangement position;
[0017] By traversing a preset channel routing template table, determining each channel routing that matches the generated attribute value combination from the channel routing template table; wherein the channel routing template table contains a plurality of channel routings; a single channel routing includes a payment channel and a corresponding attribute value combination constructed according to the arrangement position requirement;
[0018] A target payment channel is determined from the payment channels respectively included in the channel routes as the payment channel adopted by the payment request.
[0019] A system for determining a payment channel, comprising:
[0020] A request processing unit, used to obtain various attribute values for determining a payment channel contained in a payment request;
[0021] an attribute value positioning unit, which determines the arrangement position of each attribute value in the attribute value combination to be generated according to a preset arrangement position requirement for each attribute value in the attribute value combination to be generated;
[0022] A combination generating unit, generating an attribute value combination according to the arrangement position and the attribute values; wherein the attribute values in the generated attribute value combination are arranged according to the determined arrangement position;
[0023] The channel matching unit determines, by traversing a preset channel routing template table, each channel routing that matches the generated attribute value combination from the channel routing template table; wherein the channel routing template table contains a plurality of channel routings; a single channel routing includes a payment channel and a corresponding attribute value combination constructed according to the arrangement position requirement;
[0024] The channel determination unit is used to determine a target payment channel from the payment channels respectively included in the channel routes as the payment channel adopted by the payment request.
[0025] A computing device, comprising: a memory and a processor, wherein:
[0026] The memory is used to store computer programs;
[0027] The processor is coupled to the memory and is used to execute the computer program stored in the memory to perform the above method.
[0028] A computer-readable storage medium storing a computer program, wherein the computer program can implement the above method when executed by a computer.
[0029] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0030] Set corresponding attribute values for each attribute included in the payment request, and set arrangement position requirements for each attribute value. Based on the arrangement position, set attribute value combinations in the channel routing template table, and generate corresponding attribute value combinations for each attribute included in the current payment request. By traversing the channel routing target table, based on the matching of the attribute value combination corresponding to the current payment request with each attribute value combination in the channel routing template table, determine the matching payment channel. It can be seen that this solution can achieve payment channel matching with only one traversal, which improves channel routing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0032] Figure 1 A specific implementation flow chart of a method for determining a payment channel provided in an embodiment of the present application;
[0033] Figure 2 A flowchart of another embodiment of a method for determining a payment channel provided in an embodiment of the present application;
[0034] Figure 3 It is a schematic diagram of one implementation of a method for determining a payment channel provided in an embodiment of the present application;
[0035] Figure 4 is a schematic diagram of another implementation of a method for determining a payment channel provided in an embodiment of the present application;
[0036] Figure 5 is a structural diagram of a system for determining a payment channel provided in an embodiment of the present application;
[0037] Figure 6 A schematic diagram of the specific structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0039] Those skilled in the art may appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0040] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0041] Example 1
[0042] Embodiment 1 of the present application provides a method for determining a payment channel, so as to solve the problem of low efficiency in determining payment channels using the existing technology.
[0043] The executor of the method may be any computing device that can implement the method, such as a server, a mobile phone, a personal computer, a smart wearable device, a smart robot, and the like.
[0044] The different steps of the method may be implemented by the same execution subject or by different execution subjects. The embodiment of the present application does not limit the execution subject used to implement the method.
[0045] In addition, the execution order of different steps is not limited in the embodiment of the present application. When using the method provided in the embodiment of the present application, the execution order of different steps can be adjusted according to actual needs.
[0046] For ease of description, the method provided in the embodiment of the present application is described in detail below by taking a sample data enhancement device as an example of the execution subject of the method.
[0047] like Figure 1 As shown, a method for determining a payment channel provided in an embodiment of the present application includes the following steps:
[0048] Step 101, obtaining various attributes and attribute values contained in the payment request for determining the payment channel.
[0049] The attributes for determining the payment channel may be attributes representing the merchant dimension, or may be information of other dimensions.
[0050] The information of the merchant dimension refers to the dimension that represents the merchant's specific information, such as the merchant's office or business address, the merchant's branch, the merchant's business type, business scope, transaction amount, etc., all of which constitute the attributes that represent the merchant dimension. For example, the attributes include: merchant, organization, collection business type and amount, where the merchant can be the merchant's name, identification code and other information as attributes, such as a supermarket or a company; the organization is the current location of the payee in the merchant, such as a supermarket store 2 or a company's Shenzhen branch; the collection business type is the business type of the current organization, such as the home appliance business sold by the supermarket store 2 or the trademark agency service of a company's Shenzhen branch; the amount is the collection amount.
[0051] Other dimensions may be payer dimensions, such as payment method (such as credit card payment, Alipay payment), payment account (bank card number, payer's provincial ID number), etc.
[0052] In one implementation, a property configuration table is preset, in which a plurality of properties and a property value corresponding to each property are stored.
[0053] Step 102: According to preset arrangement position requirements for each attribute value in the attribute value combination to be generated, the arrangement position of each attribute value in the attribute value combination to be generated is determined respectively.
[0054] In one implementation, the arrangement position requirements of the attribute values are determined according to the attribute values in the preset attribute configuration table. For example, if the attribute configuration table stores the corresponding relationships between attributes and attribute values: attribute-1, institution-2, collection business type-3, amount-4, then the arrangement position requirements of the corresponding attribute values are 1-2-3-4.
[0055] The arrangement position of each attribute value in the attribute value combination to be generated is determined specifically as follows: if the attributes included in the attribute value combination to be generated include merchant and payment business type, the arrangement position of the corresponding attribute value in the attribute value combination is 1-empty-3, and empty means that there is no attribute value at this position, that is, the current payment request or attribute value combination does not contain the corresponding attribute.
[0056] Step 103, generating an attribute value combination according to the arrangement position and the attribute values; wherein the attribute values in the generated attribute value combination are arranged according to the determined arrangement position.
[0057] Continuing with the example of step 102, for the attributes merchant and payment service type, the generated attribute value combination is 1_3.
[0058] In one implementation, generating an attribute value combination according to the arrangement position and the attribute values specifically includes:
[0059] At least two attributes from the attributes are selected, and a plurality of attribute value combinations are generated according to the arrangement positions and corresponding attribute values of the at least two attributes selected each time.
[0060] For example, the current payment request includes attributes such as merchant, institution and payment business type. Merchant and institution, merchant and payment business type, institution and payment business type, merchant, institution and payment business type are selected respectively to form 4 combinations. Then each combination and attribute value combination is represented as: merchant_institution corresponds to 1_2, merchant and payment business type corresponds to 1_3, institution and payment business type corresponds to 2_3, merchant, institution and payment business type corresponds to 1_2_3.
[0061] Step 104, by traversing a preset channel routing template table, determining from the channel routing template table each channel routing that matches the generated attribute value combination; the channel routing template table includes a plurality of channel routings; wherein a single channel routing includes a payment channel, and a corresponding attribute value combination constructed according to the arrangement position requirement.
[0062] The channel routing template table stores a list of attribute combinations, i.e., all attribute combinations that can match payment channels formed by various attributes representing merchant dimensions that may appear in the payment request. In each of the attribute combinations, each attribute in the attribute combination is arranged according to a determined arrangement position to generate an attribute value combination.
[0063] For example, for the attributes representing the merchant dimension in the payment request: merchant, institution and collection business type, select merchant and institution, merchant and collection business type, institution and collection business type, merchant and institution and collection business type to form 4 combinations, and the attribute value combination corresponding to each combination: merchant_institution corresponds to 1_2, merchant_collection business type corresponds to 1_3, institution_collection business type corresponds to 2_3, merchant_institution_collection business type 1_2_3.
[0064] In the attribute combination list, there are three attribute combinations and corresponding attribute value combinations for the attributes of merchant, institution, and payment collection business type: merchant_institution corresponds to 1_2, merchant_payment collection business type corresponds to 1_3, and merchant_institution_payment collection business type corresponds to 1_2_3. Therefore, based on the four attribute value combinations formed by the attributes representing the merchant dimension of the current payment request, when traversing the channel routing template table, there is no corresponding matching result for the attribute value combination 2_3, that is, the combination formed by institution_payment collection business type has no matching payment channel, and the payment channel with the highest priority can be selected as the final payment channel from the payment channels corresponding to the attribute value combinations of the other three combinations.
[0065] In one implementation, traversing a preset channel routing template table to determine, from the channel routing template table, each channel route that matches the generated attribute value combination includes:
[0066] Determine whether there is a numerical definition in each attribute value. If there is a numerical definition, match the numerical definition with the hash table in the channel routing template table to obtain the payment channel corresponding to the numerical range of the numerical definition. The hash table stores the correspondence between the numerical range and the payment channel.
[0067] The attributes corresponding to the value definition include the payment amount.
[0068] In this implementation, in the case of a numerical definition, the numerical definition range described by the numerical value in the current payment request is directly matched to quickly determine the payment channel, further improving the efficiency of determining the payment channel.
[0069] In one implementation, traversing a preset channel routing template table to determine, from the channel routing template table, each channel route that matches the generated attribute value combination also includes: based on the attribute value combination, traversing the channel routing template table in a preset database; if no payment channel is matched in the preset database, traversing the channel routing template table in a backup database based on the attribute value combination.
[0070] Example 2
[0071] Embodiment 1 of the present application provides a method for determining a payment channel, so as to solve the problem of low efficiency in determining payment channels using the existing technology.
[0072] The executor of the method may be any computing device that can implement the method, such as a server, a mobile phone, a personal computer, a smart wearable device, a smart robot, and the like.
[0073] The different steps of the method may be implemented by the same execution subject or by different execution subjects. The embodiment of the present application does not limit the execution subject used to implement the method.
[0074] In addition, the execution order of different steps is not limited in the embodiment of the present application. When using the method provided in the embodiment of the present application, the execution order of different steps can be adjusted according to actual needs.
[0075] For ease of description, the method provided in the embodiment of the present application is described in detail below by taking a sample data enhancement device as an example of the execution subject of the method.
[0076] like Figure 2 As shown, a method for determining a payment channel provided in an embodiment of the present application includes the following steps:
[0077] In this embodiment, the contents of the attribute configuration table, the routing template table and the hash table Hash Map are examples and do not limit the solution. The key value mentioned in this embodiment corresponds to the characterization value in Example 1. The routing template table in this embodiment is equivalent to the channel routing template table in Example 1.
[0078] Step 201: read the key value configuration sequence from the preset attribute configuration table to determine the mapping rule of the key of the preset database Redis. The key value in this step is equivalent to the attribute value in Example 1.
[0079] In one implementation, the attributes included in the attribute configuration table include merchant, institution, payment service type and amount, and the key value configuration order corresponding to each attribute is 1, 2, 3 and 4, forming a mapping relationship between attributes and sequence values. The sequence value here and the sequence value mentioned below in this embodiment are equivalent to the attribute value in Example 1.
[0080] The order value in the system attribute configuration table defines the priority of the channel matching dimension at the business level. In this implementation, the corresponding priority order from high to low is merchant, institution, payment business type, and amount.
[0081] Step 202, obtain the attributes corresponding to the payment request, read the order (i.e., attribute value) corresponding to the attributes from the attribute configuration table, and concatenate the corresponding attributes in the payment request according to the attribute combination list in the routing template table to obtain the key value of each combination.
[0082] In one implementation, a list of attribute combinations is configured in the routing template table, such as merchant_payment business type, merchant_institution_payment business type, etc. According to the list of attribute combinations in the routing template table, the order of each attribute in the attribute configuration table is used to obtain the corresponding attribute combination key value. For example, the attribute combination in the attribute combination list is: merchant_payment business type, the order of the merchant in the attribute configuration table is 1, and the order of the payment business type in the attribute configuration table is 3, then the corresponding attribute combination key value is 1_3.
[0083] Step 203, after obtaining the key value, determine whether the key value has a range definition, if not, execute step 204, if yes, execute step 205.
[0084] Step 204, match the hash value corresponding to the key value in the Redis database, and return the matched payment account if the match is successful. By matching the payment account by key value, the corresponding payment account can be obtained by traversing the routing configuration information once.
[0085] In one implementation, the payment account corresponding to each key value may be stored in the Redis database in advance.
[0086] Step 205, match the corresponding hash table hash map from the Redis database according to the key value. The hash map defines the corresponding relationship between the range field and the payment account. In this implementation, the corresponding relationship between the key value outside the defined range and the payment account is preset. After obtaining the hash map, poll the hash map, disassemble the obtained field value according to the symbol _, and compare whether the value in the payment request is within the range. If the corresponding range is found, the corresponding payment account is further determined. In the hash map, * represents infinity. If the corresponding value is not found in a field, continue to search for the next field until the corresponding range field is found.
[0087] Step 206, determine whether the corresponding payment account is found in step 204 and step 205, if so, execute step 207, if not, execute step 208.
[0088] Step 207, obtaining the payment account found in steps 204 and 205.
[0089] Step 208, determine whether all key values have been matched, if not, execute step 203, if so, execute step 209.
[0090] In one implementation, there may be multiple key values obtained in step 202. For example, if the payment request contains the attributes merchant, organization, and payment service type, based on the attribute combination list, the corresponding attribute combinations are: merchant_payment service type, merchant_organization_payment service type, and merchant_organization. There are three attribute combinations, and three key values are obtained accordingly. Therefore, step 208 will determine whether the key value is matched.
[0091] Step 209, sorting the acquired payment accounts according to their priorities, selecting the payment account with the highest priority as the determined payment account, and determining the payment channel according to the obtained payment account based on the corresponding relationship between the payment account and the payment channel.
[0092] In one implementation, the routing configuration information is stored in a preset database, which is a key-value database, with the representation value as the key and the payment account as the value. The routing configuration information includes the channel routing template table described in the above embodiment.
[0093] like Figure 3As shown, the present application also provides a cache synchronization and refresh mechanism. When saving the routing configuration, it can be synchronously written into the backup database TBase3011 and the preset database Redis3012 of the South Center 301, or the backup database 3021 and the preset database 3022 of the North Center 302, and then the data is copied from one center (South Center) to another center (North Center) through the distributed data processing platform kafka to ensure the synchronization of the configuration data.
[0094] In one implementation, Figure 4 As shown, the execution process when reading the routing configuration is:
[0095] Step 401, first read the routing configuration information from the preset database Redis, if read, execute step 402, if not read, execute step 403.
[0096] Step 402: Return the routing configuration information stored in the preset database Redis.
[0097] Step 403: read the routing configuration information in the backup database TBase.
[0098] Step 404: cache the routing configuration information in the backup database TBase into the preset database Redis.
[0099] When reading routing configuration information from the backup database TBase, distributed locks can be used to reduce repeated access to the library table.
[0100] Example 3
[0101] In order to solve the problem of low efficiency in determining payment channels using the prior art, based on the same inventive concept as the above embodiments of the present application, Embodiment 3 of the present application provides a system for determining payment channels.
[0102] The specific structural diagram of the system is shown in the following figure. Figure 5 As shown, it includes the following functional units:
[0103] The request processing unit 501 is used to obtain various attribute values for determining the payment channel contained in the payment request;
[0104] The attribute value positioning unit 502 determines the arrangement position of each attribute value in the attribute value combination to be generated according to a preset arrangement position requirement for each attribute value in the attribute value combination to be generated;
[0105] A combination generating unit 503 generates an attribute value combination according to the arrangement position and the attribute values; wherein the attribute values in the generated attribute value combination are arranged according to the determined arrangement position;
[0106] The channel matching unit 504 determines, by traversing a preset channel routing template table, each channel routing that matches the generated attribute value combination from the channel routing template table; wherein the channel routing template table includes a plurality of channel routings; a single channel routing includes a payment channel and a corresponding attribute value combination constructed according to the arrangement position requirement;
[0107] The channel determination unit 505 is used to determine a target payment channel from the payment channels respectively included in the channel routes as the payment channel adopted by the payment request.
[0108] In the request processing unit 501, each attribute and each attribute value used to generate the payment channel in the payment request is obtained through a preset attribute configuration table, and the attribute configuration table stores a plurality of attributes and the attribute value corresponding to each attribute.
[0109] The arrangement position requirements of the attribute values described in the attribute combination unit 502 are determined according to the attribute values in the preset attribute configuration table. For example, if the attribute configuration table stores the corresponding relationship between attributes and attribute values: attribute-1, institution-2, collection business type-3, amount-4, then the arrangement position requirements of the corresponding attribute values are 1-2-3-4.
[0110] The arrangement position of each attribute value in the attribute value combination to be generated is determined specifically as follows: if the attributes included in the attribute value combination to be generated include merchant and payment business type, the arrangement position of the corresponding attribute value in the attribute value combination is 1-empty-3, and empty means that there is no attribute value at this position, that is, the current payment request or attribute value combination does not contain the corresponding attribute.
[0111] In one implementation, the channel matching unit 504 determines, from the channel routing template table, each channel route that matches the generated attribute value combination by traversing the preset channel routing template table, specifically for:
[0112] Determine whether there is a numerical definition in each attribute value. If there is a numerical definition, match the numerical definition with the hash table in the channel routing template table to obtain the payment channel corresponding to the numerical range of the numerical definition. The hash table stores the correspondence between the numerical range and the payment channel.
[0113] The method of traversing a preset channel routing template table and determining each channel route matching the generated attribute value combination from the channel routing template table is also used for:
[0114] Based on the attribute value combination, the channel routing template table in the preset database is traversed; if the payment channel is not matched in the preset database, the channel routing template table in the backup database is traversed based on the attribute value combination.
[0115] The channel determination unit 505 determines a target payment channel from the payment channels respectively included in the channel routes according to the priority of each payment channel as the payment channel adopted by the payment request.
[0116] Example 4
[0117] Based on the same inventive concept as the aforementioned embodiments of the present application, Embodiment 4 of the present application provides a computing device to solve the problem of low efficiency in determining payment channels using existing technologies.
[0118] like Figure 6 As shown, the computing device includes: a memory 601 and a processor 602. The memory 601 can be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method for operating on the electronic device. The memory 601 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.
[0119] The processor 602 is coupled to the memory 601 and is used to execute the computer program stored in the memory 601 to execute a method for determining a payment channel described in Example 1 or Implementation 2 of the present application.
[0120] When the processor 602 executes the computer program in the memory 601, in addition to the above functions, it can also realize other functions, and the details can be referred to the description of the above embodiments.
[0121] Further, such as Figure 6 As shown, the computing device also includes: a display 604, a communication component 603, a power component 605, an audio component 606 and other components. Figure 6 Only some components are shown schematically, and it does not mean that the computing device only includes Figure 6 Components shown.
[0122] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the methods provided in the above embodiments can be implemented.
[0123] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0124] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for determining a payment channel, characterized in that: include: Get the attribute values used to determine the payment channel contained in the payment request; According to a preset requirement for the arrangement position of each attribute value in the attribute value combination to be generated, respectively determining the arrangement position of each attribute value in the attribute value combination to be generated; Generating an attribute value combination according to the arrangement position and the attribute values; wherein the attribute values in the generated attribute value combination are arranged according to the determined arrangement position; By traversing a preset channel routing template table, determining each channel routing that matches the generated attribute value combination from the channel routing template table; wherein the channel routing template table contains a plurality of channel routings; a single channel routing includes a payment channel and a corresponding attribute value combination constructed according to the arrangement position requirement; Determining a target payment channel from the payment channels respectively included in the channel routes as the payment channel adopted by the payment request; The traversing a preset channel routing template table to determine each channel routing matching the generated attribute value combination from the channel routing template table includes: Determine whether there is a numerical definition in each of the attribute values. If there is a numerical definition, the numerical definition is matched with the hash table in the channel routing template table to obtain the payment channel corresponding to the numerical range of the numerical definition, and the hash table stores the corresponding relationship between the numerical range and the payment channel.
2. The method according to claim 1, characterized in that The obtaining of the attribute values for determining the payment channel contained in the payment request specifically includes: Get the attributes used to determine the payment channel contained in the payment request; The attribute values corresponding to the attributes are determined from a preset attribute configuration table, wherein the attribute configuration table includes a plurality of attributes and an attribute value of each attribute.
3. The method according to claim 2, characterized in that Generating a combination of attribute values according to the arrangement positions and the attribute values specifically includes: At least two attributes from the attributes are selected, and a plurality of attribute value combinations are generated according to the arrangement positions and corresponding attribute values of the at least two attributes selected each time.
4. The method according to claim 3, characterized in that The method further comprises: For the several attribute value combinations; Using each attribute value combination, traversing the channel routing template table, determining the payment channel corresponding to each attribute value combination; A target payment channel is determined from the payment channels corresponding to each attribute value combination as the payment channel adopted by the payment request.
5. The method according to claim 1, characterized in that The attributes corresponding to the value definition include the payment amount.
6. The method according to claim 1, characterized in that include: The channel routing template table is stored in a preset database, which is a key-value database, with the representation value as the key and the payment account as the value.
7. The method according to claim 1, characterized in that include: The channel routing template table is stored in a preset database and a backup database in the first data center respectively; The channel routing template table is copied to the preset database and the backup database of the second data center through the distributed data processing platform.
8. The method according to claim 7, characterized in that The step of traversing a preset channel routing template table and determining, from the channel routing template table, each channel routing that matches the generated attribute value combination further includes: Based on the attribute value combination, traverse the channel routing template table in the preset database; If no payment channel is matched in the preset database, the routing configuration information in the backup database is traversed based on the attribute value combination.
9. A system for determining a payment channel, characterized in that: include: A request processing unit, used to obtain various attribute values for determining a payment channel contained in a payment request; an attribute value positioning unit, which determines the arrangement position of each attribute value in the attribute value combination to be generated according to a preset arrangement position requirement for each attribute value in the attribute value combination to be generated; A combination generating unit, generating an attribute value combination according to the arrangement position and the attribute values; wherein the attribute values in the generated attribute value combination are arranged according to the determined arrangement position; The channel matching unit determines, by traversing a preset channel routing template table, each channel routing that matches the generated attribute value combination from the channel routing template table; wherein the channel routing template table contains a plurality of channel routings; a single channel routing includes a payment channel and a corresponding attribute value combination constructed according to the arrangement position requirement; a channel determination unit, configured to determine a target payment channel from the payment channels respectively included in the channel routes as the payment channel adopted by the payment request; The channel matching unit is specifically used to determine whether there is a numerical definition in each attribute value. If there is a numerical definition, the numerical definition is matched with the hash table in the channel routing template table to obtain the payment channel corresponding to the numerical range of the numerical definition, and the hash table stores the corresponding relationship between the numerical range and the payment channel.
10. A computing device, characterized in that include: Memory and processor, wherein: The memory is used to store computer programs; The processor is coupled to the memory and is used to execute the computer program stored in the memory to execute the method described in any one of claims 1 to 8.
11. A computer-readable storage medium storing a computer program, wherein the computer program can implement the method according to any one of claims 1 to 8 when executed by a computer.
Citation Information
Patent Citations
Warehouse management system warehouse-out method and device and storage medium
CN109858849A
Payment routing system and method
CN110335030A