A human-computer interaction method, device and storage medium
By acquiring user input information, determining intent, and generating follow-up dialogues, using a large model to process and predict instruction intent, and combining contextual conditional probabilities to determine slot information, the problem of low accuracy in human-computer interaction instruction invocation in existing technologies is solved, thus improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
- Filing Date
- 2024-12-05
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, the accuracy of command invocation in human-computer interaction scenarios is low, which requires users to try multiple times to correctly invoke commands, thus affecting the user experience.
By acquiring user input information, determining user intent information, generating follow-up dialogue information when needed, obtaining user response information, using a large model to process and predict instruction intent, combining contextual conditional probability to determine target slot information, generating execution instructions and replying with dialogue information.
It improved the accuracy of multi-turn dialogue command invocation, enhanced the user's human-computer interaction experience, especially in tool invocation and emotion recognition, and improved user interaction satisfaction.
Smart Images

Figure CN122152965A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of human-computer interaction technology, and in particular to a human-computer interaction method, device and storage medium. Background Technology
[0002] In human-computer interaction scenarios involving artificial intelligence and robots, it is often necessary to utilize external tool libraries to invoke tools and perform specific tasks, such as booking a hotel or setting an alarm. In real-world human-computer interaction scenarios, invoking external tools requires retrieving and identifying the necessary tool and filling in the required slots in the tool's instructions to complete the target instruction invocation. This typically involves multiple rounds of communication and coordination between the user and the robot.
[0003] However, in existing technologies, when performing human-computer interaction and calling commands, the accuracy of command calls is currently low due to the involvement of multiple rounds of dialogue and the need to determine the values of each slot in the command. This often requires users to repeatedly try to call commands multiple times in order to correctly call the command required by their intent, resulting in a poor human-computer interaction experience. Summary of the Invention
[0004] This invention provides a human-computer interaction method, device, and storage medium to solve the problem of low accuracy when calling tool commands in human-computer interaction scenarios in the prior art.
[0005] This invention provides a human-computer interaction method, comprising: Obtain user input information; Based on the user input information, determine the user intent information; Based on the user intent information, when it is determined that an instruction call is involved, then: The target invocation instruction is determined based on the user input information and the user intent information; According to the target call instruction, when it is determined that there is slot information to be supplemented, then: Based on the information of the slot to be filled and the user intent information, generate follow-up dialogue information; Obtain the user's response information corresponding to the follow-up question dialogue information; Based on the user's response information, determine the corresponding prompt word information; Based on the prompt word information and the user intent information, a large model is used to obtain predicted instruction intent information, which represents various possible user instruction intents. Based on the predicted instruction intent information, the contextual conditional probability of the instruction intent is calculated, and the target slot information is determined based on the instruction intent corresponding to the maximum contextual conditional probability. Based on the target slot information and the target call instruction, an execution instruction is generated and a response dialog message is generated.
[0006] According to a human-computer interaction method provided by the present invention, after determining the user intent information based on the user input information, the method further includes: Based on the user intent information, when it is determined to be an emotional dialogue, then: Based on the user input information, the corresponding emotion category information is determined, and the emotion category information represents the inferred user emotion; Based on the emotion category information and the user input information, generate response text information; Based on the emotion category information and the response text information, an emotional voice response information is generated, which is used to play the response content with a specified emotional tone.
[0007] According to a human-computer interaction method provided by the present invention, determining the corresponding prompt word information based on the user's response information includes: The user's answer information is subjected to text embedding processing to obtain a first feature vector; Based on the first feature vector, calculate the similarity with the second feature vector corresponding to each prompt word in the preset corpus, and obtain similarity information; Based on the similarity information, the prompt word with the highest similarity is selected as the prompt word information.
[0008] According to a human-computer interaction method provided by the present invention, the step of calculating the contextual conditional probability of the instruction intent based on the predicted instruction intent information, and determining the target slot information based on the instruction intent corresponding to the maximum contextual conditional probability, includes: Based on the predicted instruction intent information, determine the instruction intent probability corresponding to each of the various instruction intents; Based on the user intent information from historical dialogues, the contextual conditional probability corresponding to each instruction intent probability is calculated. The instruction intent corresponding to the highest context conditional probability is taken as the target instruction intent; The target slot information is determined based on the target instruction intent.
[0009] According to a human-computer interaction method provided by the present invention, determining user intent information based on the user input information includes: Retrieve historical conversation information; Context information is generated based on the historical dialogue information and the user input information; The context information is input into a preset intent recognition model to obtain the user intent information.
[0010] According to a human-computer interaction method provided by the present invention, the method for obtaining the intent recognition model includes: Obtain dialogue data; The dialogue data is preprocessed to obtain preprocessed dialogue data; The preprocessed dialogue data is randomly combined to obtain a multi-turn dialogue dataset. The multi-turn dialogue dataset is filtered to obtain a multi-turn dialogue training dataset. Based on the multi-turn dialogue training dataset, the preset processing model is fine-tuned and trained to obtain the intent recognition model.
[0011] According to a human-computer interaction method provided by the present invention, the step of obtaining user input information includes: Obtain user voice information; The user's voice information is processed to convert speech to text, and the resulting text information is used as the user's input information. After generating the execution instruction and the response dialogue information based on the target slot information and the target invocation instruction, the method further includes: The reply dialogue information is processed from text to speech to generate speech output information.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a human-computer interaction method as described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a human-computer interaction method as described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a human-computer interaction method as described above.
[0015] This invention provides a human-computer interaction method, device, and storage medium, which has at least the following beneficial effects: In a human-computer interaction scenario, based on user input information, the user's intention to interact is analyzed to determine user intention information. Based on the user intention information, when an instruction call is involved, the target instruction is determined, and it is further determined whether the target instruction needs to supplement slot values. When a slot value needs to be supplemented, i.e., there is slot information to be supplemented, follow-up dialogue information is generated based on the slot information to be supplemented and the user intention information, to inquire about the specific slot value from the user through multiple rounds of dialogue. The user answers based on the follow-up questions in multiple rounds of dialogue, obtaining user answer information and determining the corresponding prompt word information. Subsequently, combined with the user intention information, a large model is processed to infer various possible user instruction intentions and obtain predicted instruction intention information. Based on the predicted instruction intention information, using the context as a condition, the context conditional probability corresponding to different instruction intentions is calculated, which can reflect the probability of the instruction intention after combining the context. Based on the instruction intention corresponding to the maximum context conditional probability, the target slot information is determined, and then the slot value of the target instruction is supplemented, generating an execution instruction to achieve the purpose of the instruction call. Simultaneously, a reply dialogue is generated to inform the user of the instruction call status. Therefore, based on the slot information to be supplemented in the target call instruction, follow-up questions are asked to obtain the user's answer information. By using contextual conditional probability combined with the context, the most likely instruction intent is determined to supplement the slot of the target call instruction. This can comprehensively infer the user's true intent from the context, thereby making the slot supplementation more accurate. This is conducive to improving the accuracy of instruction invocation in multi-turn dialogues and improving the user's human-computer interaction experience. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is one of the flowcharts of a human-computer interaction method provided by the present invention.
[0018] Figure 2 This is the second flowchart of a human-computer interaction method provided by the present invention.
[0019] Figure 3 This is a schematic diagram of the processing procedure of one embodiment of the human-computer interaction method provided by the present invention.
[0020] Figure 4 This is a second schematic diagram of the processing procedure of one embodiment of the human-computer interaction method provided by the present invention.
[0021] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0023] The following is combined with Figures 1-4 A human-computer interaction method according to the present invention includes: S100: Obtain user input information; S200: Determine user intent information based on the user input information; S300: Based on the user intent information, when it is determined that an instruction call is involved, then: S310: Determine the target invocation instruction based on the user input information and the user intent information; S320: According to the target call instruction, when it is determined that there is slot information to be supplemented, then: S330: Generate follow-up dialogue information based on the slot information to be supplemented and the user intent information; S340: Obtain the user's answer information corresponding to the follow-up question dialogue information; S350: Determine the corresponding prompt word information based on the user's answer information; S360: Based on the prompt word information and the user intent information, and using large model processing, obtain predicted instruction intent information, which represents various possible user instruction intents; S370: Based on the predicted instruction intent information, calculate the contextual conditional probability of the instruction intent, and determine the target slot information based on the instruction intent corresponding to the maximum contextual conditional probability; S380: Based on the target slot information and the target call instruction, generate an execution instruction and generate a response dialog message.
[0024] In human-computer interaction scenarios, based on user input, the system analyzes the user's intention to interact and determines user intent information. Based on this intent, when a command call is involved, the system identifies the target command and further determines whether it requires additional slot values. If slot values are needed (i.e., there are slots to be filled), follow-up dialogue is generated based on the slot information and the user intent information. This dialogue, conducted in multiple rounds, prompts the user for the specific slot value. The user responds to these follow-up questions, leading to multiple rounds of dialogue. The system obtains the user's responses and determines the corresponding prompt words. These responses are then combined with the user intent information for large-scale model processing to infer various possible user command intentions and obtain predicted command intent information. Based on the predicted command intent information, and using the context as a condition, the system calculates the context-conditional probability of different command intentions. This probability reflects the probability of the command intent after considering the context. Based on the command intent with the highest context-conditional probability, the target slot information is determined, and the slot value of the target command is filled in. An execution command is then generated to achieve the command call's purpose, and a response dialogue is generated to inform the user of the command call status.
[0025] Therefore, based on the slot information to be supplemented in the target call instruction, follow-up questions are asked to obtain the user's answer information. By using contextual conditional probability combined with the context, the most likely instruction intent is determined to supplement the slot of the target call instruction. This can comprehensively infer the user's true intent from the context, thereby making the slot supplementation more accurate. This is conducive to improving the accuracy of instruction invocation in multi-turn dialogues and improving the user's human-computer interaction experience.
[0026] It is understandable that the target slot information corresponds to the slot information to be supplemented, that is, the target slot information is used to supplement the slot to be supplemented.
[0027] User intent information reflects the user's intended purpose in human-computer interaction. In some embodiments of the present invention, user intent information may include tool invocation, machine commands, chat, etc. Tool invocation may include invoking a hotel reservation tool, and machine commands may include instructing a robot to move. Since tool invocation and machine commands require instructions to achieve their purpose, they involve command invocation. There are cases where the target invocation command requires further supplementary slot information, illustrated by the following example: User: "Please set an alarm to remind me to take my medicine." Machine / Equipment: "Okay, what time should I set the alarm?" User: "10 a.m." Machine / Equipment: "Okay, what's the name of the medication you're referring to?" User: "Medicine for stomach pain..." In the example above, the user's intent is to invoke the alarm clock tool, involving command invocation. The target invocation command is determined to be an alarm clock setting command, such as `setReminder(time, thing)`, where the slot information to be supplemented includes `time` and `thing`, i.e., the two slot values for time and thing. Then, based on the intent to invoke the alarm clock tool and the two slot values to be supplemented, two corresponding follow-up questions are generated to engage in multiple rounds of dialogue with the user and obtain their responses. Based on the user's responses and intent, various possible user intentions are inferred, such as setting an alarm for today, an alarm for tomorrow, or a specific medication. Combined with historical dialogue information, i.e., context, such as "I need to take medicine tomorrow" or "XXX medicine", the contextual conditional probability is calculated. The command intent corresponding to the highest contextual conditional probability is: "Set an alarm at 10 AM tomorrow to remind me to take XXX medicine". Therefore, the corresponding slot values can be supplemented to generate an execution command, achieving the purpose of invoking the alarm clock tool, and generating a reply dialogue message such as "The alarm has been set".
[0028] It is important to emphasize that for each user's response, the corresponding instruction intent can be determined for each response, so as to fill in the slot value of each slot one by one.
[0029] It is understood that in some embodiments of the present invention, if the target invocation instruction does not require additional slot values (i.e., there is no additional slot information), the target invocation instruction can be executed directly, thus eliminating the need for multiple rounds of follow-up queries and allowing direct execution. Figure 4 The processing procedure is shown below.
[0030] Currently, when users engage in human-computer interaction, there are chat scenarios. However, the relevant technologies lack the ability to recognize users' emotions, which makes it difficult to provide appropriate responses based on the user's current mood, resulting in a poor human-computer interaction experience.
[0031] For the above questions, please refer to Figure 2 In some embodiments of a human-computer interaction method of the present invention, after S200, the method further includes: S400: Based on the user intent information, when it is determined to be an emotional dialogue, then: S410: Based on the user input information, determine the corresponding emotion category information, wherein the emotion category information represents the inferred user's emotion; S420: Generate response text information based on the emotion category information and the user input information; S430: Generate emotional voice response information based on the emotional category information and the response text information, wherein the emotional voice response information is used to play the response content in a specified emotional tone.
[0032] If the user's intention, determined based on input, is to engage in emotional dialogue, then the system identifies the emotion category, representing and inferring the user's current emotion, such as positive, negative, or neutral, or joy, anger, sorrow, happiness, or neutrality. Based on the emotion category and user input, and guided by the emotion category, the system generates a response text that better matches the user's current emotion. This is then used to generate an emotional voice response, which is played with the corresponding emotional tone. This not only provides question-and-answer capabilities but also fosters emotional connection, achieving effects such as calming and comforting the user's emotions, thus improving the user's human-computer interaction experience.
[0033] In some embodiments of the present invention, the determination of emotion category information can be achieved by utilizing the Few-shot technique of a large language model to construct an adaptive Few-shot mechanism. The Few-shot mechanism can determine the emotion category information by providing user input information through a small number of examples in the embodiments of the present invention. Then, the large language model combines the emotion category information and the user input information for processing to generate emotional response text information.
[0034] In some embodiments of a human-computer interaction method of the present invention, step S350 includes: The user's answer information is subjected to text embedding processing to obtain a first feature vector; Based on the first feature vector, calculate the similarity with the second feature vector corresponding to each prompt word in the preset corpus, and obtain similarity information; Based on the similarity information, the prompt word with the highest similarity is selected as the prompt word information.
[0035] Text embedding is a method of converting text into feature vectors. These feature vectors capture the semantic information of the text, enabling machine understanding and processing. Text embedding is performed on user responses to obtain a first feature vector. This first vector is then compared with the second feature vectors corresponding to various prompt words in a predictive database. Similarity information, such as cosine similarity and distance, is used to calculate the difference in similarity between the two vectors. Based on this similarity information, the most similar (i.e., most relevant) prompt word is selected as the prompt word, making the prompt word information more accurate. The prompt word information serves as the input text provided to the large model, guiding it to complete the target task. It sets the model's context, clarifying the task objective and making the predicted instruction intent information obtained by the subsequent large model processing more accurate.
[0036] In some embodiments of the present invention, the second feature vector may be obtained by text embedding of the prompt words.
[0037] In some embodiments of the present invention, text embedding processing can be implemented through model processing, such as using models with text embedding processing functions, such as the doc2vec model or the bge-large-zh model.
[0038] In some embodiments of a human-computer interaction method of the present invention, step S370 includes: Based on the predicted instruction intent information, determine the instruction intent probability corresponding to each of the various instruction intents; Based on the user intent information from historical dialogues, the contextual conditional probability corresponding to each instruction intent probability is calculated. The instruction intent corresponding to the highest context conditional probability is taken as the target instruction intent; The target slot information is determined based on the target instruction intent.
[0039] Based on prompt word information and user intent information—that is, information from the current dialogue turn—the predicted instruction intent information is obtained. This is then combined with user intent information from historical dialogues, i.e., contextual information, to calculate contextual conditional probabilities. By re-evaluating the probabilities of various possible instruction intents within the context, the instruction intent with the highest probability is selected as the target instruction intent, thereby determining the target slot information. This approach more closely aligns with the user's contextual intent logic to infer instruction intent, facilitating more accurate slot allocation and improving accuracy.
[0040] In some embodiments of the present invention, the predicted instruction intent information obtained based on large model processing may include the probabilities of various possible instruction intents, thereby determining the instruction intent probability.
[0041] In some embodiments of the present invention, the acquisition of the target instruction intent can be achieved through the following expression: in, For the first The target instruction intent of the wheel; , The predicted instruction intent information obtained from processing large models is used, and its output includes the probabilities of various possible instruction intents. For the first User response information in the round, For the first The wheel's prompt message; In order to be in That is, based on the intentions of the previous k rounds, i.e., under the context conditions. The probability is the context-conditional probability of various possible instruction intentions; max is the maximum value operation, that is, taking the maximum context-conditional probability to determine the target instruction intention.
[0042] It is important to emphasize that the user's target instruction intent can also be considered as user intent information, and vice versa. In fact, both represent the user's intent. The use of "user intent information" and "target instruction intent information" in the above description is for the convenience of distinguishing user intent at different processing stages. In some embodiments of the present invention, during the calculation process of obtaining the target instruction intent, It can include historical target instruction intents and user intent information; that is, the user intent information of historical dialogues can include target instruction intents and user intent information from previous rounds.
[0043] refer to Figure 4 In some embodiments of a human-computer interaction method of the present invention, step S200 includes: Retrieve historical conversation information; Context information is generated based on the historical dialogue information and the user input information; The context information is input into a preset intent recognition model to obtain the user intent information.
[0044] During human-computer interaction, users typically engage in multiple rounds of dialogue with machines. Based on historical dialogue information and combined with the user's input information in the current round, contextual information is formed. This contextual information is then processed by a pre-set intent recognition model to obtain user intent information. This allows the model to infer the user's actual intent from the overall dialogue, which helps improve the accuracy of determining the user's intent.
[0045] Figure 4 In this context, LLM stands for Large Language Model.
[0046] refer to Figure 3 In some embodiments of a human-computer interaction method of the present invention, the method for obtaining the intent recognition model includes: Obtain dialogue data; The dialogue data is preprocessed to obtain preprocessed dialogue data; The preprocessed dialogue data is randomly combined to obtain a multi-turn dialogue dataset. The multi-turn dialogue dataset is filtered to obtain a multi-turn dialogue training dataset. Based on the multi-turn dialogue training dataset, the preset processing model is fine-tuned and trained to obtain the intent recognition model.
[0047] We acquire dialogue data from tool calls, command calls, and chat sessions to provide a data foundation for fine-tuning the model. Since different processing models have different input data formats, we preprocess the dialogue data to create preprocessed dialogue data, adapting it to the data format of the training model. By randomly combining these preprocessed dialogue data, we simulate multi-turn dialogues, creating a multi-turn dialogue training dataset. This dataset is then filtered to remove illogical multi-turn dialogue training data, avoiding the influence of unreasonable multi-turn dialogues. This multi-turn dialogue training dataset is then used to fine-tune the processing model. After fine-tuning, the processing model serves as the intent recognition model. Therefore, fine-tuning the processing model for multi-turn dialogue scenarios helps the trained intent recognition model more accurately determine user intent.
[0048] In some embodiments of the present invention, the basic processing model can be a large model such as Qwen1.5-7B or Llama2-7B for supervised data fine-tuning training. During fine-tuning, the LoRA fine-tuning method can be selected. Taking Qwen1.5-7B as an example, the target layer to be fine-tuned is set to ["c_attn","c_proj","w1","w2"], with a rank of 8, an alaph value of 32, and a dropout value of 0.1. Other reasonable values can also be set according to requirements. The fine-tuning training method can also be QLoRA, etc.
[0049] The intent recognition model obtained after fine-tuning training can be deployed on a server using different large model deployment methods such as vllm and DeepSpeed-mii to achieve the function of user intent recognition.
[0050] In some embodiments of the present invention, the predicted instruction intent information obtained based on large model processing can be obtained in a manner similar to the intent recognition model described above. Specifically, the large model can be fine-tuned and trained using dialogue data and prompt word data to input the probability of various possible user instruction intents. After the large model is fine-tuned and trained, it is deployed to the server to realize the user instruction intent prediction function.
[0051] refer to Figure 3 In some embodiments of a human-computer interaction method of the present invention, step S100 includes: Obtain user voice information; The user's voice information is processed to convert speech to text, and the resulting text information is used as the user's input information. Following S380, the following is also included: The reply dialogue information is processed from text to speech to generate speech output information.
[0052] Users interact with the computer via voice. The system acquires user voice information, processes it into text, and converts it into text input for subsequent processing. When the user's intent involves a command, the system generates a response dialogue, converts it into speech, and outputs the response as voice. This allows for interaction with the user via voice, making human-computer interaction more convenient and efficient.
[0053] In some embodiments of the present invention, generating follow-up dialogue information based on the slot information to be supplemented and the user intent information further includes: performing text-to-speech processing on the follow-up dialogue information to generate voice follow-up information.
[0054] In some embodiments of the present invention, in addition to voice input, users can also interact with the computer through text input, in which case the text information entered by the user is used as user input information.
[0055] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a human-computer interaction method.
[0056] The electronic device provided by this invention can be a machine device for human-computer interaction or a server to provide human-computer interaction functions.
[0057] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0058] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is able to execute a human-computer interaction method provided by the above methods.
[0059] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform a human-computer interaction method provided by the methods described above.
[0060] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0061] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0062] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0063] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0064] All actions involving the acquisition of signals, information, or data in this application are carried out in accordance with the applicable data protection laws and policies of the locality and with authorization from the owner of the relevant device.
[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A human-computer interaction method, characterized in that, include: Obtain user input information; Based on the user input information, determine the user intent information; Based on the user intent information, when it is determined that an instruction call is involved, then: The target invocation instruction is determined based on the user input information and the user intent information; According to the target call instruction, when it is determined that there is slot information to be supplemented, then: Based on the information of the slot to be filled and the user intent information, generate follow-up dialogue information; Obtain the user's response information corresponding to the follow-up question dialogue information; Based on the user's response information, determine the corresponding prompt word information; Based on the prompt word information and the user intent information, a large model is used to obtain predicted instruction intent information, which represents various possible user instruction intents. Based on the predicted instruction intent information, the contextual conditional probability of the instruction intent is calculated, and the target slot information is determined based on the instruction intent corresponding to the maximum contextual conditional probability. Based on the target slot information and the target call instruction, an execution instruction is generated and a response dialog message is generated.
2. The human-computer interaction method according to claim 1, characterized in that, After determining the user intent information based on the user input information, the method further includes: Based on the user intent information, when it is determined to be an emotional dialogue, then: Based on the user input information, the corresponding emotion category information is determined, and the emotion category information represents the inferred user emotion; Based on the emotion category information and the user input information, generate response text information; Based on the emotion category information and the response text information, an emotional voice response information is generated, which is used to play the response content with a specified emotional tone.
3. The human-computer interaction method according to claim 1, characterized in that, The step of determining the corresponding prompt word information based on the user's answer information includes: The user's answer information is subjected to text embedding processing to obtain a first feature vector; Based on the first feature vector, calculate the similarity with the second feature vector corresponding to each prompt word in the preset corpus, and obtain similarity information; Based on the similarity information, the prompt word with the highest similarity is selected as the prompt word information.
4. The human-computer interaction method according to claim 1, characterized in that, The step of calculating the contextual conditional probability of the instruction intent based on the predicted instruction intent information, and determining the target slot information based on the instruction intent corresponding to the maximum contextual conditional probability, includes: Based on the predicted instruction intent information, determine the instruction intent probability corresponding to each of the various instruction intents; Based on the user intent information from historical dialogues, the contextual conditional probability corresponding to each instruction intent probability is calculated. The instruction intent corresponding to the highest context conditional probability is taken as the target instruction intent; The target slot information is determined based on the target instruction intent.
5. The human-computer interaction method according to claim 1, characterized in that, Determining user intent information based on the user input information includes: Retrieve historical conversation information; Context information is generated based on the historical dialogue information and the user input information; The context information is input into a preset intent recognition model to obtain the user intent information.
6. The human-computer interaction method according to claim 5, characterized in that, The methods for acquiring the intent recognition model include: Obtain dialogue data; The dialogue data is preprocessed to obtain preprocessed dialogue data; The preprocessed dialogue data is randomly combined to obtain a multi-turn dialogue dataset. The multi-turn dialogue dataset is filtered to obtain a multi-turn dialogue training dataset. Based on the multi-turn dialogue training dataset, the preset processing model is fine-tuned and trained to obtain the intent recognition model.
7. The human-computer interaction method according to claim 1, characterized in that, The acquisition of user input information includes: Obtain user voice information; The user's voice information is processed to convert speech to text, and the resulting text information is used as the user's input information. After generating the execution instruction and the response dialogue information based on the target slot information and the target invocation instruction, the method further includes: The reply dialogue information is processed from text to speech to generate speech output information.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a human-computer interaction method as described in any one of claims 1 to 7.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a human-computer interaction method as described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements a human-computer interaction method as described in any one of claims 1 to 7.