Response method, dialogue system and storage medium in human-computer dialogue

By introducing expected user intention processing logic into the human-computer dialogue system, and using expected user intention association in historical dialogue, the reference and omission problems in user intention recognition are solved, and the response accuracy and coherence of the dialogue system are improved.

CN111737411BActive Publication Date: 2024-11-22HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202010431996.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-20
Publication Date
2024-11-22
Estimated Expiration
2040-05-20

AI Technical Summary

Technical Problem

When existing human-computer dialogue systems handle user references and omissions, it is difficult to accurately understand user intentions, resulting in poor consistency of dialogue and low accuracy of response statements, which cannot fully cover the user's expression methods, resulting in the inability to respond statements generated by the dialogue system. Hit the user's intention.

Method used

By obtaining the user's reply statement, intent recognition is performed, adjacent response statements in the historical dialogue are obtained, target expected user intentions match the candidate user's intentions, and responses of interactive devices are determined using target expected user intentions and historical response statements to realize dialogue The context connection of the system and the user intent association.

Benefits of technology

It improves the accuracy of the dialogue system to generate response statements, enhances the context understanding ability of the dialogue system, improves the coherence of human-computer dialogue, and ensures that the dialogue system can better handle user incomplete or reference expressions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111737411B_ABST
    Figure CN111737411B_ABST
Patent Text Reader

Abstract

The present application provides a response method, a dialogue system and a storage medium in a human-computer dialogue, and belongs to the field of artificial intelligence technology. The present application can be applied to a dialogue robot, such as a children's companion education robot. During a dialogue between a user and a machine, the present application determines the user's intention in this round of dialogue based on the expected user intention associated with the machine's answer to the user in the previous round of dialogue, and then responds. Since the processing logic of the expected user intention is introduced, the accuracy of the generated response statement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a response method, a dialogue system and a storage medium in a human-computer dialogue. Background Art

[0002] In daily conversations, reference and omission are common language phenomena. In human-computer dialogues, when users use reference and omission, the dialogue system needs to understand the user's true intention based on the context, so as to ensure that the human-computer dialogue is more fluent and natural.

[0003] Nowadays, the dialogue system can use the user intent associated with the previous round of dialogue to understand the user intent of the current round of dialogue. Specifically, when the developer configures user intent A and response A corresponding to user intent A for a round of dialogue, the developer will also configure the expected user response statement B for the interactive device in the next round of dialogue and the user intent B corresponding to the user response statement B for the interactive device. When the user initiates a dialogue, if the user's current response statement matches response statement B, the user's current response statement will hit user intent B, then the dialogue system will determine the response statement based on user intent B, and reply to the user's response statement for the interactive device through the response statement.

[0004] The same user intent usually has various ways of expression, and when developers configure the user's reply statement to the interactive device and the corresponding user intent, they cannot fully cover the user's expression methods. Therefore, when using the above method, the current user's reply statement to the interactive device has not been pre-configured, resulting in the user intent associated with the previous round of dialogue not being hit according to the user's reply statement to the interactive device, resulting in poor dialogue coherence and low accuracy of the response statement generated by the dialogue system. Summary of the invention

[0005] The embodiment of the present application provides a response method, a dialogue system and a storage medium in a human-computer dialogue, which can improve the coherence of the human-computer dialogue. The technical solution is as follows:

[0006] In a first aspect, a response method in a human-computer dialogue is provided, in which a reply statement of a user to an interactive device is obtained; intent recognition is performed on the reply statement to obtain a candidate user intent; a historical response statement of an interactive device adjacent to the reply statement in a historical dialogue is obtained; a target expected user intent matching the candidate user intent is determined from a plurality of expected user intents associated with the historical response statements, the expected user intent being used to represent a category of an expected reply of the user to the historical response statement; and a target response of the interactive device to the reply statement is determined based on the target expected user intent and the historical response statement.

[0007] For example, the expected user intention is to indicate a positive response, such as the expected user intention is "yes", and for example, the expected user intention is to indicate a negative response. For example, the expected user intention is to indicate a like, and for example, the expected user intention is to indicate a dislike.

[0008] The above method associates the response statement issued by the interactive device with the expected user intent. When the user initiates a round of dialogue, the dialogue system will give priority to the target expected user intent that matches the historical response statement when screening the user intent from the candidate user intent of this round of dialogue. The dialogue system will use the target expected user intent to determine the response statement. Since the processing logic of the expected user intent is introduced, the expected user intent of the historical dialogue is passed to the current dialogue for use, thus realizing the user intent association between the historical dialogue and the current dialogue, improving the accuracy of the response statement generated by the dialogue system, helping to improve the context connection ability of the dialogue system, and improving the coherence of the human-computer dialogue.

[0009] Optionally, the target response is to output a response statement, or the target response is to execute a corresponding instruction, such as playing a song.

[0010] Optionally, determining a target response of the interactive device to the reply statement according to the target expected user intention and the historical response statement includes:

[0011] Determine the jump user intention according to the historical response statement and the target expected user intention;

[0012] Determining, according to the jump user intention, an instruction corresponding to the jump user intention;

[0013] Execute the instruction corresponding to the jump user intention.

[0014] Optionally, determining a target expected user intent matching the candidate user intent from a plurality of expected user intents associated with the historical response statements includes:

[0015] From a plurality of expected user intentions associated with the historical response sentences, an expected user intention that is the same as the candidate user intention is determined as the target expected user intention.

[0016] In a second aspect, a response method in a human-computer dialogue is provided, the method comprising:

[0017] Obtain the user's reply statement to the interactive device;

[0018] Performing intent recognition on the reply sentence to obtain candidate user intent;

[0019] Acquire historical response statements of the interactive device adjacent to the reply statement in the historical conversation;

[0020] Determine, from a plurality of expected user intentions associated with the historical response statements, a target expected user intention that matches the candidate user intention, the expected user intention being used to represent content of an expected reply of the user to the historical response statement;

[0021] A target response statement of the interactive device to the reply statement is determined according to the target expected user intention.

[0022] For example, the expected user intent is "ask about the weather in Beijing", and another example is "ask about the route to Shenzhen".

[0023] Optionally, determining a target response statement of the interactive device to the reply statement according to the target expected user intention and the historical response statement includes:

[0024] According to the correspondence between the historical response statement and at least one candidate response statement template, obtaining at least one candidate response statement template corresponding to the historical response statement, wherein the candidate response statement template is used to represent the sentence pattern of the target response statement;

[0025] According to the correspondence between the target expected user intention and the target response statement template, acquiring the target response statement template matching the target expected user intention from the at least one candidate response statement template;

[0026] A target response statement of the interactive device to the reply statement is determined according to the target response statement template and the historical response statement.

[0027] Optionally, determining a target response statement of the interactive device to the reply statement according to the target response statement template and the historical response statement includes:

[0028] Acquire a target keyword, where the target keyword is used to represent a key content of the conversation of the historical conversation;

[0029] Identifying the type of the target keyword;

[0030] The target keyword is filled into the first target slot corresponding to the type in the target response statement template to obtain the target response statement.

[0031] Optionally, obtaining the target keyword includes:

[0032] extracting the target keyword in the historical response sentence; or,

[0033] extracting the target keyword from the historical reply statements of the user to the interactive device in the historical conversation; or,

[0034] Configuration information is queried to obtain the target keyword associated with the historical response statement, wherein the configuration information includes a preset association relationship between the historical response statement and the target keyword.

[0035] Optionally, the extracting the target keyword from the historical response sentence includes: performing named entity recognition on the historical response sentence, and using the obtained common named entity as the target keyword.

[0036] Optionally, extracting the target keyword from the user's historical reply statements to the interactive device in the historical conversation includes: performing named entity recognition on the historical reply statements, and using the obtained common named entities as the target keyword.

[0037] Optionally, after performing intent recognition on the reply statement to obtain a candidate user intent, the method further includes:

[0038] When it is identified that the candidate user intention lacks the information required to determine the target response statement, the step of determining the target response statement of the interactive device to the reply statement based on the target expected user intention is performed.

[0039] Optionally, determining a target expected user intent matching the candidate user intent from a plurality of expected user intents associated with the historical response statements includes:

[0040] From among a plurality of expected user intentions associated with the historical response sentences, an expected user intention including the candidate user intention is determined as the target expected user intention.

[0041] In a third aspect, a dialogue system is provided, the dialogue system comprising:

[0042] An acquisition module, used to acquire a user's reply statement to the interactive device;

[0043] A recognition module, used to perform intent recognition on the reply sentence to obtain candidate user intents;

[0044] The acquisition module is further used to acquire historical response statements of the interactive device adjacent to the reply statement in the historical conversation;

[0045] A determination module, configured to determine a target expected user intent that matches the candidate user intent from a plurality of expected user intents associated with the historical response statements, wherein the expected user intent is used to represent a category of an expected reply of the user to the historical response statement;

[0046] The determination module is further used to determine a target response of the interactive device to the reply statement based on the target expected user intention and the historical response statement.

[0047] Optionally, the determination module is used to determine the jump user intention according to the historical response statement and the target expected user intention; and determine the instruction corresponding to the jump user intention according to the jump user intention;

[0048] The dialogue system further includes: an execution module, configured to execute instructions corresponding to the jump user intention.

[0049] Optionally, the determination module is used to determine an expected user intent that is the same as the candidate user intent from multiple expected user intents associated with the historical response statements as the target expected user intent.

[0050] Optionally, the dialogue system is a terminal, for example, a mobile phone, a smart speaker, a chat robot, etc.

[0051] Optionally, the dialogue system is a cloud device, for example, the dialogue system is a server.

[0052] In a fourth aspect, a dialogue system is provided, the dialogue system comprising:

[0053] An acquisition module, used to acquire a user's reply statement to the interactive device;

[0054] A recognition module, used to perform intent recognition on the reply sentence to obtain candidate user intents;

[0055] The acquisition module is further used to acquire historical response statements of the interactive device adjacent to the reply statement in the historical conversation;

[0056] A determination module, configured to determine a target expected user intent that matches the candidate user intent from a plurality of expected user intents associated with the historical response statements, wherein the expected user intent is used to represent the content of the user's expected reply to the historical response statement;

[0057] The determination module is further used to determine a target response statement of the interactive device to the reply statement according to the target expected user intention.

[0058] Optionally, the determination module is used to obtain the target response statement template that matches the target expected user intention from the at least one candidate response statement template based on the correspondence between the target expected user intention and the candidate response statement template; and determine the target response statement of the interactive device to the reply statement based on the target response statement template and the historical response statement.

[0059] Optionally, the determination module is used to obtain a target keyword, where the target keyword is used to represent the key content of the conversation of the historical conversation; identify the type of the target keyword; and fill the target keyword into the first target slot corresponding to the type in the target response statement template to obtain the target response statement.

[0060] Optionally, the acquisition module is used to extract the target keyword from the historical response statement; or, to extract the target keyword from the historical reply statement of the user to the interactive device in the historical conversation; or, to query configuration information to obtain the target keyword associated with the historical response statement, the configuration information including a pre-set association relationship between the historical response statement and the target keyword.

[0061] Optionally, the acquisition module is used to perform named entity recognition on the historical response sentences, and use the obtained common named entities as the target keywords.

[0062] Optionally, the acquisition module is used to perform named entity recognition on the historical reply sentences, and use the obtained common named entities as the target keywords.

[0063] Optionally, the determination module is used to execute the step of determining a target response statement of the interactive device to the reply statement based on the target expected user intention when it is identified that the candidate user intention is missing.

[0064] Optionally, the determination module is used to determine an expected user intent including the candidate user intent from multiple expected user intents associated with the historical response statements as the target expected user intent.

[0065] Optionally, the dialogue system is a terminal, for example, a mobile phone, a smart speaker, a chat robot, etc.

[0066] Optionally, the dialogue system is a cloud device, for example, the dialogue system is a server.

[0067] In a fifth aspect, a dialogue system is provided, the dialogue system comprising a processor, the processor being used to execute instructions so that the dialogue system executes the response method in the human-computer dialogue provided by the first aspect or any optional manner of the first aspect. The specific details of the dialogue system provided by the third aspect can be found in the first aspect or any optional manner of the first aspect, and will not be repeated here.

[0068] In a sixth aspect, a dialogue system is provided, the dialogue system comprising a processor, the processor being used to execute instructions so that the dialogue system executes the response method in the human-computer dialogue provided in the second aspect or any optional manner of the second aspect. The specific details of the dialogue system provided in the sixth aspect can be found in the second aspect or any optional manner of the second aspect, and will not be repeated here.

[0069] In a seventh aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is read by a processor to enable a dialogue system to execute a response method in a human-computer dialogue provided by the first aspect or any optional method of the first aspect.

[0070] In an eighth aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the instruction is read by a processor to enable a dialogue system to execute a response method in a human-computer dialogue provided in the second aspect or any optional method of the second aspect.

[0071] In a ninth aspect, a computer program product is provided, which, when executed on a dialogue system, enables the dialogue system to execute the response method in the human-computer dialogue provided by the first aspect or any optional method of the first aspect.

[0072] In a tenth aspect, a computer program product is provided, which, when running on a dialogue system, enables the dialogue system to execute the response method in the human-computer dialogue provided by the second aspect or any optional method of the second aspect.

[0073] In the eleventh aspect, a chip is provided, which, when running on a dialogue system, enables the dialogue system to execute the response method in the human-computer dialogue provided by the first aspect or any optional method of the first aspect.

[0074] In a twelfth aspect, a chip is provided, which, when running on a dialogue system, enables the dialogue system to execute the response method in the human-computer dialogue provided by the second aspect or any optional method of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 is a schematic diagram of a system architecture 100 provided in an embodiment of the present application;

[0076] Figure 2 is a schematic diagram of a system architecture 200 provided in an embodiment of the present application;

[0077] Figure 3 is a flowchart of a method for configuring the context of a dialogue system provided by an embodiment of the present application;

[0078] Figure 4is a schematic diagram of a configuration interface of a dialogue system provided in an embodiment of the present application;

[0079] Figure 5 is a schematic diagram of a configuration interface of a dialogue system provided in an embodiment of the present application;

[0080] Figure 6 is a schematic diagram of a configuration interface of a dialogue system provided in an embodiment of the present application;

[0081] Figure 7 is a schematic diagram of a configuration interface of a dialogue system provided in an embodiment of the present application;

[0082] Figure 8 is a schematic diagram of a configuration interface of a dialogue system provided in an embodiment of the present application;

[0083] Fig. 9 is a schematic diagram of a configuration interface of a dialogue system provided in an embodiment of the present application;

[0084] Fig.10 is a flow chart of a model training method for human-computer dialogue provided in an embodiment of the present application;

[0085] Fig.11 is a flow chart of a response method in a human-computer dialogue provided by an embodiment of the present application;

[0086] Fig.12 is a flow chart of a response method in a human-computer dialogue provided by an embodiment of the present application;

[0087] Fig.13 is a flow chart of a response method in a human-computer dialogue provided by an embodiment of the present application;

[0088] Fig.14 is a flow chart of a response method in a human-computer dialogue provided by an embodiment of the present application;

[0089] Fig.15 is a schematic diagram of a multi-round human-computer dialogue provided by an embodiment of the present application;

[0090] Fig.16 is a schematic diagram of a multi-round human-computer dialogue provided by an embodiment of the present application;

[0091] Fig.17 is a structural diagram of a dialogue system 500 provided in an embodiment of the present application;

[0092] Fig.18 It is a structural diagram of a dialogue system 600 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0093] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0094] The following is an exemplary introduction to the application scenarios of this application.

[0095] The method and device provided in the embodiment of the present application can be applied to the scenario of human-computer dialogue in natural language processing (NLP) technology. Specifically, the embodiment of the present application can be applied to the scenario of building a dialogue robot and providing semantic understanding and dialogue services to end users. By combining the context in the dialogue system, information completion is realized, and functions such as chat context, active recommendation context, topic jump context, and command control context are supported, so that the device and the user can coherently conduct active recommendation, task-based or chat-based multi-round dialogues. Among them, the dialogue robot is, for example, a children's companion education robot, an after-sales automatic answering application, a pre-sales consulting robot, etc.

[0096] To facilitate understanding, the following is a brief introduction to the technology for implementing context in the field of human-computer dialogue.

[0097] In natural language dialogue, reference and omission are common language phenomena. In spoken dialogue systems or interactive question-answering dialogue systems, through reference and omission, users do not need to use sentences with complete semantics every time, and their expressions are more concise and natural. However, for natural language understanding, the use of reference and omission will cause the loss of grammatical or semantic components. Understanding the complete and true intention of users in the case of semantic loss is very important for building a smooth and natural dialogue system.

[0098] For example, the user first inputs the sentence "What's the weather in Beijing?", then the user inputs the sentence "What about Shanghai?", and finally the user inputs the sentence "What about the day after tomorrow?". In this example, the dialogue system can complete the missing information within the domain. For another example, the user first inputs the sentence "Is Jay Chou singing "Confession Balloon"?", then the user inputs the sentence "What movies has he acted in?". In this example, the dialogue system can complete the missing information between domains. For another example, the user first inputs the sentence "Let's sing a song", then the user inputs the sentence "One more". In this example, the dialogue system can clarify the user's specific user intention for general requests.

[0099] In addition, in communication between people, asking and answering each other is a common form of dialogue. Therefore, it is very important for the dialogue system to actively ask questions and make recommendations to improve the user experience. In addition, in order to improve the dialogue experience, the same user intent may set different response statements for interactive devices. If the response statement of the interactive device involves active recommendations / questions, it is necessary to associate the user intent and connect the context to ensure that the dialogue process proceeds normally.

[0100] In one possible implementation, reference resolution and omission completion techniques are used to handle references and ellipsis in conversations. Specifically, pre-configured rules or machine learning algorithms are used to complete missing semantic components to obtain complete sentences based on the input of this round of conversation and the history of the previous N rounds of conversations, and then intent recognition is performed. For example, the conversation history includes "Is the confession balloon sung by Jay Chou?", and the sentence input by the user in this round of conversation is "What movies has he acted in?", which is finally completed to "What movies has Jay Chou acted in". However, this method is difficult, and the best comprehensive evaluation index (F-Measure, F value) is around 70%, and in the case of completion errors, it will cause serious errors in the subsequent conversation process.

[0101] In another possible implementation, the dialogue state tracking (DST) technology and dialogue policy are used to manage the dialogue process. Specifically, a machine learning algorithm is used to learn a large number of dialogue histories in specific vertical domains (a limited number of domains, a limited number of slot variables). Among them, DST refers to the use of the N-best output results of the automatic speech recognition (ASR) and natural language understanding (NLU) modules and the system actions of the previous round to predict the current dialogue state (keyword distribution in each slot). The dialogue policy refers to the system action that decides the next step based on the dialogue state. However, this method has many limitations. It requires a large amount of multi-round dialogue data for training, and it must be limited to a limited field and a small number of slot variables, otherwise the model complexity is high. Among them, N represents a positive integer.

[0102] In another possible implementation, the functions of skills, user intent, and slot models in the chatbot (bot) platform are used to handle reference and omission in the dialogue. Specifically, the developer needs to enter the complete expression and incomplete (context) expression sentences or templates in the user intent (template) of the bot platform at the same time, and set whether the slot is mandatory, and ask or clarify the situation where the mandatory slot is missing. For example, the sentence entered by the user is "How is the weather?", and the dialogue system needs to ask "Can you please tell me your city?" to clarify the location corresponding to the user intent of asking about the weather. However, the current bot platform mainly supports the rapid development of a bot in a specific field, and can only support the user's reference or omission expression within the field. In addition, the bot platform does not distinguish between entry statements and context statements at the user intent level, resulting in the same context statement corresponding to different user intents being repeatedly entered. For example, the sentences entered by the user in two rounds of dialogue are "How is the weather in Shanghai" and "What about Beijing", and the sentences entered by the user in the other two rounds of dialogue are "Are there any tickets to Shanghai?" and "What about Beijing". "How's the weather in Shanghai?" and "Are there any tickets to Shanghai?" are different user intentions for asking about the weather and booking tickets, respectively, but they correspond to the same context statement "Where is Beijing?", which results in the repeated entry of the context statement "Where is Beijing?". In addition, context statements may trigger clarifications. For example, the context statement "Today" that hits the weather user intent will trigger the response statement "Please tell me about your city." In addition, repeated entry of context statements may cause the dialogue system to be unable to determine which context statement corresponds to the user intent when filtering results. For example, when a user enters the sentence "Where is Beijing?", the dialogue system may be unable to determine which user intent to return. In addition, the reply template or generated response statement of the dialogue system may contain active dialogue logic. For example, the response statement output by the dialogue system is "Do you like dinosaurs?", and the sentence entered by the user in the next round of dialogue is "I like it". In this case, the process of the next round of dialogue cannot be controlled. In addition, the bot platform cannot realize the jump from general user intent to specific user intent. For example, the response sentence output by the dialogue system is "How about I sing a song for you?", and the sentence input by the user in the next round of dialogue is "OK". The dialogue system can deduce the general user intent of affirmation from "OK". In order to have a smoother conversation, it is necessary to jump from the general user intent of affirmation to the user intent of playing a song.

[0103] In another possible implementation, two interfaces, input context and output context, are provided for user intent to control the dialog flow. Specifically, the steps of controlling the dialog flow include the following steps (1) to (3).

[0104] In step (1), the developer binds the output context to user intent A, which is the context flag (context_flag); the developer binds the input context to user intent B, which is also context_flag.

[0105] Step (2) The user initiates a request. If the statement entered by the user matches the user intention A, the dialogue system activates the output context, and the current context state includes context_flag.

[0106] In step (3), if the user initiates a request again, the dialog system will prioritize user intent B, and context_flag can pass parameters from user intent A to user intent B.

[0107] However, when the above method is adopted, there are the following disadvantages (1) to (3).

[0108] Disadvantages (1) If you want to implement a context, the configuration is complicated and cumbersome, and developers need to specifically design and implement the corresponding mechanism.

[0109] Disadvantage (2) The same incomplete user statement and expression may have different meanings. This method needs to define different user intents for each repeated user statement and expression, resulting in redundancy. For example, the user expression "one more" may mean one more song or one more dance. This method needs to repeatedly enter "one more" and create two user intents "one more song" and "one more dance" respectively.

[0110] Disadvantage (3) It is impossible to directly associate existing user intentions to connect conversations. Existing user intentions need to be rewritten, which makes it impossible to effectively utilize the already entered corpus and activate conversation resources.

[0111] In another possible implementation, the response to a certain user intention can be set to lead to another dialogue user intention, which controls the dialogue flow from step a to step b.

[0112] Step a: The developer sets the reply of user intent A to guide to another conversation user intent, and configures the expected next round of user request content to be content_B and the corresponding user intent B.

[0113] Step b: The user initiates a request. If the request content matches content_B, user intent B will be hit.

[0114] However, when the above method is adopted, there are the following disadvantages (a) and (b).

[0115] Disadvantages (a) When developers configure the expected next round of user request content, they cannot fully cover the user's expression methods, resulting in failure to hit the user's intention. For example, the expected user request content is "yes", but the user's actual expression may be "okay", "um", "YES", etc.

[0116] Disadvantage (b) Different user intents will configure the same expected next round of user request content, resulting in configuration redundancy. For example, the user intent "sing a song" configures the expected next round of user request content "one more" and the corresponding user intent "sing a song", and the user intent "dance" configures the expected next round of user request content "one more" and the corresponding user intent "dance".

[0117] In view of the above background, in some embodiments of the present application, it is considered that a certain context understanding capability needs to be implemented on the basis of the bot platform, including the following aspects (1) to (3).

[0118] (1) It is necessary to support the user's statement and understand the user's intention when the expression is incomplete. Incomplete statements are usually caused by the use of reference / omission.

[0119] (2) It is necessary to support the diversity of the dialogue system’s replies after matching the user’s intent. In addition, if the reply involves topic recommendation and topic jump, how to associate the next round of user intent and implement slot inheritance?

[0120] (3) Some common named entities in the conversation history need to be shared as slots across user intents.

[0121] In view of this, some embodiments of the present application provide a method and device for configuring the context of a dialogue system, which can solve the above-mentioned requirements at the bot platform level, realize the user intention association and context connection of multiple rounds of dialogue, and enhance the interactive experience of the dialogue robot. The technical problems to be solved by some embodiments of the present application include the following (1) to (6).

[0122] (1) To address the problem of complex and tedious context configuration, a context configuration solution was designed that is simple and convenient.

[0123] (2) Supporting the entry and parsing of incomplete expressions: This solves the problem in existing solutions that similar expressions need to be entered repeatedly and similar expressions cannot determine which user intent is returned, which is the above-mentioned shortcoming (2).

[0124] (3) The response statement supporting the user intention is associated with the expected user intention of the next round of dialogue, and the jump user intention that the expected user intention of the next round of dialogue may correspond to. Specifically, the response statement of the expected user to the interactive device in the next round of dialogue is changed to the expected user intention and the jump user intention, which solves the shortcomings (a) and (b) and solves the above-mentioned shortcoming (3).

[0125] (4) Reuse the common named entity slots in the conversation history to fill the missing slots of the user's incomplete expression, thereby solving the problem that the current bot platform cannot reuse the common named entity slots in the conversation history (across user intents).

[0126] (5) The slots and user intentions already entered in the dialogue system can be used for inheritance and jump, greatly reducing the amount of repeated development.

[0127] (6) It breaks away from the limitation of supporting reference or omission only within the same domain, making it easier to implement cross-domain context.

[0128] In some of the following embodiments, a configuration method for user intent reply is first provided, including configuring expected user intent and jump user intent for the response statement of user intent, and configuring keywords to be passed to the next round of dialogue. By obtaining and processing the configuration information, the user intent association and slot inheritance of the current round of dialogue and the next round of dialogue are realized.

[0129] Secondly, a configuration method for user intent types and user intent associations is provided. User intent types are divided into entry intent and context intent: entry intent is a complete expression of a user's description of a specific need, and context intent is an incomplete expression of a user's specific need. It also supports obtaining the type configured for user intent and other user intents associated with user intent. In this way, the continuity of multiple rounds of conversations within the domain is achieved and the error of hitting context intent without context is avoided.

[0130] Finally, a configuration is provided for user intent to determine whether to use public named entities. By obtaining and processing configuration information, cross-user intent sharing of public named entity slots is achieved.

[0131] Through the above technical points, a new context development device is provided, which helps to easily realize context control, dialogue flow control, active recommendation, and multi-round task-based and chat-based dialogues on the content development platform.

[0132] Since the embodiments of the present application involve the application of NLP technology, in order to facilitate understanding, the terminology-related concepts in the NLP technology involved in the embodiments of the present application are first introduced below.

[0133] User intent is used to describe the purpose of voice interaction between users and machines, such as booking air tickets, asking about the weather, and communicating about topics such as talking about animals.

[0134] Slots are used to describe some parameter information in the user's intention, such as the departure time, departure place, and destination of booking a flight.

[0135] Slot extraction: In NLP tasks, for the input text content, the dialogue system can extract the structured information contained in the text content based on some established structured fields. For example, if the text content is "How is the weather today?", the dialogue system can extract a keyword indicating time: "today". For example, if the text content is "I want to go to Shenzhen", the dialogue system can extract a keyword indicating location: "Shenzhen".

[0136] Slots to be filled: refers to the empty slots in the response sentence that the dialogue system needs to return. The process of adding keywords to the slots to be filled is called slot filling. Slot filling can complete the information, thus helping to convert user intent into clear instructions from the user.

[0137] Bot refers to Chatbot, which is an intelligent conversation robot, also known as VA (Virtual Assistant). The core of bot is an intelligent conversation system based on natural language understanding, integrating artificial intelligence technologies such as knowledge management and learning, intelligent voice, and image recognition. The bot platform is currently a popular framework or tool for building conversational robots. Developers define user intent and slots on the bot platform, add conversation materials and perform simple annotations. After the bot platform trains the model, it can provide NLU and conversation capabilities for users (the service objects of the conversational robot).

[0138] The following introduces the system architecture provided by the embodiments of the present application.

[0139] See attached Figure 1 , an embodiment of the present application provides a system architecture 100. The system architecture 100 includes a data entry device 103, a client access device 104, and a server 105. Optionally, the data entry device 103 and the client access device 104 are terminals, such as a smart phone, a desktop computer, a tablet computer, or a laptop computer. The server 105 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center.

[0140] Developer 101 enters user intent, response statements and slot data through data entry device 103, and data entry device 103 transmits the entered data to server 105, which stores the entered data, performs model training and provides semantic understanding or human-computer dialogue capabilities. User 102 sends a semantic understanding or human-computer dialogue request to server 105 through client access device 104, and server 105 replies to client access device 104 with the result of semantic understanding or a dialogue response statement.

[0141] The data entry device 103 is installed and runs an application program that supports the bot platform, which can be a client of the bot platform. The application program can provide a configuration interface of the bot platform so that developers can enter user intent, response statements and slot data on the configuration interface.

[0142] The server 105 is used to provide background services for the bot platform. In other words, the server 105 can be the background server of the bot platform. Optionally, in the process of the bot platform processing business, the server 105 undertakes the main processing work, and the data entry device 103 undertakes the secondary processing work; or, the server 105 undertakes the secondary processing work, and the data entry device 103 undertakes the main processing work; or, the server 105 or the data entry device 103 can undertake the processing work separately. Alternatively, the server 105 and the data entry device 103 use a distributed computing architecture for collaborative computing.

[0143] The bot platform can be used to provide, deploy and run human-computer dialogue applications, such as dialogue robot applications. Human-computer dialogue applications can be client applications or web applications. Human-computer dialogue applications can be independent applications, or small programs or services embedded in application clients such as instant messaging applications and shopping applications. For example, human-computer dialogue applications can be intelligent customer service in shopping applications, recruitment assistants in recruitment websites, etc.

[0144] The client access device 104 installs and runs a human-computer dialogue application, and the user can input statements through the client access device 104. Optionally, during the human-computer dialogue process, the server 105 undertakes the main processing work, for example, the server 105 undertakes the task of generating a response statement based on the user's reply statement to the interactive device, and the client access device 104 undertakes the secondary processing work, for example, the client access device 104 undertakes the collection of the user's input statement, plays the voice containing the response statement, or displays the response statement on the screen; or, the server 105 undertakes the secondary processing work, and the client access device 104 undertakes the main processing work; or, the server 105 or the client access device 104 can each undertake the processing work separately. Alternatively, the server 105 and the client access device 104 use a distributed computing architecture for collaborative computing.

[0145] The above system architecture 100 introduces the overall logical functional architecture from a hardware perspective. The following system architecture 200 is used to introduce the functional modules involved in the following method embodiments. Different functional modules in the system architecture 200 can be located on the same or different devices in the system architecture 100.

[0146] See also Figure 2 , the system architecture 200 includes a data entry module 201 , a model training module 202 and a result generation module 203 .

[0147] The data entry module 201 is used to receive user intent and keywords configured by the developer on the interface. Some embodiments of the present application support developers to configure entry intent and context intent on the interface, and the data entry module 201 can receive entry intent and context intent. Some embodiments of the present application support user intent to use the public named entity slot extracted by the system, and the data entry module 201 can connect to the public named entity slot. Some embodiments of the present application support developers to specify expected user intent and jump user intent in the response statement of user intent, and the data entry module 201 can receive the expected user intent and jump user intent, and save the association relationship between the response statement, the expected user intent and the jump user intent. The data entry module 201 can be located on the data entry device 103 or the server 105 in the system architecture 100. The data entry module 201 can provide the data entered by the developer to the model training module 202.

[0148] The model training module 202 is used to use the data entered by the developer to train the intent recognition model using a machine learning algorithm. The model training module 202 can provide the trained intent recognition model to the result generation module 203. The model training module 202 can be located on the server 105 in the system architecture 100.

[0149] The result generation module 203 is used to receive a request message from the client access device 104, parse the request message to obtain the sentence input by the user in this round of dialogue, use the intent recognition model obtained by the model training module 202 to make predictions, and combine the dialogue history, expected user intent or jump user intent to generate the final semantic analysis result or dialogue response.

[0150] The above-mentioned data entry module 201, model training module 202 and result generation module 203 are implemented by software, specifically by programming methods such as program code, instructions, etc., wherein data and instructions can be stored in various types of memory, such as read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage medium or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the case search device. The execution of instructions or functional modules can be implemented by a processor or controller, such as a central processing unit (CPU) or a digital signal processor (DSP).

[0151] The above introduces the system architecture from the perspective of hardware and software respectively through the system architecture 100 and the system architecture 200. The following is an exemplary introduction to the method flow of providing human-computer dialogue services based on the system architecture provided above from the aspects of configuration, model training and response generation. Specifically, the context configuration method 300 of the dialogue system provided in the embodiment of the present application involves the process of data entry and storage, and mainly introduces how to configure user statements, various user intentions, response statements of user intentions, slots and other data in the dialogue system, and finally obtains the association relationship between response statements, user intentions and slot data. The model training method 400 for human-computer dialogue provided in the embodiment of the present application involves the process of model training, and mainly introduces how to train intent recognition models and slot extraction models in the dialogue system. The response method 410 in the human-computer dialogue provided in the embodiment of the present application involves the process of response generation, and mainly introduces how to generate response statements in the dialogue system during the human-computer dialogue process. It should be noted that the methods 300, 400, and 410 provided in the embodiments of the present application are inventions based on the same concept, and can also be understood as three parts in a dialogue system, or three stages of an overall process: such as the configuration stage for providing human-computer dialogue services, the model training stage for providing human-computer dialogue services, and the response generation stage for providing human-computer dialogue services. The methods 300, 400, and 410 can refer to each other, and the details not shown in one embodiment can refer to other embodiments.

[0152] See also Figure 3 , Figure 3 It is a flowchart of a method 300 for configuring the context of a dialogue system provided in an embodiment of the present application.

[0153] Optionally, the method 300 is executed by the server 105 in the system architecture 100, and the user intention, response statement and slot data in the method 300 can be sent to the server 105 by the data entry device 103. Optionally, the method 300 is executed by the data entry module 201 in the system architecture 200. Optionally, the method 300 is processed by a CPU.

[0154] Exemplarily, method 300 includes S31 to S34.

[0155] S31. The dialogue system receives the user intention information configured by the developer on the interface.

[0156] Optionally, the dialogue system is a chat-type dialogue system. For example, the dialogue system is a robot platform corresponding to the chat robot, for example, the dialogue system is a bot platform. Of course, the dialogue system can also be a task-based dialogue system or a question-answering dialogue system.

[0157] The user intention information includes at least one of the user intention name, user intention type, user statement, and response statement.

[0158] Specifically, this embodiment introduces the logic of entry intent and context intent into the dialogue system, and divides the types of user intent into entry intent and context intent. When configuring a user intent, the developer can select a type from entry intent and context intent and configure it as the type of the user intent. In a possible implementation, the dialogue system can allow the developer to enter the user intent and the corresponding user intent type through the user interface (UI). For example, see Figure 4 The dialogue system can provide a new user intent interface, which includes a user intent type menu. The user intent type menu includes an entry intent option and a context intent option. After the developer triggers a selection operation on one of the options, the type of the currently created user intent can be configured to the type corresponding to the selected option.

[0159] The entry intent is the user's intent expressed through a complete sentence. In other words, the entry intent is a complete expression of the user's description of a certain need. For example, the entry intent is "Today's weather in Shenzhen", "Play Faye Wong's songs", "Dance", etc. When the user enters a sentence (i.e., the reply sentence in the following text), if the sentence entered by the user matches the entry intent, the dialogue system can select a response sentence from the response sentences corresponding to the entry intent, and use the selected response sentence to reply to the sentence entered by the user, so that the result can be returned directly. For the sake of simplicity, the embodiments of the present application will subsequently use the form of "intent name + entry" to simplify the specific entry intent without causing difficulty in understanding, such as the specific entry intent is "get_weather_entrance" and the like.

[0160] Contextual intent is the user's intent expressed through an incomplete sentence. Specifically, the expression corresponding to the contextual intent is an incomplete expression that describes a certain need. For example, the user statement corresponding to the contextual intent uses reference or omission expressions. When the user's input corresponds to the contextual intent, it is usually necessary to combine historical conversations to clarify the user's needs. For example, the contextual intent is "what about tomorrow", "little white rabbit", "what about Beijing" or "one more". For the sake of simplicity, the embodiments of the present application will subsequently use the form of "context+intent name" to simplify the specific contextual intent without causing difficulty in understanding, such as the specific contextual intent is "context_yes" and the like.

[0161] Optionally, in the process of establishing contextual intent, developers can configure user utterances expressed by incomplete sentences for contextual intent, and the dialogue system can receive user utterances expressed by incomplete sentences and contextual intent, and subsequently train the intent recognition model with user utterances expressed by incomplete sentences and contextual intent. Optionally, multiple incomplete sentences with the same semantics can be entered for the same contextual intent, for example, user utterances such as "OK", "Hmm", and "YES" can be entered for context_yes, where context_yes is a contextual intent that indicates affirmation.

[0162] In some embodiments, restrictive conditions are introduced for the matching of contextual intent. Specifically, by default, the sentence input by the user in this round of conversation (such as the reply sentence of the user to the interactive device) will not match the contextual intent; and when the user intent corresponding to the sentence input by the user (such as the reply sentence of the user to the interactive device) meets the preset conditions, the user intent corresponding to the sentence input by the user will match the contextual intent. In other words, the contextual intent can only be matched if the preset conditions are met, thereby avoiding the error of matching the contextual intent without context.

[0163] The preset condition includes at least one of the preset condition (1) or the preset condition (2).

[0164] Precondition (1): The entry intent associated with the context intent is matched in the previous round of conversation. In other words, if context intent A is associated with entry intent B, and the sentence input by the user in the historical conversation (e.g., the previous round of conversation) (e.g., the user's reply to the interactive device) matches entry intent B, then the candidate user intent corresponding to the sentence input by the user in the current round of conversation (e.g., the user's reply to the interactive device) can be matched to context intent A.

[0165] Precondition (2): The contextual intent belongs to the expected user intent corresponding to the response statement in the previous round of dialogue, or the contextual intent belongs to the user intent specified by the statement input by the user in the current round of dialogue (for example, the user's reply statement to the interactive device).

[0166] like Figure 4As shown, in the new user intent interface, the developer can name the user intent of "ask about the weather" as get_weather_entrance. In addition, the developer can select "entry intent" as the type of user intent for "ask about the weather". The developer enters the user statement corresponding to the user intent of "ask about the weather". User statements are, for example, "What is the weather in Beijing today" or "Will it rain in Shenzhen today?". The developer uses the "Add" button to add the user intent of "ask about the weather" to the user statement training corpus, so that the user intent can be used to train the user intent classification model later. In addition, the developer adds a response statement for the dialogue for the user intent of "ask about the weather". The response statement of the dialogue is, for example, "Here is the weather in Beijing:", "The weather in Shenzhen is:".

[0167] Optionally, in the human-computer dialogue, the content of the response statement of the dialogue includes at least one of the following usage modes (1) to (3). In order to distinguish the statements issued by the user from the statements issued by the machine, the statements issued by the user are called reply statements, and the statements issued by the machine are called response statements.

[0168] Usage mode (1) The dialogue system directly uses the pre-configured response statement to respond to the statement input by the user in this round of dialogue (for example, the user's reply statement to the interactive device).

[0169] For example, in this round of dialogue, the sentence input by the user (e.g., the sentence the user replies to the interactive device) is "How are you feeling?", and the response sentence configured by the developer for the reply sentence of the user to the interactive device is "I am in a very good mood." In this example, the dialogue system can directly reply to "How are you feeling?" with "I am in a very good mood."

[0170] Usage mode (2) The dialogue system responds to the user's reply statement to the interactive device with a pre-configured response statement as a prefix.

[0171] Specifically, the dialogue system generates a final response statement based on the pre-configured response statement and other content. For example, the response statement configured by the developer for the user's reply statement to the interactive device is "The weather in Beijing is: XX". In this example, the dialogue system can use "The weather in Beijing is" as a prefix to generate the specific content of "XX" based on user intent and keywords. For example, if the keyword is Beijing, the dialogue system calls the weather service based on "Beijing" and obtains that the weather in Beijing is "light rain". The XX in the configured response statement is replaced with "light rain", and the final response statement generated is "The weather in Beijing is: light rain".

[0172] Optionally, the common named entities or other keywords in the pre-configured response statement are replaced according to the parameters in the user's reply statement to the interactive device. For example, the response statement configured by the developer for the user's reply statement to the interactive device is "The weather in Beijing is: XX". The place name "Beijing" in this example can also be replaced according to the parameters in the user's reply statement to the interactive device. For example, if the user's reply statement to the interactive device is "What about the weather in Shenzhen?", the dialogue system can replace "Beijing" in "The weather in Beijing is: XX" with "Shenzhen", and call the weather service based on "Shenzhen", and get that the weather in Shenzhen is "light rain", replace XX with "light rain", and reply to the user "The weather in Shenzhen is: light rain".

[0173] Usage mode (3) The dialogue system does not use pre-configured response statements.

[0174] In this usage mode, the content of the pre-configured response statement can be empty or a special text such as NO_REPLY (indicating no reply). The dialogue system understands the user's intention and extracts the slot without generating a specific reply. For example, the dialogue system can reply without using the NO_REPLY information.

[0175] For example, see the attached Figure 5 , Figure 5 A new interface for creating a context intent is shown. In this new interface, the developer can create a new user intent and configure the intent name as location_again (indicating asking for the location again). In addition, the developer can select "context intent" as the type of user intent for "location_again". The developer adds user statements corresponding to the user intent of "location_again". User statements are, for example, "What about Beijing?" and "What about Beijing?". The developer adds a response statement corresponding to "location_again". Among them, if the response statement of the context intent "location_again" will not be used by the dialogue system, the developer can set the response statement of "location_again" to empty, or set the response statement of "location_again" to special characters, such as NO_REPLY.

[0176] The above step S31 provides a method for configuring the type of user intent and the association of user intent. Among them, the type of user intent refers to entry intent and context intent. The configuration of user intent association refers to associating user intent A with user intent B, and the user intent B is the expected user intent of user intent A. By executing step S31, the developer defines the entry intent and context intent on the dialogue system. Through the introduction and processing of entry intent and context intent, it is convenient for developers to quickly build a skill for multi-round dialogue on the dialogue system, eliminating the complex context (user intent and slot) association and management work, and reducing the difficulty of development. In addition, since developers can enter a context intent for the same type of statement, so that each expression of the same type of statement has a common context intent, it can save developers from repeated entry of similar statements, thereby reducing the workload of developers entering context intent for each expression in the same type of statement, thereby improving the efficiency of entering user intent. Furthermore, through this configuration method, developers are allowed to associate entry intents with context intents on the dialogue system, and multiple context intents are allowed to be associated with the same entry intent. Therefore, when multiple rounds of dialogue fall into the associated user intent set of entry intents and context intents, the automatic association between context intents and corresponding entry intents can be achieved, and the automatic inheritance and continuation of slots between context intents and corresponding entry intents can be achieved, thereby reducing the context maintenance work of developers. Among them, the association between context intents and entry intents can be achieved through the logic of expected user intents, please refer to the following method 410 for details.

[0177] In some embodiments, developers can add slots to the dialogue system. For example, the dialogue system UI allows developers to enter slot names and keywords. Figure 6 , Figure 6 A schematic diagram of the interface for creating a new slot is shown. Each slot includes a slot name, such as user_def_location (indicating a user-defined location). Developers can use words in the system dictionary or built-in dictionary as keywords. For example, developers can use place names (sys_place), names of people (sys_people), and time (sys_time) in the system dictionary. In addition, developers can specify words contained in keywords. In addition, the dialogue system supports the use of synonyms as keywords. For example, the pair of synonyms Shenzhen and Pengcheng can be used as keywords. In addition, if the developer finds that a word in the system dictionary is inappropriate, the inappropriate word can be excluded.

[0178] In some embodiments, the logic of cross-user intent slot sharing is introduced in the dialogue system. Specifically, the entry intent and the context intent associated with the entry intent maintain the same context state, which refers to the keywords. Keywords of non-slots with the same name can be automatically inherited. Specifically, if the entry intent and the context intent have slots with different slot names, the keywords in the context intent can inherit the keywords of the entry intent. The values ​​of slots with the same name are automatically overwritten. Specifically, if the entry intent and the context intent have slots with the same slot name, the keywords in the context intent can remain as the keywords of the context intent itself.

[0179] For example, the reply statement A of the user to the interactive device in the previous round of dialogue is "What is the weather in Beijing today?" The reply statement A of the user to the interactive device has two slots, the keyword of the slot name "loc" is Beijing, and the keyword of the slot name "date" is today. The reply statement B of the user to the interactive device in this round of dialogue is "What about tomorrow?" The reply statement B of the user to the interactive device has one slot, and the keyword of the slot name "date" is tomorrow. In this example, the user intent of the user's reply statement A to the interactive device is the entry intent, and the user intent of the user's reply statement B to the interactive device is the context intent. The reply statement A of the user to the interactive device and the reply statement B of the user to the interactive device have non-same-named slots "loc", and the reply statement B of the user to the interactive device can inherit the keyword "Beijing" of the slot "loc" in the reply statement A of the user to the interactive device. The reply statement A of the user to the interactive device and the reply statement B of the user to the interactive device have the same-named slot "date", and the keyword "tomorrow" of "date" in the reply statement B of the user to the interactive device can automatically cover the keyword "today" of "date" in the reply statement A of the user to the interactive device. After slot sharing is performed, the keyword of the slot "loc" of the user's reply statement B to the interactive device is "Beijing", and the keyword of the slot "date" of the user's reply statement B to the interactive device is "tomorrow".

[0180] In addition, when the user's reply statement to the interactive device in the previous round of dialogue and the user's reply statement to the interactive device in this round of dialogue are both missing the required slot, the dialogue system can trigger the clarification logic. For example, the user's reply statement a to the interactive device in the previous round of dialogue is "book a movie ticket", and the user's reply statement a to the interactive device is missing the movie name and viewing time. For the dialogue system, the keyword of the slot "name" in the user's reply statement a to the interactive device is missing (missing), and the keyword of the slot "time" is also missing. The dialogue system can reply to the user's reply statement a to the interactive device "What movie do you want to watch?" in order to clarify the movie name or the keyword of the slot "name". After the dialogue system replies, the user who initiated the current round of dialogue replied to the interactive device with the user's reply statement b "Wolf Warrior", and the keyword of the slot "name" in the user's reply statement b to the interactive device is Wolf Warrior, while the keyword of the slot "time" is still missing. The dialogue system can reply to the user's reply statement b to the interactive device "What time do you want to book?" in order to clarify the viewing time or the keyword of the slot "time".

[0181] In some embodiments, a global shared slot set is introduced in the dialogue system. The global shared slot set stores a shared slot set automatically extracted by the dialogue system or a shared slot set updated through an application programming interface (API). Optionally, the global shared slot set is a public named entity set, and the global shared slot set includes at least one public named entity, for example, the global shared slot set includes but is not limited to: public named entities such as time, place or name. There are many situations in which the global shared slot set is used. For example, for some contextual intents, the developer specifies that the user statement corresponding to the contextual intent must contain a certain global slot to trigger the contextual intent. In this case, when the dialogue system receives the user's reply statement corresponding to the user statement to the interactive device, the global shared slot set will be used to trigger the contextual intent. For example, the intent name of the contextual intent is "context.age", and the user statement configured for the contextual intent is "How old is he", and the global slot PEOPLE@global.slots is specified for the contextual intent. With this configuration, when the user enters the sentence "How old is he?" and the global slot contains the variable PEOPLE, the context intent "context.age" will be matched. In addition, the business caller who calls the dialog system can access the global shared slot collection through the API.

[0182] S32. The dialog system receives the public named entity information configured by the developer on the interface.

[0183] Specifically, developers can configure a user intent to use common named entity information, and the common named entity information can be shared across user intents. For example, see Figure 7 , Figure 7 An example of user intent using a common named entity is shown. For some user intents, if the dialogue system needs to reference a common named entity shared across user intents, the developer can configure the use of the common named entity on the interface for creating a new user intent, and configure the slot name referenced by the common named entity. For example, the contextual intent represents "ask about attractions", and the user statement supported by the contextual intent includes the pronoun "there". In the process of creating a new contextual intent for expressing "ask about attractions", the developer can configure the use of a common named entity, such as place name information (global_place). During the human-computer dialogue process, after the dialogue system obtains a candidate user intent based on the user's reply statement to the interactive device, if the obtained candidate user intent is a user intent using a common named entity, when the result of the user intent classification and the specified reference slot both meet the conditions, the dialogue system will add the candidate user intent to the final set of candidate user intents.

[0184] Through step S32, at the user intention level, a configuration method is provided for determining whether the user intends to use a public named entity.

[0185] S33. The dialog system receives the response statement configured by the developer on the interface.

[0186] Developers can configure at least one response statement for each user intent. The dialogue system will receive the configured user intent and at least one response statement, and establish and save the association between the user intent and at least one response statement. During the human-computer dialogue process, after the dialogue system obtains the user's reply statement to the interactive device, it will find the target user intent that matches the candidate user intent from the pre-configured user intents based on the candidate user intent corresponding to the user's reply statement to the interactive device, and select the final response statement from the pre-configured response statements for the target user intent.

[0187] In this embodiment, the logic of expected user intent and user intent jump is introduced into the dialogue system. Each response statement can specify the expected user intent of the next round of dialogue. In addition, each response statement can optionally specify the jump user intent and the slot to be transferred after hitting the expected user intent, so as to realize the user intent association and slot continuation of the current round of dialogue and the next round of dialogue.

[0188] The expected user intent is used to indicate the expected response of the user to the response statement, for example, the type of expected response or the content of expected response. The dialogue system can use the expected user intent of the previous round of dialogue to screen candidate user intents in the next round of dialogue. The expected user intent can also be referred to as the expected intent. Specifically, in a round of dialogue, when the dialogue system provides a response statement, the dialogue system has certain expectations for the user's answer, and the user's answer to the response statement is the user's reply statement for the interactive device in the next round of dialogue. Therefore, the user intent that may be hit by the user's reply statement for the interactive device in the next round of dialogue is also expected. In this embodiment, the developer is allowed to specify the user intent that may be hit in the next round of dialogue when entering the response statement corresponding to the user intent. In the process of configuring the user intent, the developer can configure one or more expected user intents corresponding to the response statement of the user intent for each response statement that can be expected to have the user intent in the next round of dialogue. The dialogue system will obtain one or more expected user intents configured for the response statement of the user intent, and establish and save the association relationship between the response statement of the user intent and the configured one or more expected user intents. After associating the response statement with the expected user intent, the dialogue system will give priority to the expected user intent configured in the response statement of the previous round of dialogue when screening candidate user intents. If there is a candidate user intent that meets the expected user intent in the candidate user intent set, the dialogue system will give priority to returning the candidate user intent that meets the expected user intent. In addition, the dialogue system business caller can also specify the expected user intent that may be hit in this round when sending an NLU parsing request.

[0189] Optionally, the expected user intent is a context intent. Alternatively, the expected user intent is an entry intent.

[0190] Optionally, the expected user intent includes at least one of a user intent indicating an affirmative reply, a user intent indicating a negative reply, a user intent indicating a like, and a user intent indicating a dislike. Among them, the user intent indicating an affirmative reply is, for example, a general user intent, which can correspond to a variety of expressions in a class of statements indicating affirmation. For example, the user intent indicating an affirmative reply can cover statements such as "yes", "good", "OK", "okay", "hmm", and "OK". The user intent indicating a negative reply is, for example, a general user intent, which can correspond to a variety of expressions in a class of statements indicating negation. For example, the user intent indicating a negative reply can cover statements such as "not good" and "don't". Similarly, the user intent indicating a like reply is, for example, a general user intent, which can correspond to a variety of expressions in a class of statements indicating like. The user intent indicating a dislike reply is, for example, a general user intent, which can correspond to a variety of expressions in a class of statements indicating dislike. Optionally, the intent name of the user intent indicating an affirmative reply is context_yes, the intent name of the user intent indicating a negative reply is context_no, the intent name of the user intent indicating a like reply is context_like, and the intent name of the user intent indicating a dislike reply is context_dislike.

[0191] For example, see Figure 8 , Figure 8 An example of configuring expected user intent for user intent ability is shown, where user intent ability represents inquiry capability. The developer configures the user intent type of user intent ability as entry intent. The developer configures the user statements of user intent ability as "What can you talk about?" and "What skills do you have". In addition, the developer configures the response statements of user intent ability as "I am China's Little Song Library. Can I sing a song, Twinkle Twinkle Little Star for you?" and "Then let's talk about monkeys, do you like monkeys?" In addition, the developer configures the response statement of "I am China's Little Song Library. Can I sing a song, Twinkle Twinkle Little Star for you?" with expected user intents "context_yes" and "context_no", and configures the response statement of "Then let's talk about monkeys, do you like monkeys?" with expected user intents "context_yes", "context_no", "context_like" and "context_dislike".

[0192] In some embodiments, on the basis of supporting expected user intent, the dialogue system also supports automatic jump of user intent. Specifically, if the expected user intent is only an intermediate state, such as the expected user intent is a certain contextual intent, the jump user intent corresponding to the expected user intent can be used to reply to the user's reply statement to the interactive device and perform other tasks. Specifically, for response statements that need to use the jump user intent, the developer can add the corresponding jump user intent on the basis of configuring the corresponding expected user intent for the response statement of the user intent. Among them, the jump user intent can also be referred to as the jump intent. For example, see Figure 8 , the response statement of the user intent ability includes "Do you like monkeys?". The developer not only configures the expected user intent context_yes indicating general affirmation, the expected user intent context_like indicating general like, and the expected user intent context_no indicating general negation for "Do you like monkeys?", but also adds the corresponding jump user intent like_animal for the expected user intent context_yes, the corresponding jump user intent like_animal for the expected user intent context_like, and the corresponding jump user intent general_dislike for the expected user intent context_no. Among them, like_animal is a user intent used to express liking a certain type of animal, and general_dislike is a general user intent indicating disliking a certain item. After the developer configures the jump user intent, the dialogue system will obtain one or more jump user intents configured for the response statement of the user intent, and establish and save the association relationship between the response statement of the user intent, the expected user intent and the jump user intent. Optionally, the jump user intent and the corresponding expected user intent have different user intent types, for example, the expected user intent is a context intent, and the jump user intent is an entry intent.

[0193] The above describes the expected user intent and the jump user intent. In some embodiments, when configuring the response statement of the user intent, the developer can not only specify the expected user intent and the jump user intent that may be hit in the next round of dialogue, but also specify and configure the keywords to be added in the next round of dialogue, so as to pass the keywords specified in the previous round of dialogue to the next round of dialogue. Specifically, this embodiment allows the developer to add keywords to be passed to the expected user intent or the jump user intent during the editing of the response statement. The dialogue system will obtain the keywords configured for the response statement of the user intent, establish and save the association relationship between the response statement of the user intent, the expected user intent and the keywords. Alternatively, in the case where the expected user intent has a jump user intent, establish and save the association relationship between the response statement of the user intent, the expected user intent, the jump user intent and the keywords. When the dialogue system takes the expected user intent or the jump user intent as the target user intent, it will determine the keywords corresponding to the response statement, and use the determined keywords to fill the slots of the response statement corresponding to the expected user intent or the response statement corresponding to the jump user intent. Therefore, when the dialogue system returns the final result of the hit expected user intent, it will return the keywords configured by the developer to the user.

[0194] For example, see Figure 8 "I am China Music Library. Can I sing Twinkle Twinkle Little Star for you?" This response statement includes a slot named song (song), and the keyword of the slot is "Twinkle Twinkle Little Star". When the developer configures this response statement, he not only configures the jump user intent play_song, but also configures the keyword "Twinkle Twinkle Little Star". During the conversation, the slot information song:Twinkle Twinkle Little Star will be passed to the user intent play_song.

[0195] For example, please refer to Figure 8 "Let's talk about monkeys. Do you like monkeys?" This response statement includes a slot named animal, and the keyword of the slot is "monkey". When the developer configures this response statement, he not only configures the jump user intent like_animal, but also configures the keyword "monkey". During the conversation, the slot information animal: monkey will be passed to the user intent like_animal.

[0196] In this embodiment, by introducing expected user intent and jump user intent and the processing method of these two user intents to the dialogue system, a method for realizing multi-round dialogue user intent association and user intent jump on the dialogue system can be provided. The functions of user intent jump include rewriting the intent name, obtaining the response statement of the target user intent, adding a specified slot, etc. This embodiment supports users to specify the expected user intent of the next round of dialogue and the jump user intent that may correspond to the expected user intent in the user intent reply module of the dialogue system. Through expected user intent and jump user intent, developers can easily control the process of multi-round dialogues in the dialogue system, realize automatic jump of topics, and reuse reply templates that have been entered for other user intents.

[0197] S34. The dialog system receives the association between the entry intent and the context intent configured by the developer on the interface.

[0198] Developers can configure corresponding contextual intents for entry intents, and the dialog system will establish an association relationship between entry intents and contextual intents. Optionally, one entry intent can be associated with multiple contextual intents, and the association can be implemented using the expected user intent logic. In addition, when configuring the associated user intent, developers can add keywords that need to be passed to achieve user intent association and slot continuation between contextual intent and entry intent.

[0199] like Fig. 9 As shown, the developer has previously entered a context intent context_more. context_more means asking for more context intents. context_more covers user expressions such as "Anything else?" and "What else?" In the interface of the entry intent ability, the developer can configure the associated user intent of the entry intent ability to be the context intent context_more. The dialogue system will receive and save the association between the entry intent ability and the context intent context_more, thereby associating the context intent context_more with the entry intent ability. In addition, if specific keywords need to be added to the associated user intent, the developer can also configure the keywords on the interface. For example, Fig. 9As shown in the figure, a slot is added for the associated user intent, the slot name is action, and the keyword is more. The dialogue system will receive and save the association between the context intent context_more and the keyword more. After configuration, during the human-computer dialogue process, when the context intent context_more is hit, the dialogue system can find the associated user intent ability of the user intent context_more, so as to respond in combination with the information associated with the entry intent ability. In addition, the dialogue system will also find the keyword more associated with the user intent context_more, and return the keyword more to the user along with the user intent context_more.

[0200] How to save the association between entry intent and context intent includes multiple implementations. In one possible implementation, after completing the user intent association, the dialogue system stores the association between entry intent and context intent in a user intent association table. Optionally, the user intent association table uses the associated user intent as the key and the associated user intent as the value. For example, the user intent ability is the key and the user intent context_more is the value.

[0201] The method provided in this embodiment helps to associate the user intent of the previous round of dialogue with the user intent of the next round of dialogue by configuring the corresponding expected user intent and jump user intent for each response statement of user intent, and helps the dialogue system to clarify the user intent in the next round of dialogue through the expected user intent and jump user intent. In addition, by configuring the slot name and keywords for each response statement of user intent, it helps to pass the slot information associated with the previous round of dialogue to the next round of dialogue for use, and helps the dialogue system to automatically complete the missing information in the next round of dialogue. In addition, by defining contextual intents for incomplete expressions, developers only need to enter one contextual intent for the same type of incomplete expressions, without having to define different user intents for each repeatedly entered user statement, thereby reducing the configuration complexity.

[0202] The above method 300 describes the process of configuring various user intents, slot data, and various user statements in the dialogue system. The following method 400 introduces the training process of the intent recognition model and the slot extraction model. In other words, the method flow described in method 400 is about how the dialogue system trains the intent recognition model and the slot extraction model based on the data entered by the developer.

[0203] See also Fig.10 , Fig.10 It is a flowchart of a model training method 400 for human-computer dialogue provided in an embodiment of the present application.

[0204] Optionally, method 400 is executed by server 105 in system architecture 100, and sample data in method 400 can be sent to server 105 by data entry device 103. Optionally, method 400 is executed by model training module 200 in system architecture 200. Optionally, method 400 is processed by CPU, or by CPU and graphics processing unit (Graphics Processing Unit, GPU for short), or other processors suitable for neural network calculations can be used without GPU, which is not limited in this application. For example, CPU is used to undertake the processing work corresponding to S41, and GPU is used to undertake the processing work corresponding to S42.

[0205] Exemplarily, method 400 includes S41 to S42.

[0206] S41. The dialogue system obtains dialogue data.

[0207] The dialogue corpus includes multiple samples, each of which includes a user intent and at least one user utterance expressing the intent. For example, a pre-configured entry intent and each user utterance corresponding to the entry intent are combined into one sample, and a pre-configured context intent and each user utterance corresponding to the context intent are combined into one sample. For example, sample 1 includes the entry intent get_weather_entrance, the user utterance "Will it rain in Shenzhen today?" and the user utterance "What's the weather like in Beijing today?"; sample 2 includes the context intent context_spots, the user utterance "What attractions are there?" and the user utterance "What's fun there?".

[0208] S42. The dialogue system uses the dialogue corpus to perform model training to obtain an intent recognition model and a slot extraction model.

[0209] During the model training process, the dialogue system can use the user's statement as the input parameter of the intent recognition model, and use the intention name of the user's intent corresponding to the user's statement as the output parameter of the intent recognition model.

[0210] The intention recognition model includes but is not limited to the user intention classification model or the user intention matching model. The user intention classification model is used to predict the user intention corresponding to the user's reply statement to the interactive device based on each user input statement. The dialogue system can use a machine learning algorithm to train the model and obtain a user intention classification model. The machine learning algorithm includes but is not limited to support vector machines, logistic regression, and deep neural network algorithms. In the process of training the user intention classification model, the dialogue system can use the user statement data entered by the developer as a positive sample and randomly sample some other dialogue corpus data as a negative sample. In the process of training the user intention matching model, the dialogue system can index the user statement data entered by the developer, obtain multiple candidate user intentions by retrieval, and then obtain the most likely matching result by further sorting. The sorting algorithm can use more word meanings and semantic features, and the sorting model can select some deep sorting models based on neural networks. In the case of a small amount of data, the sorting model can also be used directly to sort all candidate user intentions, eliminating the first step of the retrieval process.

[0211] The slot extraction model is used to extract slots and keywords in the sentence according to the sentence input by the user. The slot extraction model is, for example, a sequence labeling model. The sequence labeling model includes but is not limited to a conditional random field (CRF) model and a long short-term memory network (LSTM) related variant.

[0212] The method provided in this embodiment trains an intent recognition model by using dialogue data. The intent recognition model can learn the mapping relationship between user statements and user intentions through dialogue data during the model training process. Therefore, during the human-computer dialogue process, the dialogue system uses the intent recognition model to predict more accurate candidate user intentions based on the user input sentences.

[0213] The above method 400 introduces the process of model training. The following method 410 is used to illustrate the process of generating responses in human-computer dialogue. In other words, the method flow described in method 410 is about how to use the developer's configuration in method 300, the dialogue history, and the intent recognition model trained in method 400 to generate a response statement when the dialogue system receives a reply statement from the user to the interactive device. It should be understood that the features of method 410 that are the same as those of method 300 and method 400 can also be found in method 300 and method 400, and will not be repeated in method 410.

[0214] For ease of understanding, an exemplary application scenario of method 410 is introduced below.

[0215] In a round of dialogue, the user says "OK", and the dialogue system finds from the dialogue history that the machine said "Can I sing Twinkle Twinkle Little Star for you?" in the previous round of dialogue, and thus determines that the user's expected intention in this round is whether the machine should sing Twinkle Twinkle Little Star. Based on the expected intentions "yes" and "no" associated with "Can I sing Twinkle Twinkle Little Star for you?", the dialogue system can find that the target expected intention that matches the expected intention is "yes", so based on "sing Twinkle Twinkle Little Star" and "yes", it will play the song Twinkle Twinkle Little Star, and thus respond to "OK".

[0216] See also Fig.11 , Fig.11 4 is a flow chart of a response method 410 in a human-computer dialogue provided in an embodiment of the present application. The process of method 410 can also be referred to Fig.13 and Fig.14 and Fig.16 Flowchart shown.

[0217] The method 410 may be specifically executed by the server 105 in the system architecture 100, and the reply statement of the user of the dialogue in the method 410 to the interactive device may be the input data given by the client access device 104 in the system architecture 100. Optionally, the method 410 may be processed by a CPU, or by a CPU and a GPU together, or by using other processors suitable for neural network computing without using a GPU, which is not limited in the present application.

[0218] Exemplarily, the method 410 includes S51 to S511.

[0219] S51. The dialogue system obtains a reply statement of the user to the interactive device.

[0220] The interactive device is, for example, the client access device 104. For example, the interactive device is a terminal. For example, the interactive device is a mobile phone running a voice assistant, a smart speaker, etc. The reply statement is, for example, the statement entered by the user in this round of dialogue, that is, what the user said. Specifically, in the process of human-computer dialogue, the user 102 enters the user's reply statement for the interactive device in this round of dialogue on the client access device 104 by voice or typing. The client access device 104 will generate a request message for requesting human-computer dialogue based on the user's reply statement for the interactive device, send the request message to the dialogue system, the dialogue system receives the request message, obtains the user's reply statement for the interactive device from the request message, pre-processes the reply statement, and then executes the subsequent process for the pre-processed reply statement. Among them, the statement entered by the user in the dialogue is also called the user's query.

[0221] Optionally, the dialogue system preprocesses the reply statement. How to preprocess the user's reply statement to the interactive device includes multiple implementation methods. In one possible implementation, for the scenario where the expected user intent of this round of dialogue is specified in the request message, the dialogue system will extract and store the expected user intent or jump user intent. In addition, for the scenario where the slot to be supplemented in this round of dialogue is specified in the request message, the dialogue system will extract keywords from the request message and save the keywords carried by the request message. Specifically, due to the uncertainty of the dialogue system's prediction of the user query (i.e., the user's reply statement to the interactive device), assuming that the scores of the two candidate user intents predicted based on the user's reply statement to the interactive device are similar, if the dialogue system only selects the target user intent based on the score of the candidate user intent, and then determines the response statement based on the target user intent, it may cause the returned response statement to be not the response statement that the user ultimately expects. In view of this, this embodiment allows the user to specify the expected user intent, and the specified expected user intent is used as a reference for the dialogue system to screen the candidate user intent.

[0222] How to allow the user to specify the expected user intent includes multiple implementations. Optionally, when the user specifies the expected user intent, the client access device 104 will carry the expected user intent parameter in the request message. After receiving the request message, the dialogue system will determine whether the request message includes the expected user intent parameter. If the request message includes the expected user intent parameter, the dialogue system will parse the expected user intent and extract the parameter. How to carry the expected user intent parameter includes multiple implementations. For example, the Uniform Resource Locator (URL) parameter of the request message or the request body carries a field named expect, the field expect includes the expected user intent parameter, the data form of the expected user intent parameter can be a string, and the expected user intent parameter can be called an expect string.

[0223] For example, the expect string in the request message is context_yes>>play_song(song:Little Star), and the expect string includes the expected user intent (context_yes), the jump user intent (play_song), and the slot to be supplemented (song:Little Star). The dialogue system will parse the expected user intent from the expect string as context_yes, the jump user intent as play_song, and the keyword to be supplemented in the final return result is song:Little Star. The dialogue system will store the parsed expected user intent in the expected user intent set, the parsed jump user intent in the jump user intent table, and the parsed keywords in the slot table, so that the response statement can be determined later based on the expected user intent and the jump user intent, and the keywords can be supplemented in the final return result.

[0224] S52: The dialogue system performs intent recognition on the reply statement to obtain candidate user intents.

[0225] In one possible implementation, the dialogue system inputs the reply sentence input by the user into the intent recognition model trained by method 400, performs intent recognition on the reply sentence through the intent recognition model, outputs a set of candidate user intents (candidate Intent) and a score (score) of each candidate user intent in the set of candidate user intents, thereby achieving a preliminary selection of the results.

[0226] For example, if the reply sentence input by the user is "OK", after "OK" is input into the intent recognition model, the intent recognition model will output three candidate user intents, namely user intent general_yes, user intent context_yes, and user intent confirm_yes. Among them, user intent general_yes is a general user intent that indicates affirmation.

[0227] The score of user intent general_yes is 1.0, the score of user intent context_yes is 1.0, and the score of user intent confirm_yes is 1.0. In this example, the scores of the three candidate user intents are all 1.0. It is difficult to determine the appropriate user intent based on the scores alone, but by executing the subsequent steps, it is helpful to accurately find the target user intent.

[0228] In addition, the dialogue system will also perform slot extraction on the user's reply statement to the interactive device. For example, the dialogue system inputs the reply statement input by the user into the slot extraction model trained in S42, performs slot extraction on the reply statement through the slot extraction model, and outputs the slots and keywords in the reply statement. For example, the user's reply statement to the interactive device is "How is the weather in Beijing tomorrow?" The dialogue system extracts the slots and keywords "time: tomorrow" and "location: Beijing" from "How is the weather in Beijing tomorrow?"

[0229] Optionally, the dialogue system may filter candidate user intentions under certain conditions. The following uses implementation methods 1 to 3 as examples to illustrate.

[0230] Implementation method 1: The dialogue system determines whether the expected user intent is specified in the dialogue request of the current user. If the expected user intent is specified, and the intent name of the specified expected user intent is the same as the intent name of the candidate user intent, the dialogue system adds the candidate user intent to the final set of candidate user intent. For example, if the type of the candidate user intent is contextual intent, the dialogue system determines whether the message carrying the reply statement includes the expected user intent parameter. If the message includes the expected user intent parameter and the intent name in the expected user intent parameter is the same as the candidate intent name, the dialogue system retains the candidate user intent. If the message does not include the expected user intent parameter, the candidate user intent is filtered. For example, the candidate user intent predicted by the model includes the contextual intent context_yes, and context_yes appears in the expect string of the user dialogue request of this round, the dialogue system will add the contextual intent context_yes to the final set of candidate user intent.

[0231] Implementation method 2: If the type of the candidate user intent is contextual intent, the dialogue system determines whether the response statement of the dialogue system in the previous round of dialogue has an associated expected user intent. If the response statement has an associated expected user intent, and the intent name of the expected user intent associated with the response statement is the same as the intent name of the candidate user intent, the dialogue system adds the candidate user intent to the final candidate user intent set. If the response statement is not associated with an expected user intent, the dialogue system filters the candidate user intent.

[0232] Implementation method three: If the type of the candidate user intent is contextual intent, the dialogue system determines whether the candidate user intent has an associated public named entity. If the candidate user intent has an associated public named entity and the value of the public named entity exists, the dialogue system adds the candidate user intent to the final candidate user intent set. If the candidate user intent is not associated with a public named entity, the dialogue system filters the candidate user intent. Among them, the dialogue system can determine the slot name referenced by the public named entity associated with the candidate user intent based on the configuration information, determine whether the keyword corresponding to the slot name is empty, and if the keyword corresponding to the slot name is not empty, determine that the value of the public named entity exists.

[0233] For example, see Figure 7 , the candidate user intent obtained by the dialogue system is context_spots, context_spots is the contextual intent representing the location, and the dialogue system can determine whether the user intent context_spots is configured to enable the use of public named entities. For example, according to the configuration information, it is determined that the user intent context_spots is configured to use public named entities, and the slot referenced by the public named entity is global_place. If the dialogue system extracts the public named entity global_place:Beijing from the historical dialogue, the dialogue system will add the user intent context_spots to the final candidate user intent set.

[0234] S53: The dialogue system recognizes that the candidate user intention is a contextual intention.

[0235] Specifically, the dialogue system obtains the type of candidate user intent, and determines whether the type of candidate user intent is entry intent or context intent. If the type of candidate user intent is context intent, the dialogue system recognizes that the candidate user intent lacks required information, and then executes the following steps.

[0236] S54. The dialogue system obtains historical response statements of the interactive device adjacent to the reply statement in the historical dialogue.

[0237] The response sentence adjacent to the reply sentence in the historical conversation is, for example, the response sentence of the interactive device in the previous round of conversation, that is, what the machine said in the previous round of conversation. For example, the reply sentence input by the user is "OK", and the historical response sentence of the interactive device adjacent to the reply sentence is "I am China Music Library. Can I sing Twinkle Twinkle Little Star for you?"

[0238] Optionally, at the end of the last round of dialogue, the dialogue system saves each expected user intent associated with the response statement of the last round of dialogue in an expected user intent table in advance. The expected user intent table includes one or more expected user intents associated with the response statement. The dialogue system queries the expected user intent table to determine whether the candidate user intent matches the expected user intent in the expected user intent table. The dialogue system will filter the candidate user intent that matches the expected user intent from the candidate user intent set, and return the filtered candidate user intent as a new candidate user intent. There are multiple ways to determine whether the candidate user intent matches the expected user intent. For example, if the candidate user intent has the same intent name as the expected user intent, the dialogue system determines that the candidate user intent matches the expected user intent.

[0239] Optionally, the expected user intent table contains multiple expected user intents, and the dialogue system processes each expected user intent in the expected user intent table one by one in a preset order. If the expected user intent table contains an expected user intent with the same intent name as the candidate user intent, the dialogue system adds the candidate user intent to a new candidate user intent set and returns it. If the expected user intent table does not have a candidate user intent that satisfies the expected user intent, the dialogue system returns a complete candidate user intent set. For example, the expected user intent table contains an expected user intent context_yes, and the expected user intent context_yes and the candidate user intent context_yes have the same intent name, then the dialogue system constructs a new candidate user intent set containing only the user intent context_yes and returns it. Optionally, the preset order for the dialogue system to process the expected user intent table is to give priority to the expected user intent that is at the front of the expected user intent table, then the dialogue system selects the first candidate user intent that matches the expected user intent from the candidate user intent set as the target user intent.

[0240] The expected user intent is used to indicate the category of the user's expected response to the historical response statement. Optionally, the process of determining the expected user intent can be suitable for the scenario of opinion inquiry, the scenario of resource recommendation, or the scenario of initiating a new topic. Specifically, in the scenario of opinion inquiry, the dialogue system asks questions through response statements to inquire about the user's opinions, and the dialogue system has certain expectations for the opinions of the user's answers (i.e., the user's reply statement to the interactive device in this round of dialogue). For example, in the last round of dialogue, the response statement of the dialogue system is "Do you like monkeys?" In this example, the dialogue system can expect the user's reply to be either a statement such as liking monkeys or a statement such as not liking monkeys. Therefore, the dialogue system can use the user intent indicating a positive reply, the user intent indicating a negative reply, the user intent indicating a like, and the user intent indicating a dislike as the expected user intent. For another example, in the scenario of resource recommendation, the dialogue system recommends a resource to the user through a response statement, and the resource is, for example, a service, a commodity, a song, a dance, a video, etc. In this scenario, the dialogue system has certain expectations for whether the user accepts the recommendation (i.e., the user's reply statement to the interactive device in this round of dialogue). Taking songs as an example, in the last round of dialogue, the dialogue system's response sentence is "Can I sing Twinkle Twinkle Little Star for you?" In this example, the dialogue system can expect the user's response to be either asking the dialogue system to sing or refusing the dialogue system to sing. Therefore, the dialogue system can regard the user's intention for a positive reply and the user's intention for a negative reply as expected user intentions.

[0241] Optionally, the dialogue system screens the candidate user intent set. For example, after the dialogue system updates the candidate user intent set according to S54, the dialogue system selects the candidate user intent with the highest score from the candidate user intent set obtained in S54 as the target user intent according to the score of each candidate user intent in the candidate user intent set. For example, if the candidate user intent set includes user intent general_yes, user intent context_yes, and user intent confirm_yes, and user intent context_yes has the highest score, the dialogue system returns user intent context_yes.

[0242] For example, see Figure 8 ,pass Figure 8After the method shown is configured, if the user's reply to the interactive device in the previous round of dialogue is "What skills do you have", the dialogue system can return a response sentence "I am the Chinese Music Library. Can I sing a song for you, Twinkle Twinkle Little Star?" and determine the expected user intents as "context_yes" and "context_no". In this round of dialogue, if the user's reply to the interactive device is "OK", the dialogue system will predict the candidate user intent set including the user intent "context_yes" based on the user's reply to the interactive device. Since the user intent "context_yes" is the expected user intent, the dialogue system will prioritize the user intent "context_yes".

[0243] S55. The dialog system determines a target expected user intent that matches the candidate user intent from multiple expected user intents associated with historical response sentences.

[0244] The target expected intent is an expected user intent and the target expected intent matches the candidate user intent. Optionally, the dialog system determines the expected user intent that is the same as the candidate user intent from among multiple expected user intents associated with the historical response statements as the target expected user intent. For example, if the historical response statement is associated with two expected user intents, "yes" and "no", and the candidate user intent is "yes", then the target expected user intent is "yes".

[0245] S56. The dialog system determines the target response of the interactive device to the reply statement according to the target expected user intention and the historical response statements.

[0246] Optionally, the target response refers to outputting a response statement, and determining the target response includes: determining a target response statement of the interactive device for the reply statement, and outputting the target response statement. The target response statement refers to a response statement of the interactive device in this round of dialogue. Optionally, the target response refers to executing instructions corresponding to the target expected user intent and historical response statements, and determining the target response includes: determining instructions corresponding to the target expected user intent and historical response statements, and executing instructions corresponding to the target expected user intent and historical response statements.

[0247] Optionally, the dialogue system determines the jump user intent based on the historical response statement and the target expected user intent; determines the instruction corresponding to the jump user intent based on the jump user intent; and executes the instruction corresponding to the jump user intent. The jump user intent is a clear user intent, for example, the jump user intent indicates the operation or instruction that the user expects the interactive device to perform. For example, based on the historical response statement "Can I sing Twinkle Twinkle Little Star for you?" and the target expected user intent is "yes", it is determined that the jump user intent is "play a song". The dialogue system can determine the play instruction corresponding to "play a song" based on the correspondence between "play a song" and the instruction; and execute the play instruction.

[0248] Optionally, if the candidate user intent matches the expected user intent, the dialogue system will determine whether the expected user intent has a corresponding jump user intent. If the expected user intent has a corresponding jump user intent, the dialogue system will update the target user intent from the expected user intent to the jump user intent, thereby achieving the jump of user intent.

[0249] In some embodiments, the expected user intent and the corresponding jump user intent have different intent names. During the user intent jump process, the dialogue system will rewrite the intent name. Among them, the rewriting of the intent name refers to updating the intent name of the target user intent. When the hit expected user intent has a corresponding jump user intent, the dialogue system will update the intent name of the target user intent from the intent name of the expected user intent to the intent name of the jump user intent.

[0250] In some embodiments, the jump user intent and the expected user intent corresponding to the jump user intent correspond to different response statements. During the user intent jump process, the dialogue system will replace the response statement. The replacement of the response statement refers to updating the response statement.

[0251] Specifically, if the hit expected user intent has a corresponding jump user intent, the dialogue system will update the response statement from the response statement corresponding to the expected user intent to the response statement corresponding to the jump user intent, so as to reply using the response statement of the jump user intent.

[0252] Optionally, the jump user intent and the expected user intent correspond to different topics. For example, the response statement corresponding to the expected user intent represents topic A, and the response statement corresponding to the jump user intent represents topic B. By updating the response statement from the response statement corresponding to the expected user intent to the response statement corresponding to the jump user intent, the topic jump can be achieved.

[0253] For example, the response statement in the previous round of dialogue is "Do you want to play a song?" The expected user intent of the response statement includes the user intent context_yes indicating a positive reply, and the user intent that is truly useful to the dialogue system is the user intent "play_song" indicating playing a song. In this case, the developer can pre-configure the corresponding jump user intent "play_song" for the expected user intent "context_yes". During the human-computer dialogue, when the candidate user intent hits the expected user intent context_yes, and the user intent context_yes has the highest score, and the target user intent is the user intent context_yes, the dialogue system queries the jump user intent table and determines that the user intent context_yes has the corresponding jump user intent play_song. The dialogue system then rewrites the intent name of the target user intent from context_yes to play_song, replaces the response statement of the target user intent from the response statement corresponding to the user intent context_yes to the response statement corresponding to the user intent play_song, and uses the response statement corresponding to "play_song" to reply.

[0254] By associating the expected user intent of the response statement with the jump user intent, when the candidate user intent hits the expected user intent, the dialogue system rewrites the target user intent from the expected user intent to the jump user intent, thereby supporting the automatic jump of user intent. When the expected user intent is the context intent and the jump user intent is the entry intent, the user intent will be made clearer after the user intent jump. Therefore, when using the jump user intent for dialogue replies, the accuracy of the response statement will be improved, making the human-computer dialogue more coherent.

[0255] In combination with the above steps, if the candidate user intent matches the expected user intent, and the matched expected user intent has a corresponding jump user intent, the target user intent may be the jump user intent. In this case, the dialogue system will determine the target jump user intent corresponding to the expected user intent in at least one jump user intent associated with the response statement. The target jump user intent may also be referred to as the target jump intent. The dialogue system will determine the response statement in at least one response statement corresponding to the target jump user intent. Among them, the target jump user intent refers to the jump user intent that has a corresponding relationship with the expected user intent among all jump user intents associated with the response statement, and each jump user intent in at least one jump user intent has an intent name different from the expected user intent. For example, the candidate user intent matches the expected user intent context_yes, and the jump user intent corresponding to the user intent context_yes is the user intent play_song, then the target jump user intent is the user intent play_song, and the dialogue system will select the response statement "Play this song for you below".

[0256] Optionally, the dialogue system also processes the expected user intent and jump user intent for the next round of dialogue.

[0257] If the expected user intent is configured in the response statement of the target user intent, the dialogue system updates the expected user intent table, and updates the expected user intent associated with the response statement in the expected user intent table to the expected user intent associated with the response statement of the target user intent, thereby refreshing the expected user intent of the previous round of dialogue to the expected user intent of this round of dialogue. If the target user intent is configured with an associated user intent, the dialogue system will also update the expected user intent table. If the expected user intent configured in the target user intent has a corresponding jump user intent, the dialogue system will also update the jump user intent table. If there are keywords that need to be passed to the next round of dialogue in the associated user intent and the expected user intent configured in the target user intent, the dialogue system will add the keywords to the slot table.

[0258] For example, if the selected response sentence is used for story recommendation, such as the response sentence is "I learned a new story "Little Red Riding Hood" today. Can I tell you a story?", and the response sentence is associated with the expected user intent context_yes and the jump user intent play_story and the keyword (story: Little Red Riding Hood) that needs to be passed to the next round of dialogue, then the dialogue system stores the expected user intent context_yes in the expected user intent table, stores the jump user intent (context_yes, play_story) in the jump user intent table, and stores the keyword (story: Little Red Riding Hood) in the slot table.

[0259] By processing the expected user intent of the next round of dialogue, it is convenient to use the expected user intent of this round of dialogue when generating a response statement in the next round of dialogue. For example, when performing user intent parsing on the query of the next round of dialogue, the expected user intent of this round of dialogue can be preferentially processed. By processing the jump user intent of the next round of dialogue, it is convenient to use the jump user intent corresponding to the expected user intent of this round of dialogue when generating a response statement in the next round of dialogue. By adding keywords in the response statement to the slot table, it is convenient to pass the keywords of this round of dialogue to the next round of dialogue for use, for example, using keywords to fill the slots of the response statement of the next round of dialogue.

[0260] Optionally, the dialogue system also updates common named entities. Specifically, the dialogue system performs named entity recognition on at least one of the reply statements or response statements of the user in this round of dialogue to the interactive device, and updates the extracted named entities to the common named entity set. Among them, named entity recognition can be implemented by an entity recognition model, and the entity recognition model is implemented, for example, by CRF and deep learning algorithms. For example, the reply statement of the user in this round of dialogue to the interactive device is "OK", and the response statement of the dialogue system is "Let me play this song for you." In this example, the dialogue system did not extract the relevant public named entities. For another example, the reply statement of the user in this round of dialogue to the interactive device is "Will it rain in Shenzhen today? ", the dialogue system uses the named entity recognition algorithm to extract the global_place of Shenzhen in the user's reply to the interactive device, and updates it to the public named entity set. By introducing and processing the public named entity set in the dialogue system, the dialogue system extracts the public named entities for each round of dialogue and puts the public named entities into the public named entity set, which can provide the dialogue system with the public named entities of the historical dialogue, realize the automatic completion of the slots of the user's intention to partially refer to the statement or omit the statement, thereby realizing the sharing of slots across user intentions.

[0261] The method provided in this embodiment associates the response statement issued by the interactive device with the expected user intention. When the user initiates a round of dialogue, the dialogue system will give priority to the target expected user intention matched by the historical response statement in the process of screening the user intention from the candidate user intention of this round of dialogue, and the dialogue system will use the target expected user intention to determine the response statement. Since the processing logic of the expected user intention is introduced, the expected user intention of the historical dialogue is passed to the current dialogue for use, thereby realizing the user intention association between the historical dialogue and the current dialogue, improving the accuracy of the response statement generated by the dialogue system, helping to improve the context connection ability of the dialogue system, and improving the coherence of the human-computer dialogue.

[0262] For ease of understanding, an exemplary application scenario of the following method 420 is introduced.

[0263] In a conversation, the user says "How's the weather?" The conversation system finds from the conversation history that the machine said "What about Beijing?" in the previous conversation, and thus determines that the user's intended intention for this round is "Beijing + weather" or "Beijing + travel information" or "Beijing + news." Then, based on "weather", the target intended intention is matched to "Beijing + weather," and the machine's response statement is constructed based on "Beijing + weather."

[0264] See also Fig.12 , Fig.12 4 is a flow chart of a response method 420 in a human-computer dialogue provided in an embodiment of the present application. The process of method 420 can also be referred to in the attached Fig.13 , Attachment Fig.14 , Attachment Fig.16 Flowchart shown.

[0265] The method 420 may be specifically executed by the server 105 in the system architecture 100, and the reply statement of the user of the dialogue in the method 420 to the interactive device may be the input data given by the client access device 104 in the system architecture 100. Optionally, the method 420 may be processed by the CPU, or by the CPU and GPU together, or by using other processors suitable for neural network computing without using the GPU, which is not limited in the present application.

[0266] Exemplarily, method 420 includes S61 to S616.

[0267] S61. The dialogue system obtains a reply statement of the user to the interactive device.

[0268] S62: The dialogue system performs intent recognition on the reply statement to obtain candidate user intents.

[0269] S63: The dialogue system obtains historical response statements of the interactive device adjacent to the reply statement in the historical dialogue.

[0270] S64: The dialogue system recognizes that the candidate user intention lacks the information required to determine the target response sentence.

[0271] S65. The dialog system determines a target expected user intent that matches the candidate user intent from among multiple expected user intents associated with the historical response statements. The expected user intent is used to represent the content of the user's expected reply to the historical response statements.

[0272] The target expected intent is an expected user intent and the target expected intent matches the candidate user intent. Optionally, the dialogue system determines the expected user intent including the candidate user intent from multiple expected user intents associated with the historical response sentences as the target expected user intent. For example, the historical response sentence is associated with the two expected user intents "Beijing + weather" and "Beijing + travel information", and the candidate user intent is "weather", then the target expected user intent is "Beijing + weather".

[0273] S66. The dialog system determines a target response statement of the interactive device to the reply statement according to the target expected user intention.

[0274] In this way, the dialogue system can determine the response statement for this round of dialogue.

[0275] Optionally, in the process of determining the target response statement, the dialogue system obtains at least one candidate response statement template corresponding to the historical response statement based on the correspondence between the historical response statement and at least one candidate response statement template, and the candidate response statement template is used to represent the sentence pattern of the target response statement; according to the correspondence between the target expected user intention and the target response statement template, obtains a target response statement template that matches the target expected user intention from at least one candidate response statement template; and determines the target response statement of the interactive device for the reply statement based on the target response statement template and the historical response statements.

[0276] The candidate response statement template is, for example, a statement template pre-configured by a developer.

[0277] The target response statement refers to the response statement of the interactive device in this round of dialogue. For example, the candidate response statement template of the expected user intent context_no in the previous round of dialogue is "Forget it if you don't want it", and the candidate response statement template of the expected user intent context_yes in the previous round of dialogue is "Let's play a song for you below". If the candidate user intent of this round of dialogue hits the expected user intent context_no, "Forget it if you don't want it" is used as the target response statement template, and the target response statement is determined to be "Forget it if you don't want it". Optionally, the dialogue system determines the response statement from at least one response statement corresponding to the target user intent according to the target user intent determined in the above steps. Optionally, in the case where the target user intent corresponds to multiple response statements, the dialogue system randomly selects a response statement from the multiple response statements corresponding to the target user intent, thereby bringing randomness to the returned response statement, thereby avoiding the human-computer dialogue interaction from being too monotonous and rigid, and making it more interesting.

[0278] Optionally, if the expected user intention is a user intention to express a negative reply or a user intention to express dislike, the dialogue system can directly use the response statement corresponding to the expected user intention as the final response statement.

[0279] Optionally, determining the target response statement of the interactive device for the reply statement according to the target response statement template and the historical response statement includes: obtaining a target keyword; identifying the type of the target keyword; filling the target keyword into the first target slot corresponding to the type in the target response statement template to obtain the target response statement. The target keyword is used to represent the key content of the conversation of the historical dialogue. For example, the target keyword is the slot value on the slot in the historical response statement. The first target slot is a slot in the target response statement, and the type of the first target slot is the same as the type of the target keyword. For example, the types of the target keyword and the first target slot are both places, such as Beijing. For another example, the types of the target keyword and the first target slot are both weather. For example, after obtaining the target keyword, if the target keyword is "light rain", "light rain" is weather, then "light rain" is filled into the slot corresponding to X in "Today's weather is X", and the target response statement is "Today's weather is light rain".

[0280] In combination with the above steps, after the dialogue system uses the keywords associated with the expected user intentions to fill the target slots in the response sentence, the dialogue system will determine the filled response sentence as the final response sentence, and use the filled response sentence to reply to the user of this round of dialogue to the interactive device, thereby achieving the slot continuation of this round of dialogue and the next round of dialogue.

[0281] In this way, the dialogue system can handle the slots to be supplemented. Optionally, the dialogue system determines whether there are slots that need to be supplemented in the target user's intention. If there are slots that need to be supplemented in the target user's intention, the dialogue system queries the slot table to obtain the keywords of the slots to be supplemented, adds the queried keywords to the keywords of the target user's intention, and subsequently uses the queried keywords to fill the slots in the response statement to obtain the filled response statement. Among them, the slot filling is, for example, using the keywords associated with the expected user's intention to fill the first target slot in the response statement of the interactive device to the reply statement. Among them, the slot name of the first target slot is the same as the slot name corresponding to the value. For example, the slot names corresponding to the first target slot and the value are both songs. For another example, the slot names corresponding to the first target slot and the value are both places. Among them, the slot table is used to save the keywords associated with the expected user's intention. Specifically, the dialogue system can predetermine the keywords associated with the expected user's intention and save the keywords to the slot table. For example, the dialogue system can extract keywords from the response statement in the previous round of dialogue.

[0282] Optionally, obtaining the target keyword includes: extracting the target keyword from historical response statements; or, extracting the target keyword from the user's historical reply statements to the interactive device in historical conversations; or, querying configuration information to obtain the target keyword associated with the historical response statement, the configuration information including a pre-set association relationship between the historical response statement and the target keyword.

[0283] For example, the response sentence is "I am China Song Library. Can I sing Twinkle Twinkle Little Star for you?" The expected user intent associated with this response sentence is the user intent context_yes. The slot associated with the user intent context_yes is song, and the keyword is "Twinkle Twinkle Little Star". The jump user intent corresponding to the user intent context_yes is the user intent play_song. The response sentence for the user intent play_song is "Let me play this song for you."

[0284] For example, if the response statement in the previous round of dialogue is "I am the Chinese Music Library. Can I sing Twinkle Twinkle Little Star for you?", the dialogue system will save song: Little Star to the slot table when providing the response statement in the previous round of dialogue. In this round of dialogue, the user's reply statement to the interactive device is "OK". The dialogue system first determines that the target user intent hit by the candidate user intent is context_yes based on the reply statement, and then determines that the user intent context_yes has the jump user intent play_song, then rewrites the intent name of the target user intent to play_song. The dialogue system queries the slot table and obtains that the keyword associated with the expected user intent context_yes is "Little Star", then uses song: Little Star to fill the slot for "Play this song for you below", and the response statement after filling is "Play this song for you below - Little Star".

[0285] When the dialogue system asks for opinions, recommends resources, or initiates new topics through response sentences, the response sentences often contain specific keywords. The above method provides a mechanism for passing the keywords in the response sentence to the expected user intent or jumping to the user intent, thereby passing the keywords associated with the previous round of dialogue to the current round of dialogue, so that the current round of dialogue and the next round of dialogue can share slots across user intents. In particular, when the user in the current round of dialogue uses reference or omission statements for the reply sentence of the interactive device, the keywords associated with the previous round of dialogue can be used to automatically complete the slots. The response sentence in the current round of dialogue will inherit the keywords in the previous round of dialogue, thereby improving the accuracy of the response sentence and thus improving the coherence of multiple rounds of dialogue.

[0286] There are multiple ways for the dialog system to determine the slots to be added in the response statement. Optionally, the developer specifies the slots to be added when configuring the response statement. Alternatively, the dialog system service caller can specify the slots to be added in the current round of dialog when sending the NLU parsing request.

[0287] Optionally, extracting the target keyword from the historical response sentence includes: performing named entity recognition on the historical response sentence, and using the obtained common named entity as the target keyword. Optionally, extracting the target keyword from the historical reply sentence of the user to the interactive device in the historical conversation includes: performing named entity recognition on the historical reply sentence, and using the obtained common named entity as the target keyword.

[0288] Optionally, the dialog system returns a response statement to the user.

[0289] Specifically, the dialogue system sends the target user's intent name, response statement and keywords to the client of the dialogue robot, such as to the client access device 104, so as to return the response statement to the user. For example, the dialogue system can send {query: OK, intent: play_song, slots: {song: Little Star}, reply: Play this song for you below}.

[0290] Specifically, the dialogue system sends the target user's intent name, response statement and keywords to the client of the dialogue robot, such as to the client access device 104, so as to return the response statement to the user. For example, the dialogue system can send {query: OK, intent: play_song, slots: {song: Little Star}, reply: Play this song for you below}.

[0291] pass Fig.13 , Fig.14 and Fig.15 The method 410 is shown to facilitate contextual cohesion in a multi-round conversation. Fig.15 , Fig.15 Shows the statements of the user and the dialogue system in two rounds of dialogue, from Fig.15 From the sentence contents shown, we can see that the response sentence provided by the dialogue system in this round of dialogue is not only related to the user intention expressed by the user in this round of dialogue to the interactive device, but also related to the user intention of the previous round of dialogue. Fig.16, when the user uses an incomplete expression to input a reply statement to the interactive device, such as "good" or "bad", the dialogue system uses the logic of expected user intent and jump user intent to accurately understand the user intent and give a corresponding response statement. For example, when the user enters "good", the dialogue system will first match the expected user intent context.yes based on "good", and then find the corresponding jump user intent play_song based on the expected user intent context.yes, and return "Play XX below" based on the jump user intent play_song." When the user enters "bad", the dialogue system will first match the expected user intent context.no based on "bad", because the jump user intent corresponding to the expected user intent context.no is the user intent general_no, and the response statement corresponding to the user intent general_no is "Forget it if you don't want it", the dialogue system will return "Forget it if you don't want it" based on the user intent general_no.

[0292] The method provided in this embodiment associates the response statement issued by the interactive device with the expected user intention. When the user initiates a round of dialogue, the dialogue system will give priority to the target expected user intention matched by the historical response statement in the process of screening the user intention from the candidate user intention of this round of dialogue, and the dialogue system will use the target expected user intention to determine the response statement. Since the processing logic of the expected user intention is introduced, the expected user intention of the historical dialogue is passed to the current dialogue for use, thereby realizing the user intention association between the historical dialogue and the current dialogue, improving the accuracy of the response statement generated by the dialogue system, helping to improve the context connection ability of the dialogue system, and improving the coherence of the human-computer dialogue.

[0293] The above introduces method 300, method 400 and method 410 of the embodiments of the present application. The following introduces the dialogue system of the embodiments of the present application. It should be understood that the following dialogue system 500 and dialogue system 600 have any functions of the dialogue systems in the above methods 300, method 400 and method 410.

[0294] Attached Fig.17 is a structural diagram of a dialogue system 500 provided in an embodiment of the present application, as shown in the attached Fig.17 As shown, the dialogue system 500 includes: an acquisition module 501, used to execute S51, S54, S61 or S63; an identification module 502, used to execute S52 or S62; a determination module 503, used to execute S54 and S58, S65 or S66;

[0295] It should be understood that the dialogue system 500 corresponds to the dialogue system in the above-mentioned method 300, method 400 and method 410, and the various modules in the dialogue system 500 and the above-mentioned other operations and / or functions are respectively for realizing the various steps and methods implemented by the dialogue system in the method 300, method 400 and method 410. For specific details, please refer to the above-mentioned method 300, method 400 and method 410. For the sake of brevity, they will not be repeated here.

[0296] It should be understood that when the dialogue system 500 is conducting a human-computer dialogue, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the dialogue system 500 is divided into different functional modules to complete all or part of the functions described above. In addition, the dialogue system 500 provided in the above embodiment and the above-mentioned methods 300, 400 and 410 belong to the same concept. The specific implementation process is detailed in methods 300, 400 and 410, which will not be repeated here.

[0297] Corresponding to the method embodiment and the virtual device embodiment provided in the present application, the embodiment of the present application further provides a dialogue system 600. The hardware structure of the dialogue system 600 is introduced below.

[0298] The dialogue system 600 corresponds to the dialogue system in the above-mentioned method 300, method 400 and method 410. The hardware, modules and other operations and / or functions in the dialogue system 600 are respectively for implementing various steps and methods implemented by the dialogue system in the method embodiment. For the detailed process of how the dialogue system 600 provides human-computer dialogue services, the specific details can be referred to the above-mentioned method 300, method 400 and method 410. For the sake of brevity, it will not be repeated here. Among them, each step of method 300, method 400 and method 410 is completed by the hardware integrated logic circuit or software instructions in the processor of the dialogue system 600. The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above-mentioned method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0299] The dialogue system 600 corresponds to the dialogue system 500 in the above virtual device embodiment, and each functional module in the dialogue system 500 is implemented by the software of the dialogue system 600. In other words, the functional modules included in the dialogue system 500 are generated after the processor of the dialogue system 600 reads the program code stored in the memory.

[0300] See attached Fig.18 , attached Fig.18 The structure diagram of a dialogue system 600 provided by an exemplary embodiment of the present application is shown. The dialogue system 600 may be a host, a server or a personal computer, etc. The dialogue system 600 may be implemented by a general bus architecture.

[0301] The dialog system 600 includes at least one processor 601 , a communication bus 602 , a memory 603 , and at least one communication interface 604 .

[0302] The processor 601 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or may be one or more integrated circuits for implementing the solution of the present application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0303] The communication bus 602 is used to transmit information between the above components. The communication bus 602 can be divided into an address bus, a data bus, a control bus, etc. Fig.18 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0304] The memory 603 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 603 may exist independently and be connected to the processor 601 via the communication bus 602. The memory 603 may also be integrated with the processor 601.

[0305] The communication interface 604 uses any transceiver-like device for communicating with other devices or communication networks. The communication interface 604 includes a wired communication interface and may also include a wireless communication interface. Among them, the wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof, etc.

[0306] In a specific implementation, as an embodiment, the processor 601 may include one or more CPUs, such as the attached Fig.18 CPU0 and CPU1 are shown in the figure.

[0307] In a specific implementation, as an embodiment, the dialogue system 600 may include multiple processors, such as the attached Fig.18 601 and processor 605 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0308] In a specific implementation, as an embodiment, the dialogue system 600 may further include an output device 606 and an input device 607. The output device 606 communicates with the processor 601 and may display information in a variety of ways. For example, the output device 606 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 607 communicates with the processor 601 and may receive user input in a variety of ways. For example, the input device 607 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0309] In some embodiments, the memory 603 is used to store the program code 610 for executing the solution of the present application, and the processor 601 can execute the program code 610 stored in the memory 603. That is, the dialogue system 600 can implement the methods 300, 400 and 410 through the processor 601 and the program code 610 in the memory 603.

[0310] The dialogue system 600 of the embodiment of the present application may correspond to the dialogue systems in the above methods 300, 400 and 410, and the processor 601, communication interface 604, etc. in the dialogue system 600 may implement the functions and / or various steps and methods implemented by the dialogue systems in the above methods 300, 400 and 410. For the sake of brevity, they will not be described in detail here.

[0311] It should be understood that the acquisition module 501 and the reply module in the dialogue system 500 are equivalent to the communication interface 604 in the dialogue system 600 ; the recognition module 502 and the determination module 503 in the dialogue system 500 may be equivalent to the processor 601 in the dialogue system 600 .

[0312] It should be understood that the data entry module 201 in the system architecture 200 is equivalent to the communication interface 604 in the dialogue system 600; the model training module 200 and the result generation module 203 in the system architecture 200 can be equivalent to the processor 601 in the dialogue system 600.

[0313] In some possible embodiments, a computer program product is provided. When the computer program product is run on a dialog system, the dialog system executes the methods provided by the above methods 300, 400 and 410.

[0314] Those of ordinary skill in the art will appreciate that the various method steps and units described in the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0315] Technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned methods 300, 400 and 410, and will not be repeated here.

[0316] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0317] The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present application.

[0318] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0319] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0320] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0321] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. When the computer program instructions are loaded and executed on a computer, the process or function in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integration. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (for example, a digital video disc (digitalvideo disc, DVD), or a semiconductor medium (such as a solid state drive), etc.

[0322] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0323] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element.

[0324] In this application, the term "at least one" means one or more, and the term "multiple" means two or more, for example, multiple candidate user intents means two or more candidate user intents. The terms "system" and "network" are often used interchangeably herein.

[0325] It should also be understood that the term "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined that" or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that" or "in response to determining that" or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0326] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A response method in human-computer dialogue, It is characterized in that The method comprises: Obtain the user's reply statement to the interactive device; Performing intent recognition on the reply sentence to obtain candidate user intent; Acquire historical response statements of the interactive device adjacent to the reply statement in the historical conversation; Determine, from a plurality of expected user intentions associated with the historical response statements, a target expected user intention that matches the candidate user intention, the expected user intention being used to represent a category of an expected reply of the user to the historical response statement; According to the target expected user intent and the historical response statement, the jump user intent is determined, and according to the jump user intent, the instruction corresponding to the jump user intent is determined, and the instruction corresponding to the jump user intent is executed. The target response of the interactive device to the reply statement is to execute the instruction corresponding to the jump user intent.

2. The method according to claim 1, It is characterized in that The step of determining a target expected user intent matching the candidate user intent from among a plurality of expected user intents associated with the historical response statements comprises: From a plurality of expected user intentions associated with the historical response sentences, an expected user intention that is the same as the candidate user intention is determined as the target expected user intention.

3. A response method in human-computer dialogue, It is characterized in that The method comprises: Obtain the user's reply statement to the interactive device; Performing intent recognition on the reply sentence to obtain candidate user intent; Acquire historical response statements of the interactive device adjacent to the reply statement in the historical conversation; Determine, from a plurality of expected user intentions associated with the historical response statements, a target expected user intention that matches the candidate user intention, the expected user intention being used to represent content of an expected reply of the user to the historical response statement; According to the correspondence between the target expected user intention and the candidate response sentence templates, acquiring a target response sentence template matching the target expected user intention from at least one candidate response sentence template; Acquire a target keyword, where the target keyword is used to represent a key content of the conversation of the historical conversation; Identifying the type of the target keyword; The target keyword is filled into the first target slot corresponding to the type in the target response sentence template to obtain a target response sentence of the interactive device to the reply sentence.

4. The method according to claim 3, It is characterized in that The target keywords include: extracting the target keyword in the historical response sentence; or, extracting the target keyword from the historical reply statements of the user to the interactive device in the historical conversation; or, Configuration information is queried to obtain the target keyword associated with the historical response statement, wherein the configuration information includes a preset association relationship between the historical response statement and the target keyword.

5. The method according to claim 4, It is characterized in that The extracting the target keyword from the historical response sentence includes: performing named entity recognition on the historical response sentence, and using the obtained common named entity as the target keyword.

6. The method according to claim 4, It is characterized in that The extracting the target keyword from the historical reply statements of the user to the interactive device in the historical conversation includes: performing named entity recognition on the historical reply statements, and using the obtained common named entities as the target keyword.

7. The method according to claim 3, It is characterized in that After performing intent recognition on the reply statement to obtain candidate user intent, the method further includes: When it is identified that the candidate user intention is missing, the step of determining a target response statement of the interactive device to the reply statement based on the target expected user intention is performed.

8. The method according to claim 3, It is characterized in that The step of determining a target expected user intent matching the candidate user intent from among a plurality of expected user intents associated with the historical response statements comprises: From among a plurality of expected user intentions associated with the historical response sentences, an expected user intention including the candidate user intention is determined as the target expected user intention.

9. A dialogue system, It is characterized in that The dialogue system comprises: An acquisition module, used to acquire a user's reply statement to the interactive device; A recognition module, used to perform intent recognition on the reply sentence to obtain candidate user intents; The acquisition module is further used to acquire historical response statements of the interactive device adjacent to the reply statement in the historical conversation; A determination module, configured to determine a target expected user intent that matches the candidate user intent from a plurality of expected user intents associated with the historical response statements, wherein the expected user intent is used to represent a category of an expected reply of the user to the historical response statement; The determination module is also used to determine the jump user intention based on the target expected user intention and the historical response statement, determine the instruction corresponding to the jump user intention based on the jump user intention, and execute the instruction corresponding to the jump user intention. The target response of the interactive device to the reply statement refers to executing the instruction corresponding to the jump user intention.

10. A dialogue system, It is characterized in that The dialogue system comprises: An acquisition module, used to acquire a user's reply statement to the interactive device; A recognition module, used to perform intent recognition on the reply sentence to obtain candidate user intents; The acquisition module is further used to acquire historical response statements of the interactive device adjacent to the reply statement in the historical conversation; A determination module, configured to determine a target expected user intent that matches the candidate user intent from a plurality of expected user intents associated with the historical response statements, wherein the expected user intent is used to represent the content of the user's expected reply to the historical response statement; The determination module is also used to obtain a target response statement template that matches the target expected user intention from at least one candidate response statement template based on the correspondence between the target expected user intention and the candidate response statement template; obtain a target keyword, where the target keyword is used to represent the key content of the conversation of the historical conversation; identify the type of the target keyword; fill the target keyword into the first target slot corresponding to the type in the target response statement template, and obtain the target response statement of the interactive device to the reply statement.

11. A dialogue system, It is characterized in that The dialog system comprises a processor, and the processor is used to execute instructions so that the dialog system performs the method according to any one of claims 1 to 8.

12. A computer-readable storage medium, It is characterized in that The storage medium stores at least one instruction, and the instruction is read by the processor to enable the dialogue system to execute the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Response method in human-computer dialogue, dialogue system, and storage medium

    EP4685687A2

  • Response method in man-machine dialogue, dialogue system, and storage medium

    WO2021232957A1