WO2023284108A1 - 需求符合性分析方法、系统、电子设备及存储介质 - Google Patents

需求符合性分析方法、系统、电子设备及存储介质 Download PDF

Info

Publication number
WO2023284108A1
WO2023284108A1 PCT/CN2021/119230 CN2021119230W WO2023284108A1 WO 2023284108 A1 WO2023284108 A1 WO 2023284108A1 CN 2021119230 W CN2021119230 W CN 2021119230W WO 2023284108 A1 WO2023284108 A1 WO 2023284108A1
Authority
WO
WIPO (PCT)
Prior art keywords
requirement
requirements
demand
conformity
analysis
Prior art date
Application number
PCT/CN2021/119230
Other languages
English (en)
French (fr)
Inventor
陈晓轩
缪炜恺
蒲戈光
冯劲草
夏晔川
王一粟
蔡雄
乔艳茹
Original Assignee
卡斯柯信号有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 卡斯柯信号有限公司 filed Critical 卡斯柯信号有限公司
Priority to EP21949883.9A priority Critical patent/EP4184313A1/en
Priority to US18/021,281 priority patent/US20230297774A1/en
Publication of WO2023284108A1 publication Critical patent/WO2023284108A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/253Grammatical analysis; Style critique
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition

Definitions

  • the present invention relates to the technical field of natural language processing, in particular to a requirement conformity analysis method, system, electronic equipment and storage medium.
  • a method is proposed that can facilitate requirements analysts to quickly and conveniently detect the compliance of upper and lower layer requirements in the platform, and can perform traceability checks on natural language requirements, and can provide requirements engineers when writing requirements.
  • the method of providing some reference information has become an urgent problem to be solved.
  • the purpose of the present invention is to provide a demand conformity analysis method, system, electronic equipment and storage medium, aiming to solve the problem of manual review in the process of demand development and management in the prior art to check the consistency of the upper and lower layers, which is costly Manpower and time and cannot ensure the correctness of the review.
  • the present invention provides a requirement conformity analysis method, including:
  • the requirement compliance analysis includes:
  • Syntax analysis, semantic analysis and quantifier analysis are respectively performed on the core content of the requirements through the conformity evaluation system, and the final evaluation results are given.
  • the natural language processing module is a stanza natural language processing module.
  • the core content of the requirement includes the subject of the requirement statement, the object, the grammatical relationship formed by subject-verb-object, and the quantitative relationship formed by subject keyword object.
  • the step of introducing the requirement knowledge graph includes: according to the relationship between the two pre-defined proper nouns, semantically supplement the two proper nouns to determine the number of upper-level requirements And the requirement compliance of several lower-level requirements corresponding to it.
  • the requirement traceability tags of the several upper-level requirements and the corresponding lower-level requirements are compared with the actual structure of the requirement document, and the inspection results of the requirement traceability relationship are used to assist the several Requirement conformity analysis of upper-level requirements and its corresponding lower-level requirements.
  • the step of performing automatic completion of requirement documents includes:
  • the machine learning model is any one of transformer, ngram and gpt-2.
  • the requirement viewing is the viewing of the dependencies between requirements.
  • a requirement dependency tree is constructed, and the requirements examiners view the components of the requirements through the requirement dependency tree displayed on the front end, so as to check the non-standard Grammatical writing is corrected.
  • a requirement conformity analysis system used to implement the requirement conformity analysis method described above, comprising:
  • the viewing module is used to visualize the requirements in the requirements document
  • a processing module configured to construct several upper-level requirements and several lower-level requirements into a requirement statement model
  • a check module used to check the requirement traceability labels existing in the requirement document
  • the code completion module is used to automatically generate the required requirements documents according to the historical requirements documents and semantic analysis.
  • the processing module includes:
  • a conformity evaluation unit configured to check the consistency between the plurality of upper-level requirements and the corresponding lower-level requirements
  • a natural language processing unit connected to the conformity evaluation unit is used to construct the several upper-level requirements and the corresponding lower-level requirements into a demand statement model;
  • the analyzing unit is connected with the extracting unit, and the analyzing unit is used to perform grammatical analysis, semantic analysis and quantifier analysis on the core content of the requirement sentence model, and give the final analysis result.
  • the consistency between the several upper-level requirements and the corresponding lower-level requirements in the conformity evaluation unit means that the entities described by the several upper-level requirements and the corresponding lower-level requirements and the behaviors of the entities are consistent.
  • the core content of the requirement includes the subject of the requirement statement, the object, the grammatical relationship formed by subject-verb-object, and the quantitative relationship formed by subject keyword object.
  • the knowledge graph module makes semantic supplements to the two proper nouns according to the pre-defined relationship between the two proper nouns, and is used to determine the several upper-level requirements and the corresponding several requirement compliance
  • the inspection module compares the requirements traceability label with the structure of the actual requirements document, and the inspection results of the inspection module are used to assist the requirements of the several upper-layer requirements and the corresponding several lower-layer requirements to meet gender analysis.
  • the code completion module includes:
  • the training unit uses a machine learning model to train historical demand documents, and determines whether it needs to be added to the semantic consistency judgment work according to the feedback;
  • a completion unit the completion unit is connected with the training unit, and the completion unit is used to automatically generate the requirement document to be written according to the historical requirement document and semantic analysis.
  • the viewing module is used to view the dependencies among requirements, and visually display the requirements in the requirements document through the front end, so as to facilitate the modification of non-standard syntax.
  • An electronic device including a processor and a memory, where a computer program is stored on the memory, and when the computer program is executed by the processor, the requirement compliance analysis method described above is realized.
  • a readable storage medium where a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, the requirement compliance analysis method described above is realized.
  • the present invention has at least one of the following beneficial effects:
  • the method of the present invention conducts auxiliary checks on the conformity of requirements between different levels, and improves the accuracy of conformity of demands through the demand checking, demand conformity analysis, demand knowledge map and demand tracing relationship checking modules; it helps demand analysts to conveniently and quickly identify different The requirements conformity between levels are reviewed, which improves the accuracy and standardization of requirements.
  • Fig. 1 is a schematic flow diagram of a requirement compliance analysis method provided by an embodiment of the present invention
  • Fig. 2 is a schematic flow diagram of a requirements compliance analysis provided by an embodiment of the present invention.
  • this embodiment provides a natural language-based Software requirements conformance analysis methods for processing technologies, including:
  • Step S1 Obtain the requirements document that needs to be analyzed, and check the requirements
  • each requirement document in excel format may include multiple sheets
  • the user is provided with the option to select a sheet.
  • the imported requirements document will construct a requirement structure tree, and each requirement will be displayed as a node, and the requirement structure tree used to display the requirements supports the function of quick indexing. Clicking on a node displays the detailed text content of the requirement. In addition to the regular function of displaying requirements, clicking on the requirement text will call the stanza natural language analysis module in the tool to display the analysis results of the text's requirement statement model.
  • the requirements reviewer can intuitively understand the components of the requirement statement through the requirement statement model. Grammatical writing corrections.
  • Step S2 Perform requirement conformity analysis on several upper-level requirements and corresponding lower-level requirements in the requirement document;
  • Step S2.1 Establish a conformity evaluation system to check the consistency of several upper-level requirements and corresponding lower-level requirements.
  • the consistency of several upper-level requirements and corresponding lower-level requirements is the number of upper-level requirements It is consistent with the entities described by the corresponding lower-level requirements and the behavior of the entities.
  • Step S2.2 Using a natural language processing module to construct several upper-level requirements and corresponding lower-level requirements into a demand statement model, the natural language processing module adopts the stanza natural language processing module;
  • Step S2.3 Extract the core content of the demand from the demand statement model, the core content of the demand includes the subject, object, grammatical relationship formed by subject-verb-object and the quantity formed by subject keyword object of the demand statement relation;
  • Step S2.4 Carry out grammatical analysis, semantic analysis and quantifier analysis on the core content of the requirements through the conformity evaluation system, and give the final evaluation results.
  • Step S3 Introduce the requirement knowledge map, and expand the semantics of the proper nouns in the requirement
  • the role of the requirement knowledge graph is to define the relationship between two different proper nouns.
  • the requirement knowledge graph By introducing the requirement knowledge graph, it can be expanded at the semantic level to better determine the conformity between the upper-level requirements and the lower-level requirements.
  • the tool After introducing the knowledge graph, according to the relationship between the two defined by the user, the tool can expand it semantically, so that the analysis result can be more accurate.
  • the knowledge map information used in the analysis process is given in the analysis results, and humans can further judge the rationality of this knowledge introduction.
  • Step S4 Compare the requirements traceability labels of the several upper-level requirements and the corresponding lower-level requirements with the actual structure of the requirements document, and the inspection results of the requirements traceability are used to assist the several upper-level requirements Requirement compliance analysis of the requirement and its corresponding lower-level requirements.
  • An effective requirement traceability compliance analysis method is an effective means to ensure the safety of the control system from the source.
  • the requirement text information in each requirement statement and the requirement text information of the upper-level requirements when the upper-level requirements described in it are wrong or missing, it should be that the writing of the requirements is wrong. Therefore, for the imported requirement document, check the requirement traceability relationship.
  • the requirement traceability relationship in order to make the results of the requirement traceability relationship more intuitive, when the information in the structure is missing in the text, we use red to mark the error; when the information in the text is missing in the structure, we use blue to mark the reminder.
  • Step S5 Complete the automatic completion of the requirement document.
  • the automatic completion of the requirement document includes:
  • Step S5.1 Use a machine learning model to train historical demand documents, and determine whether it needs to be added to the semantic analysis work according to user feedback.
  • the machine learning model is any one of transformer, ngram, and gpt-2;
  • Step S5.2 After the user writes some requirements, automatically generate the requirement documents that the user needs to write according to the historical requirement documents and semantic analysis;
  • a demand conformity analysis system used to implement the above demand conformity analysis method, comprising:
  • the viewing module is used to visualize the requirements in the requirements document
  • a processing module configured to construct several upper-level requirements and several lower-level requirements into a requirement statement model
  • a check module used to check the requirement traceability labels existing in the requirement document
  • the code completion module is used to automatically generate the required requirements documents according to the historical requirements documents and semantic analysis.
  • the processing modules include:
  • a conformity evaluation unit configured to check the consistency between the plurality of upper-level requirements and the corresponding lower-level requirements
  • the natural language processing unit is connected with the conformity evaluation unit, and the natural language processing unit is used to construct the several upper-level requirements and the corresponding lower-level requirements into a demand sentence model;
  • the analyzing unit is connected with the extracting unit, and the analyzing unit is used to perform grammatical analysis, semantic analysis and quantifier analysis on the core content of the requirement sentence model, and give the final analysis result.
  • the consistency between the several upper-level requirements and the corresponding lower-level requirements in the conformity evaluation unit means that the entities described by the several upper-level requirements and the corresponding lower-level requirements and the behaviors of the entities are consistent.
  • the core content of the requirement includes the subject of the requirement statement, the object, the grammatical relationship formed by the subject-verb-object, and the quantity relationship formed by the subject keyword object.
  • the knowledge graph module makes semantic supplements to the two proper nouns according to the relationship between the two pre-defined proper nouns, and is used to determine the several upper-level requirements and the corresponding lower-level requirements compliance with the needs of
  • the inspection module compares the structure of the requirement traceability label with the actual requirement document, and the inspection result of the inspection module is used to assist the requirements conformity analysis of the several upper-level requirements and the corresponding several lower-level requirements.
  • the code completion module includes:
  • the training unit uses a machine learning model to train the historical demand documents, and determines whether it needs to be added to the semantic consistency judgment work according to the feedback.
  • the machine learning model is any one of transformer, ngram and gpt-2;
  • a completion unit the completion unit is connected with the training unit, and the completion unit is used to automatically generate the requirement document to be written according to the historical requirement document and semantic analysis.
  • An electronic device includes a processor and a memory, where a computer program is stored on the memory, and when the computer program is executed by the processor, the method described above is implemented.
  • a readable storage medium where a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, the method described above is realized.
  • a requirements conformity analysis method in this embodiment is mainly applied in the requirements development and management phase of safety-critical fields, and this method can assist in checking the requirements conformity between different levels.
  • this method further combines requirements viewing, requirements compliance analysis, requirements knowledge map, and requirements traceability relationship checking modules. This method can help requirements analysts review requirements compliance between different levels conveniently and quickly, and improve the accuracy and standardization of requirements.
  • connection In the description of the present invention, unless otherwise clearly specified and limited, the terms “installation”, “connection”, “connection” and “fixation” should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection , or integrated; it can be mechanically connected or electrically connected; it can be directly connected or indirectly connected through an intermediary, and it can be the internal communication of two components or the interaction relationship between two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations.
  • a first feature being “on” or “under” a second feature may include direct contact between the first and second features, and may also include the first and second features Not in direct contact but through another characteristic contact between them.
  • “above”, “above” and “above” the first feature on the second feature include that the first feature is directly above and obliquely above the second feature, or simply means that the first feature is horizontally higher than the second feature.
  • “Below”, “beneath” and “under” the first feature to the second feature include that the first feature is directly below and obliquely below the second feature, or simply means that the first feature has a lower level than the second feature.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Machine Translation (AREA)

Abstract

本发明公开了一种需求符合性分析方法、系统、电子设备及存储介质,包括:获取需要进行分析的需求文档,并对所述需求文档进行需求查看;对所述需求文档中若干个上层需求和与其对应的若干个下层需求,进行需求符合性分析;引入需求知识图谱,对需求中的专有名词进行语义上的扩充;进行需求追溯关系的检查;对所述需求文档中存在的需求追溯标签进行检查,进行所述需求文档的自动补全工作,本发明方法对于不同层次间需求符合性进行辅助检查,提高了需求符合性的准确性;帮助需求分析人员方便快捷地对不同层次间需求符合性进行审阅,提高了需求的准确性和规范性。

Description

需求符合性分析方法、系统、电子设备及存储介质 技术领域
本发明涉及自然语言处理技术领域,具体涉及一种需求符合性分析方法、系统、电子设备及存储介质。
背景技术
需求工程师在撰写自然语言需求时不可避免会出现一些错误,对于需求阶段出现的错误,如果不能及时发现并处理,那么对整个项目将产生不可估量的影响。为了确保需求的正确性,那么对需求进行审查和验证是非常必要的。然而人工检查需求的追溯符合性不但费时费力,且无法确保审查的正确性。此外,也难以对需求进行追踪检查,包括检查不同版本之间自然语言语义的相容性以及伪代码是否和自然语言需求意图相一致等问题。除了确保需求的正确性以外,大型软件需求文档的撰写,对需求分析人员而言也一直是一项难题,在撰写时通常需要翻阅大量的文档。
针对上述问题,提出一种能够便于需求分析人员能在平台中快速便捷地检测上下层需求的符合性,且能够对自然语言需求进行上下层追溯符合性检查,以及能够在需求撰写时给需求工程师提供一些参考性信息的方法已经成为一个亟待解决的问题。
发明的公开
本发明的目的是提供一种需求符合性分析方法、系统、电子设备及存储介质,旨在解决现有技术在需求开发管理过程中,检查上下层需求的一致性需要采用人工审查的方式,耗费人力和时间且无法确保审查的正确性的问题。
为达到上述目的,本发明提供了需求符合性分析方法,包括:
获取需要进行分析的需求文档,并对所述需求文档进行需求查看;
对所述需求文档中若干个上层需求和与其对应的若干个下层需求,进行 需求符合性分析;
引入需求知识图谱,对需求中的专有名词进行语义上的扩充;
进行需求追溯关系的检查;对所述需求文档中存在的需求追溯标签进行检查,用于检查所述需求追溯标签与所述需求文档的实际结构的一致性;
进行所述需求文档的自动补全工作。
优选的,所述需求符合性分析包括:
建立符合性评价体系,用于检查所述若干个上层需求和与其对应的若干个下层需求的一致性;
使用自然语言处理模块分别将所述若干个上层需求和若干个下层需求构造为需求语句模型;
由所述需求语句模型提取需求的核心内容;
通过所述符合性评价体系对需求的核心内容分别进行语法分析、语义分析和量词分析,并给出最终的评价结果。
优选的,所述自然语言处理模块为stanza自然语言处理模块。
优选的,所述需要的核心内容包括所述需求语句的主语、宾语、由主谓宾构成的语法关系及由主语关键词宾语构成的数量关系。
优选的,所述引入需求知识图谱的步骤包括:根据预先定义的两个专有名词之间的关系,对两个所述专有名词进行语义上的补充,用于判定所述若干个上层需求和与其对应的若干个下层需求的需求符合性。
优选的,将所述若干个上层需求和与其对应的若干个下层需求的需求追溯标签与实际的所述需求文档的结构进行对比,将所述需求追溯关系的检查结果用于辅助所述若干个上层需求和其对应的若干个下层需求的需求符合性分析。
优选的,所述进行需求文档的自动补全工作的步骤包括:
使用机器学习模型针对历史需求文档进行训练,根据反馈情况,确定是否需要加入到语义一致性判断工作中;
撰写部分需求后,根据历史需求文档及语义分析自动生成所需要撰写的需求文档。
优选的,机器学习模型为transformer、ngram和gpt-2中的任意一种。
优选的,所述需求查看为需求之间依存关系的查看,导入需求文档后, 构造需求依存关系树,需求审查人员通过前端显示的需求依存关系树查看需求的成分,以用于对不规范的语法撰写进行改正。
一种需求符合性分析系统,用于实现上文所述的需求符合分析方法,包含:
查看模块,用于将需求文档中的需求以可视化的方式展示;
处理模块,用于将若干个上层需求和若干个下层需求构造成需求语句模型;
知识图谱模块,对需求中的专有名词进行语义上的扩充;
检查模块,用于对需求文档中存在的需求追溯标签进行检查;
代码补全模块,用于根据历史需求文档及语义分析自动生成所需要撰写的需求文档。
优选的,所述处理模块包括:
符合性评价单元,用于检查所述若干个上层需求和与其对应的若干个下层需求的一致性;
自然语言处理单元,与符合性评价单元连接,所述自然语言处理单元用于将所述若干个上层需求和与其对应的若干个下层需求构造成需求语句模型;
提取单元,与所述自然语言处理单元连接,所述提取单元用于提取所述需求语句模型的核心内容;
分析单元,与所述提取单元连接,所述分析单元用于对所述需求语句模型的核心内容分别进行语法分析、语义分析和量词分析,并给出最终的分析结果。
优选的,所述符合性评价单元中若干个上层需求和与其对应的若干个下层需求的一致性为所述若干个上层需求和与其对应的若干个下层需求描述的实体以及实体的行为一致。
优选的,所述需要的核心内容包括所述需求语句的主语、宾语、由主谓宾构成的语法关系及由主语关键词宾语构成的数量关系。
优选的,所述知识图谱模块根据预先定义得两个专有名词之间的关系,对两个所述专有名词进行语义上的补充,用于判定所述若干个上层需求和与其对应的若干个下层需求的需求符合性
优选的,所述检查模块根据所述需求追溯标签与实际的需求文档的结构进行对比,所述检查模块的检查结果用于辅助所述若干个上层需求和其对应的若干个下层需求的需求符合性分析。
优选的,所述代码补全模块包括:
训练单元,使用机器学习模型针对历史需求文档进行训练,根据反馈情况,确定是否需要加入到语义一致性判断工作中;
补全单元,所述补全单元与训练单元连接,所述补全单元用于根据历史需求文档及语义分析自动生成所需要撰写的需求文档。
优选的,所述查看模块用于查看需求之间的依存关系,将需求文档中的需求通过前端以可视化的方式展示,方便对不规范的语法进行修改。
一种电子设备,包括处理器和存储器,所述存储器上存储有计算机程序,所述计算机程序被所述处理器执行时,实现上文所述的需求符合分析方法。
一种可读存储介质,所述可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时,实现上文所述的需求符合分析方法。
与现有技术相比,本发明至少具有以下有益效果之一:
本发明方法对于不同层次间需求符合性进行辅助检查,通过需求查看、需求符合性分析、需求知识图谱和需求追溯关系检查模块提高了需求符合性的准确性;帮助需求分析人员方便快捷地对不同层次间需求符合性进行审阅,提高了需求的准确性和规范性。
附图的简要说明
为了更清楚地说明本发明的技术方案,下面将对描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一个实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图:
图1为本发明一实施例提供的需求符合性分析方法的流程示意图;
图2为本发明一实施例提供的需求符合性分析流程示意图。
实现本发明的最佳方式
以下结合附图1和附图2对本发明提出的一种需求符合性分析方法、系 统、电子设备及存储介质作进一步详细说明。根据下面说明,本发明的优点和特征将更清楚。需要说明的是,附图采用非常简化的形式且均使用非精准的比例,仅用以方便、明晰地辅助说明本发明实施方式的目的。为了使本发明的目的、特征和优点能够更加明显易懂,请参阅附图。须知,本说明书所附图式所绘示的结构、比例、大小等,均仅用以配合说明书所揭示的内容,以供熟悉此技术的人士了解与阅读,并非用以限定本发明实施的限定条件,故不具技术上的实质意义,任何结构的修饰、比例关系的改变或大小的调整,在不影响本发明所能产生的功效及所能达成的目的下,均应仍落在本发明所揭示的技术内容能涵盖的范围内。
鉴于已有需求符合性分析方法存在的不足,为了帮助需求分析人员方便快捷地对不同层次间需求符合性进行审阅,提高了需求的准确性和规范性,本实施例提供了一种基于自然语言处理技术的软件需求符合性分析方法,包括:
步骤S1:获取需要进行分析的需求文档,进行需求查看;
在需求文档中,需求间追溯的主要关系为需求的精化关系,我们称抽象的、含有少量细节的、未被精化的需求为上层需求,称具体的、含有实现细节的、精化的需求为下层需求。在安全攸关领域的软件需求开发过程中,上层需求和下层需求之间描述实体、实体的行为是否一致,对于需求的管理以及软件开发的整体流程有巨大影响。
在用户导入需要进行符合性分析的需求文档之后,需求能够以一种简明直观的方式展示,以便于后续的符合性分析操作。由于每一个excel格式的需求文档可能会包括多个sheet表单,在导入过程中,提供用户选择表单的选项。之后导入的需求文档将会构造出需求结构树,每一条需求将会一个节点的方式展示,且用于展示需求的需求结构树支持快速索引的功能。点击节点显示需求的详细文本内容。除常规的展示需求功能之外,点击需求文本将调用工具中的stanza自然语言分析模块,展示文本的需求语句模型分析结果,需求审查人员可以通过需求语句模型直观了解需求语句的成分,对不规范的语法撰写进行改正。
步骤S2:对所述需求文档中的若干个上层需求和与其对应的若干个下层需求,进行需求符合性分析;
步骤S2.1:建立符合性评价体系,用于检查若干个上层需求和与其对应的若干个下层需求的一致性,若干个上层需求和与其对应的若干个下层需求的一致性为若干个上层需求和与其对应的若干个下层需求描述的实体以及实体的行为一致,需求一致性分析时可以选择进行单条语句的检查和对结构树中所有需求的检查;
步骤S2.2:使用自然语言处理模块分别将若干个上层需求和与其对应的若干个下层需求构造为需求语句模型,所述自然语言处理模块采用stanza自然语言处理模块;
步骤S2.3:由所述需求语句模型提取需求的核心内容,所述需要的核心内容包括所述需求语句的主语、宾语、由主谓宾构成的语法关系及由主语关键词宾语构成的数量关系;
步骤S2.4:通过所述符合性评价体系对需求的核心内容分别进行语法分析、语义分析和量词分析,并给出最终的评价结果。
我们将若干个上层需求和与其对应的若干个下层需求导入到自然语言处理模块中,通过stanza自然语言处理模块先将需求分析构成需求语句模型,之后通过需求语句模型把该条需求对应的主谓宾、关键字以及状语等相关内容逐一填入到我们设计的模型中。随后将上层需求和下层需求对应的模型通过语法分析、语义分析以及量词分析,并把最终的结果通过符合性评估来判断需求的符合性。
步骤S3:引入需求知识图谱,对需求中的专有名词进行语义上的扩充;
需求知识图谱的作用在于定义两个不同的专有名词之间的关系,通过引入需求知识图谱能够在语义层面扩充,而更好地判定上层需求和下层需求的符合性。在引入知识图谱之后,根据用户定义的两者之间的关系,工具能够对其进行语义上的扩充,从而能够使得分析结果更为准确。并且在分析结果中给出分析过程中所使用的知识图谱信息,由人进一步判断这条知识引入的合理性。同时为了更好的使用知识图谱,增加知识图谱的灵活性、可扩展性,可以在需求知识图谱界面中直接修改知识图谱的相关内容,并且将知识图谱已有的知识通过可视化的方式展示出来;
步骤S4:将所述若干个上层需求和与其对应的若干个下层需求的需求追溯标签与实际的所述需求文档的结构进行对比,所述需求追溯关系的检查结 果用于辅助所述若干个上层需求和其对应的若干个下层需求的需求符合性分析。
有效的需求追溯符合性分析方法,是从源头上确保控制系统安全的一种行之有效的手段。我们根据每一条需求语句中的需求文本信息,及其上层需求的需求文本信息,当其中描述的上层需求有误或者缺失时,应当是需求的撰写有误。因此对于导入的需求文档,对其进行需求追溯关系的检查。此外,为了使需求追溯关系的结果更为直观,当文本中缺失结构中的信息时,我们使用红色标明错误;当结构中缺失文本中的信息时,使用蓝色标明提醒。
步骤S5:完成所述需求文档的自动补全工作。
所述完成需求文档的自动补全工作包括:
步骤S5.1:使用机器学习模型针对历史需求文档进行训练,根据用户反馈情况,确定是否需要加入到所述语义分析工作中,机器学习模型为transformer、ngram和gpt-2中的任意一种;
步骤S5.2:用户撰写部分需求后,根据历史需求文档及语义分析自动生成用户所需要撰写的需求文档;
提高了需求工程师开发需求的效率,用于提高用户撰写需求文档效率和测试语义理解的准确性。
一种需求符合性分析系统,用于实现如上述需求符合分析方法,包含:
查看模块,用于将需求文档中的需求以可视化的方式展示;
处理模块,用于将若干个上层需求和若干个下层需求构造成需求语句模型;
知识图谱模块,对需求中的专有名词进行语义上的扩充;
检查模块,用于对需求文档中存在的需求追溯标签进行检查;
代码补全模块,用于根据历史需求文档及语义分析自动生成所需要撰写的需求文档。
所述处理模块包括:
符合性评价单元,用于检查所述若干个上层需求和与其对应的若干个下层需求的一致性;
自然语言处理单元,与符合性评价单元连接,所述自然语言处理单元用于将所述若干个上层需求和与其对应的若干个下层需求构造成需求语句模 型;
提取单元,与所述自然语言处理单元连接,所述提取单元用于提取所述需求语句模型的核心内容;
分析单元,与所述提取单元连接,所述分析单元用于对所述需求语句模型的核心内容分别进行语法分析、语义分析和量词分析,并给出最终的分析结果。
所述符合性评价单元中若干个上层需求和与其对应的若干个下层需求的一致性为所述若干个上层需求和与其对应的若干个下层需求描述的实体以及实体的行为一致。
所述需要的核心内容包括所述需求语句的主语、宾语、由主谓宾构成的语法关系及由主语关键词宾语构成的数量关系。
所述知识图谱模块根据预先定义得两个专有名词之间的关系,对两个所述专有名词进行语义上的补充,用于判定所述若干个上层需求和与其对应的若干个下层需求的需求符合性
所述检查模块根据所述需求追溯标签与实际的需求文档的结构进行对比,所述检查模块的检查结果用于辅助所述若干个上层需求和其对应的若干个下层需求的需求符合性分析。
所述代码补全模块包括:
训练单元,使用机器学习模型针对历史需求文档进行训练,根据反馈情况,确定是否需要加入到语义一致性判断工作中,所述机器学习模型为transformer、ngram和gpt-2中的任意一种;
补全单元,所述补全单元与训练单元连接,所述补全单元用于根据历史需求文档及语义分析自动生成所需要撰写的需求文档。
一种电子设备,包括处理器和存储器,所述存储器上存储有计算机程序,所述计算机程序被所述处理器执行时,实现上文所述的方法。
一种可读存储介质,所述可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时,实现上文所述的方法。
本实施例的一种需求符合性分析方法主要是应用在安全攸关领域的需求开发管理阶段,此方法可以对不同层次间需求符合性进行辅助检查。为了能够提高需求符合性的准确性还进一步结合了需求查看、需求符合性分析、需 求知识图谱、需求追溯关系检查模块。该方法能够帮助需求分析人员方便快捷地对不同层次间需求符合性进行审阅,提高需求的准确性和规范性。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
在本发明的描述中,需要理解的是,术语“中心”、“高度”、“厚度”、“上”、“下”、“竖直”、“水平”、“顶”、“底”、“内”、“外”、“轴向”、“径向”、“周向”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。在本发明的描述中,除非另有说明,“多个”的含义是两个或两个以上。
在本发明的描述中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”、“固定”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或成一体;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。
在本发明中,除非另有明确的规定和限定,第一特征在第二特征之“上”或之“下”可以包括第一和第二特征直接接触,也可以包括第一和第二特征不是直接接触而是通过它们之间的另外的特征接触。而且,第一特征在第二特征“之上”、“上方”和“上面”包括第一特征在第二特征正上方和斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”包括第一特征在第二特征正下方和斜下方,或仅仅表示第一特征水平高度小于第二特征。
尽管本发明的内容已经通过上述优选实施例作了详细介绍,但应当认识到上述的描述不应被认为是对本发明的限制。在本领域技术人员阅读了上述内容后,对于本发明的多种修改和替代都将是显而易见的。因此,本发明的保护范围应由所附的权利要求来限定。

Claims (21)

  1. 一种需求符合性分析方法,其特征在于,包括:
    获取需要进行分析的需求文档,并对所述需求文档进行需求查看;
    对所述需求文档中若干个上层需求和与其对应的若干个下层需求,进行需求符合性分析;
    引入需求知识图谱,对需求中的专有名词进行语义上的扩充;
    进行需求追溯关系的检查;对所述需求文档中存在的需求追溯标签进行检查,用于检查所述需求追溯标签与所述需求文档的实际结构的一致性;
    进行所述需求文档的自动补全工作。
  2. 如权利要求1所述的需求符合性分析方法,其特征在于,所述需求符合性分析包括:
    建立符合性评价体系,用于检查所述若干个上层需求和与其对应的若干个下层需求的一致性;
    使用自然语言处理模块分别将所述若干个上层需求和若干个下层需求构造为需求语句模型;
    由所述需求语句模型提取需求的核心内容;
    通过所述符合性评价体系对需求的核心内容分别进行语法分析、语义分析和量词分析,并给出最终的评价结果。
  3. 如权利要求2所述的需求符合性分析方法,其特征在于,所述若干个上层需求和与其对应的若干个下层需求的一致性为所述若干个上层需求和其对应的若干个下层需求描述的实体以及实体的行为一致。
  4. 如权利要求2所述的需求符合性分析方法,其特征在于,所述自然语言处理模块为stanza自然语言处理模块。
  5. 如权利要求2所述的需求符合性分析方法,其特征在于,所述需求的核心内容包括所述需求语句的主语、宾语、由主谓宾构成的语法关系及由主语关键词宾语构成的数量关系。
  6. 如权利要求1所述的需求符合性分析方法,其特征在于,所述引入需求知识图谱的步骤包括:根据预先定义的两个专有名词之间的关系,对两个 所述专有名词进行语义上的补充,用于判定所述若干个上层需求和与其对应的若干个下层需求的需求符合性。
  7. 如权利要求1所述的需求符合性分析方法,其特征在于,将所述若干个上层需求和与其对应的若干个下层需求的需求追溯标签与所述需求文档的结构进行对比,所述需求追溯关系的检查结果用于辅助所述若干个上层需求和其对应的若干个下层需求的需求符合性分析。
  8. 如权利要求1所述的需求符合性分析方法,其特征在于,所述进行需求文档的自动补全工作的步骤包括:
    使用机器学习模型针对历史需求文档进行训练,根据反馈情况,确定是否需要加入到语义一致性判断工作中;
    撰写部分需求后,根据历史需求文档及语义分析自动生成所需要撰写的需求文档。
  9. 如权利要求8所述的需求符合性分析方法,其特征在于,所述机器学习模型选用transformer、ngram和gpt-2中的任意一种。
  10. 如权利要求1所述的需求符合性分析方法,其特征在于,所述需求查看为需求之间依存关系的查看,获取需求文档后,构造需求依存关系树,通过前端显示的需求依存关系树查看需求的成分,以对不规范的语法撰写进行改正。
  11. 一种需求符合性分析系统,用于实现权利要求1至10任一所述的需求符合分析方法,其特征在于,包含:
    查看模块,用于将需求文档中的需求以可视化的方式展示;
    处理模块,与所述查看模块连接,所述处理模块用于将若干个上层需求和若干个下层需求构造成需求语句模型;
    知识图谱模块,与所述处理模块连接,所述知识图谱模块对需求中的专有名词进行语义上的扩充;
    检查模块,与知识图谱模块连接,所述检查模块用于对需求文档中存在的需求追溯标签进行检查;
    代码补全模块,与所述检查模块连接,所述代码补全模块用于根据历史需求文档及语义分析自动生成所需要撰写的需求文档。
  12. 如权利要求11所述的需求符合性分析系统,其特征在于,所述处理 模块包括:
    符合性评价单元,用于检查所述若干个上层需求和与其对应的若干个下层需求的一致性;
    自然语言处理单元,与符合性评价单元连接,所述自然语言处理单元用于将所述若干个上层需求和与其对应的若干个下层需求构造成需求语句模型;
    提取单元,与所述自然语言处理单元连接,所述提取单元用于提取所述需求语句模型的核心内容;
    分析单元,与所述提取单元连接,所述分析单元用于对所述需求语句模型的核心内容分别进行语法分析、语义分析和量词分析,并给出最终的分析结果。
  13. 如权利要求12所述的需求符合性分析系统,其特征在于,所述符合性评价单元中若干个上层需求和与其对应的若干个下层需求的一致性为所述若干个上层需求和与其对应的若干个下层需求描述的实体以及实体的行为一致。
  14. 如权利要求12所述的需求符合性分析系统,其特征在于,所述需求的核心内容包括所述需求语句的主语、宾语、由主谓宾构成的语法关系及由主语关键词宾语构成的数量关系。
  15. 如权利要求11所述的需求符合性分析系统,其特征在于,所述知识图谱模块根据预先定义的两个专有名词之间的关系,对两个所述专有名词进行语义上的补充,用于判定所述若干个上层需求和与其对应的若干个下层需求的需求符合性。
  16. 如权利要求11所述的需求符合性分析系统,其特征在于,所述检查模块根据所述需求追溯标签与实际的需求文档的结构进行对比,所述检查模块的检查结果用于辅助所述若干个上层需求和其对应的若干个下层需求的需求符合性分析。
  17. 如权利要求11所述的需求符合性分析系统,其特征在于,所述代码补全模块包括:
    训练单元,使用机器学习模型针对历史需求文档进行训练,根据反馈情况,确定是否需要加入到语义一致性判断工作中;
    补全单元,所述补全单元与训练单元连接,所述补全单元用于根据历史需求文档及语义分析自动生成所需要撰写的需求文档。
  18. 如权利要求17所述的需求符合性分析系统,其特征在于,所述机器学习模型选用transformer、ngram和gpt-2中的任意一种。
  19. 如权利要求11所述的需求符合性分析系统,其特征在于,所述查看模块用于查看需求之间的依存关系,将需求文档中的需求通过前端以可视化的方式展示,方便对不规范的语法进行修改。
  20. 一种电子设备,其特征在于,包括处理器和存储器,所述存储器上存储有计算机程序,所述计算机程序被所述处理器执行时,实现权利要求1至10中任一项所述的方法。
  21. 一种可读存储介质,其特征在于,所述可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时,实现权利要求1至10中任一项所述的方法。
PCT/CN2021/119230 2021-07-12 2021-09-18 需求符合性分析方法、系统、电子设备及存储介质 WO2023284108A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21949883.9A EP4184313A1 (en) 2021-07-12 2021-09-18 Demand conformity analysis method and system, and electronic device and storage medium
US18/021,281 US20230297774A1 (en) 2021-07-12 2021-09-18 Demand conformity analysis method and system, and electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110783999.1A CN113467755B (zh) 2021-07-12 2021-07-12 需求符合性分析方法、系统、电子设备及存储介质
CN202110783999.1 2021-07-12

Publications (1)

Publication Number Publication Date
WO2023284108A1 true WO2023284108A1 (zh) 2023-01-19

Family

ID=77879730

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/119230 WO2023284108A1 (zh) 2021-07-12 2021-09-18 需求符合性分析方法、系统、电子设备及存储介质

Country Status (4)

Country Link
US (1) US20230297774A1 (zh)
EP (1) EP4184313A1 (zh)
CN (1) CN113467755B (zh)
WO (1) WO2023284108A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383412A (zh) * 2023-06-05 2023-07-04 中国电子科技集团公司信息科学研究院 基于知识图谱的功能点扩增方法和系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070214189A1 (en) * 2006-03-10 2007-09-13 Motorola, Inc. System and method for consistency checking in documents
CN101334793A (zh) * 2008-08-01 2008-12-31 中国科学院软件研究所 一种自动识别需求依赖关系的方法
CN107741843A (zh) * 2017-10-10 2018-02-27 中国航发控制系统研究所 一种嵌入式软件需求规格说明书的检查方法及检查装置
CN109582576A (zh) * 2018-11-28 2019-04-05 中国航空工业集团公司西安飞行自动控制研究所 一种民机飞控系统需求追踪性的检查方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8266519B2 (en) * 2007-11-27 2012-09-11 Accenture Global Services Limited Document analysis, commenting, and reporting system
CN109918049A (zh) * 2019-01-12 2019-06-21 西北工业大学 基于形式化验证的软件开发模型的验证方法
CN110347798B (zh) * 2019-07-12 2021-06-01 之江实验室 一种基于自然语言生成技术的知识图谱辅助理解系统
CN110597760A (zh) * 2019-09-18 2019-12-20 苏州派维斯信息科技有限公司 用于电子文档合规性判别的智能方法
CN111859969B (zh) * 2020-07-20 2024-05-03 航天科工智慧产业发展有限公司 数据分析方法及装置、电子设备、存储介质
CN112084323B (zh) * 2020-07-31 2024-03-12 中国民用航空上海航空器适航审定中心 一种适航审定协同工作平台及方法
CN112733517B (zh) * 2021-01-12 2022-12-06 上海复佳信息科技有限公司 需求模板符合性检查的方法、电子设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070214189A1 (en) * 2006-03-10 2007-09-13 Motorola, Inc. System and method for consistency checking in documents
CN101334793A (zh) * 2008-08-01 2008-12-31 中国科学院软件研究所 一种自动识别需求依赖关系的方法
CN107741843A (zh) * 2017-10-10 2018-02-27 中国航发控制系统研究所 一种嵌入式软件需求规格说明书的检查方法及检查装置
CN109582576A (zh) * 2018-11-28 2019-04-05 中国航空工业集团公司西安飞行自动控制研究所 一种民机飞控系统需求追踪性的检查方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383412A (zh) * 2023-06-05 2023-07-04 中国电子科技集团公司信息科学研究院 基于知识图谱的功能点扩增方法和系统
CN116383412B (zh) * 2023-06-05 2023-09-15 中国电子科技集团公司信息科学研究院 基于知识图谱的功能点扩增方法和系统

Also Published As

Publication number Publication date
CN113467755B (zh) 2022-07-26
CN113467755A (zh) 2021-10-01
EP4184313A1 (en) 2023-05-24
US20230297774A1 (en) 2023-09-21

Similar Documents

Publication Publication Date Title
CN110347598B (zh) 一种测试脚本生成方法、装置、服务器及存储介质
US8336030B1 (en) System and method for coding standard testing
US7328428B2 (en) System and method for generating data validation rules
Yang et al. Don’t do that! hunting down visual design smells in complex uis against design guidelines
US20100325173A1 (en) Rapid development of informatics systems for collaborative data management
WO2021121158A1 (zh) 公文文件处理方法、装置、计算机设备及存储介质
JP5818706B2 (ja) 仕様書の検査方法、プログラム及びシステム
CN113987199B (zh) 一种规范自动解译的bim智能审图方法、系统和介质
CN105955755A (zh) 一种基于状态图的代码化验证方法
CN110727603A (zh) 一种基于ui自动化测试定位元素的改进方法
US8117537B1 (en) Platform-independent method for computer aided schematic drawings
CN111160843B (zh) 产品数据管理系统中图与文档自检方法
CN115357906A (zh) 面向网络安全等级保护2.0的智能辅助测评方法及系统
Lin et al. Tiqi: A natural language interface for querying software project data
WO2023284108A1 (zh) 需求符合性分析方法、系统、电子设备及存储介质
Yang et al. UIS-hunter: Detecting UI design smells in Android apps
Dakrory et al. Automated ETL testing on the data quality of a data warehouse
González-Lluch et al. A case study on the use of model quality testing tools for the assessment of MCAD models and drawings
CN113064811B (zh) 基于工作流的自动化测试方法、装置以及电子设备
US10127205B2 (en) Methods and computing device for generating markup language to represent a calculation relationship
CN101246473B (zh) 一种分词系统的评测方法和一种分词评测系统
Dautovic et al. Automated quality defect detection in software development documents
Georgiades et al. A novel software tool for supporting and automating the requirements engineering process with the use of natural language
Liu Towards automating the creation of hypermedia service manuals by compiling specifications
Ramesh et al. An extended model driven framework for end-to-end consistent model transformation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21949883

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021949883

Country of ref document: EP

Effective date: 20230215

NENP Non-entry into the national phase

Ref country code: DE