Virtual object control method, apparatus, and storage medium

By using an object behavior tree in virtual object control, decoupling and data transmission between nodes are achieved, solving the problems of high node coupling and poor flexibility in existing technologies, improving the flexibility and diversity of virtual object control, and reducing development costs.

CN116271829BActive Publication Date: 2026-04-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-12-07
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, virtual object control schemes cannot flexibly configure control information and are not suitable for object control scenarios with complex logical structures. In particular, they suffer from high node coupling and poor flexibility in genres such as shooting games.

Method used

By acquiring the object behavior tree in the target game, data communication between nodes is achieved by using a single node to transmit data with the AI ​​system's data center. Each node in the object behavior tree processes only a single logic, decoupling node data and improving the flexibility and reusability of nodes.

Benefits of technology

It enables flexibility in reading and writing node data and making decisions in the object behavior tree, improves the flexibility and diversity of AI object control information configuration and behavior adjustment, and reduces game development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116271829B_ABST
    Figure CN116271829B_ABST
Patent Text Reader

Abstract

The application provides a virtual object control method and device and a storage medium, relates to the technical field of Internet, can be applied to various scenes such as cloud technology, artificial intelligence, intelligent transportation and auxiliary driving, and comprises the following steps: obtaining an object behavior tree of a target virtual object in a target game; a single node in the object behavior tree can perform data transmission with an AI system data center of the target game, and different nodes perform data communication through the AI system data center; through the object behavior tree, state information and environment information of the target virtual object in a virtual environment of the target game are obtained; in the case that an event triggering condition is reached, a corresponding target virtual event is triggered in the virtual environment, and a target behavior sub-tree corresponding to the target virtual event in the object behavior tree is activated; and the behavior of the target virtual object is controlled based on the target behavior sub-tree and the AI system data center. The application can effectively improve the flexibility of virtual object behavior configuration and behavior control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a virtual object control method, apparatus and storage medium. Background Technology

[0002] Most existing games feature virtual objects such as Artificial Intelligence (AI) entities. These AI entities are controlled automatically by the computer, not by the player. Currently, Goal-Oriented Action Planning (GOAP), machine learning models, or Behavior Trees (BT) are commonly used to design and control these AI entities to execute corresponding game events. However, GOAP, being a goal-oriented AI design approach, cannot design specific behavioral details, making it unsuitable for genres like shooting games and limiting its applicability. While current machine learning solutions train AI entities through reinforcement learning, they are still immature in the gaming industry, difficult to implement, and extremely costly.

[0003] Behavior trees are a commonly used control scheme due to their wide applicability and low cost. However, existing behavior tree designs typically use programming languages ​​to design multiple behavioral logics within a single node, exposing only a few parameters to allow game designers to adjust AI behavior within a limited scope. This results in drawbacks such as high coupling between nodes, poor flexibility, black-box processes, and lack of reusability. It also fails to flexibly configure the control information of virtual objects and is unsuitable for object control scenarios with complex logical structures. Therefore, an improved virtual object control scheme is needed to address the problems existing in related technologies. Summary of the Invention

[0004] This application provides a virtual object control method, device, and storage medium, which can solve the problems in related technologies such as the inability to flexibly configure the control information of virtual objects and the unsuitability for object control scenarios with complex logical structures.

[0005] On the one hand, this application provides a virtual object control method, the method comprising:

[0006] Obtain the object behavior tree of the target virtual object in the target game; a single node in the object behavior tree can transmit data with the AI ​​system data center of the target game, and different nodes can communicate with each other through the AI ​​system data center; a single node in the object behavior tree represents at least one of the control flow, single judgment condition, single service behavior, and single operation action of the target virtual object in the process of handling virtual events;

[0007] The object behavior tree is used to obtain the state and environment information of the target virtual object in the virtual environment of the target game.

[0008] If at least one of the state information and the environment information meets the event triggering condition, the corresponding target virtual event is triggered in the virtual environment, and the target behavior subtree corresponding to the target virtual event in the object behavior tree is activated;

[0009] The target virtual object's behavior is controlled based on the target behavior subtree and the AI ​​system data center to process the target virtual events.

[0010] On the other hand, a virtual object control device is provided, the device comprising:

[0011] Behavior Tree Acquisition Module: Used to acquire the object behavior tree of the target virtual object in the target game; a single node in the object behavior tree can transmit data with the AI ​​system data center of the target game, and different nodes can communicate with each other through the AI ​​system data center; a single node in the object behavior tree represents at least one of the following in the process of handling virtual events: control flow, single judgment condition, single service behavior, and single operation action of the target virtual object;

[0012] Information acquisition module: used to acquire the state information and environment information of the target virtual object in the virtual environment of the target game through the object behavior tree;

[0013] Event triggering module: When at least one of the state information and the environment information meets the event triggering condition, it triggers the corresponding target virtual event in the virtual environment and activates the target behavior subtree corresponding to the target virtual event in the object behavior tree;

[0014] Behavior control module: used to control the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center, so as to process the target virtual events.

[0015] On the other hand, a computer device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the virtual object control method as described above.

[0016] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the virtual object control method as described above.

[0017] On the other hand, a server is provided, the server including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the virtual object control method as described above.

[0018] On the other hand, a computer program product is provided, which includes computer instructions that, when executed by a processor, implement the virtual object control method as described above.

[0019] On the other hand, a computer program is provided that includes computer instructions that, when executed by a processor, implement the virtual object control method as described above.

[0020] The virtual object control method, apparatus, device, storage medium, server, and computer program product provided in this application have the following technical effects:

[0021] The technical solution of this application obtains the object behavior tree of a target virtual object in the target game; through the object behavior tree, it obtains the state information and environment information of the target virtual object in the virtual environment of the target game; when at least one of the state information and environment information meets the event triggering condition, it triggers the corresponding target virtual event in the virtual environment and activates the target behavior subtree corresponding to the target virtual event in the object behavior tree; and controls the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center to process the target virtual event. Specifically, a single node in the object behavior tree can transmit data with the AI ​​system data center of the target game, and different nodes communicate with each other through the AI ​​system data center; a single node in the object behavior tree represents at least one of the following in the process of processing virtual events: control flow, single judgment condition, single service behavior, and single operation action of the target virtual object. The object behavior tree of this application can transmit data to the AI ​​system data center in units of nodes, avoiding the black box of node data, effectively improving the flexibility of node data reading, writing and decision-making in the object behavior tree, and each node in the object behavior tree only handles a single behavioral logic, realizing the decoupling of each node in the object behavior tree, effectively improving node reusability, and thus effectively improving the flexibility and diversity of AI object control information configuration and behavior adjustment. Attached Figure Description

[0022] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;

[0024] Figure 2 This is a flowchart illustrating a virtual object control method provided in an embodiment of this application;

[0025] Figure 3 This is a flowchart illustrating another virtual object control method provided in an embodiment of this application;

[0026] Figure 4 This is a data communication logic structure diagram of an object behavior tree provided in an embodiment of this application;

[0027] Figure 5 is a data communication logic structure diagram of another object behavior tree provided in an embodiment of this application;

[0028] Figure 6 This is a behavior tree logic fragment diagram provided in the related technology for executing resource search events in BR mode;

[0029] Figure 7 This is a behavior subtree for executing resource search events in BR mode, as provided in the embodiments of this application;

[0030] Figure 8 This is a schematic diagram of the framework of a virtual object control device provided in an embodiment of this application;

[0031] Figure 9 This is a hardware structure block diagram of an electronic device using a virtual object control method provided in an embodiment of this application;

[0032] Figure 10 This is a schematic diagram of the structure of a blockchain system provided in an embodiment of this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or sub-modules is not necessarily limited to those steps or sub-modules explicitly listed, but may include other steps or sub-modules not explicitly listed or inherent to such processes, methods, products, or devices.

[0035] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0036] A script is an executable file written in a specific descriptive language according to a certain format. The scripts involved in this application include computer programming languages ​​used for game programming. They possess characteristics such as flexibility, powerful functionality, and decoupling.

[0037] Goal-Oriented Action Planning (GOAP) is an AI system that can easily present agent choices and make informed decisions without maintaining a large and complex finite state machine.

[0038] Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In this application, AI refers to artificial intelligence in games.

[0039] Behavior Tree (BT) is a graphical programming tool used to design artificial intelligence (AI). It is a tree structure containing hierarchical nodes used to control the decision-making behavior of AI. Within the tree, the leaves are the actual commands that control the AI ​​entity, while the branches are various types of utility nodes that control the AI ​​to follow the tree to achieve the most suitable sequence of commands for that situation.

[0040] Behavior tree nodes: These are the logical execution modules of an AI program, forming the basic units of the AI ​​behavior tree. Each node has its own unique logic to complete specific AI behaviors.

[0041] BR mode: A gameplay rule for a shooting game, commonly known as "Battle Royale" mode.

[0042] Please see Figure 1 , Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application, such as... Figure 1 As shown, the application environment may include at least terminal 01 and server 02. In practical applications, terminal 01 and server 01 can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this.

[0043] In this embodiment, terminal 01 may include physical devices such as smartphones, desktop computers, tablets, laptops, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart voice interaction devices, smart home appliances, smart wearable devices, and in-vehicle terminal devices, and may also include software running on the physical device, such as applications.

[0044] In this embodiment, server 02 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0045] Specifically, cloud technology refers to a managed technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. It distributes computing tasks across a resource pool composed of numerous computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." Artificial intelligence cloud services are generally also known as AIaaS (AI as a Service). This is currently a mainstream service model for artificial intelligence platforms. Specifically, AIaaS platforms break down several common AI services and provide them as independent or packaged services in the cloud. This service model is similar to opening an AI-themed marketplace: all developers can access and use one or more AI services provided by the platform through API interfaces. Some experienced developers can also use the AI ​​framework and AI infrastructure provided by the platform to deploy and maintain their own dedicated cloud AI services.

[0046] Specifically, the servers mentioned above may include physical devices, such as network communication submodules, processors, and memory, as well as software running on the physical devices, such as applications.

[0047] In this embodiment of the application, the terminal 01 and server 02 in the above application environment can be used to run virtual game applications and provide data storage services for the virtual game, such as running an AI system data center and storing behavior trees of various virtual objects, and providing control services for virtual objects based on behavior trees during the operation of the virtual game application, and the terminal 01 provides game interface display services.

[0048] Furthermore, it is understandable that Figure 1 The example shown is merely an application environment for a virtual object control method. This application environment may include more or fewer nodes, and this application does not impose any restrictions on it.

[0049] The application environment involved in this application embodiment, or the terminal 01 and server 02 in the application environment, can be a distributed system formed by connecting clients and multiple nodes (any form of computing device accessing the network, such as servers and user terminals) through network communication. The distributed system can be a blockchain system, which can provide game operation services and virtual object control services, and can also provide data storage functions for the above services, such as storing data in the AI ​​system data center, object behavior tree instances, and behavior data and processing results in the virtual object control process.

[0050] See Figure 10 , Figure 10 This is an optional structural diagram of the distributed system 100 provided in this embodiment of the invention applied to a blockchain system. It consists of multiple nodes (any form of computing device in the network, such as servers or user terminals) and clients, forming a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In the distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.

[0051] Blockchain, an emerging application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms, is essentially a decentralized database. It consists of a chain of data blocks linked using cryptographic methods, each containing information about a batch of network transactions used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer. The blockchain underlying platform can include modules for user management, basic services, smart contracts, and operational monitoring. The user management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (access management). Under authorization, it also detects and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic service module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic service first performs interface adaptation parsing and authentication (interface adaptation), and then encrypts the business information using a consensus algorithm (consensus management). The blockchain process involves several key steps: First, encryption and secure transmission of data to the shared ledger (network communication) for recording and storage. Second, the smart contract module handles contract registration, issuance, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). Execution is triggered by calling keys or other events based on the contract terms, completing the contract logic. The module also provides contract upgrade and cancellation functionality. Third, the operation and monitoring module handles deployment, configuration modification, contract settings, cloud adaptation, and real-time visualization of the product's operational status, including alerts, network status monitoring, and node device health monitoring. The platform's product service layer provides basic capabilities and implementation frameworks for typical applications. Developers can leverage these capabilities and add business characteristics to implement business logic on the blockchain. Finally, the application service layer provides blockchain-based application services to business stakeholders.

[0052] The following describes a virtual object control method based on the aforementioned application environment. This method is applied to the server side, and its embodiments can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. Please refer to... Figure 2 , Figure 2This is a flowchart illustrating a virtual object control method provided in an embodiment of this application. This specification provides method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive methods, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown... Figure 2 As shown, the method may include the following steps.

[0053] S201: Obtain the object behavior tree of the target virtual object in the target game.

[0054] In this embodiment, the target game is a game that can run on the aforementioned application environment and has a virtual environment and virtual objects. The types of target games include, but are not limited to, shooting games, action games, and fighting games. The target virtual objects are artificial intelligence entities in the target game, and these artificial intelligence entities are entities that are not corresponding to player characters. Correspondingly, the target game may also include player virtual objects corresponding to player characters.

[0055] In this embodiment, the system also includes an AI system data center for the target game, used to provide data resource services for artificial intelligence entities in the target game. The object behavior tree is a tree structure containing hierarchical nodes used to control the decision-making and action behaviors of the target virtual objects, and is bound to the target virtual objects. Specifically, a single node in the object behavior tree can transmit data with the AI ​​system data center of the target game, and different nodes communicate with each other through the AI ​​system data center. Thus, the object behavior tree can transmit data with the AI ​​system data center on a node-by-node basis, avoiding black-box data transmission and effectively improving the flexibility of node data reading, writing, and decision-making in the object behavior tree. Furthermore, a single node in the object behavior tree represents at least one of the following in the processing of virtual events: control flow, single judgment condition, single service behavior, and single operation action. For example, a node may be used to determine whether to execute a single action (such as jumping), execute the single action, and perform the data transmission service behavior required during the execution of the action.

[0056] In other words, each node in the object behavior tree only handles a single behavioral logic, including one or more of a single judgment logic, a single service behavior control, and a single operation action control, and will not execute multiple judgment logics, multiple service behavior controls, or multiple operation action controls simultaneously or concurrently. This achieves decoupling of each node in the object behavior tree. Through the data forwarding service of the AI ​​system data center, the nodes cooperate with each other, effectively improving node reusability, as well as the flexibility and diversity of AI object control information configuration and behavior adjustment.

[0057] In practical applications, before S201, the method may also include a step of constructing an object behavior tree, which may specifically include the following steps.

[0058] S301: Obtain the behavior tree information corresponding to the target virtual object.

[0059] In this embodiment, the behavior tree information is determined based on the virtual event information that the target virtual object needs to process in the target game. Specifically, the behavior tree information includes, but is not limited to, node attribute information, node data, dependencies between nodes, and associations between different virtual events. Specifically, node attribute information represents the type attribute of the node. The node type can include, but is not limited to, flow control class, service class, decorator class, and task class, etc. Among them, flow control class can include, but is not limited to, sequence control class, selector control class, and parallel control class, etc., and the task node of the task class is the leaf node in the object behavior tree. Specifically, node data can refer to the data required by the node to implement flow control or behavior control, including but not limited to node functions, etc. Specifically, the dependencies between nodes can represent the hierarchical relationship, connection relationship, positional relationship, and attachment relationship between each node. For example, node A and node B are child nodes of node C, node A is to the left of node B, node D is attached to node E, etc. Specifically, the relationships between different virtual events can include nesting relationships, execution order, and execution priority. For example, H event and L event are events that are executed sequentially, with the execution priority of H event being higher than that of L event, and M event is a sub-event nested within N event.

[0060] S303: Construct the initial behavior tree corresponding to the target virtual object based on node attribute information, node data, dependencies between nodes, and associations between different virtual events.

[0061] S305: Construct the data transmission channel between each node in the initial behavior tree and the AI ​​system data center to obtain the object behavior tree corresponding to the target virtual object.

[0062] In this embodiment, by parsing the aforementioned node attribute information, node data, dependencies between nodes, and associations between different virtual events, a tree structure and tree nodes are obtained, thereby constructing an initial behavior tree. This initial behavior tree is bound to the target virtual object. Further, a data transmission channel is created between each node in the initial behavior tree and the AI ​​system data center to realize resource allocation between each node and the AI ​​system data center, and data forwarding logic between the AI ​​system data center and each node, resulting in an object behavior tree corresponding to the target virtual object. Different object behavior trees are constructed for different target virtual objects.

[0063] In some embodiments, the object behavior tree includes process control nodes, service nodes, decorator nodes, and task nodes; correspondingly, S303 may specifically include attaching decorator nodes and task nodes to the corresponding process control nodes or task nodes based on the dependencies between nodes. S305 may specifically include constructing data transmission channels between the service nodes, decorator nodes, and task nodes and the AI ​​system data center, respectively. Please refer to [reference needed]. Figure 4 Both service nodes and decorator nodes establish data transmission channels with the AI ​​system data center. Task nodes can also establish data transmission channels with the AI ​​system data center, and some task nodes can also communicate with the AI ​​system data center through the data transmission channels of the service nodes or decorator nodes attached to them. Service nodes are used for information synchronization and serve as the main source of information input for the AI ​​system data center. Decorator nodes are used to make conditional judgments based on data obtained from the AI ​​system data center, such as calculating the distance to enemy targets, determining the type of enemy, and identifying any objects of special interest. Task nodes are used to perform certain operations, such as information query operations, action operations, or data modification operations.

[0064] Specifically, a decorator node and / or service node can be attached to a single task node or flow control node in the object behavior tree. For example, if a decorator node C and a service node D are attached to task node A, when task node A is triggered, decorator node C determines whether task node A can be activated, i.e., whether the task should be executed. As long as task node A is executed, service node D will be executed. Task node A corresponds to only one unit task, such as an action. The attached decorator node C only makes a logical judgment, i.e., only determines whether the unit task is executed, and the attached service node D only corresponds to the service behavior of the unit task.

[0065] S203: Obtain the state and environment information of the target virtual object in the virtual environment of the target game through the object behavior tree.

[0066] In this embodiment, state information represents the target virtual object's own state in the current virtual environment. For example, it may include, but is not limited to, health points, armor points, currently executing action, current resource status, and current wealth status. Environmental information represents the virtual environment information within a preset range centered on the target virtual object in the current virtual environment. For example, it may include, but is not limited to, the number of other virtual objects within the preset range, the distance to other virtual objects, the attribute information of other virtual objects, the distance to the target location, and the number of resource points.

[0067] In practical applications, object behavior trees contain one or more nested behavior subtrees. The upper levels of these subtrees include service nodes for obtaining environmental and state information, respectively. Please refer to [reference needed]. Figure 3 S203 may include the following steps.

[0068] S2031: Periodically obtain the state and environment information of the target virtual object through different upper-level service nodes in the object behavior tree.

[0069] S2032: Use different upper-layer service nodes to synchronize the status information and environment information of the target virtual object to the AI ​​system data center.

[0070] Specifically, in the object behavior tree, the level of the upper-level service node is higher than the level of the target behavior subtree. In other words, the level of the root node of the target behavior subtree is lower than the level of the upper-level service node. Understandably, the higher the level, the closer the node is to the root node of the object behavior tree. Upper-level service nodes can be attached to the flow control nodes or task nodes in the upper level of the object behavior tree.

[0071] Specifically, upper-layer service nodes acquire the status and environmental information of the target virtual object in near real-time at a preset frequency. Each upper-layer service node only acquires either environmental information or status information. In some cases, environmental information includes multiple types of information related to the virtual environment, and a single upper-layer service node acquires only one type of environmental information or one type of status information. For example, upper-layer service node A may be used to search for enemies within a preset distance.

[0072] Specifically, each upper-layer service node has its own data transmission channel with the AI ​​system data center. After obtaining information, each upper-layer service node will synchronize the information to the AI ​​system data center in real time through the corresponding data transmission channel.

[0073] S205: If at least one of the state information and environment information meets the event triggering condition, trigger the corresponding target virtual event in the virtual environment and activate the target behavior subtree corresponding to the target virtual event in the object behavior tree.

[0074] In this embodiment, if at least one of the current state information and the current environment information meets any event triggering condition corresponding to the object behavior tree, the target virtual event corresponding to that condition is triggered. For example, if the event triggering condition for a resource search event is met, the resource search event is triggered and the target behavior subtree used to execute the resource search event is activated.

[0075] In practical applications, the target behavior subtree includes a subtree general decision node, which is located on the subtree root node or at the next level below the subtree root node. Decorator nodes are attached to the subtree general decision node. The corresponding S203 can specifically include obtaining the state information and environment information of the target virtual object from the AI ​​system data center through the subtree general decision node of the object behavior tree.

[0076] Before S205, the method may also include step S401: using the subtree's overall decision node, determine whether the state information and environmental information of the target virtual object meet the event triggering conditions based on preset decision conditions.

[0077] In practical applications, the decorator nodes attached to the subtree's main decision node obtain current environmental and state information from the AI ​​system's data center. Based on preset decision conditions, they analyze this information. If at least one of the obtained current environmental and state information satisfies the event triggering condition corresponding to the target behavior subtree, the target behavior subtree is activated, triggering step S205. If the event triggering condition is not met, steps S203, S401, and S403 are executed cyclically. It should be noted that the aforementioned cyclical execution can refer to repeatedly judging whether the event triggering condition of the same target behavior subtree is met, or it can refer to executing steps S203 and S401 based on the execution order of target behavior subtrees at the same level, where if the event triggering condition of the target behavior subtree is not met, steps S203 and S401 are executed based on the next subtree of the target behavior subtree. The preset decision conditions can be expressed and executed using conditional functions.

[0078] S207: Control the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center to handle target virtual events.

[0079] In this embodiment of the application, after the target virtual event is triggered, the control logic represented by the target behavior subtree and the command sequence it contains, as well as the data communication between each node in the subtree and the AI ​​system data center, are used to control the behavior corresponding to the target virtual object execution node, thereby executing the target virtual event.

[0080] As mentioned above, the object behavior tree includes process control nodes, service nodes, decorator nodes, and task nodes. In some embodiments, the task nodes in the object behavior tree include information query task nodes, data modification task nodes, and action operation task nodes, and each task node executes its corresponding task. Accordingly, S207 may include the following steps.

[0081] S2071: When an information query task is triggered, the target information corresponding to the information query task is obtained from the AI ​​system data center through the corresponding information query task node in the target behavior subtree.

[0082] S2072: When a data modification task is triggered, the target data corresponding to the data modification task in the AI ​​system data center is modified through the corresponding data modification task node in the target behavior subtree.

[0083] S2073: When an action operation task is triggered, the corresponding operation data of the action operation task is obtained from the AI ​​system data center through the corresponding action operation task node in the target behavior subtree, and the target virtual object is controlled to perform the corresponding behavior action based on the operation data.

[0084] Specifically, task nodes are leaf nodes in the target behavior subtree. Information query task nodes are used to execute a one-time information query task in response to the triggering of an information query task; data modification task nodes are used to modify data in the AI ​​system data center in response to the triggering of a data modification task; and action operation task nodes are used to control the target virtual object to perform a single action operation behavior in response to the triggering of an action operation task.

[0085] In one embodiment, please refer to Figure 5 In the diagram, Target Seeker and AI System are service nodes, Info Query Task is an information query task node, Action Task is an action operation task node, and BlackboardModifier is a data modification task node.

[0086] Specifically, Target Seeker is a service node used to search for enemies within a preset distance, and AI System is a node used to synchronize the state information of virtual objects. Decorator nodes can be, for example, Compare Value, Distance Compare, Game Stage Condition, and Check Danger Area; Compare Value is a node used to compare two pieces of data; Distance Compare is used to query and compare the distance between a certain target location or virtual object and other target locations or other virtual objects; Game Stage Condition is used to determine the current stage of the target game, such as the login stage or the current level; Check Danger Area is used to determine the distance between a virtual object and a preset danger area.

[0087] Specifically, the Info Query Task is used to perform a one-time information query; the Blackboard Modifier is used to perform data modification in the AI ​​system data center. For example, if the Target Seeker finds an enemy within a preset range, the information is synchronized to the AI ​​system data center. This information can trigger an attack event and trigger the activation step of the target behavior subtree corresponding to the attack event. However, under the influence of other information conditions, the target virtual object currently triggers a healing event. At this time, the target virtual object does not attack the enemy. That is, the information about the enemy found within the preset range is deleted from the AI ​​system data center through the Blackboard Modifier node.

[0088] Specifically, the Action task is used to control the target virtual object to perform an action behavior. For example, Func Move to is a node used to handle the virtual object's pathfinding, Attack is a node used to control the virtual object's attack, Jump is a node used to control the virtual object to perform a jump, Slide is a node used to control the virtual object to perform a slide action, and SetFocus is a node used to control the virtual object to smoothly turn towards the target.

[0089] In this way, each node performs only one type of logic, communicates with other nodes through the AI ​​system data center, and cooperates with them to achieve decoupled deployment between nodes, effectively improving the flexibility of target virtual object behavior configuration and behavior control, as well as the reusability of nodes.

[0090] In some embodiments, the flow control nodes in the object behavior tree include at least one of selector nodes, sequence nodes, and simple parallel nodes; accordingly, S207 may include the following steps.

[0091] S2074: When the selector node is activated, based on the first preset execution order, control the target virtual object to execute the behaviors corresponding to each first child node of the selector node in sequence; if the behavior corresponding to any child node is executed successfully, stop executing other child nodes in the first preset execution order that are after the successfully executed first child node.

[0092] Specifically, the first preset execution order can be from left to right. Each child node under the selector node is executed sequentially in this order. If the first child node fails, the next child node is executed. Once a child node succeeds, the selector node returns to a successful execution status and no longer executes any subsequent child nodes. If all child nodes fail, the selector node returns to a failed execution status.

[0093] S2075: When a sequence node is activated, based on a second preset execution order, control the target virtual object to execute the behaviors corresponding to each second child node of the sequence node in sequence; if the behavior corresponding to any child node fails to execute, stop executing other child nodes in the second preset execution order that are after the second child node that failed to execute.

[0094] Specifically, the second preset execution order can be from left to right. Each child node under the sequence node is executed sequentially in this order. If the first child node executes successfully, the next one is executed. If any child node fails to execute, the sequence node returns a failure status and no longer executes any subsequent child nodes. If all child nodes execute successfully, the sequence node returns a success status.

[0095] S2076: When a simple parallel node is activated, the target virtual object concurrently controls the execution of the corresponding behavior of each third child node based on the third child node under the simple parallel node.

[0096] Specifically, the first and third child nodes under a simple parallel node are task nodes, and the second and third child nodes are branches in the target behavior subtree. This task node is the main task, and the branches execute the secondary tasks. If the main task fails, it returns failure; if the main task succeeds, it returns success.

[0097] Based on some or all of the above embodiments, in the embodiments of this application, after step S207, the method may further include the following steps.

[0098] S501: If at least one of the current state information and the current environment information meets another event triggering condition, obtain the priority information of another virtual event and the target virtual event corresponding to the other event triggering condition from the AI ​​system data center through the subtree general decision node of the target behavior subtree.

[0099] S503: If the priority information of another virtual event corresponds to a higher priority, the processing of the target virtual event is interrupted through the subtree general decision node, and another virtual event is triggered in the virtual environment. The behavior of the target virtual object is controlled based on the behavior subtree corresponding to the other virtual event in the object behavior tree and the AI ​​system data center to process the other virtual event.

[0100] In this embodiment, the object behavior tree can contain more than one nested behavior subtree, and multiple behavior subtrees can be included at the same level. These subtrees at the same level have a priority order. During the execution of the currently triggered target virtual event, due to changes in state and environment information, the current state and environment information may satisfy the triggering conditions of another behavior subtree. If the priority of the other virtual event is higher than the priority of the current target virtual event, the subtree's overall decision node interrupts the execution of the target behavior subtree, thereby interrupting the processing of the target virtual event. Another virtual event is then triggered, and its behavior subtree is activated to execute the corresponding operation. This execution process is similar to the aforementioned execution process of the target virtual event and will not be described again here.

[0101] For example, within the same level, there are behavior subtrees for resource gathering events and attack events, with attack events having higher priority than resource gathering events. The currently triggered resource gathering event activates and executes its corresponding behavior subtree. When environmental information changes, such as when the Target Seeker detects an enemy within a preset distance, the resource gathering event is interrupted, and the attack event is activated. Then, based on the behavior subtree corresponding to the attack event, the target virtual object is controlled to perform an attack on the enemy.

[0102] In summary, by utilizing the object behavior tree and virtual object control method provided in this application, the black-box nature of node data can be avoided, effectively improving the flexibility of node data reading, writing, and decision-making in the object behavior tree. Furthermore, each node in the object behavior tree handles only a single behavioral logic, achieving decoupling between each node and effectively improving node reusability. This, in turn, significantly enhances the flexibility and diversity of AI object control information configuration and behavior adjustment, while also improving the rationality and diversity of the target virtual object's behavioral logic. In addition, the object behavior tree of this application has broad applicability, thereby reducing game development costs.

[0103] The following combination Figure 6 and Figure 7 This application describes a behavior subtree for a virtual event and a corresponding virtual object control method provided in an embodiment. Please refer to... Figure 6 , Figure 6This is a behavior tree logic fragment provided in related technologies for executing a resource search event in BR mode. Task node 231 (BTT_GoToLootArea) simultaneously performs the actions of ① finding the "resource area"; ② moving to the "resource area"; ③ searching for "supplies"; and ④ moving to the location of the "supplies." Then, task node 232 (BTT_PickUpLoot) completes the "supplies pickup." This logic loops until no more supplies can be found. Understandably, task node 231 has limited functionality, therefore this behavior tree fragment can only be used in similar scenarios, limiting its application. Furthermore, the "supplies search" process is black-box and inflexible, making it impossible to insert other logic into it.

[0104] Please refer to Figure 7 , Figure 7 This illustration shows a behavior subtree for performing a resource search event in BR mode, as provided in an embodiment of this application. Please refer to... Figure 7 Each node executes only one or more of the following: a single judgment logic, a single action behavior, or a single service behavior. Selector node 31 and its child nodes are used to perform the following: find a resource point; if no resource point is found, randomly find a point within the safe area. Selector node 32 - decorator node 41 + simple parallel node 41 and its branches are used to perform the following: move towards the resource point, and while moving, randomly perform actions such as "smooth rotation" (task node a1), "snake-like movement" (task node a2), "jump" (task node b1), and "slide" (task node b2). Decorator node 41 is attached to simple parallel node 41. Selector node 32 - sequence node 41 and its branches are used to perform the following: if the resource point being moved to is swallowed by a preset danger zone, find a new resource point and continue to move there using actions such as "smooth rotation" (task node c1), "snake-like movement" (task node c2), "jump" (task node d1), and "slide" (task node d2). Task node 31 is used to perform the following: after reaching the resource point, "mark" the resource point as dirty, indicating that the resource point has been visited and will not be prioritized for future visits. Decorator node 31 and task node 32 are used to execute: issuing a "disband" command, causing the target virtual object squad to scatter and search for resources. By simplifying the control logic of each node to the smallest unit, node reusability can be improved and process black boxes can be avoided. At the same time, even if the same task is executed in different ways, such as moving to different resource points as mentioned above, different branches are still established in the behavior subtree for separate execution. Based on different branches, the target virtual object is controlled to perform the same task a different number of times with the same or similar execution logic and action behavior (such as "snake-like movement" and "jumping" as mentioned above). This can effectively decouple the coupling between nodes, avoid the duplication of node functions, and thus improve the flexibility of virtual object behavior configuration and event execution.

[0105] This application also provides a virtual object control device 800, such as... Figure 8 As shown, Figure 8 A schematic diagram of a virtual object control device provided in an embodiment of this application is shown. The device may include the following modules.

[0106] Behavior Tree Acquisition Module 10: Used to acquire the object behavior tree of the target virtual object in the target game; a single node in the object behavior tree can transmit data with the AI ​​system data center of the target game, and different nodes can communicate with each other through the AI ​​system data center; a single node in the object behavior tree represents at least one of the control flow, single judgment condition, single service behavior and single operation action of the target virtual object in the process of handling virtual events.

[0107] Information Acquisition Module 20: Used to acquire the state information and environment information of the target virtual object in the virtual environment of the target game through the object behavior tree.

[0108] Event triggering module 30: When at least one of the state information and environment information meets the event triggering condition, it triggers the corresponding target virtual event in the virtual environment and activates the target behavior subtree corresponding to the target virtual event in the object behavior tree.

[0109] Behavior control module: Used to control the behavior of target virtual objects based on the target behavior subtree and the AI ​​system data center in order to handle target virtual events.

[0110] In some embodiments, the apparatus may further include the following modules.

[0111] Behavior Tree Information Acquisition Module: This module is used to acquire the behavior tree information corresponding to the target virtual object before acquiring the object behavior tree of the target virtual object in the target game. The behavior tree information is determined based on the virtual event information that the target virtual object needs to process in the target game. The behavior tree information includes node attribute information, node data, dependencies between nodes, and associations between different virtual events.

[0112] Initial Behavior Tree Construction Module: Used to construct the initial behavior tree corresponding to the target virtual object based on node attribute information, node data, dependencies between nodes, and associations between different virtual events; different behavior subtrees in the initial behavior tree correspond to different virtual events.

[0113] Data transmission channel construction module: used to construct data transmission channels between each node in the initial behavior tree and the AI ​​system data center, to obtain the object behavior tree corresponding to the target virtual object.

[0114] In some embodiments, the object behavior tree includes process control nodes, service nodes, decorator nodes, and task nodes; the initial behavior tree building module can be specifically used to: attach decorator nodes and task nodes to the corresponding process control nodes or task nodes based on the dependencies between nodes.

[0115] The data transmission channel construction module can be specifically used to: construct data transmission channels between service nodes, decorator nodes, and task nodes and the AI ​​system data center.

[0116] In some embodiments, the task nodes in the object behavior tree include information query task nodes, data modification task nodes, and action operation task nodes; the behavior control module may include the following units.

[0117] Information Query Unit: When an information query task is triggered, it retrieves the target information corresponding to the information query task from the AI ​​system data center through the corresponding information query task node in the target behavior subtree.

[0118] Data Modification Unit: When a data modification task is triggered, it modifies the target data in the AI ​​system data center corresponding to the data modification task through the corresponding data modification task node in the target behavior subtree.

[0119] Action Operation Unit: When an action operation task is triggered, it retrieves the operation data corresponding to the action operation task from the AI ​​system data center through the corresponding action operation task node in the target behavior subtree, and controls the target virtual object to perform the corresponding behavior action based on the operation data.

[0120] In some embodiments, the flow control nodes in the object behavior tree include at least one of selector nodes, sequence nodes, and simple parallel nodes; the behavior control module may include the following units.

[0121] Selector node execution unit: When the selector node is activated, it controls the target virtual object to execute the behaviors corresponding to each first child node of the selector node in sequence according to a first preset execution order; if the behavior corresponding to any child node is successfully executed, it stops executing other child nodes in the first preset execution order that are after the successfully executed first child node.

[0122] Sequence Node Execution Unit: When a sequence node is activated, it controls the target virtual object to execute the behaviors corresponding to each second child node of the sequence node in sequence according to a second preset execution order; if the behavior corresponding to any child node fails to execute, it stops executing other child nodes in the second preset execution order that are after the second child node that failed to execute.

[0123] Parallel Node Execution Unit: Used to concurrently control the target virtual object to execute the corresponding behavior of each third child node based on each third child node under the simple parallel node when the simple parallel node is activated.

[0124] In some embodiments, the information acquisition module 20 may specifically include the following units.

[0125] Information acquisition unit: used to periodically acquire the status information and environment information of the target virtual object through different upper-level service nodes in the object behavior tree; in the object behavior tree, the level of the upper-level service node is higher than the level of the target behavior subtree.

[0126] Information synchronization unit: used to synchronize the status information and environment information of the target virtual object to the AI ​​system data center using different upper-layer service nodes.

[0127] In some embodiments, the information acquisition module 20 may be specifically used to acquire the state information and environmental information of the target virtual object from the AI ​​system data center through the subtree general decision node of the object behavior tree.

[0128] Correspondingly, the device may also include a decision condition judgment module: before triggering the corresponding target virtual event in the virtual environment and activating the target behavior subtree corresponding to the target virtual event in the object behavior tree, the module uses the subtree's overall decision node to determine whether the state information and environment information of the target virtual object meet the event triggering conditions based on preset decision conditions; if they do, the module triggers the corresponding target virtual event in the virtual environment and activates the target behavior subtree corresponding to the target virtual event in the object behavior tree.

[0129] In some embodiments, the apparatus may further include the following modules.

[0130] Priority information acquisition module: After controlling the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center to process the target virtual event, if at least one of the current state information and the current environment information reaches another event triggering condition, it obtains the priority information of the other virtual event and the target virtual event corresponding to the other event triggering condition from the AI ​​system data center through the subtree general decision node of the target behavior subtree.

[0131] Event Switching Module: When the priority information of another virtual event corresponds to a higher priority, the module interrupts the processing of the target virtual event through the subtree's overall decision node and triggers another virtual event in the virtual environment. Based on the behavior subtree corresponding to the other virtual event in the object behavior tree and the AI ​​system's data center, the module controls the behavior of the target virtual object to process the other virtual event.

[0132] It should be noted that the above-described device embodiments and method embodiments are based on the same implementation methods.

[0133] This application provides a virtual object control device. The identification device can be a terminal or a server. The virtual object control device includes a processor and a memory. The memory stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by the processor to implement the virtual object control method provided in the above method embodiments.

[0134] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.

[0135] The methods and embodiments provided in this application can be executed in electronic devices such as mobile terminals, computer terminals, servers, or similar computing devices. Figure 9 This is a hardware structure block diagram of an electronic device using a virtual object control method provided in an embodiment of this application. For example... Figure 9As shown, the electronic device 900 can vary significantly due to differences in configuration or performance. It may include one or more central processing units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module may include a series of instruction operations on the electronic device. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute the series of instruction operations in the storage media 920 on the electronic device 900. Electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0136] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 900. In one example, the input / output interface 940 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 940 may be a radio frequency (RF) module used for wireless communication with the Internet.

[0137] Those skilled in the art will understand that Figure 9 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 900 may also include... Figure 9 The more or fewer components shown, or having the same Figure 9 The different configurations shown.

[0138] Embodiments of this application also provide a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a virtual object control method in the method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the virtual object control method provided in the above method embodiment.

[0139] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0140] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.

[0141] As can be seen from the embodiments of the virtual object control method, apparatus, device, server, terminal storage medium, and program product provided in this application, the technical solution of this application obtains the object behavior tree of the target virtual object in the target game; obtains the state information and environment information of the target virtual object in the virtual environment of the target game through the object behavior tree; when at least one of the state information and environment information meets the event triggering condition, triggers the corresponding target virtual event in the virtual environment and activates the target behavior subtree corresponding to the target virtual event in the object behavior tree; controls the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center to process the target virtual event. Specifically, a single node in the object behavior tree can transmit data with the AI ​​system data center of the target game, and different nodes communicate with each other through the AI ​​system data center; a single node in the object behavior tree represents at least one of the control flow, a single judgment condition, a single service behavior, and a single operation action of the target virtual object in the process of processing virtual events. The object behavior tree of this application can transmit data to the AI ​​system data center in units of nodes, avoiding the black box of node data, effectively improving the flexibility of node data reading, writing and decision-making in the object behavior tree, and each node in the object behavior tree only handles a single behavioral logic, realizing the decoupling of each node in the object behavior tree, effectively improving node reusability, and thus effectively improving the flexibility and diversity of AI object control information configuration and behavior adjustment.

[0142] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.

[0143] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0144] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0145] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for controlling virtual objects, characterized in that, The method includes: The system acquires the object behavior tree of a target virtual object in the target game; each node in the object behavior tree can transmit data with the AI ​​system data center of the target game, and different nodes communicate with each other through the AI ​​system data center; each node in the object behavior tree represents one of the following in the handling process of virtual events: control flow, single judgment condition, single service behavior, and single operation action; each node in the object behavior tree handles only a single behavioral logic, which includes a single judgment logic, a single service behavior control, or a single operation action control; a data transmission channel is created between each node and the AI ​​system data center; The object behavior tree is used to obtain the state and environment information of the target virtual object in the virtual environment of the target game. If at least one of the state information and the environment information meets the event triggering condition, the corresponding target virtual event is triggered in the virtual environment, and the target behavior subtree corresponding to the target virtual event in the object behavior tree is activated; The target virtual object's behavior is controlled based on the target behavior subtree and the AI ​​system data center to process the target virtual events.

2. The method according to claim 1, characterized in that, Before obtaining the object behavior tree of the target virtual object in the target game, the method further includes: Obtain the behavior tree information corresponding to the target virtual object; the behavior tree information is determined based on the virtual event information that the target virtual object needs to process in the target game; the behavior tree information includes node attribute information, node data, dependencies between nodes, and associations between different virtual events; An initial behavior tree corresponding to the target virtual object is constructed based on the node attribute information, the node data, the dependencies between the nodes, and the associations between different virtual events; different behavior subtrees in the initial behavior tree correspond to different virtual events. A data transmission channel is constructed between each node in the initial behavior tree and the AI ​​system data center to obtain the object behavior tree corresponding to the target virtual object.

3. The method according to claim 2, characterized in that, The object behavior tree includes process control nodes, service nodes, decorator nodes, and task nodes; The process of constructing the initial behavior tree corresponding to the target virtual object based on the node attribute information, the node data, the dependencies between the nodes, and the associations between different virtual events includes: Based on the dependencies between the nodes, the decorator node and the task node are attached to the corresponding flow control node or task node. The data transmission channel between each node in the initial behavior tree and the AI ​​system data center includes: Data transmission channels are constructed between the service node, the decorator node, the task node, and the AI ​​system data center, respectively.

4. The method according to claim 3, characterized in that, The task nodes in the object behavior tree include information query task nodes, data modification task nodes, and action operation task nodes. The process of controlling the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center to handle the target virtual events includes: When an information query task is triggered, the target information corresponding to the information query task is obtained from the AI ​​system data center through the information query task node in the target behavior subtree. When a data modification task is triggered, the target data in the AI ​​system data center corresponding to the data modification task is modified through the corresponding data modification task node in the target behavior subtree; When an action operation task is triggered, the operation data corresponding to the action operation task is obtained from the AI ​​system data center through the corresponding action operation task node in the target behavior subtree, and the target virtual object is controlled to perform the corresponding behavior action based on the operation data.

5. The method according to claim 3, characterized in that, The flow control nodes in the object behavior tree include at least one of selector nodes, sequence nodes, and simple parallel nodes; controlling the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center includes: When the selector node is activated, based on a first preset execution order, the target virtual object is controlled to sequentially execute the behaviors corresponding to each first child node of the selector node; if the behavior corresponding to any child node is successfully executed, the execution of other child nodes following the successfully executed first child node in the first preset execution order is stopped. When the sequence node is activated, based on the second preset execution order, the target virtual object is controlled to sequentially execute the behaviors corresponding to each second child node of the sequence node; if the behavior corresponding to any child node fails to execute, the execution of other child nodes following the failed second child node in the second preset execution order is stopped. When the simple parallel node is activated, the target virtual object concurrently controls the execution of the behaviors corresponding to each of the third child nodes under the simple parallel node.

6. The method according to claim 1, characterized in that, The step of obtaining the state information and environment information of the target virtual object in the virtual environment of the target game through the object behavior tree includes: The state and environment information of the target virtual object are periodically obtained through different upper-level service nodes in the object behavior tree; in the object behavior tree, the level of the upper-level service node is higher than the level of the target behavior subtree. The different upper-layer service nodes are used to synchronize the status information and environment information of the target virtual object to the AI ​​system data center.

7. The method according to claim 6, characterized in that, The step of obtaining the state information and environment information of the target virtual object in the virtual environment of the target game through the object behavior tree includes: The state and environmental information of the target virtual object are obtained from the AI ​​system data center through the subtree general decision node of the object behavior tree; Before triggering the corresponding target virtual event in the virtual environment and activating the target behavior subtree corresponding to the target virtual event in the object behavior tree, the method further includes: Using the subtree's overall decision node, determine whether the target virtual object's state and environmental information meet the event triggering conditions based on preset decision conditions; If the conditions are met, the step of triggering the corresponding target virtual event in the virtual environment and activating the target behavior subtree corresponding to the target virtual event in the object behavior tree is initiated.

8. The method according to claim 1, characterized in that, After controlling the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center to process the target virtual event, the method further includes: If at least one of the current state information and the current environment information meets another event triggering condition, the priority information of another virtual event corresponding to the other event triggering condition and the target virtual event is obtained from the AI ​​system data center through the subtree general decision node of the target behavior subtree; If the priority information of the other virtual event corresponds to a higher priority, the processing of the target virtual event is interrupted through the subtree general decision node, and the other virtual event is triggered in the virtual environment. The behavior of the target virtual object is controlled based on the behavior subtree corresponding to the other virtual event in the object behavior tree and the AI ​​system data center to process the other virtual event.

9. A virtual object control device, characterized in that, The device includes: Behavior Tree Acquisition Module: Used to acquire the object behavior tree of the target virtual object in the target game; a single node in the object behavior tree can transmit data with the AI ​​system data center of the target game, and different nodes communicate with each other through the AI ​​system data center; a single node in the object behavior tree represents one of the control flow, single judgment condition, single service behavior, and single operation action of the target virtual object in the process of handling virtual events; each node in the object behavior tree only processes a single behavioral logic, which includes a single judgment logic, a single service behavior control, or a single operation action control; a data transmission channel is created between each node and the AI ​​system data center; Information acquisition module: used to acquire the state information and environment information of the target virtual object in the virtual environment of the target game through the object behavior tree; Event triggering module: When at least one of the state information and the environment information meets the event triggering condition, it triggers the corresponding target virtual event in the virtual environment and activates the target behavior subtree corresponding to the target virtual event in the object behavior tree; Behavior control module: used to control the behavior of the target virtual object based on the target behavior subtree and the AI ​​system data center, so as to process the target virtual events.

10. The apparatus according to claim 9, characterized in that, The device further includes: Behavior tree information acquisition module: used to acquire behavior tree information corresponding to the target virtual object before acquiring the object behavior tree of the target virtual object in the target game; the behavior tree information is determined based on the virtual event information that the target virtual object needs to process in the target game; the behavior tree information includes node attribute information, node data, dependencies between nodes, and associations between different virtual events; Initial Behavior Tree Construction Module: Used to construct an initial behavior tree corresponding to the target virtual object based on the node attribute information, the node data, the dependencies between the nodes, and the associations between different virtual events; different behavior subtrees in the initial behavior tree correspond to different virtual events; Data transmission channel construction module: used to construct data transmission channels between each node in the initial behavior tree and the AI ​​system data center, so as to obtain the object behavior tree corresponding to the target virtual object.

11. The apparatus according to claim 10, characterized in that, The object behavior tree includes process control nodes, service nodes, decorator nodes, and task nodes; The initial behavior tree construction module is specifically used to: attach the decorator node and task node to the corresponding process control node or task node based on the dependency relationship between the nodes; The data transmission channel construction module is specifically used to: construct data transmission channels between the service node, the decorator node, the task node, and the AI ​​system data center, respectively.

12. The apparatus according to claim 11, characterized in that, The task nodes in the object behavior tree include information query task nodes, data modification task nodes, and action operation task nodes. The behavior control module includes: Information query unit: used to obtain target information corresponding to the information query task from the AI ​​system data center through the information query task node in the target behavior subtree when the information query task is triggered; Data modification unit: used to modify the target data in the AI ​​system data center corresponding to the data modification task through the corresponding data modification task node in the target behavior subtree when the data modification task is triggered; Action operation unit: When an action operation task is triggered, it is used to obtain the operation data corresponding to the action operation task from the AI ​​system data center through the corresponding action operation task node in the target behavior subtree, and control the target virtual object to perform the corresponding behavior action based on the operation data.

13. The apparatus according to claim 11, characterized in that, The flow control nodes in the object behavior tree include at least one of selector nodes, sequence nodes, and simple parallel nodes; the behavior control module includes: Selector node execution unit: When the selector node is activated, based on a first preset execution order, controls the target virtual object to sequentially execute the behaviors corresponding to each first child node of the selector node; if the behavior corresponding to any child node is successfully executed, stops the execution of other child nodes in the first preset execution order that are after the successfully executed first child node; Sequence Node Execution Unit: When the sequence node is activated, based on a second preset execution order, controls the target virtual object to sequentially execute the behaviors corresponding to each second child node of the sequence node; if the behavior corresponding to any child node fails to execute, stops executing other child nodes in the second preset execution order that are after the failed second child node; Parallel Node Execution Unit: When the simple parallel node is activated, it is used to concurrently control the target virtual object to execute the behavior corresponding to each of the third child nodes under the simple parallel node.

14. The apparatus according to claim 9, characterized in that, The information acquisition module includes: Information acquisition unit: used to periodically acquire the status information and environment information of the target virtual object through different upper-level service nodes in the object behavior tree; in the object behavior tree, the level of the upper-level service node is higher than the level of the target behavior subtree; Information synchronization unit: used to synchronize the status information and environment information of the target virtual object to the AI ​​system data center using the different upper-layer service nodes respectively.

15. The apparatus according to claim 14, characterized in that, The information acquisition module is specifically used for: The state and environmental information of the target virtual object are obtained from the AI ​​system data center through the subtree general decision node of the object behavior tree; The device further includes a decision condition judgment module, which is used to determine whether the state information and environment information of the target virtual object meet the event triggering conditions based on preset decision conditions before triggering the corresponding target virtual event in the virtual environment and activating the target behavior subtree corresponding to the target virtual event in the object behavior tree. If the conditions are met, the step of triggering the corresponding target virtual event in the virtual environment and activating the target behavior subtree corresponding to the target virtual event in the object behavior tree is initiated.

16. The apparatus according to claim 9, characterized in that, The device further includes: Priority information acquisition module: After the behavior of the target virtual object is controlled based on the target behavior subtree and the AI ​​system data center to process the target virtual event, when at least one of the current state information and the current environment information reaches another event triggering condition, the priority information of another virtual event corresponding to the other event triggering condition and the target virtual event are obtained from the AI ​​system data center through the subtree general decision node of the target behavior subtree. Event switching module: When the priority information of the other virtual event corresponds to a higher priority, the module interrupts the processing of the target virtual event through the subtree general decision node, triggers the other virtual event in the virtual environment, and controls the behavior of the target virtual object based on the behavior subtree corresponding to the other virtual event in the object behavior tree and the AI ​​system data center to process the other virtual event.

17. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the virtual object control method as described in any one of claims 1-8.

18. A computer device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the virtual object control method as described in any one of claims 1-8.

19. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the virtual object control method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Virtual object control method and device and electronic equipment

    CN111054075A

  • Method and device for creating virtual object

    CN111249733A

  • Game data processing method and device, computer readable storage medium and electronic equipment

    CN112190945A