Card bin routing selection method, device and system based on distributed cache
By using distributed caching technology in card bin routing selection, loading card bin data into the distributed cache database, parsing transaction messages and accessing card bin collection data, the performance pressure problem under centralized processing is solved and rapid response is achieved. and efficient transaction processing, enhancing the customer shopping experience.
Patent Information
- Application Number
- CN202010597596.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-06-28
AI Technical Summary
In the existing technology, the centralized processing method is used for card bin routing, which results in excessive pressure on system performance, longer processing time, and affects the customer's shopping experience.
Using a method based on distributed cache, the card bin data is obtained and loaded into the distributed cache database to form card bin collection data, the card number information is obtained through analysis of received transaction messages, and the card bin data is intercepted based on the card number information and is determined by accessing the distributed cache database. The corresponding back-end system and forwards the transaction message to the back-end system for transaction processing.
It improves the rapid response of transaction processing, solves the performance bottleneck and scalability issues under centralized processing, and improves system performance and customer shopping experience.
Smart Images

Figure CN111752978B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of card bin routing selection, and in particular to a card bin routing selection method, device and system based on distributed cache. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] At present, the acquiring system still uses the traditional centralized processing method to process the card bin routing selection, storing the card bin files in the relational database. When the front-end transaction is sent to the back-end system, it is necessary to query the card bin table in the database, and then determine what card the card bin belongs to, and then determine the back-end issuing bank, and then route the transaction to the corresponding issuing bank system for transaction processing. Card bin routing is a key step in the transaction. With the increase in the amount of cards issued, the card bin data will become larger and larger. At the same time, especially with the current increase in a large number of online and offline shopping, the current centralized card bin processing method has faced excessive pressure on system performance. With the increase in data, the processing time will become longer, seriously affecting the customer's shopping experience. Summary of the invention
[0004] The embodiment of the present invention provides a card bin routing selection method based on distributed cache, which is used to solve the technical problem that the centralized processing method for card bin routing selection in the prior art leads to excessive system performance pressure, long processing time, and affects the customer's shopping experience. The method includes:
[0005] Get multiple card bin data;
[0006] According to a preset data set format, the plurality of card bin data are loaded into a distributed cache database to form card bin set data;
[0007] Receiving a transaction message, parsing the transaction message, and obtaining card number information;
[0008] Intercept card bin data according to the card number information;
[0009] Access the card bin collection data in the distributed cache database according to the intercepted card bin data, and determine the background system corresponding to the intercepted card bin data;
[0010] The transaction message is forwarded to the backend system for transaction processing.
[0011] The embodiment of the present invention also provides a payment acquiring system to solve the technical problem that the centralized processing method for card bin routing selection in the prior art leads to excessive system performance pressure, long processing time, and affects the customer's shopping experience. The payment acquiring system includes:
[0012] A card bin data acquisition module is used to acquire multiple card bin data;
[0013] A distributed cache module, used for loading the plurality of card bin data into a distributed cache database in a preset data set format to form card bin set data;
[0014] A transaction message receiving module, used to receive a transaction message, parse the transaction message, and obtain card number information;
[0015] A card bin data interception module, used to intercept the card bin data according to the card number information;
[0016] An access module, used to access the card bin collection data in the distributed cache database according to the intercepted card bin data, and determine the background system corresponding to the intercepted card bin data;
[0017] The transaction message forwarding module is used to forward the transaction message to the backend system for transaction processing.
[0018] The embodiment of the present invention also provides a card bin routing selection system based on distributed cache, which is used to solve the technical problem that the centralized processing method used in the prior art for card bin routing selection leads to excessive system performance pressure, long processing time, and affects the customer's shopping experience. The card bin routing selection system based on distributed cache includes: an acquiring system, a distributed cache database, and a background system;
[0019] The acquiring system, distributed cache database and background system are used to implement the above-mentioned card bin routing selection method based on distributed cache.
[0020] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned card bin routing selection method based on distributed cache when executing the computer program.
[0021] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned card bin routing selection method based on distributed cache.
[0022] In an embodiment of the present invention, a plurality of card bin data are obtained; the plurality of card bin data are loaded into a distributed cache database in a preset data set format to form card bin set data; a transaction message is received, the transaction message is parsed to obtain card number information; the card bin data is intercepted according to the card number information; the card bin set data in the distributed cache database is accessed according to the intercepted card bin data, and a background system corresponding to the intercepted card bin data is determined; the transaction message is forwarded to the background system for transaction processing. Compared with the technical solutions in the prior art, the card bin routing selection is improved by adopting the distributed cache technology, thereby improving the rapid response of transaction processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0024] Figure 1 Flowchart (I) of a card bin routing selection method based on distributed cache in an embodiment of the present invention;
[0025] Figure 2 This is a flow chart of a card bin routing selection method based on distributed cache in an embodiment of the present invention (II);
[0026] Figure 3 This is a structural block diagram of the acquiring system in an embodiment of the present invention (I);
[0027] Figure 4 This is a structural block diagram of the acquiring system in an embodiment of the present invention (II);
[0028] Figure 5 It is a structural block diagram of a card bin routing selection system based on distributed cache in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0030] Currently, the processing of bank identification numbers is centralized, using a relational database to operate related data. The problem with this approach is that as the amount of data increases, performance will face bottlenecks and scalability issues.
[0031] Considering that most operations in card bin processing are read operations, the present invention will adopt distributed cache technology and the current more advanced distributed memory database to process card bins to achieve high performance and high scalability. At the same time, by redefining the data structure, the card bin processing flow is improved, the card bin processing capability is improved, and the problems currently faced by centralized processing are solved.
[0032] The card bin refers to the bin number of the bank card, i.e. the bank identification code. Bin is represented by 6 digits, appears in the first 6 digits of the card number, and is assigned by the International Organization for Standardization (ISO) to each bank card organization engaged in inter-bank switching. The bank card number is a number that identifies the issuing institution and the cardholder information, and consists of the following three parts: the issuing bank identification code (bin number), the issuing bank's custom digit, and the check code. The present invention mainly uses the card bin number for transaction routing selection.
[0033] The process of the acquiring system processing a financial transaction message mainly includes the following steps:
[0034] 1. The cardholder uses the bank card to make purchases.
[0035] 2. Offline terminal equipment such as POS machines read the card information (online use the online banking interface to manually enter the cardholder's bank card number and other information for payment), and then the front end assembles the message and sends it to the back-end acquiring system through the network for processing.
[0036] 3. The backend system verifies the message domain, then reads the first 6 digits of the card number as the card bin data, and then queries the card bin database to find the issuing bank corresponding to the card bin, and then sends it to the corresponding backend system, and then forwards it to the issuing bank to implement transaction authorization processing.
[0037] 4. The backend system completes the transaction and returns to the frontend. The customer completes the purchase.
[0038] Card bin processing is an essential step. If the backend system is wrong, the transaction cannot be processed. Card bin processing usually involves the following steps:
[0039] 1. The issuing bank provides the card bin file information. According to the agreement, the acquiring bank periodically obtains the file and stores it locally. The relevant issuing banks mainly involve various card groups, such as UnionPay, VISA, MasterCard, etc., as well as various banks and other financial institutions.
[0040] 2. The acquiring backend system processes all card bin files in a unified manner and stores them in the backend database. Card bin data involves operations such as adding, deleting, modifying, and checking, among which read operations are more frequent.
[0041] 3. During the transaction processing, the first 6 digits of the bank card number need to be extracted and then matched in the database. If a match is found, the message is forwarded to the corresponding card issuing system; if multiple matches are found (such as the bank's card bin and UnionPay card bin), they are sent to the bank's card issuing system for processing in the order of priority of the bank's card issuing system and UnionPay card system. For the card bin that cannot be found, the exception handling process is followed and the failure is returned to the front end.
[0042] Based on this, the present invention proposes a card bin routing selection method based on distributed cache, such as Figure 1 As shown, the method includes:
[0043] Step 101: Acquire multiple card bin data;
[0044] Step 102: Load the plurality of card bin data into a distributed cache database in a preset data set format to form card bin set data;
[0045] Step 103: receiving a transaction message, parsing the transaction message, and obtaining card number information;
[0046] Step 104: intercepting card bin data according to the card number information;
[0047] Step 105: access the card bin collection data in the distributed cache database according to the intercepted card bin data, and determine the background system corresponding to the intercepted card bin data;
[0048] Step 106: Forward the transaction message to the backend system for transaction processing.
[0049] In the embodiment of the present invention, the present invention adopts a distributed memory database for management, replacing the original centralized database. The present invention adopts a collection data structure, replacing the current table relationship structure of data records.
[0050] After the acquiring system obtains the card bin file, it needs to load the data into the database system. The present invention uses Redis as the card bin data processing system. Redis is an open source (BSD licensed) memory data structure storage system that uses a key-value storage structure.
[0051] 1. First define the storage structure
[0052] The present invention adopts the set data type of Redis as the storage form of data. Take Bank of China card, UnionPay card and VISA card as description examples, see Table 1 and Table 2.
[0053] Table 1 Data meaning
[0054] Card issuer Card bin data example describe Bank of China 621787 UnionPay card issued by Bank of China UnionPay 620021 UnionPay Card VISA 401842 Cards issued by VISA
[0055] Table 2 Set definition
[0056] Collective Noun Collection Contents boc_cardbin UnionPay card bin data issued by Bank of China unionpay_cardbin UnionPay card bin data visa_cardbin Visa card bin data
[0057] 2. Loading card bin data
[0058] Redis's Set is an unordered collection of string type. The set is implemented through a hash table, so the complexity of adding, deleting, and searching is O(1), so it is very suitable for large-scale data processing. At the same time, the card bin data is unique, and the data structure of the set is also unique, so it is very suitable for processing card bin loading and storage.
[0059] The present invention uses the application program interface (API) of the Redis system to load the card bin data into the distributed cache database.
[0060] Since the card bin data will be updated regularly, such as deleting a card bin, adding a card bin, etc., it is necessary to update the data in the distributed cache regularly according to the update cycle.
[0061] Since there are tens of thousands of card bin file data in a card group, the actual application can be implemented by using high-level languages such as Java to perform batch operations on files.
[0062] The following is a command line operation example to illustrate the operation examples of inserting a piece of data:
[0063] redis>sadadd boc_cardbin 621787
[0064] redis>sadd unionpay_cardbin rabitmq 620021
[0065] redis>sadd unionpay_cardbin visa_cardbin 401842
[0066] In the embodiment of the present invention, Figure 2 As shown, the present invention also includes:
[0067] Step 104-5: Setting access priority;
[0068] Step 105 specifically includes:
[0069] According to the set access priority order, the card bin set data in the distributed cache database is accessed according to the intercepted card bin data to determine the background system corresponding to the intercepted card bin data.
[0070] 3. After the data is loaded into the distributed cache system, the next step is to use the data, which is the process of card bin routing selection and processing. The specific processing steps are as follows:
[0071] The acquiring system receives the financial transaction message and parses the card number information.
[0072] The first 6 digits of the card number are intercepted; in the current actual system, the card bin data has a custom range of 6-12, so there will be data items of different lengths in the collection, and the intercepted card bin lengths also need to be intercepted from the longest 12 to 6 digits, and then the collection items stored in the distributed cache are queried from long to short, that is, 12 digits, 11 digits, 10 digits, 9 digits, 8 digits, 7 digits, and 6 digits are intercepted and queried respectively. The present invention only discusses the case of 6 digits, and other lengths can also be processed similarly.
[0073] To access the collection data in the Redis cache memory, use the first 6 bits of the intercepted card bin data to access the Redis system. Since many bank cards are dual-standard cards, such as UnionPay cards and VISA cards, and cards issued by the Bank of China, the card bins may exist in different collections. In this case, a priority access order needs to be defined. As shown in Table 3 below:
[0074] Table 3 Definition of priority of card bin combination
[0075]
[0076] The definition of priority, in actual application scenario, the issuing bank of the bank has the highest priority, followed by UnionPay card, and finally the foreign card organization. Therefore, when querying the card bin, the priority order is used to query the set once. If it is found, exit and proceed to the next step; otherwise, a client error is returned.
[0077] 4. Card bin routing selection
[0078] If the corresponding data is found in step 3, then according to the system definition, select the backend system corresponding to the card bin, forward the financial message data that has passed the inspection to the backend system, and then wait for the backend card issuing system to complete the processing and respond to the front end.
[0079] 5. System processing completed
[0080] The financial transaction is processed and the customer completes the purchase.
[0081] The present invention also provides a payment acquiring system, as described in the following embodiments. Since the principle of solving the problem by the payment acquiring system is similar to the card bin routing selection method based on distributed cache, the implementation of the payment acquiring system can refer to the implementation of the card bin routing selection method based on distributed cache, and the repeated parts will not be repeated.
[0082] Figure 3 FIG. 1 is a structural block diagram of the acquiring system in an embodiment of the present invention (I), as shown in FIG. Figure 3 As shown, the acquiring system includes:
[0083] A card bin data acquisition module 301 is used to acquire a plurality of card bin data;
[0084] The distributed cache module 302 is used to load the plurality of card bin data into a distributed cache database in a preset data set format to form card bin set data;
[0085] The transaction message receiving module 303 is used to receive the transaction message, parse the transaction message and obtain the card number information;
[0086] A card bin data interception module 304, used to intercept the card bin data according to the card number information;
[0087] The access module 305 is used to access the card bin set data in the distributed cache database according to the intercepted card bin data, and determine the background system corresponding to the intercepted card bin data;
[0088] The transaction message forwarding module 306 is used to forward the transaction message to the backend system for transaction processing.
[0089] In an embodiment of the present invention, it also includes:
[0090] The update module is used to update the card bin data in the distributed cache database according to a preset period.
[0091] In the embodiment of the present invention, Figure 4 As shown, the acquiring system also includes:
[0092] An access priority setting module 304-5, for setting access priority;
[0093] The access module 305 is specifically used for:
[0094] According to the set access priority order, the card bin set data in the distributed cache database is accessed according to the intercepted card bin data to determine the background system corresponding to the intercepted card bin data.
[0095] The embodiment of the present invention also provides a card bin routing selection system based on distributed cache, such as Figure 5 As shown, it includes: acquiring system, distributed cache database and backend system;
[0096] The acquiring system, distributed cache database and background system are used to implement the above-mentioned card bin routing selection method based on distributed cache.
[0097] Regarding system deployment, in order to solve the performance bottleneck and scalability problems of the centralized system, the present invention adopts a distributed cluster deployment mode. Considering the requirements of Redis itself, at least 3 nodes (computer server nodes) are required. Considering the balance and scalability of the system, the present invention requires that the number of processing nodes of the acquiring system and the number of Redis distributed cache databases (i.e., the number of Redis distributed cache data nodes) must be consistent and implemented in a single number. This party clearly recommends using 5 nodes as the best.
[0098] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned card bin routing selection method based on distributed cache when executing the computer program.
[0099] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned card bin routing selection method based on distributed cache.
[0100] In the embodiment of the present invention, the present invention adopts a highly scalable distributed cache database to replace the traditional relational database, and solves the problems faced by the current centralized system for processing card bins by redefining the data structure and adopting a set data structure.
[0101] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0103] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0104] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0105] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A card bin routing selection method based on distributed cache, characterized in that: include: Get multiple card bin data; According to a preset data set format, the plurality of card bin data are loaded into a distributed cache database to form card bin set data; the distributed cache database is Redis, and the set data type of Redis is used as the data storage format; Receiving a transaction message, parsing the transaction message, and obtaining card number information; Intercept card bin data according to the card number information; Access the card bin collection data in the distributed cache database according to the intercepted card bin data, and determine the background system corresponding to the intercepted card bin data; Forwarding the transaction message to the backend system for transaction processing; Among them, there are data items of different lengths in the card bin set data; the intercepted card bin data lengths are intercepted from 12 to 6 bits respectively, and the card bin set data stored in the distributed cache database is queried from long to short; Also includes: Set access priorities; Accessing the card bin collection data in the distributed cache database according to the intercepted card bin data, and determining the background system corresponding to the intercepted card bin data, including: According to the set access priority order, the card bin set data in the distributed cache database is accessed according to the intercepted card bin data to determine the background system corresponding to the intercepted card bin data.
2. The card bin routing selection method based on distributed cache as claimed in claim 1, characterized in that: Also includes: The card bin data in the distributed cache database is updated regularly according to a preset period.
3. A payment acquiring system, characterized in that: include: A card bin data acquisition module is used to acquire multiple card bin data; A distributed cache module, used to load the plurality of card bin data into a distributed cache database according to a preset data set format to form card bin set data; the distributed cache database is Redis, and the set data type of Redis is used as the data storage format; A transaction message receiving module, used to receive a transaction message, parse the transaction message, and obtain card number information; A card bin data interception module, used to intercept the card bin data according to the card number information; An access module, used to access the card bin collection data in the distributed cache database according to the intercepted card bin data, and determine the background system corresponding to the intercepted card bin data; A transaction message forwarding module, used to forward the transaction message to the backend system for transaction processing; Among them, there are data items of different lengths in the card bin set data; the intercepted card bin data lengths are intercepted from 12 to 6 bits respectively, and the card bin set data stored in the distributed cache database is queried from long to short; Also includes: An access priority setting module, used to set access priority; The access module is specifically used for: According to the set access priority order, the card bin set data in the distributed cache database is accessed according to the intercepted card bin data to determine the background system corresponding to the intercepted card bin data.
4. The acquiring system according to claim 3, characterized in that: Also includes: The update module is used to update the card bin data in the distributed cache database according to a preset period.
5. A card bin routing selection system based on distributed cache, characterized in that: include: Acquiring system, distributed cache database and backend system; The acquiring system, distributed cache database and background system are used to implement the card bin routing selection method based on distributed cache as described in any one of claims 1 to 3.
6. The card bin routing selection system based on distributed cache as claimed in claim 5, characterized in that: The number of processing nodes of the acquiring system is the same as the number of the distributed cache databases.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 2 is implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Database expansion method and device and readable medium
CN109710619A
Service processing method and system
CN111027966A
