Human-computer interaction method and electronic device

By distinguishing non-required slots in the chatbot system and introducing a user confirmation mechanism, the problem of dissatisfaction caused by user input errors is solved and the user experience is improved.

CN112154431BActive Publication Date: 2024-09-24HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201880093502.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-10
Publication Date
2024-09-24
Estimated Expiration
2038-10-10

AI Technical Summary

Technical Problem

Existing chatbots fail to accurately extract information in non-required slots when the user makes input errors or voice recognition errors, resulting in the user's wishes not being satisfied and affecting the user experience.

Method used

In the human-computer dialogue system, the distinction between non-required key slots and non-required non-critical slots is introduced, and a user confirmation mechanism is configured for the non-required key slots. Through the calculation of reliability and similarity of the recognition slot position, the Necessity of the slot, ask the user to confirm the information.

Benefits of technology

Improved the chatbot's accuracy in identifying user wishes, ensuring that operations meet user needs and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112154431B
    Figure CN112154431B
Patent Text Reader

Abstract

A method for human-computer interaction and an electronic device (100) relate to the field of communication technology and are conducive to accurately identifying the purpose of a user, satisfying the needs of the user, and improving the user experience. The method specifically comprises: during the process of human-computer dialogue interaction, when a server (200) extracts slots from user speech, if there is a slot from which no information is extracted, and the slot is a non-mandatory key slot, the server (200) asks the user a question to determine whether the information in the slot is necessary; if it is necessary information, the server (200) further extracts the information in the slot; if it is not necessary, the server (200) no longer extracts the information in the slot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a human-computer interaction method and electronic equipment. Background Art

[0002] The human-computer dialogue system, also known as the human-computer dialogue platform, chatbot, etc., is a new generation of human-computer interaction interface. Chatbots can have conversations with users, identify the user's intentions during the conversation, and provide services such as ordering meals, booking tickets, and taking taxis.

[0003] like Figure 1A The figure shows an example of a conversation between a chatbot and a user. This example is used to illustrate the working process of the chatbot, which may include: open domain conversation, access conditions, and closed domain conversation. Among them, the open domain conversation refers to the conversation before the chatbot recognizes the user's intention. When the user says "help me call a car", the chatbot determines the user's intention (i.e., the car-hailing service) through logical judgment (i.e., access conditions), and then jumps to the closed domain conversation. The closed domain conversation refers to the conversation conducted after the user's intention is recognized to clarify the user's purpose (or to clarify the task details).

[0004] The closed domain dialogue specifically includes the process of filling slots (referred to as slot filling), clarifying the words, and responding to the results. The slot filling process refers to the process of completing information in order to convert the user's intention into a clear instruction of the user. The slot can be understood as the key information used by the user to express his intention. For example, in Figure 1A In the dialogue shown in , the slots for taxi services include: the slot for the departure place, the slot for the destination, and the slot for the departure time. The chatbot extracts the information of these slots (e.g., the slot values, etc.) based on the dialogue with the user. When the slot information lacks some necessary information, the chatbot will actively ask questions and the user will answer them so that the chatbot can complete the necessary slot information from the user's answer. This process is called the process of clarifying the speech. When the chatbot has collected all the slot information, it can perform corresponding operations, such as placing an order for the user on the taxi app and informing the user after the order is placed, which is the process of responding to the result.

[0005] Currently, there are two types of slots: mandatory slots and non-mandatory slots. When the chatbot fails to extract information for a mandatory slot, it will ask questions and ask the user to clarify until it extracts information for the mandatory slot. When the chatbot fails to extract information for a non-mandatory slot, it will not ask questions and will directly perform the corresponding operation based on the information that does not exist for the non-mandatory slot.

[0006] In actual scenarios, the chatbot often fails to extract key information of some non-mandatory slots due to user input errors, voice recognition errors, or inaccurate slot extraction algorithms. As a result, the chatbot's subsequent operations may not meet the user's needs. For example: Figure 1A In the dialogue shown, the user's "Let's carpool" can be a key information of a non-mandatory slot. If the chatbot fails to accurately extract this key information, it may not book a carpool for the user, which goes against the user's wishes and seriously affects the user experience. Summary of the invention

[0007] The present application provides a human-computer interaction method and electronic device that can accurately identify the user's purpose, meet the user's needs, and improve the user experience.

[0008] In a first aspect, the method provided by the present application can be applied to a human-computer dialogue system, including: a server receives a first input, the first input includes a user's service demand; the server determines a first domain corresponding to the first input based on the first input, the first domain being a task scenario corresponding to the user's service demand; the server distributes the first input to an intent recognition model corresponding to the first domain, identifies a first intent corresponding to the first input, and the first intent is a sub-scenario in the first domain; the server extracts information of a first slot in the first intent from the first input; wherein the first intent is pre-configured with a first slot, and the first slot is a non-mandatory key slot; when the server determines that the information of the first slot has not been extracted, the server asks the user to determine whether the information of the first slot is necessary; the server receives a second input, the second input includes information of whether the information of the first slot confirmed by the user is necessary; if the user confirms that the information of the first slot is necessary information, the server extracts the information of the first slot from the second input; the server performs an operation corresponding to the first intent based on the first intent and the information of the first slot; if the user confirms that the information of the first slot is non-necessary information, the server does not extract the information of the first slot; the server performs an operation corresponding to the first intent based on the first intent.

[0009] Among them, the first input can be a single utterance in a single round of dialogue between the user and the server 200, or it can be multiple utterances in multiple rounds of dialogue between the user and the server 200, which is not limited in the embodiments of the present application.

[0010] Among them, the second input can be a single utterance in a single round of dialogue between the user and the server 200, or it can be multiple utterances in multiple rounds of dialogue between the user and the server 200, which is not limited in the embodiment of the present application.

[0011] It is understandable that a non-mandatory key slot means that the user does not have to express the information of the slot when expressing his intention. If the information of the slot is not expressed, the chatbot can ignore the information of the slot. However, if the user expresses the information of the slot, the chatbot needs to accurately extract the information of the slot.

[0012] It can be seen that in the embodiment of the present application, in the process of the server automatically extracting the information of each pre-set slot according to the user's speech, if there is a slot where no information is extracted, and the slot is a non-mandatory key slot, the chat robot will actively confirm with the user. Confirm whether the information of the non-mandatory key slot can be missing. If it can be missing, continue to extract the information of the non-mandatory key slot according to the user's answer. If it can be missing, the information of the non-mandatory key slot will no longer be extracted, that is, no confirmation will be made to the user. In this way, when the chat robot fails to extract the information of the non-mandatory key slot, it can also confirm with the user to ensure accurate identification of the user's purpose, meet the user's needs, and improve the user experience.

[0013] In a possible implementation, the server extracting information of the first slot in the first intent from the first input includes:

[0014] The server inputs each word or entity identified in the first input into the slot extraction model corresponding to the first slot, and calculates the confidence corresponding to each word or entity in the first input respectively; if the confidence of the first word or the first entity in the first input is greater than or equal to the first threshold, the server confirms that the first word or the first entity is the information of the first slot; if the confidence of each word or each entity in the first input is less than the first threshold, the server determines that the information of the first slot has not been extracted.

[0015] In a possible implementation, the method further includes: if the first slot corresponds to a custom slot type, the server respectively calculates the similarity between each entity identified in the first input and each word in the custom slot type.

[0016] If the similarity between each entity identified in the first input and each word in the custom slot type is less than the second threshold, the server confirms that the first input does not contain information of the first slot; if the similarity between the second entity in the first input and the second word in the custom slot type is greater than or equal to the third threshold, the server confirms that the second word is the information of the first slot; if there is any entity in the first input and the similarity between any word in the custom slot type is greater than or equal to the second threshold and less than the third threshold, the server confirms to ask the user to determine whether the information of the first slot is necessary.

[0017] Among them, when judging the similarity between an entity and a keyword in a user dictionary, for example, an algorithm based on pinyin similarity, an algorithm based on string similarity, etc. can be used to calculate the edit distance between the entity identified in the first input and the keyword in the user dictionary to determine the degree of similarity between the two. It is also possible to use deep learning word vectors, sentence vectors, and other methods to calculate the similarity of words or phrases. The embodiment of the present application does not limit the method for calculating similarity.

[0018] Considering that in the case of user input errors or speech recognition errors, the user may say the information of the first slot, but the server does not extract the information of the first slot. The server 200 can use an error correction method to determine that the entity recognized from the user's speech (i.e., the first input) is similar to the keyword in the user's dictionary, and then trigger the mechanism of confirming with the user. In this way, it is helpful to reduce the number of confirmations to the user, avoid excessive disturbance to the user, and help improve the user experience.

[0019] In one possible implementation, the method also includes: if the confidence of each word or each entity in the first input is less than a fourth threshold, the server confirms that the first input does not contain information for the first slot; if there is any word or any entity in the first input whose confidence is less than the first threshold and greater than or equal to the fourth threshold, the server confirms to ask the user to determine whether the information for the first slot is necessary.

[0020] Considering that when the user correctly expresses the information of the first slot, the first slot information may not be extracted due to the inaccuracy of the slot extraction model itself. For example: before the skill developer trains the slot extraction model, the number of user statements input is small, or the input user statements are not accurate enough, etc., resulting in the server training and generating the slot extraction model is not accurate enough. Then, at this time, the user can set a confirmation threshold. When the slot extraction model gives a slot labeling probability value for the entity identified from the user's speech that is greater than the confirmation threshold, the server triggers a mechanism to confirm with the user. This helps to reduce the number of confirmations to the user, avoid excessive disturbances to the user, and help improve the user experience.

[0021] In one possible implementation, if the information of the first slot confirmed by the user is necessary information, the server extracts the information of the first slot from the second input, including: if the user confirms that the information of the first slot is necessary information, the server uses the slot extraction model corresponding to the first slot or uses rules to extract the information of the first slot from the second input.

[0022] For the same entity and the same slot extraction model, the slot extraction model may not correctly identify the entity the first time, but may correctly identify the entity the second time. This is because when the user says the entity for the first time, the sentence is likely to contain other entities, that is, the entity has context. When the slot extraction model is not accurate enough, it is possible that the entity is not recognized because these contexts are not recognized. Then, when the server cannot recognize the entity for the first time, it asks the user questions about the entity, and the user's answer is an answer to the entity. At this time, the user's answer may only contain the entity, or contain very little context. Then, the slot extraction model is likely to recognize the entity this time. In other embodiments, for user answers, a non-slot extraction model method can also be used to identify the entity, for example, a rule can be enabled to identify the entity. Among them, the rule refers to the combination of the context logic of the user's answer, the relevance of the user's intention, the corresponding relationship between the entity and the first slot, and other factors for identification. In this way, the probability of the server identifying the user saying the entity for the second time or more can also be effectively improved.

[0023] In one possible implementation, a second slot is pre-configured in the first intention, and the second slot is a required slot. The human-computer interaction method also includes: when the server determines that the information of the second slot has not been extracted, the server asks the user a question to extract the information of the second slot; the server receives a third input and extracts the information of the second slot from the third input, and the third input includes the user's answer; the server performs the operation corresponding to the first intention according to the first intention, the information of the first slot, and the information of the second slot; or, the server performs the operation corresponding to the first intention according to the first intention and the information of the second slot.

[0024] In one possible implementation, a third slot is pre-configured in the first intention, and the third slot is a non-mandatory and non-critical slot. The human-computer interaction method also includes: when the server determines that the information of the third slot has not been extracted, the server does not extract the information of the third slot.

[0025] In a second aspect, a server can be used in a human-computer dialogue system, comprising: a communication interface, a memory, and a processor; the communication interface, the memory, and the processor are coupled, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor reads the computer instructions from the memory, the server executes the following steps:

[0026] A first input is received through a communication interface, the first input including a user's service demand; based on the first input, a first domain corresponding to the first input is determined, the first domain being a task scenario corresponding to the user's service demand; the first input is distributed to an intent recognition model corresponding to the first domain, and a first intent corresponding to the first input is identified, the first intent being a sub-scenario in the first domain; information of a first slot in the first intent is extracted from the first input; wherein a first slot is pre-configured in the first intent, and the first slot is a non-mandatory key slot; when the server determines that information of the first slot has not been extracted, a question is asked to the user to determine whether information of the first slot is necessary; a second input is received through a communication interface, the second input including information of whether information of the first slot is necessary confirmed by the user; if the user confirms that information of the first slot is necessary, information of the first slot is extracted from the second input; an operation corresponding to the first intent is performed based on the first intent and information of the first slot; if the user confirms that information of the first slot is non-necessary information, information of the first slot is not extracted; and an operation corresponding to the first intent is performed based on the first intent.

[0027] In one possible implementation, the processor extracts information of the first slot in the first intention from the first input specifically including: the processor inputs each word or each entity identified in the first input into the slot extraction model corresponding to the first slot, and calculates the confidence corresponding to each word or each entity in the first input respectively; if the confidence of the first word or the first entity in the first input is greater than or equal to the first threshold, then the first word or the first entity is confirmed to be the information of the first slot; if the confidence of each word or each entity in the first input is less than the first threshold, then it is determined that the information of the first slot has not been extracted.

[0028] In a possible implementation, the processor is further configured to, if the first slot corresponds to a custom slot type, respectively calculate the similarity between each entity identified in the first input and each word in the custom slot type.

[0029] If the similarity between each entity identified in the first input and each word in the custom slot type is less than the second threshold, it is confirmed that the first input does not contain information of the first slot; if the similarity between the second entity in the first input and the second word in the custom slot type is greater than or equal to the third threshold, it is confirmed that the second word is the information of the first slot; if there is any entity in the first input and any word in the custom slot type whose similarity is greater than or equal to the second threshold and less than the third threshold, it is confirmed to ask the user to determine whether the information of the first slot is necessary.

[0030] In one possible implementation, the processor is also used to confirm that the first input does not contain information for the first slot if the confidence of each word or each entity in the first input is less than a fourth threshold; if there is any word or any entity in the first input whose confidence is less than the first threshold and greater than or equal to the fourth threshold, confirm to ask the user to determine whether the information for the first slot is necessary.

[0031] In one possible implementation, if the user confirms that the information of the first slot is necessary information, the processor extracts the information of the first slot from the second input specifically including: if the user confirms that the information of the first slot is necessary information, the processor uses the slot extraction model corresponding to the first slot or uses rules to extract the information of the first slot from the second input.

[0032] In one possible implementation, when a second slot is pre-configured in the first intention and the second slot is a required slot, the processor is further specifically used to ask a question to the user in order to extract the information of the second slot when the processor determines that the information of the second slot has not been extracted; receive a third input through the communication interface and extract the information of the second slot from the third input, the third input including the user's answer; perform an operation corresponding to the first intention according to the first intention, the information of the first slot, and the information of the second slot; or, perform an operation corresponding to the first intention according to the first intention and the information of the second slot.

[0033] In a possible implementation, when a third slot is pre-configured in the first intention and the third slot is a non-mandatory and non-critical slot, the processor is further specifically configured to not extract information from the third slot when it is determined that information from the third slot has not been extracted.

[0034] In a third aspect, a computer storage medium includes computer instructions. When the computer instructions are executed on a terminal, the terminal executes the method described in the first aspect and any possible implementation thereof.

[0035] A fourth aspect is a computer program product. When the computer program product is run on a computer, it enables the computer to execute the method as described in the first aspect and any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1A A schematic diagram of a terminal interface for human-computer dialogue in the prior art;

[0037] Figure 1B A schematic diagram of a terminal interface for human-computer dialogue provided in an embodiment of the present application;

[0038] Figure 2 A schematic diagram of the composition of a human-computer dialogue system provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of the composition of a human-computer dialogue system provided in an embodiment of the present application Figure 2 ;

[0040] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0041] Figure 5 Schematic diagrams of interfaces of some electronic devices provided in the embodiments of the present application;

[0042] Figure 6 Interface diagrams of some other electronic devices provided in the embodiments of the present application;

[0043] Figure 7 Interface diagrams of some other electronic devices provided in the embodiments of the present application;

[0044] Figure 8 Interface diagrams of some other electronic devices provided in the embodiments of the present application;

[0045] Fig. 9 A flowchart of a method for human-computer interaction provided in an embodiment of the present application is shown in FIG1 ;

[0046] Fig.10 A schematic diagram of a human-computer interaction method provided in an embodiment of the present application Figure 2 ;

[0047] Fig.11 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The technical solution in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. In the description of the embodiment of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0049] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0050] Considering the prior art, there are factors such as user input errors or voice recognition errors, or the algorithm for slot extraction is not accurate enough, which causes the chat robot to fail to extract the key information of some non-mandatory slots, thereby causing the operation performed by the chat robot to fail to meet the user's needs. The embodiment of the present application provides a method for human-computer interaction, further dividing the non-mandatory slots into non-mandatory key slots and non-mandatory non-key slots. In addition, a user confirmation mechanism is configured for the non-mandatory key slots. That is, in the process of the chat robot automatically extracting the information of each pre-set slot according to the user's speech, if there is a slot where the information is not extracted, and the slot is a non-mandatory key slot, the chat robot will actively confirm with the user. Confirm whether the information of the non-mandatory key slot can be missing, if it cannot be missing, then continue to extract the information of the non-mandatory key slot according to the user's answer. If it can be missing, the information of the non-mandatory key slot will no longer be extracted, that is, no longer confirmed to the user. In this way, when the chatbot fails to extract information of non-mandatory key slots, it can also confirm with the user to ensure accurate identification of the user's purpose, meet the user's needs, and improve the user experience.

[0051] It is understandable that a non-mandatory key slot means that the user does not have to express the information of the slot when expressing his intention. If the information of the slot is not expressed, the chatbot can ignore the information of the slot. However, if the user expresses the information of the slot, the chatbot needs to accurately extract the information of the slot.

[0052] For example: Figure 1B As shown, it is an example of the conversation process between a chatbot and a user provided in an embodiment of the present application. Among them, "carpooling" is configured as a non-mandatory key slot in the taxi application. In the conversation with the user, the user said "let's carpool", but the chatbot did not extract this information (i.e., the information of the non-mandatory key slot). In this case, the chatbot needs to further confirm with the user and ask the user "Can I carpool?" The information of the non-mandatory key slot is then extracted from the user's answer to ensure accurate execution of the user's intention.

[0053] If the user's answer is "carpool", it means that the user is willing to carpool, and the information of this non-mandatory key slot is important. After the chatbot extracts the information of this non-mandatory key slot, it can place a carpool order for the user. If the user's answer is "no carpool", it means that the user is unwilling to carpool, and the information of this non-mandatory key slot is important. After the chatbot extracts the information of this non-mandatory key slot, it can place a non-carpool order for the user. If the user's answer is "it doesn't matter", it means that the information of this non-mandatory key slot is not important, and the chatbot can place an order for the user without considering the factor of carpooling. It can be understood that confirming the information of non-mandatory key slots with the user can not only complete the extraction of important non-mandatory key slot information, but also help to further confirm the user's intentions, and is more conducive to improving the accuracy of the chatbot's execution of user intentions and improving user experience.

[0054] The human-computer interaction method provided in the embodiment of the present application can be applied to Figure 2 In the human-computer dialogue system shown. The human-computer dialogue system includes an electronic device 100 and one or more servers 200 (for example, a chat robot). The electronic device 100 can also establish a connection with the server 200 using a telecommunication network (communication networks such as 3G / 4G / 5G) or a WIFI network, etc., which is not limited in the embodiments of the present application.

[0055] The user can have a human-computer dialogue with the server 200 through the electronic device 100. The electronic device 100 can be a mobile phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a smart watch, a netbook, a wearable electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a vehicle-mounted device, a smart car, a smart speaker, etc. The present application does not impose any special restrictions on the specific form of the electronic device 100.

[0056] Server 200, server 200 can provide human-computer dialogue services for electronic device 100, can identify user intentions based on user speech input into the electronic device, understand user needs, and provide corresponding services to the user. Server 200 can be a server of the manufacturer of electronic device 100, for example, it can be a cloud server of the voice assistant in electronic device 100, etc. Server 300 can also be a server of other applications, which is not limited in the embodiments of this application.

[0057] In some embodiments, the server 200 may also establish a communication connection with one or more third-party application servers 300, so that after understanding the needs of the user, the server 200 sends a corresponding service request to the corresponding third-party application server 300, and returns the response information of the third-party application server 300 to the electronic device 100. In other embodiments, the server 200 may also establish a communication connection with the electronic device 400 of the third-party application, so that the developer or manager of the third-party application can log in to the server 200 through the electronic device 400 to configure and manage the services provided by itself.

[0058] like Figure 3 As shown, it is a framework diagram of another human-computer dialogue system provided by the embodiment of the present application. In conjunction with the framework diagram, the process of human-computer interaction applicable to the embodiment of the present application is briefly described below.

[0059] First, the user can input a user statement (which can be in voice or text form) to the server 200 through the electronic device 100. If it is in voice form, the electronic device 100 can convert the voice form into text form and then send it to the server 200, or the server 200 can convert the voice form of the user statement into text form. This embodiment of the application is not limited.

[0060] After the server 200 receives the user statement sent by the electronic device 100, the Natural Language Understanding (NLU) module therein first performs semantic understanding on the user statement. Specifically, when the user statement passes through the natural language understanding module, it needs to go through three sub-modules: domain classification, intent classification, and slot extraction. In general, the server 200 is integrated with multiple specific task scenarios, such as ordering food, taking a taxi, weather, etc. Therefore, the domain classification module can first identify which specific task scenario the user statement belongs to, and distribute the user speech to the specific task scenario. The intent recognition module can identify the user's intent and further subdivide the user's speech into sub-scenarios under the specific task scenario. The slot extraction module can identify the entity in the user statement and perform slot filling. For example: Named Entity Recognition (NER) can be used to identify entities with specific meanings such as names, place names, time, date, institution names, organization names, currencies, etc. in user statements. It can be simply understood as extracting the features of each word in the user sentence and comparing them with the features of each pre-defined entity, so as to identify the corresponding entity from the user sentence.

[0061] For example, Figure 1BTaking the dialogue shown as an example, the domain classification module can determine the need to perform a taxi task for the user based on the user's "help me call a taxi" (sub-scenarios can also include private car tasks, express tasks, and ride-sharing tasks). Then, the intent classification can determine the need to perform an express task for the user based on the user's "Didi Express". Then, the slot extraction module can extract the destination slot information as "Shenzhen Bay Park" and the departure time slot information as "8:30". It should be noted that Figure 1B If the user does not specify the departure slot information, the slot extraction module can extract the default departure place set by the user as the departure slot information, or locate the location through GPS and use the located location as the departure slot information.

[0062] The output of the natural language understanding module will be used as the input of the dialogue management module. The dialogue management module consists of two parts, state tracking and dialogue strategy. The state tracking module includes various information of the ongoing dialogue, and updates the current dialogue state based on the old state, user state (information output by the natural language understanding module) and system state (i.e., through the query with the database). The dialogue strategy is closely related to the task scenario and is usually used as the output of the dialogue management module, such as the questioning mechanism for missing required slots.

[0063] In the embodiment of the present application, the dialogue strategy also includes a confirmation mechanism for missing non-mandatory key slots. Specifically, the confirmation mechanism for missing non-mandatory key slots can be processed in parallel or serially with the interrogation mechanism for missing mandatory slots. In other words, the embodiment of the present application does not limit the execution order of the confirmation mechanism and the interrogation mechanism. The specific confirmation mechanism will be described in detail in the following embodiments and will not be repeated here.

[0064] The Natural Language Generation (NLG) module generates text information based on the output of the dialogue management module and feeds it back to the user, thus completing the human-computer interaction process with the user. Among them, the natural language generation module can generate natural language based on templates, grammar, or models. Template-based and grammar-based are mainly rule-based strategies, and model-based strategies can use, for example, long short-term memory networks (LSTM). The embodiments of the present application do not limit the specific implementation method of natural language generation.

[0065] Figure 4 A schematic structural diagram of an electronic device 100 is shown.

[0066] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0067] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0068] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0069] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0070] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0071] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0072] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0073] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0074] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0075] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0076] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0077] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0078] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0079] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0080] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0081] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0082] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0083] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0084] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0085] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0086] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0087] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0088] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0089] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0090] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0091] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0092] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0093] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0094] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0095] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0096] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0097] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0098] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0099] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0100] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0101] The receiver 170B, also called the "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear. The microphone 170C, also called the "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by putting his mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc. The headphone jack 170D is used to connect wired headphones. The earphone interface 170D may be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0102] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example:

[0103] When a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0104] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0105] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0106] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0107] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0108] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0109] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0110] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0111] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0112] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0113] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0114] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0115] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0116] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0117] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0118] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0119] The structure of the electronic device 400 can also be referred to Figure 4 The structure of the electronic device 100 is not described in detail.

[0120] The technical solutions involved in the following embodiments can all be implemented in the electronic device 100, the server 200 or the electronic device 400 having the above-mentioned hardware architecture.

[0121] The technical solution provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0122] First, a skill developer (which may be a third-party application developer or a service provider, etc.) may log in to the server 200 via the electronic device 400 and configure a new service, which may also be referred to as a skill in the human-computer dialogue platform.

[0123] in, Figures 5 to 8 The following are some of the interface diagrams involved in the process of skill developers configuring new skills. The steps involved in configuring new skills are as follows:

[0124] 1. Set the basic information of new skills

[0125] The skill developer can log in to the skill management page of the human-computer dialogue platform through the electronic device 400 and start configuring the new skill. For example, the website associated with the human-computer dialogue platform can be entered in the browser of the electronic device 400 to log in to the skill management page. Alternatively, the skill management page can be logged in using the corresponding APP.

[0126] like Figure 5As shown in (1), it is the home page 400 of the skill management page, and the home page 400 may include controls 401 and 402. Skill templates may be provided on the human-computer dialogue platform, and these skill templates cover some usage scenarios. Skill developers can realize their own personalized needs by partially modifying these templates. In some embodiments, skill developers can configure new skills by selecting control 402 and using the skill templates provided on the human-computer dialogue platform. In other embodiments, skill developers can add custom skills based on the services they provide by selecting control 401, and provide voice interaction and corresponding services to end users. The following is an example of a skill developer selecting control 401 and adding a custom skill.

[0127] After detecting that the skill developer has selected the control 401, the electronic device 400 enters the interface for adding a custom skill. Figure 5 As shown in (2), it is a page 500 for setting basic information of a new skill. The page 500 can set basic information of the new skill, such as skill identification, skill name, skill category, and wake-up word.

[0128] Among them, the skill ID is the globally unique identifier of a skill, and the skill ID of each skill cannot be repeated. The skill name is a descriptive name of the skill, which is convenient for skill developers to manage the skills they create, and there is no requirement for repetition. Skill developers need to select a category for each skill (which can also be understood as the specific scenario mentioned above) for searching and filtering when matching user statements. Each skill can only belong to one category. Accurately selecting the skill category helps to match user statements with the intent in the skill faster and more accurately. The wake-up word can be understood as an alias for a skill. When the user says the alias, the human-computer dialogue platform can quickly go to the skill to obtain the corresponding service.

[0129] It is understandable that the setting of basic information of new skills may also include other contents, which are not listed one by one.

[0130] 2. Creating Intents in New Skills

[0131] After completing the configuration of the basic information for the new skill, you can start creating intents in the new skill. Figure 5 As shown in (3), a page 600 for creating an intent is displayed by the electronic device 400. The page 600 may include an intent name, a previous context, a following context, and the like.

[0132] The intent name cannot be repeated in the skill. The context is mainly used in multi-round dialogue scenarios. The previous context is used to trigger the current intent, and the following context is used to associate the next round of intent.

[0133] It should be noted that every sentence the user says corresponds to an intention of the user, which is the purpose of the user saying this sentence. Each skill is composed of several intentions. By matching every sentence the user says with the intention in the skill, we can understand the user's needs and provide corresponding services. When the user uses the skill, he will express his intention in various ways. Therefore, the skill developer needs to enter as many possible expressions (i.e. user statements) as possible in the intent configuration to express the intention in daily life, so that the recognition of the intent is more accurate.

[0134] 3. Enter the user statement and mark the slot in the user statement (including setting slot attributes, associating slot types, etc.)

[0135] like Figure 6 As shown in (1), a page 601 for setting user statements in the intention creation page is displayed on the electronic device 400. The page 601 may include one or more controls 602 for adding new user statements. The page 601 may also display information items 603 of existing user statements.

[0136] Among them, the skill developer can add a new user statement by entering the new user statement in the text box in the control 602 and clicking the "Add" function button. In some embodiments, the human-computer dialogue platform can automatically identify the entities in the new user statement and associate the identified entities with the slots and slot types. In other embodiments, if the human-computer dialogue platform does not automatically mark the slots or the marking is incorrect, the skill developer can choose to manually mark the slots and associate the marked slots with the slot types.

[0137] Among them, slots refer to the key information contained in the user's statement to express the intention, which can be understood as the keywords in the user's statement. A slot corresponds to a slot type, and the slot can be filled with other words in the slot type. The slot type can be understood as a collection of words in a certain field. The slot information in the user's statement is composed of various slot types. The words in the same slot type can be replaced in the corresponding slot information and be identified and extracted.

[0138] For example, in response to the skill developer inputting a new user statement in the text box in the control 602 and clicking the "Add" function button, the electronic device 400 pops up the following Figure 6The dialog box 604 shown in (2) in the figure. The skill developer can use the dialog box 604 to view, modify, and perform other operations on the slots marked in the newly added user statement and the associated slot types. The dialog box 604 can also display a control 605 for adding a slot type, so that when no suitable slot type is available when associating a slot type, the corresponding slot type can be added. The dialog box 604 can also display a control 606 for viewing a slot list. In response to the skill developer clicking the control 606, the electronic device 400 displays the following. Figure 6 The page 608 shown in (3) in the figure is shown in the figure. The page 608 displays the slots included in the user's statement, the slot type associated with each slot, the attributes of each slot (mandatory slot, non-mandatory key slot, non-mandatory non-key slot), and questions when slot information is missing. The page 608 may also include a new slot control 607, which can be used to add a slot to the user's statement.

[0139] Usually, the skill developer can configure a follow-up mechanism for the required slots and a confirmation mechanism for the non-required key slots in interface 608. For non-required non-key slots, there is no need to set questions. That is, when a slot is set as a required slot or a non-required key slot, the slot is set with questions, which can be default questions or customized questions by the skill developer. When a slot is set as a non-required non-key slot, the questions in the slot are set to none by default and cannot be changed. For another example: the newly added user statement is "Will it rain in the capital this Friday?" The marked slots are time slots and city slots. Among them, the slot type corresponding to the time slot is sys.time, and the attribute of the time slot is a non-required key slot. That is to say, when the human-computer dialogue platform does not extract the information of the time slot, the human-computer dialogue platform will actively ask the user a question, and the content of the question is "Question 1". It is up to the user to determine whether the information of the time slot can be missing. If it cannot be missing, the information of the time slot is extracted from the user's answer, and then the subsequent operations are performed. If it can be missing, the human-computer dialogue platform will consider that there is no information about the time slot and directly execute subsequent operations.

[0140] Among them, the slot type corresponding to the city slot is sys.local.city, and the attribute of the city slot is a required slot. In other words, when the human-computer dialogue platform fails to extract the information of the city slot, the human-computer dialogue platform will actively ask the user a question, and the content of the question is "Question 2". Then the information of the city slot is extracted from the user's answer, and then subsequent operations are performed.

[0141] Among them, other non-mandatory and non-critical slots can also be marked in the newly added user statement. That is to say, when the human-computer dialogue platform does not extract the non-mandatory and non-critical information, the human-computer dialogue platform considers that there is no non-mandatory and non-critical information and directly executes subsequent operations.

[0142] In the embodiment of the present application, the slot type mainly includes the system slot type and the custom slot type (also called the user dictionary). The system slot type is a slot type pre-set by the human-computer dialogue platform, and the words in the system slot type are not enumerable, for example: sys.time, sys.location.city, sys.name, sys, phoneNum, etc. The custom slot type is a slot type defined by the skill developer, and the words in the custom slot type are limited.

[0143] like Figure 7 As shown, an editing page 700 of a slot type displayed by an electronic device 400. Skill developers can enter the text of the newly added custom slot type in the input box 701 and press the Enter key to confirm. The value of the newly added custom slot type can be entered below the value item 702, and the synonym can be entered below the synonym 703 item corresponding to the newly added custom slot type. After clicking the "Save" button, a new custom slot type can be completed. The editing page 700 of the slot type can also modify and delete the custom slot type through the multiple controls shown in the area 704. In some embodiments, the editing page 700 of the slot type can also support batch addition of slot types. For example: skill developers can add slot types in batches by clicking the batch add button 705 and choosing to upload files of a specific file type or a specific file format. Among them, the file of a specific file type or a specific file format contains one or more information of the slot type to be added. This embodiment of the application is not limited to this.

[0144] 4. New skill settings are completed, and the human-computer dialogue model corresponding to the new skill is trained and released

[0145] After the skill developer inputs the user statement required for the new skill, and labels the slots in the user statement, sets the attributes, and associates the slot types, the electronic device 400 can display page 800. The skill developer can notify the human-computer dialogue platform to start training the human-computer dialogue model corresponding to the new skill by clicking the "Start Training" control 801. The human-computer dialogue module corresponding to the new skill trained by the human-computer dialogue platform may include: a domain classification model, an intent classification model, and a slot extraction model. Among them, the domain classification model can be used to classify user utterances in domains. The intent classification model can be used to further subdivide the user utterances in the corresponding domain and identify the intent of the new skill corresponding to the user's right to speak. The slot extraction model can be used to extract slot information in the user's utterance. In this way, the subsequent operations corresponding to the user's intent can be performed according to the user intent output by the intent classification model and the slot information output by the slot extraction model.

[0146] After the human-computer dialogue platform generates a human-computer dialogue model corresponding to the new skill, the electronic device 400 may display page 900. The skill developer may click the "Publish Skill" control 902 to notify the human-computer dialogue platform to publish the new skill, and push the human-computer dialogue model corresponding to the new skill online. Then, other terminals may communicate with the human-computer dialogue platform to obtain the human-computer dialogue platform to provide the new skill. Page 900 may also include a "Retrain" control 901, through which the skill developer may retrain the human-computer dialogue model corresponding to the new skill.

[0147] like Fig. 9 As shown, a human-computer interaction method provided in an embodiment of the present application can be applied to the interaction between the electronic device 100 and the server 200. The method specifically includes the following steps:

[0148] S101. Server 200 receives a first input.

[0149] When the user uses the electronic device 100 to interact with the server 200, he can make corresponding service demands to the server 200 in the form of voice or text. If the user inputs in the form of voice, the server 200 can recognize the voice through the automatic voice recognition module, recognize it as text, that is, the first input, and input it into the natural language understanding module. If the user inputs in the form of text, the server 200 inputs the text input by the user as the first input into the natural language understanding module.

[0150] Among them, the first input can be a single utterance in a single round of dialogue between the user and the server 200, or it can be multiple utterances in multiple rounds of dialogue between the user and the server 200, which is not limited in the embodiments of the present application.

[0151] S102. The server 200 performs field classification according to the first input, and determines a first field corresponding to the first input.

[0152] Since the first input corresponds to an intention of the user, that is, the user wants the server 200 to provide a service or perform some operations, the domain classification module in the natural language understanding module can search and filter according to the first input to determine which specific task scenario (i.e., the first domain) the user intention in the first input belongs to, and distribute the first input to the specific task scenario (i.e., the first domain).

[0153] S103. The server 200 distributes the first input to the first domain, and identifies that the first input corresponds to the first intention.

[0154] The intent recognition module in the natural language understanding module can further subdivide the user intent in the first input into sub-scenarios under specific task scenarios, that is, identify the user intent corresponding to the first input (that is, the first intent).

[0155] S104. The server 200 extracts information of each slot in the first intent from the first input according to the slot configuration corresponding to the first intent.

[0156] The first intent is an intent in a skill on the server 200. When configuring the skill, the skill developer will configure the corresponding slots for the first intent in the skill, that is, which slots the first intent needs to extract and the attributes of each slot. Therefore, after determining the first intent corresponding to the first input, the slot extraction module in the server 200 can find the slot configuration corresponding to the first intent.

[0157] The slot extraction module in the server 200 can identify the entities contained in the first input, call the slot extraction model stored in the slot extraction module, and operate on these entities to determine which slots in the first intention these entities correspond to, and label these entities with corresponding slots. It can also be considered that these entities are confirmed as the values ​​of the corresponding slots, that is, the information of these slots is extracted. For example: the slot extraction module identifies entity A in the first input, inputs entity A into the algorithms corresponding to each slot in the slot extraction model, and calculates the confidences corresponding to entity A. If the confidence calculated by inputting entity A into the algorithm corresponding to slot A does not meet the preset conditions, for example: less than the preset threshold, such as threshold C, then entity A is considered not to be the information of slot A. If the confidence calculated by inputting entity A into the algorithm corresponding to slot B meets the preset conditions, for example: greater than or equal to threshold C, then entity A is considered to be the information of slot B.

[0158] It should be noted that some slot information may be set by user default, or may be obtained through other means, and is not necessarily extracted from the first input.

[0159] For example, the first intention is "booking a flight ticket", and the preset slot configuration in "booking a flight ticket" may include a time slot, a departure slot, and a destination slot. If the user says "book a flight ticket to Shanghai tomorrow" (i.e., the first input). Then, the server 200 can identify multiple entities in the first input, such as "tomorrow" and "Shanghai". The server 200 can input "tomorrow" into the algorithm corresponding to the time slot in the slot extraction model for calculation, and obtain the confidence that "tomorrow" is the time slot, which meets the preset conditions, that is, it can be considered that "tomorrow" is the value of the time slot in "booking a flight ticket". In other words, the server 200 extracts the information of the time slot in the first intention. Similarly, the server 200 can input "Shanghai" into the algorithm corresponding to the destination slot in the slot extraction model for calculation, and obtain the confidence that "Shanghai" is the destination slot, which meets the preset conditions, that is, it can be considered that "Shanghai" is the value of the destination slot in "booking a flight ticket". In other words, the server 200 extracts the information of the destination slot in the first intention. There is no entity corresponding to the departure slot in the first input. The current location of the electronic device 100 used by the user can be obtained through GPS as the value of the departure slot, or the default address set by the user can be used as the value of the departure slot, etc., that is, the server 200 extracts the information of the departure slot in the first intention.

[0160] S105. The server 200 determines that the information of the first slot in the first intent has not been extracted.

[0161] In the process of executing step S104, there may be such a situation that the first input may not contain information of certain slots in the first intent (for example, the user did not say it, or although the user said it, the automatic speech recognition was wrong or the user input was wrong), or the slot extraction model of the server 200 is not accurate enough, which may cause the server 200 to fail to extract certain slot information in the first intent in the first input. Therefore, it is necessary to execute step S106 and subsequent steps.

[0162] S106, the server 200 determines the attributes of the first slot. The attributes of the first slot include a required slot, a non-required critical slot, and a non-required non-critical slot. If the first slot is a required slot, execute step S107; if the first slot is a non-required non-critical slot, execute step S110; if the first slot is a non-required critical slot, execute step S111.

[0163] Specifically, the slot extraction module in the server 200 sends the result of the first slot that has not been extracted to the dialogue management module. The dialogue management module determines the attribute of the first slot so as to determine the subsequent operation according to the attribute of the first slot.

[0164] S107. The server 200 asks the user for information about the first slot.

[0165] The dialogue management module sends a question to the user for the first slot according to the attribute of the first slot and the pre-set dialogue strategy. Exemplarily, the server 200 may ask the user to speak again, or ask the question previously interacted with the user again, or ask a question for the missing first slot. The embodiment of the present application does not limit the content and method of the question.

[0166] S108. The server 200 receives a second input.

[0167] The second input is the user's answer to the question from the server 200. If the user answers in voice, the automatic speech recognition module in the server 200 can convert the voice into text to obtain the second input. If the user answers in text, the server 200 uses the text input by the user as the second input. The server sends the determined second input to the natural language understanding module.

[0168] Among them, the second input can be a single utterance in a single round of dialogue between the user and the server 200, or it can be multiple utterances in multiple rounds of dialogue between the user and the server 200, which is not limited in the embodiment of the present application.

[0169] S109. The server 200 fills the first slot in the first intent according to the second input.

[0170] The slot extraction module in the natural language understanding module identifies the entity in the second input, and calls the algorithm corresponding to the first slot in the slot extraction model stored thereon to perform operations to identify the entity corresponding to the first slot, that is, to use the determined entity as the value of the first slot, that is, to extract the information of the first slot. Then, step S116 is executed.

[0171] S110. The server 200 does not need to fill the first slot.

[0172] The slot extraction module in the natural language understanding module determines that the information of the first slot is not to be filled, that is, the value of the first slot does not need to be determined. Step S116 is executed.

[0173] S111. The server 200 asks the user a question to confirm whether the information of the first slot is necessary.

[0174] In some embodiments of the present application, after determining that the first slot is a non-mandatory key slot (i.e., step S106), the dialogue management module can directly ask the user questions about the information in the first slot, regardless of whether the user has said the information in the first slot, and the user confirms whether the information in the first slot needs to be completed. In the embodiments of the present application, the manner and content of asking questions about the information in the first slot are not limited.

[0175] In other embodiments of the present application, after determining that the first slot is a non-mandatory key slot (i.e., step S106), the dialogue management module may further determine whether the user may have said the information of the first slot. In the case where the user is very likely to have said the information of the first slot, the user is asked questions regarding the information of the first slot, and the user confirms whether the information of the first slot needs to be completed. In this way, the user is confirmed in a targeted manner, which helps to reduce the situation of disturbing the user. Among them, the process of server 200 determining whether the user may have said the information of the first slot can be referred to the description below, which will not be repeated here.

[0176] S112. The server 200 receives a third input from the electronic device.

[0177] The third input is the user's answer to the question from the server 200. If the user answers in voice, the automatic speech recognition module in the server 200 can convert the voice into text to obtain the third input. If the user answers in text, the server 200 uses the text input by the user as the third input. The server sends the determined third input to the natural language understanding module.

[0178] Among them, the third input can be a single utterance in a single round of dialogue between the user and the server 200, or it can be multiple utterances in multiple rounds of dialogue between the user and the server 200, which is not limited in the embodiment of the present application.

[0179] S113, the server 200 confirms whether the information of the first slot is necessary according to the third input of the electronic device 100. If necessary, execute step S114, otherwise, execute step S115.

[0180] S114. The server 200 fills the first slot according to the third input.

[0181] Please refer to step S109, and then execute step S116.

[0182] S115. The server 200 does not need to fill the first slot.

[0183] Then, execute step S116.

[0184] S116. The server 200 executes the operation corresponding to the first intent according to the first intent and the slot information extracted from the first intent.

[0185] like Fig.10 As shown, it is a flowchart of another human-computer interaction method provided by an embodiment of the present application, which also includes a process of judging whether the user may have said the information of the first slot. That is, after step S106 and before step S111, it also includes step S201, which is as follows:

[0186] S201, the server 200 determines whether the first input may contain the information of the first slot. If it is confirmed that the first input may contain the information of the first slot, step S111 is executed, otherwise step S115 is executed.

[0187] For example, considering that the user has said the information of the first slot, but the server 200 has not extracted the information of the first slot, there may be the following two reasons:

[0188] Reason 1: User input error or voice recognition error, resulting in failure to extract the information of the first slot. For example, suppose there are two intents on the server 200: Intent 1 is "Open Settings", and the corresponding operation is to open system settings. Figure 2 For example, the corresponding operation is to open the WeChat application settings. If the user says "open WeChat settings", the server 200 may recognize the voice as "open MSI settings" due to the user's accent or pauses when speaking. Then, the server 200 does not extract "MSI". If the server 200 does not confirm with the user, it is likely to directly recognize the user's intention as "open settings", that is, to open the system settings, which is different from the user's desired goal of opening the WeChat application settings.

[0189] Reason 2: The user correctly expressed the information of the first slot, but the slot extraction model itself is not accurate enough, resulting in the failure to extract the first slot information. For example, before the skill developer trains the slot extraction model, the number of user statements input is small, or the input user statements are not accurate enough, resulting in the slot extraction model generated by the server 200 not being accurate enough.

[0190] In view of the above two different reasons, the present application embodiment provides the following two methods, which can be used to confirm that the user may have said the information of the first slot. The details are as follows:

[0191] Method 1: For situations where user input is incorrect or voice recognition is incorrect.

[0192] The server 200 can use an error correction method to determine that the entity identified from the user's speech (i.e., the first input) is similar to the keywords in the user dictionary, and then trigger a mechanism for confirmation to the user. Among them, when judging the similarity between the entity and the keywords in the user dictionary, for example, an algorithm based on pinyin similarity, an algorithm based on string similarity, etc. can be used to calculate the edit distance between the entity identified in the first input and the keywords in the user dictionary to determine the degree of similarity between the two. It is also possible to use deep learning word vectors, sentence vectors, and other methods to calculate the similarity of words or phrases. The embodiment of the present application does not limit the method for calculating similarity.

[0193] The following uses the calculation of the edit distance as an example to illustrate the method for determining the first slot information that the first input may contain provided by the embodiment of the present application. The edit distance (Levenshtein Distance) refers to the minimum number of editing operations required to convert one string into another. The editing operation may include replacing one character with another, inserting a character, and deleting a character.

[0194] First, it is determined whether the first slot corresponds to a system slot type or a user dictionary (ie, a custom slot type).

[0195] In some embodiments, the server 200 confirms that the first slot corresponds to a custom slot type. Since the words in the custom slot type are user-defined, they are limited in number. Therefore, the server 200 can traverse all the words in the custom slot type corresponding to the first slot, calculate the edit distance between the entity determined in the user's speech and each word in the custom slot type, and determine the minimum edit distance from these edit distances. The entity in the first input corresponding to the minimum edit distance can be confirmed as a potential entity of the first slot, that is, it may be information of the first slot.

[0196] Optionally, the server 200 may determine the size of the minimum value and a threshold value A. The threshold value A may be a threshold value set by a developer or a user. If the minimum value is less than the threshold value A, it may be considered that the user did not say the information of the first slot, that is, the first input does not contain the information of the first slot. Then, the server 200 may not confirm with the user. If the minimum value is greater than or equal to the threshold value A, it may be considered that the user may have said the information of the first slot. Then, the server 200 may confirm with the user.

[0197] For example: the user's purpose is to "book a ticket to Shanghai tomorrow", but the wrong input is "book a ticket to Shangha tomorrow". The first intention is "book a ticket", and the slots contained in the first intention are time slot, departure slot and destination slot. It is assumed here that the destination slot corresponds to user dictionary 1. Server 200 does not recognize the information of the destination slot. Then, server 200 can recognize that the entities in the first input are "tomorrow" and "Shangha". Server 200 calculates the distance between "tomorrow" and all the words in user dictionary 1, and calculates the distance between "Shangha" and all the words in user dictionary 1. From them, select the word with the smallest distance, for example, the edit distance between "Shangha" and "Shanghai" in user dictionary 1 is the smallest, then "Shangha" can be confirmed as a potential entity of the first slot. Furthermore, if the edit distance between "Shangha" and the most similar word in user dictionary 1 is greater than threshold A, it is considered that "Shangha" may be the information of the first slot said by the user. Then, confirmation can be made to the user.

[0198] Optionally, the developer or user can also set a threshold B, which is greater than threshold A. If the minimum value is greater than or equal to threshold B, it indicates that the potential entity is very similar to the word in the custom slot type, and it can be basically considered that the user said the information of the first slot. In other words, the server can directly confirm the potential entity as the information of the first slot without confirming with the user. If the above minimum value is less than or equal to threshold B, and greater than threshold A, it can be considered that the user may have said the information of the first slot, that is, the potential entity may be the information of the first slot, so the server can further confirm with the user. This is not limited to the embodiments of the present application.

[0199] In other embodiments, the server 200 confirms that the first slot corresponds to the system slot type. Since the words in the system slot type are not enumerable, it is not possible to calculate the edit distance between the entity word in the first input and all the words in the system slot type by traversing all the words in the system slot type. Therefore, the server 200 cannot confirm whether the user has said the information of the first slot. In order to avoid causing too much disturbance to the user, the information of the first slot may not be confirmed to the user.

[0200] The second situation is that the slot extraction model is not accurate enough, resulting in the server 200 failing to extract the information of the first slot.

[0201] The slot extraction model can use methods such as Named Entity Recognition (NER) to identify entities in the first input, and input the identified entities into the algorithm corresponding to the first slot in the slot extraction model to calculate the confidence of each entity. Optionally, the slot extraction model may not identify entities, but directly input each word contained in the first input into the algorithm corresponding to the first slot in the slot extraction model to calculate the confidence of each word. When the calculated confidence of each entity or each word meets certain conditions, it is considered that the user may have said the information of the first slot, and then confirmation is made to the user. Among them, the calculation of the confidence of each entity or each word segment in the first input can refer to the classification-based calculation method and the sequence labeling-based calculation method in the prior art, which will not be repeated here.

[0202] Exemplarily, the server 200 may input each entity in the first input into the slot extraction model, and calculate the confidence of each entity. After the confidence of an entity meets certain conditions, the user is confirmed.

[0203] The slot extraction model did not extract the information of the first slot, which can be understood as the slot annotation probability value given by the slot extraction model in the server 200 for the entity recognized from the user's speech is lower than the recognition threshold. Then, at this time, the user can set a confirmation threshold. When the slot annotation probability value given by the slot extraction model for the entity recognized from the user's speech is greater than the confirmation threshold, the server 200 triggers a mechanism for confirmation with the user. In other words, when there is a model extraction model corresponding to one or some entities in the first input whose confidence is greater than the confirmation threshold and less than the recognition threshold, the server 200 will confirm the information of the first slot with the user.

[0204] It should be noted that for the same entity and the same slot extraction model, the slot extraction model may not correctly identify the entity the first time, but can correctly identify the entity the second time. This is because when the user says the entity for the first time, the sentence is likely to contain other entities, that is, the entity has a context. When the slot extraction model is not accurate enough, it is possible that the entity is not recognized because these contexts are not recognized. Then, when the server 200 cannot recognize the entity for the first time, it asks the user questions about the entity, and the user's answer is an answer to the entity. At this time, the user's answer may only contain the entity, or contain very little context. Then, the slot extraction model is likely to recognize the entity this time. In other embodiments, for user answers, a non-slot extraction model method can also be used to identify the entity, for example, a rule can be enabled to identify the entity. Among them, the rule refers to the combination of the context logic of the user's answer, the relevance of the user's intention, the corresponding relationship between the entity and the first slot, and other factors for identification. In this way, the probability of the server 200 identifying the user saying the entity for the second time or more can also be effectively improved.

[0205] It is understandable that, in order to realize the above functions, the above-mentioned terminals etc. include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.

[0206] The embodiment of the present application can divide the functional modules of the above-mentioned terminal etc. according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0207] like Fig.11 , which is a schematic diagram of the hardware structure of a server 200 disclosed in an embodiment of the present application, wherein the server 200 includes at least one processor 201, at least one memory 202, and at least one communication interface 203. Optionally, the server 200 may also include an output device and an input device, which are not shown in the figure.

[0208] The processor 201, the memory 202 and the communication interface 203 are connected via a bus. The processor 201 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. The processor 201 may also include multiple CPUs, and the processor 201 may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits or processing cores for processing data (such as computer program instructions).

[0209] The memory 202 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, 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 202 may exist independently and be connected to the processor 201 via a bus. The memory 202 may also be integrated with the processor 201. Among them, the memory 202 is used to store the application code for executing the scheme of the present application, and the execution is controlled by the processor 201. The processor 201 is used to execute the computer program code stored in the memory 202, so as to implement the human-computer interaction method described in the embodiment of the present application.

[0210] The communication interface 303 can be used to communicate with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.

[0211] The output device communicates with the processor and can display information in a variety of ways. For example, the output device can 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 communicates with the processor and can receive user input in a variety of ways. For example, the input device can be a mouse, a keyboard, a touch screen device, or a sensor device.

[0212] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0213] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0214] 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 embodiment 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.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.

[0215] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application 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.

Claims

1. A method for human-computer interaction, characterized in that: Can be used in human-computer dialogue systems, including: The server receives a first input, wherein the first input includes a service demand of a user; The server determines, according to the first input, a first domain corresponding to the first input, where the first domain is a task scenario corresponding to the service demand of the user; The server distributes the first input to an intent recognition model corresponding to the first domain, and recognizes a first intent corresponding to the first input, where the first intent is a sub-scenario in the first domain; The server extracts information of a first slot in the first intent from the first input; wherein the first slot is pre-configured in the first intent, and the first slot is a non-mandatory key slot; When the server determines that the information of the first slot has not been extracted, the server asks the user a question to determine whether the information of the first slot is necessary; The server receives a second input, the second input including information confirmed by a user whether the information of the first slot is necessary; If the user confirms that the information of the first slot is necessary information, the server extracts the information of the first slot from the second input; the server performs an operation corresponding to the first intention according to the first intention and the information of the first slot; If the user confirms that the information of the first slot is non-essential information, the server does not extract the information of the first slot; and the server performs an operation corresponding to the first intent according to the first intent.

2. The human-computer interaction method according to claim 1, characterized in that: The server extracting information of the first slot in the first intent from the first input includes: The server inputs each word or each entity identified in the first input into a slot extraction model corresponding to the first slot, and calculates the confidence corresponding to each word or each entity in the first input respectively; If the confidence of the first word or the first entity in the first input is greater than or equal to a first threshold, the server confirms that the first word or the first entity is information of the first slot; If the confidence of each word or each entity in the first input is less than the first threshold, the server determines that the information of the first slot has not been extracted.

3. The human-computer interaction method according to claim 1 or 2, characterized in that: The human-computer interaction method further includes: If the first slot corresponds to a custom slot type, the server calculates the similarity between each entity identified in the first input and each word in the custom slot type; If the similarity between each entity identified in the first input and each word in the custom slot type is less than the second threshold, the server confirms that the first input does not contain information of the first slot; if the similarity between the second entity in the first input and the second word in the custom slot type is greater than or equal to the third threshold, the server confirms that the second word is the information of the first slot; if there is any entity in the first input and the similarity between it and any word in the custom slot type is greater than or equal to the second threshold and less than the third threshold, the server confirms to ask the user to determine whether the information of the first slot is necessary.

4. The human-computer interaction method according to claim 2, characterized in that: The human-computer interaction method further includes: If the confidence of each word or each entity in the first input is less than a fourth threshold, the server confirms that the first input does not contain information of the first slot; If there is any word or any entity in the first input whose confidence is less than the first threshold and greater than or equal to a fourth threshold, the server confirms to ask the user a question to determine whether the information of the first slot is necessary.

5. The method for human-computer interaction according to claim 1, 2 or 4, characterized in that: If the information of the first slot confirmed by the user is necessary information, the server extracting the information of the first slot from the second input includes: If the user confirms that the information of the first slot is necessary information, the server uses a slot extraction model corresponding to the first slot or uses a rule to extract the information of the first slot from the second input.

6. The method for human-computer interaction according to claim 1, 2 or 4, characterized in that: The first intent is also pre-configured with a second slot, and the second slot is a required slot. The human-computer interaction method further includes: When the server determines that the information of the second slot has not been extracted, the server asks the user a question to extract the information of the second slot; The server receives a third input and extracts information of the second slot from the third input, wherein the third input includes an answer from the user; The server performs the operation corresponding to the first intention according to the first intention, the information of the first slot, and the information of the second slot; or, the server performs the operation corresponding to the first intention according to the first intention and the information of the second slot.

7. The human-computer interaction method according to claim 1, 2 or 4, characterized in that: The first intention is also pre-configured with a third slot, and the third slot is a non-mandatory and non-critical slot. The human-computer interaction method further includes: When the server determines that the information of the third slot has not been extracted, the server does not extract the information of the third slot.

8. A server, characterized in that: The invention can be used in a human-computer dialogue system, comprising: a communication interface, a memory and a processor; the communication interface and the memory are coupled to the processor, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor reads the computer instructions from the memory, the server executes the following steps: receiving a first input through the communication interface, wherein the first input includes a service demand of a user; Determining, according to the first input, a first domain corresponding to the first input, where the first domain is a task scenario corresponding to the service demand of the user; Distributing the first input to an intent recognition model corresponding to the first domain, identifying a first intent corresponding to the first input, where the first intent is a sub-scenario in the first domain; Extracting information of a first slot in the first intent from the first input; wherein the first slot is pre-configured in the first intent, and the first slot is a non-mandatory key slot; When the server determines that the information of the first slot has not been extracted, asking the user a question to determine whether the information of the first slot is necessary; receiving a second input through the communication interface, the second input including information of whether the information of the first slot is necessary as confirmed by a user; If the user confirms that the information of the first slot is necessary information, extracting the information of the first slot from the second input; and performing an operation corresponding to the first intention according to the first intention and the information of the first slot; If the user confirms that the information of the first slot is non-essential information, the information of the first slot is not extracted; and an operation corresponding to the first intent is performed according to the first intent.

9. The server according to claim 8, characterized in that: The processor extracting information of the first slot in the first intent from the first input specifically includes: The processor inputs each word or each entity identified in the first input into a slot extraction model corresponding to the first slot, and calculates the confidence corresponding to each word or each entity in the first input respectively; If the confidence of the first word or the first entity in the first input is greater than or equal to a first threshold, confirming that the first word or the first entity is information of the first slot; If the confidence of each word or each entity in the first input is less than the first threshold, it is determined that the information of the first slot has not been extracted.

10. The server according to claim 8 or 9, characterized in that: The processor is further configured to, if the first slot corresponds to a custom slot type, respectively calculate a similarity between each entity identified in the first input and each word in the custom slot type; If the similarity between each entity identified in the first input and each word in the custom slot type is less than the second threshold, it is confirmed that the first input does not contain information of the first slot; if the similarity between the second entity in the first input and the second word in the custom slot type is greater than or equal to the third threshold, it is confirmed that the second word is the information of the first slot; if there is any entity in the first input and the similarity between any word in the custom slot type is greater than or equal to the second threshold and less than the third threshold, it is confirmed to ask the user to determine whether the information of the first slot is necessary.

11. The server according to claim 9, characterized in that: The processor is further configured to confirm that the first input does not contain information of the first slot if the confidence of each word or each entity in the first input is less than a fourth threshold; If there is any word or any entity in the first input whose confidence is less than the first threshold and greater than or equal to a fourth threshold, confirm to ask the user a question to determine whether the information of the first slot is necessary.

12. The server according to claim 8, 9 or 11, characterized in that: If the user confirms that the information of the first slot is necessary information, the processor extracting the information of the first slot from the second input specifically includes: If the user confirms that the information of the first slot is necessary information, the processor uses a slot extraction model corresponding to the first slot or uses a rule to extract the information of the first slot from the second input.

13. The server according to claim 8, 9 or 11, characterized in that: When a second slot is pre-configured in the first intent and the second slot is a required slot, The processor is further specifically configured to, when the processor determines that the information of the second slot has not been extracted, ask the user a question so as to extract the information of the second slot; receiving a third input through the communication interface, and extracting information of the second slot from the third input, wherein the third input includes an answer from the user; Perform an operation corresponding to the first intention according to the first intention, the information of the first slot, and the information of the second slot; Alternatively, the operation corresponding to the first intention is performed according to the first intention and the information of the second slot.

14. The server according to claim 8, 9 or 11, characterized in that: When a third slot is pre-configured in the first intent and the third slot is a non-mandatory and non-critical slot, The processor is further specifically configured to not extract the information of the third slot when it is determined that the information of the third slot has not been extracted.

15. A computer storage medium, characterized in that The method comprises computer instructions, and when the computer instructions are executed on a terminal, the terminal executes the human-computer interaction method according to any one of claims 1 to 7.

16. A computer program product, characterized in that When the computer program product runs on a computer, the computer is enabled to execute the human-computer interaction method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Man-machine interaction method and system based on artificial intelligence

    CN105068661A

  • Robot interaction method and interactive robot

    CN107278302A

  • Voice interaction method and device, terminal, server and readable storage medium

    CN107886948A