Interaction method and device, medium, electronic equipment and computer program product

By using the behavior tree generation model to generate target behavior sequences in the game, the problem of single NPC interaction response is solved, and the diversity interaction and user experience improvement of NPC is achieved.

CN119733230AActive Publication Date: 2025-04-01BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510054171.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-04-01
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

The interaction response of NPCs in existing games relies on the plot and behavior tree logic written by a large number of planners, resulting in the feedback performance of NPCs being single and fixed, and it is impossible to pre-written through massive enumeration to deal with players' diverse interactive actions and input languages.

Method used

By displaying the virtual scene interface, responding to interactive operations, it is determined whether there is a behavior that responds to interactive information in the behavior tree of the target virtual character. If it does not exist, the target behavior sequence is generated based on the interaction information and the behavior tree generation model, and the target virtual character is controlled to respond.

Benefits of technology

In the interaction process of target virtual characters, interactive scripts are generated in real time and dynamically based on the behavior tree generation model to improve the interaction diversity of NPCs. It is suitable for diverse interaction scenarios of different players, save manual workload, and improve the level of anthropomorphism and user interaction experience in virtual scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119733230A_ABST
    Figure CN119733230A_ABST
Patent Text Reader

Abstract

The invention discloses an interaction method and device, a medium, electronic equipment and a computer program product, and the method comprises the steps: displaying a virtual scene interface which comprises at least one virtual character; responding to the received interaction operation in the virtual scene interface, and obtaining interaction information corresponding to the interaction operation; whether a behavior responding to the interaction information exists in a behavior tree of a target virtual character or not is determined, the behavior tree of the target virtual character comprises a plurality of behavior sequences of the target virtual character, and the target virtual character is at least one of virtual characters in the virtual scene interface; if no behavior responding to the interaction information exists in the behavior tree, generating a target behavior sequence based on the interaction information and a behavior tree generation model; and controlling the target virtual character to respond to the interaction information based on the target behavior sequence. Therefore, the interaction diversity of the target virtual character can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to an interaction method, device, medium, electronic device, and computer program product. Background Art

[0002] In many game projects, the interactive response of NPC (non-player character) behavior usually relies on the plot and behavior tree logic settings written by a large number of planners, so that the NPC's response can basically conform to the direction of the game plot. In related technologies, it is usually necessary to manually pre-set a large number of complex rules. However, since players have a large number of interactive actions and input languages, this cannot be pre-written through massive enumeration, resulting in NPC feedback performance being relatively simple and fixed. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides an interaction method, the method comprising: Displaying a virtual scene interface, wherein the virtual scene interface includes at least one virtual character; In response to receiving an interactive operation in the virtual scene interface, acquiring interactive information corresponding to the interactive operation; Determining whether there is a behavior in a behavior tree of a target virtual character that responds to the interaction information, wherein the behavior tree of the target virtual character includes a plurality of behavior sequences of the target virtual character, and the target virtual character is at least one of the virtual characters in the virtual scene interface; If there is no behavior in the behavior tree that responds to the interaction information, generating a target behavior sequence based on the interaction information and a behavior tree generation model; The target virtual character is controlled to respond to the interaction information based on the target behavior sequence.

[0005] In a second aspect, the present disclosure provides an interactive device, the device comprising: A first display module, used to display a virtual scene interface, wherein the virtual scene interface includes at least one virtual character; A first acquisition module, configured to, in response to receiving an interaction operation in the virtual scene interface, acquire interaction information corresponding to the interaction operation; A first determination module is used to determine whether there is a behavior in a behavior tree of a target virtual character that responds to the interaction information, wherein the behavior tree of the target virtual character includes a plurality of behavior sequences of the target virtual character, and the target virtual character is at least one of the virtual characters in the virtual scene interface; A first generating module, configured to generate a target behavior sequence based on the interaction information and a behavior tree generation model if there is no behavior in the behavior tree that responds to the interaction information; A control module is used to control the target virtual character to respond to the interaction information based on the target behavior sequence.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processing device.

[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] In the above technical solution, when determining the response of the target virtual character to the interactive information, if there is no behavior in the behavior tree that responds to the interactive information, the target behavior sequence can be directly generated based on the interactive information and the behavior tree generation model to control the target virtual character to respond. Thus, during the interaction process of the target virtual character, a series of interactive scripts can be generated in real time and dynamically for the current interactive information based on the behavior tree generation model, thereby improving the diversity of the interaction of the target virtual character. At the same time, the method provided by the present disclosure does not require the pre-enumeration of a large number of behavior sequences for the behavior tree. For scenes that are not configured with behavior sequences in the behavior tree, the target virtual character can be controlled to perform reasonable feedback responses, so as to be applicable to the diverse interactive scenes of different players, thereby improving the scope of application of the method disclosed herein, and while saving manual workload, the level of anthropomorphism displayed by the virtual characters in the virtual scene can be improved, thereby improving the diversity of user interactions and interactive experience.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 It is a flowchart of an interaction method provided according to an embodiment of the present disclosure.

[0012] Figure 2 is a schematic diagram of a behavior tree provided according to an embodiment of the present disclosure.

[0013] Figure 3 is a schematic diagram of a behavior tree provided according to an embodiment of the present disclosure.

[0014] Figure 4 is a schematic diagram of a behavior tree provided according to an embodiment of the present disclosure.

[0015] Figure 5 is a schematic diagram of a behavior tree provided according to an embodiment of the present disclosure.

[0016] Figure 6 It is a schematic diagram of the architecture of an interaction method provided according to an embodiment of the present disclosure.

[0017] Figure 7 It is a block diagram of an interaction device provided according to an embodiment of the present disclosure.

[0018] Figure 8 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0020] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0021] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0022] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0023] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0025] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0026] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0027] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0028] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0029] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0030] Figure 1 As shown, it is a flowchart of an interactive method provided according to an embodiment of the present disclosure, such as Figure 1 As shown, the method may include: In step 11, a virtual scene interface is displayed, wherein the virtual scene interface includes at least one virtual character.

[0031] The virtual scene interface may be an environment interface of a virtual character rendered in a computer, such as a game scene interface. The virtual character may be a non-player character, i.e., an NPC, and may be controlled by a computer, and one or more virtual characters may be set in a virtual scene in a preconfigured manner.

[0032] In step 12, in response to receiving an interactive operation in the virtual scene interface, interactive information corresponding to the interactive operation is obtained.

[0033] The interactive operation may be initiated by the user or by other virtual characters in the virtual scene interface.

[0034] As an example, a user can interact with a target virtual character in a virtual scene by controlling the actions of the corresponding player character in the virtual scene. For example, when the user U1 controls the player character B1 to walk towards the virtual character VA and the distance is less than the distance threshold, the virtual character VA can be triggered to display an interactive button, and the user can click the interactive button to trigger the interactive operation with the virtual character VA. For example, the user can enter the text "Please recommend some delicious bread", and the text entered by the user can be used as the interactive information. For example, the user can control his player character B1 to enter a bakery to take bread, then the interactive operation is the operation of the user taking bread, and the corresponding interactive information can be information describing the user taking bread, such as the type and quantity of bread taken by the user, etc., which can be configured based on the actual application scenario.

[0035] As another example, if the interactive operation is initiated by other virtual characters in the virtual scene interface, the virtual characters can be controlled in the virtual scene interface according to their corresponding behavior plans. For example, if the virtual character VA can be a bakery clerk, the virtual character VA can be controlled to take inventory of bread in the bakery based on the behavior plan. When other virtual characters VB walk into the bakery, the operation of other virtual characters VB walking into the bakery can be used as an interactive operation, and the virtual character VB entering the bakery and related information of the virtual character VB can be used as the interactive information, so that the target virtual character VA can respond, such as VA can output a text or voice displaying "Welcome".

[0036] The interactive operation may specify the interactive operation of the virtual character, such as directly selecting the virtual character VA for interaction in the above-mentioned example. The interactive operation may be an interactive operation without specifying a virtual character in a virtual scene, such as when a user inputs the text "Who wants to sing a song?" in a virtual scene interface, the virtual character in the virtual scene interface may determine whether it needs to respond to the interactive information based on the interactive information input by the user.

[0037] In step 13, it is determined whether there is a behavior that responds to the interactive information in the behavior tree of the target virtual character, wherein the behavior tree of the target virtual character contains multiple behavior sequences of the target virtual character, and the target virtual character may be at least one of the virtual characters in the virtual scene interface.

[0038] As an example, if a virtual character corresponding to the interactive operation is selected in the interactive operation, the designated virtual character is the target virtual character. If the user interacts with the virtual character VA in the example described above, the virtual character VA can be determined as the target virtual character.

[0039] As another example, if the virtual character corresponding to the interactive operation is not selected in the interactive operation, the target virtual character can be determined by the object initiating the interactive operation. The object initiating the interactive operation can be a user or a virtual character. Taking the user as an example, the virtual character whose distance from the player character B1 controlled by the user in the virtual scene interface is less than the distance threshold can be used as a candidate virtual character. For each candidate virtual character, it can be determined by the large language model LLM (Large Language Model) based on the context of the user in the interactive process whether the candidate virtual character needs to respond to the interactive information. For example, a first prompt can be constructed based on the context of the user in the interactive process, so that the large language model can analyze whether the candidate virtual character needs to respond. If it is determined that the candidate virtual character needs to respond, the candidate virtual character is used as the target virtual character. If the user enters the text "Who wants to sing a song?" in the virtual scene interface, the determined candidate virtual characters are H1, H2, and H3. The target virtual characters determined by the large language model are H1 and H2. For another example, a second prompt may be constructed based on the user's context during the interaction and each candidate virtual character, and the second prompt may be input into the large language model so that the large language model can determine the target virtual character that needs to respond to the interaction information from the candidate virtual characters.

[0040] Among them, the Behavior Tree is used to describe the behavior and decision-making process of AI (Artificial Intelligence). It consists of multiple nodes, each of which represents a behavior or a decision, and is connected together in a specific way to form a tree structure. In the behavior tree, the root node is the starting point of the AI, and the behavior of the AI ​​is determined by traversing the child nodes. The behavior tree can usually contain multiple types of nodes to describe the behavior, such as sequential nodes, selection nodes, conditional nodes, behavior nodes, parallel nodes, modified nodes, etc., which can be configured based on the actual application scenario and are not limited to this.

[0041] Initially, a behavior sequence can be generated by pre-configuring multiple behaviors that the target virtual character can perform based on the task analysis of the target virtual character. Figure 2 Shown is the behavior tree for the initial configuration.

[0042] In this step, the obtained interaction information can be matched with the behavior tree to determine whether there is a behavior in the behavior tree that responds to the interaction information. If there is, the target virtual character can be controlled based on the matched behavior in the behavior tree so that the target virtual character can respond to the interaction information.

[0043] In step 14, if there is no behavior in the behavior tree that responds to the interaction information, a target behavior sequence is generated based on the interaction information and the behavior tree generation model, wherein the target behavior sequence may be a behavior subtree containing multiple nodes, and the behavior tree generation model may be implemented based on LLM. For example, an input prompt text prompt may be constructed based on the interaction information, such as "Please use the available nodes in the project to combine the following interaction information to generate a branch sequence, the interaction information is XXXX", so that nodes and sequences may be generated based on the behavior tree generation model, and the node representation of the behavior tree, such as the behavior tree, may be represented in json format.

[0044] If there is no behavior in the behavior tree that responds to the interactive information, it means that the target virtual character's response to the interactive information has not been configured in the behavior tree, that is, the corresponding interaction is not configured in the behavior tree during the initial configuration. In this scenario, it is difficult to determine how the target virtual character should respond to the interactive operation through the behavior tree. For example, the user can enter the text "Please recommend some delicious bread", if the behavior tree is not pre-configured with the behavior of the target virtual character to respond to the text, it is difficult to determine how the target virtual character should respond based on the behavior tree. In this embodiment, the target behavior sequence can be dynamically generated based on the interactive information to respond to the interactive information. For example, when the player brings the NPC to a new scene, if the behavior sequence is not configured for the scene, the NPC can perceive the current scene information in real time, such as props, furniture, buildings, and weather, so that the target behavior sequence in the scene can be automatically generated based on the behavior tree generation model.

[0045] In step 15, the target virtual character is controlled to respond to the interaction information based on the target behavior sequence.

[0046] As an example, the instructions corresponding to the nodes can be executed according to the types of nodes in the target behavior sequence, so that the target virtual character's actions or displays can be controlled based on the instructions. For example, if the target behavior sequence contains behavior nodes A1 and A2, for example, behavior node A1 indicates moving to the vicinity of croissants, and behavior node A2 indicates outputting the text "Croissants are more recommended", then the target virtual character's actions can be controlled based on the target behavior sequence, such as controlling the target virtual character VA to move to the vicinity of croissants and outputting the text "Croissants are more recommended". The text can also be output in the form of a dialogue bubble at the dialogue position corresponding to the target virtual character, so that the user can view the text to achieve interaction. For another example, the text can be output in the form of voice, such as generating a voice corresponding to the output text based on the output text and speech synthesis technology, thereby outputting the voice to achieve voice interaction with the user. The specific output method can be set based on the actual application scenario, and the present disclosure does not limit this.

[0047] Among them, the target behavior sequence is implemented based on the structure of the behavior tree. The method of controlling the target virtual character to respond to the interactive information based on the target behavior sequence can be the same as the method of controlling the target virtual character based on the behavior sequence of the behavior tree in the art, which will not be repeated here.

[0048] Therefore, in the above technical solution, when determining the response of the target virtual character to the interactive information, if there is no behavior in the behavior tree that responds to the interactive information, the target behavior sequence can be directly generated based on the interactive information and the behavior tree generation model to control the target virtual character to respond. Therefore, during the interaction process of the target virtual character, a series of interactive scripts can be generated in real time and dynamically for the current interactive information based on the behavior tree generation model, thereby improving the diversity of the interaction of the target virtual character. At the same time, the method provided by the present disclosure does not require the pre-enumeration of massive behavior sequences for the behavior tree. For scenes that are not configured with behavior sequences in the behavior tree, the target virtual character can be controlled to perform reasonable feedback responses, so as to be applicable to the diverse interactive scenes of different players, thereby improving the scope of application of the method disclosed in the present disclosure, and while saving manual workload, the level of anthropomorphism displayed by the virtual characters in the virtual scene can be improved, thereby improving the diversity of user interactions and interactive experience.

[0049] In some embodiments, the behavior sequence includes a judgment condition, such as the judgment condition may be a condition corresponding to a judgment node in the behavior sequence. In a hostile NPC scene, when the player is within the field of view, the player is attacked if the player is within the attack range, and the player is pursued if the player is not within the attack range. The conditional nodes may include I1 (player is within the field of view), I2 (player is within the attack range), and I3 (player is not within the attack range).

[0050] Accordingly, the determining whether there is a behavior in the behavior tree of the target virtual character that responds to the interaction information may include: The interaction information is matched with judgment conditions in a plurality of behavior sequences in the behavior tree.

[0051] As an example, the interactive information and the judgment conditions in the behavior sequence can be matched based on the RAG (Retrieval-Augmented Generation) technology, and the matching method can be matched based on the general RAG method, which is not limited here. As another example, the interactive information and the judgment conditions in the behavior sequence of the behavior tree can also be directly matched by similarity calculation, such as determining the feature vector of the interactive information and the feature vector of the judgment condition by text splitting and encoding, and then performing similarity calculation based on the above feature vector to obtain the similarity between the interactive information and each judgment condition.

[0052] If the judgment condition is matched, the behavior corresponding to the matched judgment condition is determined as the behavior of responding to the interactive information.

[0053] As an example, if there are judgment conditions whose similarity exceeds a preset threshold, the judgment condition with the greatest similarity is used as the matched judgment condition. If the interactive information is that the player enters the attack range, the judgment condition I2 can be matched, and the behavior corresponding to the judgment condition I2, that is, attacking the player, is further determined as a behavior that responds to the interactive information, that is, controlling the target virtual character to attack the player, thereby realizing the interaction between the two.

[0054] If the judgment condition is not matched, it is determined that there is no behavior in the behavior tree that responds to the interaction information.

[0055] As another example, if there is no judgment condition with a similarity exceeding a preset threshold, it is determined that the judgment condition is not matched. If the interaction information is that the player is not within the field of view, and the judgment condition is not matched in this scenario, it is considered that there is no behavior in the behavior tree that responds to the interaction information, that is, the interaction of the target virtual character feedback cannot be determined based on the behavior tree.

[0056] Therefore, through the above technical solution, by matching the interaction information with the judgment conditions in the behavior tree, it is possible to quickly and directly determine whether there is a behavior in the behavior tree that responds to the interaction information, so that the behavior of the target virtual character can be quickly controlled based on the existing behavior sequence in the behavior tree to improve the response efficiency of the target virtual character.

[0057] In some embodiments, generating a target behavior sequence based on the interaction information and a behavior tree generation model may include: Based on the interaction information and the intent classification model, an interaction intent corresponding to the interaction information is determined.

[0058] Among them, the intention classification model can be implemented based on the LLM model. For example, the prompt text prompt can be constructed based on the interaction information to determine the interaction intention of the interaction operation. Based on the intention classification model, the behavior sequence of the interaction operation can be determined to provide data reference for the subsequent determination of the response behavior of the target virtual character. If the user inputs the text "I don't feel well" to the NPC, the interaction information can be input into the intention classification model, and it is determined that the interaction intention corresponding to the interaction information is friendly. Among them, the optional classification of the intention classification model can be pre-set based on the actual application scenario, and the present disclosure is not limited to this.

[0059] Afterwards, based on the interaction information, the interaction intention and the behavior tree generation model, a target behavior sequence of the target virtual character is generated, wherein the target behavior sequence is a behavior subtree formed based on a combination of multiple nodes.

[0060] As an example, a prompt text prompt can be constructed based on the interaction information and the interaction intent to input into the behavior tree generation model, thereby obtaining the node information generated by the behavior tree generation model and a behavior sequence composed of multiple nodes.

[0061] Therefore, through the above technical solution, the interaction intention can be determined based on the interaction information, and the interaction intention can be combined with the analysis when generating the target behavior sequence, which can increase the accuracy and diversity of the input data of the behavior tree generation model. At the same time, the interaction intention can clearly reflect the interaction emotions between the player and the target virtual character, so that the target virtual character can generate a target behavior sequence that matches the interaction intention according to the player's interaction intention, thereby ensuring the consistency of the interaction between the user and the target virtual character and further improving the user experience.

[0062] In some embodiments, the method may further include: Obtain object association information of the target virtual character, wherein the object association information includes environment information of a virtual environment where the target virtual character is located and / or state information of the target virtual character.

[0063] The environment information may include object information of objects that can interact with the virtual environment, such as information of other virtual characters, props information in the virtual environment, and scene information of the virtual environment, such as weather information. The state information of the target virtual character may be attribute information of the target virtual character itself, such as the target virtual character's emotional value, hunger, favorability, and other information. The update of the state information of the target virtual character may be updated and maintained based on a common method in the art. Accordingly, in this step, the object association information may be obtained through the data interface corresponding to the above-mentioned object association information.

[0064] Accordingly, the generating a target behavior sequence based on the interaction information and the behavior tree generation model may include: A target behavior sequence of the target virtual character is generated based on the interaction information, the object association information, and the behavior tree generation model.

[0065] As an example, a prompt text prompt can be constructed based on the interaction information, interaction intention and object association information to input into the behavior tree generation model, thereby obtaining the node information generated by the behavior tree generation model and a behavior sequence composed of multiple nodes, so that the generated target behavior sequence can include the feedback behavior of the target virtual character itself, and can also include the interaction between the target virtual character and objects in the virtual environment (such as props and environment).

[0066] Therefore, through the above technical scheme, it is possible to further obtain information related to the target virtual character in the virtual scene, thereby providing more and more comprehensive data support for the generation of the target behavior sequence of the target virtual character, which can not only improve the accuracy of the determined target behavior sequence, but also improve the diversity of the interactive objects of the target virtual character in the determined target behavior sequence to a certain extent, while ensuring the matching degree between the target behavior sequence and the virtual environment, and improving the fit of controlling the target virtual character in the virtual environment.

[0067] In some embodiments, generating the target behavior sequence of the target virtual character based on the interaction information, the interaction intention and the behavior tree generation model may include: Based on the interaction information, the interaction intention and the first model, a response intention of the target virtual character to respond to the interaction information is obtained.

[0068] As an example, a prompt text prompt can be constructed based on the interaction information and the interaction intention to input the first model to obtain the response intention of the target virtual character to the interaction information, that is, the target of the target virtual character's response. For example, in the above example, if the user inputs the interaction information "feeling uncomfortable", the response intention of the target virtual character can be predicted through the first model, such as determining that the response intention is "instructing the player to rest and provide support when necessary", so that the final goal of the target virtual character's response can be determined.

[0069] Based on the interaction information, the response intention, the candidate interaction operation list of the target virtual character and the second model, the target behavior sequence is obtained, wherein the interaction operation indicated by each behavior node of the target behavior sequence is any one of the candidate interaction operation list, and the behavior tree generation model includes the first model and the second model.

[0070] Accordingly, in this step, the behavior sequence that the target virtual character needs to perform to complete the intention can be further derived based on the determined response intention. As an example, the second model can be implemented based on the LLM model. Multiple candidate interactive operations that the target virtual character can perform can be pre-configured based on actual application scenarios, such as moving, taking, talking, etc., which can be stored through a candidate interactive operation list. In this step, a prompt text prompt can be constructed based on the interactive information, the response intention, and the candidate interactive operation list of the target virtual character to input the second model so that the second model can analyze and determine the target interactive operation from the candidate interactive operation list based on the response intention. As an example, the prompt text input by the second model can also contain the object association information of the target virtual character, and the object corresponding to the target interactive operation can be determined based on the object association information. Then, a behavior tree can be constructed based on the target interactive operation and its corresponding object to obtain the target behavior sequence.

[0071] Continuing with the example above, based on Figure 2 A3 and A4 in the behavior tree control the target virtual character to move to the player and nod to respond to the user input text. After that, the virtual character controlled by the player does not respond to the response behavior of the target virtual character. At this time, based on the interactive information of the player's response behavior to the target virtual character (i.e., the behavior of not responding to the approach of the target virtual character), a target behavior sequence is generated, such as Figure 3 , S1 is the determined target behavior sequence, such as Figure 3 As shown, the parameters of behavior node A5 are expressed as follows: {"type": "MoveNextTo", "target": "Tent", "distance": "Near"} The parameters of behavior node A6 are expressed as follows: {“gestureHoldName”: “Drink”, “holdItemName”: “Beverage”} Therefore, based on the behavior node A5, the target virtual character can be controlled to move to the vicinity of the tent, and based on the behavior node A6, the target virtual character can be controlled to drink a beverage to achieve interaction.

[0072] Therefore, through the above technical scheme, by generating the response intention of the target virtual character, the response result of the target virtual character can be predicted, and then the behavior sequence can be inferred in combination with the response intention. On the one hand, the accuracy and effectiveness of the generated target behavior sequence can be guaranteed, and on the other hand, the accuracy of the response when controlling the target virtual character based on the target behavior sequence can be guaranteed, thereby improving the user experience.

[0073] In some embodiments, the method further comprises: Based on the interaction information and the behavior tree, an insertion position of the target behavior sequence in the behavior tree is determined.

[0074] As an example, the interaction information and the nodes in the behavior tree may be fuzzy matched, and the node with the greatest matching degree may be used as the parent node of the target behavior sequence, that is, as the insertion position.

[0075] As another example, the interaction intention corresponding to the interaction information can be determined based on the interaction information, and the determination method has been described in detail above and will not be repeated here. Further, based on the interaction intention and in combination with the environment information of the target virtual character's environment and the nodes in the behavior tree, fuzzy matching can be performed, and the node with the largest matching degree is used as the parent node of the target behavior sequence, that is, as the insertion position.

[0076] The target behavior sequence is inserted into the behavior tree based on the insertion position, an updated behavior tree is obtained, and the updated behavior tree is sent to a server.

[0077] In this step, the target behavior sequence can be inserted into the behavior tree with the node corresponding to the insertion position as the parent node. Figure 2 As shown in FIG. 1 , the insertion position of the target behavior sequence S1 is determined to be P, and the target behavior sequence can be inserted into Figure 2 In the behavior tree shown, we get Figure 3 The behavior tree shown.

[0078] Furthermore, after updating the behavior tree locally, the updated behavior tree can be sent to the server so that the server can update the behavior tree and synchronously update the behavior trees used in other clients. For example, each client can pull the latest behavior tree from the server at a preset interval as the latest local behavior tree to update the local behavior tree. For another example, after updating the behavior tree, the server can send a synchronization message to the client to notify the client to update the behavior tree from the server, so as to update the behavior tree in the client.

[0079] Therefore, through the above technical solution, the target behavior sequence can be updated to the behavior tree, so that the dynamic update of the behavior sequence in the behavior tree can be realized, so that the behavior sequence in the behavior tree can be dynamically updated based on historical interactions, increasing the diversity and comprehensiveness of the behavior sequence in the behavior tree. When the target virtual character encounters a type of interaction, the response behavior of the target virtual character can be quickly and accurately determined based on the automatically generated behavior sequence, thereby improving the efficiency and accuracy of the target virtual character's feedback response, and greatly improving the user experience.

[0080] In some embodiments, the method may further include: In response to receiving a configuration operation on the behavior tree, displaying each node in the behavior tree.

[0081] The configuration interface can be displayed to users with configuration permissions. For example, project developers can click the configuration button to trigger the configuration operation of the behavior tree and display each node in the behavior tree so that they can view and modify each node in the behavior tree.

[0082] In response to the received update operation on the target node, the target node is updated to obtain an updated behavior tree, and the updated behavior tree is sent to the server.

[0083] As an example, the nodes in the behavior tree may include a target behavior sequence generated based on the behavior tree generation model. Since the target behavior sequence is automatically generated, the behavior sequence may include unreasonable behavior nodes. In this embodiment, the developer can manually check the nodes in the behavior tree. For example, if the developer selects node A6 to delete, the updated behavior tree will be as follows: Figure 4 Similarly, the updated behavior tree can be sent to the server to update the behavior trees in other clients. The synchronization method has been described in detail above and will not be repeated here.

[0084] Therefore, through the above technical solution, it is possible to support the update operation of the nodes in the behavior tree to improve the controllability of each node in the behavior tree, thereby ensuring the controllability of the final NPC's behavior and ensuring the accuracy and rationality of the target virtual character's interaction.

[0085] In some embodiments, the method may further include: If there is a behavior node in the behavior tree that has been executed a preset number of times, a new behavior subtree is generated based on the historical interaction memory of the target virtual character and the behavior subtree to which the behavior node belongs.

[0086] The number of executions of each behavior node in the behavior tree can be recorded, and the initial number of executions of each behavior node is 0. Each time it is executed, the number of executions increases by 1, thereby realizing the accumulation of the number of executions of the behavior node. In order to further improve the diversity of interaction, in the embodiment of the present disclosure, if there is a behavior node in the behavior tree that has been executed a preset number of times, it means that the number of times the target virtual character is controlled to respond based on the behavior node is large, which may bring repeated use experience to the player. At this time, a new behavior subtree can be generated for the behavior subtree to which the behavior node belongs, so as to update the response behavior of the target virtual character in the same scene.

[0087] As an example, the historical interaction memory of the target virtual character can be used to determine the interaction style of the target virtual character based on the historical interaction memory. For example, in order to reduce the storage space occupied, the historical interaction memory can be summarized based on the LLM general memory summarization method to obtain structured memory. In order to ensure the effectiveness of memory, the present disclosure can delete the structured memory based on the forgetting mechanism to further ensure the availability of the historical interaction memory.

[0088] When a new behavior subtree is generated based on the historical interaction memory of the target virtual character and the behavior subtree to which the behavior node belongs, the relevant memory can be retrieved from the structured memory using RAG based on the judgment condition in the behavior subtree to which the behavior node belongs, and the behavior subtree is optimized by the fine-tuning model based on the relevant memory and judgment condition to obtain a new behavior subtree. The fine-tuning model can be implemented based on the LLM model, such as the fine-tuning model can be based on the behavior tree generation model using DPO (Direct Preference Optimization) to enhance the understanding of the behavior tree to obtain the new behavior subtree, and the new behavior subtree is made to meet human preferences through the DPO optimization model.

[0089] Afterwards, the behavior subtree to which the behavior node belongs is replaced with the new behavior subtree to obtain an updated behavior tree, and the updated behavior tree is sent to the server.

[0090] For example, the behavior subtree to which the behavior node belongs is the behavior subtree to which sequence S1 belongs, and the determined new behavior subtree is S2, then S2 can replace S1 in the behavior tree, such as Figure 5 Similarly, the updated behavior tree can be sent to the server to update the behavior trees in other clients. The synchronization method has been described in detail above and will not be repeated here.

[0091] Therefore, through the above technical solution, the behavior nodes in the behavior tree can be optimized and regenerated, so that different behavior sequences can be dynamically generated for the same scene at different times, so that the behavior of the target virtual character will no longer be fixed. For example, based on the newly generated behavior subtree, the target virtual character may change its attitude and behavior towards the player according to the player's behavior and dialogue history, further improving the diversity of the target virtual character's interaction and enhancing the user experience.

[0092] like Figure 6 As shown, it is an architecture diagram provided based on an implementation of the present disclosure, such as Figure 6As shown, the interaction intent can be determined based on the interaction information and the intent classification model 61, and the behavior subtree can be generated by combining the interaction intent, the interaction information and the behavior tree generation model 62 to obtain a new behavior tree. Afterwards, the behavior tree can be updated based on the historical interaction memory and the behavior tree and the fine-tuning model 63 to obtain an updated behavior tree. The specific implementation of the above steps has been described above and will not be repeated here.

[0093] Based on the same inventive concept, the present disclosure also provides an interactive device, such as Figure 7 As shown, the device 10 comprises: A first display module 100 is used to display a virtual scene interface, wherein the virtual scene interface includes at least one virtual character; A first acquisition module 200 is used to obtain interaction information corresponding to the interaction operation in response to receiving the interaction operation in the virtual scene interface; A first determination module 300 is used to determine whether there is a behavior in a behavior tree of a target virtual character that responds to the interaction information, wherein the behavior tree of the target virtual character includes a plurality of behavior sequences of the target virtual character, and the target virtual character is at least one of the virtual characters in the virtual scene interface; A first generating module 400 is configured to generate a target behavior sequence based on the interaction information and a behavior tree generation model if there is no behavior in the behavior tree that responds to the interaction information; The control module 500 is used to control the target virtual character to respond to the interaction information based on the target behavior sequence.

[0094] Optionally, the first generating module includes: A first determination submodule, configured to determine an interaction intent corresponding to the interaction information based on the interaction information and an intent classification model; The first generation submodule is used to generate a target behavior sequence of the target virtual character based on the interaction information, the interaction intention and a behavior tree generation model, wherein the target behavior sequence is a behavior subtree formed based on a combination of multiple nodes.

[0095] Optionally, the device further comprises: A second acquisition module, configured to acquire object association information of the target virtual character, wherein the object association information includes environment information of a virtual environment where the target virtual character is located and / or state information of the target virtual character; The first generation module comprises: The second generation submodule is used to generate a target behavior sequence of the target virtual character based on the interaction information, the object association information and the behavior tree generation model.

[0096] Optionally, the first generating submodule includes: A first processing submodule, configured to obtain a response intention of the target virtual character to respond to the interaction information based on the interaction information, the interaction intention and the first model; The second processing submodule is used to obtain the target behavior sequence based on the interaction information, the response intention, the candidate interaction operation list of the target virtual character and the second model, wherein the interaction operation indicated by each behavior node of the target behavior sequence is any one of the candidate interaction operation list, and the behavior tree generation model includes the first model and the second model.

[0097] Optionally, the behavior sequence includes a judgment condition, and the first determination module includes: a matching submodule, configured to match the interaction information with judgment conditions in a plurality of behavior sequences in the behavior tree; A second determination submodule is used to determine, if the judgment condition is matched, the behavior corresponding to the matched judgment condition as the behavior of responding to the interaction information; The third determining submodule is configured to determine that no behavior responding to the interaction information exists in the behavior tree if the judgment condition is not matched.

[0098] Optionally, the device further comprises: A second determination module, configured to determine an insertion position of the target behavior sequence in the behavior tree based on the interaction information and the behavior tree; A first updating module is configured to insert the target behavior sequence into the behavior tree based on the insertion position, obtain an updated behavior tree, and send the updated behavior tree to a server.

[0099] Optionally, the device further comprises: A second display module, configured to display each node in the behavior tree in response to receiving a configuration operation on the behavior tree; The second updating module is configured to update the target node in response to the received update operation on the target node, obtain an updated behavior tree, and send the updated behavior tree to the server.

[0100] Optionally, the device further comprises: A second generation module is configured to generate a new behavior subtree based on the historical interaction memory of the target virtual character and the behavior subtree to which the behavior node belongs if there is a behavior node in the behavior tree that has been executed a preset number of times; The third updating module is configured to replace the behavior subtree to which the behavior node belongs with the new behavior subtree, obtain an updated behavior tree, and send the updated behavior tree to the server.

[0101] Reference below Figure 8 , which shows a schematic diagram of the structure of an electronic device (e.g., terminal device) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0102] like Figure 8 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0103] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0104] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0105] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0106] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0107] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0108] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: displays a virtual scene interface, which includes at least one virtual character; in response to receiving an interactive operation in the virtual scene interface, obtains interactive information corresponding to the interactive operation; determines whether there is a behavior that responds to the interactive information in the behavior tree of the target virtual character, wherein the behavior tree of the target virtual character includes multiple behavior sequences of the target virtual character, and the target virtual character is at least one of the virtual characters in the virtual scene interface; if there is no behavior that responds to the interactive information in the behavior tree, generate a target behavior sequence based on the interactive information and a behavior tree generation model; and controls the target virtual character to respond to the interactive information based on the target behavior sequence.

[0109] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0110] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, the first display module may also be described as a "module for displaying a virtual scene interface."

[0112] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0113] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] According to one or more embodiments of the present disclosure, Example 1 provides an interaction method, the method comprising: Displaying a virtual scene interface, wherein the virtual scene interface includes at least one virtual character; In response to receiving an interactive operation in the virtual scene interface, acquiring interactive information corresponding to the interactive operation; Determining whether there is a behavior in a behavior tree of a target virtual character that responds to the interaction information, wherein the behavior tree of the target virtual character includes a plurality of behavior sequences of the target virtual character, and the target virtual character is at least one of the virtual characters in the virtual scene interface; If there is no behavior in the behavior tree that responds to the interaction information, generating a target behavior sequence based on the interaction information and a behavior tree generation model; The target virtual character is controlled to respond to the interaction information based on the target behavior sequence.

[0115] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein generating a target behavior sequence based on the interaction information and a behavior tree generation model includes: Determining the interaction intent corresponding to the interaction information based on the interaction information and the intent classification model; Based on the interaction information, the interaction intention and the behavior tree generation model, a target behavior sequence of the target virtual character is generated, wherein the target behavior sequence is a behavior subtree formed based on a combination of multiple nodes.

[0116] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein the method further includes: Acquire object association information of the target virtual character, wherein the object association information includes environment information of a virtual environment where the target virtual character is located and / or state information of the target virtual character; The generating a target behavior sequence based on the interaction information and the behavior tree generation model includes: A target behavior sequence of the target virtual character is generated based on the interaction information, the object association information, and the behavior tree generation model.

[0117] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, wherein the step of generating a target behavior sequence of the target virtual character based on the interaction information, the interaction intention, and a behavior tree generation model includes: Based on the interaction information, the interaction intention and the first model, obtaining a response intention of the target virtual character to respond to the interaction information; Based on the interaction information, the response intention, the candidate interaction operation list of the target virtual character and the second model, the target behavior sequence is obtained, wherein the interaction operation indicated by each behavior node of the target behavior sequence is any one of the candidate interaction operation list, and the behavior tree generation model includes the first model and the second model.

[0118] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the behavior sequence includes a judgment condition, and determining whether there is a behavior in the behavior tree of the target virtual character that responds to the interaction information includes: Matching the interaction information with judgment conditions in a plurality of behavior sequences in the behavior tree; If the judgment condition is matched, determining the behavior corresponding to the matched judgment condition as the behavior of responding to the interaction information; If the judgment condition is not matched, it is determined that there is no behavior in the behavior tree that responds to the interaction information.

[0119] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein the method further includes: Determining an insertion position of the target behavior sequence in the behavior tree based on the interaction information and the behavior tree; The target behavior sequence is inserted into the behavior tree based on the insertion position, an updated behavior tree is obtained, and the updated behavior tree is sent to a server.

[0120] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1, wherein the method further includes: In response to receiving a configuration operation on the behavior tree, displaying each node in the behavior tree; In response to the received update operation on the target node, the target node is updated to obtain an updated behavior tree, and the updated behavior tree is sent to the server.

[0121] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 1, wherein the method further includes: If there is a behavior node in the behavior tree that has been executed a preset number of times, generating a new behavior subtree based on the historical interaction memory of the target virtual character and the behavior subtree to which the behavior node belongs; The behavior subtree to which the behavior node belongs is replaced with the new behavior subtree to obtain an updated behavior tree, and the updated behavior tree is sent to a server.

[0122] According to one or more embodiments of the present disclosure, Example 9 provides an interactive device, the device comprising: A first display module, used to display a virtual scene interface, wherein the virtual scene interface includes at least one virtual character; A first acquisition module, configured to, in response to receiving an interaction operation in the virtual scene interface, acquire interaction information corresponding to the interaction operation; A first determination module is used to determine whether there is a behavior in a behavior tree of a target virtual character that responds to the interaction information, wherein the behavior tree of the target virtual character includes a plurality of behavior sequences of the target virtual character, and the target virtual character is at least one of the virtual characters in the virtual scene interface; A first generating module, configured to generate a target behavior sequence based on the interaction information and a behavior tree generation model if there is no behavior in the behavior tree that responds to the interaction information; A control module is used to control the target virtual character to respond to the interaction information based on the target behavior sequence.

[0123] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processing device, the steps of the method described in any one of Examples 1-8 are implemented.

[0124] According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-8.

[0125] According to one or more embodiments of the present disclosure, Example 12 provides a computer program product, including a computer program, which implements the steps of any one of the methods of Examples 1-8 when executed by a processor.

[0126] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0127] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0128] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. An interactive method, characterized in that: The method comprises: Displaying a virtual scene interface, wherein the virtual scene interface includes at least one virtual character; In response to receiving an interactive operation in the virtual scene interface, acquiring interactive information corresponding to the interactive operation; Determining whether there is a behavior in a behavior tree of a target virtual character that responds to the interaction information, wherein the behavior tree of the target virtual character includes a plurality of behavior sequences of the target virtual character, and the target virtual character is at least one of the virtual characters in the virtual scene interface; If there is no behavior in the behavior tree that responds to the interaction information, generating a target behavior sequence based on the interaction information and a behavior tree generation model; The target virtual character is controlled to respond to the interaction information based on the target behavior sequence.

2. The method according to claim 1, characterized in that The generating a target behavior sequence based on the interaction information and the behavior tree generation model includes: Determining the interaction intent corresponding to the interaction information based on the interaction information and the intent classification model; Based on the interaction information, the interaction intention and the behavior tree generation model, a target behavior sequence of the target virtual character is generated, wherein the target behavior sequence is a behavior subtree formed based on a combination of multiple nodes.

3. The method according to claim 2, characterized in that The method further comprises: Acquire object association information of the target virtual character, wherein the object association information includes environment information of a virtual environment where the target virtual character is located and / or state information of the target virtual character; The generating a target behavior sequence based on the interaction information and the behavior tree generation model includes: A target behavior sequence of the target virtual character is generated based on the interaction information, the object association information, and the behavior tree generation model.

4. The method according to claim 2, characterized in that: The generating a target behavior sequence of the target virtual character based on the interaction information, the interaction intention and the behavior tree generation model comprises: Based on the interaction information, the interaction intention and the first model, obtaining a response intention of the target virtual character to respond to the interaction information; Based on the interaction information, the response intention, the candidate interaction operation list of the target virtual character and the second model, the target behavior sequence is obtained, wherein the interaction operation indicated by each behavior node of the target behavior sequence is any one of the candidate interaction operation list, and the behavior tree generation model includes the first model and the second model.

5. The method according to claim 1, characterized in that The behavior sequence includes a judgment condition, and the step of determining whether there is a behavior in the behavior tree of the target virtual character that responds to the interaction information includes: Matching the interaction information with judgment conditions in a plurality of behavior sequences in the behavior tree; If the judgment condition is matched, determining the behavior corresponding to the matched judgment condition as the behavior of responding to the interaction information; If the judgment condition is not matched, it is determined that there is no behavior in the behavior tree that responds to the interaction information.

6. The method according to claim 1, characterized in that The method further comprises: Determining an insertion position of the target behavior sequence in the behavior tree based on the interaction information and the behavior tree; The target behavior sequence is inserted into the behavior tree based on the insertion position, an updated behavior tree is obtained, and the updated behavior tree is sent to a server.

7. The method according to claim 1, characterized in that The method further comprises: In response to receiving a configuration operation on the behavior tree, displaying each node in the behavior tree; In response to the received update operation on the target node, the target node is updated to obtain an updated behavior tree, and the updated behavior tree is sent to the server.

8. The method according to claim 1, characterized in that The method further comprises: If there is a behavior node in the behavior tree that has been executed a preset number of times, generating a new behavior subtree based on the historical interaction memory of the target virtual character and the behavior subtree to which the behavior node belongs; The behavior subtree to which the behavior node belongs is replaced with the new behavior subtree to obtain an updated behavior tree, and the updated behavior tree is sent to a server.

9. An interactive device, characterized in that: The device comprises: A first display module, used to display a virtual scene interface, wherein the virtual scene interface includes at least one virtual character; A first acquisition module, configured to, in response to receiving an interaction operation in the virtual scene interface, acquire interaction information corresponding to the interaction operation; A first determination module is used to determine whether there is a behavior in a behavior tree of a target virtual character that responds to the interaction information, wherein the behavior tree of the target virtual character includes a plurality of behavior sequences of the target virtual character, and the target virtual character is at least one of the virtual characters in the virtual scene interface; A first generating module, configured to generate a target behavior sequence based on the interaction information and a behavior tree generation model if there is no behavior in the behavior tree that responds to the interaction information; A control module is used to control the target virtual character to respond to the interaction information based on the target behavior sequence.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • NPC behavior representation method and device based on player behavior influence, electronic equipment and computer program product

    CN114681920A

  • Interaction method and device, medium and electronic equipment

    CN117959716A

  • Virtual object control model generation method and device, virtual object interaction method and device and computer equipment

    CN118593996A

  • Non-player character control method and device, equipment and storage medium

    CN119185945A