引用本文:钮泽平,李国良.数据库内AI模型优化.软件学报,2021,32(3):622-635
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 3261次   下载 7384 本文二维码信息
码上扫一扫!
分享到: 微信 更多
数据库内AI模型优化
钮泽平, 李国良
清华大学 计算机科学与技术系, 北京 100084
摘要:
在大量变化着的数据中,数据分析师常常只关心预测结果为特定值的少量数据.然而,利用机器学习模型进行推理的工作流程中,由于机器学习算法库默认数据以单表方式组织,用户必须先通过SQL语句查询出全部数据,即使随后在模型推理过程中会将大量数据丢弃.指出了在这个过程中,如果可以预先从模型中提取信息,就有望能在数据获取阶段快速排除不需要的数据,从而降低数据获取过程中的多表连接代价、进程间通信代价以及模型预测代价,进而加速整个工作流程.以决策树模型为例,首先提出一种预筛选+验证的执行方法对查询过程进行优化,之后给出了从决策树中提取用于预筛选谓词的离线算法,最后在真实数据集上进行测试.实验结果表明,所提出的方法能够对借助决策树模型推理结果对数据进行筛选的应用场景起到较好的加速效果.
关键词:  SQL  数据库  决策树  DB4AI
DOI:10.13328/j.cnki.jos.006179
分类号:
基金项目:国家自然科学基金(61925205,61632016)
In-database AI Model Optimization
NIU Ze-Ping, LI Guo-Liang
Department of Computer Science and Technology, Tsinghua University, Beijing 100084, China
Abstract:
In a large number of changing data, data analysts often only care about a small amount of data with specific prediction results. However, users must query all the data by SQL before inference step, even if a large amount of data will be dropped, because the machine learning algorithm libraries always assume that the data is organized in a single table. This study points out that in this process, if some hints can be gotten from model in advance, it is expected that unnecessary data can be quickly eliminated in the data acquisition phase, thus reducing the cost of multi-table join, inter-process communication, and model prediction. This work takes a specific kind of machine learning model, i.e., decision tree, as an example. Firstly, a pre-filtering and validation execution workflow is proposed. Then, an offline algorithm is used to extract pre-filtering predicates from the decision tree. Finally, the algorithm is tested on real world dataset. Experiments show that the method proposed in this study can accelerate the execution of SQL queries containing predicates on decision tree prediction result.
Key words:  SQL  database  decision tree  DB4AI

引用本文:
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览次   下载  
分享到: 微信 更多
摘要:
关键词:  
DOI:
分类号:
基金项目:
Abstract:
Key words: