CN113705249A - Dialogue processing method, system, device and computer readable storage medium - Google Patents

Dialogue processing method, system, device and computer readable storage medium Download PDF

Info

Publication number
CN113705249A
CN113705249A CN202110984181.6A CN202110984181A CN113705249A CN 113705249 A CN113705249 A CN 113705249A CN 202110984181 A CN202110984181 A CN 202110984181A CN 113705249 A CN113705249 A CN 113705249A
Authority
CN
China
Prior art keywords
conversation
dialog
intention
processing task
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110984181.6A
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.)
Shanghai Yuncong Enterprise Development Co ltd
Original Assignee
Shanghai Yuncong Enterprise Development 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 Shanghai Yuncong Enterprise Development Co ltd filed Critical Shanghai Yuncong Enterprise Development Co ltd
Priority to CN202110984181.6A priority Critical patent/CN113705249A/en
Publication of CN113705249A publication Critical patent/CN113705249A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • 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
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a conversation processing method, a system, a device and a computer readable storage medium, aiming at solving the problem of how to effectively improve the accuracy and reliability of conversation processing. The dialogue processing method comprises the steps of carrying out semantic analysis on received input information and determining a dialogue intention; determining a dialogue strategy query condition according to the dialogue intention; inquiring a preset conversation strategy configuration file by adopting a conversation strategy inquiry condition, and determining a conversation processing task of a conversation intention; the dialogue strategy configuration file is a configuration file of a tree data structure generated according to a plurality of different dialogue processing tasks and dialogue strategy query conditions corresponding to each dialogue processing task; and executing the dialogue processing task to generate the reply information. By means of inquiring the preset dialogue strategy configuration file to determine the dialogue processing task, accurate reply information can be generated aiming at the input information, and accuracy and reliability of dialogue processing are remarkably improved.

Description

Dialogue processing method, system, device and computer readable storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, and particularly provides a task processing method and device and a computer readable storage medium.
Background
At present, the conversation processing equipment is widely applied to various application scenes such as air ticket reservation, life payment and the like, a user can send a voice instruction to the conversation processing equipment, and the conversation processing equipment can analyze the voice instruction and complete corresponding operations such as air ticket reservation or life payment. The dialogue processing method adopted by the existing dialogue processing equipment mainly comprises the steps of firstly training a dialogue processing model by using dialogue corpora under different application scenes and then carrying out dialogue processing by adopting the trained dialogue processing model. The accuracy of the dialogue corpus greatly affects the model performance of the dialogue processing model, and further affects the accuracy and reliability of the dialogue processing. Meanwhile, when the dialogue corpus does not cover the application scene, the method cannot complete the dialogue processing, and the accuracy and the reliability of the dialogue processing are further reduced.
Accordingly, there is a need in the art for a new dialogue handling scheme to address the above-mentioned problems.
Disclosure of Invention
The present invention is directed to solve the above technical problem, that is, how to effectively improve the accuracy and reliability of the dialog processing.
In a first aspect, the present invention provides a dialog processing method, including:
performing semantic analysis on the received input information when a conversation is performed with a user, and determining the conversation intention of the user;
determining a dialogue strategy query condition according to the dialogue intention;
querying a preset conversation strategy configuration file by adopting the conversation strategy query condition to determine a conversation processing task of the conversation intention; the preset dialogue strategy configuration file is a configuration file of a tree data structure generated according to a plurality of different dialogue processing tasks and dialogue strategy query conditions corresponding to each dialogue processing task;
generating a reply message by executing the dialogue processing task to complete the dialogue with the user.
In one embodiment of the foregoing dialog processing method, the step of "determining a dialog policy query condition according to the dialog intention" specifically includes:
determining whether a dialog processing task has been performed for the dialog intent;
if so, determining the dialogue strategy query condition according to the dialogue intention, a dialogue processing task executed for the previous time aiming at the dialogue intention and reply information generated by the dialogue processing task executed for the previous time;
if not, determining the dialogue strategy query condition directly according to the dialogue intention.
In one embodiment of the foregoing dialog processing method, "generating reply information by executing the dialog processing task" specifically includes:
judging whether the dialog processing tasks with other dialog intentions are executed before the dialog processing task with the current dialog intention is executed;
if not, acquiring slot position information required by the conversation processing task of the current conversation intention according to the input information;
if the dialog intentions are executed, acquiring intention types of the current dialog intention and the other dialog intentions respectively;
if the intention types of the current conversation intention and the other conversation intentions belong to different sub-types under the same preset main type, determining slot position information required by the conversation processing task of the current conversation intention according to slot position information adopted when the conversation processing tasks of the other conversation intentions are executed;
if the intention types of the current conversation intention and the other conversation intentions belong to different preset main types respectively, obtaining slot position information required by a conversation processing task of the current conversation intention according to the input information and outputting information confirmation reminding information;
and executing the conversation processing task according to the slot position information required by the conversation processing task with the current conversation intention, and generating reply information.
In one technical solution of the foregoing dialog processing method, "obtaining slot information required by the dialog processing task of the current dialog intention according to the input information" specifically includes:
performing semantic analysis on the input information, and determining entity information contained in the input information, wherein the entity information comprises named entity information, digital entity information and time entity information;
determining entity relationships among the named entity information, the digital entity information and the time entity information, and acquiring slot position information required by a conversation processing task of the current conversation intention according to the entity information and the entity relationships;
and/or the like and/or,
before the step of "executing the conversation processing task according to the slot information required by the conversation processing task of the current conversation intention", the method further includes:
judging whether slot position information required by executing the conversation processing task is lacked;
if so, guiding a user to input the missing slot position information according to the missing slot position information;
and if not, executing the conversation processing task and generating reply information.
In one embodiment of the above-described dialog processing method, the step of generating the reply message by executing the dialog processing task further includes:
storing the conversation processing task into a preset task stack;
sequentially acquiring and executing each conversation processing task from the task stack, and outputting task execution completion reminding information after all conversation processing tasks are executed;
and/or the like and/or,
the step of "generating a reply message by executing the dialogue processing task" further includes:
judging whether the conversation processing task is a preset abnormal conversation processing task or not;
if so, acquiring a corresponding reply template from a preset reply template library according to the abnormal conversation processing task, and sending an abnormal prompt according to the reply template;
if not, generating reply information by executing the conversation processing task;
and/or the like and/or,
the step of "determining the dialog intention of the user" specifically includes:
and performing semantic analysis on the input information by adopting a preset intention classification model, and determining one or more dialog intentions of the user, wherein the preset intention classification model is obtained by training according to training samples corresponding to a plurality of different dialog intentions.
In a second aspect, the present invention provides a dialog processing system, comprising:
a dialogue intention determination module configured to perform semantic analysis on the received input information while conversing with the user, determining a dialogue intention of the user;
a query condition determination module configured to determine a dialog policy query condition based on the dialog intent;
a dialogue processing task determination module configured to query a preset dialogue strategy configuration file by using the dialogue strategy query condition to determine a dialogue processing task of the dialogue intention; the preset dialogue strategy configuration file is a configuration file of a tree data structure generated according to a plurality of different dialogue processing tasks and dialogue strategy query conditions corresponding to each dialogue processing task;
a reply information generation module configured to generate a reply information to complete a conversation with a user by performing the conversation processing task.
In one aspect of the foregoing dialog processing system, the query condition determination module is further configured to perform the following operations:
determining whether a dialog processing task has been performed for the dialog intent;
if so, determining the dialogue strategy query condition according to the dialogue intention, a dialogue processing task executed for the previous time aiming at the dialogue intention and reply information generated by the dialogue processing task executed for the previous time;
if not, determining the dialogue strategy query condition directly according to the dialogue intention.
In one aspect of the dialog processing system, the reply information generation module is further configured to perform the following operations:
judging whether the dialog processing tasks with other dialog intentions are executed before the dialog processing task with the current dialog intention is executed;
if not, acquiring slot position information required by the conversation processing task of the current conversation intention according to the input information;
if the dialog intentions are executed, acquiring intention types of the current dialog intention and the other dialog intentions respectively;
if the intention types of the current conversation intention and the other conversation intentions belong to different sub-types under the same preset main type, determining slot position information required by the conversation processing task of the current conversation intention according to slot position information adopted when the conversation processing tasks of the other conversation intentions are executed;
if the intention types of the current conversation intention and the other conversation intentions belong to different preset main types respectively, obtaining slot position information required by a conversation processing task of the current conversation intention according to the input information and outputting information confirmation reminding information;
and executing the conversation processing task according to the slot position information required by the conversation processing task with the current conversation intention, and generating reply information.
In an embodiment of the dialog processing system, the reply information generating module is further configured to perform the following operations:
performing semantic analysis on the input information, and determining entity information contained in the input information, wherein the entity information comprises named entity information, digital entity information and time entity information;
determining entity relationships among the named entity information, the digital entity information and the time entity information, and acquiring slot position information required by a conversation processing task of the current conversation intention according to the entity information and the entity relationships;
and/or the like and/or,
the reply information generation module is further configured to perform the following operations:
judging whether slot position information required by executing the conversation processing task is lacked;
if so, guiding a user to input the missing slot position information according to the missing slot position information;
and if not, executing the conversation processing task and generating reply information.
In an embodiment of the dialog processing system, the dialog processing task is multiple, and the reply information generating module is further configured to perform the following operations:
storing the conversation processing task into a preset task stack;
sequentially acquiring and executing each conversation processing task from the task stack, and outputting task execution completion reminding information after all conversation processing tasks are executed;
and/or the like and/or,
the reply information generation module is further configured to perform the following operations:
judging whether the conversation processing task is a preset abnormal conversation processing task or not;
if so, acquiring a corresponding reply template from a preset reply template library according to the abnormal conversation processing task, and sending an abnormal prompt according to the reply template;
if not, generating reply information by executing the conversation processing task;
and/or the like and/or,
the dialog intent determination module is further configured to perform the following operations:
and performing semantic analysis on the input information by adopting a preset intention classification model, and determining one or more dialog intentions of the user, wherein the preset intention classification model is obtained by training according to training samples corresponding to a plurality of different dialog intentions.
In a third aspect, there is provided a control device comprising a processor and a storage device, the storage device being adapted to store a plurality of program codes, the program codes being adapted to be loaded and run by the processor to perform a dialog handling method according to any of the above-mentioned aspects of dialog handling method.
In a fourth aspect, a computer-readable storage medium is provided, in which a plurality of program codes are stored, the program codes being adapted to be loaded and run by a processor to execute the dialog processing method according to any one of the above-mentioned aspects of the dialog processing method.
Under the condition of adopting the technical scheme, the method can carry out semantic analysis on the received input information when the user carries out conversation, determine the conversation intention of the user, then determine the strategy query condition according to the conversation intention, query the preset conversation strategy configuration file by adopting the conversation strategy query condition, determine the conversation processing task of the conversation intention, and finally execute the conversation processing task to generate the reply information so as to complete the conversation with the user. All the conversation processing tasks are determined after being inquired in the preset conversation strategy configuration file through the conversation strategy inquiry conditions, so that all the conversation processing tasks are preset, determined, stable and reliable, accurate reply information can be generated aiming at input information in a mode of inquiring the preset conversation strategy configuration file to determine the conversation processing tasks, the accuracy and the reliability of conversation processing are remarkably improved, and the conversation experience of a user is further improved.
Drawings
The disclosure of the present invention will become more readily understood with reference to the accompanying drawings. As is readily understood by those skilled in the art: these drawings are for illustrative purposes only and are not intended to constitute a limitation on the scope of the present invention. Moreover, in the drawings, like numerals are used to indicate like parts, and in which:
FIG. 1 is a flow diagram illustrating the main steps of a method of dialog processing according to one embodiment of the present invention;
FIG. 2 is a flow diagram of a method of dialog processing to determine dialog policy query terms according to one embodiment of the invention;
FIG. 3 is a flowchart illustrating a method of session processing to determine slot information for different intent types according to one embodiment of the invention;
FIG. 4 is a flow diagram of determining entity information and entity relationships for a method of dialog processing according to one embodiment of the invention;
fig. 5 is a flowchart illustrating a method of session processing according to an embodiment of the present invention to determine whether slot information is complete;
FIG. 6 is a flow diagram of a plurality of conversation processing tasks of a method of conversation processing in accordance with one embodiment of the present invention;
FIG. 7 is a flow diagram illustrating an exception occurring in a method of dialog processing according to one embodiment of the invention;
FIG. 8 is a detailed flow diagram of a plurality of conversation processing tasks of a method of conversation processing in accordance with one embodiment of the present invention;
FIG. 9 is a block diagram illustrating the main structure of a system for dialogue processing according to one embodiment of the invention;
FIG. 10 is a flow diagram illustrating the primary steps of a method of dialog processing according to another embodiment of the present invention;
fig. 11 is a main structural block diagram schematically illustrating a task robot according to an embodiment of the present invention.
List of reference numerals:
91: a dialog intention determination module; 92: a query condition determining module; 93: a conversation processing task determining module; 94: and a reply information generation module.
Detailed Description
Some embodiments of the invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and are not intended to limit the scope of the present invention.
In the description of the present invention, a "module" or "processor" may include hardware, software, or a combination of both. A module may comprise hardware circuitry, various suitable sensors, communication ports, memory, may comprise software components such as program code, or may be a combination of software and hardware. The processor may be a central processing unit, microprocessor, image processor, digital signal processor, or any other suitable processor. The processor has data and/or signal processing functionality. The processor may be implemented in software, hardware, or a combination thereof. Non-transitory computer readable storage media include any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random-access memory, and the like. The term "a and/or B" denotes all possible combinations of a and B, such as a alone, B alone or a and B. The term "at least one A or B" or "at least one of A and B" means similar to "A and/or B" and may include only A, only B, or both A and B. The singular forms "a", "an" and "the" may include the plural forms as well.
At present, a dialog framework of a conventional task robot, such as rasa (an open source machine learning framework for constructing context AI assistants and chat robots), requires a large amount of dialog corpora for dialog flow control strategy training, but this solution also has a disadvantage that generation of the dialog flow control strategy requires training by means of a large amount of dialog corpora, and generation of the dialog flow control strategy may have an unstable situation, which may cause an influence on user experience when the dialog flow control strategy is abnormal.
In the embodiment of the invention, the dialogue intention of the user is determined by analyzing the received input information when the dialogue is conducted with the user, then the dialogue strategy query condition is determined according to the dialogue intention, the dialogue strategy query condition is adopted to query in the dialogue strategy configuration file so as to determine the dialogue processing task of the dialogue intention, the dialogue processing task is executed, and finally the dialogue with the user is completed.
In an example of an application scenario of the present invention, a certain user issues a voice instruction to a task robot provided with a conversation task processing system according to an embodiment of the present invention; the method comprises the steps that a user is helped to pay electric charge, semantic analysis is conducted on a received voice command, namely the user is helped to pay the electric charge, the conversation intention of the user is determined to be the 'payment charge', then the conversation strategy query condition is determined to be the 'payment charge' according to the conversation intention, then the 'payment charge' is used for querying from a preset conversation strategy configuration file, a conversation processing task corresponding to the conversation strategy query condition is preset in the preset conversation strategy configuration file, after the conversation processing task is determined, the conversation processing task is executed, reply information is generated, the user is further guided to input a payment account number, a payment amount and the like, and finally conversation with the user is completed.
Referring to fig. 1, fig. 1 is a flow chart illustrating the main steps of a dialogue processing method according to an embodiment of the invention. As shown in fig. 1, the dialog processing method in the embodiment of the present invention mainly includes the following steps S101 to S104.
Step S101: and carrying out semantic analysis on the received input information when carrying out a conversation with the user, and determining the conversation intention of the user.
In one embodiment of this embodiment, the step of "determining the dialog intention of the user" may include:
performing semantic analysis on input information by adopting a preset intention classification model, and determining one or more conversation intentions of a user, wherein the preset intention classification model is obtained by training according to training samples corresponding to a plurality of different conversation intentions.
For example, a BERT model, a ROBERTA model, etc. may be used, and a classification layer is trained to obtain an intention classification model, and then the intention classification model is used to perform semantic analysis on the received input information to determine the dialog intention of the user, and in a certain implementation scenario, the BERT model, the ROBERTA model, and the classification layer may also be trained using a sample, so that the intention classification model can identify a plurality of user intentions at one time, for example, when the user says "help me pay water fee, electricity fee, telephone fee, gas fee", the intention classification model can identify four intentions of the user as "pay water fee", "pay electricity fee", "pay telephone fee", and "gas fee" at one time. It should be noted that the method for training the BERT model, the ROBERTA model and the classification layer may be the same as the conventional model training method in the art, and the training method is not described herein again.
The dialogue intention in the input information can be well analyzed through the intention classification model, and a plurality of dialogue intentions in the input information can be recognized through the trained intention classification model.
Step S102: and determining a dialog strategy query condition according to the dialog intention.
In an implementation manner of this embodiment, step S102 may determine the dialog query policy according to different conditions through steps S201 to S203 as shown in fig. 2:
step S201: it is determined whether or not a dialog processing task has been executed for the dialog intention, and if so, step S202 is executed, and if not, step S203 is executed.
Step S202: the dialog policy query condition is determined based on the dialog intention, the dialog processing task executed for the dialog intention at the previous time, and the reply information generated by the dialog processing task executed at the previous time.
Step S203: and determining the dialog strategy query condition directly according to the dialog intention.
The dialog processing task may be executed multiple times for the same dialog intention, so the basis for determining the dialog policy query condition may be different, and when the dialog processing task has not been executed for a certain dialog intention, i.e., the dialog processing task is executed for the dialog intention for the first time, the dialog policy query condition may be determined directly according to the dialog intention, and if the dialog processing task has been executed for the dialog intention before, the dialog policy query condition may be determined according to the dialog intention, the dialog processing task executed for the dialog intention before, the reply information generated by the dialog processing task executed before, and the like.
For example, when a dialog is conducted with a certain user, the input content of the user is semantically analyzed, then the dialog intention of the user is determined to be ' reserved bank branch ', and a plurality of dialog processing tasks need to be executed aiming at the intention, when the dialog processing task is executed aiming at ' reserved bank branch ' for the first time, the dialog strategy query condition can be determined according to the dialog intention ' reserved bank branch ', when the dialog processing task is executed aiming at ' reserved bank branch ' for the second time, the fact that a bank reserved by the user is determined to be ' a certain bank ' through the dialog processing task executed aiming at ' reserved bank branch ' for the first time is assumed, and the dialog processing task executed for the previous time, such as the bank determined to be reserved, and reply information generated by the dialog processing task executed for the previous time, such as ' please select time reservation), also for example "certain bank has been selected", etc. determine the dialog policy query condition.
For example, when a voice command "help me pay for electricity", is received when a conversation is conducted with a certain user, semantic analysis is conducted on the received voice command to determine that the conversation intention of the user is "pay for electricity", at this time, a conversation processing task for executing the conversation intention for the first time is executed, a conversation strategy query condition is determined directly according to the conversation intention "pay for electricity", then a conversation processing task, such as a preset application program for executing the pay for electricity, is determined, after the conversation processing task is executed, reply information, such as "ask you to input an account number needing to pay for electricity", is sent to the user, at this time, a conversation processing task is executed for the second time aiming at the "pay for electricity", at this time, the conversation strategy query condition can be determined according to a previous conversation processing task executed aiming at the "pay for electricity", the conversation intention and reply information generated by the previous conversation processing task, the next dialog processing task is determined.
Different dialogue strategy query conditions are determined according to whether a dialogue processing task is executed aiming at a certain dialogue intention, so that the dialogue strategy query conditions are more accurate, and the reliability of the dialogue processing task is further improved.
Step S103: inquiring a preset conversation strategy configuration file by adopting a conversation strategy inquiry condition to determine a conversation processing task of a conversation intention; the preset dialogue strategy configuration file is a configuration file of a tree data structure generated according to a plurality of different dialogue processing tasks and dialogue strategy query conditions corresponding to each dialogue processing task.
The dialog policy configuration file may be a configuration file of a tree data structure generated according to a plurality of different dialog processing tasks and the dialog policy query condition corresponding to each dialog processing task, and in brief, the configuration file of the tree data structure may include a plurality of dialog processing tasks and a plurality of dialog policy query conditions, the plurality of dialog processing tasks and the plurality of dialog policy query conditions are in one-to-one correspondence, and one dialog processing task may be determined according to the dialog policy query condition.
For example, the dialog processing task and the dialog policy query condition about "pay" in the configuration file can be as shown in table 1 below:
TABLE 1
Figure BDA0003230150150000071
It should be noted that the implementation of the configuration file of the tree data structure is only an example, and does not represent only this embodiment of the present invention, and due to the diversity of the dialog intents, a person skilled in the art may generate different dialog policy configuration files according to the above-mentioned "the dialog policy configuration file may be a configuration file of a tree data structure generated according to a plurality of different dialog processing tasks and the dialog policy query condition corresponding to each dialog processing task.
Step S104: by executing the dialog processing task, a reply message is generated to complete the dialog with the user.
In an embodiment of the present embodiment, slot information under different intent types may be determined through steps S301 to S306 as shown in fig. 3:
step S301: it is determined whether or not a dialog processing task of another dialog intention has been executed before the dialog processing task of the current dialog intention is executed, and if not, step S302 is executed, and if so, step S303 is executed.
Step S302: and acquiring slot position information required by the conversation processing task of the current conversation intention according to the input information.
Step S303: respectively acquiring the intention types of the current dialog intention and the other dialog intention, executing the step S304 if the intention types of the current dialog intention and the other dialog intention belong to different sub-types under the same preset main type, and executing the step S305 if the intention types of the current dialog intention and the other dialog intention belong to different preset main types.
Step S304: and determining slot position information required by the conversation processing task with the current conversation intention according to the slot position information adopted when the conversation processing tasks with other conversation intentions are executed.
Step S305: and acquiring slot position information required by the conversation processing task of the current conversation intention according to the input information and outputting information confirmation reminding information.
Step S306: and executing the conversation processing task according to the slot position information required by the conversation processing task with the current conversation intention, and generating reply information.
For example, the currently executed dialog intention is ' buying a train ticket ', whether a dialog processing task of other dialog intentions has been executed or not can be judged before the dialog processing task of buying a train ticket is executed, if not, slot information such as time, place of departure, destination and the like required by the corresponding dialog processing task is acquired according to the dialog intention ', if the dialog processing task of other dialog intentions has been executed before, the intention type of the current dialog intention and other dialog intentions is judged, if the current dialog intention and other dialog intentions belong to different sub-types under the same preset main type, slot information required by the dialog processing task of the current dialog intention can be determined according to slot information adopted when the dialog processing task of other dialog intentions is executed, if the intention type of the current dialog intention and other dialog intentions respectively belong to different preset main types, and acquiring slot position information required by the conversation processing task of the current conversation intention according to the input information and outputting information confirmation reminding information. Specifically, for example, a bought train ticket and an annealing train ticket belong to different subtypes of the same main type (train ticket service type), so if a conversation processing task which has been previously executed with other intentions is an annealing train ticket, which slot information can be repeatedly used and retained according to the slot information adopted by the annealing train ticket, which slots cannot be used in the conversation processing task with the current conversation intention, and are deleted, and the missing slot information is completely supplemented according to the slot information required by the conversation processing task with the current conversation intention. For example, the electric charge payment and the purchase of the train ticket belong to different preset main types, and the slot position information required by the conversation processing tasks corresponding to the conversation intentions of the two different main types is completely different, so if the conversation processing task of other intentions executed before is the electric charge payment, the slot position information of the conversation processing task executed before can be completely deleted, then the slot position information can be determined according to the slot position information required by the conversation processing task of the current conversation intentions, and reminding information or information for confirming a request can be sent.
For convenience of understanding, practical application scenarios are listed again here to distinguish main types and sub-types, for example, "buy train tickets" and "anneal tickets" are both related to train tickets, so that "buy train tickets" and "anneal tickets" can be preset as different sub-types under the same main type (train ticket service type), and for example, "pay water" and "pay gas" are both related to life payment, so that "pay water" and "pay gas" can be preset as different sub-types under the same main type (life payment type), and for example, "train tickets" and "life payment", which have no association therebetween, so that different main types can be preset. It should be noted that, due to too many application scenarios, all main types and sub-types cannot be listed, but those skilled in the art should understand that the main types and sub-types in other application scenarios can be determined according to the above-mentioned exemplary classification method, and the alternative schemes of the main types and sub-types still fall within the protection scope of the present invention.
For different conversation intentions of users, the used slot position information is different, so that whether different conversation intentions are of the same main type or not is judged, for the conversation intentions of the same main type, part of slot position information can be reused, and further the workload is reduced.
In one embodiment of this embodiment, the entity information and the entity relationship may be determined through steps S401 to S402 as shown in fig. 4:
step S401: and performing semantic analysis on the input information, and determining entity information contained in the input information, wherein the entity information can comprise named entity information, digital entity information and time entity information.
Step S402: and determining entity relationships among the named entity information, the digital entity information and the time entity information, and acquiring slot position information required by the conversation processing task of the current conversation intention according to the entity relationships and the entity relationships.
When a dialogue is performed with a user, such as booking airline tickets, the received voice instruction may be "help me to book airline tickets from the area a to the area B at ten am tomorrow", at this time, semantic analysis may be performed on the input information, for example, a named entity recognition model constructed by ROBERTA + CRF framework may be used to recognize airline tickets "help me to ten am at tomorrow from the area a to the area B", the recognized named entity information may be "area a", "area B, 10: 00", for example, a transformer model may be used for training, so that the trained model recognizes water charges of fifty money, for example, the recognized digital entity information may be "50", for example, the trained model may be used for training, so that the trained model recognizes 2020 "tomorrow morning", the recognized time entity information may be "1 month 1 year, for example, the named entity model may identify all entity information, such as a person name, a place name, a number, a time, an organization name, a product name, and the like, and the transform model may be used to convert the identified entity information into a digital format and convert the time entity information into a standard time format. It should be noted that the ROBERTA + CRF framework and the transform model are conventional in the art, and for the sake of brevity, the principle, the workflow, the training process, and the like will not be described in further detail.
After the entity information is identified, the entity relationship among the entity information, such as "1 month and 1 day 2020", "10: 00", "a area" and "B area", needs to be determined, and after the entity relationship is determined, slot position information required by the dialog processing task of the current dialog intention is acquired according to the entity information and the entity relationship.
In an embodiment of this embodiment, acquiring the input information of the user may include option collection and voice instruction collection, and for the option collection, an embodiment thereof may be:
for example, after receiving a voice instruction "i want to make an appointment at a website", options are presented to the user through the interactive interface and a voice or text prompt is sent to the user: "a certain bank currently supports the reservation of the following services, please select the serial number of the service you need to handle":
1. opening an account; 2. large amount cash withdrawal; 3. modifying the personal data; 4. modifying the mobile phone number; 5. transferring accounts in large amount; 6. other services;
assuming that the user clicks "2" on the interactive interface, or sends out a voice command "2", the user may be presented with the options again through the interactive interface and send out a voice or text reminder to the user: "a certain bank currently supports the appointment time as follows, please select the appointment time":
1. 1 month 1 am in 2020; 2. 1 st 1 pm in 2020; 3. morning on 1 month and 2 months in 2020; 4. afternoon 1/2/2020;
assuming that a user clicks '1' on the interactive interface or sends a voice instruction '1', confirmation information can be displayed through the interactive interface, and a prompt is sent to the user through voice: "you are reserving 1 month 1 morning of 2020, and transact the large amount of service of getting cash to a certain bank and please confirm", the user can finish the reservation after selecting 1 on the interactive interface or sending a voice instruction "1" to the robot.
For voice-instructed collection, the implementation may be:
after receiving a voice instruction of 'I want to transfer', the contents needing to be input can be displayed on an interactive interface, and a voice prompt is sent to a user: please enter the collection account number for your transfer. The bank card number with 16, 17 or 19 digits of the collection account number is received, after a voice command of ' I want to convert 5000 money to XXXXXXXXXXXXX 2366 of account of Wangwu ' is received ', confirmation information can be displayed on an interactive interface, voice reminding information ' please confirm transfer information, and the user is remitted into XXXXXXXXXXXXXXX 2366 account of a XXX bank deposit card, the account owner is Wangwu, the remittance amount is 5000.00 RMB, and the balance of the account is 45000.00 RMB after transfer '.
The input information of the user is acquired in different modes, so that the efficiency of conversation processing can be improved, and the use experience of the user is improved.
In an embodiment of the present embodiment, before step S306, the integrity of the slot information may also be confirmed through steps S501 to S503 as shown in fig. 5:
step S501: and judging whether slot position information required for executing the conversation processing task is lacked, if so, executing step S502, and if not, executing step S503.
Step S502: and guiding the user to input the missing slot information according to the missing slot information.
Step S503: and executing the conversation processing task to generate the reply information.
Before executing the session processing task, it may also be determined whether slot information required for executing the session processing task is complete, for example, when the executed session processing task is buying an airline ticket, the slot information required for executing the session processing task may include a departure place, a destination, and time, but only the destination and the time are included in the slot information, and the departure place is lacked, so that the user may be guided to input information of the lacked departure place according to the lacked slot information, that is, the departure place, when all the slot information required for executing the session processing task is available, the session processing task is executed, and reply information is generated, for example, after the ticket ordering is completed, information of completing the ticket ordering may be generated, and order information and the like may be displayed.
In one embodiment of the present embodiment, if the number of the dialogue processing tasks is plural, the plural dialogue processing tasks may also be sequentially executed by steps S601 to S602 as shown in fig. 6:
step S601: and storing the conversation processing task into a preset task stack.
Step S602: and sequentially acquiring and executing each conversation processing task from the task stack, and outputting task execution completion reminding information after all the conversation processing tasks are completed.
For example, after performing semantic analysis on the input information, if a plurality of dialog intents are determined, a plurality of dialog processing tasks are correspondingly determined, at this time, the plurality of dialog processing tasks may be stored in a preset task stack, and each dialog processing task is sequentially acquired and executed according to steps S801 to S807 shown in fig. 8, and after all the dialog processing tasks are executed, the notification information of task execution completion is output:
step S801: a plurality of conversation processing tasks is determined.
Step S802: adding a plurality of dialog processing tasks to the task stack.
Step S803: it is determined whether the session processing task being executed is completed, if yes, step S804 is executed, and if not, step S805 is executed.
Step S804: the ongoing session processing task continues to be executed.
Step S805: and judging whether a session processing task exists in the task stack, if so, executing step 806, and if not, executing step 807.
Step S806: and acquiring the conversation processing task from the task stack and executing the conversation processing task.
Step S807: a reminder is issued that all conversation processing tasks have been completed.
For example, after receiving a voice command "help me pay water, electricity, gas, and phone charges", semantic analysis may be performed on the received voice command to determine 4 dialog intents, and correspondingly, a corresponding dialog processing task may be determined, and at this time, all the dialog processing tasks may be stored in a task stack, and then the dialog processing tasks are sequentially acquired and executed. For example, when the input information is semantically analyzed to identify one dialogue intention, a plurality of dialogue processing tasks may be generated, and in this case, all the dialogue processing tasks may be stored in a task stack, and then the dialogue processing tasks may be sequentially acquired and executed. Similarly, the method shown in fig. 8 may be adopted to store all the dialog processing tasks in the task stack, and then sequentially retrieve and execute the dialog processing tasks.
When the input information contains a plurality of dialogue intents, a plurality of dialogue processing tasks are correspondingly determined and stored in the task stack to be sequentially executed, and the multitask processing can be realized.
In another implementation of this embodiment, step S104 may further include steps S701 to S703 as shown in fig. 7:
step S701: and judging whether the conversation processing task is a preset abnormal conversation processing task, if so, executing step S702, and if not, executing step S703.
Step S702: and acquiring a corresponding reply template from a preset reply template library according to the abnormal conversation processing task, and sending an abnormal prompt according to the reply template.
Step S703: by executing the dialogue processing task, reply information is generated.
When the conversation processing task is executed, the conversation processing task is judged, some conversation processing tasks may be preset abnormal conversation processing tasks, some conversation processing tasks may not be completed, for example, information input by a user is wrong, and for example, the user needs to buy a ticket of a train at a certain time in a certain day, but the ticket is sold, so that the conversation processing task cannot be completed, and at the moment, an abnormal prompt is generated.
Based on the above steps S101 to S104, when a dialog is performed with the user, semantic analysis is performed on the received input information to determine a dialog intention of the user, then a policy query condition is determined according to the dialog intention, a preset dialog policy configuration file is queried by using the dialog policy query condition to determine a dialog processing task of the dialog intention, and finally, the dialog processing task is executed to generate reply information to complete the dialog with the user. All the conversation processing tasks are determined after being inquired in the preset conversation strategy configuration file through the conversation strategy inquiry conditions, so that all the conversation processing tasks are preset, determined, stable and reliable, accurate reply information can be generated aiming at input information in a mode of inquiring the preset conversation strategy configuration file to determine the conversation processing tasks, the accuracy and the reliability of conversation processing are remarkably improved, and the conversation experience of a user is further improved.
Further, referring to fig. 10, in a dialogue processing method according to another embodiment of the present invention, the following steps S901 to S907 may be included:
step S901: and carrying out text preprocessing on the received input information when carrying out a conversation with a user to obtain the preprocessed input information.
For example, the input information received during the dialog with the user may be disordered text information, so the input information may be subjected to text preprocessing, and the preprocessing flow may include conversion of the encoding format, and processing of scrambled characters, and the like.
Step S902: and performing intention identification on the preprocessed input information, acquiring entity information, and performing entity information conversion to respectively determine the conversation intention and the entity information of the user and determine the entity relationship of the entity information.
The intent recognition model may perform intent recognition on the preprocessed input information to determine the dialog intent of the user, and the specific implementation of the method is similar to that in step S101, and for brevity of description, will not be described again here.
The entity information can be obtained by analyzing the preprocessed text information through a named entity recognition model constructed by using a ROBERTA + CRF framework, for example, and the entity information can comprise named entity information, digital entity information and time entity information, such as name of person, name of place, number, time, name of organization, name of product, and the like
The number recognized by the transform model may be converted into a standard format, for example, six blocks are converted into 3.6 yuan, or the transform model may be used for training, and the recognized time is converted into a standard time format, for example, "tomorrow" is converted into "1 month 1 day 2020", and "1 month 1 year 20" is converted into "1 month 1 day 2020", which is similar to the above step S401 in specific implementation and is not described herein again for brevity.
The roberta model may be used for training, the trained model is used for identifying the obtained entity information, and the entity relationship of the entity information is determined, the specific implementation manner of which is similar to the step S402, and is not repeated herein for brevity of description.
Step S903: and filling the slot position information according to the entity information and the entity relationship.
The slot position information can be filled according to the entity information and the entity relationship. For example, the determined entity information and entity relationship, time: the "1 month and 1 day 2020", the origin "XX city" and the destination "XX city" fill in the slot.
Step S904: and switching the task scene according to the dialog intention of the user.
For example, the intention of the user is "air ticket booking", and the current task scenario is "life payment", so the task scenario needs to be switched, the task scenario may include a main scenario and a sub scenario, for example, "air ticket service" may be the main scenario, "air ticket booking" is a sub scenario under the main scenario "air ticket service", life payment may be the main scenario, water payment may be a sub scenario under the main scenario "life payment", the main scenario is similar to the above sub-type, and the sub scenario is similar to the above sub-type. After the scene is switched, whether the slot position information can be multiplexed or not can be judged, for example, the conversation intention is 'buying an airline ticket', the current task scene is 'returning an airline ticket', the conversation intention is 'returning an airline ticket', the slot position information is multiplexed, part of slot position information which can be multiplexed can be reserved, the slot position information which cannot be multiplexed is deleted, the slot position information which is lacked in 'buying an airline ticket' is supplemented, and the entity information is filled again. For example, the conversation is intended to buy the air ticket, while the current task scene is that the conversation does not belong to the same main scene, and all the slot position information cannot be used, so all the slot position information can be deleted, then the slot position information required by buying the air ticket is supplemented, and the entity information is filled again. The specific implementation is similar to the above steps S301 to S306, and redundant description is omitted for brevity.
Step S905: and selecting a conversation processing flow according to the conversation intention of the user, the task scene and a preset conversation strategy configuration file, and determining a conversation processing task.
The dialog policy profile may refer to table 2 below, and select a dialog process flow and determine a dialog process task according to a plurality of determination conditions in table 2:
TABLE 2
Figure BDA0003230150150000111
Wherein the latest _ action column indicates the last action (task processing node), which is similar to the dialog processing task previously executed for the dialog intention, s _ domain indicates the main scene, which is similar to the main type, s _ frame indicates the sub scene, which is similar to the sub type, and the intent indicates the intention, which is similar to the dialog intention of the user, and latest _ bot _ issue indicates the last reply of the robot, which is similar to the reply information generated by the dialog processing task previously executed, and next _ action indicates the action to be executed next, which is similar to the dialog processing task currently intended.
For example, the last task processing node is judged, if yes, the option is judged according to the main scene corresponding to the last task processing node, if not, the main scene is directly judged, and the like is repeated until the next task processing node needing to be executed is judged, and the conversation processing flow is determined. In one embodiment, the specific implementation is similar to the above steps S201 to S203, and for brevity, the detailed description is omitted here.
After determining the dialog processing task, if there are multiple tasks to be executed, all the tasks may be saved in a task stack and then executed in sequence, and the specific implementation is similar to the above steps S801 to S807, and for brevity of description, no further description is given here.
Step S906: and executing the current conversation processing task node.
For a session processing task, it may include multiple session processing task nodes, where multiple session processing task nodes need to be executed to complete a session with a user, before executing a current session processing task node, it may be determined whether slot information needed by the current session processing task node is complete, if so, the current session processing task node may be executed, and a completion task is prompted or a next session processing task node is entered, if not, a user may be guided to input missing slot information, and the session processing task node is similar to the session processing task in step S501, and its specific implementation is similar to steps S501 to S503, and for brevity of description, it is not described here in too many details.
Step S907: and generating the reply information.
When the dialog processing task is executed, due to improper operation of the user or other reasons, for example, an airline ticket required by the user is sold out, etc., there may be an exception that the dialog processing task cannot be completed, and when the executed dialog processing task node is a preset exception node, a reply template may be selected from a preset template library according to the current dialog processing task node and the exception reason, and the user is replied according to the reply template.
It should be noted that, although the foregoing embodiments describe each step in a specific sequence, those skilled in the art will understand that, in order to achieve the effect of the present invention, different steps do not necessarily need to be executed in such a sequence, and they may be executed simultaneously (in parallel) or in other sequences, and these changes are all within the protection scope of the present invention.
Furthermore, the invention also provides a dialogue processing system.
Referring to fig. 9, fig. 9 is a main structural block diagram of a dialogue processing system according to an embodiment of the present invention. As shown in fig. 9, the dialogue processing system in the embodiment of the present invention mainly includes a dialogue intention determining module 91, a query condition determining module 92, a dialogue processing task determining module 93, and a reply information generating module 94. In some embodiments, one or more of the dialogue intention determination module 91, the query condition determination module 92, the dialogue processing task determination module 93, and the reply information generation module 94 may be combined together into one module. In some embodiments, the dialog intent determination module 91 may be configured to perform semantic analysis on the received input information to determine the user's dialog intent while conducting a dialog with the user. The query condition determination module 92 may be configured to determine a dialog policy query condition based on the dialog intent. The dialog processing task determination module 93 may be configured to query a preset dialog policy configuration file using the dialog policy query condition to determine a dialog processing task of the dialog intention; the preset dialogue strategy configuration file is a configuration file of a tree data structure generated according to a plurality of different dialogue processing tasks and dialogue strategy query conditions corresponding to each dialogue processing task. The reply information generation module 94 may be configured to generate a reply information to complete a conversation with the user by performing a conversation processing task. In one embodiment, the description of the specific implementation function may refer to the description of step S101 to step S104.
In one embodiment, the query condition determination module is further configured to perform the following operations:
determining whether a dialog processing task has been performed for the dialog intent;
if so, determining a conversation strategy query condition according to the conversation intention, a conversation processing task executed for the previous time aiming at the conversation intention and reply information generated by the conversation processing task executed for the previous time;
if not, determining the query conditions of the conversation strategy directly according to the conversation intention. In one embodiment, the description of the specific implementation function may refer to the descriptions of step S201 to step S203.
In one embodiment, the reply information generation module is further configured to perform the following operations:
judging whether the dialog processing tasks with other dialog intentions are executed before the dialog processing task with the current dialog intention is executed;
if not, acquiring slot position information required by the conversation processing task of the current conversation intention according to the input information;
if the dialog intentions are executed, acquiring intention types of the current dialog intention and other dialog intentions respectively;
if the current conversation intention and the intention types of other conversation intentions belong to different subtypes under the same preset main type, determining slot position information required by the conversation processing task of the current conversation intention according to slot position information adopted when the conversation processing tasks of other conversation intentions are executed;
if the intention types of the current conversation intention and other conversation intentions belong to different preset main types respectively, obtaining slot position information required by a conversation processing task of the current conversation intention according to input information and outputting information confirmation reminding information;
and executing the conversation processing task according to the slot position information required by the conversation processing task with the current conversation intention, and generating reply information. In one embodiment, the description of the specific implementation function may refer to the descriptions of step S301 to step S306.
In one embodiment, the reply information generation module is further configured to perform the following operations:
performing semantic analysis on input information, and determining entity information contained in the input information, wherein the entity information can comprise named entity information, digital entity information and time entity information;
and determining entity relationships among the named entity information, the digital entity information and the time entity information, and acquiring slot position information required by the conversation processing task of the current conversation intention according to the entity relationships and the entity relationships. In one embodiment, the description of the specific implementation function may refer to the descriptions of step S401 to step S402.
In one implementation of this embodiment, the reply information generation module is further configured to perform the following operations:
judging whether slot position information required for executing the conversation processing task is lacked;
if so, guiding the user to input the missing slot position information according to the missing slot position information;
if not, executing the dialogue processing task and generating the reply information. In one embodiment, the description of the specific implementation function may refer to the description of step S501 to step S503.
In one embodiment, the dialog processing task is multiple, and the reply information generation module is further configured to:
storing the conversation processing task into a preset task stack;
and sequentially acquiring and executing each conversation processing task from the task stack, and outputting task execution completion reminding information after all the conversation processing tasks are completed. In one embodiment, the description of the specific implementation function may refer to the description of step S601 to step S602.
In one implementation of this embodiment, the information generation module is further configured to perform the following operations:
judging whether the conversation processing task is a preset abnormal conversation processing task or not;
if so, acquiring a corresponding reply template from a preset reply template library according to the abnormal conversation processing task, and sending an abnormal prompt according to the reply template;
if not, generating the reply information by executing the dialogue processing task. In an embodiment, the description of the specific implementation function may refer to the description of step S701 to step S703.
In one implementation of this embodiment, the dialog intent determination module is further configured to:
performing semantic analysis on input information by adopting a preset intention classification model, and determining one or more conversation intentions of a user, wherein the preset intention classification model is obtained by training according to training samples corresponding to a plurality of different conversation intentions.
For the above-mentioned dialog processing system to be used for executing the embodiments of the dialog processing method shown in fig. 1 to 8, the technical principles, the solved technical problems and the generated technical effects of the two are similar, and it can be clearly understood by those skilled in the art that for convenience and brevity of description, the specific working process and related descriptions of the dialog processing system may refer to the contents described in the embodiments of the dialog processing method, and no further description is given here.
Furthermore, the invention also provides a task robot.
Referring to fig. 11, fig. 11 illustrates a task robot according to an embodiment of the present invention. As shown in fig. 11, in the present embodiment, the task robot includes a natural language understanding module M0 and a dialogue nursing module M1, where the natural language understanding module includes a multiple intention extracting module M1, a named entity extracting module M2, a digital entity converting module M3, a time entity converting module M4, and an entity relation obtaining module M5, and the dialogue management module includes a scenario management module M6, a slot information management module M7, a flow control module M8, a task node processing module M9, a generation reply module M10, a user information management module M11, and an exception handling module M12.
In one embodiment, the multi-intention extraction module m1 is configured to perform semantic analysis on the input information to obtain the dialog intention of the user; the named entity extraction module m2 is configured to perform semantic analysis on input information received during conversation with a user, and acquire entity information in the input information; the digital entity conversion module m3 is configured to convert the digital information in the entity information into a standard digital format; the time entity conversion module m4 is configured to convert the time information in the entity information into a standard time format; the entity relationship obtaining module m5 is configured to determine the entity relationship of the entity information; the scene management module m6 is configured to switch task scenes according to the user's dialog intention; the slot position information management module m7 is configured to fill in slot position information according to the entity information and the entity relationship; the flow control module m8 is configured to select a conversation processing flow according to the conversation intention of the user, the task scene and a preset conversation strategy configuration file, and determine a conversation processing task; the task node processing module m9 is configured to execute the current dialogue processing task node; the generation reply module 10 is configured to generate prompt information for completing the task after the current session processing task node completes execution; the user information management module 11 is configured to manage input information of a user when executing a current session processing task node, and guide the user to input missing slot information when it is determined that slot information required by the current session processing task node is incomplete; the exception handling module m12 is configured to, when the executed session processing task node is a preset exception node, select a reply template from a preset template library according to the current session processing task node and the exception reason, and reply to the user according to the reply template.
The description of the functions of the specific implementation of the task robot may refer to steps S901 to S907, and for brevity of description, the detailed description is omitted here.
It will be understood by those skilled in the art that all or part of the flow of the method according to the above-described embodiment may be implemented by a computer program, which may be stored in a computer-readable storage medium and used to implement the steps of the above-described embodiments of the method when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying said computer program code, media, usb disk, removable hard disk, magnetic diskette, optical disk, computer memory, read-only memory, random access memory, electrical carrier wave signals, telecommunication signals, software distribution media, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Furthermore, the invention also provides a control device. In an embodiment of the control device according to the present invention, the control device comprises a processor and a storage device, the storage device may be configured to store a program for executing the dialogue handling method of the above-described method embodiment, and the processor may be configured to execute the program in the storage device, the program including but not limited to the program for executing the dialogue handling method of the above-described method embodiment. For convenience of explanation, only the parts related to the embodiments of the present invention are shown, and details of the specific techniques are not disclosed. The control device may be a control device apparatus formed including various electronic apparatuses.
Further, the invention also provides a computer readable storage medium. In one computer-readable storage medium embodiment according to the present invention, a computer-readable storage medium may be configured to store a program that executes the dialogue processing method of the above-described method embodiment, and the program may be loaded and executed by a processor to implement the above-described dialogue processing method. For convenience of explanation, only the parts related to the embodiments of the present invention are shown, and details of the specific techniques are not disclosed. The computer readable storage medium may be a storage device formed by including various electronic devices, and optionally, the computer readable storage medium is a non-transitory computer readable storage medium in the embodiment of the present invention.
Further, it should be understood that, since the configuration of each module is only for explaining the functional units of the apparatus of the present invention, the corresponding physical devices of the modules may be the processor itself, or a part of software, a part of hardware, or a part of a combination of software and hardware in the processor. Thus, the number of individual modules in the figures is merely illustrative.
Those skilled in the art will appreciate that the various modules in the apparatus may be adaptively split or combined. Such splitting or combining of specific modules does not cause the technical solutions to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or combining will fall within the protection scope of the present invention.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (12)

1. A method of dialog processing, the method comprising:
performing semantic analysis on the received input information when a conversation is performed with a user, and determining the conversation intention of the user;
determining a dialogue strategy query condition according to the dialogue intention;
querying a preset conversation strategy configuration file by adopting the conversation strategy query condition to determine a conversation processing task of the conversation intention; the preset dialogue strategy configuration file is a configuration file of a tree data structure generated according to a plurality of different dialogue processing tasks and dialogue strategy query conditions corresponding to each dialogue processing task;
generating a reply message by executing the dialogue processing task to complete the dialogue with the user.
2. The dialog processing method according to claim 1, wherein the step of determining the dialog policy query condition based on the dialog intention specifically comprises:
determining whether a dialog processing task has been performed for the dialog intent;
if so, determining the dialogue strategy query condition according to the dialogue intention, a dialogue processing task executed for the previous time aiming at the dialogue intention and reply information generated by the dialogue processing task executed for the previous time;
if not, determining the dialogue strategy query condition directly according to the dialogue intention.
3. The conversation processing method according to claim 1, wherein the step of generating the reply message by executing the conversation processing task specifically includes:
judging whether the dialog processing tasks with other dialog intentions are executed before the dialog processing task with the current dialog intention is executed;
if not, acquiring slot position information required by the conversation processing task of the current conversation intention according to the input information;
if the dialog intentions are executed, acquiring intention types of the current dialog intention and the other dialog intentions respectively;
if the intention types of the current conversation intention and the other conversation intentions belong to different sub-types under the same preset main type, determining slot position information required by the conversation processing task of the current conversation intention according to slot position information adopted when the conversation processing tasks of the other conversation intentions are executed;
if the intention types of the current conversation intention and the other conversation intentions belong to different preset main types respectively, obtaining slot position information required by a conversation processing task of the current conversation intention according to the input information and outputting information confirmation reminding information;
and executing the conversation processing task according to the slot position information required by the conversation processing task with the current conversation intention, and generating reply information.
4. The dialog processing method according to claim 3, wherein the step of acquiring slot information required for the dialog processing task of the current dialog intention according to the input information specifically includes:
performing semantic analysis on the input information, and determining entity information contained in the input information, wherein the entity information comprises named entity information, digital entity information and time entity information;
determining entity relationships among the named entity information, the digital entity information and the time entity information, and acquiring slot position information required by a conversation processing task of the current conversation intention according to the entity information and the entity relationships;
and/or the like and/or,
before the step of "executing the conversation processing task according to the slot information required by the conversation processing task of the current conversation intention", the method further includes:
judging whether slot position information required by executing the conversation processing task is lacked;
if so, guiding a user to input the missing slot position information according to the missing slot position information;
and if not, executing the conversation processing task and generating reply information.
5. The conversation processing method according to claim 1, wherein the number of the conversation processing tasks is plural, and the step of generating the reply message by executing the conversation processing task further comprises:
storing the conversation processing task into a preset task stack;
sequentially acquiring and executing each conversation processing task from the task stack, and outputting task execution completion reminding information after all conversation processing tasks are executed;
and/or the like and/or,
the step of "generating a reply message by executing the dialogue processing task" further includes:
judging whether the conversation processing task is a preset abnormal conversation processing task or not;
if so, acquiring a corresponding reply template from a preset reply template library according to the abnormal conversation processing task, and sending an abnormal prompt according to the reply template;
if not, generating reply information by executing the conversation processing task;
and/or the like and/or,
the step of "determining the dialog intention of the user" specifically includes:
and performing semantic analysis on the input information by adopting a preset intention classification model, and determining one or more dialog intentions of the user, wherein the preset intention classification model is obtained by training according to training samples corresponding to a plurality of different dialog intentions.
6. A dialog processing system, characterized in that the system comprises:
a dialogue intention determination module configured to perform semantic analysis on the received input information while conversing with the user, determining a dialogue intention of the user;
a query condition determination module configured to determine a dialog policy query condition based on the dialog intent;
a dialogue processing task determination module configured to query a preset dialogue strategy configuration file by using the dialogue strategy query condition to determine a dialogue processing task of the dialogue intention; the preset dialogue strategy configuration file is a configuration file of a tree data structure generated according to a plurality of different dialogue processing tasks and dialogue strategy query conditions corresponding to each dialogue processing task;
a reply information generation module configured to generate a reply information to complete a conversation with a user by performing the conversation processing task.
7. The dialog processing system of claim 6 wherein the query condition determination module is further configured to:
determining whether a dialog processing task has been performed for the dialog intent;
if so, determining the dialogue strategy query condition according to the dialogue intention, a dialogue processing task executed for the previous time aiming at the dialogue intention and reply information generated by the dialogue processing task executed for the previous time;
if not, determining the dialogue strategy query condition directly according to the dialogue intention.
8. The dialog processing system of claim 6 wherein the reply information generation module is further configured to:
judging whether the dialog processing tasks with other dialog intentions are executed before the dialog processing task with the current dialog intention is executed;
if not, acquiring slot position information required by the conversation processing task of the current conversation intention according to the input information;
if the dialog intentions are executed, acquiring intention types of the current dialog intention and the other dialog intentions respectively;
if the intention types of the current conversation intention and the other conversation intentions belong to different sub-types under the same preset main type, determining slot position information required by the conversation processing task of the current conversation intention according to slot position information adopted when the conversation processing tasks of the other conversation intentions are executed;
if the intention types of the current conversation intention and the other conversation intentions belong to different preset main types respectively, obtaining slot position information required by a conversation processing task of the current conversation intention according to the input information and outputting information confirmation reminding information;
and executing the conversation processing task according to the slot position information required by the conversation processing task with the current conversation intention, and generating reply information.
9. The dialog processing system of claim 8 wherein the reply information generation module is further configured to:
performing semantic analysis on the input information, and determining entity information contained in the input information, wherein the entity information comprises named entity information, digital entity information and time entity information;
determining entity relationships among the named entity information, the digital entity information and the time entity information, and acquiring slot position information required by a conversation processing task of the current conversation intention according to the entity information and the entity relationships;
and/or the like and/or,
the reply information generation module is further configured to perform the following operations:
judging whether slot position information required by executing the conversation processing task is lacked;
if so, guiding a user to input the missing slot position information according to the missing slot position information;
and if not, executing the conversation processing task and generating reply information.
10. The dialog processing system of claim 6 wherein the dialog processing task is a plurality, the reply information generation module further configured to:
storing the conversation processing task into a preset task stack;
sequentially acquiring and executing each conversation processing task from the task stack, and outputting task execution completion reminding information after all conversation processing tasks are executed;
and/or the like and/or,
the reply information generation module is further configured to perform the following operations:
judging whether the conversation processing task is a preset abnormal conversation processing task or not;
if so, acquiring a corresponding reply template from a preset reply template library according to the abnormal conversation processing task, and sending an abnormal prompt according to the reply template;
if not, generating reply information by executing the conversation processing task;
and/or the like and/or,
the dialog intent determination module is further configured to perform the following operations:
and performing semantic analysis on the input information by adopting a preset intention classification model, and determining one or more dialog intentions of the user, wherein the preset intention classification model is obtained by training according to training samples corresponding to a plurality of different dialog intentions.
11. A control apparatus comprising a processor and a storage device adapted to store a plurality of program codes, wherein said program codes are adapted to be loaded and run by said processor to perform a dialog processing method according to any of claims 1 to 5.
12. A computer-readable storage medium in which a plurality of program codes are stored, characterized in that the program codes are adapted to be loaded and executed by a processor to perform the dialog processing method according to any of claims 1 to 5.
CN202110984181.6A 2021-08-25 2021-08-25 Dialogue processing method, system, device and computer readable storage medium Pending CN113705249A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110984181.6A CN113705249A (en) 2021-08-25 2021-08-25 Dialogue processing method, system, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110984181.6A CN113705249A (en) 2021-08-25 2021-08-25 Dialogue processing method, system, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113705249A true CN113705249A (en) 2021-11-26

Family

ID=78654867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110984181.6A Pending CN113705249A (en) 2021-08-25 2021-08-25 Dialogue processing method, system, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113705249A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610856A (en) * 2022-03-16 2022-06-10 零犀(北京)科技有限公司 Dialog interaction intelligent decision-making method and device based on causal graph

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610856A (en) * 2022-03-16 2022-06-10 零犀(北京)科技有限公司 Dialog interaction intelligent decision-making method and device based on causal graph

Similar Documents

Publication Publication Date Title
CN109286724B (en) Data interaction method and device based on short message
CN104078043B (en) The voice operating instruction identifying processing method and system of internet trading system
JP7086137B2 (en) How and equipment to display information
CN111626452B (en) Intelligent government affair processing method, device, terminal and medium
CN109117235B (en) A kind of business data processing method, device and relevant device
CN104123650A (en) Text operation instruction recognition processing method for network transaction system and system thereof
CN110188185A (en) Processing method, device, equipment and the storage medium of more wheel dialogues
CN107944851B (en) Group fund account management method, device and system
CN109271503A (en) Intelligent answer method, apparatus, equipment and storage medium
CN111126071B (en) Method and device for determining questioning text data and method for processing customer service group data
CN110147440A (en) Information push method, device, computer equipment and storage medium
CN112434501A (en) Work order intelligent generation method and device, electronic equipment and medium
CN113705249A (en) Dialogue processing method, system, device and computer readable storage medium
CN111142834A (en) Service processing method and system
CN111666388B (en) Dialogue data processing method, device, computer equipment and storage medium
CN113139044A (en) Question-answering multi-turn dialogue method supporting multi-intention switching for question-answering system
CN109871129B (en) Human-computer interaction method and device, customer service equipment and storage medium
CN112529585A (en) Interactive awakening method, device, equipment and system for risk transaction
CN112929499B (en) Dialogue interaction method and device, computer equipment and computer-readable storage medium
CN114511393B (en) Financial data processing method and system
CN114726818B (en) Network social method, device, equipment and computer readable storage medium
CN115062629A (en) Session information identification method and device, storage medium and computer equipment
CN111708693B (en) Multi-round session system testing method and device
CN113822670A (en) Payment message conversion method and device and electronic equipment
CN114138943A (en) Dialog message generation method and device, electronic equipment and storage medium

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