CN-121980144-A - Dynamic construction method, system, equipment and medium for behavior tree
Abstract
The invention provides a dynamic construction method, a system, equipment and a medium of a behavior tree, wherein the method comprises the steps of obtaining original data from a voice, an image and a touch sensor, carrying out normalization and event abstraction semantezation processing on the original data to obtain a semanteme event object, constructing an event semantic relation graph according to a relation type corresponding to the event object, constructing the event semantic relation graph in a mode of mixing a predefined rule and a big model, defining a mapping rule from the event semantic relation graph to a behavior tree node, converting the relation type in the semantic relation graph into the behavior tree node type, comprising setting a causal relation corresponding sequence node and a conditional relation corresponding condition node, analyzing the event semantic relation graph into a behavior tree structure according to the mapping rule, constructing the behavior tree, recording an execution result in the running process of the behavior tree, and adjusting the event confidence according to the execution result, so as to optimize the dynamic construction of the behavior tree of the next round. The invention can create the behavior tree which meets the personalized expression of the accompanying robot and can be expanded so as to realize the improvement of the accompanying experience of the robot.
Inventors
- WANG XUEZHEN
- TU CHAO
Assignees
- 福建星网智慧科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251210
Claims (10)
- 1. A dynamic construction method of a behavior tree is characterized by comprising the following steps: Step S1, acquiring original data from a voice, an image and a touch sensor, normalizing the original data and carrying out event abstract semanticalization treatment, and creating a semanticalized event object for each event, wherein the event object comprises a semantic type, a participation object, a time sequence attribute, a semantic attribute and an event confidence; S2, analyzing the corresponding relation types according to the event objects, and constructing an event semantic relation graph, wherein the event semantic relation graph is constructed by adopting a predefined rule and large model mixing mode; Step S3, defining a mapping rule from the event semantic relation graph to the behavior tree node, and converting the relation type in the semantic relation graph into the behavior tree node type, wherein the mapping rule comprises setting causal relation corresponding sequence nodes and conditional relation corresponding condition nodes; s4, analyzing the event semantic relation graph into a behavior tree structure according to the mapping rule, and dynamically constructing a behavior tree; And S5, recording an execution result in the running process of the behavior tree, and adjusting the event confidence according to the execution result, so as to optimize the dynamic construction of the behavior tree of the next round.
- 2. A method for dynamically building a behavioral tree according to claim 1 wherein said semantic types are used to define event types, said participating objects include event subjects, objects, sites and tools, said temporal attributes include time phases, duration of occurrence and context ranges, and said semantic attributes include determinations of event behavior, nature and state.
- 3. The method of claim 1, wherein the predefined rule is used for processing relationships corresponding to abnormal condition early warning events, the large model is used for processing relationships of daily interaction events, and the event semantic relationship graph comprises causal relationships and conditional relationships.
- 4. The method for dynamically building a behavior tree according to claim 1, wherein the step S4 comprises the following steps: Analyzing the semantic relation graph into a behavior tree structure according to the mapping rule, automatically combining the behavior tree structure, and executing addition, insertion, replacement and/or deletion of the behavior tree nodes according to the real-time event stream to complete dynamic construction of the behavior tree.
- 5. A dynamic behavior tree construction system is characterized in that the system comprises: the event acquisition and semantic representation module is used for acquiring original data from the voice, the image and the touch sensor, normalizing the original data and abstracting and semantically processing the event, and creating a semantically event object for each event, wherein the event object comprises a semantic type, a participation object, a time sequence attribute, a semantic attribute and an event confidence; The event semantic relation diagram construction module is used for constructing an event semantic relation diagram according to the corresponding relation type analyzed by the event object, wherein the event semantic relation diagram is constructed by adopting a predefined rule and large model mixed mode; The behavior node mapping module is used for defining a mapping rule from the event semantic relation graph to the behavior tree node, converting the relation type in the semantic relation graph into the behavior tree node type, and setting a causal relation corresponding sequence node and a conditional relation corresponding condition node; the behavior tree dynamic construction module is used for analyzing the event semantic relation graph into a behavior tree structure according to the mapping rule and dynamically constructing a behavior tree; and the execution and feedback optimization module is used for recording an execution result in the running process of the behavior tree, adjusting the event confidence according to the execution result and optimizing the dynamic construction of the behavior tree of the next round.
- 6. The system for dynamic building of a behavioral tree of claim 5 wherein said semantic type is used to define event types, said participant comprises event subjects, objects, sites and tools, said temporal attributes comprise time phases, duration of occurrence and context ranges, and said semantic attributes comprise determinations of event behavior, nature and state.
- 7. The system for dynamically building a behavior tree according to claim 5, wherein said predefined rules are used for handling relationships corresponding to abnormal-condition pre-warning events, said large model is used for handling relationships of daily interactive events, and said event semantic relationship graph comprises causal relationships and conditional relationships.
- 8. The system for dynamically building a behavior tree according to claim 5, wherein said behavior tree dynamic building module comprises: Analyzing the semantic relation graph into a behavior tree structure according to the mapping rule, automatically combining the behavior tree structure, and executing addition, insertion, replacement and/or deletion of the behavior tree nodes according to the real-time event stream to complete dynamic construction of the behavior tree.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 4 when the program is executed by the processor.
- 10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 4.
Description
Dynamic construction method, system, equipment and medium for behavior tree Technical Field The invention relates to the technical field of emotion robots, in particular to a dynamic behavior tree construction method, a system, equipment and a medium. Background The table-type emotion accompanying robot has been rapidly developed in the fields of child education, personal assistants, and the like in recent years. The method has the core value of being capable of sensing the state of a user and providing accompaniment and assistance through natural interaction and emotion expression. At present, most of the behaviors of the robot are controlled by adopting a predefined script, a finite state machine or a fixed behavior tree, and the modes can only modify execution conditions, can not dynamically reconstruct the structure of the behavior tree and have poor expansibility. Most event-driven behavior triggers are simple mapping of events to behaviors, so that robots lack of situation understanding capability and behavior decision stiffness occur in actual interaction, and the robots have no personalized expression, so that long-term accompanying sense and dependency sense are difficult to form with users. In view of the foregoing, there is a need to construct a behavior tree that facilitates expansion and enrichment of personalized expressions of companion robots to achieve a "temperature, memory, personality" robotic companion experience Disclosure of Invention The invention aims to solve the technical problems of stiff behavior decision, lack of personalized expression and the like of the conventional emotion robot by providing a dynamic behavior tree construction method, a system, equipment and a medium. In a first aspect, the present invention provides a method for dynamically constructing a behavior tree, including the following steps: Step S1, acquiring original data from a voice, an image and a touch sensor, normalizing the original data and carrying out event abstract semanticalization treatment, and creating a semanticalized event object for each event, wherein the event object comprises a semantic type, a participation object, a time sequence attribute, a semantic attribute and an event confidence; S2, analyzing the corresponding relation types according to the event objects, and constructing an event semantic relation graph, wherein the event semantic relation graph is constructed by adopting a predefined rule and large model mixing mode; Step S3, defining a mapping rule from the event semantic relation graph to the behavior tree node, and converting the relation type in the semantic relation graph into the behavior tree node type, wherein the mapping rule comprises setting causal relation corresponding sequence nodes and conditional relation corresponding condition nodes; s4, analyzing the event semantic relation graph into a behavior tree structure according to the mapping rule, and dynamically constructing a behavior tree; And S5, recording an execution result in the running process of the behavior tree, and adjusting the event confidence according to the execution result, so as to optimize the dynamic construction of the behavior tree of the next round. Further, the semantic type is used to define event types, the participating objects include event subjects, objects, places and tools, the time sequence attributes include time phases, occurrence durations and scene ranges, and the semantic attributes include determination of event behaviors, properties and states. Further, the predefined rule is used for processing the relation corresponding to the abnormal condition early warning event, the large model is used for processing the relation of the daily interactive event, and the event semantic relation graph comprises a causal relation and a conditional relation. Further, the step S4 specifically includes: Analyzing the semantic relation graph into a behavior tree structure according to the mapping rule, automatically combining the behavior tree structure, and executing addition, insertion, replacement and/or deletion of the behavior tree nodes according to the real-time event stream to complete dynamic construction of the behavior tree. In a second aspect, the present invention provides a system for dynamically building a behavior tree, the system comprising: the event acquisition and semantic representation module is used for acquiring original data from the voice, the image and the touch sensor, normalizing the original data and abstracting and semantically processing the event, and creating a semantically event object for each event, wherein the event object comprises a semantic type, a participation object, a time sequence attribute, a semantic attribute and an event confidence; The event semantic relation diagram construction module is used for constructing an event semantic relation diagram according to the corresponding relation type analyzed by the event object, wherein the event semantic