Patent ID: 11887068
Assignee: CHINA UNIONPAY CO., LTD.
Field: IT methods for management (Electrical engineering)
Classification: CPC G | IPC G

Claim 3:
4. A device for transaction clearing, comprising:
a memory, configured to store program instructions for performing a method for transaction clearing; and
a processor, coupled with the memory and, when executing the program instructions, configured to:
receive first clearing requests transmitted by a quantity N of terminals, wherein N>1;
according to the first clearing requests, acquire transaction data of the quantity N of terminals from a database;
according to the quantity N of terminals, determine a quantity of cache lines of a cache queue and establish 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;
initialize the cache queue and load the transaction data into the cache queue;
parallel-read the transaction data in the cache queue by the multiple threads and perform a clearing process on the transaction data; and
write a clearing result into the database and feed back the quantity N of terminals with an execution result of the first clearing requests.