Conversation generation method of virtual character, computer equipment and storage medium

The context understander and text generator are combined with the knowledge base to generate virtual character dialogues, and the dialogue manager is used to check, which solves the problems of time-consuming and single content of traditional dialogue compilation, realizes personalized and rich dialogue generation, and improves user experience. experience and efficiency.

CN118656455AInactive Publication Date: 2024-09-17YANG ZHOU JIU HE RUAN JIAN XIN XI YOU XIAN GONG SI
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410563858.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2024-09-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional virtual character dialogue compilation is time-consuming and labor-intensive, and the existing automated generated dialogue content is single and lacks personalization and richness.

Method used

Use the context understander to analyze user input, combine the text generator and scene elements in the knowledge base to generate dialogue data, and check it through the dialogue manager to ensure that the dialogue content conforms to the user's intention and emotion, and is personalized and rich.

Benefits of technology

It improves the personalization and richness of virtual character dialogue, reduces the workload of manual editing, and improves the user's human-computer interaction experience and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656455A
    Figure CN118656455A
Patent Text Reader

Abstract

The invention relates to an artificial intelligence technology, and discloses a dialogue generation method of a virtual character, computer equipment and a storage medium. Comprising the steps that after chat input of a user for a virtual character is acquired, chat elements are generated based on analysis of a context understanding device; wherein the chat elements comprise a user intention and a user emotion; based on a text generator, generating corresponding dialogue data by combining related scene elements in a knowledge base on the basis of the chat elements; wherein the scene elements comprise virtual character attributes, virtual scene attributes, scene task information and historical chat records; checking the dialog data based on the dialog manager; if the check is not passed, returning the dialogue data to the text generator for regeneration; and if the check is passed, outputting the dialogue data as a dialogue reply of the virtual character. The invention further discloses a control device. The invention aims to realize personalized generation of the virtual character dialogue and improve the richness of the dialogue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method for generating dialogues of a virtual character, a control device, a computer device, and a computer-readable storage medium. Background Art

[0002] The traditional work of editing dialogues for virtual characters usually needs to be done manually, and the whole process is time-consuming and labor-intensive. Especially when there are a large number of dialogues involved and a large number of virtual characters (such as game NPCs (Non-Player Characters), a general game has multiple game NPCs, which means that manually editing NPC dialogues is a huge workload), the entire dialogue generation process requires a lot of human resources and time costs.

[0003] In view of this, the human-computer interactive dialogue of virtual characters generated intelligently based on artificial intelligence technology can solve this problem well. However, due to the unreasonable design of the model architecture and the overly simple dialogue elements, the dialogue content of virtual characters generated automatically today is still generally simple and lacks personalization and richness.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present application is to provide a method for generating dialogues of virtual characters, a control device, a computer device and a computer-readable storage medium, aiming to realize personalized generation of dialogues of virtual characters and improve the richness of dialogues.

[0006] To achieve the above object, the present application provides a method for generating a dialogue of a virtual character, comprising the following steps: After obtaining the user's chat input for the virtual character, the chat elements are generated based on the context understander analysis; wherein the chat elements include user intention and user emotion; Based on the text generator, on the basis of the chat elements, combined with relevant scene elements in the knowledge base, corresponding dialogue data is generated; wherein the scene elements include virtual character attributes, virtual scene attributes, scene task information and historical chat records; Checking the dialog data based on the dialog manager; If the check fails, the conversation data is returned to the text generator for regeneration; If the check passes, the dialogue data is output as the dialogue response of the virtual character.

[0007] Optionally, the chat input is voice input; The step of generating chat elements based on context understander analysis includes: The context understander converts the voice input into text information based on voice recognition technology, and extracts the corresponding voice intonation; Analyze the text information using natural language understanding technology to obtain user intent; Analyze and generate user emotions based on user intent and voice intonation.

[0008] Optionally, the method for generating a dialogue of a virtual character further includes: Generate voice characteristics of the virtual character according to the attributes of the virtual character; When the virtual character responds to the conversation, the corresponding voice output is generated in combination with the voice characteristics.

[0009] Optionally, the step of generating corresponding dialogue data based on the chat elements and combining relevant scenario elements in the knowledge base by the text generator includes: If there are multiple virtual characters in the current scene, the text generator generates corresponding dialogue data based on the chat elements and the dialogue content of other virtual characters, combined with relevant scene elements in the knowledge base.

[0010] Optionally, the scene elements also include virtual character attributes corresponding to the other virtual characters.

[0011] Optionally, the checking task of the dialog manager includes at least one of the following: Language logic check; Intent match check; Context consistency check.

[0012] Optionally, after the step of checking the dialog data based on the dialog manager, the method further includes: If the intent matching check fails multiple times in the same dialogue generation round, the virtual character is controlled to reply to the user with guiding words to guide the user to re-enter the chat and update the chat elements.

[0013] To achieve the above object, the present application also provides a control device, comprising: An acquisition module, configured to acquire the user's chat input for the virtual character and generate chat elements based on the context understander analysis; wherein the chat elements include user intention and user emotion; A generation module, for generating corresponding dialogue data based on the chat elements and combining relevant scene elements in the knowledge base based on the text generator; wherein the scene elements include virtual character attributes, virtual scene attributes, scene task information and historical chat records; A checking module, for checking the dialog data based on the dialog manager; The return module is used to return the dialogue data to the text generator for regeneration if the check fails; The output module is used to output the dialogue data as the dialogue response of the virtual character if the check is passed.

[0014] To achieve the above-mentioned purpose, the present application also provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the steps of the method for generating a dialogue for a virtual character as described above are implemented.

[0015] To achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for generating a dialogue for a virtual character are implemented.

[0016] The virtual character dialogue generation method, control device, computer equipment and computer-readable storage medium provided in the present application can ensure that the generated dialogue content better caters to the user's intentions and emotions by analyzing user input through a context understander, combining with a text generator, and checking through a dialogue manager; at the same time, by utilizing the scene elements in the knowledge base, the generated dialogue can be made closer to the attributes and scene information of the virtual character, realizing the personalized generation of the virtual character dialogue, and improving the richness of the dialogue, thereby improving the user's human-computer interaction experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a schematic diagram of the steps of a method for generating a dialogue of a virtual character in one embodiment of the present application; Figure 2 This is a schematic diagram of the architecture of a dialogue generation model in one embodiment of the present application; Figure 3 This is a schematic diagram of a control device in an embodiment of the present application; Figure 4 A schematic diagram of the internal structure of a computer device according to an embodiment of the present application.

[0018] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0019] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0020] In addition, if the descriptions of "first", "second", etc. are involved in this application, they are only used for descriptive purposes (such as for distinguishing the same or similar features), and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0021] Reference Figure 1 In one embodiment, the method for generating a dialogue of a virtual character includes: Step S10: after obtaining the user's chat input for the virtual character, generate chat elements based on the context understander analysis; wherein the chat elements include user intention and user emotion; Step S20: Based on the chat elements, the text generator generates corresponding dialogue data in combination with relevant scene elements in the knowledge base; wherein the scene elements include virtual character attributes, virtual scene attributes, scene task information and historical chat records; Step S30, checking the dialogue data based on the dialogue manager; Step S40: If the check fails, the conversation data is returned to the text generator for regeneration; Step S50: If the check passes, the dialogue data is output as the dialogue reply of the virtual character.

[0022] In this embodiment, refer to Figure 2 , based on artificial intelligence technology, using context understander, text generator, knowledge base and dialogue manager, to build an interactive dialogue generation model for virtual characters.

[0023] The context understander is used to analyze the user's chat input to the virtual character and extract chat elements such as user intention and emotion. The role of this module is to help the system understand user input more accurately and provide a basis for the subsequent generation of dialogue data.

[0024] The text generator generates personalized conversation content that conforms to the virtual character's attributes and scene elements based on the chat elements extracted by the context understander and the relevant scene elements in the knowledge base.

[0025] The knowledge base is responsible for storing and updating relevant scene elements such as virtual character attributes, virtual scene attributes, scene task information, and historical chat records, and is called upon by the text generator when needed.

[0026] The dialogue manager is responsible for checking and maintaining the generated dialogue data to ensure the quality and accuracy of the dialogue content. If the dialogue data does not meet the requirements, it will be returned to the text generator for regeneration; if it passes the inspection, the dialogue data will be output as the dialogue response of the virtual character.

[0027] Optionally, the execution terminal of the embodiment may be a computer device that is loaded with or can call the above-mentioned dialogue generation model, or may be other equipment or devices (such as a control device) that controls the computer device.

[0028] As described in step S10, when the system obtains the user's chat input for the virtual character, the context understander will first analyze it to extract chat elements such as user intention and user emotion. User intention refers to the purpose or behavior that the user wants to express or achieve, while user emotion refers to the emotion or emotional tendency shown by the user in the communication. By analyzing these chat elements, the system can better understand the user's intention and emotion, thereby providing a basis for subsequent dialogue generation and output.

[0029] Specifically, the context understander can analyze and parse user input through natural language processing technology, identify keywords, sentence structure and semantic information to determine the user's intention and emotion. For example, when a user inputs "I feel very depressed, can I talk to you?", the context understander can analyze that the user's emotion is depression, and the intention is to seek comfort or talk. Such analysis can provide relevant chat elements for the subsequent text generator, thereby generating conversation content that is more in line with user needs and emotions.

[0030] In general, the role of the context understander is to extract chat elements such as user intent and user emotion through analysis and understanding of user input, providing an accurate basis for subsequent dialogue generation and output. This helps to improve the accuracy and personalization of virtual character dialogue generation, thereby improving user experience.

[0031] As described in step S20, after the context understander extracts chat elements such as user intention and user emotion, the text generator will generate corresponding dialogue data based on these chat elements and relevant scene elements in the knowledge base. These scene elements include virtual character attributes, virtual scene attributes, scene task information, and historical chat records.

[0032] Optionally, virtual character attributes refer to role attributes set for the virtual character in the system, such as personality, preferences, characteristics, etc. These attributes will affect the performance and response content of the virtual character in the conversation.

[0033] Optionally, virtual scene attributes refer to the background setting in which the conversation takes place, such as the time, location, atmosphere, etc. These attributes will affect the context and emotional expression of the conversation content.

[0034] Optionally, the scene task information refers to the tasks or goals that the virtual character or user needs to complete in the conversation, which can help the system generate task-related conversation content. Of course, if it is detected that the current task has been completed, or there is no task to be completed, the scene task information may no longer be obtained.

[0035] Optionally, historical chat records are used to review and refer to previous conversations to ensure the coherence and continuity of newly generated conversations with historical conversations.

[0036] Optionally, based on these scene elements, the text generator can generate personalized dialogue content that conforms to the virtual character's attributes and scene elements. For example, if the virtual character is an optimistic and cheerful character, and the scene requires a sunny resort, the text generator can generate some optimistic and cheerful dialogue content to meet these setting requirements.

[0037] In general, the role of the text generator is to generate corresponding personalized dialogue content based on chat elements such as user intention and emotion combined with relevant scene elements to improve the quality and personalization of virtual character dialogue. By making reasonable use of scene elements and historical chat records in the knowledge base, the text generator can generate dialogue content that better meets user needs and situations, providing a better interactive experience.

[0038] The knowledge base plays an important role in storing and updating relevant scene elements such as virtual character attributes, virtual scene attributes, scene task information, and historical chat records. These scene elements affect the performance of virtual characters, dialogue content, and interactive experience.

[0039] Taking the virtual character as the game NPC as an example, the knowledge base needs to build and maintain these scene elements in the game system. The virtual character attributes include the game NPC's personality, preferences, characteristics and other personalized attributes, which determine the game NPC's performance and response methods in the conversation. The virtual scene attributes include the scene's time, location, atmosphere and other environmental elements, as well as props, background and other elements related to the scene. The scene task information includes the tasks, goals or challenges that the game NPC or player needs to complete. This information can help the game system generate task-related conversation content. The historical chat record records the content of previous conversations with the game NPC, which is used for reference and to ensure the coherence and logic of subsequent conversation content.

[0040] When the text generator needs to call scene elements in the knowledge base, it will obtain relevant information based on the current scene and user input. For example, when a player is talking to a game NPC, the text generator can obtain corresponding data from the knowledge base based on the current virtual scene attributes and virtual character attributes to generate dialogue content that meets the actual situation and requirements. If the player proposes a task or request, the text generator can also generate corresponding dialogue responses based on the scene task information in the knowledge base.

[0041] The role of the knowledge base is to provide the relevant information required by the text generator, helping the system to generate more interactive and communicative dialogue content, and providing players with a richer and more vivid gaming experience.

[0042] As described in step S30, the dialogue manager is responsible for reviewing and testing the generated dialogue data to ensure that the dialogue content meets expectations and specifications while maintaining the logic and coherence of the dialogue.

[0043] Optionally, the dialogue manager will perform semantic and grammatical analysis on the generated dialogue data to ensure the logic and accuracy of the dialogue content. It will check whether there are any ambiguities or misunderstandings in the dialogue, identify and correct the content that does not conform to the semantic logic, and ensure the consistency and fluency of the dialogue.

[0044] Optionally, the dialogue manager will also match and merge the context based on the previous interaction history between the user and the avatar. By analyzing and comparing historical dialogue records, the dialogue manager can ensure that the newly generated dialogue content echoes the previous dialogue content, maintaining the coherence and consistency of the dialogue.

[0045] Optionally, the dialogue manager will also evaluate and filter the generated dialogue data according to the specified dialogue strategies and requirements. It can assess the quality, appropriateness and effectiveness of the dialogue content according to the set standards and rules to ensure that the generated dialogue content meets the expected standards and requirements.

[0046] During the dialogue generation process, the dialogue manager reviews, detects and evaluates the dialogue data. It can ensure that the generated dialogue content is of high quality, clear logic, coherence and fluency, thereby improving the accuracy and personalization of the virtual character dialogue generation and providing users with a better and more interactive experience.

[0047] As described in step S40, when the dialog manager checks and finds that the dialog data does not meet expectations or specifications, it will feed back the data to the text generator, requiring the dialog content to be regenerated. The text generator will adjust and modify according to the feedback information of the dialog manager to ensure that the regenerated dialog data meets the specification requirements.

[0048] In the process of regenerating the dialogue data, the text generator will make adjustments based on the specific suggestions or requirements provided by the dialogue manager, such as modifying semantic expressions, correcting logical errors, adjusting emotional expressions, etc. That is, the text generator will regenerate the dialogue content based on these feedback information until the dialogue manager confirms that the generated dialogue data meets the requirements.

[0049] By collaborating and interacting with the dialogue manager, the text generator can continuously improve and enhance the quality and accuracy of the generated dialogue data. For some complex or special situations, regenerating dialogue data is an important means to ensure the quality and overall effect of the dialogue content, so as to ensure that the virtual character dialogue generation system provides users with a satisfactory interactive experience.

[0050] As described in step S50, when the dialogue manager checks and confirms that the dialogue data meets the expected requirements, the dialogue data will be output as the dialogue response of the virtual character. This means that the generated dialogue content will be used for the performance and response of the virtual character when interacting with the player.

[0051] These outputted dialogue replies can include responses from the avatar to questions or requests from the user, or dialogue content initiated by the avatar. These dialogue replies will directly affect the interactive experience and emotional communication between the player and the avatar. By outputting expected dialogue content, the avatar can show more personalized, intelligent, and rich dialogue performance, thus providing players with a more vivid and interesting gaming experience.

[0052] This effective output process can effectively improve the interactivity and authenticity of virtual characters, especially for the generation of interactive dialogues of game NPCs, which can make players more immersed in the game world and enjoy a richer and more interesting gaming experience.

[0053] In one embodiment, by analyzing user input through a context understander, generating dialogue data in combination with a text generator, and checking it through a dialogue manager, it can be ensured that the generated dialogue content is more in line with the user's intentions and emotions; at the same time, by utilizing scene elements in the knowledge base, the generated dialogue can be made closer to the attributes and scene information of the virtual character, realizing personalized generation of virtual character dialogues, and improving the richness of dialogues, thereby improving the user's human-computer interaction experience.

[0054] Moreover, the automated design of the entire process can greatly reduce the workload of manual dialogue compilation, thereby improving the efficiency of generating interactive dialogues of virtual characters and reducing the cost of dialogue generation.

[0055] In one embodiment, based on the above embodiment, the chat input is voice input; The step of generating chat elements based on context understander analysis includes: The context understander converts the voice input into text information based on voice recognition technology, and extracts the corresponding voice intonation; Analyze the text information using natural language understanding technology to obtain user intent; Analyze and generate user emotions based on user intent and voice intonation.

[0056] In this embodiment, the context understander first converts the user's voice input into text information based on speech recognition technology, so that the system can obtain the actual words spoken by the user.

[0057] In addition to text information, the context understander also extracts the corresponding voice intonation information. Voice intonation can contain information such as the user's emotions, tone, and attitude, which plays an important role in accurately understanding the user's intentions and emotions.

[0058] After obtaining the text information, the context understander will use natural language understanding technology to analyze the text information to identify the user's intention. By understanding the content of the user's input, the system can better understand the user's needs and information.

[0059] Among them, the context understander will perform grammatical analysis on the text information to identify the sentence structure, vocabulary collocation, and the relationship between sentences. By analyzing the grammatical structure of the sentence, the system can better understand the meaning of the sentence and perform entity recognition, that is, identifying entity information such as people, places, and time in the text, helping the system to extract key information and better understand the focus of user attention. In this way, by analyzing the keywords and context in the text content, the system can accurately identify the user's intention, that is, the purpose and needs that the user wants to express.

[0060] At the same time, the system will perform sentiment analysis based on user intentions and voice intonation information, that is, determine the user's emotional tendencies and emotional states. For example, sentiment recognition technology can be used to comprehensively analyze the user's voice intonation, vocabulary selection, language style, etc., so as to accurately determine the user's emotional tendencies, such as joy, anger, sadness, and happiness. By identifying user emotions, the system can better respond to the user's emotional needs and provide targeted responses and interactions.

[0061] In this way, the process of generating chat elements based on the analysis of the context understander can more comprehensively understand the user's input content and generate corresponding context and emotional information, thereby better achieving communication and interaction with the user.

[0062] In one embodiment, based on the above embodiment, the method for generating a dialogue of a virtual character further includes: Generate voice characteristics of the virtual character according to the attributes of the virtual character; When the virtual character responds to the conversation, the corresponding voice output is generated in combination with the voice characteristics.

[0063] In this embodiment, the virtual character attributes may include personality traits, age characteristics, personality traits, emotional state, etc.

[0064] Optionally, the gender of the avatar is an important factor in determining its voice characteristics. Generally speaking, there are obvious differences between men and women in the pitch, timbre, and speed of speech. According to the gender attributes of the avatar, the masculine or feminine characteristics of the voice can be adjusted to make it more consistent with the gender characteristics of the avatar.

[0065] Optionally, the age of the avatar is also one of the important factors affecting the voice characteristics. People of different ages have obvious differences in voice characteristics, such as young people speak faster and with higher pitch, while the opposite is true for the elderly. According to the age attribute of the avatar, the voice pitch, speed, and fluency of the voice can be adjusted.

[0066] Optionally, the character's personality traits may also affect the characteristics of the voice. For example, an extroverted and cheerful character may speak faster and with a higher pitch, while an introverted and serious character may speak slower and with a lower pitch. The tone, rhythm, and emotional expression of the voice may be adjusted according to the character's personality traits.

[0067] Optionally, the voice characteristics of the avatar may change when the avatar is in different emotional states. For example, in a happy mood, the voice may be more lively and lively, while in a sad mood, the voice may be more deep and melancholy. Depending on the emotional state of the avatar, the voice characteristics such as pitch, tone and rhythm may be adjusted.

[0068] In summary, according to the gender, age, personality characteristics and emotional expression of the virtual character, corresponding voice characteristics can be generated, making the voice of the virtual character closer to its attribute characteristics and enhancing the realism and personalization of the virtual character. Therefore, through speech synthesis technology, corresponding voice characteristics can be generated according to the attributes and characteristics of the virtual character, including pitch, speaking speed, voice style, etc.

[0069] When the virtual character responds to a conversation, the corresponding voice output is generated in combination with the voice characteristics. By combining the voice characteristics of the virtual character with the conversation content, the virtual character's response can be made more vivid, natural, and more in line with the virtual character's attributes and personality.

[0070] In general, generating voice features based on the attributes of the virtual character and integrating voice features into the dialogue response can enhance the sense of immersion and interactive experience of the virtual character, making the entire dialogue process more vivid and interesting. The application of this method helps to enhance the personalized performance of the virtual character and improve the user experience and interactive effect.

[0071] In one embodiment, based on the above embodiment, the step of generating corresponding dialogue data based on the text generator based on the chat elements and combining relevant scene elements in the knowledge base includes: If there are multiple virtual characters in the current scene, the text generator generates corresponding dialogue data based on the chat elements and the dialogue content of other virtual characters, combined with relevant scene elements in the knowledge base.

[0072] In this embodiment, if there are multiple virtual characters in the current scene, the system will also collect the conversation content of the multiple virtual characters in the current scene, including their conversation elements and emotional expressions. This can be historical conversation records, current conversation content and other information.

[0073] Then, when it is time to generate conversation data, the text generator will combine the user's chat elements with the conversation content of other virtual characters to form a comprehensive conversation scenario. This helps to consider the interactive relationships and emotional expressions between multiple virtual characters.

[0074] On this basis, based on relevant scene elements such as virtual character attributes, virtual scene attributes, scene task information, historical dialogue records, and combined with the dialogue content of multiple virtual characters, dialogue data that meets the needs of the current situation is generated.

[0075] Optionally, the scene elements also include virtual character attributes corresponding to the other virtual characters.

[0076] When dealing with complex virtual scenes, scene elements are not limited to the attributes of the current virtual character, but also include the corresponding virtual character attributes of other virtual characters. This means that the text generator needs to take into account the relationship, personality, goals and other attribute information between multiple virtual characters when generating dialogue data to better simulate real interpersonal interaction situations.

[0077] Optionally, when generating dialogue data by combining scene elements in the knowledge base, the following steps may be further included: (1) Obtaining attribute information of multiple virtual characters: In addition to the content of the dialogue, the text generator also needs to obtain attribute information of other virtual characters, such as personality traits, professional background, motivations and goals, etc. This helps to better understand the behavioral decisions and emotional expressions of the virtual characters.

[0078] (2) Comprehensively consider the attributes and characteristics of multiple virtual characters: When generating dialogue data, in addition to considering the attributes of the current scene, it is also necessary to comprehensively consider the attributes and characteristics of multiple virtual characters in order to generate dialogue content that is more in line with the personality and goals of each virtual character.

[0079] (3) Generate dialogue content based on virtual character attributes: Based on the virtual character attribute information stored in the knowledge base, combined with chat elements and dialogue content of other virtual characters, generate dialogue data with personalization and emotional expression.

[0080] (4) Adjusting conversation data based on situational requirements: After generating conversation data, it is necessary to make appropriate adjustments based on the overall situation and user needs to ensure the logic and rationality of the conversation content.

[0081] By comprehensively considering the attribute information of multiple virtual characters, the interactive relationship and emotional expression in multi-person situations can be better simulated when generating dialogue data, providing users with a more realistic and rich virtual interactive experience. This will help improve the interactivity and fun of the game and enhance the user's sense of participation and immersion.

[0082] In one embodiment, based on the above embodiment, the checking task of the dialog manager includes at least one of the following: Language logic check; Intent match check; Context consistency check.

[0083] In this embodiment, the language logic check is used to ensure that the generated dialogue content complies with grammatical rules, semantic logic and consistency of language expression, and avoid language errors or incoherence.

[0084] The dialogue manager will check whether the generated dialogue content conforms to grammatical rules, including sentence structure, word collocation, etc., to ensure that the dialogue content conforms to the basic norms of language expression. The dialogue manager will also analyze the semantic logic of the dialogue content to ensure the coherence of logical reasoning and semantic expression, and avoid contradictions or unreasonable situations.

[0085] Intent matching check is used to ensure that the conversation data matches the user's intent and goals by analyzing the information in the conversation content and matching it with known intent and task goals.

[0086] The dialogue manager identifies and analyzes the user intent and the avatar intent contained in the generated dialogue content to ensure that the dialogue content matches the expected intent and goal. By comparing the known intent and task goals, the dialogue manager can evaluate whether the dialogue content matches them, thereby ensuring the rationality and consistency of the dialogue content.

[0087] Context consistency check is used to ensure that the generated dialogue content remains consistent throughout the entire dialogue process, avoid contradictions or inconsistencies with the previous text, and ensure that the dialogue content is smooth and logically clear.

[0088] The dialogue manager will analyze the relevance of the dialogue content to the previous text to ensure the consistency of information and logic during the dialogue process and avoid inconsistencies or incoherence. By referring to the previous interaction history between the user and the virtual character, the dialogue manager can maintain the coherence of the dialogue content throughout the dialogue process, making the dialogue more fluent and natural.

[0089] Through the above logic checking tasks, the dialogue manager can ensure that the generated dialogue content conforms to the language logic specifications, the consistency of the intended goals, and the coherence of the dialogue process, thereby improving the quality of virtual character dialogue generation and user experience.

[0090] In one embodiment, based on the above embodiment, after the step of checking the dialog data based on the dialog manager, the method further includes: If the intent matching check fails multiple times in the same dialogue generation round, the virtual character is controlled to reply to the user with guiding words to guide the user to re-enter the chat and update the chat elements.

[0091] In this embodiment, if it is detected that the intent matching check fails multiple times (e.g., 3 times) in the current dialogue generation round (i.e., the user's intent cannot be accurately understood or the avatar cannot correctly match the user's needs), the system will control the avatar to encourage the user to re-enter their questions or needs, and provide clearer and more detailed information to help the system better understand the user's intent. For example, "I'm sorry, I don't quite understand what you mean, can you say it again?" or "Please help me better understand your question and describe your needs again."

[0092] Once the user provides new input or information, the system will update the chat elements in the conversation data based on the new content, including user intent, task goals, etc., in order to respond to user needs more accurately.

[0093] In this way, by guiding users to re-enter information and update chat elements to resolve multiple failed intent matching checks, the matching degree and accuracy of the conversation content can be improved, and the interaction effect between the virtual character and the user can be enhanced. This helps to improve the user experience, enhance the quality of conversation generation, and promote more effective information transmission and communication.

[0094] In addition, refer to Figure 3 In an embodiment of the present application, a control device Z10 is further provided, comprising: The acquisition module Z11 is used to acquire the user's chat input for the virtual character and generate chat elements based on the context understander analysis; wherein the chat elements include user intention and user emotion; A generation module Z12 is used to generate corresponding dialogue data based on the chat elements and the relevant scene elements in the knowledge base based on the text generator; wherein the scene elements include virtual character attributes, virtual scene attributes, scene task information and historical chat records; A checking module Z13, for checking the dialog data based on the dialog manager; Return module Z14, used to return the dialogue data to the text generator for regeneration if the check fails; The output module Z15 is used to output the dialogue data as the dialogue response of the virtual character if the check is passed.

[0095] Optionally, the control device Z10 may be a virtual control device (such as a virtual machine) or a physical device (such as a physical device other than a computer device that can execute the corresponding method).

[0096] In addition, a computer device is also provided in an embodiment of the present application. The internal architecture of the computer device can be as follows: Figure 4As shown, it includes a processor, a memory, a communication interface and an input interface connected by a system bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database is used to store data called by the computer program. The communication interface is used to communicate data with an external terminal. The input interface is used to receive a signal input by an external device. When the computer program is executed by the processor, a method for generating a dialogue of a virtual character as described in the above embodiment is implemented.

[0097] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. For example, in some optional embodiments, the computer device may also include an output interface (not shown in the figure), and the output interface is also connected to the system bus and is used to output corresponding signals to the peripheral device.

[0098] In addition, the present application also proposes a computer-readable storage medium, the computer-readable storage medium including a computer program, and the computer program, when executed by a processor, implements the steps of the method for generating a dialogue of a virtual character as described in the above embodiment. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0099] In summary, the virtual character dialogue generation method, control device, computer equipment and computer-readable storage medium provided in the embodiments of the present application analyze user input through a context understander, generate dialogue data in combination with a text generator, and check it through a dialogue manager, so as to ensure that the generated dialogue content is more in line with the user's intentions and emotions; at the same time, by utilizing the scene elements in the knowledge base, the generated dialogue can be made closer to the attributes and scene information of the virtual character, realize the personalized generation of the virtual character dialogue, and improve the richness of the dialogue, thereby improving the user's human-computer interaction experience.

[0100] Those of ordinary skill 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 provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of 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 (SSRSDRAM), 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), etc.

[0101] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0102] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for generating a dialogue of a virtual character, characterized in that: include: After obtaining the user's chat input for the virtual character, the chat elements are generated based on the context understander analysis; wherein the chat elements include user intention and user emotion; Based on the text generator, on the basis of the chat elements, combined with relevant scene elements in the knowledge base, corresponding dialogue data is generated; wherein the scene elements include virtual character attributes, virtual scene attributes, scene task information and historical chat records; Checking the dialog data based on the dialog manager; If the check fails, the conversation data is returned to the text generator for regeneration; If the check passes, the dialogue data is output as the dialogue response of the virtual character.

2. The method for generating a dialogue of a virtual character according to claim 1, wherein: The chat input is voice input; The step of generating chat elements based on context understander analysis includes: The context understander converts the voice input into text information based on voice recognition technology, and extracts the corresponding voice intonation; Analyze the text information using natural language understanding technology to obtain user intent; Analyze and generate user emotions based on user intent and voice intonation.

3. The method for generating a dialogue of a virtual character according to claim 1 or 2, wherein: The method for generating a dialogue of a virtual character further includes: Generate voice characteristics of the virtual character according to the attributes of the virtual character; When the virtual character responds to the conversation, the corresponding voice output is generated in combination with the voice characteristics.

4. The method for generating a dialogue of a virtual character according to claim 1, wherein: The step of generating corresponding dialogue data based on the chat elements and combining relevant scene elements in the knowledge base by the text generator includes: If there are multiple virtual characters in the current scene, the text generator generates corresponding dialogue data based on the chat elements and the dialogue content of other virtual characters, combined with relevant scene elements in the knowledge base.

5. The method for generating a dialogue of a virtual character according to claim 4, wherein: The scene elements also include virtual character attributes corresponding to the other virtual characters.

6. The method for generating a dialogue of a virtual character according to claim 1, wherein: The checking task of the dialog manager includes at least one of the following: Language logic check; Intent match check; Context consistency check.

7. The method for generating a dialogue of a virtual character according to claim 6, wherein: After the step of checking the dialog data based on the dialog manager, the method further includes: If the intent matching check fails multiple times in the same dialogue generation round, the virtual character is controlled to reply to the user with guiding words to guide the user to re-enter the chat and update the chat elements.

8. A control device, characterized in that: include: An acquisition module, configured to acquire the user's chat input for the virtual character and generate chat elements based on the context understander analysis; wherein the chat elements include user intention and user emotion; A generation module, for generating corresponding dialogue data based on the chat elements and combining relevant scene elements in the knowledge base based on the text generator; wherein the scene elements include virtual character attributes, virtual scene attributes, scene task information and historical chat records; A checking module, for checking the dialog data based on the dialog manager; The return module is used to return the dialogue data to the text generator for regeneration if the check fails; The output module is used to output the dialogue data as the dialogue response of the virtual character if the check is passed.

9. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the method for generating a dialogue for a virtual character as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for generating a dialogue for a virtual character according to any one of claims 1 to 7.

Citation Information

Cited By

  • Chat topic guiding method and device, equipment and medium

    CN120567820A

  • Virtual human evolution system based on ai learning observation and method thereof

    TWI918218B

  • Method, system and electronic device for massage device control based on AI virtual characters

    US12667514B1

  • Dialogue processing method and apparatus, computing device, and storage medium

    WO2026194401A1