Task processing method and device, computer equipment, storage medium and program product
By combining the fact map, static knowledge map and dynamic decision map, and introducing behavior tree technology means, the problem of small inference range and low efficiency of knowledge map in complex reasoning scenarios is solved, and a wider and more efficient task processing is achieved.
Patent Information
- Application Number
- CN202411988855.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The existing knowledge graphs are problematic with small inference range and low inference efficiency, especially in complex inference scenarios.
By combining the matter map, static knowledge map and dynamic decision-making map, and introducing behavior tree technology means into the dynamic decision-making map, a multi-layer decision-making knowledge representation framework is built to achieve the effective integration of static knowledge, dynamic decision-making knowledge and fact-making knowledge.
It expands the scope of task processing, improves the efficiency of task processing, and can describe complex behaviors and decision logic more flexibly, which is suitable for various types of application scenarios.
Smart Images

Figure CN119903193A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph technology, and specifically to task processing methods, devices, computer equipment, storage media and program products. Background Art
[0002] Knowledge Graph (KG) is a collection of knowledge that reveals the relationships between entities. It constructs a structured knowledge network by abstracting knowledge elements such as entities, concepts, relationships, and events into nodes and representing the relationships between nodes as edges. Images, text, voice, video, etc. can all be used as knowledge sources for knowledge graphs.
[0003] The knowledge graph in the related technology is a collection of various types of static knowledge. The relationship between static knowledge is used to combine different static knowledge. The knowledge graph in the related technology is mainly used for the storage and query of static knowledge. The knowledge graph in the related technology can also do simple knowledge reasoning, but it can only reason about implicit relationships based on the relationship set composed of static knowledge in the knowledge graph. However, the reasoning scope of this simple knowledge reasoning is small. When the reasoning scenario is more complex, the reasoning process becomes more complicated and the reasoning efficiency is low because the relationship set composed of static knowledge is relatively simple. Summary of the invention
[0004] In view of this, the present invention provides a task processing method, apparatus, computer equipment, storage medium and program product to solve the problems of small reasoning scope and low reasoning efficiency.
[0005] In a first aspect, the present invention provides a task processing method, comprising: receiving a task and environmental situation information corresponding to the task; wherein the environmental situation information is information used to describe the task and the specific environmental conditions of the task; querying in a matter graph and a static knowledge graph according to the task to obtain behavior tree element information; wherein the behavior tree element information includes multiple first nodes used for processing the task, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes, the matter graph is a graph that represents the execution logic of multiple tasks through multiple nodes, multiple relationship edges, and the directionality of multiple relationship edges, and the static knowledge graph is a graph that stores multiple nodes used by multiple tasks and the relationship between the multiple nodes; in a dynamic decision graph, constructing a behavior tree according to the multiple first nodes, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes; wherein the dynamic decision graph is a graph that dynamically associates the multiple first nodes corresponding to the task; screening the multiple first nodes in the behavior tree according to the environmental situation information to obtain a target behavior tree containing multiple second nodes; and controlling the operation of the multiple second nodes in the target behavior tree to process the task.
[0006] The present invention receives a task and the environmental situation information corresponding to the task, queries the matter graph and the static knowledge graph according to the task, obtains the behavior tree element information including the multiple first nodes used to process the task, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes, constructs a behavior tree in the dynamic decision graph according to the behavior tree element information, and screens the multiple first nodes in the behavior tree according to the environmental situation information to obtain the target behavior tree, thereby controlling the operation of the multiple second nodes in the target behavior tree to process the task. The present invention combines the matter graph, the static knowledge graph, and the dynamic decision graph, and introduces the behavior tree technical means in the dynamic decision graph. The behavior tree can flexibly describe complex behaviors and decision logic, is easy to understand and modify, and is applicable to various types of application scenarios. The present invention forms a multi-layer decision knowledge representation framework, realizes the effective integration of different knowledge such as static knowledge, dynamic decision knowledge, and matter knowledge, and has a clear hierarchy. The present invention relies on the fact graph, static knowledge graph and dynamic decision graph to realize the construction of behavior tree, and realizes the complementary advantages between traditional knowledge graph and behavior tree, that is, it includes multiple knowledge and relationship sets in knowledge graph, and also includes the association representation and execution of logical relationships, and realizes the interconnection and intercommunication of different types of knowledge. Compared with related technologies, the present invention processes tasks through behavior trees, which can process more complex tasks, expand the scope of task processing, and improve the efficiency of task processing.
[0007] In an optional implementation, querying in a matter graph and a static knowledge graph according to the task to obtain behavior tree element information includes: obtaining first function description information of the task, querying in a matter graph according to the first function description information to obtain execution logic between multiple first nodes; querying in a static knowledge graph according to the first function description information to obtain multiple first nodes used by the task and the relationship between the multiple first nodes; and forming the behavior tree element information from multiple first nodes used by the task, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes.
[0008] In an optional implementation, constructing a behavior tree according to a plurality of first nodes, the relationships between the plurality of first nodes, and the execution logic between the plurality of first nodes includes: according to the relationships between the plurality of first nodes and the execution logic between the plurality of first nodes, using relationship edges to connect the plurality of first nodes to obtain the behavior tree.
[0009] In an optional implementation, the relationship edge includes a common edge, a conditional edge and a weighted edge; wherein the common edge is used to represent the connection relationship and connection direction between multiple nodes; the conditional edge is used to perform conditional judgment between multiple nodes, and to control the connectivity between multiple nodes according to the judgment result; the weighted edge is used to determine the directionality of multiple nodes according to the weight value; the multiple nodes include behavior tree nodes, element nodes and subordinate nodes, and the behavior tree nodes include central nodes, control nodes, action nodes, decoration nodes and reference nodes; wherein the behavior tree nodes are nodes constituting the behavior tree; the element nodes are connected to the behavior tree nodes, and are used to represent the behavior elements of the behavior tree nodes; the subordinate nodes are child nodes of the element nodes or other subordinate nodes, and are used to assist the element nodes or other subordinate nodes in parameter confirmation; the central node is the starting node of the behavior tree node, and is used to represent the completion of the task; the control node is used to control the processing process of the task; the action node is used to execute the action corresponding to the behavior tree node; the decoration node is used to perform decoration actions on the central node, the control node, the action node and the reference node; the reference node is used to reference other behavior trees as execution logic.
[0010] In addition to ordinary edges, the present invention also designs conditional edges and weighted edges in the design of relationship edges. Through structural design, the dynamic expression of multiple knowledge is realized. The present invention processes tasks more accurately through the configuration of diversified functional nodes. The present invention clarifies the functions of multiple nodes and relationship edges, which is helpful for the development of knowledge graphs, reduces the occurrence of logical errors, and improves the reliability of task processing.
[0011] In an optional implementation, multiple first nodes in the behavior tree are screened according to environmental situation information to obtain a target behavior tree containing multiple second nodes, including: according to the environmental situation information, retaining multiple second nodes that match the environmental situation information among the multiple first nodes in the behavior tree to obtain the target behavior tree.
[0012] In an optional implementation, multiple first nodes in the behavior tree are screened according to environmental situation information to obtain a target behavior tree containing multiple second nodes, including: according to the environmental situation information, retaining multiple second nodes that match the environmental situation information among the multiple first nodes in the behavior tree to obtain the target behavior tree.
[0013] In a second aspect, the present invention provides a task processing device, including: a task receiving module, used to receive a task and environmental situation information corresponding to the task; wherein the environmental situation information is information used to describe the task and the specific environmental conditions of the task; a query module, used to query in a matter graph and a static knowledge graph according to the task to obtain behavior tree element information; wherein the behavior tree element information includes multiple first nodes used for processing the task, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes, the matter graph is a graph that represents the execution logic of multiple tasks through multiple nodes, multiple relationship edges, and the directionality of multiple relationship edges, and the static knowledge graph is a graph that stores multiple nodes used by multiple tasks and the relationship between the multiple nodes; a behavior tree construction module, used to construct a behavior tree in a dynamic decision graph according to the multiple first nodes, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes; wherein the dynamic decision graph is a graph that dynamically associates the multiple first nodes corresponding to the task; a target behavior tree determination module, used to filter the multiple first nodes in the behavior tree according to the environmental situation information to obtain a target behavior tree containing multiple second nodes; a node operation module, used to control the operation of the multiple second nodes in the target behavior tree to process the task.
[0014] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the task processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the task processing method of the first aspect or any corresponding embodiment thereof.
[0016] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the task processing method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a flowchart of a task processing method according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a knowledge graph set structure according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of a structure composed of nodes and relationship edges according to an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of node relationships according to an embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of behavior tree node relationships according to an embodiment of the present invention;
[0023] Figure 6 is a flowchart of another task processing method according to an embodiment of the present invention;
[0024] Figure 7 is a flowchart of another task processing method according to an embodiment of the present invention;
[0025] Figure 8 is a schematic diagram of the node relationship corresponding to the game task at location A according to an embodiment of the present invention;
[0026] Fig. 9 is a structural block diagram of a task processing device according to an embodiment of the present invention;
[0027] Fig.10 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0029] Knowledge Graph (KG) is a collection of knowledge that reveals the relationships between entities. It constructs a structured knowledge network by abstracting knowledge elements such as entities, concepts, relationships, and events into nodes and representing the relationships between nodes as edges. Images, text, voice, video, etc. can all be used as knowledge sources for knowledge graphs.
[0030] Behavior tree is a programming model that describes AI (Artificial Intelligence) behavior. It is a tree structure consisting of multiple nodes. The advantage of behavior tree is that it can flexibly describe complex behaviors and decision logic, is easy to understand and modify, and is suitable for various types of application scenarios.
[0031] Traditional knowledge graphs are a collection of various types of static knowledge, which can realize the combination of different static knowledge and are mainly used for knowledge storage and query. The knowledge reasoning process that traditional knowledge graphs can handle is to realize the reasoning of implicit relationships through existing relationship sets. Behavior trees are mostly used to realize autonomous decision-making of intelligent agents in the environment through the control of intelligent agents, but behavior trees are difficult to realize the association with key static knowledge required for intelligent decision-making.
[0032] An embodiment of the present invention provides a task processing method, which completes the knowledge reasoning and processing of complex tasks by combining a reasoning graph, a dynamic decision graph and a static knowledge graph, so as to expand the reasoning scope and improve the reasoning efficiency.
[0033] According to an embodiment of the present invention, a task processing method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] In this embodiment, a task processing method is provided, which can be used in a computer device, and an artificial intelligence model can be configured on the computer device. Figure 1 is a flowchart of a task processing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0035] Step S101, receiving a task and environmental situation information corresponding to the task; wherein the environmental situation information is information used to describe the task and the specific environmental conditions of the task.
[0036] Among them, a task is a set of operation instructions input by the user to be processed by the knowledge graph set. Each task contains multiple events. For example, a task may be "take a plane to travel to place A tomorrow and make a travel guide to place A". Then the multiple events included in this task may be: flight selection event to place A, landing transportation selection event, tourist attraction selection event, hotel selection event and restaurant selection event, etc.
[0037] In an embodiment of the present invention, a knowledge graph set is stored in a computer device of an embodiment of the present invention, and the knowledge graph set includes a matter-of-fact graph, a static knowledge graph, and a dynamic decision graph.
[0038] In some optional implementations, the environmental situation information may include the coordinate information of key units, task information, and time requirements, etc. The environmental situation information is updated according to the change of the task, and the environmental situation information may be time point, season, travel purpose, personnel, requirements, etc. For example, when the task is "take a plane to travel to place A tomorrow, and make a guide to travel to place A", the environmental situation information includes: tomorrow, take a plane, go to place A, and travel guide to place A. When the user changes the task to "take a bus to travel to place B today, and make a guide to travel to place B", the environmental situation information is updated to: today, take a bus, go to place B, and travel guide to place B.
[0039] Step S102, query the matter graph and the static knowledge graph according to the task to obtain behavior tree element information; wherein the behavior tree element information includes multiple first nodes used to process the task, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes. The matter graph is a graph that represents the execution logic of multiple tasks through multiple nodes, multiple relationship edges, and the directionality of multiple relationship edges. The static knowledge graph is a graph that stores multiple nodes used by multiple tasks and the relationship between the multiple nodes.
[0040] Among them, the multiple nodes are all the nodes in the affair graph and the static knowledge graph, and the multiple first nodes are the multiple first nodes corresponding to the tasks in the affair graph and the static knowledge graph, that is, the multiple first nodes are the nodes corresponding to the tasks selected from the multiple nodes; there is an association relationship between some of the multiple nodes, and there is no relationship between some of the nodes. When multiple nodes are used to process the same task, there is an association relationship, and when the multiple nodes are used to process different tasks respectively, there is no relationship between the multiple nodes; since the multiple first nodes in the embodiment of the present invention are used to complete the same task, there is an association relationship between the multiple first nodes, and the association relationship can be sequential execution, selective execution, parallel execution, etc.
[0041] In some optional embodiments, the event graph includes the execution logic of multiple tasks and the execution logic of multiple events in each task, which is used to provide the logical relationship between multiple first nodes for the dynamic decision graph. By way of example, the event graph includes the execution logic of the task of traveling to place A and the execution logic of the task of traveling to place B, and the task of traveling to place A includes multiple events and their execution logic, and the multiple events and their execution logic are, in order: a travel destination confirmation event, a travel mode selection event, a travel time determination event, a travel event, and a destination arrival event, and each event includes multiple nodes. By way of example, the travel mode selection event includes a node corresponding to taking a plane, a node corresponding to taking a bus, a node corresponding to driving, etc.
[0042] For example, Figure 2 As shown in the figure, it is a schematic diagram of the structure of the knowledge graph set; among them, the fact graph is the top-level graph in the knowledge graph set, and the fact graph includes multiple events, namely: discovering the target, the target is within the range, executing the task, approaching the target, executing the plan to approach the target, detector deployment, plan formulation, and group execution. The relationship edges are represented by dotted lines with arrows.
[0043] In some optional embodiments, the static knowledge graph includes a set of static knowledge used in the decision-making process, and the static knowledge is represented by inclusion relationships through relationship edges. For example, the static knowledge graph includes nodes corresponding to various means of transportation such as private cars, subways, airplanes, buses, and public buses.
[0044] like Figure 2 As shown in the figure, the static knowledge graph is the lowest level graph in the knowledge graph set, which is used to provide nodes corresponding to static knowledge for the reasoning graph and the dynamic decision graph. The nodes corresponding to static knowledge are represented by the inclusion relationship through the relationship edge. Figure 2 In the figure, the nodes corresponding to the static knowledge include: ships, power settings, unmanned aerial vehicles, sensors, manned aerial vehicles, mounting devices and launching devices, and the relationship between the nodes is represented by the dotted lines with arrows.
[0045] Step S103, in the dynamic decision graph, construct a behavior tree according to the multiple first nodes, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes; wherein the dynamic decision graph is a graph that dynamically associates the multiple first nodes corresponding to the task.
[0046] In some optional implementations, constructing a behavior tree according to a plurality of first nodes, the relationships between the plurality of first nodes, and the execution logic between the plurality of first nodes includes: according to the relationships between the plurality of first nodes and the execution logic between the plurality of first nodes, using relationship edges to connect the plurality of first nodes to obtain the behavior tree.
[0047] The dynamic decision graph is used to construct a behavior tree based on the behavior tree element information. The behavior tree is used to make decisions by executing the control logic of each node. There can be multiple behavior trees and behavior tree nodes in the dynamic decision graph, such as Figure 2 As shown, the dynamic decision graph is the middle layer in the knowledge graph set, and the behavior tree includes the central node "task", the control node, the action node "detection", the action node "protection" and the element node "sensor, speed, power and task decomposition", wherein the element node "task decomposition" includes two subordinate nodes "sensor, speed, power and task decomposition"; in the embodiment of the present invention, the reason graph, the dynamic decision graph and the static knowledge graph are connected by key nodes and relationship edges, and the key nodes are used to realize the mutual calling of nodes between layers.
[0048] In some optional embodiments, such as Figure 3 As shown, it is a schematic diagram of the structure composed of nodes and relationship edges. Multiple nodes in the knowledge graph set are connected by relationship edges, and the relationship edges include ordinary edges, conditional edges and weighted edges; wherein ordinary edges are used to represent the connection relationship and connection direction between multiple nodes; conditional edges are used to make conditional judgments between multiple nodes, and to control the connectivity between multiple nodes according to the judgment results; weighted edges are used to determine the directionality of multiple nodes according to weight values; multiple nodes include behavior tree nodes, element nodes and subordinate nodes, and behavior tree nodes include central nodes, control nodes, action nodes, decoration nodes and reference nodes; wherein behavior tree nodes are nodes that constitute behavior trees; element nodes are connected to behavior tree nodes to represent the behavior elements of behavior tree nodes; subordinate nodes are child nodes of element nodes or other subordinate nodes, and are used to assist element nodes or other subordinate nodes in parameter confirmation; central nodes are the starting nodes of behavior tree nodes, and are used to represent the completion of tasks; control nodes are used to control the processing process of tasks; action nodes are used to execute actions corresponding to behavior tree nodes; decoration nodes are used to decorate central nodes, control nodes, action nodes and reference nodes; reference nodes are used to reference other behavior trees as execution logic.
[0049] In some optional implementations, a common edge only represents a connection relationship and a direction, and may have attributes, and the direction may represent the progression relationship of events, or the sequence of dynamic knowledge, or the inclusion relationship of static knowledge.
[0050] In some optional embodiments, the conditional edge has a conditional judgment attribute, which is used to control the flow of behavior and can be used for action control or execution selection. It is accurately matched according to the key value corresponding to the conditional edge. For example, the key value corresponding to the first conditional edge is visiting attractions, and the key value corresponding to the second conditional edge is eating. If the user's need is to eat, the node pointed to by the second conditional edge is selected as the next node according to the key value. In actual application, when making a selection based on the conditional edge, the environmental situation information is analyzed to obtain the target key value, and the target key value is matched with the key value corresponding to the conditional edge. If the match is successful, the node pointed to by the conditional edge is selected as the next node, otherwise it is not selected.
[0051] In some optional implementations, the weighted edge has an execution weight attribute, and the optimal path is planned according to the different weights of each path. The selection of the edge is determined according to the comparison of the values corresponding to the weighted edges. Generally, the node corresponding to the weighted edge with the largest value is selected. Exemplarily, the value of the first weighted edge is 0.1, and the value of the second weighted edge is, then the node pointed to by the second weighted edge is selected as the next node.
[0052] Among them, the conditional judgment attributes of the conditional edge include execution according to the target, execution according to the purpose and execution according to the demand. Among them, the target is the object targeted by the current sub-node task; the purpose is the effect to be achieved by completing the current sub-node task; the demand is the condition required to complete the current sub-node task.
[0053] In some optional implementations, the relationship edge may also have both a conditional judgment attribute and a weight attribute, and the execution logic is: first determine whether the attribute of the relationship edge is unique; if unique, execute the attribute; if not unique, first determine whether the condition is met according to the condition, if it is met, determine whether the relationship edge and the node pointed to by the relationship edge are selected according to the weight value, if not selected, the two nodes connected by the relationship edge are not connected, if the condition is met, determine that the relationship edge and the node pointed to by the relationship edge are selected according to the weight value, and the two nodes connected by the relationship edge are connected. Alternatively, the relationship edge also has an adaptation scene attribute, first determine whether the node pointed to by the relationship edge meets the adaptation scene attribute, and then make a selection based on the conditional judgment attribute or the weight attribute.
[0054] In some optional embodiments, such as Figure 4 As shown, it is a schematic diagram of node relationships. The central node and the element nodes can be connected through conditional edges and / or weighted edges, and the control node and the element points are connected through conditional edges. The element nodes are selected according to the goals, purposes and needs.
[0055] In some optional embodiments, such as Figure 4 As shown, an element node is connected to multiple subordinate nodes through conditional edges and / or weighted edges. One of the multiple subordinate nodes can be selected according to the applicable scenario, the key value of the conditional edge and the value of the weighted edge. The element node is connected to the central node or the control node through a relationship edge. For example, for a travel mode selection event, factors that need to be considered, such as "transportation tools, travel time, comfort, and travel distance", can be used as element nodes (Keypoint).
[0056] In some optional implementations, the subordinate node is a subordinate of the element node, which is a multiple choice of the element node, and one subordinate node represents one choice. For example, if the element node is "taking transportation", its subordinate node is the tool type, which can be "taking a private car, taking the subway, taking an airplane", etc.; the child subordinate nodes of the subordinate node can be parameters such as "speed, running time, power of the airplane".
[0057] When the problem considered by the element node is too large, it can be decomposed into multiple sub-element nodes to refine the tasks in the behavior tree. The element node and the subordinate node are associated through conditional edges and / or weighted edges, and the element node is controlled to connect to which subordinate node (or sub-element node / sub-slave node) based on the key value of the conditional edge or the value of the weighted edge to determine the selection of the element attribute value or the subordinate attribute value.
[0058] In some optional implementations, control nodes include parallel nodes, selection nodes, and sequential nodes. Parallel nodes require multiple events to be executed simultaneously. Parallel nodes have at least two child nodes, and their child nodes are executed in parallel. If all child nodes are executed, success is returned. If one fails, failure is returned. Selection nodes are connected to their child nodes through conditional edges. There are two types of selection nodes: sequential selection and random selection. Generally, sequential selection is more commonly used. The sequential selection node is executed, and success is returned if it succeeds. Figure 4 As shown, a sequential node has multiple child nodes connected in sequence, and is executed in the order of the rank value of the relationship edge connecting each child node. For example, the rank value of the relationship edge of the first child node is 1, the rank value of the relationship edge of the second child node is 2, and the rank value of the relationship edge of the third child node is 3. Then the execution order of the sequential node is: first child node, second child node and third child node.
[0059] In some optional embodiments, such as Figure 4 As shown, the action node is connected to the element node through a conditional edge or a weight edge, and the corresponding element node can be selected according to the key value. The action node is used to generate an instruction action function of the action, so as to execute the action corresponding to the action node by calling the instruction action function.
[0060] In some optional implementations, the decoration node is used to modify the node so that the node performs a specific action, such as negation, success, repetition, etc.
[0061] In some optional implementations, the reference node is used to reference another behavior tree relative to the behavior tree to which it belongs as the execution logic of the current node; that is, the same execution logic already exists in other behavior trees. To simplify the graph and avoid duplication, the reference node can be used to directly reference the execution logic of other behavior trees in the dynamic decision graph.
[0062] In the embodiment of the present invention, Figure 5The figure shows the relationship diagram of the behavior tree nodes. The behavior tree nodes include the central node (CentralNode), the control node (controlNode), and the action (behavior) node (actionNode). The central node is the starting node (rootNode) of the behavior tree. There is only one behavior tree child node (childNode), namely the control node 1. The control node is used to control the decision-making process of the event. The control node 1 includes four child nodes, namely the control node 2, the control node 3, the control node 4, and the reference node. The four child nodes (childNode) are executed in the order of the relationship edge connecting each child node. Figure 5 The execution order in is: control node 2, control node 3, control node 4 and reference node, where the reference node references central node 2; control node 2 includes action (behavior) node 1 and action (behavior) node 2, control node 3 includes action (behavior) node 3 and action (behavior) node 4, and control node 4 includes action (behavior) node 5 and action (behavior) node 6.
[0063] exist Figure 5 In the figure, the central node 1 also includes four child nodes (childNode), which are four element nodes (keypoint). The four element nodes (keypoint) are executed in the order of the rank value of the relationship edge connecting each child node. One of the element nodes (keypoint) points to three subordinate nodes (keypoint_s), and each subordinate node (keypoint_s) points to two subordinate nodes (keypoint_s) respectively.
[0064] Step S104: Filter multiple first nodes in the behavior tree according to the environmental situation information to obtain a target behavior tree including multiple second nodes.
[0065] Among them, in the dynamic decision graph, multiple first nodes in the behavior tree formed by the dynamic connection between multiple first nodes through the relationship edge can form multiple feasible strategies. For example, multiple first nodes corresponding to each specific event can form multiple feasible strategies. For the travel mode selection event, multiple feasible strategies include: taking public transportation, walking, and self-driving, etc. Therefore, when there is information about the travel mode in the environmental situation information, the second node can be selected from the multiple first nodes. For example, if the travel mode included in the environmental situation information is self-driving, the first node corresponding to self-driving is selected as the second node.
[0066] In the dynamic decision graph of the embodiment of the present invention, intelligent decision-making is achieved through agent decision-making, and multiple first nodes in the behavior tree are intelligently selected to obtain a target behavior tree, wherein the agent is an entity that can perceive the environment, make decisions, and take actions to achieve specific goals. The agent can be a software program, a robot, or other things with a certain degree of autonomy and intelligent behavior performance. For example, the agent can be an AI model.
[0067] It is also used to select and execute decisions from multiple feasible strategies based on the current environmental situation data; the dynamic decision map builds a decision map for the key event chain of the event chain in the event map. For example, in the above travel process, it is necessary to make the travel process.
[0068] Step S105, controlling multiple second nodes in the target behavior tree to run to process the task.
[0069] In some optional embodiments, controlling the operation of multiple second nodes in the target behavior tree includes: obtaining a behavior function set, selecting a target behavior function set from the behavior function set according to environmental situation information, parsing the environmental situation information, and obtaining function parameters; and calling multiple target behavior functions in the target behavior function set according to the function parameters to control the operation of multiple second nodes in the target behavior tree.
[0070] The task processing method provided in this embodiment receives a task and the environmental situation information corresponding to the task, queries the task in the matter graph and the static knowledge graph, obtains the behavior tree element information including the multiple first nodes used to process the task, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes, constructs a behavior tree in the dynamic decision graph according to the behavior tree element information, and screens the multiple first nodes in the behavior tree according to the environmental situation information to obtain the target behavior tree, thereby controlling the operation of the multiple second nodes in the target behavior tree to process the task. The present invention combines the matter graph, the static knowledge graph, and the dynamic decision graph, and introduces the behavior tree technology means in the dynamic decision graph. The behavior tree can flexibly describe complex behaviors and decision logic, is easy to understand and modify, and is applicable to various types of application scenarios. The present invention forms a multi-layer decision knowledge representation framework to achieve the effective integration of different knowledge such as static knowledge, dynamic decision knowledge, and matter knowledge, with clear levels. The present invention relies on the fact graph, static knowledge graph and dynamic decision graph to realize the construction of behavior tree, and realizes the complementary advantages between traditional knowledge graph and behavior tree, that is, it includes multiple knowledge and relationship sets in knowledge graph, and also includes the association representation and execution of logical relationships, and realizes the interconnection and intercommunication of different types of knowledge. Compared with related technologies, the present invention processes tasks through behavior trees, which can process more complex tasks, expand the scope of task processing, and improve the efficiency of task processing.
[0071] In this embodiment, a task processing method is provided, which can be used in a computer device, and an artificial intelligence model can be configured on the computer device. Figure 6 is a flowchart of another task processing method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:
[0072] Step S601, receiving a task and the environmental situation information corresponding to the task; wherein the environmental situation information is information used to describe the task and the specific environmental conditions of the task. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0073] Step S602, query the matter graph and the static knowledge graph according to the task to obtain behavior tree element information; wherein the behavior tree element information includes multiple first nodes used to process the task, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes. The matter graph is a graph that represents the execution logic of multiple tasks through multiple nodes, multiple relationship edges, and the directionality of multiple relationship edges. The static knowledge graph is a graph that stores multiple nodes used by multiple tasks and the relationship between the multiple nodes.
[0074] In some optional implementations, the above step S602 includes:
[0075] Step S6021, obtain the first functional description information of the task, query in the matter graph according to the first functional description information, and obtain the execution logic between multiple first nodes.
[0076] Step S6022: perform a query in the static knowledge graph according to the first function description information to obtain multiple first nodes used by the task and the relationship between the multiple first nodes.
[0077] Step S6023, the behavior tree element information is composed of the multiple first nodes used by the task, the relationships between the multiple first nodes, and the execution logic between the multiple first nodes.
[0078] Step S603: In the dynamic decision graph, a behavior tree is constructed according to the multiple first nodes, the relationships between the multiple first nodes, and the execution logic between the multiple first nodes; wherein the dynamic decision graph is a graph that dynamically associates the multiple first nodes corresponding to the task. For details, please refer to Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0079] Step S604: Filter multiple first nodes in the behavior tree according to the environmental situation information to obtain a target behavior tree including multiple second nodes.
[0080] In some optional implementations, the above step S604 includes:
[0081] Step S6041, according to the environmental situation information, retaining multiple second nodes that match the environmental situation information among multiple first nodes in the behavior tree to obtain a target behavior tree.
[0082] In some optional implementations, the above step S6041 includes:
[0083] Step a1, obtaining the second function description information corresponding to each first node in the behavior tree, and matching the environmental situation information with the second function description information corresponding to each first node.
[0084] Step a2: retain the first node corresponding to the second function description information that is successfully matched as the second node, and remove the first node corresponding to the second function description information that is unmatched, to obtain a target behavior tree.
[0085] Step S605: Control multiple second nodes in the target behavior tree to run to process the task. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.
[0086] The task processing method provided in this embodiment obtains a target behavior tree by matching environmental situation information with the second function description information corresponding to each first node, thereby realizing the structuring of nodes corresponding to procedural knowledge, and can automatically construct a behavior tree based on a knowledge graph set. It can automatically construct method functions through behavior tree subgraphs, or element nodes and subordinate node subgraphs, thereby realizing decision-making behavior control and improving the flexibility of the knowledge graph set.
[0087] In this embodiment, a task processing method is provided, which can be used in a computer device, and an artificial intelligence model can be configured on the computer device. Figure 7 is a flowchart of another task processing method according to an embodiment of the present invention. Figure 7 As shown, the process includes:
[0088] Load and initialize the agent, query the knowledge graph set to obtain multiple behavior tree nodes for generating behavior trees and multiple element nodes connected to the behavior tree nodes, generate a behavior tree according to the behavior tree nodes, wherein the behavior tree includes a central node, the child nodes of the central node are control nodes, which are used to control the parallel execution of subsequent child nodes, the child nodes of the control node include a condition node and two control nodes, and the above-mentioned one condition node and two control nodes are executed through action nodes, wherein a set of behavior functions that may be used in the execution process of the behavior tree is generated based on the element nodes, and the operation of the nodes in the behavior tree is controlled by calling multiple target behavior functions in the behavior function set.
[0089] In some optional implementations, the embodiments of the present invention load and initialize the decision-making agent, obtain the nodes corresponding to the dynamic knowledge, and dynamically connect them through relationship edges to form a behavior tree. The behavior tree includes multiple executable strategies. When a task needs to be executed intelligently, the behavior tree element information of the task is obtained by querying the graph. Based on the obtained behavior tree element information, a behavior tree is generated based on the behavior tree nodes, and a set of behavior functions that may be used in the execution process of the behavior tree is generated based on the element nodes. The environmental situation information of the task is continuously received, and the execution decision is selected from multiple feasible strategies based on the environmental situation information, and multiple target behavior functions are selected from the behavior function set. The function parameters of multiple target behavior functions are parsed from the environmental situation information, and the function parameters are passed to multiple target behavior functions. Multiple target behavior functions are run to achieve the best decision of the agent.
[0090] For example, Figure 8 As shown, the top layer is the travel logic graph, the middle layer is the dynamic decision graph, and the bottom layer is the static knowledge graph, among which the static knowledge graph includes the scenic spot knowledge graph, the food knowledge graph, etc.; the scenic spot knowledge graph in the static knowledge graph provides static knowledge for the element nodes corresponding to "attractions" in the dynamic decision graph, and the food knowledge graph in the static knowledge graph provides static knowledge for the element nodes corresponding to "food" in the dynamic decision graph; the travel logic graph provides execution logic for "travel in place A", "travel" and "attractions" in the dynamic decision graph.
[0091] exist Figure 8In the dynamic decision graph in the example, a travel behavior tree is generated according to the contents provided by the travel logic graph and the static knowledge graph. The central node in the travel behavior tree is "travel in place A", and the child nodes of the central node are control nodes. Specifically, the control node is a selector node, which is used to indicate that a node selected from the subsequent multiple child nodes is executed; the subsequent multiple child nodes are five control nodes, corresponding to "the first scenic spot", "the second scenic spot", "the third scenic spot", "the fourth scenic spot" and "the fifth scenic spot", respectively, and the control node corresponding to the "third scenic spot" is selected; the control node corresponding to the "third scenic spot" includes three control nodes, the three control nodes are executed sequentially, and the contents corresponding to the three control nodes are "morning plan", "afternoon plan" and "evening plan" respectively; wherein, the control node corresponding to the "morning plan" includes three control nodes, the three control nodes are executed sequentially, and the contents corresponding to the three control nodes are "transportation", "breakfast" and "travel" respectively; wherein, the control node corresponding to the "transportation" includes four action nodes, and the contents corresponding to the four action nodes are "subway", "bus", "cycling" and "walking" respectively; the "afternoon plan" includes two control nodes. The control node corresponding to "play" includes three control nodes, and the corresponding contents of the three control nodes are "a certain lake", "a certain tower" and "play method" respectively; the control node corresponding to "a certain tower" includes two action nodes, and the corresponding contents of the two action nodes are "tickets" and "explanation" respectively; the control node corresponding to "play method" includes three action nodes, and the corresponding contents of the three action nodes are "boat", "cycling" and "walking" respectively; the control node corresponding to "evening plan" includes three control nodes, and the three control nodes are executed in sequence, and the corresponding contents of the three control nodes are "dinner", "shopping" and "accommodation" respectively; the control node corresponding to "shopping" includes four action nodes, and the corresponding contents of the four action nodes are "a certain shopping mall", "a street", "b street" and "a certain night market" respectively; in the embodiment of the present invention, multiple action nodes corresponding to one control node can be selected according to the environmental situation information in multiple action nodes; if the environmental situation information does not mention the corresponding content of the action node, the optimal content is selected according to the preset algorithm for execution.
[0092] exist Figure 8In the dynamic decision map in , the central node "travel in place A" also includes six element nodes, and the contents corresponding to the six element nodes are "travel tools", "accommodation", "food", "travel methods", "travel guides" and "attractions"; among them, the element node corresponding to "travel tools" includes four subordinate nodes, and the contents corresponding to the four subordinate nodes are "airplane", "high-speed rail", "self-driving" and "bus"; the element node corresponding to "food" includes four subordinate nodes, and the contents corresponding to the four subordinate nodes are "vinegar fish", "local dishes", "Dongpo pork" and "beggar's chicken"; the element node corresponding to "accommodation" includes four subordinate nodes, and the contents corresponding to the four subordinate nodes are The contents are respectively "Youth Hostel", "B&B", "Quick Hotel" and "Star Hotel"; among them, the subordinate node corresponding to "B&B" includes three subordinate nodes, and the corresponding contents of the three subordinate nodes are respectively "First B&B", "Second B&B" and "Third B&B"; the subordinate node corresponding to "Quick Hotel" includes five subordinate nodes, and the corresponding contents of the five subordinate nodes are respectively "First Hotel", "Second Hotel", "Third Hotel", "Fourth Hotel" and "Others"; the subordinate node corresponding to "Star Hotel" includes five subordinate nodes, and the corresponding contents of the five subordinate nodes are respectively "Fifth Hotel", "Sixth Hotel", "Seventh Hotel", "Eighth Hotel" and "Others".
[0093] In an embodiment of the present invention, selection can be made from multiple subordinate nodes according to environmental situation information. In the element node corresponding to "accommodation", the selection of subordinate nodes can be made based on applicable scenarios, key values and value values according to environmental situation information. Among them, the adaptation scenario of the relationship edge between the element node corresponding to "accommodation" and the subordinate node corresponding to "youth hostel" is "poor travel", the key value of the conditional judgment attribute is 4, and the value value of the weight attribute is 0.2; the adaptation scenario of the relationship edge between the element node corresponding to "accommodation" and the subordinate node corresponding to "homestay" is "poor travel", the key value of the conditional judgment attribute is 3, and the value value of the weight attribute is 0.25; the adaptation scenario of the relationship edge between the element node corresponding to "accommodation" and the subordinate node corresponding to "quick hotel" is "limited budget", and the conditional judgment attribute is 0. The key value of the attribute is 2, the value of the weight attribute is 0.25, the adaptation scenario of the relationship edge between the element node corresponding to "accommodation" and the subordinate node corresponding to "star hotel" is "sufficient budget", the key value of the condition judgment attribute is 1, and the value of the weight attribute is 0.3; exemplarily, when there is poor travel information in the environmental situation information, the subordinate node "youth hostel" corresponding to the adaptation scenario "poor travel" is selected, when there is no application scenario in the environmental situation information, according to the key value analyzed from the environmental situation information, the corresponding subordinate node is selected, when the key value analyzed from the environmental situation information is 3, the subordinate node "youth hostel" corresponding to "poor travel" is selected, when the key value cannot be analyzed from the environmental situation information, the subordinate node corresponding to the relationship edge with the largest value is selected, that is, Figure 8 The relationship edge with a key value of 0.3 corresponds to the subordinate node "Star Hotel".
[0094] In this embodiment, a task processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0095] This embodiment provides a task processing device, such as Fig. 9 As shown, including:
[0096] The task receiving module 901 is used to receive a task and environmental situation information corresponding to the task; wherein the environmental situation information is information used to describe the task and the specific environmental conditions of the task.
[0097] The query module 902 is used to query the matter graph and the static knowledge graph according to the task to obtain the behavior tree element information; wherein the behavior tree element information includes multiple first nodes used for processing tasks, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes. The matter graph is a graph that represents the execution logic of multiple tasks through multiple nodes, multiple relationship edges, and the directionality of multiple relationship edges. The static knowledge graph is a graph that stores multiple nodes used by multiple tasks and the relationship between the multiple nodes.
[0098] The behavior tree construction module 903 is used to construct a behavior tree in a dynamic decision graph according to multiple first nodes, the relationship between the multiple first nodes, and the execution logic between the multiple first nodes; wherein the dynamic decision graph is a graph that dynamically associates multiple first nodes corresponding to a task.
[0099] The target behavior tree determination module 904 is used to filter multiple first nodes in the behavior tree according to the environmental situation information to obtain a target behavior tree including multiple second nodes.
[0100] The node running module 905 is used to control the running of multiple second nodes in the target behavior tree to process the task.
[0101] In some optional implementations, the query module 902 includes:
[0102] The transaction graph query unit is used to obtain the first functional description information of the task, query in the transaction graph according to the first functional description information, and obtain the execution logic between multiple first nodes.
[0103] The static knowledge graph query unit is used to query in the static knowledge graph according to the first function description information to obtain the multiple first nodes used by the task and the relationship between the multiple first nodes.
[0104] The behavior tree element information generating unit is used to form the behavior tree element information from a plurality of first nodes used by the task, the relationship between the plurality of first nodes, and the execution logic between the plurality of first nodes.
[0105] In some optional implementations, the behavior tree construction module 903 includes:
[0106] The behavior tree construction unit is used to connect the multiple first nodes using relationship edges according to the relationship between the multiple first nodes and the execution logic between the multiple first nodes to obtain a behavior tree.
[0107] In some optional implementations, the target behavior tree determination module 904 includes:
[0108] The target behavior tree determination unit is used to retain, according to the environmental situation information, a plurality of second nodes in the behavior tree that match the environmental situation information, to obtain a target behavior tree.
[0109] In some optional implementations, the target behavior tree determination unit includes:
[0110] The information matching subunit is used to obtain the second function description information corresponding to each first node in the behavior tree, and match the environmental situation information with the second function description information corresponding to each first node.
[0111] The target behavior tree determination subunit is used to retain the first node corresponding to the second function description information that successfully matches as the second node, and remove the first node corresponding to the second function description information that fails to match, so as to obtain the target behavior tree.
[0112] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0113] The task processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0114] The embodiment of the present invention also provides a computer device having the above Fig. 9 The task processing device shown.
[0115] See also Fig.10 , Fig.10 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.10 As shown, the computer device includes: one or more processors 1010, memory 1020, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10A processor 1010 is taken as an example.
[0116] The processor 1010 may be a central processing unit, a network processor or a combination thereof. The processor 1010 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0117] The memory 1020 stores instructions executable by at least one processor 1010, so that the at least one processor 1010 executes the method shown in the above embodiment.
[0118] The memory 1020 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 1020 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 1020 may optionally include a memory remotely arranged relative to the processor 1010, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0119] The memory 1020 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 1020 may also include a combination of the above types of memory.
[0120] The computer device also includes a communication interface 1030, which is used for the computer device to communicate with other devices or a communication network.
[0121] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0122] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0123] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A task processing method, characterized in that: The method comprises: Receive a task and environmental situation information corresponding to the task; wherein the environmental situation information is information used to describe the task and the specific environmental conditions of the task; According to the task, query is performed in the matter graph and the static knowledge graph to obtain behavior tree element information; wherein the behavior tree element information includes a plurality of first nodes used to process the task, the relationship between the plurality of first nodes, and the execution logic between the plurality of first nodes, the matter graph is a graph that represents the execution logic of a plurality of tasks through a plurality of nodes, a plurality of relationship edges, and the directionality of the plurality of relationship edges, and the static knowledge graph is a graph that stores the plurality of nodes used by the plurality of tasks and the relationship between the plurality of nodes; In the dynamic decision graph, a behavior tree is constructed according to the plurality of first nodes, the relationships between the plurality of first nodes, and the execution logic between the plurality of first nodes; wherein the dynamic decision graph is a graph that dynamically associates the plurality of first nodes corresponding to the task; Filtering a plurality of first nodes in the behavior tree according to the environmental situation information to obtain a target behavior tree including a plurality of second nodes; The plurality of second nodes in the target behavior tree are controlled to run, so as to process the task.
2. The method according to claim 1, characterized in that The querying in the matter graph and the static knowledge graph according to the task to obtain the behavior tree element information includes: Acquire first functional description information of the task, and query the event graph according to the first functional description information to obtain execution logic between the plurality of first nodes; Searching the static knowledge graph according to the first function description information to obtain a plurality of first nodes used by the task and the relationship between the plurality of first nodes; The behavior tree element information is composed of a plurality of first nodes used by the task, the relationships between the plurality of first nodes, and the execution logic between the plurality of first nodes.
3. The method according to claim 1 or 2, characterized in that: The constructing a behavior tree according to the plurality of first nodes, the relationships between the plurality of first nodes, and the execution logics between the plurality of first nodes includes: According to the relationship between the multiple first nodes and the execution logic between the multiple first nodes, the multiple first nodes are connected by using relationship edges to obtain the behavior tree.
4. The method according to claim 3, characterized in that The relationship edges include common edges, conditional edges and weighted edges; wherein the common edges are used to represent the connection relationship and connection direction between the multiple nodes; the conditional edges are used to perform conditional judgments between the multiple nodes and to control the connectivity between the multiple nodes according to the judgment results; the weighted edges are used to determine the directionality of the multiple nodes according to the weight values; The multiple nodes include behavior tree nodes, element nodes and subordinate nodes, and the behavior tree nodes include central nodes, control nodes, action nodes, decoration nodes and reference nodes; wherein the behavior tree nodes are nodes constituting the behavior tree; the element nodes are connected to the behavior tree nodes and are used to represent the behavior elements of the behavior tree nodes; the subordinate nodes are child nodes of the element nodes or other subordinate nodes and are used to assist the element nodes or other subordinate nodes in parameter confirmation; the central node is the starting node of the behavior tree node and is used to indicate the completion of the task; the control node is used to control the processing process of the task; the action node is used to execute the action corresponding to the behavior tree node; the decoration node is used to perform decoration actions on the central node, the control node, the action node and the reference node; and the reference node is used to reference other behavior trees as execution logic.
5. The method according to claim 1 or 2, characterized in that: The step of screening the plurality of first nodes in the behavior tree according to the environmental situation information to obtain a target behavior tree including a plurality of second nodes includes: According to the environmental situation information, the plurality of second nodes in the behavior tree that match the environmental situation information are retained to obtain the target behavior tree.
6. The method according to claim 5, characterized in that The step of retaining the plurality of second nodes matching the environmental situation information among the plurality of first nodes in the behavior tree to obtain the target behavior tree comprises: Acquire second function description information corresponding to each first node in the behavior tree, and match the environmental situation information with the second function description information corresponding to each first node; The first node corresponding to the second function description information that successfully matches is retained as the second node, and the first node corresponding to the second function description information that fails to match is removed, to obtain the target behavior tree.
7. A task processing device, characterized in that: The device comprises: A task receiving module, used to receive a task and environmental situation information corresponding to the task; wherein the environmental situation information is information used to describe the task and the specific environmental conditions of the task; A query module, configured to query the matter graph and the static knowledge graph according to the task to obtain behavior tree element information; wherein the behavior tree element information includes a plurality of first nodes used to process the task, the relationship between the plurality of first nodes, and the execution logic between the plurality of first nodes; the matter graph is a graph that represents the execution logic of a plurality of tasks through a plurality of nodes, a plurality of relationship edges, and the directionality of the plurality of relationship edges; and the static knowledge graph is a graph that stores the plurality of nodes used by the plurality of tasks and the relationship between the plurality of nodes; A behavior tree construction module, configured to construct a behavior tree in a dynamic decision graph according to the plurality of first nodes, the relationships between the plurality of first nodes, and the execution logic between the plurality of first nodes; wherein the dynamic decision graph is a graph that dynamically associates the plurality of first nodes corresponding to the task; a target behavior tree determination module, configured to screen a plurality of first nodes in the behavior tree according to the environmental situation information to obtain a target behavior tree including a plurality of second nodes; A node running module is used to control the running of the plurality of second nodes in the target behavior tree to process the task.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the task processing method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the task processing method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the task processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Behavior planning method and device based on knowledge graph and behavior tree
CN118297149A
Task implementation structure intelligent design method and device based on ontology knowledge graph, medium and product
CN118690025A
Compiling robot behavior trees
US20240217097A1
Data flow service for robotic behavior trees
US20240359323A1