节点文献

基于NLP技术的UML模型生成工具的设计与实现

Design and Implementation of UML Model Generation Tool Based on NLP Technology

【作者】 王旭

【导师】 张雷;

【作者基本信息】 北京邮电大学 , 计算机技术(专业学位), 2020, 硕士

【摘要】 在软件开发的生命周期中,软件需求分析与设计是生命周期的两个初始缓环节,也是其中至关重要的两个环节。在需求分析阶段,软件设计人员借助软件工程相关的专业知识以及软件应用领域多相关知识对用户所提出的软件需求进行理解与提炼,区分出其中的功能需求与非功能需求,然后在软件设计阶段针对功能需求进行概要设计和详细设计并构建出相应的领域模型,通常以UML(Unified Modeling Language)模型进行表示。但由于软件设计人员通常对软件所应用领域相关的知识不够了解而无法快速并完整地理解用户需求,所以还需要软件设计人员首先花费一定的时间去熟悉并学习相关领域的知识后才能开始着手进行领域建模。此外在需求频繁变化或者需求较大程度更改时,软件设计人员也需要投入更多的精力去理解用户的新需求。这些情况的出现都会降低软件需求建模的效率,所以本文借助自然语言处理技术(NLP)研究实现了一个自动生成UML模型中类图和用例图的工具来提升软件需求建模的效率。本工具利用自然语言处理中命名实体识别任务和关系抽取任务的实现思路将用户提出的软件需求文本自动生成类图与用例图,从而为软件需求人员对软件需求进行领域建模提供思路与参考,帮助软件设计人员更高效地完成软件需求建模。本文的主要工作如下:1.构建了软件需求领域的文本数据集。通过在网络上查找软件需求设计分析的文档,以及借助图书馆的馆藏资源手工录入了一些软件工程和UML模型相关的纸质书籍中的软件需求文本,另外还搜集到一些实际应用项目的软件需求文档,然后将这些文本资源进行初步的筛选整合后构建了文本数据集。2.使用深度学习模型结合规则的方法来识别文本中构建类图和用例图的组成元素。目前学界已发表论文的UML模型自动生成工具中,绝大部分都采用的是基于句法分析结合规则匹配的方法,这类方法需要设计大量的语法规则来达到较高的准确率,扩展性较差。本工具使用基于深度学习的方法更加灵活且不需要有非常专业的语法知识即可实现。3.对基于NLP技术的UML模型生成工具的各功能模块进行了划分与设计,并利用前后端分离的web应用开发技术完成了工具的整体开发,目前已在平稳的运行中。

【Abstract】 In the software development life cycle,software requirements analysis and design are the two initial slow links in the life cycle,and they are also two of the most important links.In the requirements analysis phase,software designers use software engineering-related expertise and multiple relevant knowledge in the software application field to understand and refine the software requirements proposed by users,distinguish between functional and non-functional requirements,and then in the software design phase Outline and detailed design for the functional requirements and construct the corresponding domain model,which is usually represented by UML(Unified Modeling Language)model.However,because software designers usually do not have enough knowledge about the fields to which the software is applied to understand user requirements quickly and completely,software designers also need to spend some time to become familiar with and learn the relevant fields before they can begin Domain modeling.In addition,when the requirements change frequently or the requirements change to a large extent,software designers also need to invest more energy to understand the new needs of users.The emergence of these situations will reduce the efficiency of software designers in software requirements modeling.Therefore,in order to improve the efficiency of the conversion of user requirements in the form of natural language to the Unified Modeling Language(UML)model,this paper uses natural language processing technology(NLP)research to achieve A tool for automatically generating class diagrams and use case diagrams in UML models.This tool uses the implementation ideas of named entity recognition tasks and relationship extraction tasks in natural language processing to automatically generate class diagrams and use case diagrams of software requirements texts proposed by users,so as to provide ideas and references for software requirements personnel to model software requirements in the domain.Help software designers complete software requirements modeling more efficiently.The main work of this article is as follows:1.Constructed a text data set in the software requirements area.By looking for documents for software requirements design analysis on the Internet,and manually inputting software requirements texts in paper books related to software engineering and UML models with the help of library collection resources,software requirements for some practical application projects were also collected Documents,and then preliminary filtering and integration of these text resources to build a text data set.2.Use deep learning models combined with rules to identify the constituent elements of class diagrams and use case diagrams in text.At present,most of the UML model automatic generation tools for published papers in the academic community are based on the method of syntactic analysis and rule matching.This method requires the design of a large number of grammatical rules to achieve high accuracy and poor scalability..This tool uses deep learning-based methods to be more flexible and does not require very specialized grammar knowledge to implement.3.The functional modules of the UML model generation tool based on NLP technology are divided and designed,and the overall development of the tool is completed using the web application development technology separated from the front and back ends,which is currently running smoothly.

  • 【分类号】TP311.52
  • 【下载频次】157
节点文献中: 

本文链接的文献网络图示:

本文的引文网络