CN115630146A - Method and device for automatically generating demand document based on human-computer interaction and storage medium - Google Patents

Method and device for automatically generating demand document based on human-computer interaction and storage medium Download PDF

Info

Publication number
CN115630146A
CN115630146A CN202211235370.4A CN202211235370A CN115630146A CN 115630146 A CN115630146 A CN 115630146A CN 202211235370 A CN202211235370 A CN 202211235370A CN 115630146 A CN115630146 A CN 115630146A
Authority
CN
China
Prior art keywords
sub
requirement
template
conversation
information
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
CN202211235370.4A
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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202211235370.4A priority Critical patent/CN115630146A/en
Publication of CN115630146A publication Critical patent/CN115630146A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor
    • G06F16/345Summarisation for human users
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • 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/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • 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)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a method, a device and a storage medium for automatically generating a demand document based on human-computer interaction, wherein the method comprises the following steps: s1, constructing a dialogue template corresponding to a software requirement document specification based on a preset standard; s2, asking questions of the user according to the conversation template and collecting feedback information; s3, extracting the demand information in the user message according to the feedback information, and predicting a response action; s4, filling requirement information into the dialogue template in the response action, and constructing a response message according to the requirement information; s5, repeating the steps S2 to S4 until the conversation is stopped after the complete software description is obtained, or ending the conversation when new information cannot be obtained; and S6, generating a thinking map and a software requirement document which meets a preset standard according to the acquired information. According to the invention, a preset requirement acquisition problem is added into the template, and a formatted software requirement document is generated after the conversation is finished, so that the labor and time cost are saved for the requirement acquisition, and the method can be widely applied to the field of document generation.

Description

Method and device for automatically generating demand document based on human-computer interaction and storage medium
Technical Field
The invention relates to the field of document generation, in particular to a method and a device for automatically generating a demand document based on human-computer interaction and a storage medium.
Background
The conversation robot mainly has a chatting type, a question-answering type and a task-oriented type, and the task-oriented type is mainly different from the former two types in that context correlation is emphasized, and each round of conversation has influence on the next conversation. The task-oriented man-machine interaction can be divided into a rule-based, semantic analysis-based and data-driven variety according to the adopted technical types; the rule-based dialog system has a direct implementation method with highly coupled dialog logic and dialog management and a state transition-based method, which are easy to understand and fast to implement, but the definition of the specific rules for various scenes makes the system bulky, and as the number of dialogs and tasks increases, data maintenance and code maintenance become very difficult and the reusability is also poor. Because of the diversity and complexity of languages, a dialog system constructed solely on the basis of logical structures and logical conditions does not meet the actual dialog requirements.
With the development of deep learning, a data-driven task-oriented man-machine interaction system is gradually emphasized, and the dialogue system adopts an end-to-end mode and mainly comprises four major components: natural language understanding, dialogue state tracking, dialogue strategy learning, and natural language generation. Robust dialog systems require the support of large amounts of valid annotation data, with the attendant difficulty of relying on manual annotation efforts, but because of the bias in understanding and lack of industry knowledge, annotation data is often expensive and inefficient. In recent years, most of researches model conversation text sequences, and predict conversations at the next moment by using a sequence model, and due to the lack of conversation data sets, most of researches are limited to catering ordering and flight inquiry systems with small volumes.
Although the related natural language technology and dialog systems have been developed for a long time, there is little feedback on the software engineering work. Even the initial requirement for acquiring software still requires the developer to spend a lot of time to guide the client to perform the software description, which includes the repetitive work of explaining the trade name, fixed flow guidance, etc.
Disclosure of Invention
In order to solve at least one of the technical problems in the prior art to a certain extent, the invention aims to provide a method, a device and a storage medium for automatically generating a demand document based on human-computer interaction.
The technical scheme adopted by the invention is as follows:
a method for automatically generating a demand document based on human-computer interaction comprises the following steps:
s1, constructing a dialogue template corresponding to a software requirement document specification based on a preset standard;
s2, asking questions of the user according to the conversation template and collecting feedback information;
s3, extracting the demand information in the user message according to the feedback information, and predicting a response action;
s4, filling requirement information into the dialogue template in the response action, and constructing a response message according to the requirement information;
s5, repeating the steps S2 to S4 until a complete software description is obtained and then stopping the conversation, or ending the conversation when new information cannot be obtained;
and S6, generating a thinking map and a software requirement document which meets a preset standard according to the acquired information.
Furthermore, the dialogue template consists of different sub-modules, each sub-module is calibrated with a requirement name, a priority, an acquisition state, a default value, a question mode and invalid question times for different requirements, and the set of all sub-modules corresponds to a complete software requirement document;
in each round of conversation, one submodule in a conversation template is obtained for questioning.
Further, the step S2 specifically includes:
scanning the dialogue template to obtain a sub-module with the highest priority, wherein the sub-module is not filled or is filled;
asking questions of the user according to the obtained sub-modules, and collecting feedback information of the user;
wherein the complete conversation task is divided into a plurality of subtasks, and the goal of each subtask is to fill a conversation template submodule.
Further, the step of extracting the demand information in the user message comprises three steps of constructing a demand keyword dictionary, extracting a demand keyword and extracting a message theme;
the step of constructing the requirement keyword dictionary comprises the following steps: extracting high-frequency words from the requirement document, constructing keywords in the software requirement field, constructing keyword categories according to the text characteristics of the software requirement field, and constructing a keyword dictionary according to the keywords and the keyword categories;
the step of extracting the requirement keywords comprises the following steps: extracting keywords from the feedback information according to the prompt of the missing requirement information in the conversation template and the requirement keyword dictionary;
the step of extracting the message subject comprises the following steps: classifying the message topics into different sub-modules of a conversation template, and fusing and extracting the message topics of the user according to the characteristics of the keywords;
and taking the user message theme, the characteristics of the keywords and the characteristics of the sentence text as the input of the predicted response action to obtain the accurate response action for the user message.
Further, the step S4 includes:
and constructing a question type response or a knowledge retrieval type response according to the message theme.
Further, the step of constructing a challenge-type response includes:
scanning the dialogue template, acquiring a sub-module needing to be filled, filling the sub-module with the required information, and updating the information acquisition state of the sub-module;
rescanning the dialogue template, constructing a response text according to the sub-module or the sub-module of the next priority, if the sub-module information is too short or is lost, performing supplementary questioning on the sub-module, and otherwise searching the sub-module of the next priority;
the step of constructing a knowledge retrieval type response comprises the following steps:
and retrieving knowledge requested by a user from a knowledge database of the built software requirement according to the keywords, taking the retrieved data as a response text, and requiring the dialog state to return to the current dialog after the response is built.
Further, the step S4 further includes the steps of:
and setting a query frequency threshold value in the dialog template, judging that the user cannot answer the requirement when detecting that the invalid query frequency reaches the query frequency threshold value, skipping the sub-module by the dialog, and searching the sub-module with the next priority.
Further, the step S5 includes:
defining each sub-module in the dialogue template as a sub-task, and completing one sub-task after a plurality of rounds of dialogue;
for a subtask, if the effective answer can not be obtained for a plurality of times, directly ending and skipping the subtask;
if the scanning of the conversation template is finished and new information cannot be obtained, the whole conversation task is finished;
and if the user requires the conversation to be stopped in the conversation process, ending the whole conversation task.
The other technical scheme adopted by the invention is as follows:
a demand document automatic generation device based on human-computer interaction comprises:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement the method described above.
The other technical scheme adopted by the invention is as follows:
a computer readable storage medium in which a processor executable program is stored, which when executed by a processor is for performing the method as described above.
The invention has the beneficial effects that: according to the invention, a preset demand acquisition problem is added into the template, a question is sent to the user according to the template information and the demand acquisition state in the template, the intention of the user and the demand information in the message are analyzed, and a formatted software demand document is generated after the conversation is finished, so that the labor and time cost are saved for demand acquisition.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description is made on the drawings of the embodiments of the present invention or the related technical solutions in the prior art, and it should be understood that the drawings in the following description are only for convenience and clarity of describing some embodiments in the technical solutions of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of a method for automatically generating a requirement document based on human-computer interaction according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating the definition of dialog states based on a dialog template in an embodiment of the present invention;
fig. 3 is a schematic diagram of a dialog template required to be acquired in an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided only for convenience of illustration, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as the upper, lower, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
Aiming at the problems in the prior art, the invention provides a method for acquiring software requirements and automatically generating a software requirement document based on human-computer interaction. The method comprises the steps of designing a dialogue template acquired according to requirements according to a software requirement document, adding a preset requirement acquisition problem into the template, sending a question to a user according to template information and a requirement acquisition state in the template, guiding the user to express detailed and complete software requirements through context-related multiple rounds of dialogue, analyzing user intentions and requirement information in messages, predicting a response method according to an analysis result and a current dialogue state, filling the requirement information into a target position of the dialogue template in the response method, and updating the acquisition state of the requirement. The dialogue guide can answer the chatting irrelevant to the user context while asking the user, the method also provides analysis in the forms of modeling language and thinking guide graph to help the user to comb the requirement, and a formatted software requirement document is generated when the dialogue is ended, so that the labor and time cost is saved for the requirement acquisition.
As shown in fig. 1, the present embodiment provides a method for automatically generating a requirement document based on human-computer interaction, which includes the following steps:
s101, constructing a dialogue template corresponding to the software requirement document specification based on a preset standard.
In this embodiment, the preset standard is an ISO standard, a dialog template is constructed according to a software requirement standard description made by ISO, a specific requirement name, priority, acquisition state, default value, question mode, and invalid question frequency are calibrated for different requirements in the dialog template, and are stored in a database in a fixed format, and the standard dialog template corresponds to a software requirement document. The complete dialog is a task that is divided into a plurality of subtasks, each of which is a multi-turn dialog, each of which asks a question for a module in the template.
And S102, asking questions to the user according to the conversation template and collecting feedback information.
As an alternative embodiment, the dialog prompt is given by using a mind map, the dialog framework is displayed to the user by using a front-end component in the manner of the mind map, and the dialog logic is converted into a graph for the user to understand conveniently.
And asking a question for a user according to the unobtainable requirement with the highest priority in the conversation template, scanning all the sub-modules in the conversation template, selecting the sub-module with the highest priority in an unfilled or filled state, carrying out man-machine interaction on information surrounding the sub-module, and asking the question for the missing information in the sub-module according to a question style provided by the sub-module. The complete dialog task is divided into a number of subtasks, each of which aims at filling a dialog template submodule.
And S103, extracting the demand information in the user message according to the feedback information, and predicting a response action.
The method comprises the steps of extracting demand information in user information and predicting response actions, wherein the extraction of the demand information is divided into three modules of building a demand keyword dictionary, extracting demand keywords and extracting message topics, and the response actions are predicted according to the extracted demand information. Constructing a demand keyword dictionary, extracting keywords of a high-frequency word construction software demand field from a large amount of demand documents, constructing keyword categories according to text characteristics of the software demand field, and constructing the keyword dictionary by the keywords and the keyword categories; the requirement keyword extracting module extracts keywords from the message according to the requirement vacancy of the conversation template and the requirement keyword dictionary; and the message theme extracting module classifies the message themes into different sub-modules of the conversation template, and extracts the themes of the user messages according to the keyword feature fusion. And taking the user message theme, the keyword characteristics and the sentence text characteristics as the input of the predicted response action to obtain the accurate response action for the user message.
And S104, filling requirement information into the dialogue template in the response action, and constructing a response message according to the requirement information.
And filling the demand information into the conversation template in the response action and constructing a response message according to the conversation template, wherein two construction modes are provided, namely, constructing a question type response according to the message theme and constructing a knowledge retrieval type response. Establishing a question-asking question-answer required scanning dialogue template according to the message theme to acquire a sub-module required to be filled, filling the required information into the sub-module, and updating the information acquisition state of the sub-module; and rescanning the conversation template, constructing a response text from the sub-module or the sub-module with the next priority, if the sub-module information is too short or is still missing, performing supplementary questioning on the sub-module, and otherwise, searching the sub-module with the next priority. The knowledge retrieval type response construction needs to retrieve knowledge requested by a user from a software requirement knowledge database constructed in advance according to keywords, the retrieved data is used as a response text, and after the response is constructed, a conversation state is required to return to the place before the current conversation.
And S105, if the user cannot answer the message for many times, skipping the requirement inquiry.
If the user can not answer the message for many times, skipping the requirement inquiry, setting an inquiry time threshold value for the requirement of the dialog template needing to ask questions, if the effective requirement information is not extracted from the answer of the user, the question belongs to an invalid question, and when the invalid question times reaches the threshold value, considering that the user can not answer the requirement, skipping the module for the dialog, and searching for a next priority sub-module.
And S106, repeating the steps S102 to S105 until the conversation is stopped after the complete software description is obtained, or ending the conversation when new information cannot be obtained.
Defining each sub-module in the conversation template as a sub-task, if a user completes one sub-task after a plurality of conversations, the sub-task is successfully ended, and if the user answers questions repeatedly, the sub-task is directly ended and skipped; and completing each subtask in sequence according to the required priority set in the dialogue template, finishing the whole dialogue task after the dialogue template is scanned, and finishing the dialogue task when a user requires the dialogue to stop in the dialogue process.
And S107, generating a thinking diagram and a software requirement document which accords with a preset standard according to the acquired information.
And generating a software requirement document which accords with the ISO standard from the acquired information, and generating the information collected in the conversation template into a requirement document containing information such as software user roles, constraints, functional requirements, non-functional requirements and the like according to the format of the ISO standard software specification. After the conversation is finished, the result is displayed in detail at the front end in the form of a mind map, so that the conversation process and the conversation content are visualized, and the user can modify and update conveniently.
The above method is explained in detail below with reference to the drawings and the specific embodiments.
As shown in fig. 1, in the present embodiment, a human-computer interaction model in a pipeline manner is constructed, and intention recognition, entity extraction, and policy selection are sequentially implemented in one process, so that information is shared between modules, thereby improving the accuracy of each session. First, in order to enable a user to better understand the operation mode of the embodiment of the present invention, before a conversation, the embodiment of the present invention uses a thinking guide diagram mode to display a synopsis of demand information that needs to interact with the user, and gives a simple prompt to guide the user to put forward the demand of the customized software. The method specifically comprises the following steps:
in the first step, a dialog template is constructed and presented.
A dialogue template is constructed according to the software requirement standard specification made by ISO, and specific requirement names, priorities, acquisition states, default values, question modes and invalid question times are calibrated for different requirements in the dialogue template, as shown in fig. 2. The dialog template is stored in a database in a fixed format, the standard dialog template corresponding to the software requirements document.
The template is scanned before the dialog template is acquired to check the format accuracy and priority accuracy of each sub-module in the dialog template. The scanning template acquires the sub-module content and the sub-module position which need to be concerned by the current task according to the requirement priority and the requirement state, and the filling template fills the updated requirement content and updates the requirement acquisition state according to the sub-module path. The logic of the dialog template is presented in the front end in the style of a mind map.
In the second step, the scan template acquires the highest priority unacquired or acquiring demand.
Traversing the template, selecting the requirement with the highest priority under the same level as the current task, returning the path and the sub-module information of the sub-module, constructing the problem according to the preset problem and the requirement acquisition state in the sub-module, and returning a response message to the user.
And thirdly, extracting the demand information in the user message.
According to the method and the device, specific intentions such as software customization, entity relation description, function description, system user description, query modeling definition, compatibility description, response time description, security description, stability description and the like are given according to the characteristics of the text in the field of software description, and intentions of auxiliary conversation such as confirmation, denial and the like are given. And constructing word vectors for the message text of the user by using a pre-training model of the BERT, generating utterance embedding, inputting output to a full connection layer after passing through a convolutional neural network, and obtaining the predicted user intention by the output of the full connection layer through Softmax. When the user intention is recognized, the embodiment of the invention sets a minimum confidence threshold value, the intention below the threshold value is classified as exceeding the prediction range, and when the user sends irrelevant chats, the embodiment of the invention prompts the user to express again.
According to the application field of the embodiment, a target entity is provided, wherein the target entity comprises a system user, a function name, a software name and the like, and key requirement information and slot values are extracted and obtained by extracting a named entity. And (3) constructing a word vector of the user message by using a BERT pre-training model, taking the word vector as the input of a bidirectional long-short term memory network, predicting the label classification of each word, removing accurate entity labels after constraint of a conditional random field, and filling the obtained slot value into the slot.
As shown in fig. 3, a keyword element table is constructed according to the characteristics of the software requirement field text, keywords such as "crash", "permission", and the like in the user message are extracted, and keyword embedding, utterance embedding, slot value, user intention, and response action of the previous time step are spliced to construct a dialog state feature. The key entity features do not express specific values, and only concern the category of the entity, whether the entity is acquired or not, and the confidence level of the existence of the entity. At the first dialog, the response action at the last time step defaults to an action waiting for a user message. The invention creates a tracker for each user action, records the text, intention and entity information of the user message and the related confidence value, and the tracker transmits the recorded information in the time step.
And fourthly, selecting a response action, filling a template and constructing a complete reply.
The embodiment of the invention puts the conversation state representation into a long-short term memory network to calculate the current historical conversation state, filters out illegal actions after multiplying the conversation state representation by the action mask, and normalizes the actions into probability distribution after passing through a Softmax layer, wherein the result with the maximum probability is the response action. After selecting the correct response action, the template is populated first, and then a detailed, complete reply is constructed. Scanning the template, acquiring the sub-module to be filled, filling the acquired information into the sub-module, updating the state, and if the user information does not have effective required information, increasing the number of invalid questions by one. If the robot relates to the entity in the reply to the user, combining the entity with a designed reply template to generate a complete reply, wherein the reply template is determined according to the information missing from the dialogue template; and if the response action does not need the supplementary information, directly replying to the corresponding reply template.
And step five, sequentially completing the subtasks.
And repeating the second step to the fourth step until the software is completely described and then the conversation is stopped or the conversation is finished when new information cannot be obtained, sequentially finishing each subtask according to the requirement priority set in the conversation template, finishing the subtask by successfully finishing one multi-turn conversation by the user, skipping the subtask when the user asks for a plurality of questions, finishing the whole conversation task when the user requires the conversation to be stopped, and finishing the conversation when the conversation template is scanned and new information cannot be obtained to finish the whole conversation task.
And sixthly, generating a software requirement document.
After the complete conversation is finished, the collected information is used for generating a text-based document in a format of a specified software requirement template, the embodiment of the invention uses the ISO1998 software requirement specification to describe the standard of the document, the document displays necessary information of the customized software and contains related modeling language pictures, and text prompts are given in chapters needing to manually add information. Finally, the embodiment of the invention also provides a mind map, and the dialog is displayed in a visual mode.
The embodiment further provides a device for automatically generating a demand document based on human-computer interaction, which comprises:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement the method of fig. 1.
The device for automatically generating a demand document based on human-computer interaction can execute the method for automatically generating the demand document based on human-computer interaction provided by the embodiment of the method, can execute any combination of implementation steps of the embodiment of the method, and has corresponding functions and beneficial effects of the method.
The embodiment of the application also discloses a computer program product or a computer program, which comprises computer instructions, and the computer instructions are stored in a computer readable storage medium. The computer instructions may be read by a processor of a computer device from a computer-readable storage medium, and executed by the processor to cause the computer device to perform the method illustrated in fig. 1.
The embodiment also provides a storage medium which stores an instruction or a program capable of executing the method for automatically generating the requirement document based on the human-computer interaction, and when the instruction or the program is run, any combination of the method embodiments can be executed, and the method has corresponding functions and beneficial effects.
In alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flow charts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.
Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise indicated to the contrary, one or more of the described functions and/or features may be integrated in a single physical device and/or software module, or one or more functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be understood within the ordinary skill of an engineer, given the nature, function, and internal relationship of the modules. Accordingly, those skilled in the art can, using ordinary skill, practice the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative of and not intended to limit the scope of the invention, which is defined by the appended claims and their full scope of equivalents.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the foregoing description of the specification, reference to the description of "one embodiment/example," "another embodiment/example," or "certain embodiments/examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for automatically generating a demand document based on human-computer interaction is characterized by comprising the following steps:
s1, constructing a dialogue template corresponding to a software requirement document specification based on a preset standard;
s2, asking questions of the user according to the conversation template and collecting feedback information;
s3, extracting the demand information in the user message according to the feedback information, and predicting a response action;
s4, filling requirement information into the dialogue template in the response action, and constructing a response message according to the requirement information;
s5, repeating the steps S2 to S4 until the conversation is stopped after the complete software description is obtained, or ending the conversation when new information cannot be obtained;
and S6, generating a thinking map and a software requirement document which meets a preset standard according to the acquired information.
2. The method for automatically generating the demand document based on the human-computer interaction as claimed in claim 1, wherein the dialogue template is composed of different sub-modules, each sub-module is calibrated with a demand name, a priority, an acquisition state, a default value, a question mode and invalid question times for different demands, and the set of all the sub-modules corresponds to the complete software demand document;
in each round of conversation, one submodule in a conversation template is obtained for questioning.
3. The method for automatically generating a demand document based on human-computer interaction according to claim 2, wherein the step S2 specifically comprises:
scanning the dialogue template to obtain a sub-module with the highest priority, wherein the sub-module is not filled or is filled;
asking questions of the user according to the obtained sub-modules, and collecting feedback information of the user;
wherein the complete dialog task is divided into a plurality of subtasks, each of which is aimed at filling a dialog template submodule.
4. The method for automatically generating the demand document based on the human-computer interaction as claimed in claim 1, wherein the step of extracting the demand information in the user message comprises three steps of constructing a demand keyword dictionary, extracting a demand keyword and extracting a message theme;
the step of constructing the requirement keyword dictionary comprises the following steps: extracting high-frequency words from the requirement document, constructing keywords in the software requirement field, constructing keyword categories according to the text characteristics of the software requirement field, and constructing a keyword dictionary according to the keywords and the keyword categories;
the step of extracting the requirement keywords comprises the following steps: extracting keywords from the feedback information according to the prompt of the missing requirement information in the conversation template and the requirement keyword dictionary;
the step of extracting the message subject comprises the following steps: classifying the message topics into different sub-modules of a conversation template, and fusing and extracting the message topics of the user according to the characteristics of the keywords;
and taking the user message theme, the characteristics of the keywords and the characteristics of the sentence text as the input of the predicted response action to obtain the accurate response action for the user message.
5. The method for automatically generating a requirement document based on human-computer interaction according to claim 4, wherein the step S4 comprises:
and constructing a question type response or a knowledge retrieval type response according to the message theme.
6. The method for automatically generating a requirement document based on human-computer interaction according to claim 5, wherein the step of constructing a question-type response comprises:
scanning the dialogue template, acquiring a sub-module needing to be filled, filling the sub-module with the required information, and updating the information acquisition state of the sub-module;
rescanning the dialogue template, constructing a response text according to the sub-module or the sub-module of the next priority, if the sub-module information is too short, performing supplementary questioning on the sub-module, and if not, searching the sub-module of the next priority;
the step of constructing a knowledge retrieval type response includes:
and retrieving the knowledge requested by the user from a knowledge database of the built software requirement according to the keywords, using the retrieved data as a response text, and requiring the dialog state to return to the front of the current dialog after the response is built.
7. The method for automatically generating the requirement document based on the human-computer interaction as claimed in claim 1, wherein the step S4 further comprises the steps of:
and setting a query frequency threshold value in the dialog template, judging that the user cannot answer the requirement when detecting that the invalid query frequency reaches the query frequency threshold value, skipping the sub-module by the dialog, and searching the sub-module with the next priority.
8. The method for automatically generating the requirement document based on the human-computer interaction as claimed in claim 1, wherein the step S5 comprises:
defining each sub-module in the dialogue template as a sub-task, and completing one sub-task after a plurality of rounds of dialogue;
for a subtask, if the effective answer can not be obtained for a plurality of times, directly ending and skipping the subtask;
if the scanning of the conversation template is finished and new information cannot be obtained, the whole conversation task is finished;
and if the user requires the conversation to be stopped in the conversation process, ending the whole conversation task.
9. A demand document automatic generation device based on human-computer interaction is characterized by comprising:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement the method of any one of claims 1-8.
10. A computer-readable storage medium, in which a program executable by a processor is stored, wherein the program executable by the processor is adapted to perform the method according to any one of claims 1 to 8 when executed by the processor.
CN202211235370.4A 2022-10-10 2022-10-10 Method and device for automatically generating demand document based on human-computer interaction and storage medium Pending CN115630146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211235370.4A CN115630146A (en) 2022-10-10 2022-10-10 Method and device for automatically generating demand document based on human-computer interaction and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211235370.4A CN115630146A (en) 2022-10-10 2022-10-10 Method and device for automatically generating demand document based on human-computer interaction and storage medium

Publications (1)

Publication Number Publication Date
CN115630146A true CN115630146A (en) 2023-01-20

Family

ID=84905370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211235370.4A Pending CN115630146A (en) 2022-10-10 2022-10-10 Method and device for automatically generating demand document based on human-computer interaction and storage medium

Country Status (1)

Country Link
CN (1) CN115630146A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117493530A (en) * 2023-12-27 2024-02-02 苏州元脑智能科技有限公司 Resource demand analysis method, device, electronic equipment and storage medium
CN117611205A (en) * 2023-10-27 2024-02-27 北京七麦科技股份有限公司 Data analysis method and device based on big data and storage medium
CN117725190A (en) * 2024-02-18 2024-03-19 粤港澳大湾区数字经济研究院(福田) Multi-round question-answering method, system, terminal and storage medium based on large language model

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117611205A (en) * 2023-10-27 2024-02-27 北京七麦科技股份有限公司 Data analysis method and device based on big data and storage medium
CN117611205B (en) * 2023-10-27 2024-05-14 北京七麦科技股份有限公司 Data analysis method and device based on big data and storage medium
CN117493530A (en) * 2023-12-27 2024-02-02 苏州元脑智能科技有限公司 Resource demand analysis method, device, electronic equipment and storage medium
CN117493530B (en) * 2023-12-27 2024-03-22 苏州元脑智能科技有限公司 Resource demand analysis method, device, electronic equipment and storage medium
CN117725190A (en) * 2024-02-18 2024-03-19 粤港澳大湾区数字经济研究院(福田) Multi-round question-answering method, system, terminal and storage medium based on large language model
CN117725190B (en) * 2024-02-18 2024-06-04 粤港澳大湾区数字经济研究院(福田) Multi-round question-answering method, system, terminal and storage medium based on large language model

Similar Documents

Publication Publication Date Title
Uc-Cetina et al. Survey on reinforcement learning for language processing
CN111026842B (en) Natural language processing method, natural language processing device and intelligent question-answering system
EP3507709B1 (en) Automating natural language task/dialog authoring by leveraging existing content
US10747651B1 (en) System for optimizing system resources and runtime during a testing procedure
CN115630146A (en) Method and device for automatically generating demand document based on human-computer interaction and storage medium
US7685082B1 (en) System and method for identifying, prioritizing and encapsulating errors in accounting data
EP1672537A2 (en) Data semanticizer
US11281862B2 (en) Significant correlation framework for command translation
López et al. From process models to chatbots
US10977155B1 (en) System for providing autonomous discovery of field or navigation constraints
KR20080107383A (en) Adaptive semantic platform architecture
Sonntag Ontologies and adaptivity in dialogue for question answering
CN114547072A (en) Method, system, equipment and storage medium for converting natural language query into SQL
JP2022020543A (en) Skill term rating method and device, electronic apparatus, and computer readable medium
Zheng et al. BIM-GPT: a prompt-based virtual Assistant framework for BIM information retrieval
Li et al. A new fuzzy ontology development methodology (FODM) proposal
Allen et al. Conversational agents for complex collaborative tasks
CN116186219A (en) Man-machine dialogue interaction method, system and storage medium
CN115905490A (en) Man-machine interaction dialogue method, device and equipment
Zamanirad Superimposition of natural language conversations over software enabled services
WO2022264434A1 (en) Program code automatic generation system
AU2019290658B2 (en) Systems and methods for identifying and linking events in structured proceedings
CN114691820A (en) Question-answering implementation method and device based on knowledge graph
WO2017059500A1 (en) Frameworks and methodologies configured to enable streamlined integration of natural language processing functionality with one or more user interface environments, including assisted learning process
De Vries Reducing ambiguity during enterprise design

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