摘 要: 本文按照软件中台的思想,设计了一个针对先进先出(First-In First-Out, FIFO)[1]数据核销的通用实现框架及其对应的入库数据模型、消费数据模型和匹配核销模型。同时,设计了基于双排序原理的先进先出数据核销高速实现方法。该方法按照匹配规则先对数据进行排序,然后对两个有序队列进行单循环匹配查找,避免了传统先进先出实现中的双循环操作,可以大幅度提高运算性能,大幅度节省CPU开销和存储开销,实现超大数据量的快速匹配,可以支持两个亿级数据库的快速先进先出匹配。 |
关键词: 先进先出;存储过程;双排序;面向对象 |
中图分类号: TP31
文献标识码: A
|
|
High Speed Algorithm for First-In First-Out Data Verification based on Double Sorting Principle |
WANG Guozhong
|
(School of Electronic Information and Electrical Engineering, Shanghai Jiao Tong University, Shanghai 200240, China)
gzwang@sjtu.edu.cn
|
Abstract: This paper proposed to design a general implementation framework for FIFO (First-In First-Out) data verification and its corresponding inbound data model, consumption data model and matching verification model based on idea of middle platform. At the same time, a high-speed realization method of FIFO data verification is designed based on the double sorting principle. This method first sorts data according to matching rules, and then performs a single-loop matching search on the two ordered queues, avoiding double-loop operation in traditional FIFO implementation. The proposed method significantly improves computing performance, and greatly saves CPU and storage overheads. As a result, it is capable of processing super large data volume, and can support fast FIFO matching of two databases with large data volume. |
Keywords: First-In First-Out (FIFO); storage procedure; double sort; object-oriented |