Data processing method and device, storage medium and electronic device

By converting the game behavior tree into game attribute data and using the attribute data of virtual game characters for verification, the problem of low efficiency in game behavior tree testing is solved, and automated checking and correct mounting are achieved.

CN115129583BActive Publication Date: 2025-11-04NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210563641.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-23
Publication Date
2025-11-04
Estimated Expiration
2042-05-23

AI Technical Summary

Technical Problem

Existing technologies for testing game behavior trees are inefficient and cannot effectively verify the logic of game behavior trees, resulting in low verification efficiency.

Method used

The game behavior tree is converted into game attribute data, which is then verified using the attribute data of the virtual game character to determine the target state of the game behavior tree and achieve automated checking.

Benefits of technology

It improves the verification efficiency of game behavior trees, realizes automated checking of game behavior trees, and ensures that virtual game characters are correctly attached.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129583B_ABST
    Figure CN115129583B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and device, a storage medium and an electronic device. The method comprises the following steps: obtaining a game behavior tree to be verified, wherein the game behavior tree is used for controlling a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree; converting the game behavior tree into at least one set of game attribute data, wherein each set of game attribute data is used for determining a game behavior set; verifying each set of game attribute data based on attribute data of the virtual game character to obtain a verification result, wherein the attribute data of the virtual game character matches configuration data of the game behavior tree; and determining a target state of the game behavior tree based on the verification result, wherein the target state is used for determining whether the virtual game character is the mounting object of the game behavior tree. The application solves the technical problem of low efficiency of verifying the game behavior tree.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer, in particular to a data processing method and device, storage medium and electronic device. BACKGROUND

[0002] At present, the test of the game behavior tree is usually checked by writing scripts combined with manpower, but the logic of the above method is relatively simple, and only a single skill node of the behavior tree can be targeted, and there is a technical problem of low efficiency in verifying the game behavior tree.

[0003] At present, there is no effective solution to the above problems. SUMMARY

[0004] The embodiments of the present application at least provide a data processing method and device, storage medium and electronic device to at least solve the technical problem of low efficiency in verifying the game behavior tree.

[0005] According to an embodiment of the present application, a data processing method is provided, comprising: obtaining a game behavior tree to be verified, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree; converting the game behavior tree into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set; verifying each set of game attribute data based on attribute data of the virtual game character to obtain a verification result, wherein the attribute data of the virtual game character matches configuration data of the game behavior tree; determining a target state of the game behavior tree based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree.

[0006] Optionally, converting the game behavior tree into at least one set of game attribute data comprises: obtaining node information of each node in a plurality of nodes of the game behavior tree, wherein each node is used to represent a game attribute data; determining each set of game attribute data based on the node information of each node.

[0007] Optionally, determining each set of game attribute data based on the node information of each node comprises: determining a combination order of a target number of game attribute data corresponding to a target number of nodes based on the node information of each node, wherein the plurality of nodes include the target number of nodes corresponding to each set of game attribute data; and combining the target number of game attribute data in the combination order to obtain each set of game attribute data.

[0008] Optionally, the game attribute data in each group is verified based on the attribute data of the virtual game role to obtain a verification result, including: traversing the target number of game attribute data in a combination order; determining sub-game attribute data corresponding to the traversed game attribute data in the attribute data of the virtual game role; verifying the traversed game attribute data based on the sub-game attribute data to obtain the verification result.

[0009] Optionally, the game attribute data in each group is verified based on the attribute data of the virtual game role to obtain a verification result, including: traversing the target number of game attribute data in a combination order; determining sub-game attribute data corresponding to the traversed game attribute data in the attribute data of the virtual game role; verifying the traversed game attribute data based on the sub-game attribute data to obtain the verification result.

[0010] Optionally, the target state of the game behavior tree is determined based on the verification result, including: determining that the game behavior tree is in a normal state based on the target number of first verification results, wherein the target state includes the normal state, the normal state is used to determine that the virtual game role is a mounting object of the game behavior tree, and the target number of first verification results correspond one-to-one to the target number of nodes.

[0011] Optionally, the target state of the game behavior tree is determined based on the verification result, including: determining that the game behavior tree is in an abnormal state based on the second verification result, wherein the target state includes the abnormal state, and the abnormal state is used to determine that the virtual game role is not a mounting object of the game behavior tree.

[0012] Optionally, in response to the first condition data in the attribute data of the virtual game role being different from the second condition data in each group of game attribute data, each group of game attribute data is discarded, wherein the first condition data is used to indicate the execution condition of the game behavior set corresponding to the attribute data of the virtual game role, and the second condition data is used to indicate the execution condition of the game behavior set corresponding to each group of game attribute data.

[0013] Optionally, the attribute data of the virtual game role includes first virtual game role attribute data configured to the virtual game role, and / or second virtual game role attribute data configured to the game behavior tree.

[0014] Optionally, the attribute data of the virtual game character is verified based on each set of game attribute data, and a verification result is obtained, including one of the following: it is detected that the attribute data of the virtual game character has changed, each set of game attribute data is verified based on the changed attribute data of the virtual game character, and the verification result is obtained; it is detected that the game behavior tree has changed, each set of game attribute data corresponding to the changed game behavior tree is verified based on the attribute data of the virtual game character, and the verification result is obtained; it is detected that the attribute data of the virtual game character has changed, and the game behavior tree has changed, each set of game attribute data corresponding to the changed game behavior tree is verified based on the changed attribute data of the virtual game character, and the verification result is obtained.

[0015] Optionally, in response to the target state being an abnormal state, each set of game attribute data corresponding to the verification result is obtained; an account associated with each set of game attribute data is determined; and prompt information is sent to the account, wherein the prompt information is used to indicate that each set of game attribute data is used to make the game behavior tree in an abnormal state.

[0016] Optionally, replacing at least one set of game attribute data includes: calling at least one set of game attribute data cached by the target position and converted by the game behavior tree.

[0017] According to an embodiment of the present application, a data processing apparatus is also provided, comprising: an acquisition unit configured to acquire a game behavior tree to be verified, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree; a conversion unit configured to convert the game behavior tree into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set; a verification unit configured to verify each set of game attribute data based on attribute data of the virtual game character, and obtain a verification result, wherein the attribute data of the virtual game character matches configuration data of the game behavior tree; and a determination unit configured to determine a target state of the game behavior tree based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree.

[0018] According to an embodiment of the present application, a computer readable storage medium is also provided, wherein the computer readable storage medium stores a computer program, and the computer program is configured to execute the data processing method in any of the above embodiments when running.

[0019] According to an embodiment of the present application, an electronic device is also provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the data processing method in any of the above embodiments.

[0020] In the embodiment of the present application, a game behavior tree to be verified is acquired, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree; the game behavior tree is converted into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set; each set of game attribute data is verified based on attribute data of the virtual game character, to obtain a verification result, wherein the attribute data of the virtual game character matches configuration data of the game behavior tree; and a target state of the game behavior tree is determined based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree. That is, at least one set of game attribute data (for example, all action path sets) of the game behavior tree to be verified is parsed, and attribute data (for example, configuration data in a table) of the virtual game character is quickly linked, so as to verify whether the behavior tree is in an abnormal state, thereby realizing automatic checking of the game behavior tree, and further realizing the technical effect of improving the efficiency of verifying the game behavior tree, and solving the technical problem of low efficiency of verifying the game behavior tree. BRIEF DESCRIPTION OF DRAWINGS

[0021] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:

[0022] Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a data processing method according to an embodiment of the present application;

[0023] Figure 2 FIG. 2 is a flowchart of a data processing method according to an embodiment of the present application;

[0024] Figure 3 FIG. 3 is a schematic diagram of game behavior tree parsing according to an embodiment of the present application;

[0025] Figure 4 FIG. 4 is a schematic diagram of a nested game behavior tree of a game behavior tree according to an embodiment of the present application;

[0026] Figure 5 FIG. 5 is a schematic diagram of an automatic checking result according to an embodiment of the present application;

[0027] Figure 6 FIG. 6 is a schematic diagram of a game behavior tree error confirmation mechanism according to an embodiment of the present application;

[0028] Figure 7 FIG. 7 is a schematic diagram of displaying game behavior tree historical modification data according to an embodiment of the present application;

[0029] Figure 8is a schematic diagram of dynamically maintaining a cache according to an embodiment of the present application;

[0030] Figure 9 is a structural block diagram of a data processing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to make the personnel in the technical field better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the personnel in the field without creative labor should belong to the protection scope of the present application.

[0032] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be exchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to the clearly listed steps or units, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0033] According to an embodiment of the present application, an embodiment of a data processing method is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0034] The method embodiment can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking the running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a mobile internet device (Mobile Internet Devices, abbreviated as MID), a PAD, a game console and other terminal devices. Figure 1 is a hardware structural block diagram of a mobile terminal of a data processing method according to an embodiment of the present application. As shown in Figure 1 The mobile terminal can include one or more (as shown in Figure 1The mobile terminal shown in FIG. 1 includes only one processor 102 (the processor 102 can include, but is not limited to, a processing device such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a field programmable logic device (FPGA), a neural network processing unit (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal described above can further include a transmission device 106 for communication functions, an input / output device 108, and a display device 110. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, and does not limit the structure of the mobile terminal described above. For example, the mobile terminal can include more or fewer components than those shown, or have a different configuration of components than those shown. Figure 1 For example, the mobile terminal can include more or fewer components than those shown, or have a different configuration of components than those shown. Figure 1 For example, the mobile terminal can include more or fewer components than those shown, or have a different configuration of components than those shown.

[0035] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the data processing method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, i.e., implements the data processing method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely disposed relative to the processor 102, which can be connected to the mobile terminal through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0036] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.

[0037] Input in the input / output device 108 can come from a plurality of human interface devices (HID). For example: keyboard and mouse, gamepad, other specialized game controllers (e.g. steering wheel, fishing rod, dance pad, remote control, etc.). Some human interface devices can provide input as well as output, for example: force feedback and vibration of a gamepad, audio output of a controller, etc.

[0038] The display device 110 can be, for example, a heads-up display (HUD), a touch screen liquid crystal display (LCD), and a touch display (also referred to as "touch screen" or "touch display screen"). The liquid crystal display can enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal described above has a graphical user interface (GUI), and a user can interact with the GUI through finger contact and / or hand gestures on the touch-sensitive surface. The human-machine interface functions described above can optionally include creating web pages, drawing, word processing, creating electronic documents, games, video conferencing, instant messaging, e-mailing, voice communication, digital video playing, digital music playing, and / or web browsing, and executable instructions for performing the above human-machine interface functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.

[0039] In one possible implementation, the embodiment of the present application provides a data processing method, Figure 2 is a flowchart of a data processing method according to an embodiment of the present application, as Figure 2 shown, the method comprises the following steps:

[0040] Step S202, obtaining a game behavior tree to be verified, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree.

[0041] In the technical solution provided by the above step S202 of the present application, the game behavior tree to be verified is determined, wherein the game behavior tree can be used to control the mounted virtual game character to perform a game behavior; the virtual game character can be a non-player character (NPC).

[0042] Optionally, some game behavior trees can be mounted on multiple virtual game characters, and the mounted objects perform game behaviors controlled by the game behavior trees, for example, a new virtual game character data is matched, and a universal behavior tree designed before the virtual game character is mounted is used to complete the corresponding production task, but for the test link of the backend, the test engineer still needs to verify the game performance of the virtual game character under the behavior tree and compare the corresponding data of the behavior tree and the virtual game character.

[0043] Step S204, converting the game behavior tree into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set.

[0044] In the technical solution provided by the above step S204 of the present application, the game behavior tree is parsed, and the game behavior tree is converted into at least one set of game attribute data, for example, the game behavior tree can be parsed and abstractly processed into a set of action paths, and the game attribute data can be data in a node path array, can be a set of sequential data, and can be used to control the game behavior of a virtual game character, for example, the game attribute data can be the action path of the virtual game character; the game behavior set can be a complete game behavior path.

[0045] Optionally, the execution logic of the game behavior tree is a path from the top node to the bottom root node according to certain rules, therefore, the game behavior tree can be converted and parsed into at least one set of game attribute data (for example, the action path of the virtual game character) for controlling the virtual game character, a game behavior tree includes all game attribute data of the corresponding virtual game character, each set of game attribute data can be used to confirm the corresponding game behavior path, and the game virtual character can extract a set of game attribute data from at least one set of game attribute data for execution.

[0046] Optionally, converting the game behavior tree into at least one set of game attribute data is essentially to determine all game behaviors represented by the game behavior tree, that is, starting from the root node of the game behavior tree, traversing all action paths, and recording node information on the action paths in sequence, so as to realize the conversion of the game behavior tree into at least one set of game attribute data.

[0047] Step S206, verifying each set of game attribute data based on the attribute data of the virtual game character to obtain a verification result, wherein the attribute data of the virtual game character matches the configuration data of the game behavior tree.

[0048] In the technical solution provided in the above step S206 of the present application, the attribute data of the virtual game character is determined from at least one set of game attribute data, each set of game attribute data is verified based on the attribute data of the virtual game character, and a verification result is obtained, wherein the attribute data of the virtual game character matches the configuration data of the game behavior tree, and can be the data configured for the virtual game character, such as various configuration data (for example, can be displayed in the form of a table) of the virtual game character, skills, magic weapons, etc. in the game behavior tree.

[0049] Optionally, for the actual possible game behavior path, the attribute data of the virtual game character is verified in combination, and the verification manner can be to judge whether the game attribute data matches the attribute data of the virtual game character, for example, if the virtual game character uses skill 1, the configuration data of the virtual game character must have skill 1.

[0050] Optionally, the parsed game attribute data can be compared with the attribute data of the virtual game character (for example, the data in the configured table) by reading the attribute data of the corresponding virtual game character, to obtain verification information, for example, after obtaining the attribute data of the virtual game character of the virtual game object, the attribute data of the virtual game character can be matched with the game behavior set obtained by conversion.

[0051] For example, the configuration data is read to obtain the attribute data of the virtual game character of the corresponding virtual game character (for example, table data), based on the attribute data of the virtual game character, the game behavior set converted by the game behavior tree mounted by the virtual game character is verified, and when traversing the game attribute data (for example, node array), each corresponding node can check whether the corresponding data is correct or abnormal, to obtain verification data.

[0052] Step S208, determining the target state of the game behavior tree based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree.

[0053] In the technical solution provided in the above step S208 of the present application, the target state of the game behavior tree is determined based on the verification result, wherein the target state can be used to indicate whether the behavior tree is correct or incorrect, since the game behavior tree needs to be mounted on the corresponding virtual game character to work, therefore, the target state can be used to determine whether the virtual game character is the mounting object of the game behavior tree, if not, the target state is abnormal.

[0054] Optionally, the attribute data of the virtual game role of the virtual game role can be configured in a table, the carrier of the table can be an extended format (xlsx) of the table, the attribute data of the virtual game role of the virtual game role is read and configured, for example, the data of a virtual game role is obtained as door A, and the skill list in the attribute data of the virtual game role of the virtual game role is skill 1 and skill 2, a game attribute data (path node array) is selected from the parsed game behavior set (behavior tree path set), and all nodes under the path are stored in the game attribute data in order. When the game attribute data is "if it is door 2, use skill 3", when traversing the node array in order, when the judgment node "if it is door 1" is traversed, it is found through comparison of the attribute data of the virtual game role that the condition is not met, that is, the path cannot be executed in the actual game, so the check of the current path can be abandoned; when "if it is door 2" is traversed, the condition is met, and the traversal continues; when "use skill 3" is traversed, it is found that the attribute data of the virtual game role does not configure skill 3, so the target state of the game behavior tree is abnormal, that is, there is no corresponding configuration data in the attribute data of the virtual game role, and the corresponding skill cannot be used in the actual game.

[0055] By steps S202 to S208, the game behavior tree to be verified is obtained, wherein the game behavior tree is used to control the virtual game role to execute the game behavior when the virtual game role is the mounting object of the game behavior tree; the game behavior tree is converted into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set; each set of game attribute data is verified based on the attribute data of the virtual game role, and a verification result is obtained, wherein the attribute data of the virtual game role matches the configuration data of the game behavior tree; and the target state of the game behavior tree is determined based on the verification result, wherein the target state is used to determine whether the virtual game role is the mounting object of the game behavior tree. That is to say, the attribute data (such as the configuration data in the table) of the virtual game role is quickly linked under at least one set of game attribute data (such as all action path sets) of the game behavior tree to be verified, so as to verify whether the behavior tree is in an abnormal state, thereby realizing the automatic checking of the game behavior tree, and further realizing the technical effect of improving the efficiency of verifying the game behavior tree, and solving the technical problem of low efficiency of verifying the game behavior tree.

[0056] As an optional embodiment, in step S204, the game behavior tree is converted into at least one set of game attribute data, comprising: obtaining node information of each node in a plurality of nodes of the game behavior tree, wherein each node is used to represent a game attribute data; and determining each set of game attribute data based on the node information of each node.

[0057] In this embodiment, the logic of the game behavior tree as a whole is mainly controlled by the nodes, and node information of each node in the plurality of nodes of the game behavior tree is obtained, wherein the node information can be node type, node name, node function, etc., can be a composite node, such as a sequential execution node, can be a selection execution node, etc., can be used to represent game attribute data, each node information corresponds to each group of game attribute data one by one, and the node information can be used to determine the game attribute data.

[0058] Optionally, the node information of each node of the game behavior tree is determined to realize conversion of the game behavior tree into at least one group of game attribute data, each group of game attribute data (such as a hand path) is an ordered array, and an element is corresponding node information, such as when it is determined that a node splices three sub-nodes and each node has a corresponding execution probability, the node information can be determined as a probability execution node, each sub-node of the node forms a respective action path, and therefore the entire logic of running to the probability execution node can be abstracted as three paths of executing below, so that three groups of game attribute data can be determined.

[0059] In this embodiment, as long as the influence mode of different composite nodes on the hand path is abstracted, the remaining non-composite nodes, such as conditions, filters, and actions, can be summarized as a type of action node, that is, they can be abstracted into game attribute data of the game behavior tree by being saved in the node path array in sequence, such as three paths abstracted from the Probability node, which can be: lose heart, get a surviving player, target selection: get an opponent player; target filter, negation; use skill lose heart symbol, in actual games, the game attribute data of a virtual game object is to execute one of the path arrays in sequence.

[0060] As an optional embodiment, determining each group of game attribute data based on the node information of each node includes: determining a combination order of a target number of game attribute data corresponding to a target number of nodes based on the node information of each node, wherein the plurality of nodes include the target number of nodes corresponding to each group of game attribute data; and combining the target number of game attribute data in the combination order to obtain each group of game attribute data.

[0061] In this embodiment, based on the node information of each node, a combination order of a target number of game attribute data corresponding to a target number of nodes is determined, and the target number of game attribute data is combined in the combination order to obtain each group of game attribute data, wherein the combination order can be from left to right or from right to left, and the combination order is not specifically limited here.

[0062] For example, the node information corresponding to the node is determined, the combination order of the game attribute data is determined based on the target number of nodes, when the combination order is from left to right, the target number of nodes is traversed in the order from left to right, when the first node is the selection execution node, each child node under the node directly forms an independent behavior node path behind each node, at least one game attribute data is obtained, then the second node is traversed, and the same is true for the subsequent nodes, so that the target number of game attribute data is combined in the order of traversal, and multiple groups of game attribute data are obtained.

[0063] Optionally, the logic of the game behavior tree as a whole is mainly controlled by the composite node, and mainly includes the following four types: sequence execution node (Sequence node) which is executed from left to right and does not execute any more if it is false; selection execution node (Selector node) which is executed from left to right and continues to execute if it is false; parallel execution node (Parallel node) which executes all child nodes and executes the last move; and probability execution node (Probability node) which executes child nodes according to a configured probability or proportion. It should be noted that the above four types are commonly used, but if there are other extended types, the embodiments of the present application can also process other processing modes.

[0064] Optionally, since the game behavior tree is different from the tree structure of a general computer, the control condition (such as the move condition) of the behavior tree can be parsed into at least one game attribute data by using an abstract node and a tree traversal algorithm, so as to obtain a game behavior set. By using the abstract processing of the key node and the tree traversal algorithm, all game attribute data of the game behavior tree can be parsed.

[0065] As an optional embodiment, in step S206, each group of game attribute data is verified based on the attribute data of the virtual game role to obtain a verification result, including: traversing the target number of game attribute data in the combination order; determining the sub-game attribute data corresponding to the traversed game attribute data in the attribute data of the virtual game role; verifying the traversed game attribute data based on the sub-game attribute data to obtain a verification result.

[0066] In this embodiment, the target number of game attribute data is traversed in the combination order; the sub-game attribute data corresponding to the traversed game attribute data is determined in the attribute data of the virtual game role; and the traversed game attribute data is verified based on the sub-game attribute data to obtain a verification result. The sub-game attribute data can be configuration data; and the verification of the game attribute data can be checking the game attribute data based on the attribute data of the virtual game role.

[0067] Optionally, the game behavior tree is verified by traversing the parsed game behavior set, and some paths that will not be executed in practice are removed according to the attribute data of the virtual game character during the traversal (for example, some paths are executed only when a certain condition is met, and will not be executed in practice if the condition is not met), and the remaining paths are paths that may be run in the game. Therefore, in view of these actual paths that may be run, the game attribute data is checked in combination with the attribute data of the virtual game character, and the checking manner can be to judge whether the path in the action node matches the sub-game attribute data (for example, the data of the mounted NPC), for example, if skill 1 is used in the game attribute data, skill 1 must be included in the sub-game attribute data.

[0068] For example, it can be checked whether the action node of releasing a magic weapon is configured with non-existent sub-game attribute data (Identity Document, ID for short), and the attribute data of the virtual game character can be determined by first reading the data of the corresponding table, and the configuration of the corresponding action node in the parsed game behavior set is checked.

[0069] Optionally, the game behavior tree needs to be mounted on an NPC to work, but the attribute data of the virtual game character of each NPC is different, and even different NPCs mounted with the same game behavior tree will exhibit different behaviors. Some game behavior trees are normal under a specific NPC, but will produce errors when mounted on other NPCs. Therefore, joint checking can be performed on the NPC and the game behavior tree in this case, that is, the attribute data (configuration data) of the virtual game character is directly read to obtain the sub-target attribute data of the corresponding NPC, the game behavior set (all paths) of the game behavior tree mounted by the NPC is parsed, and finally when traversing the game behavior set, each corresponding node can check the corresponding sub-game attribute data to obtain a matching result and determine whether it is normal or abnormal.

[0070] For example, taking the probability execution node as an example, the Probability node splices three sub-nodes, the first sub-node has a 60% probability of execution, and the second and third nodes are both 20% probability of execution. Each sub-node forms a respective action path downward, which means that one of the three sub-nodes will be executed according to the probability, so the entire logic running to the Probability node can be abstracted as a probability execution of the three paths below, that is, the behavior tree action path at the Probability node will form multiple different action paths with the logic of the sub-nodes downward, which can be understood as a path branching into three different paths when encountering this type of node.

[0071] Optionally, the Sequence node can be similar to the Probability node, and can represent selection of an executable path in a sequence, or can be abstracted as a game behavior tree path branching at the node to form multiple new paths; all child nodes spliced under the Sequence node are executed in sequence from left to right, and only one game behavior tree path is generated from start to end, that is, the behavior tree path does not branch into a second path at the Sequence node, but concatenates the child nodes of the Sequence node to the original path, wherein the sequential execution node is similar to the Sequence node.

[0072] As an optional embodiment, in step S206, the game attribute data traversed is verified based on the sub-game attribute data to obtain a verification result, including: in response to the sub-game attribute data matching the game attribute data traversed, a first verification result is determined, wherein the first verification result is used to indicate that the game attribute data traversed is verified successfully; and in response to the sub-game attribute data not matching the game attribute data traversed, a second verification result is determined, wherein the second verification result is used to indicate that the game attribute data traversed is verified unsuccessfully.

[0073] In this embodiment, the game attribute data traversed is verified based on the sub-game attribute data, and it is determined whether the sub-game attribute data matches the game attribute data traversed. In response to the sub-game attribute data matching the game attribute data traversed, a first verification result is determined; and in response to the sub-game attribute data not matching the game attribute data traversed, a second verification result is determined, wherein the first verification result can be used to indicate that the game attribute data traversed is verified successfully, for example, it can be embodied as that the sub-game attribute data is consistent with the game attribute data traversed; and the second verification result can be used to indicate that the game attribute data traversed is verified unsuccessfully, for example, it can be embodied as that the sub-game attribute data is inconsistent with the game attribute data traversed.

[0074] Optionally, the game attribute data tree nests the sub-game attribute data, because each game behavior tree starts with a root node, and the root node itself is a sequential execution node, so the game attribute data traversed is verified based on the sub-game attribute data to obtain a verification result.

[0075] Optionally, the sub-game attribute data can be configurable data set in a table. This data can be obtained by reading and analyzing a file. For example, after loading the file, a sub-game attribute data set might be obtained for a sect, with skills 1 and 2 listed in its skill list. From the parsed game behavior tree path set, a path node array is selected. This array stores all nodes under that path in an ordered manner. The statement "If it is sect 1, use skill 3" is used. When traversing this node array sequentially, when we reach the judgment node "If it is sect 2," the decision is made through... Comparing the game attribute data with the sub-game attribute data reveals a mismatch between the sub-game attribute data and the traversed game attribute data. Therefore, the verification of this set of game attribute data is deemed to have failed, meaning that this game attribute data is unlikely to be executed during actual game operation, and the check of the current game attribute data can be abandoned. However, if the node array is "If it is sect 1, use skill 3", the traversal continues when "If it is sect 1" meets the condition. When the traversal reaches "Use skill 3", it is found that the NPC is also configured with skill 3, thus confirming that the game attribute data verification is successful, and the sub-game attribute data matches the traversed game attribute data.

[0076] As an optional embodiment, step S208, determining the target state of the game behavior tree based on the verification results, includes: determining that the game behavior tree is in a normal state based on the first verification result of the target number, wherein the target state includes the normal state, the normal state is used to determine that the virtual game character is the mounting object of the game behavior tree, and the first verification result of the target number corresponds one-to-one with the nodes of the target number.

[0077] In this embodiment, the verification results of multiple nodes in the game behavior set are determined, and the game behavior tree is determined to be in a normal state based on the first verification result of the target number. The normal state is used to determine that the virtual game character is the mounting object of the game behavior tree, and the first verification result of the target number corresponds one-to-one with the node of the target number.

[0078] Optionally, determine the set of game behaviors corresponding to the virtual game character, traverse the nodes in the set of game behaviors, match the game attribute data and sub-game attribute data in the set of game behaviors to obtain a first verification result, and based on the first verification result, determine that the game behavior tree is in a normal state and determine that the virtual game character is the mounting object of the game behavior tree.

[0079] As an optional embodiment, step S208, determining the target state of the game behavior tree based on the verification result, includes: determining that the game behavior tree is in an abnormal state based on the second verification result, wherein the target state includes the abnormal state, and the abnormal state is used to determine that the virtual game character is not the mounting object of the game behavior tree.

[0080] In this embodiment, the verification result of the plurality of nodes in the game behavior set is determined, the second verification result is obtained in response to the sub-game attribute data and the traversed game attribute data, and the game behavior tree is determined to be in an abnormal state based on the second verification result, that is, the game attribute data and the sub-game attribute data do not match, wherein the abnormal state is used to determine that the virtual game character is not the mounting object of the game behavior tree.

[0081] Optionally, the game behavior set corresponding to the virtual game character is determined, the nodes in the game behavior set are traversed, the target state of the game behavior tree is determined, the target state can be an abnormal state or a normal state, the second verification result is obtained in response to the game attribute data in the game behavior set and the sub-game attribute data not matching, and the game behavior tree is determined to be in an abnormal state based on the second verification result, and it is determined that the virtual game character is not the mounting object of the game behavior tree.

[0082] As an optional embodiment, each set of game attribute data is discarded in response to the first condition data in the attribute data of the virtual game character being different from the second condition data in each set of game attribute data, wherein the first condition data is used to indicate the execution condition of the game behavior set corresponding to the attribute data of the virtual game character, and the second condition data is used to indicate the execution condition of the game behavior set corresponding to each set of game attribute data.

[0083] In this embodiment, the first condition data of the game behavior set corresponding to the attribute data of the virtual game character is determined to be different from the second condition data of the game behavior set corresponding to each set of game attribute data, and each set of game attribute data is discarded in response to the first condition data of the game behavior set corresponding to the attribute data of the virtual game character being different from the second condition data of the game behavior set corresponding to each set of game attribute data, wherein the condition data can be an execution condition, for example, it can be executed or not executed.

[0084] Optionally, the first condition data in the attribute data of the virtual game character can be compared with the second condition data in each set of game attribute data, it is determined that the first condition data of the game behavior set corresponding to the attribute data of the virtual game character is different from the second condition data of the game behavior set corresponding to each set of game attribute data, that is, it can be determined that the set of game attribute data will not be executed in the actual running of the game, and then the set of game attribute data can be discarded.

[0085] Optionally, in each game attribute data, if some judgment nodes are encountered and different from the second condition data of the attribute data of the virtual game character, the game attribute data (current path) can be abandoned, for example, the NPC belongs to Sect 1, and a condition is encountered in the process of traversing one path that only Sect 2 is executed, which means that the actual operation of this time cannot run to, so the path is directly abandoned to avoid false positives; if the path is successfully executed, it means that the actual operation of this time has a probability of running to, at this time, the corresponding action node needs to be checked, for example, it releases skill 2, and it is necessary to check whether the current NPC has skill 2, if not, it proves that the behavior tree and the NPC are not matched, and an error needs to be recorded.

[0086] For example, by comparing the attribute data of the virtual game character with each set of game attribute data, when it is found that the first condition data in the attribute data of the virtual game character is different from the second condition data in each set of game attribute data, it can be determined that the set of game attribute data cannot be executed in the actual operation of the game, so the current game attribute data can be abandoned, for example, if the game attribute data is "if Sect 1, use skill 3", when "if Sect 1" is met, it continues to traverse; when it reaches "use skill 3", it is found that skill 3 is not configured in the attribute data of the virtual game character, it can be determined that the game attribute data is wrong, that is, the NPC is not configured, and in the actual game, the corresponding skill cannot be used, so the set of game attribute data can be discarded.

[0087] As an optional embodiment, the attribute data of the virtual game character includes first attribute data of the virtual game character configured to the virtual game character, and / or second attribute data of the virtual game character configured to the game behavior tree.

[0088] In this embodiment, the attribute data of the virtual game character can include first attribute data of the virtual game character configured to the virtual game character, and / or second attribute data of the virtual game character configured to the game behavior tree, wherein the first attribute data of the virtual game character can be the NPC data configured in the table, and the first attribute data of the virtual game character and the game behavior attribute can be jointly checked; the second attribute data of the virtual game character can be used for static checking, and can be conditions that can be judged in the process of static checking, for example, can be the designed treasure address in the configuration information.

[0089] For example, static checking can be performed on the nodes of the game behavior tree itself to check whether the action node of releasing a magic weapon is set with an identity document (ID) that does not exist. The corresponding attribute data of the second virtual game character can be read first, and the corresponding action node can be checked in the parsed game attribute data in combination with the attribute data of the second virtual game character.

[0090] Optionally, when the attribute data of the first virtual game character is encountered in the traversal process, for example, the condition of "own blood volume being lower than 50%", which cannot be determined in the static checking, can be determined by actual running test, and can be directly executed by default to satisfy the condition in the static checking, so as to determine the state of the attribute data of the first virtual game character. The attribute data of the second virtual game character is a condition that can be directly determined in the static checking, and can be directly determined according to the NPC data, for example, "whether belonging to a certain school", "whether carrying a corresponding skill", and the like. By the above two methods, all possible paths of the NPC mounted by the behavior tree can be checked, so as to achieve full coverage in the static checking.

[0091] As an optional embodiment, the attribute data of the virtual game character is used to verify each set of game attribute data to obtain a verification result, including one of the following: detecting that the attribute data of the virtual game character changes, verifying each set of game attribute data based on the changed attribute data of the virtual game character to obtain a verification result; detecting that the game behavior tree changes, verifying each set of game attribute data corresponding to the changed game behavior tree based on the attribute data of the virtual game character to obtain a verification result; detecting that the attribute data of the virtual game character changes and the game behavior tree changes, verifying each set of game attribute data corresponding to the changed game behavior tree based on the changed attribute data of the virtual game character to obtain a verification result.

[0092] In this embodiment, when it is detected that the attribute data of the virtual game character changes, each set of game attribute data is verified based on the changed attribute data of the virtual game character to obtain a verification result; when it is detected that the game behavior tree changes, each set of game attribute data corresponding to the changed game behavior tree is verified based on the attribute data of the virtual game character to obtain a verification result; and when it is detected that the attribute data of the virtual game character changes and the game behavior tree changes, each set of game attribute data corresponding to the changed game behavior tree is verified based on the changed attribute data of the virtual game character to obtain a verification result.

[0093] Optionally, the game behavior tree and the attribute data of the virtual game character are both likely to be abnormal, and therefore, the submission and modification of the game behavior tree or the attribute data of the virtual game character need to be monitored. The checking of the behavior tree can be triggered by using a hook function. It should be noted that the checking of the behavior tree triggered by using the hook function is only an example, and the detection manner is not limited herein.

[0094] Optionally, when the game behavior tree is modified and / or the attribute data of the virtual game character is modified, the attribute data of the virtual game character and the game attribute data are not matched, and therefore, the modification of the attribute data of the virtual game character and the game attribute data needs to be monitored, and the corresponding checking is triggered each time there is a relevant modification.

[0095] For example, the version management software, such as the open source distributed version control system (git) and the open source version control system (subversion, referred to as SVN), has a hook function (hook mechanism). The attribute data of the virtual game character and the game attribute data can be stored in the SVN repository. Each time a change is made, the SVN repository will notify the corresponding tool of who changed what, so as to achieve a monitoring function. Then, each set of game attribute data is verified based on the changed attribute data, and a verification result is obtained.

[0096] As an optional embodiment, in response to the target state being the abnormal state, each set of game attribute data corresponding to the verification result is obtained; an account associated with each set of game attribute data is determined; and prompt information is sent to the account, where the prompt information is used to indicate that each set of game attribute data is used to make the game behavior tree in the abnormal state.

[0097] In this embodiment, when the target state is the abnormal state, in response to the target state being the abnormal state, each set of game attribute data corresponding to the verification result is obtained; an account associated with each set of game attribute data is determined; and prompt information is sent to the account, so as to remind that the game behavior tree is in the abnormal state. The associated account can be the submitter of the modification.

[0098] Optionally, when the game attribute data and the attribute data of the virtual game character (such as the NPC configuration, the skill configuration, the door configuration, and the like) are not matched, it indicates that the data is incompatible with the game behavior tree that has been mounted, and an error prompt is performed on the submitter, so as to achieve sending of the prompt information to the account.

[0099] For example, the submitter can confirm the error attribution by means of the SVN submission, to trigger the check of the behavior tree by means of the hook function, to attribute the checked error to the submitter while recording, and to increase the confirmation mechanism, so that the error reminder can be sent to the submiter when the recorded error is not handled, and the reminder can disappear only when the error is handled, so that the error can be corrected by reminding the submiter at some key nodes, and it is ensured that each error is followed up by someone.

[0100] Optionally, the prompt information is sent to the account, so as to realize the confirmation of the added error. In the embodiment of the application, the abnormality in the game attribute data in a time dimension which is checked but not handled can be displayed by increasing the error confirmation mechanism in the time dimension, so that the associated account must be confirmed to disappear, otherwise the abnormality always exists and the reminder information is sent at the key nodes, so as to ensure that the error is closed loop processed.

[0101] Optionally, when the abnormality is modified, the history record of the modification can be confirmed by selecting the check control.

[0102] As an optional embodiment, the game behavior tree is converted into at least one set of game attribute data, including: calling the target position cached at least one set of game attribute data converted from the game behavior tree.

[0103] In the embodiment, when the game attribute data of the target position is changed, the target position cached at least one set of game attribute data converted from the game behavior tree is taken, wherein the game attribute data can be stored in the directory of the project code in the form of a table file, each table corresponds to the attribute data content of a different virtual game character, and the NPC related data is configured in the NPC table, and the skill related data is configured in the skill table. When the game attribute data configuration is completed, the table content is updated to the directory of the project, so that the game attribute data change can change the table configured by the planner.

[0104] For example, the game attribute data of the game behavior tree can be queried and viewed in the front end, the backend dynamically maintains the attribute data (behavior tree content) of the virtual game character and the information of the game behavior set in the cache through the hook function (i.e., hook dynamic maintenance) of monitoring the behavior tree file, compares the game attribute data of the game behavior tree with the attribute data of the virtual game character, checks the error information and notifies, for example, if a behavior tree is changed, a sub-thread is triggered to perform the check, the content of the latest behavior tree is re-read and the path of the tree is calculated, the cache corresponding to the target position can be updated according to the key value, if the game attribute data is added, it is added to the cache, and if it is deleted, it is deleted from the cache, and the attribute data of the virtual game character is the same.

[0105] In the embodiment of the application, since the quantity of game attribute data is large, if the game attribute data is not changed but the path is re-traversed every time, it will consume a lot of time, and the content of the attribute data of the virtual game character is large, and frequent reading will also cause the problem of low efficiency, therefore, the embodiment of the application dynamically maintains the attribute data of the virtual game character and the game attribute data in the cache to solve the above problems.

[0106] In this embodiment, after all the game attribute data of the game behavior tree is parsed, the attribute data (table) of the virtual game character is checked, which can cover all the game attribute data of the NPC under the corresponding game behavior tree, i.e., all the nodes that can be run in the actual game are checked, even if the triggering condition is extremely harsh, in this case, the errors in the checking rules can be checked out, and the checked errors are all absolute problems, thereby realizing the effect of improving the coverage and accuracy of the behavior tree checking; by caching the content of the game behavior tree and the attribute data of the virtual game character, the time-consuming of frequent file reading is reduced, by caching the repeated path in the game behavior tree parsing process, the speed of the game behavior tree parsing is accelerated, thereby ensuring the checking speed at a large scale, and realizing the effect of improving the checking speed; by monitoring the changes of the behavior tree and the data, the checking is automatically triggered and the errors are automatically attributed to the corresponding person, by recording the unsolved errors and reminding at the key node, the attribution person confirms and handles, reduces the risk of omission and makes the entire checking process closed loop, thereby realizing the effect of automatic closed loop.

[0107] In this embodiment, a game behavior tree to be verified is acquired, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree; the game behavior tree is converted into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set; each set of game attribute data is verified based on attribute data of the virtual game character, to obtain a verification result, wherein a configuration attribute of the attribute data of the virtual game character matches a configuration attribute of the game behavior tree; and a target state of the game behavior tree is determined based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree. That is, the application quickly links attribute data (such as configuration data in a table) of the virtual game character under at least one set of game attribute data (such as all action path sets) of the game behavior tree to be verified, so as to verify whether the behavior tree is in an abnormal state, thereby realizing automatic checking of the game behavior tree, and further realizing the technical effect of improving the efficiency of verifying the game behavior tree, and solving the technical problem of low efficiency of verifying the game behavior tree.

[0108] The technical solutions of the embodiments of the application will be further described below in combination with preferred embodiments. Specifically, a round game behavior tree automatic checking scheme is described.

[0109] At present, the artificial intelligence (AI) of a non-player character (NPC) in a round game is basically configured through a game behavior tree. Game planners design the actions of the non-player character in each round through the game behavior tree, so that players can obtain corresponding game experience. However, due to the flexibility of the game behavior tree itself, the logic constituted by the game behavior tree is very responsible, and the game behavior tree needs to be mounted on the non-player character and match the data of the non-player character to be truly effective.

[0110] For general production scenarios, game behavior trees and NPC data are usually used for planning and design, for example, the NPC is configured in the form of filling in a table, and game test engineers are responsible for verification in the game. Usually, in order to adjust the game difficulty or game content, the game planners frequently modify the game behavior tree and the NPC data. In addition, due to the pursuit of higher production speed, some underlying game behavior trees are often reused and mounted on multiple NPCs. For example, a new NPC data is configured and mounted on a game behavior tree that has been designed before and is used universally, and the corresponding production task is completed. However, for the downstream test link, the test engineers still need to verify the game performance of the NPC under the game behavior tree and compare the game behavior tree and the NPC data.

[0111] The disadvantages of the simple script combined with manpower for checking are not efficient, which can be caused by the following reasons. On one hand, the checking script is obtained by scanning the skill nodes of the game behavior tree through template matching, and some nodes that are not actually run are also scanned. For example, the conditional node in the pre-node needs to be satisfied to belong to a certain school to continue to execute, so when the NPC does not satisfy the condition, it is impossible to execute the skill node, but the node is checked, resulting in low efficiency of checking the node tree. On the other hand, in a high-speed production environment, a large amount of game behavior trees are submitted and modified every moment, and a large amount of NPC data is also submitted and modified, so it is difficult to accurately identify the responsible person, resulting in a large number of errors being checked out, but it is difficult to follow up or even no one to follow up.

[0112] In the related art, the automatic testing of the game behavior tree is proposed by writing a simple script combined with manpower for checking, wherein the logic of the script is relatively simple, and only a single skill node of the game behavior tree can be checked. The nodes meeting the skill node characteristics can be selected by using the template matching method, all skill nodes of a game behavior tree are obtained by scanning, and the NPC data mounted thereon is checked and compared, so as to check the game behavior tree. For example, skill 1 is used in the game behavior tree, but the corresponding NPC does not configure skill 1, which can be understood as the NPC does not have skill 1, so it is impossible to release skill 1, and a matching error is generated. Then, the non-false error is screened out by manpower, the problem is located, and the error person is tracked.

[0113] However, the test workload related to the game behavior tree is huge, and the simple script combined with manpower for checking cannot completely cover it. Moreover, the game behavior tree has a great influence on the content and difficulty of the game, and once an error occurs, a bad game experience will be brought.

[0114] The embodiment of the application proposes a scheme for automatic checking of turn-based game behavior trees. Under the premise of completely analyzing all action path sets of the game behavior tree, the table is quickly linked, including NPC, skill, magic weapon and other configuration data used in the game behavior tree, to verify the correctness of the game behavior tree. At the same time, a perfect automatic mechanism is built, including triggering checking, locating errors and error confirmation, so as to efficiently verify the correctness of the game behavior tree and build a complete automatic checking mechanism, reduce labor loss, improve productivity and guarantee quality, and achieve the purpose of improving productivity and quality guarantee.

[0115] The embodiment of the application will be further introduced below.

[0116] As an optional embodiment, the game behavior tree is analyzed.

[0117] In this embodiment, the first step of the automated check is to parse the game behavior tree, each execution logic of the game behavior tree is a path from the top node to the bottom root node according to certain rules, so a game behavior tree can be abstracted as a set of various attack paths, each NPC can only choose one path from the set to execute, but in this embodiment, the parsing of the game behavior tree is different from the traditional tree traversal algorithm, and the traversal of the game behavior tree is proposed. The way of abstracting the special game behavior tree node (composite node) is that the influence of the composite node on the path is abstracted into two general modes, and finally the game behavior tree is converted into a plurality of path sets.

[0118] Optionally, parsing the game behavior tree is essentially to find all possible attacks represented by the game behavior tree, from an algorithmic perspective, it is to traverse all paths from the root node and record the node information on the path in turn, except that the traversal of the game behavior tree needs to be processed in some special ways.

[0119] Optionally, the logic of the game behavior tree as a whole is mainly controlled by the composite node, which mainly includes the following four types: sequence execution node (Sequence node) from left to right, if false, no longer executed; selection execution node (Selector node) from left to right, if false, continue to execute; parallel execution node (Parallel node) from left to right, execute all child nodes, execute the last attack; probability execution node (Probability node) executes child nodes according to the configured probability, proportion, and it needs to be noted that the above four types are commonly used, but if there are other extended types, the embodiments of the present application can also process other processing modes.

[0120] For example, taking the probability execution node as an example, Figure 3 is a schematic diagram of game behavior tree parsing according to an embodiment of the present application, as Figure 3 shown, the Probability node splices three child nodes, the first child node has a 60% probability of execution, the second and third nodes are both 20% probability of execution, each child node forms its own action path (the second and third child node paths are folded and not shown in the figure), which means that one of the three child node paths will be executed according to the probability, so the entire logic running to the Probability node can be abstracted as a probability execution of the three paths below, which is expressed in the game as the NPC releasing one of the skills of losing heart, immobilization and separation of soul. That is, the game behavior tree action path at the Probability node forms multiple different action paths with the logic of the child node down, which can be understood as a path branching into three different paths when encountering this type of node.

[0121] Optionally, the Sequence node is similar to the Probability node, and can represent selection of an executable path in a sequence, or can be abstracted as a game behavior tree path branching to form multiple new paths at the node; all child nodes spliced under the Sequence node are executed in left-to-right order, for example, Figure 3 The "lose heart" node in the above is a Sequence, which represents running its child nodes from left to right, that is, first obtaining a surviving player, then filtering to obtain a player who has not been sealed, and then using the lose heart symbol skill on the player. It can be seen that only one game behavior tree path is generated from beginning to end, which means that the game behavior tree path does not branch into a second path at the Sequence node, but concatenates its child nodes to the original path. Among them, the order execution node is similar to the Sequence node.

[0122] In this embodiment, as long as the influence mode of different composite nodes on the path is abstracted, the remaining non-composite nodes, such as conditions, filters, and actions, can be summarized as a class of action nodes, that is, the path execution set of the game behavior tree can be abstracted by saving them in the node path array in order, such as in Figure 3 In the three paths abstracted from the Probability node in the above, the node path array of the lose heart node is (lose heart, obtain a surviving player, target selection: obtain an opponent player), (filter:...), (target filter, negation), (use skill lose heart symbol), and in the actual game, the game attribute data of the NPC is to execute one path array in order.

[0123] Optionally, the path processing ideas of two kinds of composite nodes are finally abstracted, such as the Selector node and the Probability node, each child node under the composite node directly forms an independent behavior node path behind; such as the Sequence node and the Parallel node, each child node under the composite node composes a behavior node path in order.

[0124] Optionally, Figure 4 is a schematic diagram of a game behavior tree nesting a sub-game behavior tree according to one embodiment of the application, as shown in Figure 4 As shown in the above, the game behavior tree nests a sub-game behavior tree, because each game behavior tree starts with a root node, and the root node itself is a Sequence, so the processing is consistent.

[0125] Optionally, since the game behavior tree is different from the general computer tree structure, all the game behavior tree situations can be parsed into a path array set by abstracting the composite node and adding the tree traversal algorithm. Through the abstract processing of the key composite and the tree traversal algorithm, all the game behavior tree paths can be parsed, wherein the abstract processing of the key composite refers to two processing methods formed by classifying according to the influence of different composites on the path, for example, whether to derive multiple paths or keep one path.

[0126] As an optional embodiment, the game behavior tree is checked.

[0127] In this embodiment, the game behavior tree is checked by traversing the path set parsed above. In the traversal process, some paths that will not be executed in practice are removed according to the data (for example, some paths are executed only when the conditions are met, and if the conditions are not met, the paths will not be executed in practice), and the remaining paths are the paths that may be run in the game. Therefore, in view of these actual paths that may be run, the data of the mounted NPC is combined to make a check, wherein the checking method can be to judge whether the path in the action node matches the data of the mounted NPC, for example, if skill 1 is used, the NPC configuration must have skill 1.

[0128] Optionally, the game behavior tree itself is statically checked to check whether the action node of the released magic weapon is set with an existing magic weapon address (Identity Document, referred to as ID). This can be achieved by first reading the data of the corresponding table, then combining the table data, and checking the configuration of the corresponding action node in all the parsed paths. For example, after obtaining the path set, all the parsed node information can be used to check the node configuration information, wherein Table 1 is a schematic diagram of the table data configuration information of the non-player character according to one embodiment of the present application, as shown in Table 1, each path is an ordered array, and the elements are nodes.

[0129] Table 1 is a schematic diagram of the table data configuration information of the non-player character according to one embodiment of the present application

[0130]

[0131] Optionally, the game behavior tree needs to be mounted on the NPC to work, but the data of each NPC is different, even if different NPCs mount the same game behavior tree, they will show different behaviors, and some game behavior trees are normal under certain NPCs, but will produce errors when mounted on other NPCs, so the situation can be checked in combination with the NPC and the game behavior tree, that is, the corresponding table data of the NPC is obtained by directly reading the configuration data, as shown in Table 1, based on the table data of the NPC, all paths of the game behavior tree mounted by the NPC are obtained, and finally when traversing the node array, each corresponding node can check whether the corresponding data is correct or abnormal.

[0132] For example, as shown in Table 1, the NPC data is configured in the table, and the carrier of the table is the extended format (xlsx) of the table. By reading the file and analyzing and processing the file, the NPC data can be obtained. For example, after loading, the data of an NPC is obtained as Sect A, and the skill list configured by the NPC is skill 1 and skill 2. A path node array is selected from the path set of the parsed game behavior tree, and the array sequentially stores all nodes in the path. When traversing the node array in order, when we traverse the judgment node “if Sect 2”, it is found through comparison of the NPC data that the condition is not met, that is, it is impossible to execute this path in actual game running, so the check of the current path can be abandoned. If the node array is “if Sect 1, use skill 3”, when “if Sect 1” is met, it continues to traverse; when “use skill 3” is reached, it is found that the NPC does not configure skill 3, so it can be determined that the game behavior tree is incorrect, that is, the NPC does not configure, and the corresponding skill cannot be used in actual game.

[0133] Optionally, on each path, if some judgment nodes are encountered and do not meet the conditions, the current path can be abandoned, such as the NPC belongs to Sect 1, and a condition that Sect 2 is executed is encountered in the traversal process of one of the paths, which indicates that it is impossible to run to this time in actual running, so the path is directly abandoned to avoid false positives; if the path is successfully executed, it indicates that there is a probability of running to this time in actual running, at which time the corresponding action node needs to be checked, such as it releases skill 2, which needs to check whether the current NPC has skill 2, if not, it proves that the game behavior tree and the NPC do not match, and an error needs to be recorded.

[0134] Optionally, when conditions that need to be determined by actual running test are encountered in the traversal process, such as the condition that "the own blood volume is less than 50%", the condition can be satisfied by default in the static check, and the process is directly executed; and some conditions that can be determined in the static check can be directly determined according to the NPC data, such as "whether belonging to a certain school", "whether carrying a corresponding skill", etc. Through the above-mentioned manner, all possible paths of the NPC mounted by the game behavior tree are checked, so as to realize full coverage in the static check.

[0135] As an optional embodiment, an automatic checking mechanism is built, the hook function is used to automatically trigger the check, and a confirmation mechanism is provided, so that errors can be improved.

[0136] Optionally, the game behavior tree and the data change may have the possibility of producing an exception, therefore, the submission and modification of the game behavior tree or the data need to be monitored, Figure 5 is a schematic diagram of the automatic checking result according to one embodiment of the application, as Figure 5 shown, the check of the game behavior tree is triggered by using the hook function, the errors obtained by the check are recorded and attributed to the submitter, and a confirmation mechanism is added, as Figure 5 shown, when the recorded errors are not processed, the error reminder will be kept at the submitter, and the reminder will disappear only after the errors are processed, so that the errors can be corrected by reminding the submitter at some key nodes, and it is ensured that each error is followed up by a person, wherein the data change can be a table changed by a planner, as shown in Table 1, the data is stored in the directory of the project code in the form of a table file, each table corresponds to different data configuration content, the NPC related data is configured in the NPC table, and the skill related data is configured in the skill table, and the planner updates the content of the table to the directory of the project after completing the configuration.

[0137] For example, when the table content related to NPC configuration, skill configuration, school configuration, etc. is changed, the data is incompatible with the game behavior tree that has been mounted, and the error reminder is performed at the submitter.

[0138] Optionally, when the game behavior tree is changed, the NPC data and the game behavior tree are not matched, therefore, the related table and the change of the game behavior tree need to be monitored, and the corresponding check is triggered when the related change is performed.

[0139] For example, version management software, such as open source distributed version control system (git) and open source version control system (subversion, referred to as SVN), has a hook function (hook mechanism) that can store tables and game behavior trees in an SVN repository. Each time a change is made, the SVN repository will notify the corresponding tool of who made what changes, thereby achieving a monitoring function.

[0140] Optionally, the submitter of the SVN submission can confirm the ownership of the error

[0141] Optionally, Figure 6 is a schematic diagram of a game behavior tree error confirmation mechanism according to an embodiment of the present application, as shown in Figure 6 The error confirmation mechanism is added to the time dimension to display the errors that are checked in one time dimension and not processed, so that the corresponding student must confirm before the errors disappear, otherwise the errors will exist and be reminded at the key node, ensuring that the errors are closed loop processed, for example, as shown in Figure 6 The problems checked out in a week can be displayed in a week dimension.

[0142] Optionally, Figure 7 is a schematic diagram of displaying game behavior tree history modification data according to an embodiment of the present application, as shown in Figure 7 When the error is modified, the history record of the modification can be confirmed by selecting the check control.

[0143] In the embodiment of the present application, since the number of game behavior tree files is large, if the game behavior tree is not changed but the path is re-traversed every time, it will consume a lot of time. At the same time, the content of the table associated with the game behavior tree is large, and frequent reading will also cause low efficiency. Therefore, the embodiment of the present application dynamically maintains the game behavior tree content and the information of the parsed path in the cache to solve the above problems.

[0144] Optionally, Figure 8 is a schematic diagram of dynamically maintaining the cache according to an embodiment of the present application, as shown in Figure 8As shown, the game attribute data of the game behavior tree can be queried and viewed at the front end, the Backend dynamically maintains the attribute data (Btree Data) of the virtual game character and the information of the game behavior set in the cache by monitoring the hook function (i.e., performing hook dynamic maintenance) of the game behavior tree file, compares the game attribute data of the game behavior tree with the attribute data of the virtual game character, checks error information and notifies, for example, if a game behavior tree is changed, a sub-thread is triggered to perform checking (Check Thread), the content of the latest game behavior tree is re-read and the path of the tree is calculated, the cache can be updated to the corresponding target position according to the key value, if the game attribute data is added, it is added to the cache, and if it is deleted, it is removed from the cache, and the cache of the attribute data of the virtual game character is the same.

[0145] In this embodiment, after all behavior paths of the game behavior tree are parsed, the linkage table is checked, all possible actions of the NPC under the corresponding game behavior tree can be covered, that is, all nodes that can be run in the actual game are checked, even if the triggering condition is extremely harsh, in this case, errors that occur in the checking rules can be checked out, and the checked errors are all absolute problems, thereby achieving the effects of improving the coverage and accuracy of the game behavior tree checking; by caching the content of the game behavior tree and data, the time-consuming of frequent file reading is reduced, by caching the repeated paths in the game behavior tree parsing process, the game behavior tree parsing speed is accelerated, thereby ensuring the checking speed at a large scale, and the effect of improving the checking speed is achieved; by monitoring the changes of the game behavior tree and data, the checking is automatically triggered and the errors are automatically attributed to the corresponding person, by recording the unsolved errors and reminding at the key node, the attribution person is confirmed and processed, the missing risk is reduced and the entire checking process is closed loop, thereby achieving the effect of automatic closed loop.

[0146] From the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and a necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device) to execute the method described in each embodiment of the present application.

[0147] There is also provided in the embodiments a data processing apparatus for implementing the above embodiments and preferred embodiments, which have been described above. As used below, the term "unit" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

[0148] Figure 9 is a structural block diagram of a data processing apparatus according to an embodiment of the application, as shown in Figure 9 The data processing apparatus can include an obtaining unit 902, a converting unit 904, a verifying unit 906, and a determining unit 908.

[0149] The obtaining unit 902 is configured to obtain a game behavior tree to be verified, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree.

[0150] The converting unit 904 is configured to convert the game behavior tree into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set.

[0151] The verifying unit 906 is configured to verify each set of game attribute data based on attribute data of the virtual game character, to obtain a verification result, wherein the attribute data of the virtual game character matches configuration data of the game behavior tree.

[0152] The determining unit 908 is configured to determine a target state of the game behavior tree based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree.

[0153] In this embodiment, by the acquisition unit, a game behavior tree to be verified is acquired, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree; by the conversion unit, the game behavior tree is converted into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set; by the verification unit, each set of game attribute data is verified based on attribute data of the virtual game character, and a verification result is obtained, wherein the attribute data of the virtual game character matches configuration data of the game behavior tree; and by the determination unit, a target state of the game behavior tree is determined based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree. That is to say, the application quickly links the attribute data (such as configuration data in a table) of the virtual game character under at least one set of game attribute data (such as all action path sets) of the game behavior tree to be verified, so as to verify whether the behavior tree is in an abnormal state, thereby realizing automatic checking of the game behavior tree, and further realizing the technical effect of improving the efficiency of verifying the game behavior tree, and solving the technical problem of low efficiency of verifying the game behavior tree.

[0154] It should be noted that the above units can be realized by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all the units are located in the same processor; or the units are located in different processors in any combination.

[0155] Embodiments of the application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0156] Optionally, in this embodiment, the non-volatile storage medium can be configured to store a computer program for executing the following steps:

[0157] S1, acquiring a game behavior tree to be verified, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree;

[0158] S2, converting the game behavior tree into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set;

[0159] S3, verifying each set of game attribute data based on attribute data of the virtual game character, and obtaining a verification result, wherein the attribute data of the virtual game character matches configuration data of the game behavior tree;

[0160] S4, determining a target state of the game behavior tree based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree.

[0161] Optionally, in the embodiment, the computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various computer program storage media.

[0162] Embodiments of the application also provide an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.

[0163] Optionally, the electronic device can further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0164] Optionally, in the embodiment, the processor can be configured to perform the following steps through the computer program:

[0165] S1, obtaining a game behavior tree to be verified, wherein the game behavior tree is used to control a virtual game character to perform a game behavior when the virtual game character is a mounting object of the game behavior tree;

[0166] S2, converting the game behavior tree into at least one set of game attribute data, wherein each set of game attribute data is used to determine a game behavior set;

[0167] S3, verifying each set of game attribute data based on attribute data of the virtual game character, to obtain a verification result, wherein the attribute data of the virtual game character matches configuration data of the game behavior tree;

[0168] S4, determining a target state of the game behavior tree based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree.

[0169] Optionally, specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, and the embodiment will not be described here.

[0170] The above embodiment numbers of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0171] In the above embodiments of the application, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0172] In several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other ways. Among them, the above-described device embodiments are only illustrative, for example, the division of the units can be a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or modules shown or discussed can be indirect coupling or communication connection between the units or modules through some interfaces, and can be electrical or other forms.

[0173] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed on a plurality of units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.

[0174] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0175] When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0176] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A data processing method, characterized in that, include: Obtain the game behavior tree to be verified, wherein the game behavior tree is used to control the virtual game character to perform game behaviors when the virtual game character is the object attached to the game behavior tree; The game behavior tree is converted into at least one set of game attribute data, wherein each set of game attribute data is used to determine a set of game behaviors; The game attribute data for each group is verified based on the attribute data of the virtual game character to obtain the verification result, wherein the attribute data of the virtual game character matches the configuration data of the game behavior tree. Based on the verification results, the target state of the game behavior tree is determined, wherein the target state is used to determine whether the virtual game character is the object attached to the game behavior tree; The step of converting the game behavior tree into at least one set of game attribute data includes: obtaining node information of each node in a plurality of nodes of the game behavior tree, wherein each node represents a set of game attribute data; determining the combination order of a target number of game attribute data corresponding to a target number of nodes based on the node information of each node, wherein the plurality of nodes includes the target number of nodes corresponding to each set of game attribute data; and combining the target number of game attribute data according to the combination order to obtain each set of game attribute data.

2. The method according to claim 1, characterized in that, The game attribute data for each set is verified based on the attribute data of the virtual game character to obtain verification results, including: The game attribute data of the target quantity are traversed according to the combination order; Determine the sub-game attribute data corresponding to the traversed game attribute data from the attribute data of the virtual game character; The game attribute data that has been traversed is verified based on the sub-game attribute data to obtain the verification result.

3. The method according to claim 2, characterized in that, The game attribute data traversed is verified based on the sub-game attribute data to obtain the verification result, including: In response to the sub-game attribute data matching the traversed game attribute data, a first verification result is determined, wherein the first verification result is used to indicate that the traversed game attribute data has been successfully verified; In response to a mismatch between the subgame attribute data and the traversed game attribute data, a second verification result is determined, wherein the second verification result indicates that the verification of the traversed game attribute data has failed.

4. The method according to claim 3, characterized in that, Determining the target state of the game behavior tree based on the verification results includes: Based on the first verification result of the target number, it is determined that the game behavior tree is in a normal state, wherein the target state includes the normal state, the normal state is used to determine that the virtual game character is the mounting object of the game behavior tree, and the first verification result of the target number corresponds one-to-one with the nodes of the target number.

5. The method according to claim 3, characterized in that, Determining the target state of the game behavior tree based on the verification results includes: Based on the second verification result, it is determined that the game behavior tree is in an abnormal state, wherein the target state includes the abnormal state, and the abnormal state is used to determine that the virtual game character is not the mounting object of the game behavior tree.

6. The method according to claim 1, characterized in that, The method further includes: If the first condition data in the attribute data of the virtual game character is different from the second condition data in each group of game attribute data, then each group of game attribute data is discarded. The first condition data is used to represent the execution condition of the game behavior set corresponding to the attribute data of the virtual game character, and the second condition data is used to represent the execution condition of the game behavior set corresponding to each group of game attribute data.

7. The method according to any one of claims 1 to 6, characterized in that, The attribute data of the virtual game character includes the attribute data of a first virtual game character configured to the virtual game character, and / or the attribute data of a second virtual game character configured to the game behavior tree.

8. The method according to any one of claims 1 to 6, characterized in that, The game attribute data for each set is verified based on the attribute data of the virtual game character, and the verification result is obtained, including one of the following: If a change in the attribute data of the virtual game character is detected, the game attribute data of each group is verified based on the changed attribute data of the virtual game character to obtain the verification result. If a change is detected in the game behavior tree, the game attribute data corresponding to each group of the changed game behavior tree is verified based on the attribute data of the virtual game character, and the verification result is obtained. If the attribute data of the virtual game character changes and the game behavior tree changes, the game attribute data corresponding to each group of the game attribute data in the changed game behavior tree is verified based on the changed attribute data of the virtual game character, and the verification result is obtained.

9. The method according to any one of claims 1 to 6, characterized in that, The method further includes: In response to the target state being an abnormal state, obtain each set of game attribute data corresponding to the verification result; Identify the account associated with each set of game attribute data; A notification message is sent to the account, wherein the notification message indicates that each set of game attribute data is used to cause the game behavior tree to be in the abnormal state.

10. The method according to any one of claims 1 to 6, characterized in that, The game behavior tree is converted into at least one set of game attribute data, including: Retrieve the at least one set of game attribute data that has been cached at the target location and converted from the game behavior tree.

11. A data processing apparatus, characterized in that, include: The acquisition unit is used to acquire the game behavior tree to be verified, wherein the game behavior tree is used to control the virtual game character to perform game behaviors when the virtual game character is the object attached to the game behavior tree; A conversion unit is used to convert the game behavior tree into at least one set of game attribute data, wherein each set of game attribute data is used to determine a set of game behaviors; The verification unit is used to verify each set of game attribute data based on the attribute data of the virtual game character, and obtain a verification result, wherein the attribute data of the virtual game character matches the configuration data of the game behavior tree; A determining unit is configured to determine the target state of the game behavior tree based on the verification result, wherein the target state is used to determine whether the virtual game character is the mounting object of the game behavior tree; The conversion unit is used to convert the game behavior tree into at least one set of game attribute data through the following steps: obtaining node information of each node in a plurality of nodes of the game behavior tree, wherein each node represents a set of game attribute data; determining the combination order of a target number of game attribute data corresponding to a target number of nodes based on the node information of each node, wherein the plurality of nodes includes the target number of nodes corresponding to each set of game attribute data; and combining the target number of game attribute data according to the combination order to obtain each set of game attribute data.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 10 when run by a processor.

13. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Testing method and device for behavior trees, storage medium and terminal

    CN107943707A