Multi-role interaction method and device
By introducing a multi-role interaction method, allowing multiple interactive characters to interact with virtual characters and determining the interaction results, the problem of a single interactive scenario of the existing large language model is solved, and a richer and more diverse user interaction experience is achieved.
Patent Information
- Application Number
- CN202411609872.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-12
AI Technical Summary
The interactive scenarios of existing large language models are single, and the interaction between users and models is limited to a single user, resulting in a single model function and applicable scenario, unable to fully utilize the model's capabilities, lack of interesting and competitive interactive experience, and unable to meet the current interactive needs.
A multi-character interaction method is introduced, allowing multiple interactive characters to interact with the same virtual character, and enriching the character interaction scenarios and experiences by determining the interaction results between each interactive character and the virtual character.
Through the multi-role interaction method, we can improve the enthusiasm of user participation and enrich the interactive experience. It is suitable for interactive scenarios with multiple people participating to meet the current complex and diverse interactive needs.
Smart Images

Figure CN119476348A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a multi-role interaction method and device. Background Art
[0002] In the existing interactive scenarios of large language models, only a single user can interact with the model on the same interactive page, which makes the functions and applicable scenarios of existing large language models single, the model capabilities cannot be fully utilized, and there is a lack of interesting and competitive interactive experience, which cannot meet current interactive needs. Summary of the invention
[0003] In view of this, the purpose of this application is to provide a multi-role interaction method and device, introduce a way for multiple interactive characters to interact with the same virtual character, and determine the interaction results between each interactive character and the virtual character. In this way, it is possible to enrich the role interaction scene and interactive experience, improve the enthusiasm of user participation, and is suitable for interactive scenes involving multiple people.
[0004] The embodiment of the present application provides a multi-role interaction method, wherein the multi-role interaction includes interaction between at least one virtual character and at least two interactive characters; the method includes:
[0005] In response to a user's request to create the multi-role interaction, determining an interaction prompt word; wherein the interaction prompt word is used to determine the interaction content of the multi-role interaction;
[0006] Based on the interactive prompt words, the virtual character is generated; wherein the virtual character serves as an interactive object of the interactive character;
[0007] In response to a user's interaction request to start the multi-role interaction, determining the interactive roles, and starting the multi-role interaction; wherein the interactive roles include at least one user role operated by the user;
[0008] Based on the interaction information generated in the multi-role interaction and the interaction prompt words, the interaction result between each interactive role and the virtual role is determined.
[0009] Furthermore, in response to the user's request to create the multi-role interaction, determining the interaction prompt words includes:
[0010] Determining the interactive prompt word according to the interactive information input by the user in the creation request;
[0011] Alternatively, in response to the creation request, a preset prompt word template is displayed; and the interactive prompt word is generated according to the prompt word template;
[0012] Alternatively, according to the interactive keywords input by the user in the creation request, a pre-trained large language model is used to generate a prompt word template; according to the prompt word template, the interactive prompt word is generated;
[0013] Alternatively, in response to the creation request, current network hot words are obtained; a prompt word template is generated based on the current network hot words using a large language model; and the interactive prompt word is generated according to the prompt word template.
[0014] Furthermore, generating the interactive prompt word according to the prompt word template includes:
[0015] In response to a user's confirmation operation on the prompt word template, determining the prompt word template as the interactive prompt word;
[0016] Alternatively, in response to a configuration operation of the prompt word template by the user, the prompt word template is modified, and the modified prompt word template is determined as the interactive prompt word.
[0017] Furthermore, in response to the user's request to start the multi-role interaction, determining the interactive role includes:
[0018] In response to a first user's interaction request to start the multi-role interaction, creating a first user role and interaction invitation information corresponding to the first user;
[0019] Sharing the interaction invitation information with other users according to the interaction participation mode determined by the first user;
[0020] In response to confirmation operations of the second users on the received interaction invitation information, second user roles corresponding to the second users are created respectively.
[0021] Furthermore, in response to the user's request to start the multi-role interaction, determining the interactive role also includes:
[0022] In response to a first user's interaction request to start the multi-role interaction, determining a target number of the interactive roles;
[0023] A corresponding number of virtual user roles are created according to the difference between the target number and the number of created user roles.
[0024] Furthermore, the step of determining the interaction result between each interactive character and the virtual character based on the interaction information and the interaction prompt words generated in the multi-character interaction includes:
[0025] For each interactive character, extracting interactive information generated when the virtual character interacts with the interactive character;
[0026] According to the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words, the interactive performance of the interactive character is determined and used as the interactive result between the interactive character and the virtual character.
[0027] Furthermore, determining the interactive performance between the interactive character and the virtual character according to the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words includes:
[0028] Sending the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words to the first language model in real time, and determining the interactive performance between the interactive character and the virtual character by the first language model;
[0029] And / or, in response to a request to end the interaction or the interaction meets a preset condition, all interaction information generated when interacting with the interactive character and the interaction rules included in the interaction prompt words are sent to the first language model, and the first language model determines the interaction performance between the interactive character and the virtual character.
[0030] Furthermore, the multi-role interaction includes at least one round of role interaction between the virtual character and each interactive character; the method further includes generating interaction information in the multi-role interaction by:
[0031] For any interactive role in any round of role interaction, obtain the current round of interactive dialogue sent by the interactive role to the virtual role;
[0032] The virtual character generates a feedback dialogue for the interactive character based on the current round of interactive dialogue and the historical interactive dialogue.
[0033] Furthermore, generating the virtual character based on the interactive prompt word includes:
[0034] The virtual character is generated based on the interaction prompt words using a pre-trained second language model; wherein the interaction prompt words are related to at least one of the following items: an interaction scene, an interaction task, and an interaction rule.
[0035] The embodiment of the present application further provides a multi-role interaction device, wherein the multi-role interaction includes interaction between at least one virtual character and at least two interactive characters; the device includes:
[0036] A prompt word determination module, used to determine an interaction prompt word in response to a user's creation request for creating the multi-role interaction; wherein the interaction prompt word is used to determine the interaction content of the multi-role interaction;
[0037] A generating module, used for generating the virtual character based on the interactive prompt words; wherein the virtual character serves as an interactive object of the interactive character;
[0038] A role determination module, configured to respond to a user's interaction request to start the multi-role interaction, determine the interactive role, and start the multi-role interaction; wherein the interactive role includes at least one user role operated by the user;
[0039] The result determination module is used to determine the interaction result between each interactive role and the virtual role based on the interaction information generated in the multi-role interaction and the interaction prompt words.
[0040] An embodiment of the present application also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the multi-role interaction method as described above are performed.
[0041] An embodiment of the present application further 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 multi-role interaction method as described above are executed.
[0042] The embodiment of the present application provides a multi-role interaction method and device, which introduces a way for multiple interactive characters to interact with the same virtual character, and determines the interaction result between each interactive character and the virtual character. In this way, it can enrich the role interaction scene and interactive experience, improve the enthusiasm of user participation, and is suitable for interactive scenes involving multiple people.
[0043] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A flowchart of a multi-role interaction method provided in an embodiment of the present application is shown;
[0046] Figure 2 A schematic diagram of the structure of a multi-role interaction device provided in an embodiment of the present application is shown;
[0047] Figure 3 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0048] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0049] Research has found that in the existing interactive scenarios of large language models, only a single user can interact with the model on the same interactive page, which makes the functions and applicable scenarios of the existing large language models single, the model capabilities cannot be fully utilized, and there is a lack of interesting and competitive interactive experience, which cannot meet current interactive needs.
[0050] Based on this, the embodiment of the present application provides a multi-role interaction method, which introduces a way for multiple interactive roles to interact with the same virtual role, and determines the interaction results between each interactive role and the virtual role. In this way, it can enrich the role interaction scene and interactive experience, improve the enthusiasm of user participation, and is suitable for interactive scenes involving multiple people.
[0051] See also Figure 1 , Figure 1 A flowchart of a multi-role interaction method provided in an embodiment of the present application. The multi-role interaction in the embodiment of the present application includes at least three roles, and the roles can be set according to different implementation environments. More specifically, the multi-role interaction includes interaction between at least one virtual role and at least two interactive roles. Here, a virtual role refers to an artificial intelligence-driven virtual robot, which plays a specific role and interacts with an interactive role; the interactive role includes at least one real user role operated by a user, and may also include other virtual characters. The interaction can include a variety of methods, such as voice dialogue interaction, text dialogue interaction, and providing the image of a virtual character for action interaction.
[0052] Taking text dialogue interaction as an example, different characters can form dialogue interaction by speaking alternately; virtual characters can simulate human dialogue, provide information, entertainment or assist users in completing various tasks. These virtual characters are usually based on natural language processing (NLP) technology, which can understand user language and generate human language, so as to interact with users. In specific implementation, the multi-role interaction method provided in the embodiment of the present application can be executed based on terminal devices, cloud interaction systems, etc. Among them, the terminal device can be a local electronic device that has downloaded and can run an intelligent dialogue program, such as a smart phone, a personal computer, a tablet computer, etc. Taking a multi-role interaction system as an example, a local electronic device is equipped with a multi-role interaction system and used to present a dialogue interface. The multi-role interaction system carried in the local electronic device is used to interact with the user through the dialogue interface, that is, the intelligent dialogue program is downloaded and installed by the electronic device and run, the dialogue utterances input by the user through the dialogue interface are received, the reply utterances are generated and fed back to the user through the dialogue interface, thereby realizing multi-role interaction.
[0053] When the multi-role interaction method provided in the embodiment of the present application is applied to a server, the prediction method of the dialogue strategy can also be implemented and executed based on a cloud interaction system, wherein the cloud interaction system may include a server and a client device. In the operation mode of the cloud intelligent dialogue system, the operation subject of the intelligent dialogue program and the presentation subject of the dialogue interface are separated, the storage and operation of the multi-role interaction method are completed on the cloud intelligent dialogue system server, and the client device is used for receiving and sending dialogue discourse and presenting the dialogue interface. For example, the client device can be a display device with data transmission function close to the user side, such as a smart phone, a personal computer, a tablet computer, etc.
[0054] like Figure 1 As shown in , the multi-role interaction method provided by the embodiment of the present application includes:
[0055] S101: In response to a user's request to create the multi-role interaction, determine an interaction prompt word.
[0056] The interactive prompt is used to determine the interactive content of the multi-role interaction. More specifically, the interactive prompt may be related to at least one of the following: interactive scene, interactive task and interactive rule. The interactive scene refers to the context setting for the interaction between characters, such as a debate on a certain point of view, a simulated multi-person interview, a bragging competition, a confrontation competition, a humor competition and a speech competition; the interactive task refers to the goal that the user hopes to achieve in the interaction; the interactive rule refers to the behavioral guidance of the character and the criteria for judging the interactive results.
[0057] In one example, the interactive scenario is: character A is suppressed by character B everywhere in his workplace life, so character A decides to fight back against character B in a certain scenario, and invites character C to fight back against character B together. The interactive task is: character A and character C irritate character B in the shortest time, or whose speech can cause the highest anger value of character B, etc. The interactive rule is: in the process of character A and character C interacting with character B, whoever can increase the anger value of character B will get points, the more the anger value increases, the more points will be added, and the lower the anger value, the less points will be deducted; and the interactive rules can also include that each character can only speak one or a few sentences to character B in each round of dialogue, or there is no limit on the number of interactions for each character, etc.
[0058] In this step, the user can trigger a creation request for creating multi-role interaction through voice commands, text commands, etc., and then the system can respond to this creation request and determine the interaction prompt words based on the information contained in the creation request.
[0059] In a possible implementation manner, the method of determining the interactive prompt word in step S101 may include at least one of the following:
[0060] Mode A: determining the interactive prompt word according to the interactive information input by the user in the creation request.
[0061] In this way, the user can trigger a creation request by manually inputting interactive information. The system can extract the interactive information from the creation request and then determine the interactive prompt words by processing the interactive information (such as filtering, word segmentation, etc.).
[0062] Mode B: in response to the creation request, display a preset prompt word template; and generate the interactive prompt word according to the prompt word template.
[0063] In this mode, a plurality of prompt word templates are pre-stored in the system. After receiving a creation request, the plurality of prompt word templates are displayed in a visual interface, and then an interactive prompt word can be generated according to the prompt word template selected by the user.
[0064] Method C: Generate a prompt word template using a pre-trained large language model according to the interactive keyword input by the user in the creation request; and generate the interactive prompt word according to the prompt word template.
[0065] In this way, users can trigger a creation request by manually inputting interactive keywords. The system can extract interactive keywords from the creation request, and then automatically generate adaptive prompt word templates based on interactive keywords by calling the large language model through expansion and other methods; then, interactive prompt words can be generated according to the prompt word template. Among them, the large language model refers to a natural language processing (NLP) model with a very high number of parameters that is trained using a large amount of data. These models can understand and generate human language and perform a variety of tasks such as text generation, translation, summarization, question and answer, and dialogue.
[0066] For example, if the interactive keyword input by the user is "speech contest, rich emotions, the one with the highest score wins", the large language model can expand the interactive keyword and generate a prompt word template with a preset word count interval (this preset word count interval can be determined by the model training effect during the training process, that is, the model training effect can be optimized). Alternatively, for example, if the interactive keyword input by the user is "joke contest", the content input by the user is input into the large language model for automatic generation, and the large model is used to generate at least one prompt word template with a preset word count interval.
[0067] Mode D: in response to the creation request, obtaining current network hot words; using a large language model to generate a prompt word template based on the current network hot words; and generating the interactive prompt word according to the prompt word template.
[0068] In this way, users can indicate their desire to conduct multi-role interactions related to current events through a creation request, and the system can obtain current network hot words based on the creation request. For example, the acquisition method can be to read the hot words in the search rankings of social software. Users can also limit the field, theme, etc. of the current event in the creation request, so that the system can further filter out the current network hot words that meet the user's expected field and theme.
[0069] For example, some key and hot events can be collected in real time or periodically, such as at least one current network hot word such as "XX meeting" as a keyword, and a large language model can be used to automatically generate at least one prompt word template based on the current network hot words, such as "Should a debate on the XX meeting be held?", "N places and M places are applying to host it, who should we support?", etc.
[0070] In this way, the method provided in the embodiment of the present application combines multi-role interaction with real life events, and can provide users with a more interesting and engaging interactive experience by regularly publishing interactive games related to specific moments or events. This is specifically reflected in the following aspects:
[0071] 1. Integrate with current events: Flexibly integrate with current events, such as launching a game to compete for the favorability of the AI God of Wealth on the fifth day of the Chinese New Year. This regularly updated interactive game enables users to better experience and participate in real-life activities through interaction.
[0072] 2. Improved user engagement: By combining with real-life events, users can be motivated to participate in the game more actively. Users will feel closer and more engaged because the game is related to real-life events, which increases user engagement and activity.
[0073] 3. Creators: Users can not only select game prompt templates by themselves, but also batch create interactive game prompt templates related to current events to ensure timely release of interactive games related to current events. This allows creators to respond to changes in current events more flexibly and create more attractive and innovative interactive games.
[0074] Furthermore, in the above-mentioned methods B, C and D, generating the interactive prompt word according to the prompt word template may include:
[0075] In response to the user's confirmation operation on the prompt word template, the prompt word template is determined as the interactive prompt word. At this time, multiple prompt word templates can be provided to the user, and in response to the user's confirmation operation on the prompt word template, the prompt word template selected by the user or the specific prompt word content in the prompt word template is determined as the interactive prompt word.
[0076] Alternatively, in response to the configuration operation of the prompt word template by the user, the prompt word template is modified, and the modified prompt word template is determined as the interactive prompt word. In this case, multiple prompt word templates may be provided to the user, and in response to the configuration operation of the prompt word template by the user, the specific prompt word content in the prompt word template selected by the user is modified and configured, and the modified prompt word template is determined as the interactive prompt word. For example, the user may modify the identity AB of the character to EF, or modify the location of the interactive background to a more familiar location.
[0077] Alternatively, the prompt word template may be directly determined as the interactive prompt word without any user operation. For example, the user directly requests to start a preset interactive topic, and the interactive prompt word collection is completed directly based on the preset prompt word template without user confirmation.
[0078] In this way, the multi-role interaction method in the embodiment of the present application provides a variety of ways to generate interaction prompt words, which helps to generate rich and diverse multi-role interaction scenarios to meet the interaction needs of different users.
[0079] S102: Generate the virtual character based on the interactive prompt word.
[0080] In this step, the pre-trained second language model can be used to train and generate the virtual character based on the interactive prompt words. The specific generation method can refer to the existing technology, and this application does not limit it here.
[0081] Among them, the virtual character, as the interactive object of the interactive character, can make corresponding feedback based on the interactive information sent by the interactive character to the virtual character; the virtual character can also serve as a referee in multi-role interaction, and determine the interaction result according to the interactive information sent by the interactive character to the virtual character and / or the interactive information between the interactive characters. Corresponding to the above example, the character B (corresponding AI virtual character) generated by the second largest language model can be a referee who is familiar with all backgrounds and rules, and can also be an interactive object with character A / C. For example, character B is the object that often suppresses character A and character C in the workplace. In multi-role interaction, character B will still maintain the characteristics of workplace suppression and interact with character A / C, thereby mobilizing the participation enthusiasm and emotions of character A / C and improving the user experience; and then according to the interaction between character A and character C and character B, character B shows the corresponding anger value.
[0082] S103: In response to the user's interaction request to start the multi-role interaction, determine the interactive role and start the multi-role interaction.
[0083] As mentioned above, the multi-role interaction includes at least two interactive roles, wherein the interactive roles include at least one user role operated by a user. In this step, in response to an interactive request from any user to start the multi-role interaction, all interactive roles participating in the multi-role interaction are first determined, and then the multi-role interaction can be started based on the interactive roles and the virtual roles.
[0084] Here, multi-role interaction needs to be carried out in a specific interactive space, such as a group chat in a chat application, or a virtual interactive room created in a dedicated interactive application. The corresponding multi-role interactive space can be opened based on the addition of at least three characters. The multi-role interactive space can be set to allow interaction between the characters, so that there is higher flexibility in multi-role interaction and better user experience; it can also be set to allow only user characters to interact with virtual characters, but the interactive content can be seen by all participating characters, which can reflect the excitement of the competition and also enhance the user experience.
[0085] In the embodiment of the present application, the method of determining the interactive role may include at least one of the following: random matching, user invitation, and virtual role supplementation. Random matching refers to randomly matching other users for the determined user to enter the interactive space for multi-role interaction; user invitation refers to adding other users invited by the determined user to the interactive space for multi-role interaction; virtual role supplementation refers to adding virtual characters as interactive roles to accompany the determined user to join the interactive space for multi-role interaction.
[0086] In a possible implementation, step S103 may include:
[0087] S1031. In response to a first user's interaction request to start the multi-role interaction, create a first user role and interaction invitation information corresponding to the first user.
[0088] In this step, in response to the first user's interactive request to start a multi-role interaction, a corresponding first user role is created for the first user and interactive invitation information is generated. Here, the number of first users can be one or more; the interactive invitation information is used to invite other users to join the multi-role interaction created by the first user. Exemplarily, the interactive invitation information may include the address link of the interactive space where the multi-role interaction is located, interactive prompt words, brief information of the first user, etc.
[0089] S1032. Share the interaction invitation information with other users according to the interaction participation method determined by the first user.
[0090] In this step, the interactive participation methods include random matching and user invitation. For random matching, the system can match the first user according to the pre-set matching conditions, and automatically send interactive invitation information to other users who meet the matching conditions and / or are screened by the user; for user invitation, when sharing within the site, the system can first query the corresponding users according to the identity information entered by the first user, and then send interactive invitation information to these users; or, the first user can also copy the interactive invitation information through off-site sharing and send it to other users he wants to invite through other communication programs.
[0091] S1033: In response to confirmation operations of the second users on the received interaction invitation information, second user roles corresponding to the second users are respectively created.
[0092] In this step, the second user can learn about the multi-role interaction from the received interaction invitation information, and can indicate joining the multi-role interaction by triggering a confirmation operation, or can indicate refusing to join the multi-role interaction by triggering a rejection operation. In response to the confirmation operation of each second role on the interaction invitation information, each second user role corresponding to each second role that confirms joining the multi-role interaction can be created, and each second user role can be added to the interaction space.
[0093] In another possible implementation, step S103 may further include:
[0094] In response to the first user's interaction request to start the multi-role interaction, a target number of the interactive roles is determined; and a corresponding number of virtual user roles are created according to the difference between the target number and the number of user roles that have been created.
[0095] Here, in addition to the above-mentioned two methods of real user participation, namely random matching and user invitation, virtual characters can also be used to supplement. The first user can specify the target number of interactive characters, i.e. the total number, in the interaction request that triggers the start of multi-role interaction. Afterwards, the first user can invite a part of the second users to join by random matching and / or user invitation, and then the first user requests virtual character supplementation, and the system determines the difference between the target number and the number of user characters that have been created; alternatively, the first user can also directly request virtual character supplementation, and the system determines the difference between the target number and the number of user characters that have been created.
[0096] According to the difference between the target number and the number of created user roles, a corresponding number of virtual user roles are created and added to the interactive space. The virtual roles can be generated by a large language model according to user needs, or they can be pre-generated virtual roles with different character characteristics.
[0097] At this point, the virtual characters, interactive characters, and interactive prompts required for multi-character interaction are all ready, and the system can start multi-character interaction.
[0098] S104: Determine the interaction result between each interactive character and the virtual character based on the interaction information and the interaction prompt words generated in the multi-character interaction.
[0099] In multi-role interaction, according to different interaction settings, dialogue interactions can be generated between different interactive roles, between virtual roles and interactive roles, and even between multiple virtual roles. Multi-role interaction includes at least one round of role interaction between the virtual role and each interactive role. Specifically, the method provided in the embodiment of the present application also includes generating interaction information in the multi-role interaction in the following manner:
[0100] For any interactive role in any round of role interaction, a current round of interactive dialogue sent by the interactive role to the virtual role is obtained; and the virtual role generates a feedback dialogue to the interactive role based on the current round of interactive dialogue and the historical interactive dialogue.
[0101] Here, in any round of role interaction, the virtual character can perform semantic analysis on the interactive dialogue sent by the interactive character in the current round, and combine the historical interactive dialogue before the current round in the role interaction, and use the corresponding dialogue strategy through the large language model to generate the reply content to the interactive character. This enables the large model to obtain all dialogue information every time feedback is output, which helps to solve the problem of context recognition obstacles and output more accurate and more humane feedback dialogues.
[0102] In this step, the interaction result can be expressed as a score value and / or a comment (such as good, very good, excellent, etc.) and / or a win or loss result, etc.
[0103] In a possible implementation, step S104 may include:
[0104] For each interactive role, the interactive information generated when the virtual role interacts with the interactive role is extracted; according to the interactive information generated when interacting with the interactive role and the interactive rules included in the interactive prompt words, the interactive performance of the interactive role is determined and used as the interactive result between the virtual role and the interactive role.
[0105] Specifically, the interactive information generated when the virtual character interacts with the interactive character is extracted from all the interactive information, such as the dialogue between the two; the interactive performance of the interactive character is determined according to the interactive information and the interactive rules, and is used as the interactive result between the interactive character and the virtual character. In addition, after determining the interactive result between the interactive character and the virtual character, the multi-character interaction can be continued based on the previous interaction in response to the multi-activity continuation request of at least one user character.
[0106] The interactive performance between the interactive character and the virtual character can be determined in the following manner:
[0107] Method 1: sending the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words to the first language model in real time, and the first language model determines the interactive performance between the interactive character and the virtual character.
[0108] In this way, the interactive information and interactive rules generated when interacting with the interactive character can be sent to the first language model in real time to determine the real-time interactive performance between the interactive character and the virtual character. Exemplarily, after each round of speech by the interactive character ends, the speech of this round is sent to the first language model.
[0109] In this way, through real-time feedback and timely response to the interactive characters, we can better simulate the instantaneous reaction of the virtual characters in specific scenarios, help the interactive characters to adjust their strategies in time in the next interaction, and ultimately achieve the ideal interactive effect.
[0110] And / or, method two, in response to a request to end the interaction or the interaction meets a preset condition, all interaction information generated when interacting with the interactive character and the interaction rules included in the interaction prompt words are sent to the first language model, and the first language model determines the interaction performance between the interactive character and the virtual character.
[0111] In this way, the user character can trigger an end interaction request at any time to end the multi-role interaction, or automatically end the multi-role interaction when it is determined that the multi-role interaction meets the preset conditions. The preset conditions can be set according to the interaction rules in different interaction scenarios. For example, the interaction time reaches the preset time, the interaction rounds reach the preset rounds, the emotion value of the virtual character reaches the preset threshold, etc.
[0112] At this time, in response to the end of the interaction request or the interaction meets the preset conditions, all interaction information and interaction rules generated when interacting with the interactive character can be sent to the first language model to determine the overall interaction performance between the interactive character and the virtual character.
[0113] In this way, a comprehensive overall interactive performance can be given to the interactive characters, which can better simulate the final judgment result of the virtual characters on the user characters in specific scenarios and achieve an ideal interactive effect.
[0114] It should be noted that the above two methods can be used in combination, that is, both the real-time interaction performance between the interactive character and the virtual character and the overall interaction performance between the interactive character and the virtual character are given.
[0115] In a possible implementation, determining the interactive performance between the interactive character and the virtual character according to the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words may also include:
[0116] Extract keywords from the interactive information generated when interacting with the interactive character; match the keywords with a preset emotional change vocabulary to determine the emotional change value of the virtual character caused by the interactive character; and determine a score value for the interactive performance between the interactive character and the virtual character based on the emotional change value.
[0117] Corresponding to the above example of character A and character C counterattacking character B, the virtual characters are preset with corresponding emotion change lexicons according to the characteristics of different characters, and the emotion change lexicon sets the change values of different types of emotions that can be triggered by different emotion keywords. Therefore, by extracting keywords from the interactive information and matching the keywords with the preset emotion change lexicon, the emotion change value of the virtual character triggered by the interactive character can be determined, and then the emotion change value can be converted into a score value.
[0118] In this way, by determining the interaction results and feeding them back to the user, the user can intuitively understand the performance of each role in the multi-role interaction and solve the problems in a targeted manner, thereby further improving the user's enthusiasm for participation and interactive experience.
[0119] An embodiment of the present application provides a multi-role interaction method, wherein the multi-role interaction includes interaction between at least one virtual character and at least two interactive characters; the method includes: in response to a user's creation request for creating the multi-role interaction, determining an interaction prompt word; wherein the interaction prompt word is used to determine the interactive content of the multi-role interaction; based on the interaction prompt word, generating the virtual character; wherein the virtual character serves as the interactive object of the interactive character; in response to a user's interaction request to start the multi-role interaction, determining the interactive character and starting the multi-role interaction; wherein the interactive character includes at least one user character operated by the user; based on the interactive information generated in the multi-role interaction and the interaction prompt word, determining the interaction result between each interactive character and the virtual character.
[0120] In this way, by introducing a method in which multiple interactive characters interact with the same virtual character and determining the interaction results between each interactive character and the virtual character, the role interaction scenes and interactive experiences can be enriched, the enthusiasm of user participation can be increased, and it is suitable for interactive scenes involving multiple people.
[0121] See also Figure 2 , Figure 2 A schematic diagram of the structure of a multi-role interaction device provided in an embodiment of the present application. The multi-role interaction includes interaction between at least one virtual character and at least two interactive characters; Figure 2 As shown in , the multi-role interaction device 200 includes:
[0122] The prompt word determination module 210 is used to determine the interaction prompt word in response to the user's creation request for creating the multi-role interaction; wherein the interaction prompt word is used to determine the interaction content of the multi-role interaction;
[0123] A generating module 220, configured to generate the virtual character based on the interactive prompt word; wherein the virtual character serves as an interactive object of the interactive character;
[0124] The role determination module 230 is used to determine the interactive roles in response to the user's interactive request to start the multi-role interaction, and start the multi-role interaction; wherein the interactive roles include at least one user role operated by the user;
[0125] The result determination module 240 is used to determine the interaction result between each interactive character and the virtual character based on the interaction information and the interaction prompt words generated in the multi-character interaction.
[0126] Furthermore, when the prompt word determination module 210 is used to determine the interactive prompt word in response to the user's creation request for creating the multi-role interaction, the prompt word determination module 210 is specifically used to:
[0127] Determining the interactive prompt word according to the interactive information input by the user in the creation request;
[0128] Alternatively, in response to the creation request, a preset prompt word template is displayed; and the interactive prompt word is generated according to the prompt word template;
[0129] Alternatively, according to the interactive keywords input by the user in the creation request, a pre-trained large language model is used to generate a prompt word template; according to the prompt word template, the interactive prompt word is generated;
[0130] Alternatively, in response to the creation request, current network hot words are obtained; a prompt word template is generated based on the current network hot words using a large language model; and the interactive prompt word is generated according to the prompt word template.
[0131] Furthermore, when the prompt word determination module 210 is used to generate the interactive prompt word according to the prompt word template, the prompt word determination module 210 is specifically used to:
[0132] In response to a user's confirmation operation on the prompt word template, determining the prompt word template as the interactive prompt word;
[0133] Alternatively, in response to a configuration operation of the prompt word template by the user, the prompt word template is modified, and the modified prompt word template is determined as the interactive prompt word.
[0134] Furthermore, when the role determination module 230 is used to determine the interactive role in response to the user's interactive request to start the multi-role interaction, the role determination module 230 is specifically used to:
[0135] In response to a first user's interaction request to start the multi-role interaction, creating a first user role and interaction invitation information corresponding to the first user;
[0136] Sharing the interaction invitation information with other users according to the interaction participation mode determined by the first user;
[0137] In response to confirmation operations of the second users on the received interaction invitation information, second user roles corresponding to the second users are created respectively.
[0138] Furthermore, when the role determination module 230 is used to determine the interactive role in response to the user's interactive request to start the multi-role interaction, the role determination module 230 is specifically further used to:
[0139] In response to a first user's interaction request to start the multi-role interaction, determining a target number of the interactive roles;
[0140] A corresponding number of virtual user roles are created according to the difference between the target number and the number of created user roles.
[0141] Furthermore, when the result determination module 240 is used to determine the interaction result between each interactive role and the virtual role based on the interaction information and the interaction prompt words generated in the multi-role interaction, the result determination module 240 is also used to:
[0142] For each interactive character, extracting interactive information generated when the virtual character interacts with the interactive character;
[0143] According to the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words, the interactive performance of the interactive character is determined and used as the interactive result between the interactive character and the virtual character.
[0144] Furthermore, when the result determination module 240 is used to determine the interaction performance between the interactive character and the virtual character according to the interaction information generated when interacting with the interactive character and the interaction rules included in the interaction prompt words, the result determination module 240 is specifically used to:
[0145] Sending the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words to the first language model in real time, and determining the interactive performance between the interactive character and the virtual character by the first language model;
[0146] And / or, in response to a request to end the interaction or the interaction meets a preset condition, all interaction information generated when interacting with the interactive character and the interaction rules included in the interaction prompt words are sent to the first language model, and the first language model determines the interaction performance between the interactive character and the virtual character.
[0147] Furthermore, the multi-role interaction includes at least one round of role interaction between the virtual character and each interactive character; the multi-role interaction device 200 also includes an interaction module; the interaction module is used to generate interaction information in the multi-role interaction in the following manner:
[0148] For any interactive role in any round of role interaction, obtain the current round of interactive dialogue sent by the interactive role to the virtual role;
[0149] The virtual character generates a feedback dialogue for the interactive character based on the current round of interactive dialogue and the historical interactive dialogue.
[0150] Furthermore, when the generating module 220 is used to generate the virtual character based on the interactive prompt word, the generating module 220 is used to:
[0151] The virtual character is generated based on the interaction prompt words using a pre-trained second language model; wherein the interaction prompt words are related to at least one of the following items: an interaction scene, an interaction task, and an interaction rule.
[0152] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown in , the electronic device 300 includes a processor 310 , a memory 320 and a bus 330 .
[0153] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 communicates with the memory 320 via the bus 330. When the machine-readable instructions are executed by the processor 310, the above-mentioned Figure 1 The steps of the multi-role interaction method in the method embodiment shown, the specific implementation method can be found in the method embodiment, and will not be repeated here.
[0154] 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 computer program can execute the above-mentioned Figure 1 The steps of the multi-role interaction method in the method embodiment shown, the specific implementation method can be found in the method embodiment, and will not be repeated here.
[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0156] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0157] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0158] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0159] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0160] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A multi-role interaction method, characterized in that: The multi-role interaction includes interaction between at least one virtual character and at least two interactive characters; the method includes: In response to a user's request to create the multi-role interaction, determining an interaction prompt word; wherein the interaction prompt word is used to determine the interaction content of the multi-role interaction; Based on the interactive prompt words, the virtual character is generated; wherein the virtual character serves as an interactive object of the interactive character; In response to a user's interaction request to start the multi-role interaction, determining the interactive roles, and starting the multi-role interaction; wherein the interactive roles include at least one user role operated by the user; Based on the interaction information generated in the multi-role interaction and the interaction prompt words, the interaction result between each interactive role and the virtual role is determined.
2. The method according to claim 1, characterized in that The step of determining the interaction prompt words in response to the user's creation request for creating the multi-role interaction includes: Determining the interactive prompt word according to the interactive information input by the user in the creation request; Alternatively, in response to the creation request, a preset prompt word template is displayed; and the interactive prompt word is generated according to the prompt word template; Alternatively, according to the interactive keywords input by the user in the creation request, a pre-trained large language model is used to generate a prompt word template; according to the prompt word template, the interactive prompt word is generated; Alternatively, in response to the creation request, current network hot words are obtained; a prompt word template is generated based on the current network hot words using a large language model; and the interactive prompt word is generated according to the prompt word template.
3. The method according to claim 2, characterized in that The step of generating the interactive prompt word according to the prompt word template includes: In response to a user's confirmation operation on the prompt word template, determining the prompt word template as the interactive prompt word; Alternatively, in response to a configuration operation of the prompt word template by the user, the prompt word template is modified, and the modified prompt word template is determined as the interactive prompt word.
4. The method according to claim 1, characterized in that: The step of determining the interactive role in response to the user's request to start the multi-role interaction comprises: In response to a first user's interaction request to start the multi-role interaction, creating a first user role and interaction invitation information corresponding to the first user; Sharing the interaction invitation information with other users according to the interaction participation mode determined by the first user; In response to confirmation operations of the second users on the received interaction invitation information, second user roles corresponding to the second users are created respectively.
5. The method according to claim 1 or 4, characterized in that: The step of determining the interactive roles in response to the user's request to start the multi-role interaction further includes: In response to a first user's interaction request to start the multi-role interaction, determining a target number of the interactive roles; A corresponding number of virtual user roles are created according to the difference between the target number and the number of created user roles.
6. The method according to claim 1, characterized in that The step of determining the interaction result between each interactive character and the virtual character based on the interaction information and the interaction prompt words generated in the multi-character interaction includes: For each interactive character, extracting interactive information generated when the virtual character interacts with the interactive character; According to the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words, the interactive performance of the interactive character is determined and used as the interactive result between the interactive character and the virtual character.
7. The method according to claim 6, characterized in that The step of determining the interactive performance between the interactive character and the virtual character according to the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words includes: Sending the interactive information generated when interacting with the interactive character and the interactive rules included in the interactive prompt words to the first language model in real time, and determining the interactive performance between the interactive character and the virtual character by the first language model; And / or, in response to a request to end the interaction or the interaction meets a preset condition, all interaction information generated when interacting with the interactive character and the interaction rules included in the interaction prompt words are sent to the first language model, and the first language model determines the interaction performance between the interactive character and the virtual character.
8. The method according to claim 6, characterized in that The multi-role interaction includes at least one round of role interaction between the virtual character and each interactive character; the method also includes generating interaction information in the multi-role interaction by: For any interactive role in any round of role interaction, obtain the current round of interactive dialogue sent by the interactive role to the virtual role; The virtual character generates a feedback dialogue for the interactive character based on the current round of interactive dialogue and the historical interactive dialogue.
9. The method according to claim 1, characterized in that: Generating the virtual character based on the interactive prompt word includes: The virtual character is generated based on the interaction prompt words using a pre-trained second language model; wherein the interaction prompt words are related to at least one of the following items: an interaction scene, an interaction task, and an interaction rule.
10. A multi-role interactive device, characterized in that: The multi-role interaction includes interaction between at least one virtual character and at least two interactive characters; the device includes: A prompt word determination module, used to determine an interaction prompt word in response to a user's creation request for creating the multi-role interaction; wherein the interaction prompt word is used to determine the interaction content of the multi-role interaction; A generating module, used for generating the virtual character based on the interactive prompt words; wherein the virtual character serves as an interactive object of the interactive character; A role determination module, configured to respond to a user's interaction request to start the multi-role interaction, determine the interactive role, and start the multi-role interaction; wherein the interactive role includes at least one user role operated by the user; The result determination module is used to determine the interaction result between each interactive role and the virtual role based on the interaction information generated in the multi-role interaction and the interaction prompt words.
Citation Information
Patent Citations
Virtual character generation method and device
CN116932719A
Interaction method and electronic equipment
CN116938865A
Interaction method and device, equipment and storage medium
CN117376292A
Multi-role intelligent dialogue method and device, electronic equipment and storage medium
CN117743560A
Interaction method and device, medium and electronic equipment
CN117959715A
Cited By
Session interaction method and device, electronic equipment and storage medium
CN120162418A