An idempotent system in the field of financial transactions
By designing transaction request reception, identity identification, transaction uniqueness verification, transaction processing and status recording and recovery modules in the financial transaction system, the problems of transaction idempotence and consistency are solved, efficient and secure transaction processing are achieved, and system stability and user experience are improved.
Patent Information
- Application Number
- CN202411575378.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-04-08
AI Technical Summary
In the field of financial transactions, it is difficult for the existing technology to effectively achieve idempotence and consistency of transactions, resulting in repeated transactions and interruptions problems, affecting system performance and user experience.
A system including a transaction request receiving module, an identity identification module, a transaction uniqueness verification module, a transaction processing unit, and a status recording and recovery module are designed. By generating a unique serial number based on the transaction content or user identification and unique verification, ensuring that each transaction is independent and non-repeatable.
The uniqueness and consistency of transactions are achieved, repeated payments and data errors are avoided, system stability and user experience are improved, and performance losses caused by realizing idempotence are reduced.
Smart Images

Figure CN119784383A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to an idempotent system in the field of financial transactions. Background Art
[0002] In the field of financial transactions, it is crucial to ensure the uniqueness and consistency of each transaction. With the development of Internet technology, the number and speed of transactions are increasing rapidly, and the possibility of failures and duplicate requests is also rising. Since these operations often have irreversible costs or impacts, it is necessary to ensure that transactions are not repeated unnecessarily.
[0003] The traditional method is to achieve idempotency through tracking and transaction management, but this may cause performance problems and is difficult to scale. We need a more efficient system to achieve idempotency of transactions while maintaining efficient processing capabilities and a good user experience.
[0004] The present invention aims to solve the following key problems:
[0005] 1. Transaction idempotence: Ensure that the transaction result remains unchanged even if the same operation is repeated multiple times.
[0006] 2. Transaction consistency: No matter how many interruptions and repetitions occur during the transaction execution, the final state of the transaction is consistent.
[0007] 3. Performance optimization: Improve processing speed and reduce performance loss caused by achieving idempotence.
[0008] 4. Easy to maintain: Design a simple but efficient system that is easy to maintain and expand. Summary of the invention
[0009] The present invention aims to provide an efficient and secure transaction system and its implementation method to solve the deficiencies in the prior art. Specifically, the present invention includes the following modules:
[0010] Transaction request receiving module: used to receive transaction requests from different trading platforms, and perform interface standardization processing, converting transaction requests from different sources into a standard format suitable for subsequent processing.
[0011] Identity recognition module: responsible for identity verification and permission verification of transaction requesters to ensure that only legitimate and authorized users can perform transaction operations.
[0012] Transaction uniqueness verification module: By generating a unique serial number based on the transaction content or user identity and verifying its uniqueness, it ensures that each transaction is independent and non-repeatable. This module includes components such as serial number generator, history storage and verification engine.
[0013] Transaction processing unit: responsible for processing transaction requests that have passed identity authentication and uniqueness verification, and executing corresponding transaction operations according to preset business logic.
[0014] Status Recording and Recovery Module: used to store the processing status of each transaction and automatically repair and recover when the system fails to ensure transaction continuity and data consistency.
[0015] Beneficial effects of the present invention:
[0016] 1. Enhance transaction security: By ensuring the uniqueness of transactions, problems such as duplicate payments can be avoided.
[0017] 2. Improve system stability: Ensure the stability of system operation through efficient exception and fault recovery.
[0018] 3. Improve user experience: Maintain a consistent user experience even in the face of a large number of concurrent requests.
[0019] 4. Ensure data consistency: Ensure the correct reflection of transaction processing status and avoid data errors.
[0020] In summary, the present invention provides an efficient and secure idempotent system for financial transaction scenarios to ensure the uniqueness and consistency of each transaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 A schematic diagram of the system architecture of an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of a transaction request receiving module according to an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of an identity recognition module according to an embodiment of the present invention;
[0025] Figure 4 A schematic diagram of a transaction uniqueness verification module according to an embodiment of the present invention;
[0026] Figure 5 A detailed flowchart schematic diagram of an embodiment of the present invention;
[0027] Figure 6 A schematic diagram of a transaction processing unit according to an embodiment of the present invention;
[0028] Figure 7 Schematic diagram of a status recording and recovery module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. At the same time, it is explained here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments, and those skilled in the art may also adopt other alternatives to implement some known technologies; and the accompanying drawings are only for more specific description of the embodiments, and are not intended to specifically limit the present invention.
[0030] It should be noted that the references to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments" and the like in the specification indicate that the embodiments described may include specific features, structures or characteristics, but not every embodiment may include the specific features, structures or characteristics. In addition, when a specific feature, structure or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the art to implement such feature, structure or characteristic in conjunction with other embodiments (whether or not explicitly described).
[0031] In general, a term can be understood, at least in part, from its use in context. For example, depending, at least in part, on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in the singular sense, or can be used to describe a combination of features, structures, or characteristics in the plural sense. Additionally, the term "based on" can be understood as not necessarily intended to convey an exclusive set of factors, but can instead, depending, at least in part, on the context, allow for the presence of other factors that are not necessarily explicitly described.
[0032] Example 1
[0033] like Figures 1 to 7 The idempotent system in the field of financial transactions includes:
[0034] System Architecture
[0035] The system mainly consists of the following modules:
[0036] 1. Transaction request receiving module: responsible for receiving transaction requests initiated from outside.
[0037] 2. Identity recognition module: identifies the identity of the transaction requester.
[0038] 3. Transaction uniqueness verification module: Generate an idempotent transaction identifier based on a certain algorithm, and check the identifier to determine whether it is a duplicate transaction.
[0039] 4. Transaction processing unit: processes transactions that have passed identity authentication and uniqueness verification.
[0040] Status Recording and Recovery Module: stores the transaction processing status and recovers the transaction request receiving module in case of failure
[0041] 1. Receiving function: connect to different trading platforms and receive trading requests. (Please give specific names of the trading platforms here to make the whole process complete) This is a general term for multiple trading systems. If you have to name them, then platform A, platform B, and so on.
[0042] 2. Interface standardization: Standardize transaction requests from different sources to make them suitable for subsequent processing. (The standardization here should have specific standard algorithms or standardized steps or standardized processes) Standardization here means to uniformly process requests from different systems into standard requests. The standardization step is to convert the request. For example, request A from platform A is converted into standard request R, and request from platform B is also converted into standard request B. Identity recognition module
[0043] 1. Authentication mechanism: identity authentication or device authentication of users.
[0044] 2. Authority verification: Check whether the requester has the right to conduct the transaction. Transaction uniqueness verification module
[0045] 1. Generate identifiers: Generate a unique serial number based on content or user identification for each transaction.
[0046] Uniqueness check: Check the system log or database to confirm whether the transaction containing the serial number has been processed. The transaction uniqueness verification module is one of the core components of the idempotent system in the financial transaction field. Its task is to determine whether each transaction has been submitted or processed repeatedly. The specific detailed process is as follows: Transaction uniqueness verification module architecture
[0047] Components:
[0048] 1. Sequence number generator: Generates a unique transaction sequence number to identify each transaction request.
[0049] 2. History storage: stores unique identifiers of all processed transactions. 3. Verification engine: compares the current transaction identifier with the history to verify whether the transaction is unique.
[0050] 4. Retry logic processing: If duplicate transactions are found, determine the retry strategy or processing method.
[0051] 2. Transaction uniqueness verification module process
[0052] The following is a detailed description of the specific steps for uniqueness verification:
[0053] A.Serial Number Generator
[0054] 1. Collect information: Collect key information related to the transaction, such as amount, bank card number, transaction time, etc.
[0055] 2. Sequence number generation: Use the information to generate a unique sequence number, which can be a hash value based on the timestamp and transaction details.
[0056] B. History Storage
[0057] 1. Data preservation: Save the generated serial number and transaction details to the database.
[0058] 2. Index creation: Create a fast search index, such as using a serial number as the primary key.
[0059] C. Validation Engine
[0060] 1. Serial number retrieval: query the historical record storage according to the transaction serial number.
[0061] 2. Verify the result: If the corresponding serial number is found, the transaction is considered a duplicate; if not, the transaction continues to be processed.
[0062] D. Retry logic processing
[0063] 1. Determine the retry strategy: If it is a repeated transaction, determine whether to allow retry based on business rules.
[0064] 2. Send response: inform the front-end user of the transaction result, which may be a successful retry, failure, or other related information.
[0065] 3. Key technologies and components
[0066] 1. Serial number generation algorithm: Use high reliability methods such as hash algorithm to ensure the uniqueness of the serial number.
[0067] 2. Distributed storage system: Use high-performance database solutions to support high-concurrency query and insertion operations.
[0068] 3. Multi-level cache mechanism: Optimize verification response time and processing efficiency by introducing a cache layer.
[0069] 4. System error prevention and fault tolerance strategies
[0070] 1. Redundant storage: multiple backup storage of serial numbers and transaction records to prevent single point failure of data.
[0071] 2. Automatic repair mechanism: When data inconsistency is detected, the algorithm attempts to automatically repair it.
[0072] Downtime transfer: When a part of the system fails, automatically transfer the request to other normal operating parts.
[0073] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.
[0074] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An idempotent system in the field of financial transactions, characterized in that: include: A transaction request receiving module, used for receiving external transaction requests; An identity recognition module, used to identify the identity of the transaction requester; A transaction uniqueness verification module, used to generate an idempotent transaction identifier and check the identifier to determine whether it is a duplicate transaction; A transaction processing unit for processing transactions that have passed identity verification and uniqueness verification; The state recording and recovery module is used to store the transaction processing status and recover it in case of failure.
2. An idempotent system in the field of financial transactions according to claim 1, characterized in that: The transaction request receiving module further comprises: The receiving function module is used to connect to multiple different trading platforms and receive transaction requests; The interface standardization module is used to standardize transaction requests from different sources to make them suitable for subsequent processing.
3. An idempotent system in the field of financial transactions according to any one of claims 1 or 2, characterized in that: The identity recognition module further comprises: The authentication mechanism module is used to authenticate the identity or device of the transaction requester; The authority checking module is used to check whether the transaction requester has the authority to conduct the transaction.
4. An idempotent system in the field of financial transactions according to any one of claims 1 or 2, characterized in that: The transaction uniqueness verification module further includes: A serial number generator, used to generate a unique serial number based on content or user identification for each transaction; A history storage module that stores unique identifiers of all processed transactions; The verification engine module is used to compare the current transaction identifier with the historical records to verify whether the transaction is unique; The retry logic processing module is used to determine the retry strategy or processing method when duplicate transactions are found.
5. An idempotent system in the field of financial transactions according to any one of claims 1 or 2, characterized in that: The state recording and recovery module further includes: Redundant storage module, used for multiple backup storage of serial numbers and transaction records; Automatic repair mechanism module, used to try to automatically repair through algorithms when data inconsistency is detected; The downtime transfer module is used to automatically transfer requests to the normally operating part when a part of the system fails.
Citation Information
Cited By
Order request processing method and device, storage medium and terminal
CN122431918A