CPC G06Q 20/023 (2013.01) [G06F 9/546 (2013.01); G06Q 40/02 (2013.01)] | 9 Claims |
1. A method for transaction clearing, comprising:
receiving first clearing requests transmitted by a quantity N of terminals, wherein N>1;
according to the first clearing requests, acquiring transaction data of the quantity N of terminals from a database;
according to the quantity N of terminals, determining a quantity of cache lines of a cache queue and establishing multiple threads, wherein the cache queue is a circular queue, and the quantity of cache lines of the circular queue is 2 to a power of M, wherein 2M>N;
initializing the cache queue, and loading the transaction data into the cache queue;
parallel-reading the transaction data in the cache queue by the multiple threads, and performing a clearing process on the transaction data; and
writing a clearing result into the database and feeding back the quantity N of terminals with an execution result of the first clearing requests.
|