Interaction method and device, electronic equipment and readable storage medium
By displaying historical conversation messages in the target session interface and using language models to generate interactive content, the problem of long loading time of virtual scene interaction system is solved, and a lightweight virtual character interaction method is provided to improve the user experience.
Patent Information
- Application Number
- CN202410104595.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2024-12-27
AI Technical Summary
The existing virtual scene interactive system has a long loading time and consumes a lot of resources, making it difficult for users to interact with virtual characters lightweightly in a short period of time.
The session area is displayed through the target session interface, historical session messages are displayed, and interactive content is generated based on the language model of virtual roles and users, providing a lightweight interaction method with virtual roles without entering the virtual scene.
It realizes interaction with virtual characters in a short time, improves user experience, provides a lightweight interaction solution, and reduces resource consumption.
Smart Images

Figure CN119202228A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an interaction method, device, electronic device and storage medium. Background Art
[0002] At present, interaction through virtual scenes is becoming more and more common in people's lives. People can interact with virtual characters in virtual scenes to complete a task. For example, if the virtual character is a virtual pet, you can feed the virtual pet to enhance the intimacy between you and the virtual pet.
[0003] However, entering the virtual scene interface to interact often has problems such as long loading time and large resources required, and is only suitable for scenarios where users want to interact with virtual characters in an immersive way.
[0004] But sometimes users do not have so much continuous time for immersive interaction, so some solutions are needed to meet users' needs for lightweight interaction with virtual characters such as pets. Summary of the invention
[0005] The embodiments of the present application provide an interaction method, device, electronic device and storage medium, which can provide a lightweight interaction solution between a user and a virtual character.
[0006] In a first aspect, an embodiment of the present application provides an interaction method, including:
[0007] Displaying a conversation area via a target conversation interface, the conversation area being used for a current user to have a conversation with a target virtual character, the target virtual character being a virtual character associated with the current user;
[0008] In the case where there are historical conversation messages between the current user and the target virtual character, at least part of the historical conversation messages are displayed via the conversation area, the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
[0009] In a second aspect, an embodiment of the present application further provides an interaction method, including:
[0010] Displaying a target virtual scene interface of a target game, the target virtual scene interface including a target virtual character and at least a portion of a virtual scene in which the target virtual character is located, and the target virtual scene interface also including interactive controls;
[0011] A conversation between the target virtual character and the current user is conducted based on historical conversation messages and historical interaction information between the current user and the target virtual character, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
[0012] In a third aspect, an embodiment of the present application further provides an interactive device, including:
[0013] An interface display unit, used to display a conversation area via a target conversation interface, wherein the conversation area is used for a current user to have a conversation with a target virtual character, wherein the target virtual character is a virtual character associated with the current user;
[0014] An interface conversation display unit is used to display at least part of the historical conversation messages via the conversation area when there are historical conversation messages between the current user and the target virtual character, the historical conversation messages occurring in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages being generated based on the language model corresponding to the target virtual character and / or the current user.
[0015] In a fourth aspect, an embodiment of the present application further provides an interactive device, including:
[0016] An interface conversation display unit, configured to display a target virtual scene interface, wherein the target virtual scene interface includes a target virtual character and at least a portion of a virtual scene in which the target virtual character is located, and the target virtual scene interface also includes interactive controls;
[0017] A conversation unit is used to conduct a conversation between the target virtual character and the current user based on historical conversation messages and historical interaction information between the current user and the target virtual character, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
[0018] In a fifth aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; a processor loads instructions from the memory to execute any one of the methods provided in the embodiment of the present application.
[0019] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute any one of the methods provided in the embodiment of the present application.
[0020] In the seventh aspect, the embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions, which are stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in the various optional implementations of the above embodiments.
[0021] By adopting the method of the embodiment of the present application, a conversation area can be displayed via a target conversation interface, wherein the conversation area is used for a current user to have a conversation with a target virtual character, wherein the target virtual character is a virtual character associated with the current user; in a case where there are historical conversation messages between the current user and the target virtual character, at least part of the historical conversation messages are displayed via the conversation area, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on a language model corresponding to the target virtual character and / or the current user, thereby providing a new way of interacting with the target virtual character by displaying the target conversation interface with the target virtual character on a content platform, and providing a lightweight interaction solution between the user and the virtual character without entering the virtual scene when interacting with the target virtual character. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 It is a schematic diagram of a flow chart of an embodiment of the interaction method provided in an embodiment of the present application;
[0024] Figure 2 This is a schematic diagram of a target message component provided in an embodiment of the present application;
[0025] Figure 3 This is another schematic diagram of the target message component provided in an embodiment of the present application;
[0026] Figure 4 This is another schematic diagram of the target message component provided in the embodiment of the present application;
[0027] Figure 5 is a schematic diagram of a target conversation interface provided in an embodiment of the present application;
[0028] Figure 6 It is a schematic diagram of mood bubbles provided in an embodiment of the present application;
[0029] Figure 7 is a schematic diagram of an interactive action control provided in an embodiment of the present application;
[0030] Figure 8 is a schematic diagram of a first interactive feedback information provided in an embodiment of the present application;
[0031] Fig. 9 is another schematic diagram of first interactive feedback information provided in an embodiment of the present application;
[0032] Fig.10 is a schematic diagram of a second interactive feedback information provided in an embodiment of the present application;
[0033] Fig.11 is another schematic diagram of second interactive feedback information provided in an embodiment of the present application;
[0034] Fig.12 This is a schematic diagram of a scenario of a current user active session provided by an embodiment of the present application;
[0035] Fig.13 This is another scenario schematic diagram of the current user active session provided by an embodiment of the present application;
[0036] Fig.14 This is a schematic diagram of a scenario in which a target virtual character actively converses in an embodiment of the present application;
[0037] Fig.15 This is another schematic diagram of a scenario in which a target virtual character actively converses in an embodiment of the present application;
[0038] Fig.16 This is another schematic diagram of a scenario in which a target virtual character actively converses in an embodiment of the present application;
[0039] Fig.17 It is a schematic diagram of triggering a jump control provided in an embodiment of the present application;
[0040] Fig.18 is a schematic diagram of a virtual world related to a target game provided in an embodiment of the present application;
[0041] Fig.19 This is a schematic diagram of a target conversation interface in a guiding state provided by an embodiment of the present application;
[0042] Fig. 20 is a schematic diagram of a game interface of a target game provided in an embodiment of the present application;
[0043] Fig.21 is a schematic diagram of a game interface of another target game provided in an embodiment of the present application;
[0044] Fig. 22This is a schematic diagram of the avatar widget editing area provided in an embodiment of the present application;
[0045] Fig.23 is a flowchart of another embodiment of the interaction method provided in the embodiment of the present application;
[0046] Fig.24 is a structural schematic diagram of an interactive device provided in an embodiment of the present application;
[0047] Fig.25 is another structural schematic diagram of the interactive device provided in an embodiment of the present application;
[0048] Fig.26 This is a flow chart of a conversation interaction method provided by an embodiment of the present application;
[0049] Fig. 27 This is a schematic diagram of the architecture of the conversation system in the embodiment of the present application;
[0050] Fig.28 This is a schematic diagram of the principle of the conversation interaction method in the embodiment of the present application;
[0051] Fig.29 This is a schematic diagram of setting the personality of a virtual character on a game adoption page in an embodiment of the present application;
[0052] Fig.30 This is a schematic diagram of performing conversation interaction in a target virtual scene interface in an embodiment of the present application;
[0053] Fig.31 is another structural schematic diagram of the conversation interaction device provided in an embodiment of the present application;
[0054] Fig.32 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0056] Before explaining the embodiments of the present application in detail, some terms involved in the embodiments of the present application are first explained.
[0057] Among them, in the description of the embodiments of the present application, the terms "first", "second", etc. may be used in this article to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0058] The embodiments of the present application provide an interactive method, device, electronic device and computer-readable storage medium. Specifically, the interactive method of the embodiments of the present application can be performed by an electronic device, wherein the electronic device can be a terminal or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0059] For example, the electronic device is explained using a terminal as an example. The terminal can display a conversation area via a target conversation interface, where the conversation area is used for a current user to have a conversation with a target virtual character, where the target virtual character is a virtual character associated with the current user; in the case where there are historical conversation messages between the current user and the target virtual character, at least part of the historical conversation messages are displayed via the conversation area, where the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on a language model corresponding to the target virtual character and / or the current user.
[0060] Based on the above problems, the embodiments of the present application provide an interaction method, device, electronic device and computer-readable storage medium, which can provide a lightweight interaction solution between users and virtual characters.
[0061] The following is a detailed description of the embodiments in conjunction with the accompanying drawings. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.
[0062] In this embodiment, a terminal is used as an example for description. This embodiment provides an interaction method, such as Figure 1 As shown, the specific process of the interaction method can be as follows:
[0063] 101. Displaying a conversation area via a target conversation interface, wherein the conversation area is used for a current user to have a conversation with a target virtual character, wherein the target virtual character is a virtual character associated with the current user.
[0064] The target virtual character may be any virtual object such as a virtual pet, a virtual animal, a virtual plant, etc. For example, the target virtual character may be a virtual pet adopted by the current user in the target game.
[0065] Among them, the conversation area can display conversations initiated by the target virtual character, such as "Hello", by issuing a greeting that can reflect the pet's personality, which can be used as an ice-breaking talk by the pet after petting the pet. It can also be initiated by the current user, and then the target virtual character will give an intelligent reply.
[0066] In this embodiment, a new way of interacting with the target virtual character is added by displaying the conversation interface with the target virtual character on the content platform, and the conversation interaction with the target virtual character is realized through the conversation area, which increases the fun of the interaction, shortens the interaction path between the current user and the target virtual character, assists the current user to improve the intelligence and personalization of the target virtual character, and greatly improves the interactivity between the current user and the target virtual character.
[0067] In some embodiments, the method may further include: the terminal may generate a target message component between the current user and the target virtual character in response to the current user establishing a preset association relationship with the target virtual character, and display the target message component via a message interface, so that the user can enter a target conversation interface in which the user can interact with the target virtual character by operating the target message component, that is, in response to triggering the target message component, trigger the display of the target conversation interface to enhance the interactivity with the virtual character.
[0068] For example, Figure 2 As shown, Figure 2The target message component, that is, the message component corresponding to "Xiao Ke" is displayed in the message interface shown, so that the user can enter the target conversation interface where the user can interact with the target virtual character by operating the message component corresponding to "Xiao Ke". Figure 2 The message interface shown in contains some functional controls, such as Figure 2 Other message components, "Like and Favorite" controls, "Add Follow" controls, "Comment and @" controls, "Home" controls, "Mall" controls, and "Me" controls, among which different controls display corresponding function interfaces to implement corresponding functions.
[0069] In addition, the terminal can also push character message content about the target virtual character through the system notification message in the terminal, and use the control carried by the system notification message as the target message component. It can be understood that the system notification message can be displayed on a content platform in the terminal, or on any interface of the terminal outside the content platform.
[0070] For example, Figure 3 As shown, the system notification message can be pushed through the note content interface on a content platform in the terminal, that is, Figure 3 In the system notification message displayed in the upper middle area, the "Reply" control carried is used as the target message component.
[0071] For example, Figure 4 As shown, the system notification message can be pushed on the homepage of the terminal outside the content platform in the terminal, that is, Figure 4 The system notification message displayed in the lower middle area serves as an entry point for a private message conversation with the target virtual character.
[0072] It can be understood that the above-mentioned message interface can be a message interface on the content platform in the terminal, and accordingly, the virtual scene where the above-mentioned target virtual character is located can also be a game scene on the same content platform; in addition, the above-mentioned message interface can be a message interface on the content platform in the terminal, but the virtual scene where the above-mentioned target virtual character is located can be a game scene on a third-party game platform associated with the content platform or associated with the terminal. The specific limitation can be made according to needs and is not set here.
[0073] Among them, the above-mentioned relationship includes but is not limited to adoption relationship, kinship relationship, etc.
[0074] For example, if the current user adopts a virtual pet in a virtual scene, a message component corresponding to the virtual pet can be added to the message interface on the content platform related to the virtual scene in the terminal, so that the current user can enter the next interface by operating the message component corresponding to the virtual pet to interact with the virtual pet, such as having a conversation.
[0075] Among them, the above-mentioned method of triggering the target message component can be a click operation, such as a single-click operation, a double-click operation, or a sliding operation, such as sliding the target message component in a certain direction, or a long press operation, such as pressing the target message component for a certain period of time, or a quick operation, such as pressing a shortcut key to trigger the triggering operation of the target message component. The specific setting can be based on needs and is not limited here.
[0076] The above-mentioned content platform may be a platform for users to share content and communicate with each other.
[0077] In some embodiments, the target conversation interface further includes an interactive area, in which the target virtual character is displayed for allowing the current user to interact with the target virtual character.
[0078] For example, Figure 5 As shown, Figure 5 The target conversation interface with the target virtual character is shown. Figure 5 As can be seen in Figure 5 The target virtual character in is a virtual dog. Figure 5 The upper area in the figure is the interactive area, where the current user can interact with the virtual dog, such as touching its head, playing games, and putting on clothes. Figure 5 The lower area in is the session area in the target session interface, that is, Figure 5 The area containing "just now" is where the current user can have a conversation with the target virtual character. Figure 5 An active conversation of the target virtual character is displayed in the video, "Hello, this is a greeting that can reflect the pet's personality. It can be used as an ice-breaking phrase for the pet to speak actively after you pet the pet." It can also be initiated by the current user, and then the target virtual character will give an intelligent reply.
[0079] In some embodiments, when the current user interacts with the target virtual character in the interactive area and / or conversation area of the target conversation interface, corresponding feedback information may be fed back at the target virtual character displayed in the interactive area to better demonstrate the interaction effect of the target virtual character.
[0080] Specifically, the terminal may display feedback information of the target virtual character in the interactive area in response to the current user's interaction with the target virtual character through the target conversation interface, wherein the feedback information includes at least one of a character animation and a mood bubble.
[0081] Among them, multiple keywords can be set, so that when a word consistent with a preset keyword appears in the conversation area, the animation corresponding to the keyword is triggered, and the animation corresponding to the target virtual character is displayed in the interactive area, such as the target virtual character's dancing animation, the target virtual character's circling animation, etc.
[0082] Among them, the above-mentioned mood bubbles can be generated according to the conversation in the conversation area and the interactive actions of the current user on the target virtual character in the interactive area, such as bubbles corresponding to angry mood, bubbles corresponding to happy mood, etc.
[0083] For example, Figure 6 As shown in the conversation area, the virtual dog sends the message "Super looking forward to it~" and then Figure 6 A heart-shaped mood bubble is displayed at the position of the target virtual character in the interactive area to indicate the virtual dog's current expected mood.
[0084] In some embodiments, the conversation area further includes: at least one interactive action control, each interactive action control corresponding to an interactive action for a target virtual character. Accordingly, the above method further includes: in response to a trigger operation for a target interactive action control in the at least one interactive action control, displaying in the conversation area first interactive feedback information of the target virtual character for the interactive action corresponding to the target interactive action control, and / or, displaying in the interactive area second interactive feedback information of the target virtual character for the interactive action corresponding to the target interactive action control, the second interactive feedback information including at least one of a feedback animation and a mood bubble of the target virtual character.
[0085] Among them, the interactive action corresponding to the above-mentioned interactive action control can be any action of interaction between the current user and the target virtual character, such as touching the head, playing games, putting on clothes, etc.
[0086] In this embodiment, the terminal can be provided with corresponding interactive feedback information for different interactive actions, and the interactive feedback information can be displayed in the conversation area or in the interactive area, or different information in the interactive feedback information can be displayed in the conversation area and the interactive area respectively, that is, the first interactive feedback information is displayed in the conversation area, and the second interactive feedback information is displayed in the interactive area, so as to enhance the interactivity between the current user and the target virtual character. It is understandable that the corresponding interactive action can be triggered while displaying the above feedback information.
[0087] The first interactive feedback information displayed in the conversation area may be a conversation message sent by the target virtual character, and / or feedback information displayed in a blank position in the conversation area, and the information may be composed of at least one element such as text, icon, symbol, etc.
[0088] For example, Figure 7 , Figure 8 and Fig. 9 As shown, Figure 7 The control 701 shown is an interactive action control corresponding to the interactive action "touching the head". If the interactive action control is a target interactive action control, the first interactive feedback information displayed in the conversation area may be: Figure 8 The feedback information displayed in the blank space below the conversation area as shown in the figure, "Little Ke is touched on the head, very happy", can also further include Fig. 9 The character message from the virtual dog shown is “Good morning! Be energetic today as well.”
[0089] For example, Fig.10 and Fig.11 As shown, if based on Fig.10 The interactive action control of the example interactive action "touching the head" is the target interactive action control, and the second interactive feedback information is displayed in the interactive area, which can be Fig.10 The feedback animation shown here consists of many hands, or it can be Fig.11 The bubble showing the expectation is shown. Since the first interactive feedback information and the second interactive feedback information can be displayed in the target conversation interface at the same time, Fig.11 As shown in the figure, the feedback message "The little one is patted on the head, very happy" is also displayed in the blank space below the conversation area.
[0090] In some embodiments, the method may further include: in response to a touch operation on the target virtual character in the interactive area, determining a target interactive action corresponding to the touch operation. Then, displaying third interactive feedback information of the target virtual character for the target interactive action in the conversation area, and / or displaying fourth interactive feedback information of the target virtual character for the target interactive action in the interactive area, wherein the fourth interactive feedback information includes at least one of a feedback animation and a mood bubble of the target virtual character.
[0091] Among them, the above-mentioned touch operation can be a sliding operation, such as sliding on the target virtual character, and the sliding operation can correspond to a stroking action at a corresponding position on the target virtual character; the above-mentioned touch operation can be a clicking operation, such as multiple clicking on the target virtual character, and the multiple clicks can correspond to a tapping action at a corresponding position on the target virtual character; the above-mentioned touch operation can be a shortcut gesture operation, a shortcut key operation, etc., which can be set specifically according to needs and is not limited here.
[0092] Among them, the corresponding descriptions of the above-mentioned third interactive feedback information and the above-mentioned fourth interactive feedback information can be respectively referred to the above-mentioned first interactive feedback information and the above-mentioned second interactive feedback information, and will not be repeated here.
[0093] 102. In a case where historical conversation messages exist between the current user and the target virtual character, at least part of the historical conversation messages are displayed via the conversation area, the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on a language model corresponding to the target virtual character and / or the current user.
[0094] Among them, the above-mentioned target virtual scene interface is the interface corresponding to the target virtual scene where the target virtual character is located. If the virtual scene where the target virtual character is located is the target game, then the above-mentioned historical conversation message may include the message information displayed on the game interface of the target game.
[0095] In some embodiments, it also includes: in the absence of historical conversation messages, displaying a character message from the target virtual character, wherein the character message is generated based on a character active conversation mechanism, or is generated by replying to a user message sent by the current user.
[0096] In the case where the character message is generated based on a reply to a user message sent by the current user, that is, when the current user actively engages in a conversation in the conversation area, the AI model or conversation function module corresponding to the target virtual character can generate a character message based on the character and current state of the target virtual character. The current state can be used to indicate the current state of the target virtual character, such as the mood, action, environment, etc. of the target virtual character in the game.
[0097] In some embodiments, the method further includes receiving and displaying a message from the current user via the conversation area, and displaying a reply from the target virtual character to the message sent by the user. The conversation area may also display a character message actively sent by the target virtual character so that the current user can reply to the message.
[0098] Specifically, the above-mentioned conversation function module needs to integrate AI technology and / or ChatGPT technology to realize real-time conversation, and provide feedback on emotions, messages and other information based on the current user's conversation to realize interaction between the virtual character and the current user.
[0099] For example, Fig.12 As shown, Fig.12 The following is a schematic diagram of the current user's active session scenario. Fig.12As can be seen from the figure, in the conversation area, the current user actively asks “Let me see how to get the new costume!”, and the AI model corresponding to the virtual dog can reply “Super looking forward to it~” based on the current user’s active words. At this time, the current user sends a new round of words “XXX content on the content platform is so good”, and accordingly, Fig.13 As shown, in Fig.13 The AI model corresponding to the virtual dog can respond again based on the current user’s new round of words: “Yes, I like watching XXX content the most.”
[0100] When the character message is generated based on the character active conversation mechanism, the target virtual character can actively talk in the conversation area to improve the interactivity between the target virtual character and the current user. That is, the character message of the target virtual character is displayed in the conversation area to guide the current user to reply.
[0101] In some embodiments, the step of generating a role message based on an active session mechanism may include: in response to the target virtual character satisfying a target session condition in a preset active session condition, obtaining a preset message corresponding to the target session condition as a role message actively sent by the target virtual character.
[0102] Among them, the above-mentioned active conversation condition can be sending a preset message to the current user at a preset time, such as sending "Good night" to the current user at night; the above-mentioned active conversation condition can be sending a preset message to the current user when it is detected that the current user enters the content platform or the target conversation interface between the current user and the target virtual character, such as "Roll around and ask for a touch~"; the above-mentioned active conversation condition can be sending a preset message to the current user when the target virtual character and the current user have not conducted any conversation within a preset time, such as "You haven't played with me for a long time, don't you miss me?"; the above-mentioned active conversation condition can be that when a certain behavior event is triggered, the target virtual character sends a preset message about the behavior event to the current user, such as "I brought back a YYY from XXX!", etc., thereby strengthening the personification of the target virtual character, strengthening the AI dialogue cognition, and enhancing the target virtual character's sense of social companionship for the current user.
[0103] Alternatively, the step of generating a role message based on the active session mechanism may also include:
[0104] Filtering a target memory from the historical memory of the target virtual character, and constructing first dialogue task prompt information based on the target memory and the user portrait of the current user;
[0105] A character message actively sent by the target virtual character is generated based on the first dialogue task prompt information through the language model of the target virtual character.
[0106] In some embodiments, the step of generating a character message by replying to a user message sent by the current user includes:
[0107] Based on the user message of the current user, acquiring at least a portion of the target memory matching the user message from the historical memory of the target virtual character;
[0108] Constructing first dialogue task prompt information based on the user message, the user portrait of the current user and the target memory;
[0109] A character message for the target virtual character to reply to the user message is generated based on the first dialogue task prompt information through the language model of the target virtual character.
[0110] In some embodiments, obtaining a user message from the current user includes:
[0111] When the conversation area displays a character message from the target virtual character, constructing second dialogue task prompt information based on the character message and the user portrait of the current user;
[0112] Simulating a reply of the current user to the role message based on the second task prompt information by using a language model corresponding to the current user to generate at least two candidate replies;
[0113] displaying the at least two candidate responses;
[0114] In response to a selection operation on a candidate reply, the selected candidate reply is displayed in the conversation area as a user message from the current user.
[0115] In some embodiments, it may also include: the terminal can obtain a user message from the current user and display the user message in the conversation area; wherein the user message includes a message input by the current user for editing through the target conversation interface, and / or a candidate reply selected from the candidate replies displayed via the target conversation interface.
[0116] Among them, the candidate replies displayed via the target conversation interface may be candidate replies that guide users to reply in response to character messages actively sent by the target virtual character in the scenario of the target virtual character's active conversation. The candidate replies are generated based on the historical behavior data of the current user in the virtual scene where the target virtual character is located and / or the content platform.
[0117] It is understandable that when the current user does not have an active conversation, the terminal can send a character message of the target virtual character based on the AI model corresponding to the virtual character to guide the current user to reply, thereby realizing a conversation between the two, and in the process of the conversation between the two, a reply prompt automatically generated by the AI model corresponding to the virtual character is displayed at each character message sent by the target virtual character, so that the user can choose from it for a quick reply. The current user may also not make a selection, but edit the content to reply by himself, that is, the current user edits the message entered through the target conversation interface.
[0118] For example, Fig.14 14 shows a scene of a virtual dog actively talking. Fig.14 As can be seen from the figure, in the conversation area, the virtual dog actively engages in conversation, and the corresponding character message "Hello, this is a greeting that reflects the pet's personality. It is used as an ice-breaking phrase for the pet to actively speak after being petted", as well as the candidate replies displayed for the character message, namely Fig.14 There are three candidate replies in the table, "I feel OK", "Let's talk about something else", and "What are you doing these days?" The current user can choose one of them to reply, such as Fig.15 As shown, Fig.15 In the example, the current user selects the candidate reply "I feel OK", so the terminal needs to cancel the display of the candidate reply and display the selected "I feel OK" as the user session information of the current user in the session area. In addition, the session can continue. Fig.16 As shown, from Fig.16 As can be seen from the figure, the virtual dog actively engages in conversation in the conversation area, and the corresponding character message "Let's play together!" is displayed, as well as the candidate replies displayed for the character message, namely Fig.16 There are three candidate replies, "XXXX game is very popular recently, let's play it together", "Let's talk about something else", and "What are you playing", and the current user can select one to continue replying.
[0119] In some embodiments, the interactive area further includes at least one jump control, and the jump control is used to enter a virtual world related to the target game after being triggered.
[0120] In this embodiment, the terminal sets a jump control to quickly jump from the current environment to another environment related to the target game where the target virtual character is located, so as to better interact with the target virtual character.
[0121] For example, Fig.17 As shown, Fig.17The "home" control and "world" control on both sides of the target virtual character in the interactive area are jump controls, so that the user can operate the "home" control to jump to the virtual world corresponding to the "home" control, which can be the above-mentioned target virtual scene interface, such as Fig.18 As shown, Fig.18 Shown is the virtual world corresponding to the "Home" controls to continue interacting with the target virtual character.
[0122] It is understandable that the jump control includes a target jump control for entering the game world of the target game, so the user can enter the game world of the target game by manipulating the target jump control, that is, the terminal can display the game interface of the target game in response to the triggering operation of the first jump control, and the game interface includes the target virtual character and at least one interactive control. The interactive control is used to interact with the target virtual character.
[0123] In some embodiments, in response to the triggering operation of the target message component, if the role interaction guiding event is satisfied, the target conversation interface in the guiding state is displayed through the content platform, such as Fig.19 As shown, in the above-mentioned target conversation interface in the guiding state, the interface proportion of the conversation area is smaller than the interface proportion of the above-mentioned interactive area, and the above-mentioned interactive area also includes interactive action guidance prompts for the above-mentioned target virtual character.
[0124] Among them, the above-mentioned character interaction guidance event may be that there is no session information between the current user and the target virtual character. The above-mentioned character interaction guidance event may also be that after the target session interface with the target virtual character is displayed, the target user performs character interaction guidance operations on the target session interface, such as shortcut gestures, shortcut keys, etc., and then displays the target session interface in the guidance state through the content platform.
[0125] The interactive action guidance prompt for the target virtual character may be provided by displaying an icon, such as Fig.19 The gesture icon in the figure is used to instruct the current user to touch the head of the target virtual character; the above-mentioned interactive action guidance prompt for the above-mentioned target virtual character can also be prompted by displaying prompt text, such as Fig.19 The “slide and touch Ta” in the text is used to instruct the current user to slide and touch the target virtual character.
[0126] In some embodiments, it may also include: the terminal can obtain historical conversation messages and historical interaction information between the current user and the target virtual character in the target conversation interface; trigger the storage of the historical conversation messages and historical interaction information in association with the historical conversation information generated in the target virtual scene interface, so as to obtain new training data for the target virtual character based on the associated stored historical conversation information and historical interaction information, and train the language model of the target virtual character.
[0127] In this embodiment, the server of the target virtual scene can better synchronize the emotions, personality, behavior, preference and other states of the target virtual character in the target virtual scene based on the above-mentioned historical session information and historical interaction information, that is, the impact on the target virtual character in the target session interface will cause corresponding changes in the target virtual scene, such as changes in the mood value and behavior of the target virtual character in the target virtual scene, thereby realizing information exchange between the target virtual character in different application scenarios, so that the target virtual character can be intelligent and personalized, so as to be closer to the interaction in the real scene. For example, when the target virtual character is a virtual pet, through this embodiment, the interaction method with the virtual pet can be more in line with the interaction with the pet in the real scene, and a real, interesting and more interactive interaction scene can be realized, so as to enhance the user experience and the long-term stickiness of the user in the game.
[0128] Specifically, if an artificial intelligence (AI) model is used to analyze the state of a virtual character's emotions, personality, behavior, and preferences, as well as changes in the mood and behavior of a target virtual character in a target virtual scene, the user's historical conversation information and historical interaction information in the target conversation interface can be collected, such as the user's description, questions, or concerns about the target virtual character. Then, a machine learning algorithm, especially natural language processing (NLP) technology, is used to analyze the historical conversation information and historical interaction information to establish a model to identify the virtual character's emotions and behavior patterns, which may include learning the virtual character's daily activity patterns, triggering events, etc., and then the model is optimized based on the model results and the current user's feedback to obtain a trained model, so as to analyze the state of the virtual character's emotions, personality, behavior, and preferences, as well as changes in the mood and behavior of the target virtual character in a target virtual scene through the trained model.
[0129] For example, Fig. 20 As shown, the terminal can send the historical conversation information and the historical interaction information to the server of the target virtual scene, so that the corresponding interface in the target virtual scene displays the conversation information of the current user continuing the conversation with the target virtual character, such as Fig. 20The message “You are off work! Have you had less coffee?” sent by the virtual dog in the game may be a character message generated based on the above historical conversation information and historical interaction information, and correspondingly, candidate replies corresponding to the character message are also displayed on the corresponding interface in the target game, such as Fig. 20 The three candidate replies are "Hahaha, yes, yes!", "I forgot about you these days" and "Let me think about how to explain it to you", and during the virtual dog's reply, corresponding prompt messages can be displayed, such as "Pet is replying, please wait", and prohibition of use. Fig. 20 After the conversation between the current user and the virtual dog ends, the game interface of the target virtual scene is displayed, such as Fig.21 The game interface shown in FIG. 1 includes multiple functional controls, such as Fig.21 The controls shown in the lower area and the controls shown in the upper area of the virtual dog. In the process of talking with the target virtual character in the target virtual scene, the target virtual character can provide corresponding interactive feedback, such as displaying at least one of the target virtual character's barking, feedback animation and mood bubbles.
[0130] In addition, a mood control for indicating the mood value of the target virtual character may be provided in the target virtual scene. The mood value of the target virtual character is affected by the interaction between the target virtual character and the current character, such as Fig.21 The heart-shaped icon below the avatar in the upper left corner is displayed in color when the mood value of the target virtual character is full, and as the mood value of the target virtual character decreases, the blank area of the heart-shaped icon increases.
[0131] In some embodiments, the terminal can respond to the triggering operation of the avatar of the current user in the target virtual scene interface, such as Fig.21 In the upper left corner of the avatar trigger operation, the avatar or avatar widget replacement interface for the current user is displayed, the interface includes an avatar replacement trigger control and an avatar widget replacement trigger control, and in response to a click operation on the avatar widget replacement trigger control, an avatar widget editing area is displayed, and the avatar widget editing area has at least one candidate avatar widget, such as Fig. 22 As shown, Fig. 22A plurality of candidate avatar pendants are displayed, so that the terminal can respond to the selection operation of the target avatar pendant in at least one candidate avatar pendant, associate the target avatar pendant with the target virtual character, and display it. Alternatively, the terminal can also respond to the avatar pendant drop event, determine the avatar pendant dropped in the current target virtual scene, and then respond to the wearing operation of the dropped avatar pendant to associate the dropped avatar pendant with the target virtual character. Among them, the above-mentioned avatar pendant drop event can be an event triggered when the current user explores the area in the target virtual scene, such as a certain area is provided with a "fortune hat", when the target virtual character controlled by the current user explores the area in the target virtual scene, the "fortune hat" is dropped, and the dropped "fortune hat" can be associated with the target virtual character in response to the current user's wearing operation of the dropped "fortune hat".
[0132] Accordingly, after adding or replacing an avatar pendant to the current user's avatar in the target virtual scene, the avatar pendant can also be synchronized to the target virtual character in the target virtual scene and the avatar of the current user on the content platform, so that the target virtual character can provide corresponding feedback, such as displaying mood bubbles.
[0133] In addition, there are avatar widgets to be unlocked in the above-mentioned avatar widget editing area. The avatar widget to be unlocked is a widget that the current user needs to perform a corresponding task before it can be unlocked. For example, it can be a conversation with the target virtual character for a certain length of time, or an interaction with the target virtual character for a certain length of time, or a corresponding interactive task with the target virtual character, etc. The specific settings can be made according to needs and are not limited here.
[0134] In some embodiments, the terminal may also respond to a widget triggering operation on a target virtual character in a target virtual scene interface by displaying a widget editing area of the target virtual character, wherein the widget editing area includes at least one type of widget triggering control, such as a headwear control, a glasses control, a necklace control, a scene control, etc., and respond to a triggering operation on a widget control of a target type in at least one type of widget triggering control by displaying a widget control editing interface of the target type, wherein at least one style of candidate widgets, such as Fig. 22 The headdress controls of different styles corresponding to the headdress controls shown respond to a triggering operation on a target pendant among candidate pendants of at least one style, and wear the target pendant on a target virtual character in a target virtual scene.
[0135] Accordingly, after the target pendant is worn on the target virtual character in the target virtual scene, the target pendant can also be synchronized to the avatar of the current user in the target virtual scene and the avatar of the current user on the content platform, and the target virtual character can provide corresponding feedback, such as displaying mood bubbles.
[0136] In addition, there are widgets to be unlocked in the above-mentioned avatar widget editing area. The widgets to be unlocked need to be unlocked by the current user after performing corresponding tasks. For example, it may be a conversation with the target virtual character for a certain duration, or an interaction with the target virtual character for a certain duration, or a corresponding interactive task with the target virtual character, etc. The specific settings can be made according to the needs and are not limited here.
[0137] In some embodiments, in the above target virtual scene, if the current user has a corresponding target virtual character, the avatar of the current user in the target virtual scene interface is displayed with the corresponding target virtual character, such as Fig.21 The avatar shown shows a virtual dog. If the target virtual character does not have a corresponding target virtual character, the virtual character adoption interface can be entered in response to the virtual character adoption trigger operation on the target virtual scene interface. The virtual character adoption interface includes at least one candidate virtual character. In response to the selection operation of the virtual character in the at least one candidate virtual character, the editing interface of the selected virtual character is displayed. The editing interface of the selected virtual character displays at least one display style of the selected virtual character. The display style can be different in color, size, shape, and texture. For example, if the selected virtual character is a cat, the selected virtual characters with different display styles can be black cats, calico cats, white cats, etc. Then, the terminal can associate the target virtual character with the current user in response to the selection operation of the target virtual character in the selected virtual characters with at least one display style.
[0138] In addition, the editing interface of the selected virtual character can also edit the selected virtual character, such as editing the color, editing the expression, etc., which can be set according to needs and is not limited here. Moreover, after selecting the target virtual character, a character name editing window can be displayed to edit the name of the target virtual character in the character name editing window.
[0139] In some embodiments, the terminal may display a character information editing interface in response to a trigger operation on editing the character information of the target virtual character, wherein the character information editing interface includes a character name editing window, and in response to an editing operation on the character name editing window, the character name of the target virtual character is changed.
[0140] In some embodiments, since music is generally provided in the target virtual scene, if the current user does not want to listen to the music in the target virtual scene, the terminal can turn off the music in the target virtual scene in response to the current user's closing operation on the music control on the target virtual scene interface.
[0141] In some embodiments, there may also be interactive action guidance prompts for the target virtual character in the target virtual scene, and the interactive action guidance prompts may be provided by displaying icons, such as Fig.19 The gesture icon in the figure is used to instruct the current user to touch the head of the target virtual character; the interactive action guidance prompt can also be provided by displaying prompt text, such as Fig.19 The “slide and touch Ta” in the text is used to instruct the current user to slide and touch the target virtual character.
[0142] From the above content, it can be seen that a conversation area can be displayed via a target conversation interface, wherein the conversation area is used for a current user to have a conversation with a target virtual character, wherein the target virtual character is a virtual character associated with the current user; in a case where there are historical conversation messages between the current user and the target virtual character, at least part of the historical conversation messages are displayed via the conversation area, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on a language model corresponding to the target virtual character and / or the current user. Thus, by displaying a target conversation interface with the target virtual character on a content platform, a new way of interacting with the target virtual character is added. When interacting with the target virtual character, there is no need to enter the virtual scene, thereby providing a lightweight interaction solution between the user and the virtual character.
[0143] In this embodiment, a terminal is used as an example for description. This embodiment also provides an interaction method, such as Fig.23 As shown, the specific process of the interaction method can be as follows:
[0144] 2301. Display a target virtual scene interface, wherein the target virtual scene interface includes a target virtual character and at least a portion of a virtual scene where the target virtual character is located, and the target virtual scene interface also includes interactive controls.
[0145] In this embodiment, the interactive control in the target virtual scene interface is used to indicate the interactive action with the target virtual character. The current user operates the interactive control to achieve the interaction with the target virtual character, such as touching the head.
[0146] 2302. Conduct a conversation between the target virtual character and the current user based on historical conversation messages and historical interaction information between the current user and the target virtual character, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on a language model corresponding to the target virtual character and / or the current user.
[0147] In this embodiment, the server of the target game can better synchronize the emotions, personality, behavior, preference and other states of the target virtual character in the target game based on the above-mentioned historical conversation messages and historical interaction information, that is, the impact on the target virtual character in the target conversation interface will cause corresponding changes in the target game, such as changes in the mood value and behavior of the target virtual character in the target game, and conduct a conversation between the above-mentioned target virtual character and the above-mentioned current user, thereby realizing information exchange between the target virtual character in different application scenarios, so that the target virtual character can be intelligent and personalized, so as to be closer to the interaction in the real scene. For example, when the target virtual character is a virtual pet, through this embodiment, the interaction method with the virtual pet can be made to be more in line with the interaction with the pet in the real scene, and a real, interesting and more interactive interaction scene can be realized, so as to improve the user experience and the long-term stickiness of the user in the game.
[0148] In order to better implement the above method, an embodiment of the present application further provides an interaction device, which can be specifically integrated into an electronic device, such as a computer device, which can be a terminal, a server, or other device.
[0149] Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a personal computer and other devices; the server can be a single server or a server cluster composed of multiple servers.
[0150] For example, in this embodiment, the method of the embodiment of the present application is described in detail by taking the interactive device specifically integrated in the terminal as an example. This embodiment provides an interactive device, such as Fig.24 As shown, the interaction device may include:
[0151] The first interface display unit 2401 is used to display a conversation area via a target conversation interface, where the conversation area is used for a current user to have a conversation with a target virtual character, where the target virtual character is a virtual character associated with the current user;
[0152] The conversation display unit 2402 is used to display at least part of the historical conversation messages via the conversation area when there are historical conversation messages between the current user and the target virtual character, the historical conversation messages occurring in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages being generated based on the language model corresponding to the target virtual character and / or the current user.
[0153] In some embodiments, the above-mentioned interaction device further includes a component generation unit, and the component generation unit is used to:
[0154] In response to the current user establishing a preset association relationship with the target virtual character, a target message component between the current user and the target virtual character is generated, and the target message component is displayed via a message interface;
[0155] In response to triggering the target message component, triggering display of the target conversation interface.
[0156] In some embodiments, the above-mentioned interaction device further includes a message generating unit, and the message generating unit is used to:
[0157] In the absence of historical conversation messages, a character message from the target virtual character is displayed, wherein the character message is generated based on a character active conversation mechanism, or is generated by replying to a user message sent by the current user.
[0158] In some embodiments, the message generating unit is specifically used for:
[0159] In response to the target virtual character satisfying a target session condition in a preset active session condition, obtaining a preset message corresponding to the target session condition as a role message actively sent by the target virtual character;
[0160] or,
[0161] Filtering a target memory from the historical memory of the target virtual character, and constructing first dialogue task prompt information based on the target memory and the user portrait of the current user;
[0162] A character message actively sent by the target virtual character is generated based on the first dialogue task prompt information through the language model of the target virtual character.
[0163] In some embodiments, the message generating unit is specifically used for:
[0164] Based on the user message of the current user, acquiring at least a portion of the target memory matching the user message from the historical memory of the target virtual character;
[0165] Constructing first dialogue task prompt information based on the user message, the user portrait of the current user and the target memory;
[0166] A character message for the target virtual character to reply to the user message is generated based on the first dialogue task prompt information through the language model of the target virtual character.
[0167] In some embodiments, the above-mentioned interaction device further includes a message acquisition unit, and the message acquisition unit is used to:
[0168] Obtaining a user message from the current user, and displaying the user message in the conversation area;
[0169] The user message includes a message input by the current user for editing through the target conversation interface, and / or a candidate reply selected from candidate replies displayed via the target conversation interface.
[0170] In some embodiments, the message acquisition unit is specifically used to:
[0171] When the conversation area displays a character message from the target virtual character, constructing second dialogue task prompt information based on the character message and the user portrait of the current user;
[0172] Simulating a reply of the current user to the role message based on the second task prompt information by using a language model corresponding to the current user to generate at least two candidate replies;
[0173] displaying the at least two candidate responses;
[0174] In response to a selection operation on a candidate reply, the selected candidate reply is displayed in the conversation area as a user message from the current user.
[0175] In some embodiments, the target conversation interface further includes an interactive area, in which the target virtual character is displayed for allowing the current user to interact with the target virtual character.
[0176] In some embodiments, the above-mentioned interactive device further includes a first interactive unit, and the first interactive unit is used to:
[0177] In response to the current user's interaction with the target virtual character through the target conversation interface, feedback information of the target virtual character is displayed for the target virtual character in the interactive area, wherein the feedback information includes at least one of a character animation and a mood bubble.
[0178] In some embodiments, the conversation area further includes: at least one interactive action control, each interactive action control corresponding to an interactive action for a target virtual character;
[0179] The method and the above-mentioned interactive device further include a second interactive unit, and the second interactive unit is used for:
[0180] In response to a trigger operation on a target interactive action control among the at least one interactive action control, first interactive feedback information of the target virtual character for the interactive action corresponding to the target interactive action control is displayed in the conversation area, and / or second interactive feedback information of the target virtual character for the interactive action corresponding to the target interactive action control is displayed in the interactive area, the second interactive feedback information including at least one of a feedback animation and a mood bubble of the target virtual character.
[0181] In some embodiments, the above-mentioned interactive device further includes a third interactive unit, and the third interactive unit is used to:
[0182] In response to a touch operation on the target virtual character in the interactive area, determining a target interactive action corresponding to the touch operation;
[0183] Displaying third interactive feedback information of the target virtual character in response to the target interactive action in the conversation area, and / or displaying fourth interactive feedback information of the target virtual character in response to the target interactive action in the interactive area, wherein the fourth interactive feedback information includes at least one of a feedback animation and a mood bubble of the target virtual character.
[0184] In some embodiments, the above-mentioned interaction device further includes a model training unit, and the model training unit is used to:
[0185] Acquire historical conversation messages and historical interaction information between the current user and the target virtual character in the target conversation interface;
[0186] Trigger the storage of the historical conversation messages and historical interaction information in association with the historical conversation information generated in the target virtual scene interface, so as to obtain new training data for the target virtual character based on the associated stored historical conversation information and historical interaction information, and train the language model of the target virtual character.
[0187] As can be seen from the above, the interactive device of this embodiment can display a conversation area through a target conversation interface, wherein the conversation area is used for the current user to have a conversation with a target virtual character, and the target virtual character is a virtual character associated with the current user; in the case where there are historical conversation messages between the current user and the target virtual character, at least part of the historical conversation messages are displayed through the conversation area, and the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user, thereby adding a new way of interacting with the target virtual character by displaying the target conversation interface with the target virtual character on the content platform. When interacting with the target virtual character, there is no need to enter the virtual scene, thereby providing a lightweight interaction solution between the user and the virtual character.
[0188] In order to better implement the above method, an embodiment of the present application further provides an interaction device, which can be specifically integrated into an electronic device, such as a computer device, which can be a terminal, a server, or other device.
[0189] Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a personal computer and other devices; the server can be a single server or a server cluster composed of multiple servers.
[0190] For example, in this embodiment, the method of the embodiment of the present application is described in detail by taking the interactive device specifically integrated in the terminal as an example. This embodiment provides an interactive device, such as Fig.25 As shown, the interaction device may include:
[0191] The second interface display unit 2501 is used to display a target virtual scene interface, wherein the target virtual scene interface includes a target virtual character and at least a portion of a virtual scene where the target virtual character is located, and the target virtual scene interface also includes interactive controls;
[0192] The conversation unit 2502 is used to conduct a conversation between the target virtual character and the current user based on historical conversation messages and historical interaction information between the current user and the target virtual character, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
[0193] In this embodiment, the server of the target game can better synchronize the emotions, personality, behavior, preference and other states of the target virtual character in the target game based on the above-mentioned historical conversation messages and historical interaction information, that is, the impact on the target virtual character in the target conversation interface will cause corresponding changes in the target game, such as changes in the mood value and behavior of the target virtual character in the target game, and conduct a conversation between the above-mentioned target virtual character and the above-mentioned current user, thereby realizing information exchange between the target virtual character in different application scenarios, so that the target virtual character can be intelligent and personalized, so as to be closer to the interaction in the real scene. For example, when the target virtual character is a virtual pet, through this embodiment, the interaction method with the virtual pet can be made to be more in line with the interaction with the pet in the real scene, and a real, interesting and more interactive interaction scene can be realized, so as to improve the user experience and the long-term stickiness of the user in the game.
[0194] The above embodiment describes the interaction between the target virtual character and the current user at the front end in this application. Here, this application also provides a solution for technically realizing the conversation between the target virtual character and the current user. Fig.26 The embodiment of the present application also provides an interactive conversation method, which can be implemented by a terminal device or a server. This example has no limitation on this. Fig.26 , the method comprises steps 2601-2605:
[0195] Step 2601: Acquire interaction information between the current user and a target virtual character, wherein the target virtual character is a virtual character in a target game that has a preset association relationship with the current user;
[0196] Step 2602: Obtain a user portrait of the current user;
[0197] Step 2603: Based on the interaction information, at least part of the target memory is obtained from the historical memory of the target virtual character, wherein the historical memory includes short-term memory and / or event memory, wherein the short-term memory includes the historical conversation between the current user and the target virtual character, and the event memory is extracted from the historical conversation between the current user and the target virtual character.
[0198] Step 2604: constructing first dialogue task prompt information based on the interaction information, the user portrait, and the target memory and inputting a first language model corresponding to the target virtual character, wherein the first language model is obtained by training based on at least the character portrait of the target virtual character;
[0199] Step 2605: Generate a role message of the target virtual character for the current user based on the first dialogue task prompt information through the first language model.
[0200] In this embodiment, the meanings of terms such as target game, target virtual character, and association relationship are as mentioned in the above examples and will not be repeated here.
[0201] Optionally, the interaction information in step 2601 may be obtained from a client, which may be a client of the content platform that provides the private message entrance, or a client of the target game, and this application has no limitation on this.
[0202] This application aims to provide users with AI interaction and dialogue with virtual characters such as pets. Through this application, pets will generate different personalities according to the user's preferences and form dialogue content that conforms to the characteristics of the personality in the conversation to interact with the user. As a result, AI pets can convey care and companionship to users, allowing users to feel unique emotional value, and use AI technology to give pets personality and dialogue capabilities, bringing more levels of interactivity. Virtual pets combine the data and conversation content within the platform to care for users and provide emotional value, forming memories of pets.
[0203] In order to facilitate a comprehensive understanding of the present application, some concepts and technical architectures in the present application are first explained here.
[0204] In order to improve the closeness of virtual character conversations to user lives, the present application designs character memory for virtual characters, which includes short-term memory and long-term memory. As can be seen from the naming, short-term memory has a short validity period and long-term memory has a long validity period. Optionally, long-term memory includes event memory obtained by precipitating short-term memory, which can effectively record events related to players and / or users, so that the character memory of the virtual character is not only related to the game world, but also close to the user's real life, thereby improving the closeness of the virtual character to the player during conversation.
[0205] In this example, the language model corresponding to the virtual character and the user can be an LLM (Large Language Model), which is a deep learning algorithm that can perform various natural language processing (NLP) tasks. Taking the virtual character as a pet as an example, in this example, three independent agents are constructed through the large prediction model, namely the pet agent (i.e. the first language model in this example), the owner agent (i.e. the second language model in this example), and the creator agent. In the context of LLM, the agent can be understood as an intelligent entity that can autonomously understand, plan and make decisions, and perform complex tasks.
[0206] This example takes the target virtual character as a pet as an example. Fig. 27 , describes the system architecture of this example. In this example, the conversation interaction system that completes the conversation interaction method includes: dialogue system, summary system, memory system, event system and memory retrieval system. Relying on these systems, the pet companion can appear more "understanding me", "unique" and story-telling.
[0207] To facilitate understanding, we first explain the role memories stored in the memory system, see the table below.
[0208]
[0209] The semantic memory mentioned above can include Fig. 27 The user portrait and role portrait in the user portrait include the user's main site behavior data, including interests, community category preferences (7 days), topic tag preferences, search terms (7 days); as well as the user's gender, age, location (city, province) and other information.
[0210] The character portrait may include: appearance settings (such as appearance and color), character nickname, character personality, character language characteristics (or language style) and response methods, as well as the world view settings and value settings related to the game world.
[0211] For example, a worldview + values setting could include "in a vibrant city that emphasizes freedom, equality, and humanism, pets and owners explore the world together and enjoy the fun of companionship and cooperation."
[0212] Optionally, exemplary descriptions of the virtual character's appearance settings (such as appearance, color), character personality, character language characteristics (or language style), and reply methods may include:
[0213] "Cat":"You are a cat. You have four paws, your tail will swing according to your mood, and your ears can shake. When communicating, please reply with the sound of "meow". Use different numbers of "meows" and use symbols (such as exclamation points or question marks) to reflect your emotional intensity and mood changes. For example, a short "meow" may indicate calmness, while continuous "meow meow meow!!!" may indicate excitement or nervousness. Please include action descriptions in your reply, such as: (licking fur lazily, with curiosity in his eyes) or (finding a warm nest and curling up to take a nap)",
[0214] Or, "Dog": "You are a dog. You have four paws and your tail will wag happily or hold it close to your body depending on your mood. Your ears can show your attention and mood state, such as standing up when excited or tilting slightly when curious. When communicating, you will add "woof woof" sounds to express emotions. A short "woof" may mean curiosity or attention, while a rapid series of "woof woof woof!!!" may show your excitement, joy or alertness.
[0215] In this example, the first language model simulates the personality of the target virtual character through preliminary training. Optionally, the preliminary training is to encode the appearance settings, goals, language features and response methods of the target virtual character into instructions, and then give them to the first language model to be trained for instruction analysis and dialogue generation, so as to learn the language style and personality features of the target virtual character for subsequent conversational interactions with users.
[0216] Among them, the dialogue system provides three modules: greeting, free conversation, and quick reply.
[0217] Greeting: The pet agent combines the memory system to actively initiate a conversation;
[0218] Free conversation: The pet agent combines the memory system + current conversation history to conduct free conversation;
[0219] Quick reply: The owner simulation agent simulates the owner's identity from the owner's perspective, generates a few reply phrases based on the pet's conversation, and continues the conversation with the pet.
[0220] For example, regarding greetings, this module can be understood as triggering the pet to actively output a character message without any input from the user.
[0221] In this scheme, the interaction information in step 2601 is empty, and the scheme for obtaining the target memory in step 2603 includes: responding to the active conversation event of the virtual character, and filtering out the target memory from the historical memory of the target virtual character based on the first memory selection rule.
[0222] Optionally, the virtual character active conversation event may include: the duration of the target virtual character not having a conversation with the current user exceeds a preset duration threshold.
[0223] The first memory selection rule can be configured according to actual needs, for example, the rule is: select the event memory with the latest timestamp, or select the event memory with the latest timestamp among the event memories related to the user. Fig.18 , the pet actively says hello and outputs the conversation.
[0224] For example, free dialogue can be understood as mobilizing other systems to conduct free dialogue based on user messages combined with memory systems and current dialogue history according to user messages input by the user. The interaction information may include the user message of the current user, and obtaining at least part of the target memory from the historical memory of the target virtual character based on the interaction information may include: obtaining related historical dialogues from the short-term memory based on the user message, and / or recalling related event memories from the event memory based on the user message to obtain the target memory.
[0225] Among them, obtaining the associated historical conversation from the short-term memory based on the user message may include: obtaining the context of the user message in the short-term memory as the associated historical conversation based on the user message, or identifying at least one conversation topic in the historical conversations in the short-term memory, and taking the historical conversations belonging to the same topic as the user message as the associated historical conversation.
[0226] In this example, if the interaction information is a non-conversational interaction behavior, obtaining at least part of the target memory from the historical memory of the target virtual character based on the interaction information may also include: based on a second memory selection rule, filtering out the target memory from the historical memory of the target virtual character, wherein the non-conversational interaction behavior includes the interaction behavior triggered by the current user on the client through operation of the interactive action control or touch operation with the target virtual character.
[0227] Optionally, interactive action controls can include Fig.15 1501 "touch" controls in the example, and any other configurable interactive action controls, the interactive actions include but are not limited to: ball throwing interaction, sit command interaction, etc.
[0228] Optionally, if the interaction information is a non-conversational interaction behavior, before constructing the first dialogue task prompt information, i.e., Prompt, the step further includes: updating the mood value of the target virtual character according to the non-conversational interaction behavior, and selecting a conversation text for the target virtual character or the current user from a candidate conversation library corresponding to the non-conversational interaction behavior according to the updated mood value. Correspondingly, the step of constructing the first dialogue task prompt information may include: constructing the first dialogue task prompt information according to the conversation text, the user portrait, and the target memory, and inputting the first language model.
[0229] Optionally, the mood value accumulation value may be determined according to the specific type of interactive action and / or triggering method (control or touch contact with the virtual pet), and the mood value accumulation value may be added to the initial mood value of the target virtual character to update the mood value.
[0230] Optionally, corresponding candidate conversation texts (including conversation texts of the target virtual character and the current user) may be set in the candidate conversation library for different mood values or mood value ranges, and matching conversation texts may be extracted from the conversation library according to the updated mood value.
[0231] The second memory selection rule is a rule corresponding to the non-interactive conversation behavior. Optionally, the second memory selection rule may include: random selection, or screening the target memory from the historical memory of the target virtual character based on the conversation text. For example, the target memory is obtained by obtaining the associated historical dialogue from the short-term memory based on the conversation text, and / or recalling the associated event memory from the event memory based on the conversation text.
[0232] In this example, combined Fig.28 , as well as the event system and summary system, provide example descriptions of the storage and retrieval of short-term and long-term memory.
[0233] It is understandable that historical conversations are constantly generated during the conversation between the user and the target virtual character. The present application can set a conversation summary condition. When the condition is met, the conversation summary instruction is triggered to perform event summary processing on the newly generated historical conversations that have not been processed for event summary.
[0234] Optionally, the session summary condition includes but is not limited to: the number of historical sessions generated after the previous session summary instruction meets the threshold requirement or the session duration meets the threshold requirement, for example, see Fig.28 , a user triggers a session summary instruction every 50 sessions or when the session time reaches 10 minutes.
[0235] The historical conversations generated between two conversation summary instructions may belong to short-term memory. That is, the short-term memory includes the conversations between the current user and the target virtual character after the latest conversation summary instruction;
[0236] Optionally, the step of acquiring the long-term memory includes: in response to a conversation summary instruction, acquiring historical conversation messages between the current user and the target virtual character from the time of the last conversation summary instruction to the time of the current conversation summary instruction; identifying event information based on the historical conversation messages to obtain event conversation messages associated with the event in the historical conversation messages; and extracting a summary of the event conversation messages to obtain event memory and store it.
[0237] Furthermore, in this example, the role memory needs to be closer to the user's life. When summarizing the conversation to extract events, the factual content mentioned by the user (for example, the user likes to drink coffee) can be recorded, as well as the understanding of the user's life details and behavioral habits to generate factual memory.
[0238] Optionally, obtaining historical conversation messages between the current user and the target virtual character during the period from the last conversation summary instruction to the current conversation summary instruction may include: obtaining historical conversation messages input by the current user during the period from the last conversation summary instruction to the current conversation summary instruction. Thus, the extracted events are more targeted to the user.
[0239] The compression and storage of short-term memory into event memory can be achieved through the summary system of this example.
[0240] Optionally, this example can also generate character events for the target virtual character and store them in the event memory to enrich the experience of the virtual character, make it more realistic and flexible, and enhance the realism of the interaction.
[0241] Optionally, the event system of this example can be used to output simulated events to the virtual character in the form of tasks to affect its memory. Optionally, the event system requires a large model to simulate specific events one by one. The event needs to contain event elements, such as time, place, at least one character, event content, and may contain a prop, and this event will be passed to each character involved in the event, affecting their memory. For example, yesterday a kitten took me (the target virtual character) for a bicycle ride and fell several times on the road. It hurts, please hug me.
[0242] Optionally, in this example, the short-term memory also includes: character events generated for the target virtual character after the latest session summary instruction, the character events including: prop events and / or city events of the target virtual character, the city events including events occurring in the virtual world of the target game, and / or events of interacting with interactive objects on the digital map in a digital map corresponding to a real geographical environment. The method also includes: in response to the session summary instruction, extracting the character events of the target virtual character from the short-term memory as event memory.
[0243] Optionally, prop events include but are not limited to events in which a virtual character obtains / uses props.
[0244] Optionally, props include but are not limited to costume props for virtual characters (can be used to dress up virtual characters or virtual homes of virtual characters in the game world), and costume props include but are not limited to: headwear such as Sichuan and Chongqing hot pot hats, glasses such as black sunglasses, neckwear such as blue seahorse wool scarves, and scenes such as grassland scenes.
[0245] In one example, city events include play events related to city buildings / maps that a pet encounters in a virtual game world.
[0246] Optionally, the character events are simulated or generated by the system and contain necessary event elements themselves, so they do not need to be summarized by the summary system and can be directly stored in the memory system.
[0247] Optionally, in this example, recalling the associated event memory from the event memory based on the user message to obtain the target memory may include:
[0248] Extracting features from the user message to obtain user session vector features;
[0249] Based on the user session vector feature and the event vector feature of each event memory, similarity calculation is performed to obtain the similarity between the user message and each event memory, and based on the similarity, the associated event memory of the user message is retrieved from the event memory.
[0250] Among them, recalling the target memory can be achieved through the memory retrieval system of this example, and the memory retrieval system can generate event vector feature storage for event memory in advance.
[0251] Optionally, the above similarity may include cosine similarity, Euclidean distance, etc., which is not limited in this example.
[0252] For example, based on the user's current query, a 1536-dimensional user session vector feature is generated, all memory contents in the event memory library are retrieved, and memory contents that are more relevant to the current query semantics are recalled through cosine similarity sorting.
[0253] Similarly, recalling associated event memories from the event memory based on the text information to obtain target memory may include: extracting features from the text information to obtain text information vector features; performing similarity calculation based on the text information vector features and the event vector features of each event memory to obtain the similarity between the text information and each event memory, and retrieving associated event memories of the text information from the event memory based on the similarity.
[0254] Optionally, in this example, the event memory has a timestamp, and the timestamp includes an event occurrence timestamp and / or a latest retrieval recall timestamp. The retrieving the associated event memory of the user message from the event memory based on the similarity includes:
[0255] performing a first sorting of the event memories based on the similarity;
[0256] Segmenting the user message to obtain a plurality of segmentation information, determining a second similarity between the user message and the event memory based on the segmentation information and each event memory, and performing a second sorting on the events according to the second similarity;
[0257] performing a third sorting of the event memories based on the timestamps;
[0258] Calculating the recall score of the event memory based on the results of the first sorting, the second sorting, and the third sorting of each event memory to obtain the recall score of the event memory;
[0259] According to the recall score, an associated event memory of the user message is determined from the event memory.
[0260] Optionally, when sorting by timestamp, you can sort by event occurrence timestamp or latest retrieval recall timestamp from recent to oldest.
[0261] Among them, based on the word segmentation information and each event memory, the second similarity between the user message and the event memory is determined, which can be obtained by item retrieval based on n-gram. Optionally, a calculation scheme for the second similarity may include: calculating the word frequency of the word segmentation information in each event memory, and determining the second similarity between the user message and the event memory based on the word frequency.
[0262] Optionally, the recall score of event memory is calculated based on the results of the first sorting, second sorting and third sorting of each event memory. When the recall score of event memory is obtained, the weight value corresponding to the sorting result of the event memory in each sorting can be determined, and the original recall score corresponding to the three kinds of information, namely, similarity, second similarity and timestamp, can be obtained. The recall score of event memory can be obtained by performing weighted summation based on the weight value and the original recall score.
[0263] In this example, the number of associated event memories is not limited and can be one or more, and optionally, the one with the highest recall score is selected as the associated event memory.
[0264] In this example, before step 2601, a character portrait of the target virtual character can also be input into the first language model as a character guide, wherein the character portrait includes character appearance attributes, character personality, character conversation method, and world settings of the target game.
[0265] The generating, by using the first language model and based on the first task prompt information, a role message of the target virtual character for the current user includes:
[0266] The character and character conversation method of the target virtual character are simulated by the first language model based on the character portrait, and a character message of the target virtual character for the current user is generated based on the first task prompt information.
[0267] In this example, a personality switching function of the virtual character is also provided. After the personality is switched, the virtual character in the conversation can use the new personality to start a conversation with the user.
[0268] In one example, each virtual character can be simulated using a first language model, but considering the demand for the number of virtual characters and the demand for variable personality traits of virtual characters, in an optional example, after the AI model training is completed, it can be compatible with multiple virtual character types and / or virtual character personalities, and different virtual character types / personalities are simulated using the same AI model. Optionally, in one example, the language model corresponding to the virtual character or user itself may not change during the conversation, but the event memory changes during the conversation. Through the continuous accumulation of event memory, the most relevant memory can be found during the memory retrieval process, allowing the virtual character to better understand the owner's mentality and past history in the current conversation, and thus better understand the owner.
[0269] Optional, see Fig.29 ,On the client, the game adoption homepage provides a prop selection function, where users can set or switch the personality of the target virtual character by switching the props used by the target virtual character.
[0270] For example, in Fig.29 On the adoption homepage, if you select sunglasses, the pet dog's personality is set to cold, and the cold personality is added to the character portrait. Instructions are generated to train the large language model. Through the personality training of the early AI algorithm, when the user selects different accessories to equip the pet, the corresponding personality attributes will be attached to the pet.
[0271] In an optional example, the language model corresponding to the virtual character can generate new training data based on the historical conversation messages and historical interaction information between the current user and the target virtual character, input the data into the first language model, and output a new character portrait of the target virtual character, or at least one new information in the character portrait, through the first language model. Optionally, the first language model can obtain a new character personality of the target virtual character based on the training data, and update the character portrait based on the new character personality. Thus, the interaction between the user and the target virtual character can further affect the character personality of the target virtual character, so that the target virtual character can form a character that meets the user's preferences in the interaction with the user, and form character messages that meet the characteristics of the character in the user's conversation to interact with the user.
[0272] In one example, the pet's personality can also be switched through user operations. For example, the pet dog's previous personality was aloof, but after using the starry sky hat, its personality becomes clingy. In this case, the character portrait of the memory system needs to be updated and synchronized to the first language model so that the model can be trained according to the new pet portrait (new pet personality) and complete the conversation with the user. Optionally, the method of this example can also include: receiving a character prop setting event, determining the target prop that is most recently set for the target virtual character; updating the character portrait according to the character personality corresponding to the target prop; generating a new character guide based on the updated character portrait and inputting it into the first language model, so that the first language model updates the character portrait of the target virtual character.
[0273] Optionally, the prop setting event includes but is not limited to: the first prop selection event, and the prop switching event.
[0274] Among them, the role guidance is used to instruct the first language simulation to simulate the virtual character according to the role portrait of the virtual character in the role guidance to complete the subsequent dialogue.
[0275] Optionally, the prop switching event can occur in the game world, or it can be generated when virtual characters interact in the virtual space provided by the content platform. This example has no restrictions on this.
[0276] In the present application, the conversation between the user and the target virtual character in the short-term memory may come from a conversation that occurs in the game world, or may come from a conversation between the virtual character and the user in a private message scenario, and this example has no restrictions on this.
[0277] This application dialogue system also provides a quick reply function. In the game or private message mode, when the user chats with the virtual character, the host agent can automatically generate quick replies for the user to choose based on the content.
[0278] Optionally, the method of this embodiment may further include:
[0279] In response to the user conversation recommendation event, constructing second dialogue task prompt information according to the role message of the target virtual role and the user portrait and inputting a corresponding second language model of the current user, wherein the second language model is trained based on at least the user portrait of the current user;
[0280] At least one candidate reply of the current user to the role message is generated based on the second dialogue task prompt information by the second language model, so as to display the candidate reply on the client for user selection.
[0281] Optionally, the user session recommendation events include but are not limited to: the target virtual character outputs interactive information (such as character messages or mood bubbles or feedback animations, etc.) and user input events. Optionally, the user input events include but are not limited to sending user messages, or triggering operations on input boxes, etc. Thus, candidate replies can be displayed in a timely manner for users to choose from.
[0282] Optionally, constructing the second dialogue task prompt information according to the character message of the target virtual character and the user portrait may include: constructing the second dialogue task prompt information according to the character message of the target virtual character, the latest user input information of the current user (including sent or deleted after input) and the user portrait.
[0283] For example, see Fig.30 The target virtual character actively outputs a role message in the game, "You are finally here. Why didn't you come to see me recently?" The user clicks the input box and inputs the conversation. According to the role message and the user input conversation and user portrait, a prompt can be constructed. The prompt can be input into the second language model to generate user messages. During the generation process, it is displayed Fig.30 The page shown in the middle shows a candidate conversation display box on the page, and a circular icon of the language prompt conversation generation is displayed in the candidate conversation display box. After the client obtains the generated candidate reply, the candidate reply is displayed in the candidate conversation display box (see Fig.30 ). When a user clicks on the candidate reply, the candidate reply is output as a user message to the target virtual object.
[0284] Therefore, this example implements the quick reply function.
[0285] Optionally, this application also combines Fig.28 , an example of the interaction method is explained by taking the target virtual character as a pet.
[0286] Optionally, the private message service backend can be understood as the service backend when the target virtual character interacts with the user in the target conversation interface. The backend can store the chat records between the target virtual user and the user, such as historical conversation messages. For every 50 conversation messages (or only user messages sent by the user) per 10 minutes of historical conversation, the summary system is triggered to extract event summaries based on the large model and obtain event memories for storage.
[0287] The user triggers a chat and inputs a query. The AI model extracts vector features from the query to obtain a user session vector, retrieves the target memory from the short-term memory (historical conversation records) and / or long-term memory (event memory) stored in the memory system, and reads the user portrait (the user features in the figure) in the semantic memory from the memory system. Based on the retrieved target memory and user portrait, a Prompt is constructed and output to the big model (pet agent). Based on the Prompt, the big model outputs the character message of the target virtual character (i.e., the AI result in the figure). The private message service backend sends the character message to the terminal device so that the terminal device can display the character message.
[0288] It is understandable that although this example is described using a private message scenario as an example, during the immersive interaction between the user and the target virtual character in the virtual scene, when the user has a conversation with the target virtual character, the generation scheme of the character message is similar to the above.
[0289] Adopting the solution of this example, in the conversation content, let AI generate the pet's memory to associate the user's conversation content. Pet memory = long-term memory + short-term memory. Long-term memory includes event memory and semantic memory. Event memory is realized by using the summary function to record the factual content mentioned by the user (for example, the user likes to drink coffee) and the understanding of the user's life details and behavioral habits; semantic memory includes long-term unchanged information such as pet language style, personality characteristics, system settings, user portraits, etc.; short-term memory is to store events in recent conversations. The long-term and short-term content is handed over to AI for analysis and generation, so that the pet's personality and conversation are closer to the user. Therefore, the generation of pet's personality and reply function through AI algorithm is not only for the pet to intelligently and accurately feedback to the user, but also to realize the emotional connection between the pet and the user, forming a more real emotional bond, so that users can get more emotional value in the pet game. This combination provides players with a more intimate and more closely connected game world.
[0290] For example, this embodiment provides a conversation interaction device, which can be integrated in a terminal or in a server, and this example has no limitation on this. Fig.31 As shown, the conversation interaction device may include:
[0291] The information acquisition unit 3101 is used to acquire the interaction information between the current user and the target virtual character, wherein the target virtual character is a virtual character in the target game that has a preset association relationship with the current user;
[0292] A portrait acquisition unit 3102 is used to acquire a user portrait of the current user;
[0293] A memory acquisition unit 3103 is used to acquire at least part of the target memory from the historical memory of the target virtual character based on the interaction information, wherein the historical memory includes short-term memory and / or event memory, wherein the short-term memory includes the historical conversation between the current user and the target virtual character, and the event memory is extracted from the historical conversation between the current user and the target virtual character;
[0294] A control unit 3104 is configured to construct first dialogue task prompt information based on the interaction information, the user portrait, and the target memory, and input a first language model corresponding to the target virtual character, wherein the first language model is trained based on at least the character portrait of the target virtual character;
[0295] The processing unit 3105 is configured to generate a role message of the target virtual character for the current user based on the first dialogue task prompt information by using the first language model.
[0296] Optionally, in one example, the interaction information is empty, or the interaction information includes: a user message input by the current user for the target virtual character, or a non-conversational interaction behavior of the current user for the target virtual character;
[0297] A memory acquisition unit is used to, if the interaction information is empty, respond to an active conversation event of the virtual character and filter out a target memory from the historical memory of the target virtual character based on a first memory selection rule; if the interaction information is a user message of the current user, obtain related historical conversations from the short-term memory based on the user message, and / or recall related event memories from the event memory based on the user message to obtain the target memory; if the interaction information is a non-conversational interaction behavior, filter out the target memory from the historical memory of the target virtual character based on a second memory selection rule, wherein the non-conversational interaction behavior includes an interaction behavior triggered by the current user on the client through operation of an interactive action control or touch operation with the target virtual character.
[0298] Optionally, in one example, if the interaction information is a non-conversational interaction behavior, the device further includes: a conversation acquisition unit, configured to update the mood value of the target virtual character according to the non-conversational interaction behavior before constructing the first dialogue task prompt information, and select a conversation text for the target virtual character or the current user from a candidate conversation library corresponding to the non-conversational interaction behavior according to the updated mood value;
[0299] The control unit is used to construct first dialogue task prompt information and input a first language model according to the conversation text, the user portrait and the target memory.
[0300] Optionally, in one example, the memory acquisition unit is used to:
[0301] Extracting features from the user message to obtain user session vector features;
[0302] Based on the user session vector feature and the event vector feature of each event memory, similarity calculation is performed to obtain the similarity between the user message and each event memory, and based on the similarity, the associated event memory of the user message is retrieved from the event memory.
[0303] Optionally, in one example, the short-term memory includes the conversation between the current user and the target virtual character after the latest conversation summary instruction;
[0304] The device further comprises: an event memory extraction unit, which is used to:
[0305] In response to the conversation summary instruction, obtaining historical conversation messages between the current user and the target virtual character during the period from the last conversation summary instruction to the current conversation summary instruction;
[0306] Performing event information identification based on the historical conversation messages to obtain an event conversation message associated with the event in the historical conversation messages;
[0307] The event session message is abstracted and extracted to obtain event memory and store it.
[0308] Optionally, in one example, the short-term memory further includes: character events generated for the target virtual character after the latest session summary instruction, the character events including: prop events and / or city events of the target virtual character, the city events including events occurring in the virtual world of the target game, and / or events of the target virtual character interacting with interactive objects on the digital map in a digital map corresponding to a real geographical environment;
[0309] The event memory extraction unit is also used to extract the character events of the target virtual character from the short-term memory as event memory in response to the conversation summary instruction.
[0310] Optionally, in one example, the event memory has a timestamp, and the timestamp includes an event occurrence timestamp and / or a latest retrieval recall timestamp, and the memory acquisition unit is used to:
[0311] performing a first sorting of the event memories based on the similarity;
[0312] Segmenting the user message to obtain a plurality of segmentation information, determining a second similarity between the user message and the event memory based on the segmentation information and each event memory, and performing a second sorting on the events according to the second similarity;
[0313] performing a third sorting of the event memories based on the timestamps;
[0314] Calculating the recall score of the event memory based on the results of the first sorting, the second sorting, and the third sorting of each event memory to obtain the recall score of the event memory;
[0315] According to the recall score, an associated event memory of the user message is determined from the event memory.
[0316] Optionally, in one example, the device further includes:
[0317] A guidance unit, configured to input a character portrait of the target virtual character as a character guide into the first language model, wherein the character portrait includes character appearance attributes, character personality, character conversation mode, and a world setting of the target game;
[0318] The processing unit is used for:
[0319] The character and character conversation method of the target virtual character are simulated by the first language model based on the character portrait, and a character message of the target virtual character for the current user is generated based on the first task prompt information.
[0320] Optionally, in one example, the device further includes:
[0321] The character portrait updating unit is used to receive a character prop setting event, determine the target props newly set for the target virtual character; update the character portrait according to the character personality corresponding to the target props; generate a new character guide based on the updated character portrait and input it into the first language model, so that the first language model updates the character portrait of the target virtual character.
[0322] Optionally, in one example, the device further includes:
[0323] The user conversation recommendation unit is used to respond to the user conversation recommendation event, construct second dialogue task prompt information according to the character message of the target virtual character and the user portrait, and input the corresponding second language model of the current user, wherein the second language model is trained based on at least the user portrait of the current user; and generate at least one candidate reply of the current user to the character message based on the second dialogue task prompt information through the second language model, so as to display the candidate reply on the client for user selection.
[0324] Using the device of this example, the first language model is trained based on the character portrait of the target virtual character, which can realize the personality simulation of the target virtual character, and the target memory and user portrait obtained from the historical memory of the target virtual character based on the interaction information can guide the model to be closer to the user and the user's life when generating character messages.
[0325] Accordingly, the embodiment of the present application also provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Fig.32 As shown, Fig.32 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 3200 includes a processor 3201 having one or more processing cores, a memory 3202 having one or more computer-readable storage media, and a computer program stored in the memory 3202 and executable on the processor. The processor 3201 is electrically connected to the memory 3202. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0326] The processor 3201 is the control center of the electronic device 3200. It uses various interfaces and lines to connect various parts of the entire electronic device 3200, executes various functions of the electronic device 3200 and processes data by running or loading software programs and / or modules stored in the memory 3202, and calling data stored in the memory 3202, thereby monitoring the electronic device 3200 as a whole.
[0327] In the embodiment of the present application, the processor 3201 in the electronic device 3200 will load the computer program corresponding to the process of one or more application programs into the memory 3202 according to the following steps, and the processor 3201 will run the application program stored in the memory 3202 to implement various functions:
[0328] Displaying a conversation area via a target conversation interface, the conversation area being used for a current user to have a conversation with a target virtual character, the target virtual character being a virtual character associated with the current user;
[0329] In the case where there are historical conversation messages between the current user and the target virtual character, at least part of the historical conversation messages are displayed via the conversation area, the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
[0330] The following functions can also be realized:
[0331] Displaying a target virtual scene interface, the target virtual scene interface including a target virtual character and at least a portion of a virtual scene where the target virtual character is located, and the target virtual scene interface also includes interactive controls;
[0332] A conversation between the target virtual character and the current user is conducted based on historical conversation messages and historical interaction information between the current user and the target virtual character, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
[0333] Therefore, the electronic device 3200 provided in this embodiment can bring the following technical effects: providing a lightweight interaction solution between the user and the virtual character.
[0334] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0335] Optional, such as Fig.32 As shown, the electronic device 3200 further includes: a touch screen 3203, a radio frequency circuit 3204, an audio circuit 3205, an input unit 3206, and a power supply 3207. The processor 3201 is electrically connected to the touch screen 3203, the radio frequency circuit 3204, the audio circuit 3205, the input unit 3206, and the power supply 3207, respectively. Those skilled in the art can understand that Fig.32The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0336] The touch display screen 3203 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 3203 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-EmittingDiode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 3201, and can receive the command sent by the processor 3201 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 3201 to determine the type of touch event, and then the processor 3201 provides corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 3203 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 3203 can also be used as a part of the input unit 3206 to realize the input function.
[0337] The radio frequency circuit 3204 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals between the network device or other electronic devices.
[0338] The audio circuit 3205 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 3205 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 3205 and converted into audio data, and then the audio data is output to the processor 3201 for processing, and then sent to another electronic device through the radio frequency circuit 3204, or the audio data is output to the memory 3202 for further processing. The audio circuit 3205 may also include an earplug jack to provide communication between an external headset and an electronic device.
[0339] The input unit 3206 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0340] The power supply 3207 is used to supply power to various components of the electronic device 3200. Optionally, the power supply 3207 can be logically connected to the processor 3201 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. The power supply 3207 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0341] although Fig.32 Not shown, the electronic device 3200 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0342] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0343] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0344] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute any of the interaction methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:
[0345] Displaying a conversation area via a target conversation interface, the conversation area being used for a current user to have a conversation with a target virtual character, the target virtual character being a virtual character associated with the current user;
[0346] In the case where there are historical conversation messages between the current user and the target virtual character, at least part of the historical conversation messages are displayed via the conversation area, the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
[0347] You can also perform the following steps:
[0348] Displaying a target virtual scene interface, the target virtual scene interface including a target virtual character and at least a portion of a virtual scene where the target virtual character is located, and the target virtual scene interface also includes interactive controls;
[0349] A conversation between the target virtual character and the current user is conducted based on historical conversation messages and historical interaction information between the current user and the target virtual character, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
[0350] It can be seen that the computer program can be loaded by the processor to execute any of the interaction methods provided in the embodiments of the present application, thereby bringing about the following technical effects: providing a lightweight interaction solution between users and virtual characters.
[0351] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0352] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0353] Since the computer program stored in the computer-readable storage medium can execute any one of the interaction methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the interaction methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0354] The above is a detailed introduction to an interactive method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An interactive method, characterized in that: include: Displaying a conversation area via a target conversation interface, the conversation area being used for a current user to have a conversation with a target virtual character, the target virtual character being a virtual character associated with the current user; In the case where there are historical conversation messages between the current user and the target virtual character, at least part of the historical conversation messages are displayed via the conversation area, the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
2. The interactive method according to claim 1, characterized in that: The method further comprises: In response to the current user establishing a preset association relationship with the target virtual character, a target message component between the current user and the target virtual character is generated, and the target message component is displayed via a message interface; In response to triggering the target message component, triggering display of the target conversation interface.
3. The interactive method according to claim 1, characterized in that: Also includes: In the absence of historical conversation messages, a character message from the target virtual character is displayed, wherein the character message is generated based on a character active conversation mechanism, or is generated by replying to a user message sent by the current user.
4. The interactive method according to claim 3, characterized in that: The steps of generating role messages based on the active conversation mechanism include: In response to the target virtual character satisfying a target session condition in a preset active session condition, obtaining a preset message corresponding to the target session condition as a role message actively sent by the target virtual character; or, Filtering a target memory from the historical memory of the target virtual character, and constructing first dialogue task prompt information based on the target memory and the user portrait of the current user; A character message actively sent by the target virtual character is generated based on the first dialogue task prompt information through the language model of the target virtual character.
5. The interactive method according to claim 3, characterized in that: The step of replying to generate a role message based on the user message sent by the current user includes: Based on the user message of the current user, acquiring at least a portion of the target memory matching the user message from the historical memory of the target virtual character; Constructing first dialogue task prompt information based on the user message, the user portrait of the current user and the target memory; A character message for the target virtual character to reply to the user message is generated based on the first dialogue task prompt information through the language model of the target virtual character.
6. The interactive method according to claim 1, characterized in that: Also includes: Obtaining a user message from the current user, and displaying the user message in the conversation area; The user message includes a message input by the current user for editing through the target conversation interface, and / or a candidate reply selected from candidate replies displayed via the target conversation interface.
7. The interactive method according to claim 6, characterized in that: Get user messages from the current user, including: When the conversation area displays a character message from the target virtual character, constructing second dialogue task prompt information based on the character message and the user portrait of the current user; Simulating a reply of the current user to the role message based on the second task prompt information by using a language model corresponding to the current user to generate at least two candidate replies; displaying the at least two candidate responses; In response to a selection operation on a candidate reply, the selected candidate reply is displayed in the conversation area as a user message from the current user.
8. The method according to any one of claims 1 to 7, characterized in that: The target conversation interface further includes an interactive area, in which the target virtual character is displayed for allowing the current user to interact with the target virtual character.
9. The interactive method according to claim 8, characterized in that: Also includes: In response to the current user's interaction with the target virtual character through the target conversation interface, feedback information of the target virtual character is displayed for the target virtual character in the interactive area, wherein the feedback information includes at least one of a character animation and a mood bubble.
10. The interactive method according to claim 8, characterized in that: The conversation area further includes: at least one interactive action control, each interactive action control corresponding to an interactive action for a target virtual character; The method further comprises: In response to a trigger operation on a target interactive action control among the at least one interactive action control, first interactive feedback information of the target virtual character for the interactive action corresponding to the target interactive action control is displayed in the conversation area, and / or second interactive feedback information of the target virtual character for the interactive action corresponding to the target interactive action control is displayed in the interactive area, the second interactive feedback information including at least one of a feedback animation and a mood bubble of the target virtual character.
11. The interactive method according to claim 8, characterized in that: Also includes: In response to a touch operation on the target virtual character in the interactive area, determining a target interactive action corresponding to the touch operation; Displaying third interactive feedback information of the target virtual character in response to the target interactive action in the conversation area, and / or displaying fourth interactive feedback information of the target virtual character in response to the target interactive action in the interactive area, wherein the fourth interactive feedback information includes at least one of a feedback animation and a mood bubble of the target virtual character.
12. The interactive method according to claim 8, characterized in that: Also includes: Acquire historical conversation messages and historical interaction information between the current user and the target virtual character in the target conversation interface; Trigger the storage of the historical conversation messages and historical interaction information in association with the historical conversation information generated in the target virtual scene interface, so as to obtain new training data for the target virtual character based on the associated stored historical conversation information and historical interaction information, and train the language model of the target virtual character.
13. An interactive method, characterized in that: include: Displaying a target virtual scene interface, the target virtual scene interface including a target virtual character and at least a portion of a virtual scene where the target virtual character is located, and the target virtual scene interface also includes interactive controls; A conversation between the target virtual character and the current user is conducted based on historical conversation messages and historical interaction information between the current user and the target virtual character, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
14. An interactive device, characterized in that: The device comprises: A first interface display unit, configured to display a conversation area via a target conversation interface, wherein the conversation area is used for a current user to have a conversation with a target virtual character, wherein the target virtual character is a virtual character associated with the current user; A conversation display unit is used to display at least part of the historical conversation messages via the conversation area when there are historical conversation messages between the current user and the target virtual character, the historical conversation messages occurring in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages being generated based on the language model corresponding to the target virtual character and / or the current user.
15. An interactive device, characterized in that: The device comprises: A second interface display unit, configured to display a target virtual scene interface, wherein the target virtual scene interface includes a target virtual character and at least a portion of a virtual scene in which the target virtual character is located, and the target virtual scene interface also includes interactive controls; A conversation unit is used to conduct a conversation between the target virtual character and the current user based on historical conversation messages and historical interaction information between the current user and the target virtual character, wherein the historical conversation messages occur in the target conversation interface and / or the target virtual scene interface, and at least part of the historical conversation messages are generated based on the language model corresponding to the target virtual character and / or the current user.
16. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 13.
17. A computer-readable storage medium, characterized in that: The method comprises a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any one of the methods of claims 1 to 13.
Citation Information
Cited By
Session display method and device, electronic equipment, storage medium and program product
CN121078019A
Method and apparatus for interaction in virtual scene, electronic device, computer-readable storage medium, and computer program product
WO2026200434A1
