Unlock instant, AI-driven research and patent intelligence for your innovation.

A method to avoid database lock waiting and transaction merge commit

A transaction submission and database technology, applied in the financial field, can solve problems such as performance bottlenecks, achieve the effects of reducing interaction frequency, improving interaction efficiency, and reducing interaction times and time

Active Publication Date: 2020-12-25
SICHUAN XW BANK CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of the problems of the above research, the purpose of the present invention is to provide a method for avoiding database lock waiting and transaction merge submission, and to solve the performance bottleneck caused by not knowing in advance which account is a hot account and configuring sub-accounts in advance in the prior art question

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method to avoid database lock waiting and transaction merge commit
  • A method to avoid database lock waiting and transaction merge commit

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] The present embodiment adopts two threads to illustrate (multithreading can be adopted in reality (the number of threads is greater than 2), which can double the processing efficiency), as follows:

[0037] Thread1 (Thread 1) pulls a batch of (customizable) transactions from the pending transaction queue, such as MQ or other data structures, wherein, each time Thread1 obtains a transaction, the corresponding message is removed from the pending transaction queue; After a transaction is pulled from the pending transaction queue, Thread2 (thread 2) pulls a batch of transactions from the pending transaction queue, wherein, each time Thread2 acquires a transaction, the corresponding message is removed from the pending transaction queue.

[0038] Thread1 first screens out transaction-related accounts from the pulled transactions. Transaction-related accounts such as figure 2 account1 to account5 in . And query whether the "account LIST" in processing includes account1 to ac...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for avoiding database lock waiting and transaction merging and submitting, belongs to the technical field of finance, and solves the problem of performance bottleneckcaused by the fact that which account is a hot account is not known in advance and a sub-account is configured in advance in the prior art. The method comprises steps of two or more threads obtaininga plurality of transactions from the to-be-processed transaction queue in sequence and then screening out transaction associated accounts; inquiring whether the account LIST contains each acquired transaction associated account, if not, maintaining the transaction associated account in the account LIST, and executing the next step, otherwise, directly executing the next step; judging whether the processing logics of the multiple transactions of the transaction associated account are correct or not, if yes, submitting the transactions as one transaction, removing the account LIST, executing thenext step, and if not, not submitting the transactions; judging whether the transaction relation account acquired by the thread is processed or not, if not, not maintaining the transaction associatedaccount of the account LIST according to the processing, or else, judging whether the to-be-processed transaction queue is empty or not, if yes, ending, and if not, executing the thread again. The method and the device are used for solving the performance bottleneck problem caused by hot account lock waiting.

Description

technical field [0001] The invention discloses a method for avoiding database lock waiting and transaction merge submission, which is used to solve the performance bottleneck problem caused by hot spot account lock waiting, and belongs to the field of financial technology. Background technique [0002] A hotspot account has the following characteristics. First, the transaction volume associated with the account is large and the number of transactions is large; second, the transaction frequency associated with the account is high and the number of concurrent transactions is high; All can be called hot accounts, and the accounts here are not limited to physical accounts, virtual accounts, bookkeeping, etc., but in the financial field, the concept and scenarios of accounts are relatively extensive. The above characteristics will cause the system to cause a lot of waiting time due to the database lock mechanism when processing hot account transactions (especially account changes...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/23G06Q40/04
CPCG06Q40/04G06F16/2343
Inventor 李锡波
Owner SICHUAN XW BANK CO LTD