CN115374764A - Demand model automatic generation method and system based on user story - Google Patents

Demand model automatic generation method and system based on user story Download PDF

Info

Publication number
CN115374764A
CN115374764A CN202210983843.2A CN202210983843A CN115374764A CN 115374764 A CN115374764 A CN 115374764A CN 202210983843 A CN202210983843 A CN 202210983843A CN 115374764 A CN115374764 A CN 115374764A
Authority
CN
China
Prior art keywords
user story
model
file
story
demand model
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210983843.2A
Other languages
Chinese (zh)
Inventor
杨溢龙
黄鹏峰
张莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN202210983843.2A priority Critical patent/CN115374764A/en
Publication of CN115374764A publication Critical patent/CN115374764A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Machine Translation (AREA)

Abstract

The invention provides a method and a system for automatically generating a demand model based on a user story. The method overcomes the defects that the generated demand model is incomplete and cannot be generated by a set of method in the prior art, and realizes the automatic and complete generation of the demand model.

Description

Demand model automatic generation method and system based on user story
Technical Field
The invention relates to the technical field of computers, in particular to a demand model automatic generation method and system based on a user story.
Background
Since the 21 st century, there have been many researchers exploring the generation of models from natural language needs to needs by means of automation or semi-automation. In recent years, with the popularity of agile software development, there have been some researchers beginning to study the automated generation of models from user stories to needs. In research methods, most of researches adopt Natural Language Processing (NLP) combined with technologies such as heuristic algorithm, pattern recognition, domain ontology and the like to recognize Natural Language requirements, and in recent years, with the development of artificial intelligence technology, some researchers try to realize automatic generation from Natural Language requirements to requirement models through a machine learning method.
However, limitations of the prior art include: the generated UML (unified Modeling Language) requirement model is not complete enough. Wherein the use case graph part lacks the relationship between participants and the relationship between use cases, the research of the system sequence diagram is in a blank stage, the generation of the concept class diagram lacks attributes, and the like. In addition, a whole set of demand models cannot be generated by a set of methods. Existing researches usually focus on automatic generation of only a part of contents of a demand model, but cannot generate all contents of the demand model.
Disclosure of Invention
In view of this, the embodiment of the present invention provides an automatic generation method for a demand model based on a user story, so as to solve the technical problem that a complete set of demand model cannot be generated by a set of method because a UML demand model generated in the prior art is not complete enough. The method comprises the following steps:
constructing a meta-model for expanding a user story;
carrying out primary analysis on the initial user story through natural language processing to obtain a primary analysis result;
based on the meta-model of the expanded user story, obtaining an expanded user story file according to the preliminary analysis result;
and analyzing the expanded user story file according to a predefined heuristic rule to obtain a demand model file.
In one embodiment, constructing a meta-model that extends a user story specifically includes:
presetting a field for expanding a user story;
presetting a grammar rule for expanding a user story;
and combining the fields of the expanded user story with the grammar rules of the expanded user story to construct the meta-model of the expanded user story.
Further, the initial user story is preliminarily analyzed through natural language processing, and a preliminary analysis result is obtained, wherein the preliminary analysis result specifically comprises the following steps:
presetting a user story set input template;
disassembling the initial user story according to the structure of the preset user story set input template to obtain a simplified user story;
and carrying out natural language processing on the simplified user story to obtain the initial analysis result.
Further, natural language processing is performed on the simplified user story to obtain the preliminary parsing result, which specifically includes: and performing part-of-speech analysis and dependency grammar analysis on the simplified user story by using Stanford CoreNLP to obtain the preliminary parsing result.
Further, the extended user story file is allowed to be subjected to an editing operation for information augmentation to the extended user story file.
Further, according to a predefined heuristic rule, analyzing the expanded user story file to obtain a demand model file, specifically comprising:
extracting relevant information of a demand model from the expanded user story file;
and generating the demand model file based on the relevant information of the demand model according to the predefined heuristic rule.
Further, the heuristic rule specifically includes: heuristic rules using the graph and heuristic rules using the concept class graph.
Further, the requirement model file comprises a UML use graph, a concept class graph and a system sequence diagram which are visually displayed through RM2 PT.
The embodiment of the invention also provides a system for automatically generating the demand model based on the user story, so as to solve the technical problem that the UML demand model generated in the prior art is not complete enough and cannot be generated into a whole set of demand model by a set of method. The system comprises:
the meta-model building module is used for building an extended user story meta-model;
the initial analysis module is used for carrying out initial analysis on the initial user story through natural language processing to obtain an initial analysis result;
the file generation module is used for obtaining an expanded user story file according to the preliminary analysis result based on the expanded user story meta-model;
and the demand model generation module is used for further analyzing the expanded user story file according to a predefined heuristic rule to obtain a demand model file.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes any one of the automatic generation methods of the demand model based on the user story when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program for executing any one of the above methods for automatically generating a demand model based on a user story is stored.
Compared with the prior art, the embodiment of the specification adopts at least one technical scheme which can achieve the beneficial effects that at least: in the embodiment, the meta model of the expanded user story is constructed, and the initial user story is preliminarily analyzed through natural language processing based on the constructed meta model, so that the expanded user story file is obtained. And further analyzing the expanded user story file according to a predefined heuristic rule, and automatically generating a complete demand model file. The meta-model is used for expanding the user story, missing information is supplemented, and the user story can support more complex requirement expression. The automatic generation of the demand model is realized based on heuristic rules, the integrity of the generated demand model is improved, and the generation efficiency of the demand model is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for automatically generating a demand model based on a user story according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a method for automatically generating a demand model based on a user story according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a meta-model for expanding a user story according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a grammar rule definition for extending a user story according to an embodiment of the present invention;
FIG. 5 is an exemplary diagram of a simplified user story provided in accordance with an embodiment of the present invention;
FIG. 6 is a schematic diagram of a computer device provided by an embodiment of the invention;
fig. 7 is a schematic structural diagram of an automatic demand model generation system based on a user story according to an embodiment of the present invention.
Reference numbers in the figures: the system comprises a memory 602, a processor 604, a system 700, a meta model building module 701, a preliminary parsing module 702, a file generating module 703 and a requirement model generating module 704.
Detailed Description
Embodiments of the present application are described in detail below with reference to the accompanying drawings.
The following description of the embodiments of the present application is provided by way of specific examples, and other advantages and effects of the present application will be readily apparent to those skilled in the art from the disclosure herein. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. The present application is capable of other and different embodiments and its several details are capable of modifications and/or changes in various respects, all without departing from the spirit of the present application. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In an embodiment of the present invention, a method for automatically generating a demand model based on a user story is provided, and as shown in fig. 1, the method includes: step S101: constructing a meta-model for expanding a user story; step S102: carrying out primary analysis on the initial user story through natural language processing to obtain a primary analysis result; step S103: based on the meta-model of the expanded user story, obtaining an expanded user story file according to the preliminary analysis result; step S104: and analyzing the expanded user story file according to a predefined heuristic rule to obtain a demand model file.
In the embodiment, an extended user story meta-model is constructed, and as shown in fig. 2, based on the constructed meta-model, initial analysis is performed on an initial user story through natural language processing, so that an extended user story file is obtained. And then, further analyzing the expanded user story file according to a predefined heuristic rule, and automatically generating a complete demand model file. The meta-model is used for expanding the user story, missing information is supplemented, and the user story can support more complex demand expression. The demand model is automatically generated based on heuristic rules, the integrity of the generated demand model is improved, and the generation efficiency of the demand model is improved.
As can be seen from the flow shown in fig. 1, the first embodiment of the present invention specifically includes the following steps:
step S101: constructing a meta-model for expanding a user story;
in specific implementation, constructing a meta-model for expanding a user story specifically includes:
step S1011: presetting a field for expanding a user story;
step S1012: presetting a grammar rule for expanding a user story;
step S1013: and combining the fields of the expanded user story with the grammar rules of the expanded user story to construct the meta-model of the expanded user story.
Specifically, as shown in fig. 2, the present application proposes a set of automatic generation methods of demand models named US2 RM. In the US2RM automatic generation method, the system can receive input of a user story set and automatically decompose the input user story based on the meta-model. In order to enable a user story to support more complex requirement expressions, the invention provides a meta-Model of the extended user story, wherein the structure of the meta-Model is mainly based on the structures of the user story and a Restricted Use Case Model (RUCM). The above-described RUCM template contains fields that are often encountered in conventional use case templates and specifies the structure of a canonical event stream. The RUCM template includes the following fields:
1) Use Case Name. This field gives the name of the use case, usually starting with a verb.
2) Brief Description. This field summarizes the use cases into a small section, describing the nature of the use case.
3) Precondition. The preconditions of a use case specify the conditions that must be true before the use case can begin.
4) Primary Actor. This field describes the main participant of the use case.
5) Second Actors. This field describes the secondary participants of the use case.
6) Dependency. This field specifies the include and extend relationships of the use case with other use cases.
7) The process of the general ionization. This field specifies the generalization relationships between use cases and other use cases.
8) Basic Flow. This field describes the main successful path that satisfies the interest of the audience, does not include any condition or branch, and consists of a series of steps and postconditions. Each use case has only one basic flow.
9) Alternative Flows. This field describes all other scenarios or branches, including success and failure, and the Alternative Flow always depends on certain conditions.
Further, based on the above RUCM template structure, and considering fields included in the UML usage diagram, the concept class diagram and the system sequence diagram, the application adds extension fields in the user story to include information for performing preliminary parsing on the user story by an automatic generation method US2RM, and based on the information, designs a meta model of the extended user story, where the structure of the meta model is shown in fig. 3. The meta-model defines a specification for parsing the user story, and the specification comprises a field of the preset extended user story and a grammar rule of the preset extended user story. The preset fields for expanding the user story are shown in the following table 1:
TABLE 1
Figure BDA0003801238580000061
Figure BDA0003801238580000071
In order to standardize the file format of the expanded user story and improve the usability and reliability of the expanded user story, the invention defines a set of grammar rules of the expanded user story according to the meta-model, and standardizes the file suffix of the meta-model of the expanded user story as the user. The grammar rules are shown in fig. 4. The grammar rule restriction of the two fields of the basic path and the optional path is strict, so that the writing comparison of the two fields is templatized. On one hand, the very standard template can identify simple and easily-processed data, so that the automatic generation effect is obviously improved, and on the other hand, the too strict template limits the freedom degree of input information and is not enough to support more complex functions. For the alternative path, the user must determine the execution order of the alternative path according to the step field in the basic path. For the optional paths of the condition type, the optional paths can only be inserted after a certain path in the basic paths, and can not be intersected with other optional paths, so that the grammar does not support nesting among the optional paths.
Step S102: carrying out primary analysis on the initial user story through natural language processing to obtain a primary analysis result;
when the method is specifically implemented, the initial user story is preliminarily analyzed through natural language processing, and a preliminary analysis result is obtained, wherein the method specifically comprises the following steps:
step S1021: presetting a user story set input template;
step S1022: disassembling the initial user story according to the structure of the preset user story set input template to obtain a simplified user story;
step S1023: and carrying out natural language processing on the simplified user story to obtain the initial analysis result.
Specifically, as shown in fig. 2, based on the user story parsing specification defined by the meta-model, the Stanford CoreNLP (natural language processing toolkit) is used to perform part-of-speech analysis and dependency grammar analysis on the user story, and the preliminary parsing result is obtained. The input format of the user story set researched by the invention is a plurality of lines of texts, each line is a user story, and the input template of the user story set, namely the template of' As a/an < type of user >, I wash to < volume goal > [ so that so can be played again ]. In order to adapt to the heuristic rule provided by the invention and improve the automatic generation effect of the demand model, the input user story set and the expanded information should follow the following principles:
1) The user story should be made without using complex compound words, preferably not more than two words.
2) A user story describes only one specific function and does not use the conjunction "and" or the like to connect functions.
3) The user Story is written by selecting a proper granularity, so that the granularity is similar to a use case, and each user Story is in the same level instead of being divided into different levels of Epic, feature, story and the like.
4) Entities and attributes defined by entityand reference cannot be subject to duplication.
Further, after the user stories are input, each user story is disassembled according to the template structure, namely the initial user story is disassembled according to the structure of the preset user story set input template, so that the simplified user story, namely the simplefieldStory, is obtained. For example, the "As a/an" part gets role, "I water to" part gets means, "so that" part gets ends, and the three parts combine to form a simplified story simplefieldStory, "< role > water to < means >, [ ends ]". By simplifying the user story set, sentence components which do not contain any information in the original description are reduced, so that the burden of a natural language processing tool Stanford CoreNLP on sentence analysis is relieved, and the analysis efficiency of the user story set is improved. After the initial user story is simplified, the automatic generation method US2RM invokes the Stanford CoreNLP to analyze each simplified user story. The sentence component dependency relationship applied here mainly includes "xcomp" ("complement"), "obj/obl" ("object"), and "compound" (compound word). The user story is mostly a simple sentence structure mainly including a "subject-predicate-object" structure, but some sentences are also a "subject-predicate" structure and lack an object. The natural language processing generally uses the dependency relationship of "nsubj" ("noun subject") to represent the relationship that a predicate verb points to its execution subject, however, the sentence structure of the user story text is often simple, occasionally, the part of word parts are mislabeled, for example, verbs are labeled as nouns, which results in that the "nsubj" relationship cannot be found in a sentence, and thus the key predicate in the sentence cannot be identified. For example, as shown in FIG. 5, FIG. 5 is an example of using the "xcomp" dependency in simplefieldStory. In simplefieldStory, "wan to" is deliberately retained, so the "nsubj" relationship in the sentence is fixed as "wan" pointing to "< role >". At this time, the key predicate is a complement of "wait", and the part of speech is not mistaken for a noun. Thus, looking for an "xcomp" relationship in a sentence whose source is "want," the key predicate in the sentence can be captured. Thus, an operator may be obtained by identifying a subject through an "nsubj" relationship, an action may identify a key predicate verb through an "xcomp" relationship, and an object may be identified through an "obj" or "obl" relationship. If there is an "obl" ("object") component in the sentence, a preposition component can be obtained to supplement the key predicate.
Still further, the pseudo-code specification of the parsing algorithm for the initial user story based on Stanford CoreNLP is as shown in algorithm 1 below:
algorithm 1 user story resolution
Figure BDA0003801238580000091
Figure BDA0003801238580000101
Step S103: obtaining an expanded user story file according to the preliminary analysis result based on the meta-model of the expanded user story;
in specific implementation, the extended user story file is allowed to be edited, and the editing operation is used for performing information augmentation on the extended user story file, namely, the extended user story file can be edited to realize information augmentation.
Specifically, after the initial user story is analyzed based on the Stanford CoreNLP, the expanded user story file is output according to the preliminary analysis result based on the user story analysis specification defined by the meta-model. The extended user story file contains key information of various user stories and is in a format of use, and the file can be edited, the part with inaccurate identification is adjusted, event stream information is supplemented, and an extended user story field is added to supplement the information. The editability of the user story file is expanded, the user story is expanded, missing information is supplemented, the user story can support more complex demand expression, and the integrity of a demand model generated based on the user story file is improved.
Step S104: and analyzing the expanded user story file according to a predefined heuristic rule to obtain a demand model file.
In specific implementation, the requirement model file comprises a UML use case diagram, a concept class diagram and a system sequence diagram which are visually displayed through RM2 PT.
Specifically, after the extended user story file is obtained, the US2RM further analyzes the supplemented event stream information by accepting the input of the use file, and then generates a final demand model file (in a file format of an xmi file) according to the predefined heuristic rules. The RM2PT is a system prototype automatic generation tool and can realize automatic generation from a requirement model to system prototype codes. The requirement model file comprises a UML use case diagram, a concept class diagram and a system sequence diagram. According to the method and the device, the relevant information of the UML demand model, including participants, use cases, classes, incidence relations and the like, is extracted from the expanded user story through the predefined heuristic rules, and the automatic and complete generation of the UML demand model is realized.
In specific implementation, according to a predefined heuristic rule, analyzing the expanded user story file to obtain a demand model file, specifically comprising:
step S1041: extracting relevant information of a demand model from the expanded user story file;
step S1042: and generating the demand model file based on the relevant information of the demand model according to the predefined heuristic rule.
In specific implementation, the heuristic rule includes: heuristic rules using the graph and heuristic rules using the concept class graph.
Specifically, the generation of the UML requirement model requires extracting relevant information from the user story, and the requirement model file includes an example graph. Generating the UML use case diagram requires extracting participants and use cases, establishing the relationship between the use cases and the participants, establishing the association relationship such as inclusion and extension possibly existing between the use cases, and establishing the generalization relationship possibly existing between the participants. After the relevant information is extracted, the automatic generation of the use case diagram is realized based on the heuristic rule of the use case diagram. Wherein, the heuristic rule of the use case diagram is shown in the following table 2:
TABLE 2
Figure BDA0003801238580000111
Figure BDA0003801238580000121
Further, although existing agility projects sometimes use a hierarchical system such as Epic and Story to classify the granularity of user stories, most user Story sets do not contain granularity information. In order to be applicable to a wider user story set, the invention does not relate to the granularity division of the user stories, but is based on the principle that one user story is converted into one use case. In table 2, for example, a specific example of UC5 is that "registered user" and "user" have a generalization relationship from the former to the latter. Based on the heuristic rules of the use case diagram of table 2 above, the pseudo-code of the use case diagram automatic generation algorithm is illustrated as the following algorithm 2:
algorithm 2 usage graph auto-generation
Figure BDA0003801238580000122
Further, the requirements model file includes a system sequence diagram. Generating a UML system sequence diagram requires extracting the participants of the interaction, the messages, the parameters of the messages, and the local logical segments from the user story and specifying the order in which the messages are executed. This information can be extracted from the BasicPath (basic path) and the AlternativePath (alternate path) of the extended user story file (. Use file). Regarding the interactive participants, the message initiator of the system sequence diagram is fixed as the participant of the belonged use case, and the acceptor is fixed as the system service. Therefore, only messages initiated by the participant are screened in the path information for extraction. Regarding the body of the message and the parameter list, both elements are embodied in the path information and can be obtained directly from the extended user story file without natural language processing. Regarding the execution order of the messages and the logical segments, an initial message list is generated by the BasicPath, the order is sorted in ascending order of step, and then the message and the logical segments generated from the AlternativePath confirm the position inserted into the message queue through the attributes of start, end and step. The automatic generation algorithm of the system sequence diagram is shown as the following algorithm 3:
algorithm 3 automatic generation of system sequence diagrams
Figure BDA0003801238580000131
Figure BDA0003801238580000141
Further, the requirements model file includes a conceptual class diagram. Generating the UML concept class diagram requires extracting classes and attributes, establishing association relations between the classes, and establishing relations which may exist in combination, inheritance and the like. An Actor in an expanded user story may be a class, while an Object is a potential class because it may also be a property. The Action embodies the potential association relation between the corresponding classes of the Actor and the Object. Some of these relationships may not be associativity because the Object at one end of the relationship is not eventually a class. In the concept class diagram, classes, attributes and association relations are the most important elements, and other elements such as combination relations, inheritance relations and the like are relatively few. Information of these elements is relatively lacking in the user story, so that only a certain degree of recognition can be performed by a specific keyword. Since the combination relation and the aggregation relation are difficult to be distinguished in the automatic generation process, they are not distinguished in the present invention. The inheritance relationships are similar to the generalization relationships in the use case diagrams. The heuristic rules of the concept class diagram are shown in table 3 below. Applying the heuristic rules in Table 3, the pseudo-code for the concept class diagram auto-generation algorithm is illustrated as shown in the following algorithm 4.
TABLE 3
Figure BDA0003801238580000142
Figure BDA0003801238580000151
Algorithm 4 concept class diagram automatic generation
Figure BDA0003801238580000152
Figure BDA0003801238580000161
Based on the heuristic rules of the use case diagram, the heuristic rules of the concept class diagram and the automatic generation algorithm of the system sequence diagram, the US2RM realizes the automatic generation of the use case diagram, the concept class diagram and the system sequence diagram of the demand model.
In this embodiment, a computer device is provided, as shown in fig. 6, and includes a memory 602, a processor 604, and a computer program stored on the memory 602 and executable on the processor 604, where the processor 604 implements any one of the above-mentioned automatic generation methods of demand models based on user stories when executing the computer program.
In particular, the computer device may be a computer terminal, a server or a similar computing device.
In the present embodiment, there is provided a computer-readable storage medium storing a computer program for executing any one of the above-described methods for automatically generating a demand model based on a user story.
In particular, computer-readable storage media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable storage medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Based on the same inventive concept, the embodiment of the present invention further provides an automatic generation system of demand model based on user story, as described in the following embodiments. Because the principle of solving the problems of the demand model automatic generation system based on the user story is similar to the demand model automatic generation method based on the user story, the implementation of the demand model automatic generation system based on the user story can refer to the implementation of the demand model automatic generation method based on the user story, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
Fig. 7 is a block diagram of an architecture of an automatic demand model generation system 700 based on user stories, according to an embodiment of the present invention, as shown in fig. 7, including: a meta-model building module 701, configured to build a meta-model of an expanded user story; a preliminary parsing module 702, configured to perform preliminary parsing on the initial user story through natural language processing to obtain a preliminary parsing result; the file generation module 703 is configured to obtain an expanded user story file according to the preliminary parsing result based on the expanded user story meta-model; and the demand model generation module 704 is used for further analyzing the expanded user story file according to a predefined heuristic rule to obtain a demand model file. This structure will be explained below.
In one embodiment, the meta-model building module 701 is specifically configured to preset a field for expanding a user story; presetting a grammar rule for expanding a user story; and combining the fields of the expanded user story with the grammar rules of the expanded user story to construct the meta-model of the expanded user story.
In an embodiment, the preliminary parsing module 702 is specifically configured to preset a user story set input template; disassembling the initial user story according to the structure of the preset user story set input template to obtain a simplified user story; and carrying out natural language processing on the simplified user story to obtain the initial analysis result.
In one embodiment, the preliminary parsing module 702 is further configured to obtain the preliminary parsing result by performing part-of-speech analysis and dependency syntax analysis on the simplified user story using Stanford CoreNLP.
In one embodiment, the extended user story file is enabled for editing operations for information augmentation of the extended user story file.
In an embodiment, the requirement model generating module 704 is specifically configured to extract relevant information of a requirement model from the expanded user story file; and generating the demand model file based on the relevant information of the demand model according to the predefined heuristic rule.
In another embodiment, a software is provided, which is used to execute the technical solutions described in the above embodiments and preferred embodiments.
In another embodiment, a storage medium is provided, in which the software is stored, and the storage medium includes but is not limited to: optical disks, floppy disks, hard disks, erasable memory, etc.
The embodiment of the invention realizes the following technical effects: based on the constructed meta-model, the initial user story is preliminarily analyzed through natural language processing to obtain an expanded user story file, the user story is expanded through the meta-model, missing information is supplemented, and the user story can support more complex demand expression. And then, further analyzing the expanded user story file according to a predefined heuristic rule, and automatically generating a complete demand model file. The demand model is automatically generated based on heuristic rules, the integrity of the generated demand model is improved, and the generation efficiency of the demand model is improved.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized in a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that it may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be executed out of order, or separately as individual integrated circuit modules, or multiple modules or steps may be implemented as a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A demand model automatic generation method based on a user story is characterized by comprising the following steps:
constructing a meta-model for expanding a user story;
carrying out primary analysis on the initial user story through natural language processing to obtain a primary analysis result;
based on the meta-model of the expanded user story, obtaining an expanded user story file according to the preliminary analysis result;
and analyzing the expanded user story file according to a predefined heuristic rule to obtain a demand model file.
2. The method for automatically generating a demand model based on a user story according to claim 1, wherein the constructing a meta model for expanding the user story comprises:
presetting a field for expanding a user story;
presetting a grammar rule for expanding a user story;
and combining the fields of the expanded user story with the grammar rules of the expanded user story to construct the meta-model of the expanded user story.
3. The method as claimed in claim 1, wherein the step of performing preliminary parsing on the initial user story through natural language processing to obtain a preliminary parsing result comprises:
presetting a user story set input template;
disassembling the initial user story according to the structure of the preset user story set input template to obtain a simplified user story;
and carrying out natural language processing on the simplified user story to obtain the preliminary analysis result.
4. The method as claimed in claim 3, wherein the performing natural language processing on the simplified user story to obtain the preliminary parsing result comprises:
and performing part-of-speech analysis and dependency grammar analysis on the simplified user story by using Stanford CoreNLP to obtain the preliminary parsing result.
5. A method for automatic generation of a user story based demand model according to any of claims 1 to 4, wherein the extended user story file is enabled for editing operations for information augmentation of the extended user story file.
6. The method as claimed in any one of claims 1 to 4, wherein the parsing the extended user story file according to predefined heuristic rules to obtain the requirement model file comprises:
extracting relevant information of a demand model from the expanded user story file;
and generating the demand model file based on the relevant information of the demand model according to the predefined heuristic rule.
7. The method of claim 6, wherein the heuristic rules comprise: heuristic rules using the graph and heuristic rules using the concept class graph.
8. The method as claimed in claim 5, wherein the requirement model file comprises UML usage graph, concept class graph and system sequence diagram visualized through RM2 PT.
9. A system for automatically generating a demand model based on a user story, comprising:
the meta-model building module is used for building an extended user story meta-model;
the initial analysis module is used for carrying out initial analysis on the initial user story through natural language processing to obtain an initial analysis result;
the file generation module is used for obtaining an expanded user story file according to the preliminary analysis result based on the expanded user story meta-model;
and the demand model generation module is used for further analyzing the expanded user story file according to a predefined heuristic rule to obtain a demand model file.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the method for automatic generation of a demand model based on user stories of any one of claims 1 to 8.
11. A computer-readable storage medium storing a computer program for executing the method for automatically generating a demand model based on user stories according to any one of claims 1 to 8.
CN202210983843.2A 2022-08-17 2022-08-17 Demand model automatic generation method and system based on user story Pending CN115374764A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210983843.2A CN115374764A (en) 2022-08-17 2022-08-17 Demand model automatic generation method and system based on user story

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210983843.2A CN115374764A (en) 2022-08-17 2022-08-17 Demand model automatic generation method and system based on user story

Publications (1)

Publication Number Publication Date
CN115374764A true CN115374764A (en) 2022-11-22

Family

ID=84065254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210983843.2A Pending CN115374764A (en) 2022-08-17 2022-08-17 Demand model automatic generation method and system based on user story

Country Status (1)

Country Link
CN (1) CN115374764A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700678A (en) * 2023-08-04 2023-09-05 广州市海捷计算机科技有限公司 Demand tracking method and device in software development management system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700678A (en) * 2023-08-04 2023-09-05 广州市海捷计算机科技有限公司 Demand tracking method and device in software development management system
CN116700678B (en) * 2023-08-04 2023-12-08 广州市海捷计算机科技有限公司 Demand tracking method and device in software development management system

Similar Documents

Publication Publication Date Title
US11182556B1 (en) Applied artificial intelligence technology for building a knowledge base using natural language processing
US11238232B2 (en) Written-modality prosody subsystem in a natural language understanding (NLU) framework
RU2592396C1 (en) Method and system for machine extraction and interpretation of text information
Ben Abdessalem Karaa et al. Automatic builder of class diagram (ABCD): an application of UML generation from functional requirements
RU2610241C2 (en) Method and system for text synthesis based on information extracted as rdf-graph using templates
US20140156282A1 (en) Method and system for controlling target applications based upon a natural language command string
US10978053B1 (en) System for determining user intent from text
CN109491658A (en) The generation method and device of computer-executable code data
CN101185116A (en) Using strong data types to express speech recognition grammars in software programs
Fliedl et al. Deriving static and dynamic concepts from software requirements using sophisticated tagging
JP2021111327A (en) Method for generating api knowledge graph, system, and non-transitory computer-readable medium
CN114503073A (en) Automatic conversion of program written in procedural programming language into dataflow graph and related systems and methods
CN115374764A (en) Demand model automatic generation method and system based on user story
US20070192083A1 (en) Linguistic structure for data flow diagrams
JP7064680B1 (en) Program code automatic generation system
Ramackers et al. From prose to prototype: synthesising executable UML models from natural language
CN111859929B (en) Data visualization method and device and related equipment thereof
Jarzabek From reuse library experiences to application generation architectures
CN111752967A (en) SQL-based data processing method and device, electronic equipment and storage medium
Osis et al. Using Use Cases for Domain Modeling.
CN116719514B (en) Automatic RPA code generation method and device based on BERT
CN117111902B (en) AI intelligent software development method and device
Yildiz et al. Creating Important Statement Type Comments in Autocomment: Automatic Comment Generation Framework
Saraiva A Conversational Interface for Webpage Code Generation
Aichroth et al. Specifications and Models for Cross-Media Extraction, Metadata Publishing, Querying and Recommendations: Version II

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination