A transaction calling method and system based on whitelist

Through the global exchange area and the Cassandra dual cache mechanism, the financial system is realized, and the problem of strong white listing dependencies in existing technologies has solved the existing technology, and the system's parallel operation and efficient transaction calls are realized.

CN114219638BActive Publication Date: 2025-01-28CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111532852.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2025-01-28
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

When the existing technology introduces new technologies into the financial system, whitelist routing relies on the gateway or global routing layer, resulting in poor portability.

Method used

Through the global exchange area and the Cassandra dual cache mechanism, the customer's whiter list is achieved. From the multi -dimensional dimension of the transaction and the multi -dimensional dimension of the customer, the system is implemented. At the application level, the transaction call is based on the interceptor. Balanced facilities.

Benefits of technology

The parallel operation of the first system and the second system is realized, supporting attachment transactions, and understanding with the application logic to understand the transplantability and performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114219638B_ABST
    Figure CN114219638B_ABST
Patent Text Reader

Abstract

The present invention relates to a transaction calling method and system based on a whitelist, which realizes a customer whitelist through a global exchange area and a double cache mechanism, realizes the parallel operation of a first system and a second system from multiple dimensions of a transaction whitelist and a customer whitelist, realizes a transaction calling based on a whitelist through an interceptor at the application level, does not rely on a third-party gateway and a load balancing facility, supports transactions with attachments, and is decoupled from the application implementation logic, thereby improving transaction performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a transaction calling method and system based on a whitelist. Background Art

[0002] With the development of science and technology, the construction of information systems, including financial systems, often requires the introduction of new technologies. In order to reduce the risks brought by the introduction of new technologies, it is often necessary to merge the old and new systems. The financial system can adopt a whitelist mechanism to route based on customers. Whitelist customers and non-whitelist customers can be routed to the old and new systems respectively. The current mainstream method is to perform whitelist routing at the gateway or global routing layer and then locate different systems. This method has a strong dependence on gateways or global routing and poor portability. Summary of the invention

[0003] In order to solve the deficiencies of the prior art, the present invention proposes a transaction call method and system based on whitelist routing and application interception. The customer whitelist is realized through the global exchange area and the Cassandra double cache mechanism, and the first system and the second system are run in parallel from the multiple dimensions of the transaction whitelist and the customer whitelist. The transaction call based on the whitelist is realized through the interceptor at the application level, which does not rely on the third-party gateway and load balancing facilities, supports transactions with attachments, and is decoupled from the application implementation logic.

[0004] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0005] A transaction calling method based on a whitelist, wherein a first system platform and a second system platform provide services to the outside at the same time, characterized in that it comprises the following steps:

[0006] Step 1: Register the first system platform and the second system platform in the distributed registration center;

[0007] Step 2: Access the transaction request and obtain the transaction request message;

[0008] Step 3: Get the transaction code from the request message;

[0009] Step 4: Enter the whitelist interceptor of the first system platform to determine whether the transaction code is in the transaction whitelist;

[0010] Step 5: If the customer is in the transaction whitelist, the first system platform is called to process the transaction regardless of whether the customer is in the customer whitelist;

[0011] Step 6: If the customer is not in the transaction whitelist, obtain the customer number information from the message header;

[0012] Step 7: Determine whether the customer number information is in the customer whitelist;

[0013] Step 8: If the customer is in the customer whitelist, the transaction is processed in the second system platform;

[0014] Step 9: If the customer is not in the customer whitelist, the transaction is processed in the first system platform;

[0015] Step 10: Load balance the transaction from the Zookeeper registry center according to the transaction number and forward the http request to the corresponding system platform;

[0016] Step 11: If the forwarding of the http request fails, the error code and error description information related to the forwarding failure are written into the corresponding field of the response message;

[0017] Step 12: Determine whether it is a transaction with attachments;

[0018] Step 13: If the transaction is with attachments, the attachments need to be downloaded from the second system platform to the first system platform through the file transfer service, which can ensure that the access and download functions of the transaction with attachments are normal;

[0019] Step 14: Return a response message.

[0020] Furthermore, executing transaction processing in the first system platform needs to go through the log monitoring interceptor, message conversion interceptor, security interceptor and flow control interceptor processing stack of the original system.

[0021] Furthermore, executing transaction processing in the second system platform of the improved system needs to go through the whitelist interceptor of the original system and the log monitoring interceptor, message conversion interceptor, security interceptor, and flow control interceptor processing stack of the improved system.

[0022] Furthermore, the whitelist interceptor is set at the first layer of the interceptor stack, and access to other interceptor processors of the first system platform can be avoided when calling the second system platform.

[0023] Furthermore, the implementation logic of the whitelist interceptor is encapsulated into an independent jar package. When calling, it is only necessary to introduce the corresponding jar package and add the configuration of the whitelist interceptor to the interceptor stack of the second system platform.

[0024] Furthermore, transactions that are not divided by customer dimension are configured in a transaction whitelist, and the transaction logic is directly processed in the first system platform.

[0025] Furthermore, Zookeeper is used as the distributed registration center.

[0026] Furthermore, the customer whitelist and transaction whitelist are stored in the Cassandra cache of the NoSQL database.

[0027] Furthermore, by querying in Cassandra whether the customer is in the customer whitelist, the transaction access will first be searched from the global exchange area. If not in the whitelist, it will be searched from Cassandra again, and the information on whether the customer is a customer in the customer whitelist will be stored in the global exchange area.

[0028] A transaction calling system based on a whitelist, comprising:

[0029] A platform registration module registers the first system platform and the second system platform in a distributed registration center;

[0030] Transaction request module, receiving transaction request and obtaining transaction request message;

[0031] The data acquisition module obtains the transaction code from the request message and the customer number information from the message header;

[0032] Whitelist interceptor module, determines whether the transaction code is in the transaction whitelist;

[0033] The registration center module load balances the transaction from the Zookeeper registration center according to the transaction code and forwards the http request to the corresponding system platform;

[0034] The attachment transaction module determines whether it is a transaction with attachments; if it is a transaction with attachments, the attachments are downloaded from the second system platform to the first system platform through the file transfer service.

[0035] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the whitelist-based transaction calling method is implemented.

[0036] An electronic device comprising a processor and a memory:

[0037] The memory is used to store the transaction request message;

[0038] The processor is used to execute the above-mentioned whitelist-based transaction calling method by calling the stored transaction request message.

[0039] A computer program product includes a computer program and / or instructions, wherein the computer program and / or instructions implement the steps of the above-mentioned whitelist-based transaction calling method when executed by a processor.

[0040] The beneficial effects of the present invention are as follows: a customer whitelist is realized through a global exchange area and a Cassandra double cache mechanism, the first system and the second system are operated in parallel from multiple dimensions of a transaction whitelist and a customer whitelist, and a whitelist-based transaction call is realized through an interceptor at the application level, without relying on a third-party gateway and a load balancing facility, supporting transactions with attachments, and being decoupled from the application implementation logic. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 The figure is a flowchart of a transaction calling method based on a whitelist of the present invention.

[0042] Figure 2 This is a schematic diagram of the structure of a transaction calling system based on a whitelist according to the present invention. DETAILED DESCRIPTION

[0043] In order to more clearly understand the content of the present invention, it will be described in detail with reference to the drawings and embodiments.

[0044] like Figure 1 As shown, an embodiment of the present application provides a whitelist-based transaction calling method, in which the first system platform and the second system platform provide services to the outside at the same time, including the following steps:

[0045] Step 1: Register the first system platform and the second system platform in the distributed registration center;

[0046] Step 2: Access the transaction request and obtain the transaction request message;

[0047] Step 3: Get the transaction code from the request message;

[0048] Step 4: Enter the whitelist interceptor of the first system platform to determine whether the transaction code is in the transaction whitelist;

[0049] Step 5: If the customer is in the transaction whitelist, the first system platform will be called to process the transaction regardless of whether the customer is in the customer whitelist;

[0050] Step 6: If the customer is not in the transaction whitelist, obtain the customer number information from the message header;

[0051] Step 7: Determine whether the customer number information is in the customer whitelist;

[0052] Step 8: If the customer is in the customer whitelist, the transaction is processed in the second system platform;

[0053] Step 9: If the customer is not in the customer whitelist, the transaction is processed in the first system platform;

[0054] Step 10: Load balance the transaction from the Zookeeper registration center according to the transaction number, and forward the http request to the corresponding second system platform;

[0055] Step 11: If the forwarding of the http request fails, the error code and error description information related to the forwarding failure are written into the corresponding field of the response message;

[0056] Step 12: Determine whether it is a transaction with attachments;

[0057] Step 13: If the transaction is with attachments, the attachments need to be downloaded from the second system platform to the first system platform through the file transfer service, which can ensure that the access and download functions of the transaction with attachments are normal;

[0058] Step 14: Return a response message.

[0059] The entire transaction implements a series of access processing stacks through the chain of responsibility pattern. Chain of Responsibility is a behavioral design pattern that creates a chain of receiver objects for a request. This pattern gives the type of the request and decouples the sender and receiver of the request. In this pattern, each receiver usually contains a reference to another receiver. If an object cannot handle the request, it will pass the same request to the next receiver, and so on. After the transaction is connected, the interceptors form a linear chain in a certain order. When the transaction processing logic is executed, the interceptors set in the stack will be called according to the order of the stack to perform a series of common processing, including log monitoring, security verification, message conversion, flow control, etc.

[0060] Executing transaction processing in the first system platform requires going through the original system's log monitoring interceptor, message conversion interceptor, security interceptor and flow control interceptor processing stack.

[0061] Executing transaction processing in the second system platform of the improved system needs to go through the whitelist interceptor of the original system and the log monitoring interceptor, message conversion interceptor, security interceptor, and flow control interceptor processing stack of the improved system.

[0062] The so-called whitelist refers to a list of trusted users that are allowed to access or pass verification. Customers on the whitelist are routed to the second system platform, and customers not on the whitelist are routed to the first system platform. The first system platform and the second system platform provide services to the outside world at the same time. The whitelist interceptor is set at the first layer of the interceptor stack, and can avoid accessing other interceptor processors of the first system platform when calling the second system platform.

[0063] The implementation logic of the whitelist interceptor is encapsulated into an independent jar package. When calling, you only need to introduce the corresponding jar package and add the configuration of the whitelist interceptor to the interceptor stack of the second system platform. Add the whitelist interceptor to the first layer of the interceptor stack, so that when you need to call the new system, you can avoid accessing other interceptor processors of the old system, thereby improving transaction performance. It is implemented through java code and can be published as an independent jar package through compilation and packaging. When the application introduces the whitelist interceptor, if it is a maven project, you need to introduce the jar package in the pom file and then deploy and publish it. If it is not a maven project, just put the jar package in the lib directory of the project. The transaction interception of the application is implemented in a responsibility chain mode, and the general processing of the lower interceptor is executed after the general processing of the upper interceptor is executed. In this patent, the whitelist interceptor needs to be introduced into the interceptor stack of the old system in the form of JavaBean and is located in the first layer of the interceptor stack. The advantage of placing it in the first layer is that the processing logic of subsequent interceptors is avoided, which improves performance. When the application starts, the interceptor will be loaded into memory for use in transactions.

[0064] Transactions that are not divided by customer dimension are configured in the transaction whitelist, and the transaction logic is processed directly in the first system platform.

[0065] Zookeeper is a distributed, open source distributed application coordination service and an open source implementation of Google's Chubby. It is a software that provides consistency services for distributed applications, and the functions provided include configuration maintenance, domain name services, distributed synchronization, group services, etc. Zookeeper is a common technology for implementing a distributed registration center. The present invention uses Zookeeper as a distributed registration center. Both the first platform system and the second platform system need to be registered in the Zookeeper registration center. When the application starts, the basic information of the application (including the URL request address) will be registered in the Zookeeper registration center. After the application stops, the application will be removed from the Zookeeper registration center.

[0066] In addition, this solution also supports the replacement and transformation of the load balancing algorithm through other registration center components.

[0067] The customer whitelist and transaction whitelist are stored in the Cassandra cache of the NoSQL database.

[0068] NoSQL refers to a non-relational database. It does not guarantee the ACID (atomicity, consistency, isolation, and persistence) characteristics of relational data, but it is easy to expand and has high performance, making it suitable for scenarios with high system performance requirements. Cassandra is a hybrid non-relational database with the characteristics of distribution, high scalability, flexible mode, and column-based structuring. Cassandra is a NOSQL database, and the whitelist is stored in Cassandra. The structure of the whitelist table includes three fields: id, type, and targetid. The value of id is a specific customer number, type is a fixed value, such as 99, and targetid can be set to 1. If there is a data record in the whitelist table with type 99 and id as a customer number, it means that the customer is in the whitelist; otherwise, the customer is not in the whitelist. Before the application is started, the whitelisted customers involved will be loaded into Cassandra by executing scripts for subsequent application calls.

[0069] By querying whether the customer is in the customer whitelist in Cassandra, the transaction access will first be searched in the global exchange area. If not in the whitelist, it will be searched in Cassandra again, and the information on whether the customer is a customer in the customer whitelist will be stored in the global exchange area.

[0070] If an exception occurs when the second system platform is called, the error code and error description of the response need to be set in the response message so that the user can get the expected return result.

[0071] A transaction calling system based on a whitelist, comprising:

[0072] A platform registration module registers the first system platform and the second system platform in a distributed registration center;

[0073] Transaction request module, receiving transaction request and obtaining transaction request message;

[0074] The data acquisition module obtains the transaction code from the request message and the customer number information from the message header;

[0075] Whitelist interceptor module, determines whether the transaction code is in the transaction whitelist;

[0076] The registration center module load balances the transaction from the Zookeeper registration center according to the transaction code and forwards the http request to the corresponding system platform;

[0077] The attachment transaction module determines whether it is a transaction with attachments; if it is a transaction with attachments, the attachments are downloaded from the second system platform to the first system platform through the file transfer service.

[0078] By using this system, the above-mentioned whitelist-based transaction calling method can be executed and the corresponding technical effects can be achieved.

[0079] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps of the method in the above embodiment, wherein a computer program is stored on the storage medium, and when the computer program is executed by a processor, the whitelist-based transaction calling method in the above embodiment is implemented.

[0080] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the whitelist-based transaction calling method is implemented.

[0081] An embodiment of the present invention also provides an electronic device for executing the above method. As an implementation device of the method, the electronic device at least has a processor and a memory, and in particular, the memory stores data and related computer programs required for executing the method, such as a customer whitelist, a transaction whitelist, a transaction request message, etc., and the processor calls the data and programs in the memory to execute all the steps of the implementation method and obtains the corresponding technical effect.

[0082] An electronic device comprising a processor and a memory:

[0083] The memory is used to store the transaction request message;

[0084] The processor is used to execute the above method by calling the stored transaction request message.

[0085] An embodiment of the present invention also provides a computer program product for executing the above method. As a computer program product of the method, the electronic device at least includes a computer program and / or instructions. When the computer program and / or instructions are executed by a processor, the steps of the above whitelist-based transaction call method are implemented and corresponding technical effects are obtained.

[0086] A computer program product includes a computer program and / or instructions, wherein the computer program and / or instructions implement the steps of the above-mentioned whitelist-based transaction calling method when executed by a processor.

[0087] Preferably, the electronic device may include a bus architecture, the bus may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same component, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor when performing operations.

[0088] In addition, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operation control) used may include a microprocessor or other processor device and / or a logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, which may store the above-mentioned related data information, and may also store a program for executing related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used to provide input to the processor, for example, it may be a key or a touch input device; the power supply is used to provide power to the electronic device; the display is used to display display objects such as images and text, for example, it may be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processor, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

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

[0090] 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 system that specifies the functions of a box or multiple boxes.

[0091] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0092] 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 of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0093] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0094] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A transaction calling method based on a whitelist, characterized in that: The first system platform and the second system platform simultaneously provide services to the outside world, including the following steps: Step 1: Register the first system platform and the second system platform in the distributed registration center; Step 2: Access the transaction request and obtain the transaction request message; Step 3: Get the transaction code from the request message; Step 4: Enter the whitelist interceptor of the first system platform to determine whether the transaction code is in the transaction whitelist; Step 5: If the customer is in the transaction whitelist, the first system platform is called to process the transaction regardless of whether the customer is in the customer whitelist; Step 6: If the customer is not in the transaction whitelist, obtain the customer number information from the message header; Step 7: Determine whether the customer number information is in the customer whitelist; Step 8: If the customer is in the customer whitelist, the transaction is processed in the second system platform; Step 9: If the customer is not in the customer whitelist, the transaction is processed in the first system platform; Step 10: In the distributed registration center, the transaction is load balanced according to the transaction code, and the http request is forwarded to the corresponding system platform; Step 11: If the forwarding of the http request fails, the error code and error description information related to the forwarding failure are written into the corresponding field of the response message; Step 12: Determine whether it is a transaction with attachments; Step 13: If the transaction is with attachments, the attachments are downloaded from the second system platform to the first system platform through the file transfer service; Step 14: Return a response message; Among them, the whitelist interceptor is set at the first layer of the interceptor stack, which can avoid accessing other interceptor processors of the first system platform when calling the second system platform; the implementation logic of the whitelist interceptor is encapsulated into an independent jar package, and only the corresponding jar package needs to be introduced when calling, and the configuration of the whitelist interceptor is added to the interceptor stack of the second system platform; by querying whether the customer is in the customer whitelist in Cassandra, the transaction access will first search from the global exchange area. If it is not in the whitelist, it will search from Cassandra again, and the information whether the customer is a customer on the customer whitelist is stored in the global exchange area.

2. The method according to claim 1, characterized in that Executing transaction processing in the first system platform requires going through the original system's log monitoring interceptor, message conversion interceptor, security interceptor and flow control interceptor processing stack.

3. The method according to claim 1, characterized in that Executing transaction processing in the second system platform of the improved system needs to go through the whitelist interceptor of the original system and the log monitoring interceptor, message conversion interceptor, security interceptor, and flow control interceptor processing stack of the improved system.

4. The method according to claim 1, characterized in that Transactions that are not divided by customer dimension are configured in the transaction whitelist, and the transaction logic is processed directly in the first system platform.

5. The method according to claim 1, characterized in that Use Zookeeper as the distributed registry.

6. The method according to claim 1, characterized in that The customer whitelist and transaction whitelist are stored in the Cassandra cache of the NoSQL database.

7. A transaction calling system based on a whitelist, used to execute the method according to any one of claims 1 to 6, characterized in that: include: A platform registration module registers the first system platform and the second system platform in a distributed registration center; Transaction request module, receiving transaction request and obtaining transaction request message; The data acquisition module obtains the transaction code from the request message and the customer number information from the message header; Whitelist interceptor module, determines whether the transaction code is in the transaction whitelist; The registration center module load balances the transaction from the Zookeeper registration center according to the transaction code and forwards the http request to the corresponding system platform; The attachment transaction module determines whether it is a transaction with attachments; if it is a transaction with attachments, the attachments are downloaded from the second system platform to the first system platform through the file transfer service.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the whitelist-based transaction calling method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: Including processor and memory: The memory is used to store the transaction request message; The processor is used to execute the whitelist-based transaction calling method described in any one of claims 1 to 6 by calling a stored transaction request message.

10. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the steps of the whitelist-based transaction calling method described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Transaction request processing method and device

    CN112258166A

  • Method for processing of transactions or financial transactions, particularly payment operations, involves linking, assigning and processing data with communication address or with Internet protocol address or with mail address

    DE102011111131A1