CN119476348B - Multi-role interaction method and device - Google Patents
Multi-role interaction method and deviceInfo
- Publication number
- CN119476348B CN119476348B CN202411609872.8A CN202411609872A CN119476348B CN 119476348 B CN119476348 B CN 119476348B CN 202411609872 A CN202411609872 A CN 202411609872A CN 119476348 B CN119476348 B CN 119476348B
- Authority
- CN
- China
- Prior art keywords
- interaction
- interactive
- role
- character
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3322—Query formulation using system suggestions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Artificial Intelligence (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Machine Translation (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application provides a multi-role interaction method and device, wherein multi-role interaction comprises interaction between at least one virtual role and at least two interaction roles; the method comprises the steps of responding to a creating request of a user for creating multi-role interaction, determining interaction prompt words, generating virtual roles based on the interaction prompt words, responding to an interaction request of the user for starting the multi-role interaction, determining the interaction roles and starting the multi-role interaction, and determining an interaction result between each interaction role and the virtual roles based on interaction information and the interaction prompt words generated in the multi-role interaction. Therefore, by introducing a mode that a plurality of interaction roles interact with the same virtual role and determining the interaction result between each interaction role and the virtual role, the role interaction scene and interaction experience can be enriched, the enthusiasm of user participation is improved, and the method is applicable to the interaction scene of multi-person participation.
Description
Technical Field
The application relates to the technical field of computer application, in particular to a multi-role interaction method and device.
Background
In the existing interaction scene of the large language model, only a single user can interact with the model independently on the same interaction page, so that the functions and the applicable scene of the existing large language model are single, the model capability cannot be fully exerted, interesting and competitive interaction experience is lacking, and the current interaction requirement cannot be met.
Disclosure of Invention
Accordingly, the present application is directed to a multi-role interaction method and apparatus, which introduces a way of interaction between multiple interaction roles and the same virtual role, and determines the interaction result between each interaction role and the virtual role. Therefore, the interactive scene and interactive experience of the roles can be enriched, the enthusiasm of the user for participation is improved, and the interactive scene is suitable for the interactive scene of the participation of multiple persons.
The embodiment of the application provides a multi-role interaction method, wherein multi-role interaction comprises interaction between at least one virtual role and at least two interaction roles; the method comprises the following steps:
responding to a creation request of a user to create the multi-role interaction, and determining an interaction prompt word, wherein the interaction prompt word is used for determining the interaction content of the multi-role interaction;
generating the virtual role based on the interaction prompt word, wherein the virtual role is used as an interaction object of the interaction role;
Responding to an interaction request of a user for starting the multi-role interaction, determining the interaction role and starting the multi-role interaction, wherein the interaction role at least comprises a user role operated by the user;
And determining an interaction result between each interaction role and the virtual role based on the interaction information and the interaction prompt word generated in the multi-role interaction.
Further, the determining, in response to a creation request for creating the multi-persona interaction by a user, an interaction prompt word includes:
Determining the interactive prompt word according to the interactive information input by the user in the creation request;
or responding to the creation request, and displaying a preset prompting word template;
or generating a prompt word template by using a pre-trained large language model according to the interactive keywords input by the user in the creation request;
Or responding to the creation request, obtaining the current network hot word, generating a prompt word template based on the current network hot word by using a large language model, and generating the interactive prompt word according to the prompt word template.
Further, the generating the interactive prompt word according to the prompt word template includes:
responding to the confirmation operation of the user on the prompt word template, and determining the prompt word template as the interactive prompt word;
Or responding to the configuration operation of the user on the prompt word template, modifying the prompt word template, and determining the modified prompt word template as the interactive prompt word.
Further, the determining the interaction role in response to the interaction request of the user for starting the multi-role interaction includes:
responding to an interaction request of a first user for starting the multi-role interaction, and creating a first user role and interaction invitation information corresponding to the first user;
Sharing the interaction invitation information to other users according to the interaction participation mode determined by the first user;
And respectively creating second user roles corresponding to the second users in response to the received confirmation operation of the interaction invitation information by the second users.
Further, the determining the interaction role in response to the interaction request of the user for starting the multi-role interaction further includes:
responding to an interaction request of a first user for starting the multi-role interaction, and determining the target number of the interaction roles;
And creating a corresponding number of virtual user roles according to the number difference between the target number and the number of created user roles.
Further, the determining, based on the interaction information and the interaction prompt word generated in the multi-role interaction, an interaction result between each interaction role and the virtual role includes:
Extracting interaction information generated when the virtual character interacts with the interaction character aiming at each interaction character;
and determining the interactive performance of the interactive role according to the interactive information generated when the interactive role is interacted with and the interactive rules included in the interactive prompt words, and taking the interactive performance as an interactive result with the virtual role.
Further, the determining the interactive performance between the interactive role and the virtual role according to the interactive information generated when the interactive role is interacted with and the interactive rule included in the interactive prompt word includes:
transmitting the interaction information generated when the interaction role is interacted with and the interaction rules included in the interaction prompt words to a first large language model in real time, and determining the interaction performance between the interaction role and the virtual role by the first large language model;
And/or, in response to the ending of the interaction request or the interaction meeting a preset condition, transmitting all interaction information generated when the interaction with the interaction role and the interaction rules included in the interaction prompt word to the first large language model, and determining the interaction performance between the interaction role and the virtual role by the first large language model.
Further, the multi-persona interactions include at least one round of character interactions between the virtual character and each of the interactive characters, and the method further includes generating interaction information in the multi-persona interactions by:
Aiming at any one interactive role in any round of role interaction, acquiring a current round of interactive dialogue sent by the interactive role to the virtual role;
and generating a feedback dialogue for the interactive role by the virtual role according to the current round of interactive dialogue and the historical interactive dialogue.
Further, generating the virtual character based on the interactive prompt word includes:
and generating the virtual role based on the interaction prompt word by using a pre-trained second large language model, wherein the interaction prompt word is related to at least one of an interaction scene, an interaction task and an interaction rule.
The embodiment of the application also provides a multi-role interaction device, which comprises at least one virtual role and interaction between at least two interaction roles, and comprises the following steps:
the prompt word determining module is used for responding to a creating request of a user for creating the multi-role interaction to determine an interaction prompt word, wherein the interaction prompt word is used for determining the interaction content of the multi-role interaction;
the generation module is used for generating the virtual role based on the interaction prompt word, wherein the virtual role is used as an interaction object of the interaction role;
The role determining module is used for responding to an interaction request of a user for starting the multi-role interaction, determining the interaction role and starting the multi-role interaction, wherein the interaction role at least comprises a user role operated by the user;
And the result determining module is used for determining the interaction result between each interaction role and the virtual role based on the interaction information generated in the multi-role interaction and the interaction prompt word.
The embodiment of the application also provides electronic equipment, which comprises a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, when the electronic equipment is operated, the processor and the memory are communicated through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the multi-role interaction method.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the multi-persona interaction method as described above.
According to the multi-role interaction method and device provided by the embodiment of the application, a mode that a plurality of interaction roles interact with the same virtual role is introduced, and the interaction result between each interaction role and the virtual role is determined. Therefore, the interactive scene and interactive experience of the roles can be enriched, the enthusiasm of the user for participation is improved, and the interactive scene is suitable for the interactive scene of the participation of multiple persons.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a flowchart of a multi-role interaction method according to an embodiment of the present application;
Fig. 2 shows a schematic structural diagram of a multi-role interaction device according to an embodiment of the present application;
fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, every other embodiment obtained by a person skilled in the art without making any inventive effort falls within the scope of protection of the present application.
According to research, in the existing interaction scene of the large language model, only a single user can interact with the model independently on the same interaction page, so that the functions and the applicable scene of the existing large language model are single, the model capability cannot be fully exerted, interesting and competitive interaction experience is lacking, and the current interaction requirement cannot be met.
Based on the above, the embodiment of the application provides a multi-role interaction method, which introduces a mode of interaction between a plurality of interaction roles and the same virtual role, and determines an interaction result between each interaction role and the virtual role. Therefore, the interactive scene and interactive experience of the roles can be enriched, the enthusiasm of the user for participation is improved, and the interactive scene is suitable for the interactive scene of the participation of multiple persons.
Referring to fig. 1, fig. 1 is a flowchart of a multi-role interaction method according to an embodiment of the application. The multi-role interaction in the embodiment of the application comprises at least three roles, and the roles can be set according to different implementation environments. More specifically, the multi-persona interactions include interactions between at least one virtual persona and at least two interactive personas. The virtual roles refer to virtual robots driven by artificial intelligence and playing specific roles to interact with interaction roles, wherein the interaction roles comprise at least one real user role operated by a user and can also comprise other virtual roles. The interactions may include a variety of ways, such as voice conversational interactions, text conversational interactions, action interactions that provide an avatar, and the like.
Taking text dialogue interaction as an example, different roles can alternately speak to form dialogue interaction, and virtual roles can simulate human dialogue to provide information, entertainment or assist users to complete various tasks. These virtual characters are typically based on Natural Language Processing (NLP) technology, which is capable of understanding the user's language and generating human language to interact with the user. In a specific implementation, the multi-role interaction method provided by the embodiment of the application can be executed based on terminal equipment, a cloud interaction system and the like. The terminal device may be a local electronic device that has been downloaded and can run an intelligent dialogue program, for example, a smart phone, a personal computer, a tablet computer, etc., taking a multi-role interaction system as an example, where the local electronic device is loaded with the multi-role interaction system and is used for presenting a dialogue interface. The multi-role interaction system carried in the local electronic equipment is used for interacting with a user through a dialogue interface, namely, the intelligent dialogue program is downloaded and installed through the electronic equipment and operated, dialogue utterances input by the user through the dialogue interface are received, reply utterances are generated, and the reply utterances are fed back to the user through the dialogue interface, so that multi-role interaction is realized.
When the multi-role interaction method provided by the embodiment of the application is applied to a server, the prediction method of the dialogue strategy can be realized and executed based on a cloud interaction system, wherein the cloud interaction system can comprise the server and the client device. In the operation mode of the cloud intelligent dialogue system, the operation main body of the intelligent dialogue program and the presentation main body of the dialogue interface are separated, the storage and operation of the multi-role interaction method are completed on a cloud intelligent dialogue system server, and the client device is used for receiving and sending dialogue words and presenting the dialogue interface, for example, the client device can be a display device with a data transmission function, such as a smart phone, a personal computer, a tablet computer and the like, which is close to a user side.
As shown in fig. 1, the multi-role interaction method provided by the embodiment of the present application includes:
And S101, responding to a creation request of creating the multi-role interaction by a user, and determining an interaction prompt word.
Wherein the interaction Prompt word (Prompt) is used for determining the interaction content of the multi-role interaction. More specifically, the interactive prompt may be associated with at least one of an interactive scenario, an interactive task, and an interactive rule. The interaction scene refers to situation setting of interaction among characters, such as dialectical, simulation of multi-person interview, quart competition, rancour rancour competition, humour competition, lecture competition and the like aiming at a certain view, the interaction task refers to a target which a user wants to realize in the interaction, and the interaction rule refers to a behavior guide of the characters and a judgment standard of an interaction result.
In one example, the interaction scenario is that character A is pressed by character B everywhere in the job scene, so character A decides to impact character B in a certain scenario while inviting character C to impact character B together. The interaction task is that the character A and the character C irritate the character B in the shortest time, or the speaking of the character A and the character C can cause the biggest anger value of the character B, and the like. The interaction rule is that in the process of interaction with the character B, the character A and the character C can make the anger value of the character B increase and divide, the anger value increases and the anger value decreases, and the interaction rule can also comprise that each dialog of each character can only speak one sentence or a plurality of sentences to the character B, or the interaction times of each character are not limited.
In this step, the user may trigger a creation request for creating the multi-role interaction by means of a voice command, a text command, etc., and then the system may determine the interaction prompt word according to the information contained in the creation request in response to this creation request.
In a possible implementation manner, the manner of determining the interactive prompt word in step S101 may include at least one of the following:
and A, determining the interaction prompt word according to the interaction information input by the user in the creation request.
In this manner, the user may trigger the creation request by manually inputting the interactive information, and the system may extract the interactive information from the creation request, and further determine the interactive prompt word by processing (e.g., filtering, word segmentation, etc.) the interactive information.
And B, responding to the creation request, displaying a preset prompting word template, and generating the interactive prompting word according to the prompting word template.
In this way, a plurality of types of alert word templates are stored in the system in advance. After receiving the creation request, various prompt word templates are displayed in the visual interface, and then interactive prompt words can be generated according to the prompt word templates selected by the user.
And C, generating a prompt word template by using a pre-trained large language model according to the interactive keywords input by the user in the creation request, and generating the interactive prompt word according to the prompt word template.
In the method, a user can trigger a creation request by manually inputting the interactive keywords, the system can extract the interactive keywords from the creation request, then automatically generate an adaptive prompt word template by calling a large language model based on the interactive keywords, expanding writing and the like, and then generate the interactive prompt words according to the prompt word template. Where large language models refer to Natural Language Processing (NLP) models with extremely high parameters that are trained using large amounts of data. These models are capable of understanding and generating human language, performing a variety of tasks such as text generation, translation, abstracts, questions and answers, conversations, and the like.
For example, if the interactive keywords input by the user are "lecture game, emotion is rich, and the score is high", the large language model can expand and write the interactive keywords to generate a prompt word template of a preset word number interval (the preset word number interval can be determined by the model training effect in the training process, that is, the model training effect can be the best). Or for example, if the interactive keyword input by the user is a segment match, inputting the content input by the user into a large language model for automatic generation, and generating at least one prompting word template of a preset word number section by using the large model.
The method comprises the steps of obtaining a current network hot word in response to the creation request, generating a prompt word template based on the current network hot word by using a large language model, and generating the interactive prompt word according to the prompt word template.
In this manner, a user may indicate, via a creation request, that multi-persona interactions associated with a current event are desired, and the system may obtain a current network hotspot vocabulary based on the creation request. For example, the manner of acquisition may be to read a hot word in a social software search leaderboard. The user can also limit the domain, the theme and the like of the time event in the creation request, so that the system further screens out the current network hot words which accord with the expected domain and theme of the user.
For example, some emphasis, hot events, such as at least one current web hot vocabulary like "XX meeting" may be collected as keywords in real time or periodically, automatically generated based on the current web hot vocabulary using a large language model to generate at least one alert word template, such as "is the dialect of the absent XX meeting.
In this way, the method provided by the embodiment of the application combines multi-role interaction with real life events, and can provide more interesting and participatory interaction experience for users by regularly publishing interactive games related to specific moments or events. The method is specifically characterized in that:
1. the combination of the events, such as the game of the AI god of mind is flexibly combined with the events of the events, for example, the game of the AI god of mind is pushed out in the first five hours, and the interactive game updated regularly enables the user to better experience and participate in the activities in the actual life through the interaction.
2. User engagement promotion, by combining with real life events, the user can be motivated to participate in the game more actively. The user can feel more close and invested because the game is related to the actual life event, and the participation and the liveness of the user are increased.
3. The creator creates that the user can not only select the game prompt word template by himself, but also create the interactive game prompt word template related to the current event in batches so as to ensure that the interactive game related to the current event is released in time. This enables the creator to more flexibly cope with the change in the current situation, creating a more attractive and innovative interactive game.
Further, in the foregoing manners B, C and D, generating the interactive prompt word according to the prompt word template may include:
and responding to the confirmation operation of the user on the prompt word template, and determining the prompt word template as the interactive prompt word. At this time, various prompt word templates can be provided for the user, and the prompt word template selected by the user or specific prompt word contents in the prompt word template are determined to be interactive prompt words in response to the confirmation operation of the user on the prompt word template.
Or responding to the configuration operation of the user on the prompt word template, modifying the prompt word template, and determining the modified prompt word template as the interactive prompt word. At this time, various prompt word templates can be provided for the user, the user responds to the configuration operation of the user on the prompt word templates, the specific prompt word content in the prompt word templates selected by the user is modified and configured, and the modified prompt word templates are determined to be interactive prompt words. For example, the user may modify the identity of the character AB to EF, or modify the place of occurrence of the interaction context to a more familiar place.
Or the prompt word template can be directly determined to be the interactive prompt word without any operation of a user. For example, the user directly requests to start a preset interaction theme, and the collection of the interaction prompt words is completed directly based on a preset prompt word template without confirmation of the user.
Therefore, the multi-role interaction method in the embodiment of the application provides various modes for generating the interaction prompt words, is beneficial to generating rich and various multi-role interaction scenes, and meets the interaction requirements of different users.
S102, generating the virtual roles based on the interaction prompt words.
In this step, the virtual character may be generated by training based on the interactive prompt word using a second language model trained in advance. The specific manner of generation may be referred to in the art, and the application is not limited herein.
The virtual character can be used as an interaction object of the interaction character, can make corresponding feedback on interaction information sent by the virtual character based on the interaction character, can be used as a referee in multi-role interaction, and can determine an interaction result according to the interaction information sent by the interaction character to the virtual character and/or the interaction information among the interaction characters. Corresponding to the above example, the character B (corresponding AI virtual character) generated by the second large language model may be a referee familiar with all the backgrounds and rules, and may be an interaction object with the character a/C, for example, the character B may be an object that presses the characters a and C on a regular job site, in multi-role interaction, the character B still may keep the characteristic of pressing the job site to interact with the character a/C, thereby mobilizing the enthusiasm and emotion of the character a/C, improving the user experience, and further, according to the interaction between the characters a and C and the character B, the character B may exhibit corresponding anger values.
And S103, responding to an interaction request of starting the multi-role interaction by a user, determining the interaction role and starting the multi-role interaction.
As described above, the multi-persona interaction includes at least two interaction roles, wherein the interaction roles include at least one user role operated by a user. In this step, in response to an interaction request for any user to open the multi-persona interaction, all the interaction roles participating in the multi-persona interaction are determined first, and then the multi-persona interaction can be opened based on the interaction roles and the virtual roles.
Here, the multi-role interaction needs to be performed in a specific interaction space, such as group chat in a chat application, or creating a virtual interaction room in a specific interaction application. Based on the addition of at least 3 roles, a corresponding multi-role interaction space can be opened, and the multi-role interaction space can be provided with the capability of allowing interaction among the roles, so that the multi-role interaction space has higher flexibility of multi-role interaction and better user experience, and the capability of only allowing interaction between the user roles and the virtual roles can be provided, but all the participated roles of the interaction content can be seen, so that the stimulation of competition can be reflected, and the user experience can be improved.
The manner in which the interactive character is determined in embodiments of the present application may include at least one of random matching, user invitation, and virtual character replenishment. The random matching refers to that the determined users are randomly matched with other users to enter an interaction space for multi-role interaction, the user inviting refers to that the determined users invite other users to join the interaction space for multi-role interaction, the virtual role supplementing refers to that virtual roles are supplemented as interaction roles, and the determined users are accompanied to join the interaction space for multi-role interaction.
In one possible implementation, step S103 may include:
S1031, responding to an interaction request of a first user for starting the multi-role interaction, and creating a first user role and interaction invitation information corresponding to the first user.
In the step, an interaction request for enabling multi-role interaction by a first user is responded, a corresponding first user role is created for the first user, and interaction invitation information is generated. The number of the first users may be one or more, and the interaction invitation information is used for inviting other users to join in the multi-role interaction created by the first users, and for example, the interaction invitation information may include address links, interaction prompt words, brief information of the first users, and the like in an interaction space where the multi-role interaction is located.
S1032, sharing the interaction invitation information to other users according to the interaction participation mode determined by the first user.
In this step, the interactive participation mode includes random matching and user invitation. For random matching, the system can match the first user according to preset matching conditions and automatically send interactive invitation information to other users meeting the matching conditions and/or screened by the users, and for user invitation, when sharing in a station, the system can firstly inquire corresponding users according to identity information input by the first user and then send the interactive invitation information to the users, or the first user can copy the interactive invitation information in an off-station sharing mode and send the interactive invitation information to other users needing to be invited through other communication programs.
S1033, respectively creating second user roles corresponding to the second users in response to the received confirmation operation of the interaction invitation information by the second users.
In this step, the second user may learn information about the multi-role interaction from the received interaction invitation information, and indicate to join the multi-role interaction by triggering a confirmation operation, or may reject to join the multi-role interaction by triggering a rejection operation. And responding to the confirmation operation of the second roles on the interaction invitation information, creating the second user roles corresponding to the second roles which are confirmed to be added into the multi-role interaction, and adding the second user roles into the interaction space.
In another possible implementation, step S103 may further include:
and establishing a corresponding number of virtual user roles according to a number difference value between the target number and the number of established user roles.
Here, the virtual character may be supplemented in addition to the above-described ways of random matching and user inviting two real users to participate. The first user may specify a target number of interaction roles, i.e., a total number, in the interaction request triggering the opening of the multi-role interaction. The first user can invite a part of the second users to join in a random matching and/or user inviting mode, then the first user requests the virtual character replenishment, the system determines the quantity difference between the target quantity and the quantity of the created user characters, or the first user can directly request the virtual character replenishment, and the system determines the quantity difference between the target quantity and the quantity of the created user characters.
And creating a corresponding number of virtual user roles according to the number difference between the target number and the number of created user roles, and adding an interaction space. The virtual role can be created by a large language model according to the requirements of users, or can be a virtual role with different character characteristics which is generated in advance, and the like.
At this time, the virtual character, the interactive character and the interactive prompt word required for the multi-character interaction are all ready, and the system can start to start the multi-character interaction.
And S104, determining an interaction result between each interaction role and the virtual role based on the interaction information generated in the multi-role interaction and the interaction prompt word.
In multi-persona interactions, conversational interactions may be generated between different interactive roles, between virtual roles and interactive roles, and even between multiple virtual roles, according to different interaction settings. The multi-persona interactions include at least one round of persona interactions between the virtual persona and each of the interactive personas. Specifically, the method provided by the embodiment of the application further includes generating the interaction information in the multi-role interaction by the following method:
And aiming at any one interactive role in any round of role interaction, acquiring a current round of interactive dialogue sent by the interactive role to the virtual role, and generating a feedback dialogue for the interactive role by the virtual role according to the current round of interactive dialogue and the historical interactive dialogue.
In any round of role interaction, the virtual role can perform semantic analysis on the interaction dialogue sent by the interaction role in the current round, and generate reply content to the interaction role by combining the historical interaction dialogue before the current round in the role interaction and using a corresponding dialogue strategy through a large language model. Therefore, the large model can acquire all dialogue information when feedback is output every time, which is helpful for solving the problem of the context recognition obstacle, and outputting more accurate and more humanized feedback dialogue.
In this step, the interactive results may be expressed as scoring values and/or comments (e.g., good, very good, etc. comments) and/or winning or losing results, etc.
In one possible implementation, step S104 may include:
And determining the interactive performance of the interactive role according to the interactive information generated when the virtual role interacts with the interactive role and the interactive rules included in the interactive prompt words, and taking the interactive performance as an interactive result between the virtual role and the interactive information.
Specifically, the interactive information generated when the virtual character interacts with the interactive character, such as a dialogue between the virtual character and the interactive character, is extracted from all the interactive information, and the interactive performance of the interactive character is determined according to the interactive information and the interactive rule and is used as an interactive result with the virtual character. In addition, after determining the interaction result between the interactive character and the virtual character, the multi-role interaction can be continued based on the previous interaction in response to a continued multi-activity request of at least one user character.
Wherein the interactive performance between the interactive character and the virtual character can be determined by:
and in the first mode, the interactive information generated when the interactive character interacts with the interactive character and the interactive rules included in the interactive prompt words are sent to a first large language model in real time, and the interactive expression between the interactive character and the virtual character is determined by the first large language model.
In this manner, the interaction information and interaction rules generated when interacting with the interactive character may be transmitted in real-time to the first large language model to determine real-time interactive performance between the interactive character and the virtual character. Illustratively, after each round of utterances by the interactive character is completed, the utterances of the round are sent to the first large language model.
Therefore, the instant response of the virtual character in the specific scene can be better simulated by means of real-time feedback and timely response of the interactive character, the strategy of the interactive character can be timely adjusted in the next interaction, and the ideal interaction effect is finally achieved.
And/or, in the second mode, all interaction information generated when the interaction with the interaction role and the interaction rules included in the interaction prompt word are sent to the first large language model in response to the ending of the interaction request or the interaction meeting the preset condition, and the interaction performance between the interaction role and the virtual role is determined by the first large language model.
In this way, the user character can trigger the end interaction request at any time to end the multi-role interaction, or automatically end the multi-role interaction when judging that the multi-role interaction meets the preset condition. The preset conditions can be specifically set according to the interaction rules under different interaction scenes, and can be exemplified by the fact that the interaction time length reaches the preset time length, the interaction turns reach the preset turns, the emotion value of the virtual character reaches the preset threshold value and the like.
At this time, in response to the completion of the interaction request or the interaction meeting a preset condition, all the interaction information and interaction rules generated when the interaction is performed with the interaction character may be transmitted to the first large language model, so as to determine the overall interaction performance between the interaction character and the virtual character.
Therefore, comprehensive overall interactive performance can be given to the interactive roles, the final judging result of the virtual roles to the user roles in the specific scene can be better simulated, and the ideal interactive effect is achieved.
It should be noted that the two modes may be combined, that is, the real-time interactive performance between the interactive character and the virtual character is given, and the overall interactive performance between the interactive character and the virtual character is also given.
In one possible implementation manner, determining the interactive performance between the interactive character and the virtual character according to the interactive information generated when the interactive character interacts with the interactive character and the interactive rules included in the interactive prompt word may further include:
Extracting keywords from interaction information generated when the interactive character interacts with the virtual character, matching the keywords with a preset emotion change word stock, determining an emotion change value of the virtual character caused by the interactive character, and determining a grading value of the interactive performance between the interactive character and the virtual character according to the emotion change value.
Corresponding to the example of the role A and the role C countering the role B, the virtual roles are preset with corresponding emotion change word libraries according to the characteristics of different roles, and the emotion change word libraries are provided with the change values of different types of emotion which can be triggered by different emotion keywords. Therefore, by extracting the keywords from the interaction information and matching the keywords with a preset emotion change word stock, the emotion change value of the virtual character caused by the interaction character can be determined, and the emotion change value is converted into a grading value.
Therefore, through determining the interaction result and feeding back the interaction result to the user, the user can intuitively know the character performances of multi-role interaction, and the problems in the multi-role interaction are solved in a targeted manner, so that the enthusiasm of the user participation and the interaction experience are further improved.
The multi-role interaction method comprises the steps of responding to a creation request of a user for creating multi-role interaction, determining interaction prompt words, wherein the interaction prompt words are used for determining interaction content of the multi-role interaction, generating the virtual roles based on the interaction prompt words, enabling the virtual roles to serve as interaction objects of the interaction roles, responding to an interaction request of a user for starting the multi-role interaction, determining the interaction roles and starting the multi-role interaction, wherein the interaction roles at least comprise one user role operated by the user, and determining interaction results between each interaction role and the virtual roles based on interaction information generated in the multi-role interaction and the interaction prompt words.
Therefore, by introducing a mode that a plurality of interaction roles interact with the same virtual role and determining the interaction result between each interaction role and the virtual role, the role interaction scene and interaction experience can be enriched, the enthusiasm of user participation is improved, and the method is applicable to the interaction scene of multi-person participation.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a multi-role interaction device according to an embodiment of the application. The multi-persona interaction includes an interaction between at least one virtual character and at least two interactive characters, and as shown in fig. 2, the multi-persona interaction device 200 includes:
The prompt word determining module 210 is configured to determine an interaction prompt word in response to a creation request for creating the multi-persona interaction by a user, where the interaction prompt word is used to determine an interaction content of the multi-persona interaction;
The generating module 220 is configured to generate the virtual character based on the interaction prompt word, where the virtual character is used as an interaction object of the interaction character;
The role determining module 230 is configured to determine the interaction role in response to an interaction request for enabling the multi-role interaction by a user, and enable the multi-role interaction, where the interaction role at least includes a user role operated by the user;
the result determining module 240 is configured to determine an interaction result between each interaction role and the virtual role based on the interaction information and the interaction prompt word generated in the multi-role interaction.
Further, when the prompt word determining module 210 is configured to determine an interactive prompt word in response to a creation request for creating the multi-persona interaction by a user, the prompt word determining module 210 is specifically configured to:
Determining the interactive prompt word according to the interactive information input by the user in the creation request;
or responding to the creation request, and displaying a preset prompting word template;
or generating a prompt word template by using a pre-trained large language model according to the interactive keywords input by the user in the creation request;
Or responding to the creation request, obtaining the current network hot word, generating a prompt word template based on the current network hot word by using a large language model, and generating the interactive prompt word according to the prompt word template.
Further, when the prompt word determining module 210 is configured to generate the interactive prompt word according to the prompt word template, the prompt word determining module 210 is specifically configured to:
responding to the confirmation operation of the user on the prompt word template, and determining the prompt word template as the interactive prompt word;
Or responding to the configuration operation of the user on the prompt word template, modifying the prompt word template, and determining the modified prompt word template as the interactive prompt word.
Further, when the role determining module 230 is configured to determine the interactive role in response to an interaction request for enabling the multi-role interaction by the user, the role determining module 230 is specifically configured to:
responding to an interaction request of a first user for starting the multi-role interaction, and creating a first user role and interaction invitation information corresponding to the first user;
Sharing the interaction invitation information to other users according to the interaction participation mode determined by the first user;
And respectively creating second user roles corresponding to the second users in response to the received confirmation operation of the interaction invitation information by the second users.
Further, when the role determining module 230 is configured to determine the interactive role in response to an interaction request for enabling the multi-role interaction by the user, the role determining module 230 is specifically further configured to:
responding to an interaction request of a first user for starting the multi-role interaction, and determining the target number of the interaction roles;
And creating a corresponding number of virtual user roles according to the number difference between the target number and the number of created user roles.
Further, the result determining module 240 is further configured to, when determining an interaction result between each interaction character and the virtual character based on the interaction information and the interaction prompt generated in the multi-persona interaction, the result determining module 240 is further configured to:
Extracting interaction information generated when the virtual character interacts with the interaction character aiming at each interaction character;
and determining the interactive performance of the interactive role according to the interactive information generated when the interactive role is interacted with and the interactive rules included in the interactive prompt words, and taking the interactive performance as an interactive result with the virtual role.
Further, when the result determining module 240 is configured to determine an interaction expression between the interactive character and the virtual character according to the interaction information generated when the interactive character interacts with the interactive character and the interaction rule included in the interaction prompt, the result determining module 240 is specifically configured to:
transmitting the interaction information generated when the interaction role is interacted with and the interaction rules included in the interaction prompt words to a first large language model in real time, and determining the interaction performance between the interaction role and the virtual role by the first large language model;
And/or, in response to the ending of the interaction request or the interaction meeting a preset condition, transmitting all interaction information generated when the interaction with the interaction role and the interaction rules included in the interaction prompt word to the first large language model, and determining the interaction performance between the interaction role and the virtual role by the first large language model.
Further, the multi-persona interaction comprises at least one round of character interaction between the virtual character and each interaction character, the multi-persona interaction device 200 further comprises an interaction module, and the interaction module is configured to generate interaction information in the multi-persona interaction by:
Aiming at any one interactive role in any round of role interaction, acquiring a current round of interactive dialogue sent by the interactive role to the virtual role;
and generating a feedback dialogue for the interactive role by the virtual role according to the current round of interactive dialogue and the historical interactive dialogue.
Further, when the generating module 220 is configured to generate the virtual character based on the interactive prompt word, the generating module 220 is configured to:
and generating the virtual role based on the interaction prompt word by using a pre-trained second large language model, wherein the interaction prompt word is related to at least one of an interaction scene, an interaction task and an interaction rule.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the application. As shown in fig. 3, the electronic device 300 includes a processor 310, a memory 320, and a bus 330.
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 through the bus 330, and when the machine-readable instructions are executed by the processor 310, the steps of the multi-role interaction method in the method embodiment shown in fig. 1 can be executed, and the specific implementation can be referred to the method embodiment and will not be described herein.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the multi-role interaction method in the embodiment of the method shown in fig. 1 may be executed, and a specific implementation manner may refer to the embodiment of the method and will not be described herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
It should be noted that the foregoing embodiments are merely illustrative embodiments of the present application, and not restrictive, and the scope of the application is not limited to the embodiments, and although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any modification, variation or substitution of some of the technical features of the embodiments described in the foregoing embodiments may be easily contemplated within the scope of the present application, and the spirit and scope of the technical solutions of the embodiments do not depart from the spirit and scope of the embodiments of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411609872.8A CN119476348B (en) | 2024-11-12 | 2024-11-12 | Multi-role interaction method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411609872.8A CN119476348B (en) | 2024-11-12 | 2024-11-12 | Multi-role interaction method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN119476348A CN119476348A (en) | 2025-02-18 |
| CN119476348B true CN119476348B (en) | 2025-09-05 |
Family
ID=94577315
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411609872.8A Active CN119476348B (en) | 2024-11-12 | 2024-11-12 | Multi-role interaction method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN119476348B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116938865A (en) * | 2023-07-20 | 2023-10-24 | 联想(北京)有限公司 | Interaction method and electronic equipment |
| CN117959715A (en) * | 2024-02-04 | 2024-05-03 | 北京字跳网络技术有限公司 | Interaction method, device, medium and electronic device |
| CN118194838A (en) * | 2024-03-13 | 2024-06-14 | 完美世界(北京)软件科技发展有限公司 | Method, device, computer equipment and readable storage medium for generating prompt word template |
| CN118491100A (en) * | 2024-05-28 | 2024-08-16 | 北京字跳网络技术有限公司 | Virtual character control method, device, medium, equipment and program product |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116932719A (en) * | 2023-07-18 | 2023-10-24 | 百度在线网络技术(北京)有限公司 | Virtual character generation method and device |
| CN117376292A (en) * | 2023-10-30 | 2024-01-09 | 北京字跳网络技术有限公司 | Interaction method, device, equipment and storage medium |
| CN117743560A (en) * | 2024-02-21 | 2024-03-22 | 北京面壁智能科技有限责任公司 | Multi-role intelligent dialogue method, device, electronic equipment and storage medium |
| CN118551005A (en) * | 2024-05-14 | 2024-08-27 | 浙江天猫技术有限公司 | Dialogue interaction method based on artificial intelligence AI virtual character and electronic equipment |
-
2024
- 2024-11-12 CN CN202411609872.8A patent/CN119476348B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116938865A (en) * | 2023-07-20 | 2023-10-24 | 联想(北京)有限公司 | Interaction method and electronic equipment |
| CN117959715A (en) * | 2024-02-04 | 2024-05-03 | 北京字跳网络技术有限公司 | Interaction method, device, medium and electronic device |
| CN118194838A (en) * | 2024-03-13 | 2024-06-14 | 完美世界(北京)软件科技发展有限公司 | Method, device, computer equipment and readable storage medium for generating prompt word template |
| CN118491100A (en) * | 2024-05-28 | 2024-08-16 | 北京字跳网络技术有限公司 | Virtual character control method, device, medium, equipment and program product |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119476348A (en) | 2025-02-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20090128567A1 (en) | Multi-instance, multi-user animation with coordinated chat | |
| Branch et al. | Collaborative storytelling with human actors and ai narrators | |
| CN111290682A (en) | Interaction method and device and computer equipment | |
| JP2001230801A (en) | Communication system and its method, communication service server and communication terminal | |
| US20240346728A1 (en) | Information processing device, information processing method, and information processing system | |
| US20230135871A1 (en) | System and method for executing and manipulating a storyline | |
| CN111753508A (en) | Method and device for generating content of written works and electronic equipment | |
| WO2025145546A1 (en) | Message interaction method and apparatus, storage medium, device and program product | |
| WO2024145642A1 (en) | Pre-fetching results from large language models | |
| WO2021049254A1 (en) | Information processing method, information processing device, and program | |
| WO2023212258A1 (en) | Relationship graphs for artificial intelligence character models | |
| CN111767386A (en) | Conversation processing method and device, electronic equipment and computer readable storage medium | |
| CN117556007A (en) | Dialogue processing method and device, and training method and device for dialogue model | |
| Nananukul et al. | What if Red can talk? Dynamic dialogue generation using large language models | |
| CN119494407A (en) | A method and device for assisting users in role-playing chat | |
| CN113209640B (en) | Comment generation method, device, equipment and computer-readable storage medium | |
| CN119476348B (en) | Multi-role interaction method and device | |
| JP7530688B1 (en) | Program, computer, system and information processing method | |
| Byeon et al. | Avocus: A voice customization system for online personas | |
| JP2025147584A (en) | Program, computer, system and information processing method | |
| CN118170882A (en) | Virtual character-based dialogue method, device, equipment and storage medium | |
| CN116758949A (en) | A voice interaction method and system based on a webcast lecture assistant robot | |
| JP2006109966A (en) | Sound game machine and cellular phone | |
| Jahangiri et al. | Balancing Game Satisfaction and Resource Efficiency: LLM and Pursuit Learning Automata for NPC Dialogues | |
| Schäfer | Altercharacter and identity: The practice of choice-making in narrative video games |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |