CN117369521B - Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision - Google Patents

Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision Download PDF

Info

Publication number
CN117369521B
CN117369521B CN202311643085.0A CN202311643085A CN117369521B CN 117369521 B CN117369521 B CN 117369521B CN 202311643085 A CN202311643085 A CN 202311643085A CN 117369521 B CN117369521 B CN 117369521B
Authority
CN
China
Prior art keywords
tree
aerial vehicle
unmanned aerial
node
logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311643085.0A
Other languages
Chinese (zh)
Other versions
CN117369521A (en
Inventor
高阳
王正
唐世军
韩建福
常惠
陈锐海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation of Chinese Academy of Science
AVIC Chengdu Aircraft Design and Research Institute
Original Assignee
Institute of Automation of Chinese Academy of Science
AVIC Chengdu Aircraft Design and Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Automation of Chinese Academy of Science, AVIC Chengdu Aircraft Design and Research Institute filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN202311643085.0A priority Critical patent/CN117369521B/en
Publication of CN117369521A publication Critical patent/CN117369521A/en
Application granted granted Critical
Publication of CN117369521B publication Critical patent/CN117369521B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of unmanned aerial vehicle decision logic analysis and verification, and provides a method, a device and equipment for generating a behavior tree model path for unmanned aerial vehicle decision, wherein the method comprises the following steps: acquiring a behavior tree constructed based on unmanned aerial vehicle decision behaviors, wherein each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at various factors of external situation; converting the logic nodes in the behavior tree into grammar tree nodes describing the logic of the corresponding nodes to obtain a logic grammar tree; traversing the logic grammar tree to obtain an reachable branch path of the behavior tree; the reachable branch path represents a complete decision of the unmanned aerial vehicle for external situations. The method, the device, the electronic equipment and the storage medium provided by the invention provide a basis for behavior tree coverage analysis, output space statistics and the like, support behavior tree static analysis, provide an effective basis for behavior tree test case design and support behavior tree dynamic test.

Description

Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision
Technical Field
The invention relates to the technical field of unmanned aerial vehicle decision logic analysis and verification, in particular to a method, a device and equipment for generating a behavior tree model path for unmanned aerial vehicle decision.
Background
Behavior trees are a formalized graphical modeling language, which is a mathematical model commonly used in computer science, robotics, control systems, and video games. The behavior tree is embodied as a patterned directed tree containing logical nodes and behavior nodes that describes the switching between a limited set of tasks in a modular fashion, that uses explicit semantic symbols to explicitly define hundreds or even thousands of system behaviors or scenarios, and that provides a tool that increases the common understanding of complex systems.
In practical applications, behavior trees are mostly applied to complex system modeling. In a behavior tree of a complex system, there are phenomena of a plurality of behavior tree nodes, a plurality of branch conditions and a plurality of condition couplings, and one behavior tree path may be formed by tens of hundreds of condition branches. After the complexity of the behavior tree is increased, static analysis such as behavior tree coverage analysis, output space statistics and the like cannot be performed by a behavior tree model designer.
Therefore, an effective method is lacking at present, which can provide a basis for behavior tree coverage analysis, output space statistics and the like, support behavior tree static analysis, provide an effective basis for behavior tree test case design and support behavior tree dynamic test.
Disclosure of Invention
The invention provides a method, a device and equipment for generating a behavior tree model path for unmanned aerial vehicle decision, which are used for solving the defect that in the prior art, after the complexity of a behavior tree rises in the field of unmanned aerial vehicle decision logic analysis and verification, behavior tree model designers cannot conduct static analysis such as behavior tree coverage analysis and output space statistics.
The invention provides a behavior tree model path generation method for unmanned aerial vehicle decision, which comprises the following steps:
acquiring a behavior tree constructed based on unmanned aerial vehicle decision behaviors, wherein each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at various factors of external situation;
converting the logic nodes in the behavior tree into grammar tree nodes describing the logic of the corresponding nodes to obtain a logic grammar tree;
traversing the logic grammar tree to obtain an reachable branch path of the behavior tree, and taking the reachable branch path as control logic for controlling the unmanned aerial vehicle.
According to the behavior tree model path generation method for unmanned aerial vehicle decision, the behavior tree constructed based on unmanned aerial vehicle decision behavior is obtained, and the method comprises the following steps:
and reading related file contents of the decision-making action of the unmanned aerial vehicle, creating a structured object corresponding to the related file contents, and determining the structured object as the action tree.
According to the method for generating the path of the behavior tree model for unmanned aerial vehicle decision, which is provided by the invention, converts the logic nodes in the behavior tree into grammar tree nodes for describing the logic of the corresponding nodes to obtain a logic grammar tree, and comprises the following steps:
determining branch nodes of the structured objects corresponding to the related file contents;
and converting the logic nodes in the behavior tree into grammar tree nodes for describing the logic of the corresponding nodes based on the node types corresponding to the branch nodes, so as to obtain the logic grammar tree.
According to the behavior tree model path generation method for unmanned aerial vehicle decision, the node types corresponding to the branch nodes comprise at least two of selection nodes, sequence nodes and parallel nodes.
According to the behavior tree model path generation method for unmanned aerial vehicle decision, the logic grammar tree is traversed to obtain the reachable branch path of the behavior tree, and the method comprises the following steps:
traversing the logic grammar tree based on a depth-first search algorithm to generate a branch path tree of the behavior tree;
and verifying the reachability of each path in the branch path tree based on the satisfaction module theory, and taking the verified path as the reachable branch path of the behavior tree.
According to the behavior tree model path generation method for unmanned aerial vehicle decision, the depth-first search algorithm-based traversal logic grammar tree generates a branch path tree of the behavior tree, and the method comprises the following steps:
step a1: acquiring a root node of the logic grammar tree, and then executing the step a2;
step a2: acquiring the next node which is not traversed by the root node, setting the next node as a current node, and then executing the step a3;
step a3: judging whether the nodes of the behavior tree are completely traversed, and if so, directly ending; otherwise, executing the step a4;
step a4: judging whether the current node is a leaf node, if so, executing the step a5, otherwise, executing the step a2 if not;
step a5: summarizing paths from the root node to the current node, generating a branch path tree, and then executing step a6;
step a6: and returning to the node at the previous stage of the current node, and then executing the step a2.
According to the behavior tree model path generation method for unmanned aerial vehicle decision, the related file content comprises any one of a pre-written form, a text and an XML file.
The invention also provides a behavior tree model path generating device for unmanned aerial vehicle decision, comprising:
the system comprises an acquisition unit, a decision making unit and a decision making unit, wherein the acquisition unit is used for acquiring a behavior tree constructed based on unmanned aerial vehicle decision making behaviors, and each node in the behavior tree corresponds to the decision making behaviors of the unmanned aerial vehicle aiming at various factors of external situations;
the transformation unit is used for transforming the logic nodes in the behavior tree into grammar tree nodes for describing the logic of the corresponding nodes to obtain a logic grammar tree;
the traversing unit is used for traversing the logic grammar tree to obtain an reachable branch path of the behavior tree; the reachable branch path represents a complete decision of the unmanned aerial vehicle for external situations.
The invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the behavior tree model path generation method for unmanned aerial vehicle decision-making according to any one of the above when executing the program.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a behavioural tree model path generation method for unmanned aerial vehicle decision as described in any one of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a behavioural tree model path generation method for unmanned aerial vehicle decision making as described in any one of the above.
According to the method, the device and the equipment for generating the path of the behavior tree model for the unmanned aerial vehicle decision, the behavior tree constructed based on the unmanned aerial vehicle decision behavior is obtained, each node in the behavior tree corresponds to the decision behavior of the unmanned aerial vehicle aiming at each external situation factor, then the logic nodes in the behavior tree are converted into grammar tree nodes for describing the logic of the corresponding nodes, the logic grammar tree is obtained, finally the logic grammar tree is traversed, and the reachable branch path of the behavior tree is obtained and used for checking and testing the unmanned aerial vehicle decision logic. The method provides a basis for behavior tree coverage analysis, output space statistics and the like in unmanned aerial vehicle decision logic analysis and verification, supports behavior tree static analysis, provides an effective basis for behavior tree test case design, supports behavior tree dynamic test, and improves accuracy and reliability of unmanned aerial vehicle decision logic analysis and verification.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of a method for generating a behavioral tree model path for unmanned aerial vehicle decision making provided by the invention;
FIG. 2 is a schematic diagram of a branch path tree provided by the present invention;
FIG. 3 is a schematic diagram of node information and condition information contained in a branch path tree provided by the present invention;
FIG. 4 is a schematic flow chart of traversing a logical grammar tree provided by the present invention;
FIG. 5 is a schematic diagram of a structure of a path generation device of a behavior tree model for unmanned aerial vehicle decision making;
fig. 6 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the related art, at present, errors existing in the behavior tree are mainly discovered through a testing method, which requires that the testing can cover all system behaviors or scenes. Along with the deep design of the system, the complexity of the behavior tree model of the system is continuously increased, and test case designers cannot guarantee the coverage of the behavior tree path and the coverage of the conditional branches of the behavior tree path, so that the coverage of the test case to the system behavior or scene cannot be guaranteed.
In addition, it is found in the behavior tree test process that, although there may be thousands or even tens of thousands of behavior tree paths in the behavior tree of the complex system, there are not so many behavior tree paths that are truly valid, and many paths are invalid paths, i.e., paths where there is a condition conflict due to the coupling condition. This results in a large number of invalid test cases during the behavioral tree test.
Therefore, under the technical field of unmanned plane decision logic analysis and verification, an effective method is lacking at present, so that a basis can be provided for behavior tree coverage analysis, output space statistics and the like, behavior tree static analysis is supported, an effective basis can be provided for behavior tree test case design, and behavior tree dynamic test is supported.
Based on the above-mentioned problems, the present invention provides a method for generating a path of a behavioral tree model for unmanned aerial vehicle decision, fig. 1 is a schematic flow chart of the method for generating a path of a behavioral tree model for unmanned aerial vehicle decision provided by the present invention, as shown in fig. 1, the method includes:
step 110, obtaining a behavior tree constructed based on unmanned aerial vehicle decision behaviors, wherein each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at all factors of external situation.
Specifically, a Behavior Tree (Behavior Tree) constructed based on unmanned plane decision behaviors can be obtained, and the Behavior Tree (Behavior Tree) is a graphical modeling language. The complex behavior logic can be simply and intuitively described by using the behavior tree without considering the specific implementation thereof. Compared with the traditional state machine, the behavior tree has good reusability, expansibility and usability.
Each node in the behavior tree corresponds to a decision behavior of the unmanned aerial vehicle for each factor of the external situation, where the decision behavior may include path planning, target tracking, air combat maneuver decision, and the like, which is not specifically limited in the embodiment of the present invention.
For example, the unmanned aerial vehicle navigation instruction may be determined according to a mission setting, unmanned aerial vehicle flight parameters, target parameters, and the like.
And 120, converting the logic nodes in the behavior tree into grammar tree nodes for describing the logic of the corresponding nodes to obtain a logic grammar tree.
Specifically, after obtaining a behavior tree constructed based on unmanned plane decision behaviors, logical nodes in the behavior tree can be converted into grammar tree nodes describing corresponding node logics, and a logic grammar tree is obtained.
A logical syntax tree is a hierarchical structure that can be traversed from the root node to all leaf nodes. Logical syntax trees may be used to describe the logical relationships of the behavior tree nodes, and the behavior tree nodes that may produce branch paths are analyzed.
In the logical grammar tree generation process, logical nodes (such as conditions, actions, sequences and the like) of a behavior tree are converted into grammar tree nodes capable of describing the logic of the nodes, grammar tree jump logic is stored in the grammar tree nodes, and necessary information for jumping from the grammar tree nodes to the next logical node and returning to the nodes of the upper level is provided.
Such as the choice commonly used by a behavior tree (selecting one of its child nodes to execute), the sequence (executing all its child nodes in turn, that is, running the next child node after the previous one returns to the "complete" state), and the parallel (running all its child nodes all over) logic nodes, providing their description and semantic information in the syntax tree, and implementing the corresponding logic jump function.
Step 130, traversing the logic grammar tree to obtain an reachable branch path of the behavior tree; the reachable branch path represents a complete decision of the unmanned aerial vehicle for external situations.
Specifically, after the logic grammar tree is obtained, the logic grammar tree can be traversed to obtain the reachable branch path of the behavior tree for the inspection and test of the unmanned plane decision logic. Here, the reachable branch paths of each behavior tree represent a specific decision or behavior strategy.
Here, the logical syntax tree may be traversed by a syntax tree traversal engine, traversing the logical syntax tree based on a depth-first search algorithm, generating reachable branch paths of the behavior tree.
Here, the syntax tree traversal engine is a program for traversing the logical syntax tree and performing the corresponding operations. It is the core of a compiler or interpreter that converts source code into object code or directly executes the source code. The syntax tree traversal engine may help the compiler or interpreter better understand the source code and generate more efficient object code or directly execute the source code.
It can be understood that the behavior tree is converted into the logic grammar tree, and the logic grammar tree is traversed to generate the reachable branch paths of the behavior tree, so that the number of reachable branch paths of the behavior tree can be obtained, the longest branch path of the behavior tree can be calculated, and how many branch paths the leaf nodes appear in can be calculated, thereby carrying out coverage analysis and output space statistics on the behavior tree on the basis of the branch paths.
In addition, in the implementation process of the method, corresponding hardware devices such as a data storage device, a processing device, a display device and the like can be arranged in a matched mode. The data storage device stores the content of the related files of the decision-making action of the unmanned aerial vehicle, the execution process or the execution result of each step can be displayed through the display device, and a plurality of display areas, for example, a first display area, are arranged in the display device, so that the data information read in the 1 st step can be displayed; the second display area can display a logic grammar tree constructed by the input-output relation of the tested object, and the third display area can display a branch path tree of the logic grammar tree.
According to the method provided by the embodiment of the invention, the behavior tree constructed based on the unmanned aerial vehicle decision behaviors is obtained, each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at each external situation factor, then the logic nodes in the behavior tree are converted into grammar tree nodes for describing the logic of the corresponding nodes, the logic grammar tree is obtained, and finally the logic grammar tree is traversed to obtain the reachable branch paths of the behavior tree for checking and testing the unmanned aerial vehicle decision logic. The method provides a basis for behavior tree coverage analysis, output space statistics and the like in unmanned aerial vehicle decision logic analysis and verification, supports behavior tree static analysis, provides an effective basis for behavior tree test case design, supports behavior tree dynamic test, and improves accuracy and reliability of unmanned aerial vehicle decision logic analysis and verification.
Based on the above embodiment, step 110 includes:
and step 111, reading the related file content of the decision-making action of the unmanned aerial vehicle, creating a structured object corresponding to the related file content, and determining the structured object as the action tree.
Specifically, the relevant file content of the decision-making action of the unmanned aerial vehicle can be read, a structured object corresponding to the relevant file content is created, and the structured object is determined to be an action tree.
Here, the relevant file contents of the decision-making action of the unmanned aerial vehicle may include any one of a table, text, and XML-form file written in advance by the user according to the action logic. For example, the content of the file related to the decision-making action of the unmanned aerial vehicle is an XML structure text, and then the file can be directly read into a memory object consisting of elements, attributes and sub-elements.
Here, the method of reading the relevant file content of the decision-making action of the unmanned aerial vehicle depends on the format and the storage manner of the relevant file content. If the relevant file content is stored in XML format, it can be read using DOM or SAX parser in Java. If the associated file content is stored in binary format, a corresponding library is required to be used for reading.
Here, the structured object is a structured object that corresponds to the content of the related file and is convenient to traverse.
Based on the above embodiment, step 120 includes:
step 121, determining a branch node of a structured object corresponding to the related file content;
and step 122, converting the logic nodes in the behavior tree into grammar tree nodes for describing the logic of the corresponding nodes based on the node types corresponding to the branch nodes, and obtaining the logic grammar tree.
Specifically, a branch node of a structured object corresponding to the content of the related file can be determined, and the branch node can be a node generating two branch paths, namely True and False.
Then, based on the node type corresponding to the branch node, the logic node in the behavior tree can be converted into a grammar tree node describing the logic of the corresponding node, and a logic grammar tree can be obtained.
That is, to convert the behavior tree structure into a logical syntax tree, the following method needs to be followed:
1. traversing nodes of the structured object, determining branch nodes of the structured object, and analyzing node types corresponding to the branch nodes;
2. for a behavior tree node generating a branch, extracting a branch judgment condition based on a node type corresponding to the branch node to form two logic grammar symbol nodes;
3. for the behavior tree node without generating branches, extracting information such as operators, parameters and the like to form a logic grammar symbol node.
4. And constructing the formed logical grammar symbol nodes into a logical grammar tree according to the logical sequence of the action tree.
Here, the node types corresponding to the branch nodes may include a selection node, a sequence node, and a parallel node.
Based on the above embodiment, the node types corresponding to the branch node include at least two of a selection node, a sequence node and a parallel node.
Specifically, the node types corresponding to the branch node may include at least two of a selection node, a sequence node and a parallel node, that is, the node types corresponding to the branch node may include a selection node and a sequence node, may also include a sequence node and a parallel node, and may also include a selection node, a sequence node and a parallel node.
Selecting a node: its child nodes are invoked in turn in a given order until one of them returns success, then the node also returns success. If all child nodes fail, then the node also fails. The option implements or functions.
Sequence node: its child nodes are executed sequentially in a given order until all child nodes return successfully, which node also returns successfully. As soon as one of the child nodes fails, that node also fails. The sequence implements the function of AND.
Parallel nodes: all the child nodes are executed in parallel, and then the state of the child nodes is determined according to the states of all the child nodes.
Based on the above embodiment, traversing the logical syntax tree in step 130, obtaining the reachable branch paths of the behavior tree includes:
step 131, traversing the logic grammar tree based on a depth-first search algorithm to generate a branch path tree of the behavior tree;
step 132, verifying the reachability of each path in the branch path tree based on the satisfaction module theory, and taking the verified path as the reachable branch path of the behavior tree.
In particular, a logical grammar tree may be traversed based on a depth-first search algorithm (Depth First Search, DFS), generating a branch path tree of the behavior tree. Fig. 2 is a schematic diagram of a branch path tree provided by the present invention, as shown in fig. 2, the branch path tree being a binary tree.
Fig. 3 is a schematic diagram of node information and condition information included in a branch path tree provided by the present invention, and as shown in fig. 3, the branch path tree shown in fig. 2 is traversed, a left node 2 is generated from a root node 1, if the node 2 is a branch node, a left node 3 is generated, if the node 3 is not a branch node, the node is rolled back to a previous level node 2, the node 2 is found to be a branch node, and a right branch is not generated yet, and a right node 4 is generated. And generating subsequent branches 5-11 in turn according to the rule. And the branch path tree contains node information and condition information for each branch condition.
Then, after the branch path tree of the behavior tree is generated, reachability of each path in the branch path tree may be verified based on the satisfaction model theory, and the path passed through will be verified as a reachable branch path of the behavior tree. Here, each path in the branch path tree represents a particular decision or behavior strategy.
The satisfaction model theory is a solution to the problem that the efficiency and accuracy of verification are directly affected due to the fact that the path search space is too large during path verification caused by too many paths or complex circulating paths in a program.
Based on the above embodiment, fig. 4 is a schematic flow chart of traversing the logic grammar tree provided by the present invention, as shown in fig. 4, step 131 includes:
step a1: acquiring a root node of the logic grammar tree, and then executing the step a2;
step a2: acquiring the next node which is not traversed by the root node, setting the next node as a current node, and then executing the step a3;
step a3: judging whether the nodes of the behavior tree are completely traversed, and if so, directly ending; otherwise, executing the step a4;
step a4: judging whether the current node is a leaf node, if so, executing the step a5, otherwise, executing the step a2 if not;
step a5: summarizing paths from the root node to the current node, generating a branch path tree, and then executing step a6;
step a6: and returning to the node at the previous stage of the current node, and then executing the step a2.
Based on the above embodiment, the related file content includes any one of a pre-written form, text, and XML-form file.
Specifically, the relevant file content includes any one of a pre-written form, text, and XML form file, which is not particularly limited in the embodiment of the present invention.
For example, the content of the file related to the decision-making action of the unmanned aerial vehicle is an XML structure text, and then the file can be directly read into a memory object consisting of elements, attributes and sub-elements.
The behavior tree model path generating device for unmanned aerial vehicle decision provided by the invention is described below, and the behavior tree model path generating device for unmanned aerial vehicle decision described below and the behavior tree model path generating method for unmanned aerial vehicle decision described above can be correspondingly referred to each other.
Based on any one of the above embodiments, the present invention provides a behavioral tree model path generating device for unmanned aerial vehicle decision, and fig. 5 is a schematic structural diagram of the behavioral tree model path generating device for unmanned aerial vehicle decision provided by the present invention, as shown in fig. 5, the device includes:
the obtaining unit 510 is configured to obtain a behavior tree constructed based on decision behaviors of the unmanned aerial vehicle, where each node in the behavior tree corresponds to a decision behavior of the unmanned aerial vehicle for each factor of an external situation;
a conversion unit 520, configured to convert the logical nodes in the behavior tree into syntax tree nodes describing the logic of the corresponding nodes, so as to obtain a logic syntax tree;
a traversing unit 530, configured to traverse the logic syntax tree to obtain an reachable branch path of the behavior tree; the reachable branch path represents a complete decision of the unmanned aerial vehicle for external situations.
According to the device provided by the embodiment of the invention, the behavior tree constructed based on the unmanned aerial vehicle decision behaviors is obtained, each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at each external situation factor, then the logic nodes in the behavior tree are converted into grammar tree nodes for describing the logic of the corresponding nodes, the logic grammar tree is obtained, and finally the logic grammar tree is traversed to obtain the reachable branch paths of the behavior tree for checking and testing the unmanned aerial vehicle decision logic. The method provides a basis for behavior tree coverage analysis, output space statistics and the like in unmanned aerial vehicle decision logic analysis and verification, supports behavior tree static analysis, provides an effective basis for behavior tree test case design, supports behavior tree dynamic test, and improves accuracy and reliability of unmanned aerial vehicle decision logic analysis and verification.
Based on any of the above embodiments, the obtaining unit 510 is specifically configured to:
and reading related file contents of the decision-making action of the unmanned aerial vehicle, creating a structured object corresponding to the related file contents, and determining the structured object as the action tree.
Based on any of the above embodiments, the conversion unit 520 specifically includes:
a branch node determining unit, configured to determine a branch node of a structured object corresponding to the content of the related file;
and determining a logic grammar tree unit, wherein the logic grammar tree unit is used for converting the logic nodes in the behavior tree into grammar tree nodes describing the logic of the corresponding nodes based on the node types corresponding to the branch nodes to obtain the logic grammar tree.
Based on any one of the above embodiments, the node types corresponding to the branch node include at least two of a selection node, a sequence node, and a parallel node.
Based on any of the above embodiments, the traversing unit 530 specifically includes:
a branch path tree generating unit, configured to traverse the logic syntax tree based on a depth-first search algorithm, and generate a branch path tree of the behavior tree;
and the verification unit is used for verifying the reachability of each path in the branch path tree based on the satisfaction module theory, and taking the verified path as the reachable branch path of the behavior tree.
Based on any of the above embodiments, a branch path tree unit is generated, specifically for:
step a1: acquiring a root node of the logic grammar tree, and then executing the step a2;
step a2: acquiring the next node which is not traversed by the root node, setting the next node as a current node, and then executing the step a3;
step a3: judging whether the nodes of the behavior tree are completely traversed, and if so, directly ending; otherwise, executing the step a4;
step a4: judging whether the current node is a leaf node, if so, executing the step a5, otherwise, executing the step a2 if not;
step a5: summarizing paths from the root node to the current node, generating a branch path tree, and then executing step a6;
step a6: and returning to the node at the previous stage of the current node, and then executing the step a2.
Based on any of the above embodiments, the related file content includes any one of a pre-written form, text, and XML-form file.
Fig. 6 illustrates a physical schematic diagram of an electronic device, as shown in fig. 6, which may include: processor 610, communication interface (Communications Interface) 620, memory 630, and communication bus 640, wherein processor 610, communication interface 620, and memory 630 communicate with each other via communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a behavioral tree model path generation method for drone decisions, the method comprising: acquiring a behavior tree constructed based on unmanned aerial vehicle decision behaviors, wherein each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at various factors of external situation; converting the logic nodes in the behavior tree into grammar tree nodes describing the logic of the corresponding nodes to obtain a logic grammar tree; traversing the logic grammar tree to obtain an reachable branch path of the behavior tree; the branch path represents a complete decision of the unmanned aerial vehicle for the external situation.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the behavior tree model path generating method for unmanned aerial vehicle decision provided by the methods described above, the method comprising: acquiring a behavior tree constructed based on unmanned aerial vehicle decision behaviors, wherein each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at various factors of external situation; converting the logic nodes in the behavior tree into grammar tree nodes describing the logic of the corresponding nodes to obtain a logic grammar tree; traversing the logic grammar tree to obtain an reachable branch path of the behavior tree; the branch path represents a complete decision of the unmanned aerial vehicle for the external situation.
In yet another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the behavioral tree model path generation method for unmanned aerial vehicle decision provided by the methods above, the method comprising: acquiring a behavior tree constructed based on unmanned aerial vehicle decision behaviors, wherein each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at various factors of external situation; converting the logic nodes in the behavior tree into grammar tree nodes describing the logic of the corresponding nodes to obtain a logic grammar tree; traversing the logic grammar tree to obtain an reachable branch path of the behavior tree; the branch path represents a complete decision of the unmanned aerial vehicle for the external situation.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A behavioral tree model path generation method for unmanned aerial vehicle decision making, comprising:
acquiring a behavior tree constructed based on unmanned aerial vehicle decision behaviors, wherein each node in the behavior tree corresponds to the decision behaviors of the unmanned aerial vehicle aiming at various factors of external situation;
converting the logic nodes in the behavior tree into grammar tree nodes describing the logic of the corresponding nodes to obtain a logic grammar tree;
traversing the logic grammar tree to obtain an reachable branch path of the behavior tree; the reachable branch path represents a complete decision of the unmanned aerial vehicle aiming at an external situation;
the traversing the logical grammar tree to obtain an reachable branch path of the behavior tree comprises the following steps:
traversing the logic grammar tree based on a depth-first search algorithm to generate a branch path tree of the behavior tree;
and verifying the reachability of each path in the branch path tree based on the satisfaction module theory, and taking the verified path as the reachable branch path of the behavior tree.
2. The method for generating a behavior tree model path for unmanned aerial vehicle decision according to claim 1, wherein the acquiring a behavior tree constructed based on unmanned aerial vehicle decision behaviors comprises:
and reading related file contents of the decision-making action of the unmanned aerial vehicle, creating a structured object corresponding to the related file contents, and determining the structured object as the action tree.
3. The method for generating the behavior tree model path for unmanned aerial vehicle decision according to claim 2, wherein the converting the logical nodes in the behavior tree into syntax tree nodes describing the corresponding node logic to obtain the logical syntax tree comprises:
determining branch nodes of the structured objects corresponding to the related file contents;
and converting the logic nodes in the behavior tree into grammar tree nodes for describing the logic of the corresponding nodes based on the node types corresponding to the branch nodes, so as to obtain the logic grammar tree.
4. The behavioral tree model path generating method for use in unmanned aerial vehicle decision according to claim 3, wherein the node type corresponding to the branching node comprises at least two of a selection node, a sequence node, and a parallel node.
5. The behavioral tree model path generation method for an unmanned aerial vehicle decision of claim 1, wherein traversing the logical syntax tree based on a depth-first search algorithm generates a branch path tree of the behavioral tree, comprising:
step a1: acquiring a root node of the logic grammar tree, and then executing the step a2;
step a2: acquiring the next node which is not traversed by the root node, setting the next node as a current node, and then executing the step a3;
step a3: judging whether the nodes of the behavior tree are completely traversed, and if so, directly ending; otherwise, executing the step a4;
step a4: judging whether the current node is a leaf node, if so, executing the step a5, otherwise, executing the step a2 if not;
step a5: summarizing paths from the root node to the current node, generating a branch path tree, and then executing step a6;
step a6: and returning to the node at the previous stage of the current node, and then executing the step a2.
6. The behavioral tree model path generation method for an unmanned aerial vehicle decision of any one of claims 2 to 4, wherein the relevant file content comprises any one of a pre-written form, text, and XML-form file.
7. A behavioral tree model path generation apparatus for unmanned aerial vehicle decision making, comprising:
the system comprises an acquisition unit, a decision making unit and a decision making unit, wherein the acquisition unit is used for acquiring a behavior tree constructed based on unmanned aerial vehicle decision making behaviors, and each node in the behavior tree corresponds to the decision making behaviors of the unmanned aerial vehicle aiming at various factors of external situations;
the transformation unit is used for transforming the logic nodes in the behavior tree into grammar tree nodes for describing the logic of the corresponding nodes to obtain a logic grammar tree;
the traversing unit is used for traversing the logic grammar tree to obtain an reachable branch path of the behavior tree; the reachable branch path represents a complete decision of the unmanned aerial vehicle aiming at an external situation;
the traversing the logical grammar tree to obtain an reachable branch path of the behavior tree comprises the following steps:
traversing the logic grammar tree based on a depth-first search algorithm to generate a branch path tree of the behavior tree;
and verifying the reachability of each path in the branch path tree based on the satisfaction module theory, and taking the verified path as the reachable branch path of the behavior tree.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the behavioral tree model path generation method for unmanned aerial vehicle decisions of any one of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium, having stored thereon a computer program, which when executed by a processor implements the behavior tree model path generation method for drone decision of any one of claims 1 to 6.
CN202311643085.0A 2023-12-04 2023-12-04 Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision Active CN117369521B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311643085.0A CN117369521B (en) 2023-12-04 2023-12-04 Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311643085.0A CN117369521B (en) 2023-12-04 2023-12-04 Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision

Publications (2)

Publication Number Publication Date
CN117369521A CN117369521A (en) 2024-01-09
CN117369521B true CN117369521B (en) 2024-02-13

Family

ID=89396880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311643085.0A Active CN117369521B (en) 2023-12-04 2023-12-04 Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision

Country Status (1)

Country Link
CN (1) CN117369521B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117669710B (en) * 2024-02-01 2024-05-10 中国人民解放军军事科学院国防科技创新研究院 Multi-behavior tree decision scheme aggregation method and device for game countermeasure task

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3945391A1 (en) * 2020-07-31 2022-02-02 Aurora Flight Sciences Corporation, a subsidiary of The Boeing Company Causing a robot to execute a mission using a behavior tree and a leaf node library
CN114779829A (en) * 2022-04-08 2022-07-22 沈阳工程学院 Behavior control method and system for micro flapping wing flying robot
CN115900433A (en) * 2022-12-08 2023-04-04 北京理工大学 Decision method of multi-agent unmanned countermeasure system based on SWOT analysis and behavior tree
KR20230094512A (en) * 2021-12-21 2023-06-28 한국전자기술연구원 Behavior tree-based event and object manipulation method for driving simulator
CN116663416A (en) * 2023-06-01 2023-08-29 西安空天仿真科技有限公司 CGF decision behavior simulation method based on behavior tree
WO2023173336A1 (en) * 2022-03-16 2023-09-21 深圳市大疆创新科技有限公司 Control method for movable platform, editing method for behavior tree, and movable platform

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3945391A1 (en) * 2020-07-31 2022-02-02 Aurora Flight Sciences Corporation, a subsidiary of The Boeing Company Causing a robot to execute a mission using a behavior tree and a leaf node library
KR20230094512A (en) * 2021-12-21 2023-06-28 한국전자기술연구원 Behavior tree-based event and object manipulation method for driving simulator
WO2023173336A1 (en) * 2022-03-16 2023-09-21 深圳市大疆创新科技有限公司 Control method for movable platform, editing method for behavior tree, and movable platform
CN114779829A (en) * 2022-04-08 2022-07-22 沈阳工程学院 Behavior control method and system for micro flapping wing flying robot
CN115900433A (en) * 2022-12-08 2023-04-04 北京理工大学 Decision method of multi-agent unmanned countermeasure system based on SWOT analysis and behavior tree
CN116663416A (en) * 2023-06-01 2023-08-29 西安空天仿真科技有限公司 CGF decision behavior simulation method based on behavior tree

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
行为树技术的研究进展与应用;刘瑞峰;王家胜;张灏龙;田梦凡;;计算机与现代化;20200215(第294期);第76-82、88页 *

Also Published As

Publication number Publication date
CN117369521A (en) 2024-01-09

Similar Documents

Publication Publication Date Title
CN117369521B (en) Method, device and equipment for generating behavior tree model path for unmanned aerial vehicle decision
US11455150B2 (en) Accelerating application modernization
CN113238932B (en) Automatic test case generation method
EP2795481A1 (en) Detecting cases with conflicting rules
CN115456150B (en) Reinforced learning model construction method and system
EP1548581A2 (en) Methods, apparatus and programs for system development
CN113918126B (en) AI modeling flow arrangement method and system based on graph algorithm
CN111324718B (en) Session flow testing method and device, electronic equipment and readable storage medium
CN111143228B (en) Test code generation method and device based on decision table method
CN116629330B (en) Operator detection method and device and computer equipment
CN115904480B (en) Code reconstruction method, device, electronic equipment and storage medium
CN116107625A (en) Flow design method, apparatus, device, storage medium, and program product
Harel et al. Some methodological observations resulting from experience using LSCs and the play-in/play-out approach
CN115408289A (en) SCADE model-oriented test case automatic generation method
CN117369795B (en) Behavior tree model reachability analysis method and device for unmanned aerial vehicle decision
WO2013161057A1 (en) Source code inspection method and device
Quartuccio et al. A model-based approach to investigate emergent behaviors in systems of systems
Lai et al. Defining and verifying behaviour of domain specific language with fUML
Weiß et al. Towards establishing formal verification and inductive code synthesis in the PLC domain
Barros et al. Towards an integrated tool support for the analysis of iopt nets using the spin model checker
CN116090183B (en) Digital simulation method and system for SCR demand model
CN109800155B (en) Method and device for testing QTE interlocking application software based on Probe
Bussenot et al. A domain specific test language for systems integration
CN116527411B (en) Data security intelligent protection model construction method and device and collaboration platform
CN114816425B (en) Method and system for converting an automation language program into a LUA language program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant