[go: up one dir, main page]

CN119476348B - Multi-role interaction method and device - Google Patents

Multi-role interaction method and device

Info

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
Application number
CN202411609872.8A
Other languages
Chinese (zh)
Other versions
CN119476348A (en
Inventor
刘思源
许玮熙
刘文哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiyu Jizhi Technology Co ltd
Original Assignee
Beijing Xiyu Jizhi Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Xiyu Jizhi Technology Co ltd filed Critical Beijing Xiyu Jizhi Technology Co ltd
Priority to CN202411609872.8A priority Critical patent/CN119476348B/en
Publication of CN119476348A publication Critical patent/CN119476348A/en
Application granted granted Critical
Publication of CN119476348B publication Critical patent/CN119476348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial 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]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3322Query formulation using system suggestions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural 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

Multi-role interaction method and device
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)

1.一种多角色互动方法,其特征在于,所述多角色互动包括至少一个虚拟角色和至少两个互动角色之间的互动;所述方法包括: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 comprises: 响应于用户创建所述多角色互动的创建请求,确定互动提示词;其中,所述互动提示词用于确定所述多角色互动的互动内容;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 word, the virtual character is generated; wherein the virtual character serves as the interactive object of the interactive character; 响应于用户开启所述多角色互动的互动请求,确定所述互动角色,并开启所述多角色互动;其中,所述互动角色至少包括一个由用户操作的用户角色;In response to a user's 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; 基于所述多角色互动中产生的互动信息和所述互动提示词,确定每个互动角色与所述虚拟角色之间的互动结果;Determining an interaction result between each interactive character and the virtual character based on the interaction information generated in the multi-character interaction and the interaction prompt words; 所述响应于用户创建所述多角色互动的创建请求,确定互动提示词,包括:The step of determining the interaction prompt word in response to the user's request to create the multi-role interaction includes: 根据所述创建请求中用户输入的互动关键词,使用预先训练好的大语言模型对互动关键词进行扩写,生成预设字数区间的提示词模板;根据所述提示词模板,生成所述互动提示词;所述预设字数区间根据训练过程中的模型训练效果确定,使得模型训练效果最好;Based on the interactive keyword input by the user in the creation request, the interactive keyword is expanded using a pre-trained large language model to generate a prompt word template with a preset word count range; based on the prompt word template, the interactive prompt word is generated; the preset word count range is determined based on the model training effect during the training process to achieve the best model training effect; 或者,响应于所述创建请求,实时或定时收集当前网络热点词汇;使用大语言模型基于所述当前网络热点词汇生成提示词模板;根据所述提示词模板,生成所述互动提示词;Alternatively, in response to the creation request, current network hot words are collected in real time or periodically; 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; 所述虚拟角色还作为所述多角色互动中的裁判,基于所述多角色互动中产生的互动信息和所述互动提示词,确定每个互动角色与所述虚拟角色之间的互动结果,包括:The virtual character also serves as a referee in the multi-role interaction, and determines the interaction result between each interactive character and the virtual character based on the interaction information generated in the multi-role interaction and the interaction prompt words, including: 针对每个互动角色,提取所述虚拟角色与该互动角色进行互动时产生的互动信息;For each interactive character, extracting interactive information generated when the virtual character interacts with the interactive character; 按照与该互动角色进行互动时产生的互动信息和所述互动提示词中包括的互动规则,确定该互动角色的互动表现,并作为与所述虚拟角色之间的互动结果,将互动结果反馈给用户;Determining the interactive performance of 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, and feeding back the interactive results to the user as the interactive results with the virtual character; 按照与该互动角色进行互动时产生的互动信息和所述互动提示词中包括的互动规则,确定该互动角色的互动表现,包括:Determining the interactive performance of 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, including: 从与该互动角色进行互动时产生的互动信息提取关键词;Extracting keywords from interactive information generated when interacting with the interactive character; 将关键词与预设的情绪变化词库进行匹配,确定该互动角色所引发的所述虚拟角色的情绪变化值;其中,所述虚拟角色根据不同角色的特点预设有对应的情绪变化词库;Matching the keyword with a preset emotion change vocabulary to determine the emotion change value of the virtual character caused by the interactive character; wherein the virtual character has a preset corresponding emotion change vocabulary according to the characteristics of different characters; 根据所述情绪变化值,确定对该互动角色与所述虚拟角色之间互动表现的评分值。A rating value for the interaction performance between the interactive character and the virtual character is determined based on the emotion change value. 2.根据权利要求1所述的方法,其特征在于,所述响应于用户创建所述多角色互动的创建请求,确定互动提示词,还包括:2. The method according to claim 1, wherein the step of determining an interaction prompt word in response to a user's request to create the multi-role interaction further comprises: 对所述创建请求中用户输入的互动信息进行处理,确定所述互动提示词;处理包括过滤和分词;Processing the interactive information input by the user in the creation request to determine the interactive prompt words; the processing includes filtering and word segmentation; 或者,响应于所述创建请求,显示预设的提示词模板;根据所述提示词模板,生成所述互动提示词。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. 3.根据权利要求2所述的方法,其特征在于,所述根据所述提示词模板,生成所述互动提示词,包括:3. The method according to claim 2, wherein generating the interactive prompt word according to the prompt word template comprises: 响应于用户对所述提示词模板的确认操作,将所述提示词模板确定为所述互动提示词;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.根据权利要求1所述的方法,其特征在于,所述响应于用户开启所述多角色互动的互动请求,确定所述互动角色,包括:4. The method according to claim 1, wherein 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 method 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.根据权利要求1或4所述的方法,其特征在于,所述响应于用户开启所述多角色互动的互动请求,确定所述互动角色,还包括:5. The method according to claim 1 or 4, wherein the determining the interactive roles in response to the user's request to start the multi-role interaction further comprises: 响应于第一用户开启所述多角色互动的互动请求,确定所述互动角色的目标数量;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 is created according to the difference between the target number and the number of created user roles. 6.根据权利要求1所述的方法,其特征在于,所述按照与该互动角色进行互动时产生的互动信息和所述互动提示词中包括的互动规则,确定该互动角色与所述虚拟角色之间的互动表现,还包括:6. The method according to claim 1, wherein 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 further comprises: 将与该互动角色进行互动时产生的互动信息和所述互动提示词中包括的互动规则实时发送给第一大语言模型,由所述第一大语言模型确定该互动角色与所述虚拟角色之间互动表现;Sending interactive information generated during the interaction 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. 7.根据权利要求1所述的方法,其特征在于,所述多角色互动包括至少一轮所述虚拟角色与每个互动角色之间的角色互动;所述方法还包括通过以下方式产生所述多角色互动中的互动信息:7. The method according to claim 1, wherein the multi-role interaction comprises at least one round of role interaction between the virtual character and each interactive character; the method further comprises 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. 8.根据权利要求1所述的方法,其特征在于,基于所述互动提示词,生成所述虚拟角色,包括:8. The method according to claim 1, wherein generating the virtual character based on the interactive prompt word comprises: 使用预先训练好的第二大语言模型,基于所述互动提示词,生成所述虚拟角色;其中,所述互动提示词与以下各项中的至少一项相关:互动场景、互动任务和互动规则。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: an interaction scene, an interaction task, and an interaction rule. 9.一种多角色互动装置,其特征在于,所述多角色互动包括至少一个虚拟角色和至少两个互动角色之间的互动;所述装置包括:9. A multi-role interaction device, characterized in that the multi-role interaction includes interaction between at least one virtual character and at least two interactive characters; the device comprises: 提示词确定模块,用于响应于用户创建所述多角色互动的创建请求,确定互动提示词;其中,所述互动提示词用于确定所述多角色互动的互动内容;A prompt word determination module is 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 interactive content of the multi-role interaction; 生成模块,用于基于所述互动提示词,生成所述虚拟角色;其中,所述虚拟角色作为所述互动角色的交互对象;A generating module, 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; 角色确定模块,用于响应于用户开启所述多角色互动的互动请求,确定所述互动角色,并开启所述多角色互动;其中,所述互动角色至少包括一个由用户操作的用户角色;a role determination module, configured to determine the interactive roles in response to a user's 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; 结果确定模块,用于基于所述多角色互动中产生的互动信息和所述互动提示词,确定每个互动角色与所述虚拟角色之间的互动结果;A result determination module, configured to determine the result of the interaction between each interactive character and the virtual character based on the interaction information and the interaction prompt words generated in the multi-character interaction; 所述提示词确定模块用于响应于用户创建所述多角色互动的创建请求,确定互动提示词时,所述提示词确定模块用于:The prompt word determination module is used to respond to the user's request to create the multi-role interaction and, when determining the interaction prompt word, the prompt word determination module is used to: 根据所述创建请求中用户输入的互动关键词,使用预先训练好的大语言模型对互动关键词进行扩写,生成预设字数区间的提示词模板;根据所述提示词模板,生成所述互动提示词;所述预设字数区间根据训练过程中的模型训练效果确定,使得模型训练效果最好;Based on the interactive keyword input by the user in the creation request, the interactive keyword is expanded using a pre-trained large language model to generate a prompt word template with a preset word count range; based on the prompt word template, the interactive prompt word is generated; the preset word count range is determined based on the model training effect during the training process to achieve the best model training effect; 或者,响应于所述创建请求,实时或定时收集当前网络热点词汇;使用大语言模型基于所述当前网络热点词汇生成提示词模板;根据所述提示词模板,生成所述互动提示词;Alternatively, in response to the creation request, current network hot words are collected in real time or periodically; 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; 所述虚拟角色还作为所述多角色互动中的裁判,所述结果确定模块在用于基于所述多角色互动中产生的互动信息和所述互动提示词,确定每个互动角色与所述虚拟角色之间的互动结果时,所述结果确定模块用于:The virtual character also serves as a referee in the multi-character interaction. When the result determination module is used to determine the interaction result between each interactive character and the virtual character based on the interaction information generated in the multi-character interaction and the interaction prompt words, the result determination module is used to: 针对每个互动角色,提取所述虚拟角色与该互动角色进行互动时产生的互动信息;For each interactive character, extracting interactive information generated when the virtual character interacts with the interactive character; 按照与该互动角色进行互动时产生的互动信息和所述互动提示词中包括的互动规则,确定该互动角色的互动表现,并作为与所述虚拟角色之间的互动结果,将互动结果反馈给用户;Determining the interactive performance of 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, and feeding back the interactive results to the user as the interactive results with the virtual character; 所述结果确定模块用于按照与该互动角色进行互动时产生的互动信息和所述互动提示词中包括的互动规则,确定该互动角色的互动表现时,所述结果确定模块用于:The result determination module is configured to determine the interactive performance of 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, and the result determination module is configured to: 从与该互动角色进行互动时产生的互动信息提取关键词;Extracting keywords from interactive information generated when interacting with the interactive character; 将关键词与预设的情绪变化词库进行匹配,确定该互动角色所引发的所述虚拟角色的情绪变化值;其中,所述虚拟角色根据不同角色的特点预设有对应的情绪变化词库;Matching the keyword with a preset emotion change vocabulary to determine the emotion change value of the virtual character caused by the interactive character; wherein the virtual character has a preset corresponding emotion change vocabulary according to the characteristics of different characters; 根据所述情绪变化值,确定对该互动角色与所述虚拟角色之间互动表现的评分值。A rating value for the interaction performance between the interactive character and the virtual character is determined based on the emotion change value.
CN202411609872.8A 2024-11-12 2024-11-12 Multi-role interaction method and device Active CN119476348B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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