Intelligent dialogue method, device, computer equipment and storage medium
By obtaining user input dialogue information in the intelligent voice dialogue system, judging intent and entities, and performing scenario-based entity collection and replacement, the problems of inaccurate entity replacement and poor versatility in the existing system are solved, and more efficient dialogue accuracy and fluency are achieved.
Patent Information
- Application Number
- CN201910788630.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-26
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2039-08-26
AI Technical Summary
Existing intelligent voice dialogue systems cannot respond accurately or have poor versatility when entities are replaced, resulting in unsmooth conversations and low accuracy.
By obtaining the dialogue information input by the user, determining whether the intent and entity are expressed, collecting or replacing entities according to the scenario, and generating corresponding reply words, the accuracy of entity collection and replacement is ensured.
It improves the accuracy and fluency of conversations, supports entity replacement in multiple scenarios, and improves conversation efficiency and versatility.
Smart Images

Figure CN110675867B_ABST
Abstract
Description
Technical field
[0001] The present application relates to the field of artificial intelligence, and in particular to intelligent dialogue methods, devices, computer equipment, and storage media. [Background Technology]
[0002] At present, the application of intelligent voice dialogue is becoming more and more popular, such as in the fields of intelligent customer service, intelligent outbound calls, etc., which usually involve multiple rounds of dialogue.
[0003] During a conversation, the need for entity replacement is quite common. For example, in a weather check scenario, after asking about the weather in Beijing, the user may continue to ask, "What about Tianjin?"
[0004] Existing processing methods usually either do not support entity replacement or only support entity replacement in a fixed process, that is, at certain fixed nodes in the conversation process, the user is asked whether entity replacement is required through active guidance, such as "Where else do you want to inquire about the weather?"
[0005] In the former approach, after the user replaces an entity, the system may not know how to respond or may give an incorrect response, reducing the accuracy of the voice conversation and causing the conversation to be unsmooth. The latter approach only supports entity replacement within a fixed process, which is less versatile and cannot be transferred to other scenarios. [Summary of the invention]
[0006] In view of this, the present application provides an intelligent dialogue method, apparatus, computer device and storage medium.
[0007] The specific technical solutions are as follows:
[0008] An intelligent dialogue method, comprising:
[0009] Get the dialogue information entered by the user;
[0010] If it is determined that the conversation message does not express an intention and the current scene is in a scene corresponding to an intention, the following predetermined processing is performed:
[0011] If it is determined that an entity is expressed in the conversation information, then for any entity expressed, if it is determined that no entity of the same type as the entity is collected in the current scenario, the entity is collected; otherwise, the entity is used to replace the collected entity of the same type, and entities that do not match the entity in other collected entities are cleared;
[0012] If it is determined that all entities that need to be collected in the current scenario have been collected, a reply script is generated based on the intent and the collected entities.
[0013] According to a preferred embodiment of the present application, the method further includes: if it is determined that the intention is not expressed in the dialogue information, and the user is currently in a scene corresponding to the intention, and the entity is not expressed in the dialogue information, and the entities that need to be collected in the current scene have not been collected, then generating a reply script to guide the user to express the entities that have not been collected in the current scene.
[0014] According to a preferred embodiment of the present application, the method further includes: if it is determined that the intention is not expressed in the dialogue information and the user is not currently in any scene, generating a reply script to guide the user to express the intention.
[0015] According to a preferred embodiment of the present application, the method further includes: if it is determined that an intention is expressed in the dialogue information, entering a scene corresponding to the expressed intention and executing the predetermined processing.
[0016] According to a preferred embodiment of the present application, the method further includes: if the expressed intention is an intention that has been expressed before, obtaining the entities collected in the saved scenario corresponding to the expressed intention, and performing the predetermined processing.
[0017] According to a preferred embodiment of the present application, the method further includes: if it is determined that the intention is expressed in the conversation information, and the entity is not expressed in the conversation information, and the entities that need to be collected in the current scenario have not been collected, then generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
[0018] According to a preferred embodiment of the present application, before collecting the entity, it further includes: determining whether the expression of the conversation information is consistent with the expression of the entity collection, if so, collecting the entity, and when the entities that need to be collected in the current scenario have not been collected, generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
[0019] According to a preferred embodiment of the present application, the method further includes: if it is determined that the expression of the conversation information does not conform to the expression of entity collection, and the entities that need to be collected in the current scenario have not been collected, then generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
[0020] According to a preferred embodiment of the present application, before replacing the collected entities of the same type with the entity, it further includes: determining whether the expression of the conversation information conforms to the expression of entity replacement; if so, replacing the collected entities of the same type with the entity, and clearing entities that do not match the entity in other collected entities; and when the entities that need to be collected in the current scenario have not been collected, generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
[0021] According to a preferred embodiment of the present application, the method further includes: if it is determined that the expression of the conversation information does not conform to the expression of entity replacement, and the entities that need to be collected in the current scenario have not been collected, then generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
[0022] An intelligent dialogue device, comprising: an acquisition unit and a dialogue unit;
[0023] The acquiring unit is configured to acquire the dialogue information input by the user;
[0024] The dialogue unit is used to perform the following predetermined processing when it is determined that no intention is expressed in the dialogue information and the current scene is in a scene corresponding to the intention: if it is determined that an entity is expressed in the dialogue information, then for any entity expressed, if it is determined that no entity of the same type as the entity is collected in the current scene, then the entity is collected; otherwise, the entity is used to replace the collected entity of the same type, and the entities that do not match the entity in other collected entities are cleared; if it is determined that all entities that need to be collected in the current scene have been collected, then a reply script is generated according to the intention and the collected entities.
[0025] According to a preferred embodiment of the present application, the dialogue unit is further used to generate a reply script to guide the user to express the entities that have not been collected in the current scenario if it is determined that the intention is not expressed in the dialogue information and the user is currently in a scenario corresponding to the intention, and the entity is not expressed in the dialogue information, and the entities that need to be collected in the current scenario have not been collected.
[0026] According to a preferred embodiment of the present application, the dialogue unit is further used to generate a reply script to guide the user to express his intention if it is determined that the intention is not expressed in the dialogue information and the user is not currently in any scene.
[0027] According to a preferred embodiment of the present application, the dialogue unit is further configured to, if it is determined that an intention is expressed in the dialogue information, enter a scene corresponding to the expressed intention and execute the predetermined processing.
[0028] According to a preferred embodiment of the present application, the dialogue unit is further used to, if the expressed intention is an intention that has been expressed before, obtain the entities collected in the saved scenario corresponding to the expressed intention and perform the predetermined processing.
[0029] According to a preferred embodiment of the present application, the dialogue unit is further used to generate a reply script to guide the user to express the entities that have not been collected in the current scenario if it is determined that the intention is expressed in the dialogue information, and the entity is not expressed in the dialogue information, and the entities that need to be collected in the current scenario have not been collected.
[0030] According to a preferred embodiment of the present application, the dialogue unit is further used to determine whether the expression of the dialogue information is consistent with the expression of the entity collection before collecting the entity. If it is consistent, the entity is collected, and when the entities that need to be collected in the current scenario have not been collected, a reply script is generated to guide the user to express the entities that have not been collected in the current scenario.
[0031] According to a preferred embodiment of the present application, the dialogue unit is further used to generate a reply script to guide the user to express the entities that have not been collected in the current scenario if it is determined that the expression of the dialogue information does not conform to the expression of entity collection and the entities that need to be collected in the current scenario have not been collected.
[0032] According to a preferred embodiment of the present application, the dialogue unit is further used to determine whether the expression of the dialogue information conforms to the expression of entity replacement before replacing the collected entities of the same type with the entity; if so, replace the collected entities of the same type with the entity, and clear the entities that do not match the entity in other collected entities; and when the entities that need to be collected in the current scenario have not been collected, generate a reply script to guide the user to express the entities that have not been collected in the current scenario.
[0033] According to a preferred embodiment of the present application, the dialogue unit is further used to generate a reply script to guide the user to express the entities that have not been collected in the current scenario if it is determined that the expression of the dialogue information does not conform to the expression of entity replacement and the entities that need to be collected in the current scenario have not been collected.
[0034] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the method described above is implemented when the processor executes the program.
[0035] A computer-readable storage medium stores a computer program, which implements the above-mentioned method when executed by a processor.
[0036] Based on the above introduction, it can be seen that by adopting the solution described in this application, users can replace entities at any time according to their own needs, and can update other entities accordingly based on the replaced entities, so that they can generate reply words more accurately, thereby improving the accuracy and fluency of the conversation; moreover, for different situations, corresponding reply words can be used to guide users to express their intentions or entities, etc., thereby improving the efficiency of the conversation; in addition, before collecting entities or replacing entities, it can be judged whether it meets the requirements of entity collection or entity replacement. Only when the judgment result is yes, entity collection or entity replacement will be performed, thereby ensuring the accuracy of entity collection and entity replacement, and further improving the accuracy of the conversation; furthermore, the solution described in this application can be applied to various scenarios, and supports users to replace entities at any time, etc., and has strong versatility.
Brief Description of the Drawings
[0037] Figure 1 This is a flowchart of the first embodiment of the intelligent dialogue method described in this application.
[0038] Figure 2 This is a flowchart of the second embodiment of the intelligent dialogue method described in this application.
[0039] Figure 3 This is a schematic diagram of the structure of an embodiment of the intelligent dialogue device described in this application.
[0040] Figure 4 A block diagram of an exemplary computer system / server 12 suitable for implementing embodiments of the present application is shown. [Specific implementation method]
[0041] In order to make the technical solution of the present application clearer and more understandable, the solution of the present application is further described below with reference to the accompanying drawings and examples.
[0042] Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0043] Furthermore, it should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " as used herein generally indicates that the associated objects are in an "or" relationship.
[0044] Figure 1 This is a flow chart of the first embodiment of the intelligent dialogue method described in this application. Figure 1 As shown, the following specific implementation methods are included.
[0045] In 101, dialog information input by the user is obtained.
[0046] In 102 , if it is determined that the conversation information does not express an intention and the user is currently in a scene corresponding to an intention, the processing shown in 103 - 104 is executed.
[0047] In 103, if it is determined that an entity is expressed in the conversation information, then for any entity expressed, if it is determined that an entity of the same type as the entity has not been collected in the current scenario, the entity is collected; otherwise, the collected entity of the same type is replaced with the entity, and entities that do not match the entity in other collected entities are cleared.
[0048] In 104 , if it is determined that all entities that need to be collected in the current scenario have been collected, a reply script is generated according to the intention and the collected entities.
[0049] An intent represents a business action that a user wants to complete, such as checking the weather, checking balance, or booking a hotel. It's similar to a function in code. An intent and all the conversations surrounding it constitute a scene. A scene changes or ends only when the user expresses a new intent or ends the conversation.
[0050] The conversation information input by the user refers to the conversation content input by the user to the machine during the intelligent conversation process, which is called query in the embodiment of the present application.
[0051] The solution described in this application can be applied to voice conversations as well as text conversations, etc. In this embodiment, voice conversations are used as an example for explanation.
[0052] For user-entered queries, voice recognition is first performed. Then, based on the voice recognition results, intent recognition is performed to determine whether the query contains an intent and what the intent is. There are no restrictions on how intent recognition is performed; for example, it can be implemented based on template matching, text classification, and other methods.
[0053] Entity recognition can also be performed based on speech recognition results. This involves identifying whether an entity is mentioned in the query and which entity(ies) are mentioned. Entities are parameters required to complete a business action, such as time and location. Similar to parameters in a function, an intent plus several entities can complete a business action. There are no restrictions on how entity recognition is performed; for example, it can be based on keyword matching, template matching, statistical models, and other methods.
[0054] If it is determined that the query does not express an intent and the current scenario is in a scenario corresponding to a certain intent, the following predetermined processing can be performed: if the query expresses an entity, then for any entity expressed, if it is determined that entities of the same type as the entity have not been collected in the current scenario, then the entity will be collected; if it is determined that entities of the same type as the entity have been collected in the current scenario, then the entity will be used to replace the collected entities of the same type, and entities that do not match the entity in other collected entities will be cleared; if it is determined that all entities that need to be collected in the current scenario have been collected, then a reply will be generated based on the intent and the collected entities and returned to the user.
[0055] If it is determined that the query does not express the intent, and the user is currently in a scenario corresponding to a certain intent, and the query does not express the entity, and the entities that need to be collected in the current scenario have not been collected, a reply script can be generated to guide the user to express the entities that have not been collected in the current scenario.
[0056] If it is determined that the query does not express the intent and the user is not currently in any scenario, a reply script can be generated to guide the user to express the intent.
[0057] If it is determined that the query expresses an intent, the scenario corresponding to the expressed intent can be entered, and the predetermined processing can be performed, that is: if the query expresses an entity, then for any entity expressed, if it is determined that entities of the same type as the entity have not been collected in the current scenario, the entity will be collected; if it is determined that entities of the same type as the entity have been collected in the current scenario, the entity will be used to replace the collected entities of the same type, and entities that do not match the entity in other collected entities will be cleared; if it is determined that all entities that need to be collected in the current scenario have been collected, a reply script will be generated based on the intent and the collected entities.
[0058] Furthermore, if it is determined that the intent expressed in the query is an intent that has been expressed before, then the entities collected in the saved scene corresponding to the expressed intent can be obtained, and the predetermined processing can be performed. For example, when the user is in scene A corresponding to intent A, some entities have been collected and saved. At this time, the user expresses a new intent B, then the user will enter scene B corresponding to intent B. After scene B ends, the user expresses intent A again, thereby re-entering scene A. Then, the entities collected in the previously saved scene A can be obtained, and then the predetermined processing can be continued. In this way, there is no need to collect all the entities again, thereby improving the efficiency of voice conversation.
[0059] If it is determined that the query expresses an intent, then after entering the scenario corresponding to the expressed intent, if it is determined that no entity is expressed in the query and the entities that need to be collected in the current scenario have not been collected, a reply script can be generated to guide the user to express the entities that have not been collected in the current scenario.
[0060] In the handling methods described above for the different situations, before collecting any entity, you can first determine whether the query statement conforms to the entity collection statement. If so, the entity can be collected. If the entities required for collection in the current scenario have not been collected, a response script is generated to guide the user to express the entities not collected in the current scenario. If it is determined that the query statement does not conform to the entity collection statement, and the entities required for collection in the current scenario have not been collected, a response script can also be generated to guide the user to express the entities not collected in the current scenario.
[0061] Similarly, for any entity, before replacing already collected entities of the same type with that entity, you can first determine whether the query expression meets the entity replacement expression. If it does, you can replace the already collected entities of the same type with that entity, and clear out other collected entities that do not match that entity. If the entities that need to be collected in the current scenario have not been collected, a reply script is generated to guide the user to express the entities that have not been collected in the current scenario. If it is determined that the query expression does not meet the entity replacement expression, and the entities that need to be collected in the current scenario have not been collected, a reply script can also be generated to guide the user to express the entities that have not been collected in the current scenario.
[0062] Based on the above introduction, Figure 2 This is a flow chart of the second embodiment of the intelligent dialogue method described in this application. Figure 2 As shown, the following specific implementation methods are included.
[0063] In 201 , intent recognition and entity recognition are performed on the query input by the user.
[0064] Assuming that the query input by the user is a voice query, voice recognition can be performed first, and then intent recognition and entity recognition can be performed based on the voice recognition result. Alternatively, entity recognition can also be performed when needed, which is not limited in this embodiment.
[0065] In 202 , it is determined whether the query expresses an intention. If so, execute 203 ; otherwise, execute 204 .
[0066] In 203 , enter the scenario corresponding to the expressed intention and execute 206 .
[0067] If the expressed intention is an intention that has been expressed before, the entities collected in the saved scenario corresponding to the expressed intention can also be obtained and 206 is executed.
[0068] For example, when a user is in scene A corresponding to hotel booking (intent A), some entities have already been collected and saved. At this time, the user expresses a new intent B, such as the intent to check the weather, which will jump to scene B corresponding to intent B. After scene B ends, the user expresses intent A again and can re-enter scene A. In this way, the previously saved entities collected under scene A can be obtained and then execution continues at 206. In this way, there is no need to collect all entities again, thereby improving the efficiency of voice dialogue.
[0069] In 204 , it is determined whether the current state is in a scene corresponding to a certain intention. If not, execute 205 ; if so, execute 206 .
[0070] In 205 , a reply script is generated to guide the user to express his intention, and this round of dialogue ends.
[0071] If the query does not express the intent and is not currently in any scenario, the query can be considered invalid and discarded, and a response can be generated to guide the user to express their intent, such as "How can I help you?"
[0072] A question and answer between the user and the machine constitutes a conversation.
[0073] In 206 , it is determined whether the query expresses an entity. If not, the process proceeds to 207 . If so, the process proceeds to 208 .
[0074] In 207 , a response script is generated to guide the user to express entities that are not collected in the current scenario, and this round of dialogue ends.
[0075] If no entity is expressed in the query, then when the entities that need to be collected in the current scenario have not been collected, a reply script can be generated to guide the user to express the entities that have not been collected in the current scenario.
[0076] The entities that need to be collected in different scenarios can be pre-defined. For example, in the weather query scenario, entities such as location and time need to be collected.
[0077] Furthermore, for each scenario, the order of different entities that need to be collected can be pre-set. In this way, when it is necessary to generate a reply script to guide the user to express the entities that have not been collected in the current scenario, the reply script can be generated first to guide the user to express the entity with the highest order among the entities that have not been collected in the current scenario.
[0078] In 208 , for any entity described, it is determined whether entities of the same type as the entity have been collected in the current scenario. If not, execute 209 ; if so, execute 210 .
[0079] In 209 , the entity is collected, and then 211 is executed.
[0080] If it is determined that no entity of the same type as the entity has been collected in the current scenario, then the entity can be collected. For example, in the weather query scenario, if the entity is a time type entity and has not been collected, then the entity can be collected.
[0081] Preferably, before collecting any entity, it is also possible to determine whether the expression of the query is consistent with the expression of the entity collection. If it is consistent, the entity can be collected.
[0082] There is no restriction on how to determine whether the expression of the query is consistent with the expression of the entity collection. For example, it may include but is not limited to the following methods: if only the entity is expressed after the stop words are removed from the query, then the expression of the query can be considered to be consistent with the expression of the entity collection. Alternatively, it can be based on the method of speech template matching. If the match is successful, then the expression of the query can be considered to be consistent with the expression of the entity collection. Alternatively, by accumulating the speech of the entity collection and training the evaluation model, the evaluation model can be used to determine whether the expression of the query is consistent with the expression of the entity collection.
[0083] If it is determined that the expression of the query does not conform to the expression of entity collection, and the entities that need to be collected in the current scenario have not been collected, a reply script can be generated to guide the user to express the entities that have not been collected in the current scenario. For example, a reply script can be generated to guide the user to express the entity with the highest order among the entities that have not been collected in the current scenario, and this round of dialogue ends.
[0084] In 210 , the collected entities of the same type are replaced with the entity, and the collected entities that do not match the entity are cleared.
[0085] If it is determined that entities of the same type as the entity have been collected in the current scenario, then the entity can be used to replace the collected entities of the same type, and entities in other collected entities that do not match the entity can be cleared.
[0086] Preferably, before replacing the collected entities of the same type with the entity, it is also possible to first determine whether the expression of the query conforms to the expression of entity replacement. If so, the collected entities of the same type can be replaced with the entity.
[0087] There is no restriction on how to determine whether the expression of the query conforms to the expression of entity replacement. For example, it may include but is not limited to the following methods: it may be based on the method of matching the speech template. If the match is successful, it can be considered that the expression of the query conforms to the expression of entity replacement. Alternatively, by accumulating entity replacement speech, training an evaluation model, and using the evaluation model to determine whether the expression of the query conforms to the expression of entity replacement.
[0088] If the entity replacement statement is met, the entity can be used to replace the collected entities of the same type. Furthermore, based on the pre-set constraints between entities, it can be determined whether other collected entities do not match the entity and can be cleared. In other words, when a certain type of entity is updated, it can be determined whether the collected entities of other types are still valid. If not, they can be cleared and collected again.
[0089] For example, in the hotel booking scenario, entities such as the location is Hangzhou, the time is October 1, and the hotel is **Hotel have been collected. However, the user replaced the location from Hangzhou to Shanghai through entity replacement. After query, it was found that all **Hotels in Shanghai on October 1 have been booked. Therefore, the hotel entity does not match the updated location entity and needs to be collected again.
[0090] In addition, if it is determined that the expression of the query does not conform to the expression of entity replacement, and the entities that need to be collected in the current scenario have not been collected, a reply script can be generated to guide the user to express the entities that have not been collected in the current scenario. For example, a reply script can be generated to guide the user to express the entity with the highest order among the entities that have not been collected in the current scenario, and this round of dialogue ends.
[0091] In 211 , it is determined whether the entities that need to be collected in the current scenario have been collected. If so, execute 212 ; otherwise, execute 213 .
[0092] In 212, a response is generated based on the intent corresponding to the current scenario and the collected entities, and this round of conversation ends.
[0093] If you can connect to the business system to complete business actions (such as checking the weather, booking a hotel, etc.), generate reply words based on the return results of the business system.
[0094] In 213, a response script is generated to guide the user to express entities that are not collected in the current scenario, and this round of dialogue ends.
[0095] For example, a reply script can be generated to guide the user to express the entity that ranks first among the entities that have not been collected in the current scenario.
[0096] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0097] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0098] In summary, by adopting the scheme described in the embodiment of the method of the present application, users can replace entities at any time according to their own needs, and can update other entities accordingly based on the replaced entities, so that they can generate reply words more accurately, thereby improving the accuracy and fluency of the conversation; moreover, for different situations, corresponding reply words can be used to guide users to express their intentions or entities, etc., thereby improving the efficiency of the conversation; in addition, before performing entity collection or entity replacement, it can be judged whether it meets the entity collection or entity replacement expression. Only when the judgment result is yes, entity collection or entity replacement will be performed, thereby ensuring the accuracy of entity collection and entity replacement, and further improving the accuracy of the conversation; furthermore, the scheme described in the embodiment of the method of the present application can be applied to various scenarios, and supports users to perform entity replacement at any time, etc., and has strong versatility.
[0099] The above is an introduction to the method embodiment. The following is a device embodiment to further illustrate the solution described in this application.
[0100] Figure 3 This is a schematic diagram of the structure of the intelligent dialogue device embodiment described in this application. Figure 3 As shown, it includes: an acquisition unit 301 and a dialogue unit 302.
[0101] The acquisition unit 301 is used to acquire a query input by a user.
[0102] The dialogue unit 302 is used to perform the following predetermined processing when it is determined that the intent is not expressed in the query and the current scene is corresponding to the intent: if it is determined that the query expresses an entity, then for any entity expressed, if it is determined that no entity of the same type as the entity has been collected in the current scene, then the entity is collected; otherwise, the entity is used to replace the collected entities of the same type, and the entities that do not match the entity in other collected entities are cleared; if it is determined that all entities that need to be collected in the current scene have been collected, then a reply is generated according to the intent corresponding to the current scene and the collected entities.
[0103] In addition, the dialogue unit 302 may further perform one or any combination of the following processes.
[0104] If it is determined that the intent is not expressed in the query, and the user is currently in a scenario corresponding to the intent, and no entity is expressed in the query, and the entities that need to be collected in the current scenario have not been collected, then a reply script is generated to guide the user to express the entities that have not been collected in the current scenario.
[0105] If it is determined that the query does not express the intent and the user is not currently in any scenario, a response script is generated to guide the user to express the intent.
[0106] If it is determined that the query expresses an intent, the scenario corresponding to the expressed intent is entered and the predetermined processing is performed.
[0107] If the expressed intention is an intention that has been expressed before, the entities collected in the saved scenario corresponding to the expressed intention are obtained, and predetermined processing is performed.
[0108] If it is determined that the query expresses the intent, and the query does not express the entity, and the entities that need to be collected in the current scenario have not been collected, a reply script is generated to guide the user to express the entities that have not been collected in the current scenario.
[0109] Before collecting entities, determine whether the query expression is consistent with the expression of entity collection. If it is consistent, collect the entity. When the entities that need to be collected in the current scenario have not been collected, generate a reply script to guide the user to express the entities that have not been collected in the current scenario.
[0110] If it is determined that the expression of the query does not conform to the expression of entity collection, and the entities that need to be collected in the current scenario have not been collected, a reply script is generated to guide the user to express the entities that have not been collected in the current scenario.
[0111] Before replacing the collected entities of the same type with an entity, determine whether the query expression matches the entity replacement expression. If so, replace the collected entities of the same type with the entity, and clear the entities that do not match the entity in other collected entities. When the entities that need to be collected in the current scenario have not been collected, generate a reply script to guide the user to express the entities that have not been collected in the current scenario.
[0112] If it is determined that the query expression does not conform to the expression of entity replacement, and the entities that need to be collected in the current scenario have not been collected, a reply script is generated to guide the user to express the entities that have not been collected in the current scenario.
[0113] Figure 3 For the specific working process of the device embodiment shown, please refer to the corresponding description in the aforementioned method embodiment, which will not be repeated here.
[0114] In summary, by adopting the scheme described in the embodiment of the device of the present application, users can replace entities at any time according to their own needs, and can update other entities accordingly based on the replaced entities, so that they can generate reply words more accurately, thereby improving the accuracy and fluency of the conversation; moreover, for different situations, the corresponding reply words can be used to guide users to express their intentions or entities, etc., thereby improving the efficiency of the conversation; in addition, before performing entity collection or entity replacement, it can be judged whether it meets the entity collection or entity replacement expression. Only when the judgment result is yes, entity collection or entity replacement will be performed, thereby ensuring the accuracy of entity collection and entity replacement, and further improving the accuracy of the conversation; furthermore, the scheme described in the embodiment of the device of the present application can be applied to various scenarios, and supports users to perform entity replacement at any time, etc., and has strong versatility.
[0115] Figure 4 A block diagram of an exemplary computer system / server 12 suitable for implementing embodiments of the present application is shown. Figure 4 The computer system / server 12 shown is merely an example and should not limit the functionality and scope of use of the embodiments of the present application.
[0116] like Figure 4 As shown, computer system / server 12 is implemented as a general-purpose computing device. Components of computer system / server 12 may include, but are not limited to, one or more processors (processing units) 16, memory 28, and a bus 18 that connects various system components (including memory 28 and processor 16).
[0117] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0118] Computer system / server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer system / server 12, including volatile and non-volatile media, removable and non-removable media.
[0119] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer system / server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 4 Not shown, often called a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present application.
[0120] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0121] The computer system / server 12 may also communicate with one or more external devices 14 (e.g., a keyboard, a pointing device, a display 24, etc.), one or more devices that enable a user to interact with the computer system / server 12, and / or any device that enables the computer system / server 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may occur through an input / output (I / O) interface 22. Furthermore, the computer system / server 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 20. Figure 4 As shown, network adapter 20 communicates with the other modules of computer system / server 12 via bus 18. It should be understood that although not shown, other hardware and / or software modules may be used in conjunction with computer system / server 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0122] The processor 16 executes the programs stored in the memory 28 to perform various functional applications and data processing, such as implementing Figure 1 or Figure 2 The method in the embodiment shown.
[0123] The present application also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the following will be realized: Figure 1 or Figure 2 The method in the embodiment shown.
[0124] Any combination of one or more computer-readable media can be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.
[0125] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0126] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0127] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0128] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units described is merely a logical function division, and other division methods may be used in actual implementation.
[0129] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0130] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0131] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code.
[0132] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An intelligent dialogue method, characterized in that: include: Get the dialogue information entered by the user; If it is determined that the conversation message does not express an intention and the current scene is in a scene corresponding to an intention, the following predetermined processing is performed: If it is determined that the conversation information describes an entity, then for any entity described, if it is determined that no entity of the same type as the entity has been collected in the current scenario, the entity is collected; otherwise, in response to determining that the description of the conversation information meets the description of entity replacement, the entity is used to replace the collected entity of the same type, and based on the pre-set constraint relationship between entities, entities that do not match the entity are selected from other collected entities and removed; If it is determined that all entities that need to be collected in the current scenario have been collected, a reply script is generated based on the intent and the collected entities.
2. The method according to claim 1, characterized in that The method further includes: if it is determined that the intention is not expressed in the dialogue information, and the user is currently in a scene corresponding to the intention, and the entity is not expressed in the dialogue information, and the entities that need to be collected in the current scene have not been collected, then generating a reply script to guide the user to express the entities that have not been collected in the current scene.
3. The method according to claim 1, characterized in that The method further includes: if it is determined that the intention is not expressed in the dialogue information and the user is not currently in any scene, generating a reply script to guide the user to express the intention.
4. The method according to claim 1, wherein The method further includes: if it is determined that an intention is expressed in the dialogue information, entering a scene corresponding to the expressed intention and executing the predetermined processing.
5. The method according to claim 4, characterized in that The method further includes: if the expressed intention is an intention that has been expressed before, obtaining the entities collected in the saved scenario corresponding to the expressed intention, and performing the predetermined processing.
6. The method according to claim 5, characterized in that The method further includes: if it is determined that the intention is expressed in the dialogue information, and the entity is not expressed in the dialogue information, and the entities that need to be collected in the current scenario have not been collected, then generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
7. The method according to claim 5, characterized in that Before collecting the entity, it further includes: determining whether the expression of the conversation information is consistent with the expression of the entity collection. If it is consistent, the entity is collected, and when the entities that need to be collected in the current scenario have not been collected, a reply script is generated to guide the user to express the entities that have not been collected in the current scenario.
8. The method according to claim 7, characterized in that The method further includes: if it is determined that the expression of the conversation information does not conform to the expression of entity collection, and the entities that need to be collected in the current scenario have not been collected, generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
9. The method according to claim 5, characterized in that The method further includes: after selecting and clearing entities that do not match the entity from other collected entities, when the entities that need to be collected in the current scenario have not been collected, generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
10. The method according to claim 9, characterized in that The method further includes: if it is determined that the expression of the dialogue information does not conform to the expression of entity replacement, and the entities that need to be collected in the current scenario have not been collected, generating a reply script to guide the user to express the entities that have not been collected in the current scenario.
11. An intelligent dialogue device, characterized in that: include: Acquisition unit and dialogue unit; The acquiring unit is configured to acquire the dialogue information input by the user; The dialogue unit is configured to, when it is determined that no intent is expressed in the dialogue information and the user is currently in a scenario corresponding to an intent, perform the following predetermined processing: if it is determined that an entity is expressed in the dialogue information, then for any entity expressed, if it is determined that no entity of the same type as the entity has been collected in the current scenario, collect the entity; otherwise, in response to determining that the expression in the dialogue information conforms to an entity replacement expression, replace the collected entities of the same type with the entity, and select and remove entities that do not match the entity from other collected entities based on a pre-defined constraint relationship between entities; If it is determined that all entities that need to be collected in the current scenario have been collected, a reply script is generated based on the intent and the collected entities.
12. The device according to claim 11, characterized in that The dialogue unit is further used to generate a reply script to guide the user to express the entities that have not been collected in the current scenario if it is determined that the intention is not expressed in the dialogue information and the user is currently in a scenario corresponding to the intention, and the entity is not expressed in the dialogue information, and the entities that need to be collected in the current scenario have not been collected.
13. The device according to claim 11, characterized in that The dialogue unit is further used to generate a reply script to guide the user to express his intention if it is determined that the intention is not expressed in the dialogue information and the user is not currently in any scene.
14. The device according to claim 11, characterized in that The dialogue unit is further configured to, if it is determined that an intention is expressed in the dialogue information, enter a scene corresponding to the expressed intention and execute the predetermined processing.
15. The device according to claim 14, characterized in that The dialogue unit is further used to, if the expressed intention is an intention that has been expressed before, obtain the entities collected in the saved scenario corresponding to the expressed intention and perform the predetermined processing.
16. The device according to claim 15, characterized in that The dialogue unit is further used to generate a reply script to guide the user to express the entities that have not been collected in the current scenario if it is determined that the intention is expressed in the dialogue information, the entities are not expressed in the dialogue information, and the entities that need to be collected in the current scenario have not been collected.
17. The device according to claim 15, characterized in that The dialogue unit is further used to determine whether the expression of the dialogue information is consistent with the expression of entity collection before collecting the entity. If it is consistent, the entity is collected, and when the entities that need to be collected in the current scenario have not been collected, a reply script is generated to guide the user to express the entities that have not been collected in the current scenario.
18. The device according to claim 17, characterized in that The dialogue unit is further used to generate a reply script to guide the user to express the entities that have not been collected in the current scenario if it is determined that the expression of the dialogue information does not conform to the expression of entity collection and the entities that need to be collected in the current scenario have not been collected.
19. The device according to claim 15, characterized in that The dialogue unit is further used to, after selecting and clearing entities that do not match the entity from other collected entities, generate a reply script to guide the user to express the entities that have not been collected in the current scenario when the entities that need to be collected in the current scenario have not been collected.
20. The device according to claim 19, characterized in that The dialogue unit is further used to generate a reply script to guide the user to express the entities that have not been collected in the current scenario if it is determined that the expression of the dialogue information does not conform to the expression of entity replacement and the entities that need to be collected in the current scenario have not been collected.
21. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 10 is implemented.
22. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Intelligent automobile shopping guide system and implementation method thereof
CN107292696A