广西师范大学学报(自然科学版) ›› 2021, Vol. 39 ›› Issue (5): 110-121.doi: 10.16088/j.issn.1001-6600.2020111401

• 研究论文 • 上一篇    下一篇

基于词嵌入和长短期记忆网络的非功能软件需求分类

李冰1, 李智1*, 杨溢龙2   

  1. 1.广西师范大学 计算机科学与工程学院, 广西 桂林 541004;
    2.北京航空航天大学 软件学院, 北京 100191
  • 收稿日期:2020-11-14 修回日期:2021-02-22 出版日期:2021-09-25 发布日期:2021-10-19
  • 通讯作者: 李智(1969—),男,广西桂林人,广西师范大学教授,博士。E-mail: zhili@gxnu.edu.cn
  • 基金资助:
    国家自然科学基金(61862009);广西自然科学基金(2018GXNSFAA281314);广西研究生教育创新计划项目(JXXYYJSCXXM-001)

Classification of Non-Functional Software Requirements Using Word Embeddings and Long Short-Term Memory

LI Bing1, LI Zhi1*, YANG Yilong2   

  1. 1. College of Computer Science and Engineering, Guangxi Normal University, Guilin Guangxi 541004, China;
    2. College of Software, Beihang University, Beijing 100191, China
  • Received:2020-11-14 Revised:2021-02-22 Online:2021-09-25 Published:2021-10-19

摘要: 非功能需求(non-functional requirements,NFR)描述了软件所需的一组质量属性,例如安全性、可靠性、性能等。为了开发高质量的软件产品,需要从软件需求规格说明书(software requirements specification,SRS)中提取NFR,如果此过程实现了自动化,不仅可以减少从大量需求中识别特定需求所涉及的人工、时间和精神疲劳,还可以帮助开发人员提供满足用户期望的高质量软件。针对此问题,本文采用深度学习特征提取和分类技术,提出一种基于预训练的BERT(bidirectional encoder representations from transformers)词嵌入和长短期记忆网络LSTM(long short-term memory)相结合的BERT-LSTM网络模型,用于质量软件开发的自动NFR分类。首先,通过BERT模型训练需求文本中的词向量,然后利用长短期记忆网络对词向量进行特征提取,最后使用Softmax分类器识别SRS中的NFR。实验表明,相比于其他算法,在由非功能需求和功能需求组成的PROMISE语料库中,BERT-LSTM网络模型在准确度、召回率、F1得分等指标方面取得了最佳的效果。

关键词: 非功能需求, 需求规格说明书, BERT, 长短期记忆网络

Abstract: Non-functional requirements (NFR) describes a set of quality attributes required by the software, such as safety, reliability, performance, etc. In order to develop high-quality software products, it would be beneficial to automatically extract NFR from the Software Requirements Specification (SRS), which not only reduces the labor, time, and mental fatigue involved in identifying specific requirements from a large number of requirements, but also helps developers provide high-quality software that fully meets user expectations. In order to solve this problem, by adopting deep learning feature extraction and classification technology, a BERT-LSTM network model based on the combination of pre-trained BERT word embeddings and long short-term memory network LSTM is proposed, which is used for automatic NFR classification of quality software development. First, use the BERT model to train the word vectors in the sentence. Then use the Long Short-Term Memory network to further perform feature selection and dimensionality reduction. And finally use the Softmax classifier to identify NFR from SRS. Experiments show that in the PROMISE corpus composed of NFR, the BERT-LSTM network model has achieved the best results compared with other algorithms in terms of precision, recall, F1 score, and other indicators.

Key words: non-functional requirements, software requirements specification, BERT, long short-term memory

中图分类号: 

  • TP183
[1] 贾一荻, 刘璘. 中文非功能需求描述的识别与分类方法研究[J]. 软件学报, 2019, 30(10): 3115-3126. DOI:10.13328/j.cnki.jos.005791.
[2] KRASNER H. The cost ofpoor quality software in the us: a 2018 report[R]. Milford, MA: Consortium for IT Software Quality, 2018: 14.
[3] 卢蒙蒙. 用户评论中非功能需求的自动分类[D]. 武汉: 武汉大学, 2018.
[4] BAKER C, DENG L, CHAKRABORTY S, et al. Automatic multi-class non-functional software requirements classification using neural networks[C] // 2019 IEEE 43rd Annual Computer Software and Applications Conference (COMPSAC). Los Alamitos, CA: IEEE Computer Society, 2019: 610-615. DOI:10.1109/COMPSAC.2019.10275.
[5] AMELLER D, AYALA C, CABOT J, et al.How do software architects consider non-functional requirements: an exploratory study[C] // 2012 20th IEEE International Requirements Engineering Conference (RE). Piscataway, NJ: IEEE Press, 2012: 41-50. DOI:10.1109/RE.2012.6345838.
[6] 李潇, 魏长江. 基于扩展I*框架的嵌入式系统需求建模方法[J]. 青岛大学学报(自然科学版), 2019, 32(1): 66-73. DOI:10.3969/j.jssn.1006-1037.2019.02.14.
[7] 夏廷红. 软件非功能需求双语知识图谱构建及实体链接研究[D]. 昆明: 云南大学, 2019.
[8] BROY M. Rethinking nonfunctional software requirements[J]. Computer, 2015, 48(5): 96-99. DOI:10.1109/MC.2015.139.
[9] HAQUE M A, RAHMAN M A, SIDDIK M S. Non-functional requirements classification with feature extraction and machine learning: an empirical study[C] // 2019 1st International Conference on Advances in Science, Engineering and Robotics Technology (ICASERT). Piscataway, NJ: IEEE Press, 2019: 1121-1125. DOI:10.1109/ICASERT.2019.8934499.
[10] CLELAND-HUANG J, SETTIMI R, ZOU X C, et al. The detection and classification of non-functional requirements with application to early aspects[C] // 14th IEEE International Requirements Engineering Conference (RE′06). Los Alamitos, CA: IEEE Computer Society, 2006: 39-48. DOI:10.1109/RE.2006.65.
[11] HUSSAIN I, KOSSEIM L, ORMANDJIEVA O. Using linguistic knowledge to classify non-functional requirements in SRS documents[C] // Natural Language and Information Systems: LNCS Volume 5039. Berlin: Springer, 2008: 287-298. DOI:10.1007/978-3-540-69858-6_28.
[12] NAVARRO-ALMANZA R, JUAREZ-RAMIREZ R, LICEA G. Towards supporting software engineering using deep learning:a case of software requirements classification[C] // 2017 5th International Conference in Software Engineering Research and Innovation (CONISOFT). Los Alamitos, CA: IEEE Computer Society, 2017: 116-120. DOI:10.1109/CONISOFT.2017.00021.
[13] MATSUMOTO Y, SHIRAI S, OHNISHI A. A method for verifying non-functional requirements[J]. Procedia Computer Science, 2017, 112: 157-166. DOI:10.1016/j.procs.2017.08.006.
[14] LU M M, LIANG P. Automatic classification of non-functional requirements from augmented app user reviews[C] // Proceedings of the 21st International Conference on Evaluation and Assessment in Software Engineering. New York, NY: Association for Computing Machinery, 2017: 344-353. DOI:10.1145/3084226.3084241.
[15] SLANKAS J, WILLIAMS L. Automated extraction of non-functional requirements in available documentation[C] // 2013 1st International Workshop on Natural Language Analysis in Software Engineering (NaturaLiSE). Piscataway, NJ: IEEE Press, 2013: 9-16. DOI:10.1109/NAturaLiSE.2013.6611715.
[16] KHAN F, JAN S R, TAHIR M, et al. Survey: dealing non-functional requirements at architecture level[J]. VFAST Transactions on Software Engineering, 2016, 4(1): 27-33. DOI:10.21015/vtse.v9i2.410.
[17] KURTANOVIC' Z, MAALEJ W. Automatically classifying functional and non-functional requirements using supervised machine learning[C] // 2017 IEEE 25th International Requirements Engineering Conference (RE). Los Alamitos CA:IEEE Computer Society, 2017: 490-495. DOI:10.1109/RE.2017.82.
[18] 胡文生, 杨剑锋, 赵明. 基于灰色聚类算法的需求分析[J]. 计算机科学, 2016, 43(增刊1): 471-475. DOI:10.11896/j.issn.1002-137X.2016.6A.111.
[19] KHAN A, SOHAIL A, ZAHOORA U, et al. A survey of the recent architectures of deep convolutional neural networks[J]. Artificial Intelligence Review, 2020, 53(8): 5455-5516. DOI:10.1007/s10462-020-09825-6.
[20] NARIN A, KAYA C, PAMUK Z. Automatic detection of coronavirus disease(covid-19) using X-ray images and deep convolutional neural networks[EB/OL]. (2020-03-24)[2020-11-14]. https:// arxiv.org/pdf/2003.10849.
[21] DOS SANTOS C, GATTI M. Deep convolutional neural networks for sentiment analysis of short texts[C] // Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers. Stroudsburg PA: Association for Computational Linguistics, 2014: 69-78.
[22] HINTON G, DENG L, YU D, et al.Deep neural networks for acoustic modeling in speech recognition: the shared views of four research groups[J]. IEEE Signal Processing Magazine, 2012, 29(6): 82-97. DOI:10.1109/MSP.2012.2205597.
[23] HOCHREITER S, SCHMIDHUBER J. Long short-term memory[J]. Neural Computation, 1997, 9(8): 1735-1780. DOI:10.1162/neco.1997.9.8.1735.
[24] DEVLIN J, CHANG M W, LEE K, et al. Bert: pre-training of deep bidirectional transformers for language understanding[C] // Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Volume 1 (Long and Short Papers). Stroudsburg PA: Association for Computational Linguistics, 2019: 4171-4186. DOI:10.18653/v1/N19-1423.
[25] VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need[C] // Advances in Neural Information Processing Systems 30:31st Annual Conference on Neural Information Processing Systems(NIPS 2017). Red Hook, NY: Curran Associates Inc, 2017: 6000-6010.
[26] ZAREMBA W, SUTSKEVER I, VINYALS O. Recurrent neural network regularization[EB/OL]. (2014-09-08)[2020-11-14]. https:// arxiv.org/pdf/1409.2329.
[27] SINGH M, SALARIA D S. Software defect prediction tool based on neural network[J]. International Journal of Computer Applications, 2013, 70(22): 22-28. DOI:10.5120/12200-8368.
[28] KIM Y. Convolutional neural networks for sentence classification[C] // Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP). Stroudsburg PA: Association for Computational Linguistics, 2014: 1746-1751. DOI:10.3115/v1/D14-1181.
[29] LIU P F, QIU X P, HUANG X J. Recurrent neural network for text classification with multi-task learning[C] // Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence (IJCAI-16). Palo Alto, CA: AAAI Press, 2016: 2873-2879.
[30] ZHOU P, SHI W, TIAN J, et al. Attention-based bidirectional long short-term memory networks for relation classification[C] // Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics: Volume 2, Short Papers. Stroudsburg PA: Association for Computational Linguistics, 2016: 207-212. DOI:10.18653/v1/P16-2034.
[31] LAI S W, XU L H, LIU K, et al. Recurrent convolutional neural networks for text classification[C] // Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence. Palo Alto, CA: AAAI Press, 2015: 2267-2273.
[32] JOULIN A, GRAVE E, BOJANOWSKI P, et al. Bag of tricks for efficient text classification[C] // Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers. Stroudsburg PA: Association for Computational Linguistics, 2017: 427-431. DOI:10.18653/v1/E17-2068.
[33] JOHNSON R, ZHANG T. Deep pyramid convolutional neural networks for text categorization[C] // Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics: Volume 1, Long Papers. Stroudsburg PA: Association for Computational Linguistics, 2017: 562-570. DOI:10.18653/v1/P17-1052.
[34] HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition[C] // 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos, CA: IEEE Computer Society, 2016: 770-778. DOI:10.1109/CVPR.2016.90.
[1] 薛涛, 丘森辉, 陆豪, 秦兴盛. 基于经验模态分解和多分支LSTM网络汇率预测[J]. 广西师范大学学报(自然科学版), 2021, 39(2): 41-50.
[2] 罗兰, 周楠, 司杰. 不确定细胞神经网络鲁棒稳定新的时滞划分法[J]. 广西师范大学学报(自然科学版), 2019, 37(4): 45-52.
[3] 范瑞,蒋品群,曾上游,夏海英,廖志贤,李鹏. 多尺度并行融合的轻量级卷积神经网络设计[J]. 广西师范大学学报(自然科学版), 2019, 37(3): 50-59.
[4] 周戎龙,罗玉玲,闭金杰,岑明灿,丘森辉,廖志贤. 图像并行加密算法在手持设备上的应用研究[J]. 广西师范大学学报(自然科学版), 2019, 37(3): 60-70.
[5] 张金磊, 罗玉玲, 付强. 基于门控循环单元神经网络的金融时间序列预测[J]. 广西师范大学学报(自然科学版), 2019, 37(2): 82-89.
[6] 刘铭, 张双全, 何禹德. 基于改进SOM神经网络的异网电信用户细分研究[J]. 广西师范大学学报(自然科学版), 2018, 36(3): 17-24.
[7] 万雷,罗玉玲,黄星月. 脉冲神经网络硬件系统性能监测平台[J]. 广西师范大学学报(自然科学版), 2018, 36(1): 9-16.
[8] 林晓宇, 钟一文, 王爱荣. 趋药性人工蜂群算法训练神经网络研究[J]. 广西师范大学学报(自然科学版), 2011, 29(3): 120-124.
[9] 朱经纬, 芮挺, 李决龙, 方虎生, 张金林. 基于蚁群神经网络的机械手自组织逆运动规划[J]. 广西师范大学学报(自然科学版), 2011, 29(2): 125-129.
[10] 吕惠炼, 胡维平. 基于端到端深度神经网络的语音情感识别研究[J]. 广西师范大学学报(自然科学版), 2021, 39(3): 20-26.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 黄李, 邹艳丽, 王意, 李可. 分布式电站的3种入网方式比较研究[J]. 广西师范大学学报(自然科学版), 2017, 35(3): 30 -36 .
[2] 苏旭, 刘玉萍. 青海省药用植物野薄荷光合特性的研究[J]. 广西师范大学学报(自然科学版), 2011, 29(2): 76 -81 .
[3] 朱经纬, 芮挺, 李决龙, 方虎生, 张金林. 基于蚁群神经网络的机械手自组织逆运动规划[J]. 广西师范大学学报(自然科学版), 2011, 29(2): 125 -129 .
[4] 鄂旭, 邵良杉, 李胜, 王全铁. 一种基于关联度的区间型数据离散化方法[J]. 广西师范大学学报(自然科学版), 2011, 29(2): 134 -137 .
[5] 吕虹, 秦永彬, 罗聪. 基于Memetic算法的飞机地面作业调度问题研究[J]. 广西师范大学学报(自然科学版), 2011, 29(2): 145 -150 .
[6] 张新明, 张玉珊, 李振云. 一种改进的矩不变图像分割方法[J]. 广西师范大学学报(自然科学版), 2011, 29(2): 185 -190 .
[7] 熊顺清, 周卫红. 一种基于非采样Contourlet变换的图像水印算法[J]. 广西师范大学学报(自然科学版), 2011, 29(2): 195 -199 .
[8] 沈泽豪, 叶中行. 期货公司客户风险管理的模糊聚类分析[J]. 广西师范大学学报(自然科学版), 2011, 29(3): 101 -104 .
[9] 赵鑫, 宋英强, 胡月明, 刘轶伦, 朱阿兴. 基于多源开放数据的城乡居民点空间布局优化[J]. 广西师范大学学报(自然科学版), 2020, 38(1): 26 -40 .
[10] 孙祚晨, 王麒翰, 龙波涌. 单叶调和函数的一个子类[J]. 广西师范大学学报(自然科学版), 2020, 38(1): 54 -59 .
版权所有 © 广西师范大学学报(自然科学版)编辑部
地址:广西桂林市三里店育才路15号 邮编:541004
电话:0773-5857325 E-mail: gxsdzkb@mailbox.gxnu.edu.cn
本系统由北京玛格泰克科技发展有限公司设计开发