US 11,887,068 B2
Transaction settlement method and apparatus
Xiaoming Zhang, Shanghai (CN); Lin Chen, Shanghai (CN); Fei Zhang, Shanghai (CN); Sen Yang, Shanghai (CN); and Haiyang Zhang, Shanghai (CN)
Assigned to CHINA UNIONPAY CO., LTD., Shanghai (CN)
Appl. No. 17/279,027
Filed by CHINA UNIONPAY CO., LTD., Shanghai (CN)
PCT Filed Nov. 12, 2019, PCT No. PCT/CN2019/117657
§ 371(c)(1), (2) Date Mar. 23, 2021,
PCT Pub. No. WO2020/103728, PCT Pub. Date May 28, 2020.
Claims priority of application No. 201811376395.X (CN), filed on Nov. 19, 2018.
Prior Publication US 2022/0044211 A1, Feb. 10, 2022
Int. Cl. G06Q 20/02 (2012.01); G06Q 40/02 (2023.01); G06F 9/54 (2006.01)
CPC G06Q 20/023 (2013.01) [G06F 9/546 (2013.01); G06Q 40/02 (2013.01)] 9 Claims
OG exemplary drawing
 
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.