Shadow Account Segmentation for Database Transaction Hotspot Resolution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing database systems face performance bottlenecks due to the sequential processing of concurrent transaction requests on user accounts, leading to decreased efficiency as only one request can hold the lock for an account at a time, creating a 'hotspot' that limits database performance.
Innovation Solution
The system introduces a plurality of shadow accounts for each user account, which are not visible to users, allowing the system to lock and process transactions on these shadow accounts instead of the primary account, thereby enabling concurrent processing of transactions without locking the main account, thus reducing the bottleneck.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the system locks the primary account record to ensure data accuracy during transactions, then data consistency is maintained, but concurrent transaction processing capability deteriorates, creating a performance bottleneck
Solution Approach 1:
The patent segments the single primary account record into multiple shadow account records. Each shadow account can be independently locked and processed, allowing concurrent transactions to proceed in parallel without conflicting over a single locked resource. This segmentation transforms the bottleneck of single-account sequential processing into a multi-account parallel processing system, resolving the contradiction between maintaining data consistency through locking and enabling concurrent transaction processing.
2Manufacturing precision
If the system processes transactions sequentially on a single account record, then data accuracy is preserved through exclusive locking, but system efficiency deteriorates due to the hotspot bottleneck
Solution Approach 1:
The patent creates multiple shadow account records as copies of the primary account record. These shadow accounts serve as surrogate targets for transaction processing, allowing the system to perform transactions on copies rather than the original single record. This copying mechanism enables parallel processing of multiple transactions simultaneously, significantly reducing the time loss associated with sequential processing while maintaining transaction accuracy through the same locking principles applied to each shadow account.
3Device complexity
If the system uses a single account record for all transactions, then the account management structure remains simple, but performance deteriorates due to the hotspot account creating a bottleneck
Solution Approach 1:
The patent transitions from a one-dimensional single-account structure to a multi-dimensional shadow account structure. By introducing the dimension of multiple shadow account records associated with a single primary account, the system gains the ability to distribute transactions across multiple records. This dimensional expansion allows the account structure to handle concurrent transactions efficiently while maintaining a manageable organizational framework through the parent-child relationship between primary and shadow accounts.
Data Source
AI summary
One embodiment provides a system that facilitates efficient processing of requests related to a database. During operation, the system receives, by a server, a request to transfer an amount in to an account of a user, wherein the account is visible to the user and corresponds to a record in a database. The system selects one of a plurality of shadow accounts that correspond to the account, wherein a shadow account is not visible to the user. The system locks the selected shadow account, which prevents any changes to be made to the corresponding record in the database. The system modifies a balance of the selected shadow account by adding the amount to be transferred in to a current balance of the selected shadow account.


