Method and device for configuring state of target object

By obtaining the preset execution conditions and topological relationships of the target object, the state configuration process is simplified, the complex configuration problems in the existing technology are solved, and more convenient and efficient state configuration is achieved.

CN113918146BActive Publication Date: 2025-06-06ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111408791.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-06-06
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

In the prior art, the state configuration process of the target object is complicated, and it is necessary to start traversing from the root node of the behavior tree, adding execution conditions and results, resulting in inconvenient configuration.

Method used

By obtaining the preset execution conditions and topological relationships of the target object in the specified state, the configuration information of each topological node is obtained, and added to the corresponding component. Finally, the components are combined according to the topological relationship to obtain the configuration information of the target object.

Benefits of technology

There is no need to traverse from the root node every time, simplifying the state configuration process and improving the convenience and efficiency of configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918146B_ABST
    Figure CN113918146B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for configuring the state of a target object, wherein the method for configuring the state of the target object comprises: obtaining each preset execution condition of the target object in a specified state, and a preset topological relationship between the preset execution conditions; obtaining configuration information corresponding to each topological node according to the preset topological relationship and the preset execution conditions; for each topological node, adding the configuration information corresponding to the topological node to the component under the topological node to obtain the target component under the topological node; combining the target components under each topological node according to the preset topological relationship to obtain the configuration information of the target object in the specified state. This solution can improve the convenience of configuring the state of the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more particularly to a method for configuring the state of a target object. The present application also relates to a device for configuring the state of a target object, a computing device, and a computer-readable storage medium. Background Art

[0002] When realizing the state of an object in a virtual world through a computer, it is necessary to logically configure the state to obtain configuration information; then the configuration information is executed for the object to realize the state of the object. The state may include the object's actions, emotions, and physical form, etc.

[0003] In the related art, the above logic configuration is performed using a graphical method such as a behavior tree to obtain a graphical configuration file. The behavior tree is a tree structure graph containing logic nodes and behavior nodes, the logic nodes are the execution conditions of the state, and the behavior nodes are the state results corresponding to the execution conditions.

[0004] However, there are usually multiple execution conditions for a state. In the process of generating the above graphical configuration file, each time it is necessary to traverse from the root node of the behavior tree to add each execution condition to the corresponding logic node. Similarly, each time it is necessary to go through the above traversal to add the execution result to the corresponding behavior node. Therefore, the state configuration process of the target object is complicated, and a more convenient solution is needed.

[0005] Application Contents

[0006] In view of this, the embodiment of the present application provides a state configuration method of a target object to solve the technical defects existing in the prior art. The embodiment of the present application also provides a state configuration device of a target object, a computing device, and a computer-readable storage medium.

[0007] According to a first aspect of an embodiment of the present application, a state configuration method of a target object is provided, comprising:

[0008] Acquire various preset execution conditions of the target object in a specified state, and preset topological relationships between the preset execution conditions;

[0009] According to the preset topological relationship and the preset execution conditions, obtaining configuration information corresponding to each topological node;

[0010] For each topological node, add the configuration information corresponding to the topological node to the component under the topological node to obtain the target component under the topological node;

[0011] According to the preset topological relationship, the target components under each topological node are combined to obtain the configuration information of the target object in the specified state.

[0012] According to a second aspect of an embodiment of the present application, a state configuration device for a target object is provided, including:

[0013] The configuration information acquisition module is configured to acquire each preset execution condition of the target object in a specified state, and a preset topological relationship between the preset execution conditions; and obtain configuration information corresponding to each topological node according to the preset topological relationship and the preset execution conditions;

[0014] A configuration information adding module is configured to add the configuration information corresponding to each topological node to the component under the topological node to obtain the target component under the topological node;

[0015] The component combination module is configured to combine the target components under each topological node according to the preset topological relationship to obtain the configuration information of the target object in the specified state.

[0016] Optionally, the device further includes a component acquisition module configured to:

[0017] For each topological node, obtain the control component, search component, effect component and maintenance component of the topological node;

[0018] According to the preset binding relationship, the control component, the search component, the effect component and the maintenance component of each topological node are respectively bound to obtain the components of the topological node.

[0019] Optionally, the pre-set binding relationship includes: binding the search component and the effect component to the control component, and binding the control component to the maintenance component;

[0020] The component acquisition module is further configured to:

[0021] Acquire a calling interface of a search component of the topology node, a calling interface of an effect component of the topology node, and a calling interface of a control component of the topology node;

[0022] The calling interface of the search component of the topology node and the calling interface of the effect component of the topology node are added to the control component of the topology node, and the calling interface of the control component of the topology node is added to the maintenance component of the topology node to obtain the components of the topology node.

[0023] Optionally, the configuration information includes: the preset execution condition, object search information corresponding to the preset execution condition, an execution result corresponding to the preset execution condition, and control information for controlling the execution result;

[0024] The configuration information adding module is further configured as follows:

[0025] For each topological node, the preset execution condition of the topological node is added to the control component of the topological node, the object search information of the topological node is added to the search component bound to the control component of the topological node, the execution result of the topological node is added to the effect component bound to the control component of the topological node, and the control information of the topological node is added to the maintenance component bound to the control component of the topological node.

[0026] Optionally, the configuration information corresponding to each topological node includes: object search information corresponding to a preset execution condition of each topological node;

[0027] The configuration information acquisition module is further configured to:

[0028] According to the preset topological relationship, determining a trigger object that meets the preset execution condition of each topological node, and an object type of the trigger object;

[0029] The object search information corresponding to the object type of the trigger object is searched from the preset correspondence between the object type and the object search information.

[0030] Optionally, the configuration information includes: an execution result corresponding to a preset execution condition corresponding to each topological node;

[0031] The configuration information acquisition module is further configured to:

[0032] According to the preset topological relationship, determining a trigger object that meets the preset execution condition of each topological node, and an object type of the trigger object;

[0033] The execution result corresponding to the object type of the triggering object is searched from the preset correspondence between the object type and the execution result.

[0034] Optionally, the configuration information further includes: control information for controlling an execution result corresponding to a preset execution condition of the topological node;

[0035] The configuration information acquisition module is also configured as:

[0036] After searching the execution result corresponding to the object type of the trigger object from the preset correspondence between the object type and the execution result, determining the result type of the execution result;

[0037] From the preset correspondence between the result type and the control information, search for the control information corresponding to the result type of the execution result.

[0038] Optionally, the device further includes a state realization module configured to:

[0039] Binding basic execution results and attribute labels to each object in the target virtual scene to which the target object belongs;

[0040] Executing the configuration information for the target virtual scene;

[0041] If the calling condition of the search component in the control component is met, the control component is used to call the search component, and the called search component is used to search for a target object in the target virtual scene whose attribute tag matches the object search information in the search component;

[0042] If the calling condition of the effect component in the control component is met, the control component is used to call the effect component, and the called effect component is used to process the object data of the target object according to the basic execution result bound to the target object to obtain the effect data;

[0043] The control component is used to call the maintenance component, and the called maintenance component is used to control the effect data.

[0044] According to a third aspect of an embodiment of the present application, a computing device is provided, including:

[0045] Memory and processor;

[0046] The memory is used to store computer-executable instructions, and the processor can implement the steps of the state configuration method of the target object when executing the computer-executable instructions.

[0047] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the state configuration method of the target object are implemented.

[0048] In the scheme provided by the present application, each preset execution condition of the target object in a specified state and the preset topological relationship between each preset execution condition are obtained; according to the preset topological relationship and each preset execution condition, the configuration information corresponding to each topological node is obtained; for each topological node, the configuration information corresponding to the topological node is added to the component under the topological node to obtain the target component under the topological node; according to the preset topological relationship, the target components under each topological node are combined to obtain the configuration information of the target object in the specified state. In this way, according to the preset topological relationship between each preset execution condition in the specified state, the configuration information corresponding to each topological node can be obtained, and the configuration information corresponding to each topological node is added to the component under the corresponding topological node to obtain the target component under the topological node. Furthermore, according to the preset topological relationship, the target components under each topological node can be combined to obtain the configuration information of the target object in the specified state, without traversing and searching from the root node every time, and without image drawing. Therefore, the convenience of the state configuration of the target object can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 This is a flow chart of a method for configuring the state of a target object provided by an embodiment of the present application;

[0050] Figure 2 This is an example diagram of the application process of another method for configuring the state of a target object provided by an embodiment of the present application;

[0051] Figure 3 This is an example diagram of the setting principle of a scatter enumeration type preset execution condition in the prior art;

[0052] Figure 4 This is an example diagram of the setting principle of a preset execution condition in a state configuration method of a target object provided in an embodiment of the present application;

[0053] Figure 5 It is a structural diagram of a state configuration device for a target object provided by an embodiment of the present application;

[0054] Figure 6 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0055] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0056] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0057] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0058] First, the terms involved in one or more embodiments of the present application are explained.

[0059] Component: A simple encapsulation of data and methods. Methods are some simple and visible functions of components. Components can be used to implement drag-and-drop programming, fast attribute processing, and object-oriented design.

[0060] In the present application, a method for configuring the state of a target object is provided. The present application also relates to a device for configuring the state of a target object, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0061] Figure 1 A flow chart of a method for configuring the state of a target object provided according to an embodiment of the present application is shown, which specifically includes the following steps:

[0062] S102, obtaining preset execution conditions of the target object in a specified state, and preset topological relationships between the preset execution conditions.

[0063] In a specific application, the specified state is a state specified for the target object. Among them, the state is used to characterize the form of the target object, and may specifically include the action, physical form, emotion, etc. of the target object. The preset execution condition is the condition that needs to be met for the target object to present the specified state. The specified state of the target object is likely to contain multiple sub-states. Therefore, it is necessary to obtain the preset execution conditions for realizing multiple sub-states in the specified state. For example, the specified state of the target object "eating" contains the sub-state "hungry", the sub-state "going to the restaurant", the sub-state "ordering food", the sub-state "eating", and the sub-state "eating", etc. The preset execution conditions for realizing the sub-state "hunger" may include: the satiety value of the target object reaches the hunger threshold, the current time point reaches the meal time, and other conditions. Moreover, the number of preset execution conditions corresponding to any sub-state can be one or more, which is reasonable and can be set according to specific needs. In addition, in order to facilitate understanding and reasonable layout, the following in this application Figure 2 In the embodiment, the setting principle of the preset execution condition is specifically described.

[0064] Moreover, the preset topological relationship between each preset execution condition is used to indicate the execution logic between each topological node corresponding to the specified state. Among them, each topological node corresponding to the specified state is a node composed of preset execution conditions with the same topological structure in each preset execution condition. For example, if the specified state is eating, the preset topological relationship between each preset execution condition may include each topological node being executed in the following order: a topological node composed of preset execution conditions corresponding to the substate "hunger", a topological node composed of preset execution conditions corresponding to the substate "go to the restaurant", a topological node composed of preset execution conditions corresponding to the substate "order a meal", and a topological node composed of preset execution conditions corresponding to the substate "eat". For ease of understanding, the above examples of the specified state and topological nodes are for the "eating" state. In specific applications, the specified state may include substates with diversified execution logic, not limited to the logic of the above sequential execution. For example, in a virtual scene of raising animals, the specified state of the target object may be the state of the user's raised animal having a real animal, and the substates may include: the state of the animal when it is born, the state during the growth of the animal, the state of interaction between different animals, and the like. The state of interaction between different animals can be in parallel with the state of the animal when it is born and the state of the animal during its growth, and the corresponding preset topological relationship is not just a sequential execution relationship. The preset topological relationship between each preset execution condition can be set according to specific information such as the specified state and the specific content of the preset execution condition, and this embodiment does not limit this.

[0065] In addition, the preset execution conditions of the target object in the specified state and the preset topological relationship between the preset execution conditions can be obtained in multiple ways. Exemplarily, when the preset execution conditions and the preset topological relationship between the preset execution conditions have been stored in a database, the preset execution conditions of the target object in the specified state and the preset topological relationship between the preset execution conditions can be read from the database. Alternatively, exemplary, the preset execution conditions input by the developer for the specified state of the target object and the preset topological relationship between the preset execution conditions can be received.

[0066] S104, obtaining configuration information corresponding to each topological node according to the preset topological relationship and each preset execution condition.

[0067] In a specific application, each topological node may correspond to multiple configuration information, and there may be different ways to obtain the configuration information corresponding to different configurations. In order to facilitate understanding and reasonable layout, the following will be specifically described in the form of optional embodiments.

[0068] S106, for each topological node, adding the configuration information corresponding to the topological node to the component under the topological node to obtain the target component under the topological node.

[0069] In specific applications, the components under each topological node may be one or more. Among them, multiple components may be respectively set for multiple functions required for each topological node. For example, a search component for realizing an object search function, an effect component for realizing the execution result of a preset execution condition, and the like may be set. Exemplarily, when there is one component under each topological node, the configuration information corresponding to the topological node may be directly added to the component under the topological node to obtain the target component under the topological node. Alternatively, exemplarily, when there are multiple components under each topological node, the configuration information corresponding to the topological node may be added to multiple components under the topological node according to the corresponding relationship between the configuration information and different components. In order to facilitate understanding and reasonable layout, the second example will be specifically described in the form of an optional embodiment later.

[0070] S108, combining target components under each topological node according to a preset topological relationship to obtain configuration information of the target object in a specified state.

[0071] Among them, according to the preset topological relationship, the target components under each topological node are combined to obtain the configuration information of the target object in the specified state, which may specifically include: according to the preset topological relationship, the splicing format between each topological node is determined, and the target components under each topological node are spliced ​​according to the determined splicing format to obtain the configuration information of the target object in the specified state. In this way, it is equivalent to merging multiple target components into a complete component for realizing the specified state of the target object, which can be used to realize the distributed state configuration of the target object, which is conducive to improving the efficiency of the state configuration of the target object.

[0072] In the solution provided by the present application, according to the preset topological relationship between the preset execution conditions in the specified state, the configuration information corresponding to each topological node can be obtained, and the configuration information corresponding to each topological node is added to the component under the corresponding topological node to obtain the target component under the topological node. Furthermore, the configuration information of the target object in the specified state can be obtained by combining the target components under each topological node according to the preset topological relationship, without traversing and searching from the root node every time, and without image drawing. Therefore, the convenience of the state configuration of the target object can be improved.

[0073] In an optional implementation, the configuration information corresponding to each topological node includes: object search information corresponding to the preset execution condition of each topological node;

[0074] Accordingly, the above-mentioned obtaining the configuration information corresponding to each topological node according to the preset topological relationship and each preset execution condition may specifically include the following steps:

[0075] According to the preset topological relationship, determine the trigger object that meets the preset execution condition of each topological node and the object type of the trigger object;

[0076] The object search information corresponding to the object type of the triggering object is searched from the preset correspondence between the object type and the object search information.

[0077] In specific applications, the object search information is used to indicate the conditions that the object interacting with the trigger object needs to meet, which can be multiple. Exemplarily, the object search information may include at least one of: object type, state information, attribute information, time and space range, and quantity information. Among them, the object type of the trigger object is similar to the object type in the object search information, both of which are used to indicate the type of the object, the difference is that the object is different. There are multiple ways to divide the type of objects. Exemplarily, it can be divided according to whether the object is a living body, such as people, animals, objects, etc.; or it can be divided according to whether the object has specified physical properties, such as explosives, combustibles, conductors, edibles, etc. Or, it can be divided according to whether the object belongs to a specified time and space range, such as indoor objects, objects under street lights, objects in water, etc. This is all reasonable and can be divided according to specific needs. State information refers to the current state of the object, such as alive, burning, watered, etc. Attribute information refers to the inherent attributes of the object, such as age, size, force value, hunger, etc. Time and space range refers to time range and / or space range. The spatial range may specifically be a range covered by a geometric figure centered on the specified object. The quantity information refers to the number of objects. In addition, the target object may be a trigger object, or an object that satisfies the object search information.

[0078] For example, the trigger object is a bomb, and the preset execution condition is that a bomb explodes. In this way, it can be determined that the object type of the trigger object is an explosive, and the object search information corresponding to the explosive may include: object type: person, destructible object, or indiscriminate enemy or friend; state information: alive; target attribute: any; time and space range: 10 meters in a circle; quantity information: no upper limit.

[0079] This embodiment can accurately and efficiently configure objects involved in the implementation of a specified state of a target object through object types and object search conditions, without enumerating the objects involved one by one, thereby improving the accuracy and efficiency of the state configuration of the target object.

[0080] In an optional implementation, the configuration information includes: an execution result corresponding to a preset execution condition corresponding to each topological node;

[0081] Accordingly, the above-mentioned obtaining the configuration information corresponding to each topological node according to the preset topological relationship and each preset execution condition may specifically include the following steps:

[0082] According to the preset topological relationship, determine the trigger object that meets the preset execution condition of each topological node and the object type of the trigger object;

[0083] From the preset correspondence between the object type and the execution result, search for the execution result corresponding to the object type of the triggering object.

[0084] In a specific application, the object type of the trigger object is the same as the object type of the trigger object in the above-mentioned embodiment of the object search information, and will not be described in detail here. For details, please refer to the description of the trigger object in the above-mentioned embodiment of the object search information. The execution result corresponding to the object type of the trigger object refers to the result generated by executing the preset execution condition on the trigger object, which is used to make the object that reaches the object search information have a state corresponding to the execution result.

[0085] Exemplarily, the trigger object is a bomb, and the preset execution condition is that a bomb explodes. In this way, it can be determined that the object type of the trigger object is an explosive, and the execution result corresponding to the explosive may include: causing 100 points of damage. In addition, the objects that reach the object search information include object A, object B, and object C. Among them, object A has 120 health points and no defense ability, so the execution result is 20 health points remaining. Object B has 50 health points and wears a bulletproof vest, which reduces 90 points of damage. Therefore, the execution result is losing 10 health points and remaining 40. Object C has 80 health points and no defense ability, so the execution result is that the health value is cleared.

[0086] This embodiment can accurately and efficiently configure the execution results of objects involved in the implementation of a specified state of a target object through object types, without enumerating the execution results of each object one by one, thereby improving the accuracy and efficiency of the state configuration of the target object.

[0087] In an optional implementation, the configuration information further includes: control information for controlling an execution result corresponding to a preset execution condition of the topological node;

[0088] Correspondingly, after searching for the execution result corresponding to the object type of the triggering object from the preset correspondence between the object type and the execution result, the state configuration method of the target object provided in the embodiment of the present application may further include the following steps:

[0089] Determine the result type of the execution result;

[0090] From the preset correspondence between result type and control information, search for control information corresponding to the result type of the execution result.

[0091] In specific applications, control information is information used to control the execution result, which may specifically include: duration, maintenance and interruption conditions, superposition and replacement rules, presentation information, and display interface. Among them, duration refers to the duration of the execution result, for example, the burning duration; maintenance and interruption conditions refer to the continuation conditions and interruption conditions of the execution result, for example, the continuation condition is dryness, and the interruption condition is covering the fire extinguishing material; superposition and replacement rules refer to the conditions of superimposing another execution result on the execution result, and the conditions of replacing the execution result with another execution result, for example, the condition for superimposing smoke on burning is that the water content reaches a threshold, and the condition for replacing burning with explosion is that the object contains explosives; presentation information refers to information used to present the execution result, for example, brightness, color, shape, etc.; display interface refers to the display position of the execution result, for example, the display interface of the execution result dialogue can be a dialog box.

[0092] This embodiment can accurately and efficiently control the execution results of objects involved in the implementation of a specified state of the target object through the result type, without enumerating the control information of the execution result of each object one by one, thereby improving the accuracy and efficiency of the state configuration of the target object.

[0093] In an optional implementation, before adding the configuration information corresponding to each topological node to the component under the topological node and obtaining the target component under the topological node, the state configuration method of the target object provided in the embodiment of the present application may further include the following steps:

[0094] For each topological node, obtain the control component, search component, effect component and maintenance component of the topological node;

[0095] According to the preset binding relationship, the control component, the search component, the effect component and the maintenance component of each topological node are respectively bound to obtain the components of the topological node.

[0096] Among them, the control component is used to trigger the realization of the specified state of the target object; the search component is used to search for objects involved in the realization of the specified state of the target object; the effect component is used to present the execution results involved in the realization of the specified state of the target object; and the maintenance component is used to control the above-mentioned execution results.

[0097] In specific applications, the control component can trigger the call of the search component and the effect component through preset execution conditions and / or basic trigger conditions. Among them, the basic trigger conditions may include: time point, time period, etc. In addition, the basic trigger conditions can make the specified object in the virtual scene reach the preset execution conditions, so that the control component can further trigger the call of the search component and the effect component through the preset execution conditions. In other words, the control component is generally bound to the maintenance component, and then the search component and the effect component are called by the control component. Each component in this embodiment is equivalent to the abstract unification of the required functions in the specified state implementation of the target object, which can be applied to any topological node without the need to develop components separately for each topological node. Therefore, this embodiment can reduce the development for realizing repeated functions, and improve the consistency of the entire configuration information, facilitate maintenance and improve the efficiency of state configuration. In addition, the pre-set binding relationship can be specifically set according to the implementation process of the logic represented by each topological node. The following is a specific description in the form of an optional embodiment.

[0098] In an optional implementation, the pre-set binding relationship includes: binding the search component and the effect component to the control component, and binding the control component to the maintenance component;

[0099] Accordingly, according to the preset binding relationship, the control component, the search component, the effect component and the maintenance component of each topological node are respectively bound to obtain the component of the topological node, which may specifically include the following steps:

[0100] Acquire a calling interface of a search component of the topology node, a calling interface of an effect component of the topology node, and a calling interface of a control component of the topology node;

[0101] The calling interface of the search component of the topology node and the calling interface of the effect component of the topology node are added to the control component of the topology node, and the calling interface of the control component of the topology node is added to the maintenance component of the topology node to obtain the components of the topology node.

[0102] In this embodiment, different components can be bound by calling the calling interface, so that the complete logic of the topological node to which each bound component belongs can be realized by binding components with different functions. In this way, components with different functions can be decoupled, which is convenient for optimizing components for a certain function and reducing the complexity and redundant processing of component optimization. The specific configuration information added in each component is specifically described in the form of an optional embodiment below.

[0103] In an optional implementation, the configuration information includes: a preset execution condition, object search information corresponding to the preset execution condition, an execution result corresponding to the preset execution condition, and control information for controlling the execution result;

[0104] Accordingly, for each topological node, the configuration information corresponding to the topological node is added to the component under the topological node to obtain the target component under the topological node, which may specifically include the following steps:

[0105] For each topological node, the preset execution condition of the topological node is added to the control component of the topological node, the object search information of the topological node is added to the search component bound to the control component of the topological node, the execution result of the topological node is added to the effect component bound to the control component of the topological node, and the control information of the topological node is added to the maintenance component bound to the control component of the topological node.

[0106] Among them, the preset execution conditions, object search information, execution results and control information are the same as the corresponding configuration information in the above-mentioned embodiments of configuration information, and will not be repeated here. For details, please refer to the description of the above-mentioned embodiments of configuration information. Through the above-mentioned adding method, this embodiment can ensure that each component with different functions accurately implements the corresponding function and improves the accuracy of the state configuration of the target object. In addition, the configuration information under the specified state obtained by the above-mentioned embodiments can be applied to multiple objects by adding object search information in different components, without setting up components separately for each object. In addition, for objects with similar states such as background NPCs, the difference is usually that the object search information of the objects is different. Therefore, the embodiments provided in this application can be suitable for realizing the state of NPCs in batches. Under the same conditions, compared with setting a behavior tree or other image-based configuration information for each NPC, 5 to 6 times more NPC states can be realized.

[0107] Figure 2 This is an example diagram of the application process of another target object state configuration method provided by an embodiment of the present application, which specifically includes the following steps:

[0108] S202, obtaining preset execution conditions of the target object in a specified state, and preset topological relationships between the preset execution conditions.

[0109] S204: Obtain configuration information corresponding to each topological node according to the preset topological relationship and each preset execution condition.

[0110] S206: For each topological node, add the configuration information corresponding to the topological node to the component under the topological node to obtain the target component under the topological node.

[0111] S208, combining the target components under each topological node according to the preset topological relationship to obtain configuration information of the target object in a specified state.

[0112] The above S202 to S208 are consistent with the present application Figure 1 The same steps from S102 to S108 in the embodiment are not repeated here. Figure 1 Embodiments and Figure 1 Description of alternative embodiments.

[0113] S210 , binding basic execution results and attribute labels to each object in the target virtual scene to which the target object belongs.

[0114] The execution order between the above step S210 and the above steps S202 to S208 can be arbitrary, and this embodiment does not limit this. S210 can be executed before the subsequent step S212. In addition, the basic execution result is the state achieved when the object reaches the preset execution condition corresponding to the basic execution result. The attribute label may include: object type, state information, attribute information, time and space range, and quantity information, etc. In addition, in order to improve the authenticity of the state, the attribute label may also include at least one of the following labels: a demand label indicating the needs of the object, such as eating, sleeping, entertainment, socializing, etc.; a label indicating the human-computer relationship of the object, such as relatives, friends, partners, etc.; a label indicating the information perception method of the object, such as vision, hearing, touch, smell, etc.; a label indicating the type of event performed by the object, such as party, fight, infiltration, fire, car accident, etc.; a label indicating the physical phenomenon involved in the object, such as collision, fire, water, etc.

[0115] S212, executing configuration information for the target virtual scene.

[0116] In a specific application, in order to make the target object realize the specified state, after completing the configuration information under the specified state, the configuration information can be executed for the target virtual scene. In this way, the data of the object in the target virtual scene can be processed according to the configuration information, so that the object can realize the specified state.

[0117] S214, if the calling condition of the search component in the control component is met, the control component is used to call the search component, and the called search component is used to search for the target object in the target virtual scene, whose attribute label matches the object search information in the search component.

[0118] The object search information in this step is the same as the object search information in the above-mentioned embodiment of object search information, which will not be repeated here. For details, please refer to the description of the above-mentioned embodiment.

[0119] S216, if the calling condition of the effect component in the control component is met, the control component is used to call the effect component, and the called effect component is used to process the object data of the target object according to the basic execution result bound to the target object to obtain the effect data.

[0120] S218, using the control component to call the maintenance component, and using the called maintenance component to control the effect data.

[0121] For specific configuration information of each component in this embodiment, please refer to the above Figure 1 Embodiments and Figure 1 The description of the optional embodiments will not be repeated here. Combining the above embodiments, the processing performed after the invocation of each component in this embodiment is performed according to the above configuration, so that the specified state can be achieved.

[0122] For ease of understanding, the following Figure 3 and Figure 4 , the setting principle of the preset execution condition in a state configuration method of a target object provided in an embodiment of the present application is exemplarily described. Figure 3 An example diagram of the setting principle of a scatter enumeration type preset execution condition in the prior art is shown in the figure:

[0123] Scatter enumeration includes: in the pre-written code or script, enumerate the objects and configuration information involved in the target object to achieve the specified state one by one. For example, to achieve the burning state of torches, wooden boxes, wooden doors, wooden houses, oil drums, grenades, and explosive packs, the state of each of the above objects needs to be described by a script, and multiple scripts need to be specially written to describe the execution results of each of the above objects on the objects encountered by the object: that is, Figure 3 Each connection is bidirectional and needs to be processed in two scripts to achieve the specified state.

[0124] In the embodiments of the present application, Figure 4As shown, in a state configuration method for a target object provided by an embodiment of the present application, an example diagram of the setting principle of preset execution conditions is provided. The present application configures basic states for each object in the target virtual scene, for example, the states that the object can achieve, such as the object "hamburger shop" can eat hamburgers, and the object "ramen shop" can eat ramen. On this basis, for each specified state, the following contents are configured: preset execution conditions and object search conditions, which are used to indicate the conditions that the object that achieves the state needs to meet; for example, the objects involved in the state of eating need to have a "eating" label, for example, the state of eating hamburgers and the state of eating ramen both have a "eating" label; control information is used to indicate how the object that achieves the state moves and acts; execution result information is used to indicate the effect produced by the object that achieves the state, and which labels the interaction has. In this way, meeting the above-mentioned preset execution conditions is equivalent to meeting the calling conditions of the search component in the control component. Therefore, a search can be initiated to find all objects within the range that meet the object search information, that is, objects whose attribute labels match the object search information in the search component. For example, when the character is hungry, all nearby objects that meet the "eating" label will be searched, such as searching for noodle shops, hamburger shops, etc. Similarly, in the implementation and Figure 3 For the same function, the solution of the present application binds the basic execution results of seven kinds of flammable or explosive objects: combustion and / or explosion, and binds the "fire" tag. In addition, the configuration of the object with the "fire" tag in the configuration information of the specified state ignition is sufficient. In this way, each flammable or explosive object is individually processed in association with fire, and is not directly associated with other objects, which greatly reduces the complexity of state configuration.

[0125] In addition, the division of the specified states of the above target objects can be performed according to the state paradigm listed in Table 1 below:

[0126] Table 1 - State Paradigm Example

[0127]

[0128]

[0129] In this way, the target object and the specified state can be divided into more standardized ones through the above state paradigm, which is conducive to reducing the inapplicability of the state configuration method of the target object provided by the embodiment of the present application caused by the differences between the specified states. Therefore, the scope of application of the state configuration method of the target object provided by the embodiment of the present application can be improved.

[0130] Corresponding to the above method embodiment, the present application also provides a state configuration device embodiment of a target object, Figure 5 FIG. 1 is a schematic diagram showing a structure of a target object state configuration device provided by an embodiment of the present application. Figure 5 As shown, the device comprises:

[0131] The configuration information acquisition module 502 is configured to acquire each preset execution condition of the target object in a specified state, and a preset topological relationship between the preset execution conditions; and obtain configuration information corresponding to each topological node according to the preset topological relationship and the preset execution conditions;

[0132] The configuration information adding module 504 is configured to add the configuration information corresponding to each topological node to the component under the topological node to obtain the target component under the topological node;

[0133] The component combination module 506 is configured to combine the target components under each topological node according to the preset topological relationship to obtain the configuration information of the target object in the specified state.

[0134] In the solution provided by the present application, according to the preset topological relationship between the preset execution conditions in the specified state, the configuration information corresponding to each topological node can be obtained, and the configuration information corresponding to each topological node is added to the component under the corresponding topological node to obtain the target component under the topological node. Furthermore, the configuration information of the target object in the specified state can be obtained by combining the target components under each topological node according to the preset topological relationship, without traversing and searching from the root node every time, and without image drawing. Therefore, the convenience of the state configuration of the target object can be improved.

[0135] In an optional implementation, the device further includes a component acquisition module configured to:

[0136] For each topological node, obtain the control component, search component, effect component and maintenance component of the topological node;

[0137] According to the preset binding relationship, the control component, the search component, the effect component and the maintenance component of each topological node are respectively bound to obtain the components of the topological node.

[0138] In an optional implementation, the pre-set binding relationship includes: binding the search component and the effect component to the control component, and binding the control component to the maintenance component;

[0139] The component acquisition module is further configured to:

[0140] Acquire a calling interface of a search component of the topology node, a calling interface of an effect component of the topology node, and a calling interface of a control component of the topology node;

[0141] The calling interface of the search component of the topology node and the calling interface of the effect component of the topology node are added to the control component of the topology node, and the calling interface of the control component of the topology node is added to the maintenance component of the topology node to obtain the components of the topology node.

[0142] In an optional implementation, the configuration information includes: the preset execution condition, object search information corresponding to the preset execution condition, an execution result corresponding to the preset execution condition, and control information for controlling the execution result;

[0143] The configuration information adding module 504 is further configured to:

[0144] For each topological node, the preset execution condition of the topological node is added to the control component of the topological node, the object search information of the topological node is added to the search component bound to the control component of the topological node, the execution result of the topological node is added to the effect component bound to the control component of the topological node, and the control information of the topological node is added to the maintenance component bound to the control component of the topological node.

[0145] In an optional implementation, the configuration information corresponding to each topological node includes: object search information corresponding to a preset execution condition of each topological node;

[0146] The configuration information acquisition module 502 is further configured to:

[0147] According to the preset topological relationship, determining a trigger object that meets the preset execution condition of each topological node, and an object type of the trigger object;

[0148] The object search information corresponding to the object type of the trigger object is searched from the preset correspondence between the object type and the object search information.

[0149] In an optional implementation, the configuration information includes: an execution result corresponding to a preset execution condition corresponding to each topological node;

[0150] The configuration information acquisition module 502 is further configured to:

[0151] According to the preset topological relationship, determining a trigger object that meets the preset execution condition of each topological node, and an object type of the trigger object;

[0152] The execution result corresponding to the object type of the triggering object is searched from the preset correspondence between the object type and the execution result.

[0153] In an optional implementation, the configuration information further includes: control information for controlling an execution result corresponding to a preset execution condition of the topological node;

[0154] The configuration information acquisition module is also configured as:

[0155] After searching the execution result corresponding to the object type of the trigger object from the preset correspondence between the object type and the execution result, determining the result type of the execution result;

[0156] From the preset correspondence between the result type and the control information, search for the control information corresponding to the result type of the execution result.

[0157] In an optional implementation, the device further includes a state implementation module configured to:

[0158] Binding basic execution results and attribute labels to each object in the target virtual scene to which the target object belongs;

[0159] Executing the configuration information for the target virtual scene;

[0160] If the calling condition of the search component in the control component is met, the control component is used to call the search component, and the called search component is used to search for a target object in the target virtual scene whose attribute tag matches the object search information in the search component;

[0161] If the calling condition of the effect component in the control component is met, the control component is used to call the effect component, and the called effect component is used to process the object data of the target object according to the basic execution result bound to the target object to obtain the effect data;

[0162] The control component is used to call the maintenance component, and the called maintenance component is used to control the effect data.

[0163] The above is a schematic scheme of a state configuration device for a target object of the present embodiment. It should be noted that the technical scheme of the state configuration device for the target object and the technical scheme of the state configuration method for the target object mentioned above belong to the same concept. For details not described in detail in the technical scheme of the state configuration device for the target object, please refer to the description of the technical scheme of the state configuration method for the target object mentioned above. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method, and each functional module is not an actual functional division or separation definition. The device claim defined by such a group of functional modules should be understood as a functional module architecture that mainly implements the solution through the computer program recorded in the specification, and should not be understood as a physical device that mainly implements the solution through hardware.

[0164] Figure 6 The block diagram of a computing device 600 according to an embodiment of the present application is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.

[0165] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0166] In one embodiment of the present application, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0167] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 600 may also be a mobile or stationary server.

[0168] The processor 620 is configured to execute computer executable instructions of the target object state configuration method.

[0169] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the target object state configuration method described above belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the target object state configuration method described above.

[0170] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which are used in a state configuration method for a target object when executed by a processor.

[0171] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the target object state configuration method described above belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the target object state configuration method described above.

[0172] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0173] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0174] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0175] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0176] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the application to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A state configuration method for a target object, It is characterized in that include: Obtaining each preset execution condition of the target object in a specified state, and a preset topological relationship between the preset execution conditions, wherein the preset topological relationship is used to indicate the execution logic between each topological node corresponding to the specified state, and each topological node corresponding to the specified state is a node composed of the preset execution conditions with the same topological structure; According to the preset topological relationship and the preset execution conditions, obtaining configuration information corresponding to each topological node, wherein the configuration information includes at least one of the preset execution condition, object search information corresponding to the preset execution condition, execution result corresponding to the preset execution condition, and control information for controlling the execution result; For each topological node, add the configuration information corresponding to the topological node to the component under the topological node to obtain the target component under the topological node; According to the preset topological relationship, the target components under each topological node are combined to obtain the configuration information of the target object in the specified state.

2. The method according to claim 1, It is characterized in that Before adding the configuration information corresponding to each topological node to the component under the topological node to obtain the target component under the topological node, the method further includes: For each topological node, obtain the control component, search component, effect component and maintenance component of the topological node; According to the preset binding relationship, the control component, the search component, the effect component and the maintenance component of each topological node are respectively bound to obtain the components of the topological node.

3. The method according to claim 2, It is characterized in that The pre-set binding relationship includes: binding the search component and the effect component to the control component, and binding the control component to the maintenance component; According to the preset binding relationship, the control component, the search component, the effect component and the maintenance component of each topological node are respectively bound to obtain the components of the topological node, including: Acquire a calling interface of a search component of the topology node, a calling interface of an effect component of the topology node, and a calling interface of a control component of the topology node; The calling interface of the search component of the topology node and the calling interface of the effect component of the topology node are added to the control component of the topology node, and the calling interface of the control component of the topology node is added to the maintenance component of the topology node to obtain the components of the topology node.

4. The method according to claim 2 or 3, It is characterized in that The configuration information includes: the preset execution condition, object search information corresponding to the preset execution condition, the execution result corresponding to the preset execution condition, and control information for controlling the execution result; For each topological node, adding the configuration information corresponding to the topological node to the component under the topological node to obtain the target component under the topological node includes: For each topological node, the preset execution condition of the topological node is added to the control component of the topological node, the object search information of the topological node is added to the search component bound to the control component of the topological node, the execution result of the topological node is added to the effect component bound to the control component of the topological node, and the control information of the topological node is added to the maintenance component bound to the control component of the topological node.

5. The method according to claim 1, It is characterized in that The configuration information corresponding to each topological node includes: object search information corresponding to the preset execution condition of each topological node; The obtaining, according to the preset topological relationship and the preset execution conditions, configuration information corresponding to each topological node includes: According to the preset topological relationship, determining a trigger object that meets the preset execution condition of each topological node, and an object type of the trigger object; The object search information corresponding to the object type of the trigger object is searched from the preset correspondence between the object type and the object search information.

6. The method according to any one of claims 1 to 3 and 5, It is characterized in that The configuration information includes: the execution result corresponding to the preset execution condition corresponding to each topological node; The obtaining, according to the preset topological relationship and the preset execution conditions, configuration information corresponding to each topological node includes: According to the preset topological relationship, determining a trigger object that meets the preset execution condition of each topological node, and an object type of the trigger object; The execution result corresponding to the object type of the triggering object is searched from the preset correspondence relationship between the object type and the execution result.

7. The method according to claim 6, It is characterized in that The configuration information also includes: control information for controlling the execution result corresponding to the preset execution condition of the topological node; After searching the execution result corresponding to the object type of the trigger object from the preset correspondence between the object type and the execution result, the method further includes: Determining a result type of the execution result; From the preset correspondence between the result type and the control information, search for the control information corresponding to the result type of the execution result.

8. The method according to any one of claims 2 to 3, It is characterized in that The method further comprises: Binding basic execution results and attribute labels to each object in the target virtual scene to which the target object belongs; After combining the target components under each topological node according to the preset topological relationship to obtain the configuration information of the target object in the specified state, the method further includes: Executing the configuration information for the target virtual scene; If the calling condition of the search component in the control component is met, the control component is used to call the search component, and the called search component is used to search for a target object in the target virtual scene whose attribute tag matches the object search information in the search component; If the calling condition of the effect component in the control component is met, the control component is used to call the effect component, and the called effect component is used to process the object data of the target object according to the basic execution result bound to the target object to obtain the effect data; The control component is used to call the maintenance component, and the called maintenance component is used to control the effect data.

9. A state configuration device for a target object, It is characterized in that include: A configuration information acquisition module is configured to acquire each preset execution condition of the target object in a specified state, and a preset topological relationship between the preset execution conditions, wherein the preset topological relationship is used to indicate the execution logic between the topological nodes corresponding to the specified state, and the topological nodes corresponding to the specified state are nodes composed of the preset execution conditions with the same topological structure; according to the preset topological relationship and the preset execution conditions, the configuration information corresponding to each topological node is obtained, wherein the configuration information includes at least one of the preset execution condition, the object search information corresponding to the preset execution condition, the execution result corresponding to the preset execution condition, and the control information for controlling the execution result; A configuration information adding module is configured to add the configuration information corresponding to each topological node to the component under the topological node to obtain the target component under the topological node; The component combination module is configured to combine the target components under each topological node according to the preset topological relationship to obtain the configuration information of the target object in the specified state.

10. A computing device, It is characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the state configuration method of the target object as described in any one of claims 1 to 8.

11. A computer-readable storage medium storing computer-executable instructions, It is characterized in that When the instruction is executed by the processor, the steps of the state configuration method of the target object described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Content stream processing method and device, equipment and medium

    CN110673962A

  • Service data processing method, device and system and electronic equipment

    CN111443905A