当前位置>主页 > 期刊在线 > 智能制造 >

智能制造21年15期

NL2SQL 技术在电厂设备缺陷数据统计中的应用研究
马骏¹,李泽华¹ ,沈铭科 ²
(1. 通辽霍林河坑口发电有限责任公司,内蒙古 通辽 029200;2. 上海发电设备成套设计研究院有限责任公司,上海 200240)

摘  要:文章提出了一种基于 NL2SQL 的电厂设备缺陷数据查询统计方法,将设备缺陷数据查询文本转化成 SQL 语句执行并返回查询统计结果。利用基于 NLP 预训练模型,将 SQL 语句预测模型划分为全局条件逻辑运算符预测、条件比较运算符和条件值预测、条件列预测、指标列聚合操作符和指标列预测等四个组件,并在搭建的电厂设备缺陷数据集上进行了测试验证。测试结果表明模型具有良好的 SQL 语句预测精度和执行效果。


关键词:NL2SQL;电厂;设备缺陷;数据统计;SQL 语句预测



DOI:10.19850/j.cnki.2096-4706.2021.15.048



基金项目:国家电力投资集团有限公司统筹研发资助项目(TC2020HD01)


中图分类号:TP311.1                                         文献标识码:A                                   文章编号:2096-4706(2021)15-0176-04



Research on Application of NL2SQL Technology in Defect Data Statistics of Power Plant Equipment

MA Jun1, LI Zehua 1, SHEN Mingke 2

(1. Tongliao Huolinhe Pithead Power Generation Co., Ltd., Tongliao 029200, China;2. Shanghai Power Equipment Research Institute Co.,Ltd.,Shanghai 200240,China)

Abstract: This paper proposes a method for statistical analysis of power plant equipment defect data based on NL2SQL, which converts the query text of equipment defect data into SQL statements for execution and returns the query statistics results. Using the NLPbased pre-training model, the SQL statement prediction model is divided into four components: global conditional logic operator prediction,conditional comparison operator and condition value prediction, conditional column prediction, indicator column aggregation operator, and indicator column prediction. Test verification is carried out on the built power plant equipment defect data set. The test result shows that the model has good SQL statement prediction accuracy and execution effect.

Keywords: NL2SQL; power plant; equipment defect; data statistics; SQL statement prediction



参考文献:

[1] 何珍华 . 电厂设备缺陷管理系统的设计与实现 [D]. 成都:电子科技大学,2013.

[2] 王林川,宋超翼,吴铁山,等 . 管理信息专家系统在电厂设备缺陷管理中的应用 [J]. 东北电力学院学报,2001(4):71-

73+76.

[3] 刘译璟,徐林杰,代其锋 . 基于自然语言处理和深度学习的 NL2SQL 技术及其在 BI 增强分析中的应用 [J]. 中国信息化,2019(11):62-67.

[4] 张立新,于海亮,张栋栋,等 . 基于 NL2SQL 的智能问答系统研究与应用 [J]. 电脑知识与技术,2020,16(35):83-86.

[5] 曹金超,黄滔,陈刚,等 . 自然语言生成多表 SQL 查询语句技术研究 [J]. 计算机科学与探索,2020,14(7):1133-1141.

[6] DEVLIN J,CHANG M W,LEE K,et al. BERT:Pretraining of Deep Bidirectional Transformers for Language Understanding [J/OL].arXiv:1810.04805 [cs.CL].(2018-10-11).https://arxiv.org/abs/1810.04805.


作者简介:马骏(1982.01—),男,汉族,内蒙古霍林郭勒人,工程师,本科,研究方向:电厂信息化技术。