Human-computer voice interaction method, device, computer equipment and storage medium
Through the combination of semantic analysis and Bayesian network model, user needs are identified and personalized replies are generated, which solves the problem of single reply mode in the existing technology, realizes multi-modal chat and user emotion matching, and improves the flexibility of human-computer interaction. sex and user experience.
Patent Information
- Application Number
- CN202110737501.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-30
- Publication Date
- 2024-10-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing human-computer voice interaction methods cannot meet the personalized needs of users, have a single reply mode, and cannot effectively identify and respond to different chat scenarios and user emotions.
Identify the type of user interaction needs through semantic analysis, use the task tree model to deal with task-related needs and the Bayesian network model to deal with task-irrelevant needs, combine voiceprint recognition and emotion recognition to generate personalized voice responses, and adjust them according to user attributes Broadcast sound quality.
It realizes multi-modal interaction for different chat needs, provides simple and efficient task solving and scalable dialogue, meets users' diverse interaction needs, and improves the chat experience.
Smart Images

Figure CN113539261B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of human-computer interaction technology, and in particular to a human-computer voice interaction method, device, computer equipment and storage medium. Background Art
[0002] As the concept of intelligent life becomes more and more popular, human-computer voice interaction technology has also developed rapidly and is widely used in voice dialogue robots, voice assistants, voice interaction tools and other fields. However, the current human-computer voice interaction method generally uses natural language processing technology to identify the semantics of user dialogues, and then makes simple dialogue responses based on the identified semantic results. The dialogue mode is single and cannot meet the personalized needs of each user. Summary of the invention
[0003] Based on this, it is necessary to provide a human-computer voice interaction method, device, computer equipment and storage medium that can give different personalized responses to different chat needs in response to the above technical problems, which can fully meet the user's conversation needs.
[0004] A first aspect of the present invention provides a human-computer voice interaction method, the method comprising:
[0005] Receiving conversational speech from a user;
[0006] Identify the speech text corresponding to the conversation speech, perform semantic analysis on the speech text, and identify the user's interaction demand type based on the result of the semantic analysis;
[0007] When the interaction requirement type is task-related, a reply text for responding to the voice text is determined through a task tree model;
[0008] When the interaction requirement type is task-independent, a reply text for responding to the voice text is determined through a probability model;
[0009] A voice response is given based on the determined reply text.
[0010] In one embodiment, the method further includes: performing voiceprint recognition on the conversation speech, and determining attribute information of the user based on the result of the voiceprint recognition, the attribute information being age range and / or gender;
[0011] Providing voice response based on the determined reply text, including:
[0012] Determine the broadcast sound quality type corresponding to the user's attribute information;
[0013] Generate a response voice according to the broadcast sound quality type and the determined reply text, and play the response voice.
[0014] In one embodiment, the user's interaction requirement type is identified based on the result of semantic analysis, including:
[0015] Determine whether the result of the semantic analysis is related to any one of the plurality of preset task scenarios;
[0016] When the result of the semantic analysis is related to any preset task scenario, the interaction requirement type is determined to be task-related;
[0017] When the result of the semantic analysis is irrelevant to any preset task scenario, the interaction requirement type is determined to be task-independent.
[0018] In one embodiment, determining a reply text for responding to a voice text by a probability model includes:
[0019] Acquire multiple corpus texts in a preset corpus, where the multiple corpus texts are all or part of the corpus texts in the preset corpus;
[0020] Calculate the reply probability corresponding to each corpus text through the probability model;
[0021] The corpus text with the highest corresponding reply probability is used as the reply text for responding to the voice text.
[0022] In one embodiment, the probability model is a Bayesian network probability model, and the step of calculating the reply probability corresponding to any corpus text by the probability model includes:
[0023] Identify the emotion type of the user when speaking the conversation voice, determine the prior probability corresponding to the emotion type through the first prior probability mapping relationship, and use it as the first probability of the Bayesian network probability model;
[0024] Determine whether any of the corpus texts contains high-frequency words, determine the prior probability corresponding to the determination result through the second prior probability mapping relationship, and use it as the second probability of the Bayesian network probability model;
[0025] Identify the topic type to which any corpus text belongs, determine whether the topic type belongs to a preferred topic, determine the prior probability corresponding to the judgment result through the third prior probability mapping relationship, and use it as the third probability of the Bayesian network probability model;
[0026] Obtaining the corpus style type corresponding to any corpus text, determining the prior probability corresponding to the corpus style type and the emotion type through the fourth prior probability mapping relationship, and using it as the fourth probability of the Bayesian network probability model;
[0027] The reply probability corresponding to any one of the corpus texts is calculated according to at least two of the first probability, the second probability, the third probability and the fourth probability.
[0028] In one embodiment, identifying the emotion type of the user when speaking a conversation voice includes:
[0029] Acquire the facial expression image of the user when speaking the conversation voice captured by the camera, perform emotion recognition on the facial expression image, and determine the emotion type of the user when speaking the conversation voice according to the result of the emotion recognition;
[0030] And / or, emotion recognition is performed on the conversational speech, and the emotion type of the user when speaking the conversational speech is determined according to the result of the emotion recognition.
[0031] In one embodiment, before determining the prior probabilities corresponding to the corpus style type and the emotion type through the fourth prior probability mapping relationship, the method further includes:
[0032] Get the number of interactive dialogues with the user in this session;
[0033] Determine whether it is necessary to update the probability value of the current fourth prior probability mapping relationship according to the number of interactive dialogues and the emotion type;
[0034] When it is determined that an update is required, updating the probability value of the current fourth prior probability mapping relationship;
[0035] In one embodiment, before determining whether the topic type belongs to a preferred topic, the method further includes:
[0036] Determine whether the current preferred topic needs to be updated based on the number of interactive dialogues and the type of emotions;
[0037] When it is determined that an update is required, the current preferred topic is updated.
[0038] A second aspect of the present invention provides a human-computer voice interaction device, the device comprising:
[0039] A conversation voice receiving module, used for receiving conversation voice from a user;
[0040] The demand type confirmation module is used to identify the voice text corresponding to the conversation voice, perform semantic analysis on the voice text, and identify the user's interaction demand type based on the result of the semantic analysis;
[0041] A task tree reply module, used to determine a reply text for answering a voice text through a task tree model when the interaction requirement type is task-related;
[0042] A probability model reply module, used to determine a reply text for responding to a voice text through a probability model when the interaction requirement type is task-independent;
[0043] The voice response module is used to provide voice response according to the determined reply text.
[0044] A third aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above method embodiments when executing the computer program.
[0045] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above method embodiments.
[0046] The human-computer voice interaction method provided in the above embodiment first receives a conversational voice from the user; identifies the voice text corresponding to the conversational voice, performs semantic analysis on the voice text, and identifies the user's interaction demand type based on the result of the semantic analysis; when the interaction demand type is task-related, determines a reply text for responding to the voice text through a task tree model; when the interaction demand type is task-independent, determines a reply text for responding to the voice text through a probability model; and performs a voice response based on the determined reply text.
[0047] Among them, the technical solution of this embodiment uses semantic analysis technology to identify the user's interaction demand type, and divides the user's interaction demand type into two categories: task-related and task-independent. Different methods are used to determine the reply text for answering the voice text according to different interaction demand types. Among them, when the user's interaction demand type is task-related, that is, facing a chat for the purpose of solving a problem, a targeted reply text can be determined concisely and efficiently through the task tree model; when the user's interaction demand type is task-independent, that is, for a chat initiated for the purpose of emotional companionship, the optimal reply text is determined through a probability model. The optimal reply text has both dialogue extensibility and divergence, is more suitable for the interaction scene, can enhance the dialogue emotion and make the chat easier. In summary, this embodiment can give different personalized replies through different algorithm models for different chat needs, and realize multimodal chat that meets different dialogue needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is an application environment diagram of a human-computer voice interaction method in an embodiment;
[0049] Figure 2 A schematic diagram of a flow chart of a human-computer voice interaction method in one embodiment;
[0050] Figure 3 An example diagram of a task tree dialog flow in one embodiment;
[0051] Figure 4 A flowchart of an implementation of a Bayesian network probability model in an embodiment;
[0052] Figure 5 An example diagram of a Bayesian network in one embodiment;
[0053] Figure 6 A flowchart of an example of parameter optimization of a Bayesian network probability model in one embodiment;
[0054] Figure 7 A schematic diagram of a flow chart of a human-computer voice interaction method in another embodiment;
[0055] Figure 8 is a structural block diagram of a human-computer voice interaction device in an embodiment;
[0056] Fig. 9 It is a structural block diagram of a human-computer voice interaction device in another embodiment;
[0057] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] Embodiment 1
[0060] The human-computer voice interaction method provided in this application can be applied to Figure 1 In the application environment shown, the user 102 can interact with the controller 104 through voice. The controller 104 can be, but is not limited to, a vehicle controller (vehicle computer), a smart speaker, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.
[0061] A human-computer voice interaction method provided in this embodiment includes the following steps: Figure 2 The steps shown in this paper are applied to Figure 1 The controller in the example is used to illustrate the following steps:
[0062] Step 202: Receive a conversation voice from a user.
[0063] The conversation voice from the user is the conversation voice issued by the user.
[0064] Specifically, the controller may receive the conversation voice issued by the user through an audio collection device (such as a microphone).
[0065] Step 204 , identifying the speech text corresponding to the conversation speech, performing semantic analysis on the speech text, and identifying the user's interaction demand type based on the result of the semantic analysis.
[0066] Among them, the result of semantic analysis can be the demand content contained in the voice text corresponding to the above-mentioned dialogue voice, and the demand content refers to the purpose that the user wants to achieve by initiating the dialogue voice, such as ordering food, navigation, pure chatting, etc.; the user's interaction demand type is the type to which the above-mentioned demand content belongs.
[0067] Specifically, the controller recognizes the conversational voice issued by the user through voice recognition technology, and obtains the voice text corresponding to the conversational voice, such as "Open the car window", "Who is more powerful, the Hulk or Iron Man?", etc., and uses natural language processing technology to perform semantic analysis on the voice text to obtain the demand content contained in the voice text, that is, the demand content of the conversational voice, and the user's interaction demand type can be determined through the demand content.
[0068] In one implementation, the step 204 of identifying the user's interaction requirement type based on the result of semantic analysis specifically includes the following steps:
[0069] It is determined whether the result of the semantic analysis is related to any preset task scenario among the multiple preset task scenarios. When the result of the semantic analysis is related to any preset task scenario, the interaction requirement type is determined to be task-related; when the result of the semantic analysis is not related to any preset task scenario, the interaction requirement type is determined to be task-independent.
[0070] Among them, the preset task scenario may be a scenario related to certain specific tasks (such as opening a car window, navigation, etc.), and the interaction requirement type may include task-related and task-independent types.
[0071] Specifically, the controller can use natural language processing technology to analyze the demand content and determine whether the demand content is related to any preset task scenario. When the demand content is related to any preset task scenario, the interaction demand type is determined to be task-related. At this time, the demand content contains specific tasks that need to be performed by the controller, that is, the purpose of the voice conversation initiated by the user is to complete a specific task, such as restaurant, navigation, map or music tasks. The controller determines this type of demand content containing actual tasks as task-related.
[0072] When the demand content is irrelevant to any preset task scenario, the interaction demand type is determined to be task-irrelevant. At this time, the user initiates a voice conversation without a specific purpose, and the voice conversation can be considered a pure chat-style conversation. Its starting point is only the need to satisfy the companionship need, and the controller is not required to perform the corresponding task, such as "Who is more powerful, Ultraman or the Hulk? What kind of children are they willing to be friends with?" This kind of conversation content is irrelevant to the preset task scenario.
[0073] Step 206: When the interaction requirement type is task-related, a reply text for responding to the voice text is determined through a task tree model.
[0074] Among them, the task tree model is used to determine the preset scenario corresponding to the user's interaction needs, and determine the reply text according to the task tree dialogue flow corresponding to the preset scenario. It is known that when the interaction demand type is task-related, the user's demand content includes specific functional tasks that need to be performed by the controller, and the task tree model can provide the logical relationship between the various functional tasks included in any preset scenario. For example, the task tree model can include task tree dialogue flows corresponding to multiple preset scenarios, and the task tree dialogue flow contains all possible dialogue branches that may occur in the preset task scenario.
[0075] Specifically, when it is determined that the demand content of a certain conversation voice is task-related, it can be known that the demand content of the conversation voice is related to a preset task scenario. The controller uses the task tree dialogue flow corresponding to the preset task scenario to determine the subsequent chat direction, for example, Figure 3 The task tree dialogue flow of the meal ordering service shown is an example of a chat decision. It can be seen that the meal ordering service is divided into three major branches: cuisine introduction, meal ordering, and restaurant introduction. The cuisine introduction includes the cuisine options below, the restaurant introduction includes the restaurant options below, and the meal ordering branch includes cuisine options, time, number of people, and restaurant options.
[0076] In this step, the task tree model is used for voice response. Since the task tree dialogue flow has a clear dialogue context, human-computer voice interaction can be carried out concisely and efficiently, thereby accurately solving the questions raised by the user and ending the conversation quickly.
[0077] The characteristics of pure chat-style dialogues are significantly different from those of task-oriented dialogues. For task-oriented dialogues, efficient execution is required to complete the task as soon as possible to end the dialogue; whereas pure chat-style dialogues are usually based on the need for companionship, that is, the dialogue needs to be more divergent and extensible so that the dialogue can continue, thereby satisfying the need for companionship. Therefore, for pure chat-style dialogues, a different method from the task tree model needs to be used for voice interaction, as shown in step 208.
[0078] Step 208: When the interaction requirement type is task-independent, a reply text for responding to the voice text is determined through a probability model.
[0079] Among them, the probability model is used to calculate the reply probability corresponding to the corpus text. Generally, the corpus text with the highest reply probability is selected as the reply text for answering the voice text. Commonly used probability models include Markov model, conditional random field and Bayesian network probability model. Bayesian network probability model is a probabilistic graphical model. A Bayesian network is a directed acyclic graph (DAG), which consists of nodes representing variables and directed edges connecting these nodes. The directed edges point from the parent node to its child node, which is used to represent the relationship between nodes. The relationship strength is expressed by conditional probability, and the information is expressed by prior probability for nodes without parent nodes.
[0080] Specifically, the Bayesian network in the above-mentioned Bayesian network probability model can be a pre-set directed acyclic graph, in which the variables represented by each node in the directed acyclic graph, the mutual relationship and conditional probability between the random variables represented by the directed edges, and the prior probability corresponding to each node are all preset.
[0081] In one implementation, when the controller executes step 208, the following steps are specifically performed:
[0082] A plurality of corpus texts in a preset corpus are obtained, where the plurality of corpus texts are all or part of the corpus texts in the preset corpus.
[0083] The probability of replying to each corpus text is calculated through the probability model.
[0084] The corpus text with the highest corresponding reply probability is used as the reply text for responding to the voice text.
[0085] Among them, Figure 4 As shown, taking an implementation process of the Bayesian network probability model as an example, the specific process of calculating the reply probability corresponding to each corpus text through the Bayesian network probability model in step 208 is described in detail.
[0086] In a purely chat-style conversation, the evaluation of demand content may involve many factors, such as the user's emotions at the time of the conversation, the preset corpus, the user's topic preferences, and commonly used high-frequency vocabulary, all of which will affect the selection of the reply text. In the Bayesian network of this example, the node expression represents the expression variable, that is, the user's emotional variable; the node topic preference represents the topic preference, the node dialogueknowledge base represents multiple corpus texts obtained from the preset corpus, that is, a candidate corpus set, the node high-frequency vocabulary represents the high-frequency vocabulary, and the final response represents the final confirmed reply text.
[0087] Among them, the topic preference variable represented by the node topic preference can be obtained by statistically analyzing the chat field in the process of human-computer dialogue. For example, if a user often searches for Hunan cuisine restaurants by calling the restaurant function, it can be known that food is the user's preferred topic. Similarly, the high-frequency vocabulary variable represented by the node high-frequency vocabulary can be obtained by statistically analyzing the commonly used vocabulary in the chat process. For example, if the speaker often searches for KFC, then KFC is a high-frequency vocabulary.
[0088] Specifically, for the selection of topic preferences and high-frequency words, since different users have different frequencies of voice interaction, using a certain number to select topic preferences and high-frequency words may not be accurate enough. Topic preferences and high-frequency words can be selected based on the proportion of the frequency of topics and words in the historical voice interaction records within a preset time period to obtain more accurate topic preferences and high-frequency words. For example, the top 10% of word frequency statistics and the top 10% of frequently chatted topics within 3 months are defined as high-frequency words and preferred topics. The specific time and percentage values can be adjusted according to actual needs.
[0089] For Figure 4 The Bayesian network shown can distinguish three variable factors E0, E1 and E2 in the expression variables. E0, E1 and E2 represent happy, sad and calm expressions respectively (or emotions. It can be understood that the types and numbers of emotions in the figure are only examples and can be flexibly adjusted based on the actual scene requirements). The prior probabilities of E0, E1 and E2 are all a, because in a certain dialogue scenario, the speaker's facial expression can randomly be any one of happiness, sadness or calm, so their prior probabilities are equal and there is no difference.
[0090] In topic preference, P0 represents the probability that a reply text is not within the topic preference range, which is m; P1 represents the probability that the reply text is within the topic preference range, which is m·n; similarly, in high-frequency vocabulary, H1 represents the probability that a reply text contains high-frequency vocabulary, which is g; H0 represents the probability that the reply text does not contain high-frequency vocabulary, which is g·n. Since reply texts within the topic preference range take precedence over reply texts not within the topic preference range, and reply texts with high-frequency vocabulary take precedence over reply texts without high-frequency vocabulary, in terms of probability values, P1 is greater than P0, and H1 is greater than H0.
[0091] In the node dialogue knowledge base, the corpus is divided into three types: D1, D2, and D3. Among them, D1 represents emotion-enhanced dialogue corpus, which is often used in dialogue scenarios with happy emotions. D2 represents emotion-guiding dialogue corpus, which is used in dialogue scenarios with sad emotions and is conducive to guiding the speaker's emotions. D3 represents popular science question-and-answer dialogue corpus, which is suitable for any scenario and has neither positive nor negative effects on emotional adjustment. Because different emotions have different requirements for corpora of different styles, for example, when the speaker is in an unhappy emotional state, giving priority to pushing emotion-guiding corpora will get a good dialogue experience. Therefore, the probability values set for different types of corpora are also different. For example, the probability value interval of abc, erg, and dgt can be set to [0.5, 0.7]; the probability value interval of bc, rg, and gt can be set to [0.2, 0.3]; the probability value interval of c, g, and t can be set to [0, 0.1]. The specific values can also be used to determine whether to optimize the parameters based on the probability calculation results. In addition, Figure 4 The value of any probability in is not 0.
[0092] Because the user's topic preference, high-frequency vocabulary and candidate corpus set are independent of each other, there is no probability dependency relationship between the node topicreference, the node high-frequency vocabulary and the node dialogue knowledge base, and there is no directed line connection. It should be stated that the above Bayesian model is only an example. In specific applications, variables can be added or reduced based on the above four variables.
[0093] More specifically, if Figure 4 In one implementation of the Bayesian network shown, the step of calculating the reply probability corresponding to any corpus text by using the Bayesian network probability model may include the following steps:
[0094] The emotion type of the user when speaking the conversation voice is identified, and the prior probability corresponding to the emotion type is determined through the first prior probability mapping relationship, and is used as the first probability of the Bayesian network probability model.
[0095] The first prior probability mapping relationship includes various emotion types and the prior probability corresponding to each emotion type. The first prior probability mapping relationship is equivalent to Figure 4 Prior probability mapping table corresponding to the middle node expression, the prior probabilities of E0, E1 and E2 are all a.
[0096] Specifically, the following emotion recognition methods can be used to identify the emotion type of the user when speaking the conversational voice: one method is to obtain an expression image of the user captured by a camera when speaking the conversational voice, the expression image is an image of a relatively clear face of the user, emotion recognition is performed on the expression image, and the emotion type of the user when speaking the conversational voice is determined based on the result of emotion recognition. This method utilizes image recognition technology, and has the advantage of being able to more accurately identify the user's emotions; another method is to perform emotion recognition on the conversational voice from the user, and determine the emotion type of the user when speaking the conversational voice based on the result of emotion recognition. This method does not need to set up a camera to capture the user's expression image, and can directly use the conversational voice for recognition, which has a wider scope of application. More extensive; another method is, when it is determined that the facial expression image of the user captured by the camera when speaking the conversational voice does not meet the predetermined clarity requirement (indicating that the user's emotion type cannot be accurately identified through the facial expression image), the above-mentioned second method is used to identify the user's emotion type when speaking the conversational voice; another method is to use a combination of image recognition and voice recognition to realize the user's emotion recognition, that is, on the one hand, the facial expression image of the user when speaking the conversational voice captured by the camera is obtained, and emotion recognition is performed on the facial expression image; on the other hand, emotion recognition is performed on the conversational voice, and then the emotion recognition results obtained by the image recognition and voice recognition are combined to determine the emotion type of the user when speaking the conversational voice.
[0097] It is determined whether any of the corpus texts contains high-frequency words, and the prior probability corresponding to the determination result is determined through the second prior probability mapping relationship, and is used as the second probability of the Bayesian network probability model.
[0098] Identify the topic type to which any corpus text belongs, determine whether the topic type belongs to a preferred topic, determine the prior probability corresponding to the judgment result through the third prior probability mapping relationship, and use it as the third probability of the Bayesian network probability model.
[0099] The corpus style type corresponding to any corpus text is obtained, and the prior probability corresponding to the corpus style type and the emotion type is determined through the fourth prior probability mapping relationship, and is used as the fourth probability of the Bayesian network probability model.
[0100] The second prior probability mapping relationship includes the case where the reply text is not within the topic preference range, the case where the reply text is within the topic preference range, and the probabilities corresponding to the above two cases. The second prior probability mapping relationship is equivalent to Figure 4 The prior probability relationship table corresponding to the topic preference node in the middle node; the third prior probability mapping relationship includes the case where there are no high-frequency words in the reply text, the case where there are high-frequency words in the reply text, and the probabilities corresponding to the above two cases respectively. The third prior probability mapping relationship is equivalent to Figure 4 The prior probability relationship table corresponding to the high-frequency vocabulary of the middle node; similarly, the fourth prior probability mapping relationship is equivalent to Figure 4 The conditional probability relationship table corresponding to the middle node dialogue knowledgebase includes multiple conditional probabilities corresponding to different corpus style types and different emotion types.
[0101] The reply probability corresponding to any corpus text is calculated according to at least two probabilities among the first probability, the second probability, the third probability and the fourth probability, for example:
[0102] In a specific implementation, the calculation formula for the reply probability corresponding to any corpus text, that is, P(X), can also be as follows:
[0103] P(X)=P(E,D)=P(E)P(D|E)
[0104] Among them, P(E) is the first probability, and P(D|E) is the fourth probability. Figure 4 The probability values in the prior probability mapping table corresponding to each node in the above formula can be substituted into the above formula to calculate the reply probability corresponding to each corpus text, and the corpus text with the largest reply probability is selected as the optimal reply text.
[0105] The above implementation can determine a reply text with a corpus style that is more in line with the user's emotional state. In the specific implementation process, any two or three of the first probability, the second probability, the third probability and the fourth probability can also be used to calculate the reply probability corresponding to the corpus text, so as to obtain a more appropriate reply text.
[0106] In another specific implementation, the calculation formula of the reply probability corresponding to any corpus text, that is, P(X), is as follows:
[0107] P(X)=P(E,D,H,T)=P(E)P(D|E)P(T)P(H)
[0108] Among them, P(E) is the first probability, P(H) is the second probability, P(T) is the third probability, and P(D|E) is the fourth probability. Figure 4The probability values in the prior probability mapping table corresponding to each node in the above formula can be used to calculate the reply probability corresponding to each corpus text, and the corpus text with the highest reply probability is selected as the optimal reply text. If after calculation, there is more than one corpus text with the highest reply probability, one of the corpus texts is randomly selected as the reply text.
[0109] The Bayesian network probability model adopted in the above implementation can determine a reply text that is more suitable for the user's voice interaction scenario and the user's emotional state, thereby meeting the scalability and uncertainty of chat-style interaction.
[0110] The following is a specific example to illustrate the process of calculating the reply probability corresponding to the corpus text through the Bayesian network probability model.
[0111] like Figure 5 As shown, taking the question "When can I see Spider-Man" asked when the user's emotion type is sad as an example, the controller identifies the user's interaction demand type as task-independent through step 204, and determines the probability of the reply text through the Bayesian network.
[0112] Among them, reply R1 is not in the preferred topic, and there are no high-frequency words in it, so the corresponding P(T)=1, P(H)=1, P(D|E)=0.2, and the calculated value is P(R1)=0.3*1*1*0.2=0.06.
[0113] Reply R2 contains the high-frequency word Ultraman, and it is also an anime-related topic, so P(T)=1.1, P(H)=1.2, P(D|E)=0.7, and P(R2)=0.3*1.1*1.2*0.7=0.2772.
[0114] Reply R3 is not in the preferred topic, and there are no high-frequency words in it, so the corresponding P(T)=1, P(H)=1, P(D|E)=0.1, and the calculated value is P(R3)=0.3*1*1*0.1=0.03.
[0115] By comparing P(R1), P(R2) and P(R3), P(R2) is the largest. Therefore, through probability calculation through Bayesian network, it is concluded that when the user's emotion type is sad, replying R2 "When you become a brave little Ultraman, you can meet each other" is the best reply.
[0116] In summary, in step 208, the Bayesian network probability model is used to calculate the probability of multiple variable factors to provide the optimal reply text for responding to the voice text.
[0117] The human-computer voice interaction method in this embodiment may also include optimization and parameter adjustment of the Bayesian network. For example, the emotion type and / or the number of interactive dialogues after the user receives the reply may be used as the judgment criteria for the effect of the Bayesian network probability model, and then the preferred topic and / or the fourth prior probability mapping relationship ( Figure 4 The conditional probability relationship table between E and D in the figure is used to obtain a more optimized Bayesian network probability model in order to obtain the optimal reply text.
[0118] In one implementation, before determining the prior probabilities corresponding to the corpus style type and the emotion type through the fourth prior probability mapping relationship, the method further includes:
[0119] Gets the number of interactive dialogues with the user in this session.
[0120] Whether it is necessary to update the probability value of the current fourth prior probability mapping relationship is determined according to the number of interactive dialogues and the emotion type.
[0121] When it is determined that an update is required, the probability value of the current fourth priori probability mapping relationship is updated.
[0122] When the controller receives the user's conversation voice, it can record the number of interactions in the conversation. After the controller receives the user's conversation voice and responds by voice, it can be recorded as one interactive conversation. For example, the following conversation can be recorded as one interactive conversation.
[0123] User: "When can I see Spider-Man?"
[0124] Controller: "When you become a brave little Ultraman, you can meet each other."
[0125] In addition, after the voice response, if the controller does not receive the user's conversation voice within the preset time, then it determines that the session is over. It can be understood that if the user's conversation voice is received outside the preset time, it will be recorded as a new session.
[0126] Exemplarily, when judging whether it is necessary to update the probability value of the current fourth prior probability mapping relationship, the controller can obtain the number of interactive dialogues with the user during the current voice interaction process. When the number of interactive dialogues exceeds the preset interactive dialogue number threshold, it is judged that there is no need to update the probability value of the current fourth prior probability mapping relationship; when the number of interactive dialogues does not exceed the preset interactive dialogue number threshold, the user's feedback emotion type after receiving each voice response (that is, after the controller makes a voice response) is identified. If the proportion of sadness in each feedback emotion type does not exceed the preset proportion, it is judged that there is no need to update the probability value of the current fourth prior probability mapping relationship; if the proportion of sadness in each feedback emotion type exceeds the preset proportion, it is judged that the current fourth prior probability mapping relationship needs to be updated, that is, the current Bayesian network probability model needs to be optimized. The above-mentioned step of updating the probability value of the fourth prior probability mapping relationship is an optional way to optimize the parameters of the current Bayesian network probability model.
[0127] Among them, the feedback emotion type of the user after receiving each voice response can be identified by using the same identification method as the above-mentioned identification of the emotion type of the user when speaking the conversational voice, which will not be repeated here.
[0128] In another embodiment, before determining whether the topic type belongs to a preferred topic, the method further includes:
[0129] Whether the current preferred topic needs to be updated is determined according to the number of interactive dialogues and the emotion type; when it is determined that an update is required, the current preferred topic is updated.
[0130] In this embodiment, the controller can obtain the number of interactive dialogues with the user during the current voice interaction process. When the number of interactive dialogues exceeds the preset interactive dialogue threshold, it is determined that there is no need to update the current preferred topic; when the number of interactive dialogues does not exceed the preset interactive dialogue threshold, the user's feedback emotion type after receiving each voice response (that is, after the controller makes a voice response) is identified. If the proportion of sadness in each feedback emotion type does not exceed the preset proportion, it is determined that there is no need to update the current preferred topic; if the proportion of sadness in each feedback emotion type exceeds the preset proportion, it is determined that the current preferred topic needs to be updated, that is, the current preferred topic needs to be updated. The above step of updating the preferred topic is another optional way to optimize the parameters of the current Bayesian network probability model.
[0131] In the above two implementations, parameter optimization of the Bayesian network probability model is achieved, which is specifically reflected in: updating the probability value of the current fourth prior probability mapping relationship, and updating the current preference topic. In specific applications, the parameters of the Bayesian network probability model can be continuously optimized until the conditions are met that no optimization is required.
[0132] like Figure 6 The parameter optimization example of a Bayesian network probability model shown in the figure includes the following steps:
[0133] Step 302: Obtain the number of interactive dialogues with the user in this session.
[0134] Step 304: determine whether the number of interactive dialogues exceeds a preset threshold number of interactive dialogues.
[0135] Step 306: If yes, do not adjust the parameters of the current Bayesian network probability model.
[0136] Step 308: If not, identify the user's feedback emotion type after receiving each voice response.
[0137] Step 310, determining whether the proportion of sadness in each feedback emotion type exceeds a preset proportion.
[0138] Step 312: If not, do not adjust the parameters of the current Bayesian network probability model.
[0139] Step 314: If yes, adjust the parameters of the current Bayesian network probability model to obtain a Bayesian network probability model after parameter adjustment.
[0140] Step 316, return to step 302 to verify the effect of parameter adjustment.
[0141] In this example, the preset interactive dialogue number threshold can be set to 5, and image recognition technology is used to identify the user's facial expression after each controller makes a voice response, and the user's feedback emotion type after receiving each voice response is obtained. The above steps are repeated until the conditions are met that no parameter adjustment is required.
[0142] Step 210: provide voice response based on the determined reply text.
[0143] Specifically, the reply text determined in step 206 or step 208 is converted into voice, and the answer voice obtained after the voice conversion is played.
[0144] In the above embodiment, a human-computer voice interaction method is provided, which first receives a conversational voice from a user; identifies the voice text corresponding to the conversational voice, performs semantic analysis on the voice text, and identifies the user's interaction demand type based on the result of the semantic analysis; when the interaction demand type is task-related, determines a reply text for responding to the voice text through a task tree model; when the interaction demand type is task-independent, determines a reply text for responding to the voice text through a Bayesian network probability model; and performs a voice response based on the determined reply text.
[0145] Among them, the technical solution of this embodiment uses semantic analysis technology to identify the user's interaction demand type, and divides the user's interaction demand type into two categories: task-related and task-independent. Different methods are used to determine the reply text for answering the voice text according to different types of interaction needs. Among them, when the user's interaction demand type is task-related, that is, facing a chat for the purpose of solving a problem, a targeted reply text can be determined concisely and efficiently through the task tree model; when the user's interaction demand type is task-independent, that is, for a chat initiated for the purpose of emotional companionship, the optimal reply text is determined through the Bayesian network probability model. The optimal reply text has both dialogue extensibility and divergence, is more suitable for the interaction scene, can enhance the dialogue emotion and make the chat easier. In summary, this embodiment can give different personalized replies through different algorithm models for different chat needs, and realize multimodal chat that meets different dialogue needs.
[0146] In the existing human-machine voice dialogue, the machine usually uses a single broadcast sound quality for dialogue, and will not switch to different broadcast sound qualities according to different dialogue users. The single broadcast sound quality is difficult to meet the different interaction needs of users. In view of the above situation, the present invention further provides embodiment 2 based on embodiment 1.
[0147] Embodiment 2
[0148] The human-computer voice interaction method in the above embodiment is as follows: Figure 7 As shown, the following steps are included:
[0149] Step 202: Receive a conversation voice from a user.
[0150] Step 203: Perform voiceprint recognition on the above-mentioned conversation speech, and determine the attribute information of the user based on the result of the voiceprint recognition, where the attribute information is age range and / or gender.
[0151] Step 204 , identifying the speech text corresponding to the conversation speech, performing semantic analysis on the speech text, and identifying the user's interaction demand type based on the result of the semantic analysis.
[0152] Step 206: When the interaction requirement type is task-related, a reply text for responding to the voice text is determined through a task tree model.
[0153] Step 208: When the interaction requirement type is task-independent, a reply text for responding to the voice text is determined through a probability model.
[0154] Step 211, determining the broadcast sound quality type corresponding to the user's attribute information.
[0155] Step 212, generating a response voice according to the broadcast sound quality type and the determined reply text, and playing the response voice.
[0156] Among them, the user attribute information in step 203 can be an age range and / or gender, and the age range of the user in the human-computer voice interaction can be determined by voiceprint recognition. For example, two age ranges can be divided with ten years old as the dividing point, or more age ranges can be divided as needed, and then different broadcast sound qualities can be selected as the sound quality of the response voice according to different age ranges.
[0157] In the above embodiment, the above method determines the attribute information of the user through voiceprint recognition technology, and can give different response voices with different broadcast sound qualities for different users. For example, the broadcast sound quality that different age groups like can be selectively switched for different age groups, realizing the switching of the response sound quality, making the human-computer dialogue experience more intelligent; at the same time, the semantic analysis technology is used to identify the user's interaction demand type, and the user's interaction demand type is divided into task-related and task-independent types. According to different interaction demand types, different methods are used to determine the reply text for answering the voice text. When the user's interaction demand type is task-related, the task tree model is used to efficiently and directly determine the targeted reply text; when the user's interaction demand type is task-independent, the probability model is used to determine the reply text with dialogue extensibility and divergence. In summary, the human-computer voice interaction method provided in this embodiment can give different styles of voice replies for different interaction demand types, and the voice replies can also have different sound qualities according to different user attributes, thereby realizing the multimodality of human-computer interaction, and can fully meet the diverse voice interaction needs of different user groups in human-computer interaction.
[0158] It should be understood that although Figure 2-7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-7At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0159] Embodiment 3
[0160] In this embodiment, a human-computer voice interaction device is provided. Figure 8 As shown, the device comprises:
[0161] The conversation voice receiving module 100 is used to receive the conversation voice from the user.
[0162] The demand type confirmation module 200 is used to identify the speech text corresponding to the conversation speech, perform semantic analysis on the speech text, and identify the user's interaction demand type based on the result of the semantic analysis.
[0163] The task tree reply module 300 is used to determine a reply text for responding to a voice text through a task tree model when the interaction requirement type is task-related.
[0164] The probability model reply module 400 is used to determine a reply text for responding to the voice text through a probability model when the interaction requirement type is task-independent.
[0165] The voice response module 500 is used to make a voice response according to the determined reply text.
[0166] In one embodiment, if Fig. 9 As shown, the device also includes:
[0167] The attribute information determination module 600 is used to perform voiceprint recognition on the above-mentioned conversation speech, and determine the user's attribute information based on the result of the voiceprint recognition, and the attribute information is the age range and / or gender.
[0168] Among them, the voice response module includes:
[0169] The announcement sound quality type determination unit is used to determine the announcement sound quality type corresponding to the user's attribute information.
[0170] The answering voice playing unit is used to generate the answering voice according to the broadcast sound quality type and the determined reply text, and play the answering voice.
[0171] In one embodiment, the requirement type confirmation module is specifically used to determine whether the result of the semantic analysis is related to any preset task scenario among multiple preset task scenarios. When the result of the semantic analysis is related to any preset task scenario, the interaction requirement type is determined to be task-related. When the result of the semantic analysis is not related to any preset task scenario, the interaction requirement type is determined to be task-independent.
[0172] In one embodiment, the probability model response module includes:
[0173] The corpus text acquisition unit is used to acquire multiple corpus texts in a preset corpus, where the multiple corpus texts are all or part of the corpus texts in the preset corpus.
[0174] The probability model calculation unit is used to calculate the reply probability corresponding to each corpus text through the probability model.
[0175] The reply text confirmation unit is used to use the corresponding corpus text with the highest reply probability as the reply text for responding to the voice text.
[0176] In one embodiment, the probability model calculation unit adopts a Bayesian network probability model, which is specifically used to identify the emotion type of the user when speaking the conversation voice, determine the prior probability corresponding to the emotion type through the first prior probability mapping relationship, and use it as the first probability of the Bayesian network probability model. Determine whether any of the corpus texts contains high-frequency words, determine the prior probability corresponding to the judgment result through the second prior probability mapping relationship, and use it as the second probability of the Bayesian network probability model. Identify the topic type to which any of the corpus texts belongs, determine whether the topic type belongs to a preferred topic, determine the prior probability corresponding to the judgment result through the third prior probability mapping relationship, and use it as the third probability of the Bayesian network probability model. Obtain the corpus style type corresponding to any of the corpus texts, determine the prior probability corresponding to the corpus style type and the emotion type through the fourth prior probability mapping relationship, and use it as the fourth probability of the Bayesian network probability model. Calculate the reply probability corresponding to any of the corpus texts based on at least two probabilities among the first probability, the second probability, the third probability, and the fourth probability.
[0177] In one embodiment, the Bayesian network computing unit is more specifically used to obtain an expression image of the user captured by a camera when the user speaks the conversational speech, perform emotion recognition on the expression image, and determine the emotion type of the user when the user speaks the conversational speech based on the result of the emotion recognition; and / or perform emotion recognition on the conversational speech, and determine the emotion type of the user when the user speaks the conversational speech based on the result of the emotion recognition.
[0178] In one embodiment, the device also includes: an update module, used to obtain the number of interactive dialogues with the user in this session; determine whether it is necessary to update the probability value of the current fourth prior probability mapping relationship based on the number of interactive dialogues and the emotion type; when it is determined that an update is required, update the probability value of the current fourth prior probability mapping relationship.
[0179] In one implementation, the updating module is further configured to determine whether the current preferred topic needs to be updated according to the number of interactive dialogues and the emotion type; if it is determined that an update is required, the current preferred topic is updated.
[0180] For the specific definition of the human-computer voice interaction device, please refer to the definition of the human-computer voice interaction method above, which will not be repeated here. Each module in the above-mentioned human-computer voice interaction device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0181] Embodiment 4
[0182] In this embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection.
[0183] When the processor executes the computer program, the steps of a human-computer voice interaction method as described in the first embodiment are implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad, microphone, camera or mouse, etc.
[0184] Those skilled in the art will understand that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0185] Embodiment 5
[0186] In this embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a human-computer voice interaction method introduced in the above-mentioned embodiment 1 are implemented.
[0187] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0188] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0189] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A human-computer voice interaction method, the method comprising: Receiving conversational speech from a user; Identifying the speech text corresponding to the conversation speech, performing semantic analysis on the speech text, and identifying the type of interaction demand of the user based on the result of the semantic analysis; When the interaction requirement type is task-related, determining a reply text for responding to the voice text through a task tree model; When the interaction requirement type is task-independent, it indicates that the user's voice conversation belongs to a pure chat conversation, and a reply text for responding to the voice text is determined by a probability model; The step of determining a reply text for responding to the voice text by using a probability model includes: Acquire multiple corpus texts in a preset corpus, wherein the multiple corpus texts are all or part of the corpus texts in the preset corpus; The reply probability corresponding to each of the corpus texts is calculated by a probability model; the probability model is a Bayesian network probability model; the reply probability corresponding to each of the corpus texts is calculated based on the first probability, the second probability, the third probability and the fourth probability related to the corpus text; the first probability related to each of the corpus texts is the prior probability corresponding to the emotion type of the user when speaking the conversation voice, the second probability is the prior probability corresponding to the judgment result of whether the corpus text contains high-frequency words, the third probability is the prior probability corresponding to the judgment result of whether the topic type of the corpus text belongs to the preferred topic, and the fourth probability is the prior probability corresponding to the corpus style type and the emotion type of the corpus text; The reply probability corresponding to each piece of the corpus text is calculated based on the following formula: P(X)=P(E,D,H,T)=P(E)P(D|E)P(T)P(H) Wherein, P(X) represents the reply probability corresponding to each of the corpus texts, P(E) represents the first probability associated with each of the corpus texts, P(H) represents the second probability associated with each of the corpus texts, P(T) represents the third probability associated with each of the corpus texts, and P(D|E) represents the fourth probability associated with each of the corpus texts; The corpus text with the highest corresponding reply probability is used as the reply text for responding to the voice text; and a voice response is performed according to the determined reply text.
2. The method according to claim 1, characterized in that The method further comprises: Performing voiceprint recognition on the conversation speech, and determining attribute information of the user based on the result of the voiceprint recognition, wherein the attribute information is age range and / or gender; The performing voice response according to the determined reply text includes: Determine the broadcast sound quality type corresponding to the attribute information of the user; A response voice is generated according to the broadcast sound quality type and the determined reply text, and the response voice is played.
3. The method according to claim 1, characterized in that The step of calculating the reply probability corresponding to any of the corpus texts through a probability model comprises: Identifying the emotion type of the user when speaking the conversation speech, determining the prior probability corresponding to the emotion type through a first prior probability mapping relationship, and using the prior probability as the first probability of the Bayesian network probability model; Determine whether any of the corpus texts contains high-frequency words, determine the prior probability corresponding to the determination result through the second prior probability mapping relationship, and use it as the second probability of the Bayesian network probability model; Identify the topic type to which any corpus text belongs, determine whether the topic type belongs to a preferred topic, determine the prior probability corresponding to the judgment result through a third prior probability mapping relationship, and use it as the third probability of the Bayesian network probability model; Obtaining the corpus style type corresponding to any one of the corpus texts, determining the prior probability corresponding to the corpus style type and the emotion type through a fourth prior probability mapping relationship, and using the prior probability as the fourth probability of the Bayesian network probability model; The reply probability corresponding to any one of the corpus texts is calculated according to the first probability, the second probability, the third probability and the fourth probability.
4. The method according to claim 3, characterized in that The identifying the emotion type of the user when speaking the conversation voice includes: Acquire an expression image of the user when speaking the conversation voice, captured by a camera, perform emotion recognition on the expression image, and determine the emotion type of the user when speaking the conversation voice according to a result of the emotion recognition; And / or, emotion recognition is performed on the conversational speech, and the emotion type of the user when speaking the conversational speech is determined according to the result of the emotion recognition.
5. The method according to claim 4, characterized in that Before determining the prior probabilities corresponding to the corpus style type and the emotion type through the fourth prior probability mapping relationship, the method further includes: Obtain the number of interactive dialogues with the user in this session; Determining whether it is necessary to update the probability value of the current fourth priori probability mapping relationship according to the number of interactive dialogues and the emotion type; When it is determined that an update is required, the probability value of the current fourth priori probability mapping relationship is updated.
6. The method according to claim 4, characterized in that Before determining whether the topic type belongs to a preferred topic, the method further includes: determining whether the current preferred topic needs to be updated according to the number of interactive dialogues and the emotion type; and updating the current preferred topic when it is determined that an update is required.
7. A human-computer voice interaction device, characterized in that: The device comprises: A conversation voice receiving module, used for receiving conversation voice from a user; A demand type confirmation module, used to identify the voice text corresponding to the conversation voice, perform semantic analysis on the voice text, and identify the interaction demand type of the user based on the result of the semantic analysis; A task tree reply module, used for determining a reply text for responding to the voice text through a task tree model when the interaction requirement type is task-related; A probability model reply module, used to indicate that the user's voice dialogue belongs to a pure chat dialogue when the interaction requirement type is task-independent, and to determine a reply text for responding to the voice text through a probability model; A voice response module, used for providing voice response according to the determined reply text; The probability model response module includes: A corpus text acquisition unit, used to acquire a plurality of corpus texts in a preset corpus, wherein the plurality of corpus texts are all or part of the corpus texts in the preset corpus; A probability model calculation unit is used to calculate the reply probability corresponding to each of the corpus texts through a probability model; the probability model is a Bayesian network probability model; the reply probability corresponding to each of the corpus texts is calculated based on the first probability, the second probability, the third probability and the fourth probability related to the corpus text; the first probability related to each of the corpus texts is a priori probability corresponding to the emotion type of the user when speaking the dialogue voice, the second probability is a priori probability corresponding to the judgment result of whether the corpus text contains high-frequency words, the third probability is a priori probability corresponding to the judgment result of whether the topic type of the corpus text belongs to a preferred topic, and the fourth probability is a priori probability corresponding to the corpus style type and the emotion type of the corpus text; the reply probability corresponding to each of the corpus texts is calculated based on the following formula: P(X)=P(E,D,H,T)=P(E)P(D|E)P(T)P(H) Wherein, P(X) represents the reply probability corresponding to each of the corpus texts, P(E) represents the first probability associated with each of the corpus texts, P(H) represents the second probability associated with each of the corpus texts, P(T) represents the third probability associated with each of the corpus texts, and P(D|E) represents the fourth probability associated with each of the corpus texts; The reply text confirmation unit is used to use the corresponding corpus text with the highest reply probability as the reply text for responding to the voice text.
8. A computer 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, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
