CN110472030A - Man-machine interaction method, device and electronic equipment - Google Patents

Man-machine interaction method, device and electronic equipment Download PDF

Info

Publication number
CN110472030A
CN110472030A CN201910732176.9A CN201910732176A CN110472030A CN 110472030 A CN110472030 A CN 110472030A CN 201910732176 A CN201910732176 A CN 201910732176A CN 110472030 A CN110472030 A CN 110472030A
Authority
CN
China
Prior art keywords
information
node
conversation process
intent
user
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
CN201910732176.9A
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910732176.9A priority Critical patent/CN110472030A/en
Publication of CN110472030A publication Critical patent/CN110472030A/en
Pending legal-status Critical Current

Links

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/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles

Abstract

The present invention provides man-machine interaction method, device and electronic equipments, wherein this method comprises: obtaining the dialog information of user;The dialog information is parsed, the intent information of user is obtained;Intent information is input to the conversation process figure being currently executing;Can judgement continue to execute conversation process figure according to intent information;If it can, the conversation process figure is continued to execute, the corresponding feedback information of output dialog information.Even if there are identical intent informations between multiple management flow charts, the conversation process figure being currently executing also can be preferentially executed by this way, it avoids since there are identical intent informations between multiple management flow charts, lead to the conversation process figure for replacing execution suddenly in dialog procedure, the dialogue that the feedback information thus exported by this way more agrees with user is intended to, to improve user experience.

Description

Man-machine interaction method, device and electronic equipment
Technical field
The present invention relates to human-computer interaction technique fields, more particularly, to a kind of man-machine interaction method, device and electronic equipment.
Background technique
In human-computer dialogue scene, machine needs to comprehensively consider the attribute of the context of dialogue, machine itself, chat user The multiple factors such as attribute, even extraneous information are reasonably replied to user feedback.In the man-machine conversation mode of the relevant technologies, It is identical based on this if there are identical intentions between different dialogue flow chart there are multiple conversation process figures Intention triggering conversation process figure during, triggering conflict can be generated, conversation process figure and write word conversation process for example, writing the poem The intention that figure all has " carrying out a head again " may trigger at random when triggering conversation process figure by the intention and write the poem dialogue Flow chart writes one in word conversation process figure, and it is unrelated with the dialogue of user intention to easily lead to feedback content, to affect Human-computer dialogue experience.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of man-machine interaction method, device and electronic equipment, so that output Feedback information more agree with user dialogue be intended to, improve user experience.
In a first aspect, the embodiment of the invention provides a kind of man-machine interaction method, this method comprises: obtaining the dialogue of user Information;The dialog information is parsed, the intent information of user is obtained;Intent information is input to the conversation process being currently executing Figure;Can judgement continue to execute conversation process figure according to intent information;If it can, continuing to execute the conversation process figure, output should The corresponding feedback information of dialog information.
In preferred embodiments of the present invention, above-mentioned dialog information includes at least one of: user selects life after control At information, user input text information or voice messaging.
In preferred embodiments of the present invention, the above-mentioned parsing dialog information, the step of obtaining the intent information of user, packet It includes: dialog information being parsed by preset natural language processing module, obtains the intent information of user;Wherein, the natural language Processing module includes general submodule and at least one process submodule;All conversation process figures are preserved in the general submodule Corresponding initial trigger is intended to;The intention letter of conversation process figure corresponding with process submodule is preserved in the process submodule Breath.
In preferred embodiments of the present invention, above by the step of preset natural language processing module parsing dialog information Suddenly, comprising: by the corresponding process submodule of the conversation process figure being currently executing, parse dialog information.
In preferred embodiments of the present invention, the intent information of the corresponding conversation process figure of above-mentioned process submodule includes: The executable intent information of the corresponding conversation process figure of process submodule and the corresponding conversation process figure of process submodule can not be held Capable intent information;The step of can judgement continue to execute the conversation process figure according to intent information, comprising: judge the meaning of user Whether figure information is the executable intent information of the conversation process figure;If so, determination can continue to execute pair according to intent information Talk about flow chart;If not, determination cannot continue to execute conversation process figure according to intent information.
In preferred embodiments of the present invention, the above method further include: if cannot be continued to execute according to intent information pair Flow chart is talked about, the initial trigger to match with intent information is searched by general submodule and is intended to;Execute the initial touching found Hair is intended to corresponding conversation process figure, to export the corresponding feedback information of dialog information.
In preferred embodiments of the present invention, above-mentioned parsing dialog information, before the step of obtaining the intent information of user, This method further include: obtain the flow chart mark for the conversation process figure being currently executing;Judge the flow chart identify whether as It is empty;Above-mentioned parsing dialog information, the step of obtaining the intent information of user, comprising: if flow chart mark is not sky, pass through stream The corresponding process submodule of the corresponding conversation process figure of journey map logo parses dialog information, obtains intent information;It is above-mentioned to be intended to The step of information input to conversation process figure being currently executing, comprising: intent information is input to flow chart mark and is corresponded to Conversation process figure.
In preferred embodiments of the present invention, above-mentioned parsing dialog information, the step of obtaining the intent information of user, packet It includes: if flow chart is identified as sky, dialog information being parsed by general submodule, obtains intent information;This method further include: logical It crosses general submodule and searches the initial trigger intention to match with intent information;It is corresponding to execute the initial trigger intention found Conversation process figure, to export the corresponding feedback information of dialog information.
It include triggering node in preferred embodiments of the present invention, in above-mentioned conversation process figure, the triggering node is for touching Hair, which is executed, fills out slot node with what the intent information of user matched;This fills out slot node for obtaining word slot information;Obtain user's After the step of dialog information, this method further include: word slot information is parsed from dialog information;It is above-mentioned to continue to execute conversation process The step of figure, output dialog information corresponding feedback information, comprising: execute the triggering node to match with intent information, pass through Whether the triggering node grammatical term for the character slot information to match is sky or the triggering node whether word slot information is included in and matches Connection is filled out in the information that slot node has been got;The corresponding feedback information of dialog information is exported according to judging result.
In preferred embodiments of the present invention, the above-mentioned step that the corresponding feedback information of dialog information is exported according to judging result Suddenly, comprising: if word slot information is that empty or word slot information is included in the information got, according to the letter got Breath, the corresponding feedback information of output dialog information;If word slot information is not empty, and word slot information is not comprised in and has got Information in, according to the information that word slot information update has been got, it is corresponding anti-that dialog information is exported according to updated information Feedforward information.
It include judging node in above-mentioned conversation process figure in preferred embodiments of the present invention;The judgement node is connected with Multiple subsequent nodes;This method further includes;If execution judges node, judge that conversation process figure has been got in the process of implementation Word slot information and/or status information whether meet preset condition, one in multiple subsequent nodes is executed according to judging result.
It include at least two merge nodes in above-mentioned conversation process figure in preferred embodiments of the present invention;At least two It is connected with each other between merge node;A node at least two merge node is used to connect at least one foreword node, Another node at least two merge node is for connecting at least one subsequent node, to merge section by least two Point is connected to node with subsequent node before making.
Second aspect, the embodiment of the invention provides a kind of human-computer interaction device, which includes: data obtaining module, For obtaining the dialog information of user;It is intended to determining module and obtains the intent information of user for parsing dialog information;Input Module, for intent information to be input to the conversation process figure being currently executing;Can judgment module, according to meaning for judgement Figure information continues to execute conversation process figure;Output module, if for the conversation process figure can be continued to execute according to intent information, Continue to execute conversation process figure, the corresponding feedback information of output dialog information.
The third aspect, the embodiment of the invention provides a kind of electronic equipment, including processor and memory, which is deposited The machine-executable instruction that can be executed by processor is contained, it is above-mentioned man-machine to realize which executes machine-executable instruction Exchange method.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage mediums Matter is stored with computer executable instructions, and for the computer executable instructions when being called and being executed by processor, which can It executes instruction and processor is promoted to realize above-mentioned man-machine interaction method.
The embodiment of the present invention bring it is following the utility model has the advantages that
The present invention provides man-machine interaction method, device and electronic equipments, according to the dialog information of the user got, solution Analysis obtains the intent information of user;Intent information is input to the conversation process figure being currently executing again;And then can judgement Conversation process figure is continued to execute according to intent information;It is corresponded to if it can, continuing to execute the conversation process figure and exporting dialog information Feedback information.Even if there are identical intent informations between multiple management flow charts, it also can preferentially execute work as by this way Before the conversation process figure that is carrying out, avoid due to, there are identical intent information, causing right between multiple management flow charts The conversation process figure that replacement executes suddenly during words, thus the feedback information exported by this way more agrees with pair of user Words are intended to, to improve user experience.
Other feature and advantage of the disclosure will illustrate in the following description, alternatively, Partial Feature and advantage can be with Deduce from specification or unambiguously determine, or by implement the disclosure above-mentioned technology it can be learnt that.
To enable the above objects, features, and advantages of the disclosure to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of man-machine interaction method provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another man-machine interaction method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another man-machine interaction method provided in an embodiment of the present invention;
Fig. 4 be it is provided in an embodiment of the present invention by policy management module to natural language processing module and more conversation process The schematic diagram that figure is scheduled;
Fig. 5 is a kind of schematic diagram of conversation process figure provided in an embodiment of the present invention;
Fig. 6 is the flow chart of another man-machine interaction method provided in an embodiment of the present invention;
Fig. 7 is a kind of schematic diagram comprising the shared conversation process figure for filling out slot node provided in an embodiment of the present invention;
Fig. 8 is a kind of schematic diagram comprising judging the conversation process figure of node provided in an embodiment of the present invention;
Fig. 9 is a kind of schematic diagram of the conversation process figure comprising merge node provided in an embodiment of the present invention;
Figure 10 is the schematic diagram of another conversation process figure provided in an embodiment of the present invention;
Figure 11 is a kind of structural schematic diagram of human-computer interaction device provided in an embodiment of the present invention;
Figure 12 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Technical solution be clearly and completely described, it is clear that described embodiments are some of the embodiments of the present invention, rather than Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall within the protection scope of the present invention.
In the related technology, there are multiple flow charts, there may be identical intentions between flow chart, are easy Cause flow chart to occur triggering conflict in trigger process, influence the Experience Degree of user, be based on this, the embodiment of the present invention provides one Kind man-machine interaction method, device and electronic equipment, which can be applied to mobile phone, tablet computer, computer, robot etc. can In equipment to realize human-computer interaction.
For convenient for understanding the present embodiment, first to a kind of man-machine interaction method disclosed in the embodiment of the present invention into Row is discussed in detail, as shown in Figure 1, this method comprises the following steps:
Step S102 obtains the dialog information of user.
The dialog information can be the text that user inputs in the equipment with human-computer interaction function, voice data or It is the information etc. of the option selection provided according to equipment.The above-mentioned equipment with human-computer interaction function can be mobile phone, plate electricity Whether brain or computer etc., the equipment can have input dialog information by monitoring users in real time.
Step S104 parses above-mentioned dialog information, obtains the intent information of user.
In specific implementation, speech recognition, semantic analysis, command recognition etc. can be carried out to the dialog information that user inputs Mode, to obtain the intent information of user.The intent information is usually the intention of user's input dialogue information;The intention is usual Some dialogue node in some conversation process figure or triggering conversation process figure can be activated.For example, if user, which says, " writes head Poem " parses the dialog information available user and is intended to write the poem;If user inputs " weather of today is how ", solution Analyse the available user of the dialog information be intended to look into weather.
Above-mentioned intent information is input to the conversation process figure being currently executing by step S106.
Take turns usually may be implemented in above-mentioned conversation process figure to talk with more, i.e., carry out back and forth multiple ask between machine and user It answers;When carrying out more wheel dialogue, machine usually requires to comprehensively consider the attribute of the context of dialogue, equipment itself, conversational user Attribute, even extraneous information are reasonably fed back to user, and machine and human simulation person to person are true in this process Session operational scenarios.For some conversation process figure, a part that may only meet user is intended to, thus above-mentioned is currently executing Conversation process figure, the above-mentioned intent information for being potentially based on input continues to execute, final output feedback information, it is also possible to be based on defeated The above-mentioned intent information entered cannot continue to execute, at this point, being then likely difficult to export suitable feedback letter based on the conversation process figure Breath.
Can step S108, judgement continue to execute conversation process figure according to above-mentioned intent information.
Each conversation process figure is corresponding with executable intention, if the executable intention and obtained intent information Unanimously, then the conversation process figure is continued to execute;If the executable intention and obtained intent information are inconsistent, stopping is held The row conversation process figure, and search the conversation process figure that can execute the intent information.For example, it is assumed that pair being currently executing What words flow chart can be performed is intended to look into weather, and obtained intent information is to write the poem, and is judged as that the intention of the two is inconsistent, will stop The conversation process figure that the intention for only executing the conversation process figure, and looking for and obtain in other conversation process figures matches, then The intention is input to corresponding conversation process figure.
Step S110, if it can, above-mentioned conversation process figure is continued to execute, the corresponding feedback information of output dialog information.
The feedback information can be user and be intended to corresponding final reply, for example, user's input " inquiry Pekinese's today day Gas ", the feedback information of output are Pekinese's weather condition;The feedback information be also possible to according to intent information feed back, about The problem of word slot.The word slot typically refers to parameter needed for obtaining the corresponding final reply of intent information.For example, when user inputs Dialog information be the weather of today " inquiry ", what parsing obtained user is intended to look into weather, but knows to look into weather needs The place (being equivalent to predicate slot) of road inquiry, if the intention of current session flow chart and user be intended to it is consistent, output it is anti- Feedforward information is the sentence for inquiring place;When the place of user input query, current session flow chart can export the place Weather condition.
The present invention provides man-machine interaction methods, after parsing obtains intent information in the dialog information of user, first will The intent information is input to the conversation process figure being currently executing;If the dialogue can be continued to execute based on the intent information Flow chart then executes the conversation process figure, and then exports feedback information.Even if there are identical meanings between multiple management flow charts Figure information also can preferentially execute the conversation process figure being currently executing by this way, avoid due to multiple management flow charts Between there are identical intent information, lead to the conversation process figure for replacing execution suddenly in dialog procedure, thus pass through the party The dialogue that the feedback information of formula output more agrees with user is intended to, to improve user experience.
The present embodiment additionally provides another man-machine interaction method, and this method is on the basis of above-described embodiment the method It realizes;The description of this method emphasis parses by the dialog information got and obtains the detailed process of the intent information of user;Such as figure Shown in 2, this method comprises the following steps:
Step S202 obtains the dialog information of user;The dialog information includes at least one of: the user selects control The text information or voice messaging of the information, user input that generate afterwards.
Wherein, control can be button, be also possible to the operational instrument of other forms.It is generated after user selection control Information can be user and be selected according to the content shown in control, and the content that will be selected is as dialog information;For example, " Cha Tianqi " and " writing the poem " are shown in control, user has selected " Cha Tianqi ", and being somebody's turn to do " Cha Tianqi " option is dialog information.
Step S204 parses above-mentioned dialog information by preset natural language processing module, obtains the intention of the user Information.
Wherein, which includes general submodule and at least one process submodule;The general submodule The corresponding initial trigger of all conversation process figures is preserved in block to be intended to;It is preserved in the process submodule and process submodule pair The intent information for the conversation process figure answered.Specifically, which generally includes general submodule and multiple streams Journey submodule;Wherein, each process submodule is corresponding with unique conversation process figure, and can usually save in process submodule There is what can be executed in corresponding conversation process figure to be all intended to information and word slot, other intentions can also be preserved.This other It is intended to can be understood as the intention in addition to the intent information that the corresponding conversation process figure of process submodule can execute, other meanings Figure is equivalent to the negative example of the intent information of corresponding conversation process figure, in other words the inexecutable intention letter of the conversation process figure Breath, by the way that this other intention is arranged, it is ensured that process submodule can identify corresponding conversation process figure intent information it Outer intention.Moreover, the corresponding process submodule of each conversation process figure, it by this way can be by multiple conversation process figures It is isolated, is conducive to that intent information is preferentially input to the conversation process figure being carrying out.
The corresponding initial trigger of all conversation process figures can usually be saved in above-mentioned general submodule to be intended to, the initial touching Hair is intended to usually can be the intent information that activation conversation process figure starts execution;Above-mentioned general submodule can also save all Word slot involved in conversation process figure.It is as described in Table 1 the information of involved preservation in natural language processing module, table 1 In, the corresponding conversation process Fig. 1 of process submodule 1, the corresponding conversation process Fig. 2 of process submodule 2.
Table 1
Based on foregoing description, step S204 can also be accomplished in the following manner: pass through the dialogue stream being currently executing The corresponding process submodule of journey figure parses dialog information.It, can be by current right when currently thering is conversation process figure to be carrying out The user session data that the corresponding process submodule of words flow chart is analyzed and acquired by obtain the intent information of user, and will parsing To intent information be sent in the conversation process figure being currently executing.
Above-mentioned intent information is input to the conversation process figure being currently executing by step S206.
Step S208 judges whether that conversation process figure can be continued to execute according to above-mentioned intent information;If can be according to above-mentioned Intent information continues to execute conversation process figure, executes step S210;If dialogue cannot be continued to execute according to above-mentioned intent information Flow chart executes step S212.
Each conversation process figure is corresponding with executable intention, when the intent information that parsing obtains is not executable meaning When figure, determination cannot execute current session flow chart;If obtained intent information is executable intention, determination can be held Conversation process figure before the trade.
When process submodule parsing dialog information corresponding using currently performed conversation process figure, due to process submodule The intent information of the corresponding conversation process figure of block generally includes the executable intention letter of the corresponding conversation process figure of process submodule Cease the not executable intent information of conversation process figure corresponding with the process submodule, therefore the use that process submodule parses The intent information at family can be executable intent information, be also possible to not executable intent information.
Based on foregoing description, above-mentioned steps S208 can be realized by following step 20-22:
Step 20, whether the intent information for judging user is the executable intent information of conversation process figure;If so, executing Step 21;If it is not, executing step 22.
Step 21, determination can continue to execute conversation process figure according to above-mentioned intent information.
Step 22, determination cannot continue to execute conversation process figure according to above-mentioned intent information.
If the intent information for the user that process submodule parses is executable intent information, it is possible to determine that use The intent information at family is consistent with the intention for the conversation process figure being carrying out, and determination can continue to execute the dialogue stream being carrying out Cheng Tu;If the intent information for the user that process submodule parses be not executable intent information (be equivalent to it is above-mentioned its He is intended to) when, it is possible to determine that the intent information of user and the intention for the conversation process figure being carrying out are inconsistent, and determination cannot be after It is continuous to execute the conversation process figure being carrying out, being quickly converted for conversation process figure may be implemented by this way.For example, currently holding Include in the corresponding process submodule of capable conversation process figure it is specified be intended to " Cha Tianqi ", when user input dialog information The user's parsed for " writing first poem ", the process submodule is intended to other intentions, and other intentions are input to In the conversation process figure being currently executing, but the intention for the conversation process figure being currently executing and other intentions are different It causes, determines and stop executing the flow chart being currently executing.
Step S210 continues to execute above-mentioned conversation process figure, the corresponding feedback information of output dialog information.
Step S212 searches the initial trigger to match with above-mentioned intent information by above-mentioned general submodule and is intended to;It holds Row step S214.
Step S214 executes the initial trigger found and is intended to corresponding conversation process figure, to export the dialog information pair The feedback information answered.
In specific implementation, it is currently executing if cannot be continued to execute according to the intent information for the user being resolved to The intent information of the user is back to the general submodule in natural language processing module, in general submodule by conversation process figure It finds the initial trigger to match with the intent information of the user in block to be intended to, and it is first that the intent information of the user is input to this In the corresponding conversation process figure of the triggering intention that begins, to activate the conversation process figure to export corresponding feedback according to the intention of the user Information.
In aforesaid way, by the dialog information for the user that preset natural language processing module is analyzed and acquired by, obtain The intent information of the user, and the intent information is input to the conversation process figure being currently executing, if can be according to the meaning Figure information continues to execute conversation process figure, then exports the corresponding feedback information of dialog information by the conversation process figure;If no Conversation process figure can be continued to execute according to the intent information, searched by general submodule match with the intent information it is initial Triggering is intended to, and is intended to corresponding conversation process figure by initial trigger and exports corresponding feedback information.Which can be to Avoid talking with stuck or feedback information and phenomenon that feedback that user wants is inconsistent, to improve interactive experience Degree.
The present embodiment additionally provides another man-machine interaction method, and this method is on the basis of above-described embodiment the method It realizes;This method emphasis describes after getting the dialog information of user, obtains the stream for the conversation process being currently executing Journey map logo, to realize the detailed process of human-computer interaction;As shown in figure 3, this method comprises the following steps:
Step S302 obtains the dialog information of user.
Step S304 obtains the flow chart mark for the conversation process figure being currently executing.
Each conversation process figure is corresponding with unique flow chart mark, and flow chart mark can be string number, word Character etc. that is female or having Special Significance.Flow chart mark is generally used to indicate which conversation process figure is carrying out, to know The conversation process figure not being currently executing.
Step S306 judges that above-mentioned flow chart identifies whether as sky;If above-mentioned flow chart is identified as sky, step is executed S308;If above-mentioned flow chart mark is not sky, step S312 is executed.
When flow chart is identified as sky, illustrate currently without the conversation process figure being carrying out, it is understood that be current Dialogue is the first run dialogue in more wheel dialogues;If currently there is the conversation process figure being carrying out, the flow chart got is identified For the corresponding flow chart mark of conversation process figure being currently executing, the intent information being resolved to can be back to and held Capable conversation process figure.
Step S308 parses above-mentioned dialog information by general submodule, obtains intent information;Execute step S310.
Step S310 searches the initial trigger to match with intent information by above-mentioned general submodule and is intended to;Execution is looked into The initial trigger found is intended to corresponding conversation process figure, to export the corresponding feedback information of dialog information;Terminate.
If flow chart is identified as sky, the dialogue of user will be parsed by the general submodule in natural language processing module Information determines the intent information of user.By the initial touching for all conversation process having in the intent information and general submodule Hair is intended to be matched, searching conversation process figure corresponding with the highest initial trigger intention of intent information similarity, and according to The intent information triggers the conversation process figure searched out, which can export corresponding feedback letter according to intent information Breath.
Step S312 passes through the corresponding process submodule parsing dialogue letter of the corresponding conversation process figure of above-mentioned process icon Breath, obtains intent information.
Since flow chart mark has corresponding relationship with conversation process figure, conversation process figure also has corresponding pass with process submodule System, so flow chart mark also has corresponding relationship with process submodule.Therefore, when flow chart mark is not empty, can pass through Flow chart identifies the dialog information that corresponding process submodule parsing obtains, and determines the intent information of user.
Above-mentioned intent information is input to flow chart and identifies corresponding conversation process figure by step S314.
Step S316, flow chart can be continued to execute according to above-mentioned intent information by, which judging whether, identifies corresponding conversation process Figure;If can continue to execute according to above-mentioned intent information, step S318 is executed;If cannot continue to hold according to above-mentioned intent information Row executes step S320.
Step S318 continues to execute above-mentioned conversation process figure, the corresponding feedback information of output dialog information;Terminate.
Step S320 searches the initial trigger to match with above-mentioned intent information by general submodule and is intended to;Execute step Rapid S322.
Step S322 executes the initial trigger found and is intended to corresponding conversation process figure, to export the dialog information pair The feedback information answered.
In specific implementation, people and machine usually require to carry out to take turns dialogue more could export user needed for feedback information, Therefore multiple conversation process figures (being properly termed as multipair words flow chart) and corresponding multiple process submodules are needed.It is logical It often needs to be scheduled natural language processing module and multipair words flow chart by policy management module, as shown in Figure 4.
Firstly, receiving the dialog information of user's input, pair that policy management module will receive by policy management module Words information and last_graph_id parameter send natural language processing module to, wherein last_graph_id parameter is current The flow chart mark for the conversation process figure transmission being carrying out.According to last_graph_id parameter selection natural language processing mould Corresponding submodule in block selects general submodule parsing dialog information, and will solution if last_graph_id parameter is sky The intent information for analysing obtained user is sent to policy management module;The intent information is sent to multipair words by policy management module In flow chart, finds the triggering to match with the intent information and be intended to, and the triggering is activated to be intended to corresponding conversation process figure, hold Row conversation process figure, to export corresponding feedback information.
If last_graph_id parameter is not empty, the corresponding process submodule parsing of selection last_graph_id parameter Dialog information, and the intent information for the user that parsing obtains is sent to policy management module;Policy management module is by the intention Information is sent to the node location being currently executing in the corresponding conversation process figure of last_graph_id parameter.If this is right Words flow chart can execute the intent information, then feedback information is sent to tactical management mould, so that tactical management mould will be fed back Information feeds back to user;If the conversation process figure cannot execute the intent information, feedback information is sky.If the conversation process Figure cannot execute the intent information, it can be understood as the conversation process figure has logged out in the midway of dialogue, at this point, tactical management Module needs to call natural language processing module and multipair words flow chart in order again, and will be unable to the result executed as anti- Feedforward information is sent to user.
If the conversation process figure can execute the intent information and be not carried out the tail node of the conversation process figure, Graph_id parameter and feedback information are input to policy management module by the conversation process figure, at this point, the graph_id parameter is The name for the flow chart being currently executing.If the conversation process figure cannot execute the intent information or the conversation process figure The intent information can be executed and go to the tail node position of the conversation process figure, which also joins graph_id Several and feedback information is input to policy management module, but the graph_id parameter is sky.Finally, policy management module is feedback letter Breath returns to user, and the value of last_graph_id parameter is updated to the corresponding value of graph_id parameter.
In aforesaid way, the flow chart mark for the conversation process figure being currently executing is obtained, and judges the process icon Whether know is empty;If the flow chart is identified as sky, the dialog information being analyzed and acquired by by general submodule, and by general Submodule is searched the initial trigger to match with the intent information being resolved to and is intended to, and executes the initial trigger found and is intended to correspond to Conversation process figure, to export the corresponding feedback information of dialog information;If flow chart mark is not for sky, the meaning that will be resolved to Figure information input to flow chart identifies corresponding conversation process figure, to obtain feedback information by the conversation process figure.Which In different flow charts there are the conflict phenomenon in flow chart trigger process when identical intention, can be effectively avoided, guarantee process Figure operates normally, to promote the Experience Degree of user's human-computer interaction.
The conceptual abstraction of dialogue can be five class nodes by conversation process figure in the related technology: start node, triggering save Point fills out slot node, function node and recovery of node, and a flow chart has and can only have a start node.To configure more than one For the process for taking turns the conversation process figure write the poem, first have to analyze the intention and word slot that this dialogue may relate to, for It may include " the class of poem in take turns the intention write the poem may include " writing first poem ", " come again one head " and " exit and write the poem ", word slot more Type " and " keyword of poem ";Then for intention and word slot editing dialog flow chart;It is finally logical to the conversation process figure editted It crosses test window to engage in the dialogue test, if that there are node connections is illegal, parameter setting is not complete for the conversation process figure, all can not Into testing process.If test is completed, the compiled completion of the logic of conversation process figure.
In specific implementation, word slot can be added according to the corpus being intended to according to following table 2 addition, and according to following Table 3 Corpus;It completes after being intended to add with the corpus of word slot, editing dialog flow chart, as shown in figure 5, triggering node " writing first poem " It is connected with below and fills out slot node, this is filled out, and slot node is available to write the poem required keyword, only gets all keys Word can just write the poem;" carrying out a head again " triggering node similarly needs to fill out slot node to obtain the keyword write the poem, due to existing In method it is different be intended to can not to share it is same fill out slot node, need in addition to have connect one " write the poem and fill out slot 2 ".It is existing based on this Conversation process figure in different inside the same flow chart be intended to that one can not be shared and fill out slot node so that each intention is necessary Slot individually is filled out, user is caused to need to repeat to fill out slot, affects the dialogue experience of user.
Table 2
Table 3
Based on above-mentioned to description of related art, the present embodiment additionally provides another man-machine interaction method, and this method exists It is realized on the basis of above-described embodiment the method;The description of this method emphasis realizes people by filling out slot nodes sharing in words flow chart The detailed process of machine interaction.As shown in fig. 6, this method comprises the following steps:
Step S602 obtains the dialog information of user.
Step S604 parses the intent information of word slot information and user from above-mentioned dialog information;
It include triggering node in conversation process figure, which can be used for triggering intent information phase of the execution with user It is matched to fill out slot node;This fills out slot node for obtaining word slot information.According to different positions of the triggering node in conversation process figure It sets, triggering node plays the role of different;Under normal conditions, the effect for connecting the triggering node of start node can be activation dialogue Flow chart;The effect of triggering node inside conversation process figure can be the dialogue for opening a new round.Wherein, node is triggered Activation is typically only capable to the intent information parsed according to user's dialog information currently entered to judge.It, should for writing the poem The information for triggering node includes the following contents:
type:"trigger_node",
id:"2",
Name: " triggering node ",
Condition:{ category: " intent ", left_value: " intent ", operator: "==", Right_value: " writing the poem " },
next_node:["3"]
In above content, the type of type is string, and the value of the type corresponds to the node in conversation process figure;Id is used for Some node in conversation process figure is uniquely determined, type string cannot have the duplicate section of id in a flow chart Point;Name is used to recognize the function of node, can arbitrarily be named, type string;Next_node is used to indicate present node Descendant node, type list, the value in list are the id of each descendant node respectively.The corresponding node of type in above content For " trigger_node ", triggering node is indicated, the id for triggering node is 2;Condition indicates trigger condition.It should Condition only includes a Rule of judgment about " intention ", content include " category ", " left_value ", " operator " and " right_value " four fields;Wherein the content provided of first three field immobilizes, namely The value of " category " and " left_value " are all fixed as " intent ";The value of " operator " is fixed as "==";4th A key-value pair describes specifically intended value.When triggering node receive when being intended to the value that the 4th value is filled out, triggering save Point can just be triggered.
Step S606, by above-mentioned intent information and word slot information input to the conversation process figure being currently executing.
Can step S608, judgement continue to execute conversation process figure according to intent information.
Step S610 passes through the triggering section to match if it can, executing the triggering node to match with above-mentioned intent information Point grammatical term for the character slot information whether be empty or word slot information whether be included in connect with the triggering node to match fill out slot node In the information got.
Above-mentioned slot node of filling out is commonly used in obtaining the call parameter (being equivalent to predicate slot information) in dialog information, when scarce When few necessary word slot information, the confirmative question in relation to the word slot information can be proposed to user.For looking into weather, the word slot section The information of point includes the following contents:
type:"slot_node",
id:"11",
Name: " filling out slot node ",
Slot:[{ name: " date ", response:[" could you tell me and want to look into weather when ", " give me the date ."], required:True }, does { name: " city ", response:[", which could you tell me, want to look into weather where "], required:True}],
next_node:["12"]
The code name of slot node is filled out in above-mentioned slot_node expression, and the type of above-mentioned slot can be list, each element in the inside It is all the dictionary comprising " name ", " response " and " required " three key-value pairs, for describing the condition for filling out slot; Wherein, the value of " name " is the name of word slot, and the type of the value of " response " is list, and each element in the inside is one anti- Question art indicates to ask in reply art if user when inquiry word slot information, can select a words art return at random in dialog procedure, The value of " required " can only alternative: True or False, True indicate that the word slot is that must fill out slot, if the word slot is sky Then asked in reply;False indicate the slot be it is non-must fill out slot, without rhetorical question when missing, if that selection is False, The value of " response " can be sky.Based on above content, filling out slot node can be with for the confirmative question on word slot " date " are as follows: " asks Ask that you want to look into weather when " or " to my on date.";Slot node, which is filled out, for the confirmative question in word slot " city " to be " could you tell me and want to look into weather where ".
When executing the triggering node to match with intent information, can be believed by the triggering node grammatical term for the character slot to match Whether breath is filled out in the information that slot node has been got included in what is connect with the triggering node to match, that is to say to realize and fills out slot Information is shared in node.In specific implementation, intent information is decoupled with the word slot information for filling out slot node, moreover, current Before conversation process figure does not exit, the word slot information for filling out slot node is not emptied, to realize slot value information in multiple triggering nodes Between share, reduce the trouble that slot is filled out in repetition.Meanwhile configuration fill out slot node when can with unrestricted choice oneself define or The word slot information that person's system provides, such as " time ", " city ", " number " this kind of common noun, to reduce user again The trouble of the corpus of predicate slot in secondary offer.
Step S612 exports the corresponding feedback information of dialog information according to judging result.
If above-mentioned slot information is that empty or word slot information is included in the information got, according to what is got Information, the corresponding feedback information of output dialog information;If word slot information is not empty, and word slot information is not comprised in and has obtained To information in, according to the information that word slot information update has been got, it is corresponding that dialog information is exported according to updated information Feedback information.Wherein, the process of the information got according to word slot information update are as follows: the word slot information for obtaining parsing is inserted The corresponding corresponding position for filling out slot node of the information got.
It can realize that different intentions are shared by the shared slot position filled out in slot node in a conversation process figure and fill out slot section The word slot information of point.It is illustrated in figure 7 the schematic diagram comprising the shared conversation process figure for filling out slot node;In Fig. 7, node 1 is triggered It can connect with triggering node 2 to same and fill out slot node;When conversation process is executed to recovery of node 1, if one under user The dialog information of wheel input triggers triggering node 2, and there is no new word slot information according to the dialog information, then the touching Hair node 2, which can continue to continue to use, fills out the word slot information that slot node is inserted in last round of dialogue, and is carried out according to the word slot information It replys.If the dialog information of user's next round input triggers triggering node 2 and can be obtained according to the dialog information new Word slot information fills out new word slot information in slot node, and is replied according to new word slot information.Which can be kept away Exempt from cross-question user, improves the dialogue Experience Degree of user.
In aforesaid way, the intent information of word slot information and user is parsed from the user session information got;Again will Can intent information and word slot information input judge continue to hold according to intent information to the conversation process figure being currently executing The row conversation process figure.If it can, the triggering node to match with intent information is executed, and whether grammatical term for the character slot information is sky, Or whether word slot information is included in filling out in the information that slot node has been got of connecting with the triggering node to match, last root It is judged that the corresponding feedback information of result output dialog information.The shared of word slot information is realized in which, to simplify Conversation process figure, while repeating to fill out slot without user, improve user session experience.
Above-mentioned conversation process figure further includes judging node in addition to including five classes node in the prior art, the judgement node It is connected with multiple subsequent nodes;If executing the judgement node, the word that conversation process figure has been got in the process of implementation is judged Whether slot information and/or status information meet preset condition, and one in multiple subsequent nodes is executed according to judging result.
Above-mentioned judgement node usually can be after opening conversation process figure, according to the word slot information or shape in dialog procedure State information is judged, determines whether current word slot information or status information meet preset condition, is executed if meeting The subsequent node of the judgement node, and according to the preset condition of satisfaction, it determines and executes which of subsequent node.The judgement section The effect of point is usually similar with triggering node, but the judgement node is unable to user and opens new dialogue, can not believe intention Breath is judged.The information of the judgement node includes the following contents:
type:"judge_node",
id:"3",
Name: " judging node ",
Condition:[[condition 1, condition 2], [condition 3, condition 4]],
next_node:["4"]
Above-mentioned judge_node indicates to judge that the code name of node, above-mentioned condition can be for comprising multiple subconditional The format of the double-deck list, each condition is similar with triggering node, such as { category: " entity ", left_value: " poem People ", operator: " isNotNull ", right_value:null } or category: " state ", left_value: " Robot_profile.age ", operator: "==", right_value:10 }.Above-mentioned each subconditional " category " It is only " entity " (being equivalent to word slot information) and " state " (being equivalent to status information) two class, wherein " entity " is corresponding " left_value " can be the name of the word slot defined in arbitrary procedure figure, " state " corresponding " left_value " It can the information for the customized machine of user or the status information in other dialog procedures.It is above-mentioned each subconditional " operator " supports two major classes operation: two single operations symbol " isNull ", " isNotNull " and eight kinds of dual operations symbols "= =", "!=", ">", "<", ">=", "≤", " contains ", " notContains ";Wherein single operation symbol is corresponding The value of " right_value " can be omitted.
The relationship that the inner layer list (such as [condition 1, condition 2]) of the double-deck list of above-mentioned condition is internal is " AND ", Only all sub- conditions all meet, and are somebody's turn to do " AND " condition group and just set up.Multiple " AND " condition groups are made up of " OR " logical relation " OR " condition group (corresponding outer layers list), sets up simply by the presence of " AND " condition group, then entire " OR " condition group is set up, I.e. the judgement node is activated;If all " AND " condition groups are all invalid, which is not activated.
The layering arbitration functions of conversation process figure may be implemented by above-mentioned judgement node, so that conversation process figure not cocurrent flow The logic of journey branch is clearer, while being conducive to editing dialog flow chart.It is illustrated in figure 8 the dialogue stream comprising judging node The schematic diagram of journey figure;As shown in Figure 8, when the dialog information of user's input can be with activation trigger node 2, which can To determine that dialogue enters corresponding stream according to the Rule of judgment (being equivalent to above-mentioned preset condition) for judging node 3 He judging node 4 Journey branch.If dialogue enters the flow chart branches judged where node 3, conversation process figure will do it next layer of judgement, Judge node 5 or enter to judge node 6 even if judgement enters, the return information that will finally meet the branch of Rule of judgment carries out Feedback.The logic that can clearly find out very much judgement in conversation process figure by the way of this layering judgement, facilitates volume Dialogue is collected, while part therein can also being judged to, branch is used for other conversation process figures, improves conversation process figure point The reusability of branch.
The subsequent several points of above-mentioned judgement node can be one or more triggering node, can be a recovery of node, It can be one and fill out slot node, be also possible to a function node.
It include at least two merge nodes in above-mentioned conversation process figure;It is connected with each other between at least two merge nodes;Extremely A node in few two merge nodes is for connecting at least one foreword node, another at least two merge nodes Node is for connecting at least one subsequent node, be connected to node with subsequent node before making by least two merge nodes.
The node for needing Hui Lian can be connected to upper layer section when conversation process figure generates back even situation by the merge node In point, with the Hui Lian of implementation process, so as to simplify the line in conversation process figure.The information of the merge node includes following Content:
type:"combine_node",
id:"10",
Name: " merge node ",
next_node:["4","14"]
Above-mentioned combine_node indicates that the code name of merge node, next_node indicate that the id of the subsequent node of connection (is closed And node can connect one or more subsequent node).It is illustrated in figure 9 the signal of the conversation process figure comprising merge node Figure;As shown in Figure 9, since the presence of merge node makes recovery of node 3, recovery of node 4, recovery of node 5 without being connected to respectively Trigger node 2, triggering node 3, triggering node 4, triggering node 5, only need to link to two merge nodes, be then combined with node it Between interconnection the editor of complex dialogs flow chart can be completed.It follows that conversation process figure point can be simplified using merge node The process of branch editor.
Based on foregoing description, it is start node respectively that conversation process figure provided in this embodiment, which may include seven class nodes, (start_node), node (trigger_node) is triggered, judges node (judge_node), merge node (combine_ Node), fill out slot node (slot_node), recovery of node (response_node), function node (function_node).Its In, triggering node judges node, merge node and fills out in information content above-described embodiment of slot node by the agency of mistake, herein It is not repeated.The content of the information of start node, recovery of node and function node is introduced separately below.Firstly, initial The information of node includes following the description:
type:"start_node",
id:"1",
Name: " start node ",
next_node:["2","9"]
The start node is usually the entrance of flow chart, meanwhile, have in a flow chart and only one start node.Under Face is the content that the information of recovery of node includes:
type:"response_node",
id:"22",
Name: " recovery of node ",
text:["${output.response}"],
next_node:[]
Recovery of node can produce the feedback information for feeding back to user.In above content, the type of text is list, the inside Each element be a reply, can return to one at random from list after entering recovery of node and reply to user.Its In, it can use the variate-value got in dialog procedure to the reply of user, and uniformly described with " $ { } " format, braces In fill in the name of variable, the format can be replaced with variable in feedback procedure and be specifically worth.Here is the letter of function node The content that breath includes:
type:"function_node",
id:"30",
Name: " function node ",
Function:{ type: " api ", url: " http: // 0.0.0.0:5001/weather ", when parameters:{ Between: " $ { time } ", city: " $ { city } " }, code_path:},
next_node:["31"]
Function node is commonly used in the certain complicated calculating process that conversation process figure can not be used to describe of processing;Function node The mode for generalling use access interface or custom function calls required function.In above content, the type of function For dict, wherein the value of type field can only alternative: " api " or " code ";When type is " api ", indicate that access connects Mouthful, need to provide " url " and " parameters ", wherein " url " is the access address of api interface, " parameters " is inner It needs to fill in and accesses some key-value pairs that the address must be filled out.When type is " code ", indicate to need to realize by writing code Certain function, the field that must be filled out at this time are " code_path ", fill out the path of code.
Each node of above-mentioned conversation process figure can connect subsequent node, and the subsequent node that each node is connect Difference, table 4 give an example (not as the restriction to the present embodiment) for the rule of line between node, only meet this Line rule, conversation process figure could operate normally.
Table 4
Based on foregoing description, by taking the two conversation process figures for writing the poem and looking into weather as an example, interactive specific mistake is described Journey, as shown in Figure 10 for for the conversation process figure for writing the poem and looking into weather editor.To realize the dialogue stream for writing the poem and looking into weather Journey, it is necessary first to editing dialog flow chart, and word slot information and intent information are inserted into natural language for the conversation process figure In the correspondence submodule of processing module, as shown in table 5.
Table 5
It is intended to containing there are three in the above-mentioned conversation process figure (id 1) write the poem, corresponds to process submodule 1, Cha Tianqi's Conversation process figure (id 2) corresponds to process submodule 2 containing an intention.General submodule can be 1 He of process submodule The initial trigger of start node of ining succession in process submodule 2 is intended to be combined the module of composition.
The information for filling out slot node in the above-mentioned conversation process figure write the poem can be set to " [name: " keyword of poem ", Response:[" could you tell me the poem for wanting to write what theme ", " to my theme "], required:True }, { name: " poem Type ", response:[", which could you tell me, wants to write what kind of poem ", " to my type "], required: False}]".Look into filled out in the conversation process figure of weather slot node information can be set to " [name: " city ", response: [" could you tell me and want to look into weather where "], required:True }, { name: " time ", response:[" could you tell me and want which is looked into It weather "], required:True }] ".Meanwhile providing corpus to the intentional and word slot in table 5 and editing, with Complete the editor of natural language processing module.
Based on above-mentioned two editted conversation process figure and provide corpus and trained natural language processing mould Block, can engage in the dialogue functional test, below to drop by the wayside from writing the poem conversation process figure, into looking into weather conversation process figure For, entire conversation process can be talked with by following four-wheels to be realized:
First round dialogue.User inputs " writing first poem ", policy management module by " last_graph_id=None " and The dialog information of user's input is transmitted to natural language processing module;Natural language processing module should using the parsing of general submodule Dialog information, parsing result are " be intended to=write the poem ", and parsing result is sent to two by policy management module by general submodule A conversation process figure.Due to parsing obtained intention and the entry condition for writing the poem conversation process figure matching, therefore activation writes the poem dialogue Flow chart then executes and fills out slot node, detects that " keyword of poem " is not filled out, thus ask in reply " to my theme ", simultaneously " graph_id=1 " is fed back to policy management module.Policy management module updates " last_graph_id=1 ", and handle " is given My theme " feed back to user.
Second wheel dialogue.User input " poem about spring ", policy management module by " last_graph_id=1 " with And the dialog information of user's input is transmitted to natural language processing module;Natural language processing module is solved using process submodule 1 The dialog information is analysed, parsing result is " be intended to=write the poem, keyword=spring of poem ", and process submodule 1 passes through tactical management Module, which is sent to parsing result, writes the poem conversation process figure, writes the poem the node before conversation process figure continues to execute, if it find that Slot has filled up, and calls API and the result write the poem is fed back to policy management module by recovery of node, at this time " graph_id =1, last_graph_id=1 ".
Third round dialogue.User inputs " Cha Tianqi ", and policy management module is by " last_graph_id=1 " and user The dialog information of input is transmitted to natural language processing module.This is right using the parsing of process submodule 1 for natural language processing module Information is talked about, parsing result is " being intended to=other intentions ", and result is transmitted to and writes the poem conversation process figure;Write the poem the continuation of conversation process figure The node for executing last time will jump out if it find that can not handle to policy management module, at this point, " graph_id=None, Last_graph_id=None ", return information are sky.Therefore it needs to call natural language processing module again, at this time using logical " intention=Cha Tianqi " is obtained with submodule parsing " Cha Tianqi ";General submodule sends out parsing result by policy management module It send to weather conversation process figure is looked into, weather conversation process figure is looked into activation, and is executed and filled out slot node, if it find that word slot " city " is not It fills out, rhetorical question " could you tell me and want to look into weather where " and " graph_id=2 " is returned into policy management module.Tactical management mould Block updates " last_graph_id=1 " and result is fed back to user.
Fourth round dialogue.User inputs " Hangzhou ", and next conversation process is similar with above-mentioned second wheel dialogue, herein not It is described in detail again.
In aforesaid way, conversation process figure may include seven nodes, by judging that conversation process may be implemented in node Layering judgement, is more clear the logic of flow chart;The branch of complex dialogs flow chart can be simplified by merge node;Together When, natural language processing module and multiple conversation process figures are managed by policy management module, realize multipaths figure The purpose of more wheel dialogue managements, to improve the Experience Degree of user's human-computer interaction.
Corresponding to above method embodiment, the embodiment of the invention provides a kind of human-computer interaction devices, as shown in figure 11, should Device includes:
Data obtaining module 110, for obtaining the dialog information of user;
It is intended to determining module 111 and obtains the intent information of user for parsing above-mentioned dialog information;
Input module 112, for above-mentioned intent information to be input to the conversation process figure being currently executing;
Can judgment module 113 continue to execute above-mentioned conversation process figure for judging according to above-mentioned intent information;
Output module 114, if continuing to execute above-mentioned dialogue for conversation process figure can be continued to execute according to intent information Flow chart, the corresponding feedback information of output dialog information.
A kind of human-computer interaction device provided in an embodiment of the present invention is parsed according to the dialog information of the user got To the intent information of user;Intent information is input to the conversation process figure being currently executing again;And then can judgement basis Intent information continues to execute conversation process figure;If it can, continuing to execute the conversation process figure and to export dialog information corresponding anti- Feedforward information.Even if there are identical intent informations between multiple management flow charts, also can preferentially execute by this way currently just In the conversation process figure of execution, avoid due to, there are identical intent information, causing talking between multiple management flow charts The conversation process figure of execution is replaced in journey suddenly, thus the feedback information exported by this way more agrees with the dialogue meaning of user Figure, to improve user experience.
In some embodiments, above-mentioned dialog information includes at least one of: user select control after generate information, The text information or voice messaging of user's input.
In some embodiments, above-mentioned intention determining module 111, is used for: passing through preset natural language processing module solution Dialog information is analysed, the intent information of user is obtained;Wherein, which includes general submodule and at least one Process submodule;The corresponding initial trigger of all conversation process figures is preserved in the general submodule to be intended to;The process submodule In preserve the intent information of conversation process figure corresponding with process submodule.
In some embodiments, above-mentioned intention determining module 111, is used for: passing through the conversation process figure being currently executing Corresponding process submodule parses dialog information.
In some embodiments, the intent information of the corresponding conversation process figure of above-mentioned process submodule includes: process submodule The corresponding conversation process figure of block executable intent information and the corresponding not executable intention of conversation process figure of process submodule Information;Judgment module 113, for judging whether the intent information of user is the executable intent information of conversation process figure;If It is that determination can continue to execute conversation process figure according to intent information;If not, determination cannot continue to execute pair according to intent information Talk about flow chart.
In some embodiments, above-mentioned apparatus further include: be intended to searching module, if for cannot according to intent information after It is continuous to execute conversation process figure, the initial trigger to match with intent information is searched by general submodule and is intended to;Flow chart executes Module is intended to corresponding conversation process figure for executing the initial trigger found, to export the corresponding feedback letter of dialog information Breath.
In some embodiments, above-mentioned apparatus further include: flow chart identifier acquisition module is currently executing for obtaining Conversation process figure flow chart mark;Decision flow chart identifies whether as sky;It is intended to determining module 111, is used for: if process Map logo be not it is empty, the corresponding process submodule of corresponding conversation process figure is identified by flow chart and parses dialog information, is obtained Intent information;Input module 112 identifies corresponding conversation process figure for intent information to be input to flow chart.
In some embodiments, above-mentioned intention determining module 111, is used for: if flow chart is identified as sky, passing through general son Module parses dialog information, obtains intent information;The initial trigger to match with intent information is searched by general submodule to anticipate Figure;It executes the initial trigger found and is intended to corresponding conversation process figure, to export the corresponding feedback information of dialog information.
In some embodiments, in above-mentioned conversation process figure include triggering node, the triggering node for trigger execute with What the intent information of user matched fills out slot node;This fills out slot node for obtaining word slot information;Above-mentioned apparatus further include: word slot Information analysis module, for parsing word slot information from dialog information;Output module 114, for executing and the intent information phase Matched triggering node, by the triggering node grammatical term for the character slot information that matches whether be empty or word slot information whether include It is filled out in the information that slot node has been got what is connect with the triggering node to match;Dialog information pair is exported according to judging result The feedback information answered.
In some embodiments, above-mentioned output module 114, if being that empty or word slot information includes for word slot information In the information got, according to the information got, the corresponding feedback information of dialog information is exported;If word slot information It is not sky, and word slot information is not comprised in the information got, according to the information that word slot information update has been got, root According to the corresponding feedback information of updated information output dialog information.
It in some embodiments, include judging node in above-mentioned conversation process figure;The judgement node is connected with multiple subsequent Node;The device further includes;Signal judgement module judges conversation process figure in implementation procedure if judging node for executing In the word slot information that has got and/or status information whether meet preset condition, multiple subsequent sections are executed according to judging result One in point.
It in some embodiments, include at least two merge nodes in above-mentioned conversation process figure;At least two merging section It is connected with each other between point;A node at least two merge node is for connecting at least one foreword node, this is at least Another node in two merge nodes is for connecting at least one subsequent node, to make by least two merge nodes Forward direction node is connected to subsequent node.
Human-computer interaction device provided in an embodiment of the present invention has identical with man-machine interaction method provided by the above embodiment Technical characteristic reach identical technical effect so also can solve identical technical problem.
The embodiment of the invention also provides a kind of electronic equipment, for running above-mentioned man-machine interaction method;Referring to Figure 12 institute Show, which includes processor 101 and memory 100, which is stored with and can be executed by processor 101 Machine-executable instruction, the processor 101 execute machine-executable instruction to realize above-mentioned man-machine interaction method.
Further, electronic equipment shown in Figure 12 further includes bus 102 and communication interface 103, processor 101, communication Interface 103 and memory 100 are connected by bus 102.
Wherein, memory 100 may include high-speed random access memory (RAM, Random Access Memory), It may further include non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.By extremely A few communication interface 103 (can be wired or wireless) is realized logical between the system network element and at least one other network element Letter connection, can be used internet, wide area network, local network, Metropolitan Area Network (MAN) etc..Bus 102 can be isa bus, pci bus or Eisa bus etc..The bus can be divided into address bus, data/address bus, control bus etc..Only to be used in Figure 12 convenient for indicating One four-headed arrow indicates, it is not intended that an only bus or a type of bus.
Processor 101 may be a kind of IC chip, the processing capacity with signal.It is above-mentioned during realization Each step of method can be completed by the integrated logic circuit of the hardware in processor 101 or the instruction of software form.On The processor 101 stated can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), ready-made programmable gate array (Field-Programmable Gate Array, abbreviation FPGA) or Person other programmable logic device, discrete gate or transistor logic, discrete hardware components.It may be implemented or execute sheet Disclosed each method, step and logic diagram in inventive embodiments.General processor can be microprocessor or the processing Device is also possible to any conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in Hardware decoding processor executes completion, or in decoding processor hardware and software module combination execute completion.Software mould Block can be located at random access memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable storage In the storage medium of this fields such as device, register maturation.The storage medium is located at memory 100, and processor 101 reads memory Information in 100, in conjunction with its hardware complete previous embodiment method the step of.
The embodiment of the invention also provides a kind of computer readable storage medium, which has Computer executable instructions, the computer executable instructions are when being called and being executed by processor, the computer executable instructions Processor is promoted to realize above-mentioned man-machine interaction method, specific implementation can be found in embodiment of the method, and details are not described herein.
The computer program product of man-machine interaction method, device provided by the embodiment of the present invention and electronic equipment, including The computer readable storage medium of program code is stored, the instruction that said program code includes can be used for executing previous methods reality Method described in example is applied, specific implementation can be found in embodiment of the method, and details are not described herein.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description And/or the specific work process of electronic equipment, it can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (15)

1. a kind of man-machine interaction method, which is characterized in that the described method includes:
Obtain the dialog information of user;
The dialog information is parsed, the intent information of the user is obtained;
The intent information is input to the conversation process figure being currently executing;
Can judgement continue to execute the conversation process figure according to the intent information;
If it can, continuing to execute the conversation process figure, the corresponding feedback information of the dialog information is exported.
2. the method according to claim 1, wherein the dialog information includes at least one of: the use The text information or voice messaging of the information, user input that are generated after family selection control.
3. obtaining the intention of the user the method according to claim 1, wherein parsing the dialog information The step of information, comprising:
The dialog information is parsed by preset natural language processing module, obtains the intent information of the user;
Wherein, the natural language processing module includes general submodule and at least one process submodule;The general submodule The corresponding initial trigger of all conversation process figures is preserved in block to be intended to;It is preserved in the process submodule and process The intent information of the corresponding conversation process figure of module.
4. according to the method described in claim 3, it is characterized in that, described right by the parsing of preset natural language processing module The step of talking about information, comprising: by the corresponding process submodule of the conversation process figure being currently executing, it is described right to parse Talk about information.
5. according to the method described in claim 3, it is characterized in that, the intention of the corresponding conversation process figure of the process submodule Information includes: that the executable intent information of the corresponding conversation process figure of the process submodule and the process submodule are corresponding The not executable intent information of conversation process figure;
The step of can the judgement continue to execute the conversation process figure according to the intent information, comprising:
Whether the intent information for judging the user is the executable intent information of the conversation process figure;
If so, determination can continue to execute the conversation process figure according to the intent information;
If not, determination cannot continue to execute the conversation process figure according to the intent information.
6. according to the method described in claim 3, it is characterized in that, the method also includes:
If the conversation process figure cannot be continued to execute according to the intent information, pass through the general submodule lookup and institute The initial trigger that intent information matches is stated to be intended to;
It executes the initial trigger found and is intended to corresponding conversation process figure, to export the corresponding feedback of the dialog information Information.
7. according to the method described in claim 3, obtaining the intention of the user it is characterized in that, parse the dialog information Before the step of information, the method also includes: obtain the flow chart mark for the conversation process figure being currently executing;Judge institute Flow chart is stated to identify whether as sky;
The parsing dialog information, the step of obtaining the intent information of the user, comprising: if the flow chart identifies It is not sky, the corresponding conversation process figure corresponding process submodule parsing dialog information is identified by the flow chart, is obtained To intent information;
The described the step of intent information is input to the conversation process figure being currently executing, comprising: by the meaning Figure information input to the flow chart identifies corresponding conversation process figure.
8. obtaining the intention of the user the method according to the description of claim 7 is characterized in that parsing the dialog information The step of information, comprising: if the flow chart is identified as sky, the dialog information is parsed by the general submodule, is obtained To intent information;
The method also includes: the initial trigger to match with the intent information intention is searched by the general submodule; It executes the initial trigger found and is intended to corresponding conversation process figure, to export the corresponding feedback letter of the dialog information Breath.
9. the method according to claim 1, wherein including triggering node, the touching in the conversation process figure Hair node, which is used to trigger to execute, fills out slot node with what the intent information of the user matched;The slot node of filling out is for obtaining word Slot information;
After the step of dialog information for obtaining user, the method also includes: word slot is parsed from the dialog information Information;
It is described to continue to execute the conversation process figure, the step of exporting the dialog information corresponding feedback information, comprising:
The triggering node to match with the intent information is executed, judges that institute's predicate slot is believed by the triggering node to match Whether breath is whether empty or institute's predicate slot information is included in the slot node of filling out connecting with the triggering node to match and has obtained In the information got;
The corresponding feedback information of the dialog information is exported according to judging result.
10. according to the method described in claim 9, it is characterized in that, corresponding according to the judging result output dialog information The step of feedback information, comprising:
If institute's predicate slot information is that empty or institute's predicate slot information is included in the information got, according to described The information got exports the corresponding feedback information of the dialog information;
If institute's predicate slot information is not empty, and institute's predicate slot information is not comprised in the information got, according to The information got described in institute's predicate slot information update exports the corresponding feedback of the dialog information according to updated information Information.
11. the method according to claim 1, wherein including judging node in the conversation process figure;It is described to sentence Disconnected node is connected with multiple subsequent nodes;
The method also includes;If executing the judgement node, judge that the conversation process figure has obtained in the process of implementation To word slot information and/or status information whether meet preset condition, executed in multiple subsequent nodes according to judging result One.
12. the method according to claim 1, wherein including at least two merging sections in the conversation process figure Point;It is connected with each other between at least two merge node;
For connecting at least one foreword node, described at least two merge a node at least two merge node Another node in node is described to make by least two merge node for connecting at least one subsequent node Forward direction node is connected to the subsequent node.
13. a kind of human-computer interaction device, which is characterized in that described device includes:
Data obtaining module, for obtaining the dialog information of user;
It is intended to determining module and obtains the intent information of the user for parsing the dialog information;
Input module, for the intent information to be input to the conversation process figure being currently executing;
Can judgment module continue to execute the conversation process figure for judging according to the intent information;
Output module, if it is described right to continue to execute for that can continue to execute the conversation process figure according to the intent information Flow chart is talked about, the corresponding feedback information of the dialog information is exported.
14. a kind of electronic equipment, which is characterized in that including processor and memory, the memory is stored with can be described The machine-executable instruction that processor executes, the processor execute the machine-executable instruction with realize claim 1 to 12 described in any item man-machine interaction methods.
15. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer can It executes instruction, when being called and being executed by processor, the computer executable instructions promote the computer executable instructions The processor realizes the described in any item man-machine interaction methods of claim 1 to 12.
CN201910732176.9A 2019-08-08 2019-08-08 Man-machine interaction method, device and electronic equipment Pending CN110472030A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910732176.9A CN110472030A (en) 2019-08-08 2019-08-08 Man-machine interaction method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910732176.9A CN110472030A (en) 2019-08-08 2019-08-08 Man-machine interaction method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110472030A true CN110472030A (en) 2019-11-19

Family

ID=68511277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910732176.9A Pending CN110472030A (en) 2019-08-08 2019-08-08 Man-machine interaction method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110472030A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995945A (en) * 2019-11-29 2020-04-10 中国银行股份有限公司 Data processing method, device, equipment and system for generating outbound flow
CN111159999A (en) * 2019-12-05 2020-05-15 中移(杭州)信息技术有限公司 Method and device for filling word slot, electronic equipment and storage medium
CN111182117A (en) * 2019-12-30 2020-05-19 深圳追一科技有限公司 Call processing method and device, computer equipment and computer readable storage medium
CN111488444A (en) * 2020-04-13 2020-08-04 深圳追一科技有限公司 Dialogue method and device based on scene switching, electronic equipment and storage medium
CN111881271A (en) * 2020-07-08 2020-11-03 泰康保险集团股份有限公司 Method and device for realizing automatic conversation
CN112035630A (en) * 2020-03-27 2020-12-04 北京来也网络科技有限公司 Dialogue interaction method, device, equipment and storage medium combining RPA and AI
CN112148877A (en) * 2020-09-23 2020-12-29 网易(杭州)网络有限公司 Corpus text processing method and device and electronic equipment
CN113468303A (en) * 2021-06-25 2021-10-01 北京房江湖科技有限公司 Dialogue interaction processing method and computer-readable storage medium
CN113688223A (en) * 2021-09-10 2021-11-23 上海汽车集团股份有限公司 Task type conversation management method and device
WO2023065629A1 (en) * 2021-10-22 2023-04-27 平安科技(深圳)有限公司 Dialogue management method and system, and terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106663424A (en) * 2014-03-31 2017-05-10 三菱电机株式会社 Device and method for understanding user intent
CN107992543A (en) * 2017-11-27 2018-05-04 上海智臻智能网络科技股份有限公司 Question and answer exchange method and device, computer equipment and computer-readable recording medium
CN108090177A (en) * 2017-12-15 2018-05-29 上海智臻智能网络科技股份有限公司 The generation methods of more wheel question answering systems, equipment, medium and take turns question answering system more
CN109002501A (en) * 2018-06-29 2018-12-14 北京百度网讯科技有限公司 For handling method, apparatus, electronic equipment and the computer readable storage medium of natural language dialogue
CN109145100A (en) * 2018-08-24 2019-01-04 深圳追科技有限公司 A kind of the Task customer service robot system and its working method of customizable process
US20190035387A1 (en) * 2017-07-27 2019-01-31 Microsoft Technology Licensing, Llc Intent and Slot Detection For Digital Assistants

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106663424A (en) * 2014-03-31 2017-05-10 三菱电机株式会社 Device and method for understanding user intent
US20190035387A1 (en) * 2017-07-27 2019-01-31 Microsoft Technology Licensing, Llc Intent and Slot Detection For Digital Assistants
CN107992543A (en) * 2017-11-27 2018-05-04 上海智臻智能网络科技股份有限公司 Question and answer exchange method and device, computer equipment and computer-readable recording medium
CN108090177A (en) * 2017-12-15 2018-05-29 上海智臻智能网络科技股份有限公司 The generation methods of more wheel question answering systems, equipment, medium and take turns question answering system more
CN109002501A (en) * 2018-06-29 2018-12-14 北京百度网讯科技有限公司 For handling method, apparatus, electronic equipment and the computer readable storage medium of natural language dialogue
CN109145100A (en) * 2018-08-24 2019-01-04 深圳追科技有限公司 A kind of the Task customer service robot system and its working method of customizable process

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995945A (en) * 2019-11-29 2020-04-10 中国银行股份有限公司 Data processing method, device, equipment and system for generating outbound flow
CN111159999B (en) * 2019-12-05 2023-04-18 中移(杭州)信息技术有限公司 Method and device for filling word slot, electronic equipment and storage medium
CN111159999A (en) * 2019-12-05 2020-05-15 中移(杭州)信息技术有限公司 Method and device for filling word slot, electronic equipment and storage medium
CN111182117A (en) * 2019-12-30 2020-05-19 深圳追一科技有限公司 Call processing method and device, computer equipment and computer readable storage medium
CN112035630A (en) * 2020-03-27 2020-12-04 北京来也网络科技有限公司 Dialogue interaction method, device, equipment and storage medium combining RPA and AI
CN111488444A (en) * 2020-04-13 2020-08-04 深圳追一科技有限公司 Dialogue method and device based on scene switching, electronic equipment and storage medium
CN111881271A (en) * 2020-07-08 2020-11-03 泰康保险集团股份有限公司 Method and device for realizing automatic conversation
CN112148877A (en) * 2020-09-23 2020-12-29 网易(杭州)网络有限公司 Corpus text processing method and device and electronic equipment
CN112148877B (en) * 2020-09-23 2023-07-04 网易(杭州)网络有限公司 Corpus text processing method and device and electronic equipment
CN113468303B (en) * 2021-06-25 2022-05-17 贝壳找房(北京)科技有限公司 Dialogue interaction processing method and computer-readable storage medium
CN113468303A (en) * 2021-06-25 2021-10-01 北京房江湖科技有限公司 Dialogue interaction processing method and computer-readable storage medium
CN113688223A (en) * 2021-09-10 2021-11-23 上海汽车集团股份有限公司 Task type conversation management method and device
WO2023065629A1 (en) * 2021-10-22 2023-04-27 平安科技(深圳)有限公司 Dialogue management method and system, and terminal and storage medium

Similar Documents

Publication Publication Date Title
CN110472030A (en) Man-machine interaction method, device and electronic equipment
US11182556B1 (en) Applied artificial intelligence technology for building a knowledge base using natural language processing
CN106649825B (en) Voice interaction system and creation method and device thereof
CN106951468B (en) Talk with generation method and device
CN107797984B (en) Intelligent interaction method, equipment and storage medium
CN106446045B (en) User portrait construction method and system based on dialogue interaction
CN111639168B (en) Multi-round dialogue processing method and device, electronic equipment and storage medium
CN110377716A (en) Exchange method, device and the computer readable storage medium of dialogue
CN114757176B (en) Method for acquiring target intention recognition model and intention recognition method
CN109033257A (en) Talk about art recommended method, device, computer equipment and storage medium
CN106230689B (en) A kind of method, apparatus and server of voice messaging interaction
CN111177338B (en) Context-based multi-round dialogue method
CN110008308B (en) Method and device for supplementing information for user question
CN108874778A (en) Semantic entity-relationship abstracting method, device and electronic equipment
CN108364650B (en) Device and method for adjusting voice recognition result
US20200243062A1 (en) Conversational speech agent
CN112527998A (en) Reply recommendation method, reply recommendation device and intelligent device
CN106874259A (en) A kind of semantic analysis method and device, equipment based on state machine
CN108710704A (en) Determination method, apparatus, electronic equipment and the storage medium of dialogue state
CN112579733B (en) Rule matching method, rule matching device, storage medium and electronic equipment
CN109582954A (en) Method and apparatus for output information
CN113312468B (en) Conversation mode-based conversation recommendation method, device, equipment and medium
CN110110039A (en) A kind of method that the visualization of intelligent sound robot is built
CN108763202A (en) Method, apparatus, equipment and the readable storage medium storing program for executing of the sensitive text of identification
CN104485106A (en) Voice recognition method, voice recognition system and voice recognition equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191119