WO2023004805A1 - Workflow modeling implementation system and method, and storage medium - Google Patents

Workflow modeling implementation system and method, and storage medium Download PDF

Info

Publication number
WO2023004805A1
WO2023004805A1 PCT/CN2021/109876 CN2021109876W WO2023004805A1 WO 2023004805 A1 WO2023004805 A1 WO 2023004805A1 CN 2021109876 W CN2021109876 W CN 2021109876W WO 2023004805 A1 WO2023004805 A1 WO 2023004805A1
Authority
WO
WIPO (PCT)
Prior art keywords
behavior tree
node
nodes
action
workflow
Prior art date
Application number
PCT/CN2021/109876
Other languages
French (fr)
Chinese (zh)
Inventor
周冠兴
张洪洋
唐秉超
Original Assignee
西门子股份公司
西门子(中国)有限公司
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 西门子股份公司, 西门子(中国)有限公司 filed Critical 西门子股份公司
Priority to PCT/CN2021/109876 priority Critical patent/WO2023004805A1/en
Publication of WO2023004805A1 publication Critical patent/WO2023004805A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling

Definitions

  • the invention relates to the field of industrial technology, in particular to a general workflow modeling implementation system, method and storage medium.
  • Workflow can be simply defined as a description of a series of operations. Workflow is widely used in automation systems, artificial intelligence, robotics and other fields. For example, the workflow of a product sorting line in an automated system can be simply described as starting, taking pictures, sorting and moving the products to the target location.
  • the model deployment workflow in the field of artificial intelligence can be described as data collection, data labeling, model training, and model deployment.
  • the embodiment of the present invention proposes a workflow modeling implementation method, and on the other hand, proposes a workflow modeling implementation system and a computer-readable storage medium to realize general workflow creation and implementation.
  • a workflow modeling implementation method proposed in an embodiment of the present invention includes: a node library, in which nodes for building various behavior trees are set, and the nodes include a root node, a logic control node and an action node; wherein, one The behavior tree is used to represent a workflow, the logic control node is used to realize the logic control in the workflow, and the action node is used to realize the business operation in the workflow, and the action node includes: General action nodes encapsulated by common operations in different industrial fields, and proprietary action nodes oriented to specific industrial fields by encapsulating non-general operations in workflows in different industrial fields; the graphical interface module is used to provide users with The nodes in the node storage module are used to construct and configure the graphical human-computer interaction interface of the behavior tree; the editing engine module is used to respond to the behavior tree creation operation performed by the user through the graphical human-computer interaction interface, and generate a corresponding current work The current behavior tree of the flow, keeping the current behavior tree as an extensible markup language file; the behavior tree
  • each action node is composed of an interface part and an implementation part; for the implementation part, each action node is an application program; for the interface part, each action node is a Graphical elements for dragging and dropping, connection and property configuration; the interface part of each action node is set in the node library, and the implementation part of each node is set in a node service module;
  • the behavior tree engine execution module includes : a behavior tree engine module and an executor module; the behavior tree engine module is used to run the current behavior tree, and when running to an action node, package the interface part of the action node to the executor module, The executor module parses it and encapsulates it into a corresponding execution request, sends it to the runtime server provided with the implementation part of the action node, and receives the execution of the implementation part of the action node by the runtime server The returned execution result is fed back to the behavior tree engine module, and the behavior tree engine module presents it to the user through the graphical interface module.
  • the editing engine module is further configured to respond to the user's operation of maintaining the current behavior tree as a sub-behavior tree node and/or behavior tree template through the graphical human-computer interaction interface, and edit the The current behavior tree is stored as a node in the node library as a sub-behavior tree node and/or a behavior tree template, so as to provide the user with direct calling when creating a behavior tree.
  • it further includes: a knowledge graph module, configured to construct a behavior tree knowledge graph based on the grammar of the knowledge graph for all nodes of the behavior tree to be constructed for storage; and to construct the current behavior tree into a knowledge graph based on the grammar of the knowledge graph Graph example; the behavior tree knowledge graph and the knowledge graph instance include: nodes respectively representing each node of the behavior tree, and multiple edges representing the relationship between nodes or node attributes.
  • the knowledge graph module is further used to recommend control nodes and/or action nodes for the user based on the behavior tree knowledge graph and historical knowledge graph instances when the user constructs the current behavior tree , error checking, and smart mapping of node attributes.
  • the action nodes in the current behavior tree include: the following action nodes executed sequentially: model trainer and application deployer; or include: the following action nodes executed sequentially: model trainer, model converter and application deployer; wherein, the model trainer is used to retrain a training model with a new data source or training parameters; the model converter is used to convert the trained model from the source format to the target format; the application deployer is used to convert the The model is deployed to the specified target device.
  • the workflow modeling implementation method proposed in the embodiment of the present invention includes: providing a graphical human-computer interaction interface for users to construct and configure behavior trees based on preset nodes used to construct various behavior trees;
  • the behavior tree creation operation performed by the graphical human-computer interaction interface generates the current behavior tree corresponding to the current workflow, and keeps the current behavior tree as an extensible markup language file;
  • the nodes include root nodes, logic control nodes and actions node; wherein, a behavior tree is used to represent a workflow, the logic control node is used to realize the logic control in the workflow, and the action node is used to realize the business operation in the workflow, and the action node includes: different General action nodes encapsulated by general operations in workflows in industrial fields, and proprietary action nodes oriented to specific industrial fields by encapsulating non-general operations in workflows in different industrial fields; according to the user's operation or debugging An instruction for running the current behavior tree by accessing the extensible markup language file, and realizing the current workflow corresponding to the current behavior
  • the current behavior tree is: a behavior tree built by the user by adding, connecting and configuring root nodes, required logic control nodes and required action nodes;
  • the workflow type is a sub-behavior tree node selected from the sub-behavior tree node library, and the sub-behavior tree node is a stored historical behavior tree instance; the user selects the corresponding behavior tree from the behavior tree template library according to the required workflow type After the template, configure the behavior tree based on the behavior tree template and adjust the nodes or not adjust the behavior tree.
  • the behavior tree template is a pre-stored behavior tree template or a behavior tree template dumped according to the user's historical behavior tree instance .
  • each action node is composed of an interface part and an implementation part; for the implementation part, each action node is an application program; for the interface part, each action node is an Graphical elements of drag and drop, connection and attribute configuration; when each action node in the current behavior tree is executed, the input in the attribute configuration of the interface part of the action node will be read and transmitted to the action node The implementation part, and after the implementation part completes the corresponding operation, the operation result will be converted into the output in the attribute configuration of the action node interface part.
  • it further includes: saving the current behavior tree as a sub-behavior tree node representing a behavior tree instance in the sub-behavior tree node library; and/or, using the frame of the current behavior tree as a behavior Tree templates are saved to the behavior tree template library.
  • it further includes: constructing all nodes of the behavior tree into a behavior tree knowledge graph based on the grammar of the knowledge graph for storage; constructing the current behavior tree into a knowledge graph instance based on the grammar of the knowledge graph; the behavior
  • the tree knowledge graph and the instance of the knowledge graph include: nodes respectively representing the nodes of the behavior tree, and multiple edges representing the relationship between the nodes or the attributes of the nodes.
  • it further includes: when the user builds the current behavior tree, recommending logic control nodes and/or action nodes, error checking and Smart mapping of node attributes.
  • Another workflow modeling implementation system proposed in the embodiments of the present invention includes: at least one memory and at least one processor, wherein: the at least one memory is used to store computer programs; the at least one processor is used to call the The computer program stored in the at least one memory executes the workflow modeling implementation method described in any one of the above implementation manners.
  • a computer-readable storage medium proposed in an embodiment of the present invention on which a computer program is stored; the computer program can be executed by a processor and implement a general workflow modeling method as described in any of the above implementation modes .
  • the behavior tree diagram is used to represent the operation process of the workflow, that is, the related operations in the workflow of different industrial fields are encapsulated into independent nodes, so that the nodes are reusable. It realizes the decoupling of specific business and engineering platforms, and then organizes nodes in the form of behavior tree to generate an intuitive workflow operation process from development to implementation, thereby reducing the complexity of workflow modeling and implementation.
  • the recommendation function of the node, attribute or workflow can be further reduced, which can further reduce the complexity of workload modeling and implementation Spend.
  • the complexity of workload modeling and implementation can be further reduced.
  • FIG. 1 is an exemplary structural diagram of a general workflow modeling implementation system in an embodiment of the present invention.
  • FIG. 2A is a schematic diagram of an encapsulated model trainer node in an example of the present invention.
  • FIG. 2B is a schematic diagram of a human-computer interaction interface in an example of the present invention.
  • FIG. 2C is a schematic diagram of a behavior tree storage format in an example of the present invention.
  • FIG. 2D is a schematic diagram of a behavior tree in an artificial intelligence application in an example of the present invention.
  • FIG. 2E is a schematic diagram of a behavior tree in an application of a quality inspection production line in an example of the present invention.
  • Fig. 3 is a schematic diagram of a behavior tree knowledge map in an example of the present invention.
  • Fig. 4A is a schematic diagram of a behavior tree in an example of the present invention.
  • FIG. 4B is a schematic diagram of converting the behavior tree shown in FIG. 4A into a knowledge graph example.
  • FIG. 5 is a schematic diagram of node recommendation when a user builds a behavior tree in an example of the present invention.
  • Fig. 6 is an exemplary flow chart of a method for implementing workflow modeling in an embodiment of the present invention.
  • Fig. 7 is an exemplary flowchart of another system for implementing workflow modeling in an embodiment of the present invention.
  • a common workflow modeling platform for streams which uses a behavior tree diagram to represent each workflow.
  • general operations in workflows oriented to different industrial fields can be packaged as general nodes, and non-general operations in workflows can be packaged as dedicated nodes oriented to specific fields. These nodes are reusable and can realize the decoupling of specific business and engineering platforms. Organizing nodes in the form of behavior trees allows for an intuitive workflow from development to execution.
  • each behavior tree instance can be represented and saved in the form of a knowledge graph, and on this basis, the recommendation function of nodes, attributes or workflows can be realized.
  • a behavior tree instance or a behavior tree template can also be integrated into the system as a node, so that users can select a behavior tree corresponding to their workflow tasks instead of creating a workflow from scratch.
  • FIG. 1 is an exemplary structural diagram of a general workflow modeling implementation system in an embodiment of the present invention.
  • the system may include: a node library 110 , a graphical interface module 120 , an editing engine module 130 and a behavior tree engine execution module 140 .
  • the system may further include: a knowledge graph module 150.
  • the node library 110 is provided with nodes for constructing various behavior trees, and the nodes include root nodes, logic control nodes and action nodes; wherein, a behavior tree is used to represent a workflow, and logic control nodes are used to implement work flow.
  • the logic control in the flow, the action node is used to realize the business operation in the workflow, and the action node includes: the general action node that encapsulates the general operation in the workflow of different industrial fields, and the work of different industrial fields
  • the non-universal operations in the flow are encapsulated into proprietary action nodes for specific industrial fields.
  • the root node is the start node of the behavior tree, and there is only one root node in a behavior tree.
  • the logic control node is used to realize the logic control in the workflow, and the logic control node is independent of the specific business of the industrial application. Through logical control nodes, users can create various workflows according to their needs.
  • the logical control nodes may include: basic control nodes, decorator nodes and conditional nodes.
  • the logic control nodes may only include some of the basic control nodes, decorator nodes and condition nodes. For example, only base control nodes and condition nodes are included, or only base control nodes and decorator nodes are included, or although all three types of nodes are included, some types include only a part of them. Specifically, it may be determined according to actual needs, and is not limited here.
  • Basic control node it defines how to execute branches in the behavior tree, and is used to implement branch logic control in the workflow, such as sequence, parallelism, selector, etc. Each base control node can have one or more child nodes.
  • Basic control nodes mainly include:
  • Sequential node which will trigger routing from the left to each child node in turn, until it finds a child node that returns failure or operation, and returns the failure or operation to its parent node; if and only if all child nodes of the node When all nodes return success, the node returns success to the parent node.
  • Decorator node It determines whether a branch or even a single node in the behavior tree can be executed, and is used to control workflow interruption and jump control. Each decorator node can only have one child node.
  • Decorator nodes mainly include:
  • Inverter (Inverter) node is used to invert child nodes. Trigger the child node once, if the child node fails, it returns success; if the child node succeeds, it returns failure. If the child node returns running, the node also returns running.
  • a Repeat node can trigger its child nodes up to N times. As long as the child node returns success, N will be passed as the input port; if the child node returns failure, the cycle will be interrupted and failure will also be returned.
  • the Retry node can trigger its child nodes up to N times. As long as the child node returns failure, N will be passed as the input port; if the child node returns success, the loop will be interrupted and success will also be returned.
  • Execution nodes are the leaves of the behavior tree and have no children. It falls into two categories:
  • Condition node used to execute conditional judgment and return the judgment result. It returns success or failure depending on whether the condition is true. Conditional nodes never return a running state.
  • condition node and the action node described below are the leaves of the behavior tree and have no child nodes.
  • the two can also be collectively referred to as an execution node.
  • Action nodes are used to execute commands and implement specific business operations in the workflow. Action nodes have no output connections. Returns success if the operation completed correctly, or failure if the operation failed. Returns running while the operation is in progress.
  • action nodes include: reusable independent action nodes that encapsulate relevant business operations in various industrial fields.
  • nodes that encapsulate general operations in workflows in different industrial fields are general action nodes
  • nodes that encapsulate non-general operations in workflows in different industrial fields for specific industrial fields are proprietary actions node.
  • action nodes encapsulated work can be reused in different workflows.
  • Data collection nodes which may include:
  • File Reader Used to read data from files in CSV, TDMS, etc. formats.
  • Database connector supports connection with common databases such as MS SQL and MongoDB.
  • OPC-UA client used to obtain data from OPC-UA servers commonly used in the field of automation.
  • Data processing nodes which may include:
  • Data Cleaner Used to format source data, delete abnormal data and duplicate data, etc.
  • Data enhancer used to perform spatial transformation, color transformation and other processing on the data to expand the data set.
  • the above nodes are general action nodes that may be involved in different industrial fields. Of course, in other implementation manners, there are more general action nodes, which are not listed here.
  • there are some proprietary action nodes for specific industrial fields and these proprietary action nodes can be used as extension nodes for specific industrial fields in the action nodes.
  • Model management nodes for artificial intelligence which may include:
  • Model Importer This node is used to import a trained model from a model storage area such as a model library or a local PC.
  • Model Trainer Used to retrain the imported training model with new data sources or training parameters.
  • Figure 2A shows a schematic diagram of a model trainer node that encapsulates model training operations. As shown in Figure 2A, this node belongs to the model trainer node in the action node, the protocol adopted is RESTful API, the URL of the AI model is: https://IP.port/api/v1/train, and the input is: training data The package file of the set, the output is: the trained model file.
  • Model Converter Used to convert a trained model from a source format to a target format. For example, from Tensorflow frozen pb(.pb) to ONNX(.ONNX).
  • Model Adapter It is used to realize automatic feature extraction, model selection, parameter optimization and other model adaptation processes based on automatic machine learning according to the currently determined AI application type, that is, to automatically select the appropriate AI model from the model library.
  • Application Deployer Used to package the AI model and its peripheral programs into AI applications, and then deploy them to specified devices.
  • all AI frameworks (such as TensorFlow, Scikit-learn, ONNX, Kubeflow, and AutoML) can be encapsulated as AI action nodes in the behavior tree.
  • Production line quality inspection nodes for industrial automation which may include:
  • Conveyor belt controller used to control the start and stop of the conveyor belt.
  • Camera controller used to control the camera's camera operation.
  • Robot picking used to pick up the corresponding products from the current production line.
  • Quality inspector It is used for quality inspection of the products picked up by the robot, placing qualified products in the first position, and placing unqualified products in the second position.
  • Robot pick-up used to put the products after quality inspection to the corresponding position.
  • Motion controller used to position products on the production line.
  • nodes oriented to different industrial fields can be stored as extended nodes of action nodes, and users can also expand nodes and keep them in the node library.
  • each action node may consist of an interface part and an implementation part.
  • each action node will be an application (e.g., a containerized application) that contains functional code and runtime dependencies.
  • the application can run independently and be exposed through specific network communication interfaces, such as RESTful API and RPC.
  • each action node is a graphic element that can be dragged and dropped in the human-computer interaction interface, and each action node has a property panel for configuring the properties of the action node, such as input and output.
  • Each action node can be configured and executed individually.
  • the input configured by the user in the interface part of the action node will be read and converted to the corresponding application.
  • the operation result such as the converted model will be converted back to the output of the interface part of the action node.
  • the interface part and implementation part of each motion node can be stored separately.
  • the interface library 110 may only store the interface part of the action node, and the implementation part of the action node may be stored in a node service module 160, and the node service module 160 may be located in a server or locally.
  • the status of the node mainly includes: success, failure and operation.
  • users are also allowed to store the created behavior tree as a behavior tree instance as a sub-behavior tree node, which is convenient for the user or other users to directly transfer.
  • behavior tree templates for different workflow types can also be set for users, and the behavior tree templates can also be stored as a node, which is convenient for users It can generate the desired behavior tree by directly invoking and making necessary parameter configurations and node adjustments during modeling.
  • the behavior tree created by the user can also be stored as a behavior tree template node.
  • this behavior tree template node only stores the nodes in the behavior tree and the logic between nodes
  • the behavior tree frame formed does not store specific configuration data; while the sub-behavior tree nodes not only store the nodes in the behavior tree and the logic between nodes, but also store the configuration data of each node.
  • the graphical interface module 120 is used to provide a graphical human-computer interaction interface for users to construct and configure behavior trees based on the nodes in the node storage module.
  • it may include a node library presentation interface, a behavior tree editing interface, a node configuration interface, a variable configuration interface, a data blackboard interface, and an operation monitoring interface.
  • the node library presentation interface is used for presenting the nodes stored in the node library 110 to the user for selection by the user.
  • the left side of FIG. 2B shows a schematic diagram of a node library presentation interface in an example.
  • the behavior tree editing interface is an interface for providing users with behavior tree construction operations.
  • the behavior tree construction operation may include the drag operation of nodes, the association operation between nodes, etc.
  • the middle of FIG. 2B shows a schematic diagram of the behavior tree editing interface in an example.
  • the node configuration interface can display the properties of the node when the user clicks on the node to be configured, including input parameters, output parameters, etc.
  • the user can also set the input parameters and output parameters of the node. Among them, in addition to configuring corresponding values for input parameters and output parameters, they can also be associated with other nodes for input and output. For example, the input value of node 3 comes from the output value of node 1.
  • variable configuration interface is used to provide users with configuration operations on global variables when global variables need to be configured.
  • the data blackboard interface is used to present the recorded node instance list, and the node instance list presents each node in the behavior tree in the form of a list or a tree. Users can modify the properties of nodes through the blackboard interface, and monitor the status of all node instances when the behavior tree is running.
  • FIG. 2B shows a schematic diagram of the data blackboard interface in an example.
  • the running monitoring interface is used for users to set the nodes or custom data required for monitoring, and present the intermediate or final result data of the behavior tree during debugging or running.
  • the editing engine module 130 is used to respond to the behavior tree creation operation performed by the user based on the graphical human-computer interaction interface, and generate a current behavior tree corresponding to the current workflow, and keep the current behavior tree as an Extensible Markup Language (XML, Extensible Markup Language) file.
  • XML Extensible Markup Language
  • the editing engine module 130 is used to respond to the node drag and drop operation performed by the user based on the graphical human-computer interaction interface to add a node in the behavior tree; to respond to the user's node deletion operation to delete the node from the behavior tree; to respond to the user
  • the node attribute configuration operation stores the configuration parameters in the configuration file; saves, loads or exits the behavior tree in response to the user's save or load or exit behavior tree operation. Wherein, when loading the behavior tree, if there is a corresponding system configuration file, the system configuration file is loaded at the same time to initialize the corresponding nodes.
  • an XML file format can be defined to save the current behavior tree.
  • the behavior tree shown in Figure 2C it can be stored as a format file as shown below:
  • the editing engine module 130 is also used to store the current behavior tree as a child behavior tree node and/or behavior tree template in response to the user's operation of keeping the current behavior tree (usually a behavior tree that has been debugged or successfully run) as a child behavior tree node and/or a behavior tree template. Behavior tree nodes and/or behavior tree templates.
  • the editing engine module 130 is also configured to load the sub-behavior tree nodes and/or behavior tree templates into the behavior tree editor of the graphical interface module 120 in response to the user's operation of loading the sub-behavior tree nodes and/or behavior tree templates. presented to the user on the interface.
  • Fig. 2D shows a schematic diagram of a behavior tree in an artificial intelligence application in an example.
  • the behavior tree includes the following action nodes executed sequentially: model trainer (referred to as training in FIG. 2D ) and application deployer (referred to as deployment in FIG. 2D ).
  • the following action nodes executed sequentially may also be included: model trainer, model converter, and application deployment.
  • model importer, model trainer, and application deployer or include the following action nodes executed sequentially: model importer, model trainer, model converter, and application deployer; or Contains the following action nodes executed sequentially: Model Adapter, Model Trainer, and Application Deployer.
  • it may further include: a data collector and a data preprocessor. Specifically, it may be determined according to actual needs, and is not limited here.
  • FIG. 2E shows a schematic diagram of a behavior tree in an example of a quality inspection production line application.
  • the behavior tree engine execution module 140 is configured to run the current behavior tree by accessing the XML file according to the user's running or debugging instruction, and realize the current workflow corresponding to the current behavior tree.
  • the behavior tree engine execution module 140 can start to run from the root node of the behavior tree, and the root node can generate a signal allowing the node to be triggered at a given frequency, and the signal is sent to its child nodes. Each node executes only when said trigger signal is received. If it is executing, the child node immediately returns to run to the parent node; if the goal is achieved, it returns success; otherwise, it returns failure. It has all or some of the following functions:
  • Run run the behavior tree, if the node returns the expected value, the result of the behavior tree is success, otherwise it is failure.
  • the debugging function is similar to the running function, and is mainly used to debug complex tasks before officially executing the workload. In order to monitor the debugging process conveniently, you can set breakpoints in the properties of the action nodes that need to be monitored. After setting the breakpoint, when debugging the behavior tree, it will pause at the action node twice, one is for the user to check the input value before executing the action node, and the other is for the user to check the output value after the action node is executed.
  • Nodes can have error attributes, including error IDs and error messages. When a node fails to execute, detailed error information can be obtained through the node's error attributes.
  • System log record In this embodiment, a system log mechanism may be supported. Important information can be recorded, which is very useful for analyzing some complex problems.
  • the behavior tree engine execution module 140 may include: a behavior tree engine module 141 and an executor module 142 .
  • the behavior tree engine module 141 is used to run the behavior tree, and when it runs to an action node, it provides the interface part of the action node as a package to the executor module 142, and the executor module 142 executes it Parsing and packaging as a corresponding execution request is sent to the node service module 160 provided with the implementation part of the action node, and receiving the execution result returned by the node service module 160 after executing the implementation part of the action node, and converting the The execution result is fed back to the behavior tree engine module 141, and the behavior tree engine module 141 presents it to the user through the operation monitoring interface of the graphical interface module 120.
  • the executor module 142 may be an executor supporting different protocols, for example, a RESTful API executor, an SDK executor, a GRPC executor, or a ROS executor.
  • the knowledge map module 150 is used to construct all nodes of the behavior tree based on the grammar of the knowledge map into a behavior tree knowledge map for storage; the behavior tree knowledge map includes: nodes representing each node of the construction behavior tree, and nodes representing nodes multiple edges between relationships or node attributes.
  • the knowledge graph module 150 is also used for recommending control nodes and/or action nodes, error checking, and intelligent mapping of node attributes for the user based on the behavior tree knowledge graph when the user constructs the current behavior tree.
  • the knowledge graph module 150 may include four sub-modules: a data acquisition sub-module, a knowledge fusion sub-module, a knowledge processing sub-module, and a knowledge graph database.
  • the data collection sub-module supports structured data, and can obtain all nodes for constructing a behavior tree from the node library 110 .
  • the node composition and association relationship in the behavior tree can also be collected.
  • the knowledge fusion sub-module is used for coreference resolution and entity disambiguation processing.
  • coreference resolution is used to solve the problem that multiple references correspond to the same entity object.
  • these referenced items can be associated (merged) to the correct entity object.
  • the node can be associated with the correct node through the knowledge fusion technology.
  • Entity disambiguation is a special technique to solve the problem of ambiguity of entities with the same name. Through entity disambiguation, entity links can be accurately established according to the current context.
  • Knowledge processing sub-module is used to realize knowledge reasoning, quality evaluation and ontology extraction.
  • knowledge reasoning starts from the existing entity relationship data in the knowledge graph database, and establishes new associations between entities through computer reasoning, thereby expanding and enriching the knowledge network.
  • Quality evaluation is an important part of knowledge graph database construction technology. The significance of this part is to quantify the credibility of knowledge and ensure the quality of knowledge graph database by discarding low confidence knowledge.
  • Ontology extraction is an important part of knowledge processing, which is used to represent the relationship between knowledge itself and knowledge, and this model needs to continuously update the knowledge in the model.
  • the knowledge graph database is used to save and construct the behavior tree knowledge graph for further use.
  • Table 1 shows the classes defined in an example.
  • Table 2 shows the data attributes defined in an example.
  • Sequence (A, sequence, B), which means that class B is executed only after class A is successfully executed.
  • Choice means to choose A or B to be executed.
  • data collection A, selection, data collection B wherein, data collection A is to collect data from the camera, and data collection B is to collect data from the Internet. At this time, only one needs to be selected according to the needs of the user.
  • Table 3 shows an example of the object properties defined.
  • a behavior tree knowledge graph as shown in Figure 3 can be constructed.
  • the behavior tree constructed by the user can be further constructed into a knowledge graph instance based on the grammar of the knowledge graph for storage, so that when the user constructs the current behavior tree, the knowledge graph instance based on the behavior tree knowledge graph and history is The user performs recommendation of logical control nodes and/or action nodes, error checking, and intelligent mapping of node attributes.
  • FIG. 4A is a schematic diagram of a behavior tree in an example of the present invention.
  • FIG. 4B is a schematic diagram of converting the behavior tree shown in FIG. 4A into a knowledge graph example.
  • FIG. 5 it shows a schematic diagram of node recommendation when a user constructs a behavior tree in an example of the present invention.
  • the system recommends Action 5, Action 6, and Action 7, etc., and gives matching degrees of 75%, 50%, and 20%, respectively. To facilitate the user to choose.
  • Fig. 6 is an exemplary structural diagram of a method for implementing workflow modeling in an embodiment of the present invention. As shown in the solid line part in Figure 6, the method may include the following steps:
  • Step 601 setting up a general workflow creation platform with a graphical human-computer interaction interface as shown in FIG. 1 , where nodes for building various behavior trees are set.
  • the nodes may include: a root node, a logic control node and an action node; wherein, a behavior tree is used to represent a workflow, the logic control node is used to realize the logic control in the workflow, and the action node is used to realize the workflow in the workflow.
  • Business operations, and the action nodes include: a general action node that encapsulates general operations in workflows in different industrial fields, and a specific industry-oriented node that encapsulates non-general operations in workflows in different industrial fields Proprietary action node for .
  • the root node is the start node of the behavior tree, and there is only one root node in a behavior tree.
  • the logic control node is used to realize the logic control in the workflow, and the logic control node is independent of the specific business of the industrial application. Through logical control nodes, users can create various workflows according to their needs.
  • the logical control nodes may include: basic control nodes, decorator nodes and conditional nodes.
  • the logic control nodes may only include some of the basic control nodes, decorator nodes and condition nodes. For example, only base control nodes and condition nodes are included, or only base control nodes and decorator nodes are included, or although all three types of nodes are included, some types include only a part of them. Specifically, it may be determined according to actual needs, and is not limited here.
  • the status of the node mainly includes: success, failure and running.
  • action nodes include: reusable independent action nodes that encapsulate relevant business operations in various industrial fields. Through action nodes, encapsulated work can be reused in different workflows.
  • each action node may consist of an interface part and an implementation part.
  • each action node will be an application that contains functional code and runtime dependencies. The application can run independently and be exposed through specific network communication interfaces, such as RESTful API and remote procedure call (RPC) interface.
  • RPC remote procedure call
  • each action node is a graphic element that can be dragged and dropped in the workflow editor of the human-computer interaction interface, and each node has a property panel for configuring the properties of the action node, such as input and output.
  • Each action node can be configured and executed individually. When the action node is executed, the input configured by the user in the interface part of the action node will be read and converted to the corresponding application. After completing a specific operation such as model conversion, the operation result such as the converted model will be converted back to the output of the interface part of the action node.
  • the interface part and implementation part of each motion node can be stored separately.
  • the interface part can be stored in the interface library, and the implementation part can be stored in a node service module, which can be located on a runtime server or locally.
  • the interface library is also used to store logic control nodes.
  • Step 602 Generate a current behavior tree corresponding to the current workflow in response to the behavior tree creation operation performed by the user through the graphical human-computer interaction interface, and save the current behavior tree as an XML file.
  • the current behavior tree is: a behavior tree built by the user by adding, connecting and configuring root nodes, required logic control nodes and required action nodes;
  • the flow type is a sub-behavior tree node selected from the sub-behavior tree node library, and the sub-behavior tree node is a stored historical behavior tree instance; the user selects the corresponding behavior tree template from the behavior tree template library according to the required workflow type.
  • sub-behavior tree node library and the behavior tree template library can be juxtaposed with the node library, or can also be a part of the node library.
  • the general execution logic in the embodiment of the present invention is from left to right and from top to bottom, and the specific execution logic is controlled by the logic control node.
  • each node added in the current behavior tree can be further converted into a node instance and added to a node instance list for storage or viewing, and the node instance list presents all nodes in list form or tree form. Describes all nodes in the current behavior tree.
  • Step 603 According to the user's running or debugging instruction, access the XML file to run the current behavior tree, and implement the current workflow corresponding to the current behavior tree.
  • the input configured by the user in the interface part of the action node will be read and converted to the implementation part of the action node.
  • the implementation part completes a specific operation
  • the result of the operation is converted back to the output of the interface part of the action node.
  • the intermediate results and final results during the execution process can be displayed.
  • the current behavior tree that has been built preferably debugged or run successfully, is saved as a behavior tree instance, for example, it is saved as a sub-behavior tree node representing the behavior tree instance in the sub-behavior tree node library.
  • a behavior tree instance for example, it is saved as a sub-behavior tree node representing the behavior tree instance in the sub-behavior tree node library.
  • behavior tree templates corresponding to different workflows can also be preset. These Behavior Tree Templates can be stored in the Behavior Tree Template Library. When users need to build a similar behavior tree, they can select the corresponding behavior tree template and perform necessary configurations to obtain a behavior tree for realizing the required workflow.
  • node recommendation in order to further increase the convenience of behavior tree construction, when users create behavior trees, node recommendation, error checking and intelligent mapping of node attributes can be carried out for users, which can further increase the convenience of behavior tree construction.
  • the behavior tree instance is converted into a knowledge graph instance for saving.
  • the following steps are further included:
  • Step 604 building all nodes of the behavior tree into a behavior tree knowledge graph based on the grammar of the knowledge graph for storage; in addition, the current behavior tree can be further constructed into a knowledge graph instance based on the grammar of the knowledge graph; the behavior tree
  • the knowledge graph and the instance of the knowledge graph include: nodes respectively representing the nodes of the behavior tree, and multiple edges representing the relationship between the nodes or the attributes of the nodes.
  • the recommendation of control nodes and/or action nodes, error checking, and intelligent mapping of node attributes can be performed for the user based on the stored behavior tree knowledge graph and historical knowledge graph instances. Similarity calculation and comparison, deep learning, etc. can be performed in this embodiment.
  • FIG. 7 is a schematic structural diagram of another system for implementing workflow modeling in an embodiment of the present application.
  • the system can be used to implement the method shown in FIG. 6 or implement the system shown in FIG. 1 .
  • the system may include: at least one memory 71 , at least one processor 72 and at least one display 73 .
  • some other components may also be included, such as communication ports and the like. These components communicate via bus 74 .
  • At least one memory 71 is used to store computer programs.
  • the computer program can be understood as including various modules of the workflow modeling implementation system shown in FIG. 1 .
  • at least one memory 71 can also store an operating system and the like.
  • the operating system includes but is not limited to: Android operating system, Symbian operating system, Windows operating system, Linux operating system and so on.
  • At least one processor 72 is configured to invoke a computer program stored in at least one memory 71 to execute the workflow modeling implementation method described in the embodiment of the present application.
  • the processor 72 may be a CPU, a processing unit/module, an ASIC, a logic module or a programmable gate array, and the like. It can receive and send data through the communication port.
  • At least one display 73 is used to display the human-computer interaction interface.
  • At least one processor 72 is configured to invoke a computer program stored in at least one memory 71 to enable the system to execute the operations in the workflow modeling implementation method in any of the foregoing implementation manners.
  • a hardware module may include specially designed permanent circuits or logic devices (such as special-purpose processors, such as FPGAs or ASICs) to perform specific operations.
  • Hardware modules may also include programmable logic devices or circuits (including, for example, general-purpose processors or other programmable processors) temporarily configured by software to perform particular operations.
  • programmable logic devices or circuits including, for example, general-purpose processors or other programmable processors
  • the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and the computer program can be executed by a processor to implement the workflow modeling implementation method described in the embodiment of the present application .
  • a system or device equipped with a storage medium may be provided, on which the software program code for realizing the functions of any implementation manner in the above-mentioned embodiments is stored, and the computer (or CPU or MPU of the system or device) ) to read and execute the program code stored in the storage medium.
  • an operating system or the like operated on a computer may also complete part or all of the actual operations through instructions based on program codes.
  • Embodiments of storage media for providing program codes include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), Tape, non-volatile memory card, and ROM.
  • the program code can be downloaded from a server computer via a communication network.
  • the behavior tree diagram is used to represent the operation process of the workflow, that is, the related operations in the workflow of different industrial fields are encapsulated into independent nodes, so that the nodes are reusable. It realizes the decoupling of specific business and engineering platforms, and then organizes nodes in the form of behavior tree to generate an intuitive workflow operation process from development to implementation, thereby reducing the complexity of workflow modeling and implementation.
  • the recommendation function of the node, attribute or workflow can be further reduced, which can further reduce the complexity of workload modeling and implementation Spend.
  • the complexity of workload modeling and implementation can be further reduced.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Geometry (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Disclosed are a workflow modeling implementation method and system, and a storage medium. The system comprises: a node library, which is configured with nodes for constructing various behavior trees; a graphical interface module, which is used for providing a graphical human-computer interaction interface for a user to construct and configure a behavior tree on the basis of nodes in a node storage module; an editing engine module, which is used for maintaining a current behavior tree as an extendable tag language file in response to a behavior tree creation operation performed by the user by means of the graphical human-computer interaction interface, and which generates the current behavior tree corresponding to a current workflow; and a behavior tree engine execution module, which is used for running the current behavior tree by accessing the extendable tag language file according to a running or debugging instruction of the user, and which implements the current workflow corresponding to the current behavior tree. The technical solution in the embodiments of the present invention may achieve general workflow modeling and implementation.

Description

工作流建模实施系统、方法及存储介质Workflow modeling implementation system, method and storage medium 技术领域technical field
本发明涉及工业技术领域,特别是一种通用的工作流建模实施系统、方法及存储介质。The invention relates to the field of industrial technology, in particular to a general workflow modeling implementation system, method and storage medium.
背景技术Background technique
工作流可以简单地定义为对一系列操作过程的描述。工作流广泛应用于自动化系统、人工智能、机器人等领域。例如,自动化系统中的一条产品分拣线的工作流可以简单地描述为启动、拍照、分类并将产品移动到目标位置。在人工智能领域的模型部署工作流可以描述为数据收集、数据标注、模型训练和模型部署。Workflow can be simply defined as a description of a series of operations. Workflow is widely used in automation systems, artificial intelligence, robotics and other fields. For example, the workflow of a product sorting line in an automated system can be simply described as starting, taking pictures, sorting and moving the products to the target location. The model deployment workflow in the field of artificial intelligence can be described as data collection, data labeling, model training, and model deployment.
但目前这些工作流只有文本描述,如果用户想要执行这样的工作流,需要遵循文本描述,并且可能使用多种工程工具,然这些工具几乎互不相关,提供了完全不同的用户操作行为,这既是对用户的挑战,也会由于开发周期长而大大增加成本,降低效率,限制灵活性。例如,在人工智能领域,用户需要使用一个工具进行数据采集,手动或使用其他工具进行数据标注,编写python脚本进行模型训练,还需要部署工具进行部署。But at present, these workflows only have text descriptions. If users want to execute such workflows, they need to follow the text descriptions and may use a variety of engineering tools. However, these tools are almost irrelevant and provide completely different user operation behaviors. It is not only a challenge to users, but also greatly increases costs, reduces efficiency, and limits flexibility due to the long development cycle. For example, in the field of artificial intelligence, users need to use a tool for data collection, manually or use other tools for data labeling, write python scripts for model training, and deploy tools for deployment.
发明内容Contents of the invention
有鉴于此,本发明实施例中一方面提出了一种工作流建模实施方法,另一方面提出了一种工作流建模实施系统和计算机可读存储介质,用以实现通用的工作流创建及实施。In view of this, on the one hand, the embodiment of the present invention proposes a workflow modeling implementation method, and on the other hand, proposes a workflow modeling implementation system and a computer-readable storage medium to realize general workflow creation and implementation.
本发明实施例中提出的一种工作流建模实施方法,包括:节点库,其中设置有用于构建各种行为树的节点,所述节点包括根节点、逻辑控制节点和动作节点;其中,一个行为树用于表征一个工作流,所述逻辑控制节点用于实现工作流中的逻辑控制,动作节点用于实现工作流中的业务操作,且所述动作节点包括:将不同工业领域工作流中的通用性操作封装而成的通用动作节点,和将不同工业领域工作流中的非通用性操作封装而成的面向具体工业领域的专有动作节点;图形化界面模块,用于提供用户基于所述节点存储模块中的节点进行行为树构建和配置的图形化人机交互界面;编辑引擎模块,用于响应用户通过所述图形化人机交互界面进行的行为树创建操作,并生成对应当前工作流的当前行为树,将所述当前行为树保持为可扩展标记语言文件;行为树引擎执行模块,用于根据用户的运行或调试指令,通过访问所述可扩展标记语言文件运行所述当前行为树,并实现所述当前 行为树对应的当前工作流。A workflow modeling implementation method proposed in an embodiment of the present invention includes: a node library, in which nodes for building various behavior trees are set, and the nodes include a root node, a logic control node and an action node; wherein, one The behavior tree is used to represent a workflow, the logic control node is used to realize the logic control in the workflow, and the action node is used to realize the business operation in the workflow, and the action node includes: General action nodes encapsulated by common operations in different industrial fields, and proprietary action nodes oriented to specific industrial fields by encapsulating non-general operations in workflows in different industrial fields; the graphical interface module is used to provide users with The nodes in the node storage module are used to construct and configure the graphical human-computer interaction interface of the behavior tree; the editing engine module is used to respond to the behavior tree creation operation performed by the user through the graphical human-computer interaction interface, and generate a corresponding current work The current behavior tree of the flow, keeping the current behavior tree as an extensible markup language file; the behavior tree engine execution module is used to run the current behavior by accessing the extensible markup language file according to the user's running or debugging instruction tree, and implement the current workflow corresponding to the current behavior tree.
在一个实施方式中,每个动作节点均由接口部分和实现部分组成;对于实现部分,每个动作节点是一个应用程序;对于接口部分,每个动作节点是一个可在所述人机交互界面上进行拖放、连接及属性配置的图形元素;每个动作节点的接口部分设置在所述节点库中,每个节点的实现部分设置在一节点服务模块中;所述行为树引擎执行模块包括:行为树引擎模块和执行器模块;所述行为树引擎模块用于运行所述当前行为树,并在运行到动作节点时,将所述动作节点的接口部分打包提供给所述执行器模块,由所述执行器模块对其进行解析并封装为对应的执行请求发送给设置有所述动作节点的实现部分的运行时服务器中,并接收所述运行时服务器执行所述动作节点的实现部分后返回的执行结果,将所述执行结果反馈给所述行为树引擎模块,由所述行为树引擎模块通过图形化界面模块呈现给用户。In one embodiment, each action node is composed of an interface part and an implementation part; for the implementation part, each action node is an application program; for the interface part, each action node is a Graphical elements for dragging and dropping, connection and property configuration; the interface part of each action node is set in the node library, and the implementation part of each node is set in a node service module; the behavior tree engine execution module includes : a behavior tree engine module and an executor module; the behavior tree engine module is used to run the current behavior tree, and when running to an action node, package the interface part of the action node to the executor module, The executor module parses it and encapsulates it into a corresponding execution request, sends it to the runtime server provided with the implementation part of the action node, and receives the execution of the implementation part of the action node by the runtime server The returned execution result is fed back to the behavior tree engine module, and the behavior tree engine module presents it to the user through the graphical interface module.
在一个实施方式中,所述编辑引擎模块进一步用于响应用户通过所述图形化人机交互界面进行的将所当前行为树保持为子行为树节点和/或行为树模板的操作,将所述当前行为树作为所述节点库中的一个节点存储为子行为树节点和/或行为树模板,以提供用户进行行为树创建时直接调用。In one embodiment, the editing engine module is further configured to respond to the user's operation of maintaining the current behavior tree as a sub-behavior tree node and/or behavior tree template through the graphical human-computer interaction interface, and edit the The current behavior tree is stored as a node in the node library as a sub-behavior tree node and/or a behavior tree template, so as to provide the user with direct calling when creating a behavior tree.
在一个实施方式中,进一步包括:知识图谱模块,用于将构建行为树的所有节点基于知识图谱的语法构建成一行为树知识图谱进行存储;将所述当前行为树基于知识图谱的语法构建成一知识图谱实例;所述行为树知识图谱以及所述知识图谱实例包括:分别表示构建行为树的各个节点的节点,以及表示节点之间关系或节点属性的多条边。In one embodiment, it further includes: a knowledge graph module, configured to construct a behavior tree knowledge graph based on the grammar of the knowledge graph for all nodes of the behavior tree to be constructed for storage; and to construct the current behavior tree into a knowledge graph based on the grammar of the knowledge graph Graph example; the behavior tree knowledge graph and the knowledge graph instance include: nodes respectively representing each node of the behavior tree, and multiple edges representing the relationship between nodes or node attributes.
在一个实施方式中,所述知识图谱模块进一步用于在用户构建所述当前行为树时,基于所述行为树知识图谱以及历史知识图谱实例为所述用户进行控制节点和/或动作节点的推荐、错误检查以及节点属性的智能映射。In one embodiment, the knowledge graph module is further used to recommend control nodes and/or action nodes for the user based on the behavior tree knowledge graph and historical knowledge graph instances when the user constructs the current behavior tree , error checking, and smart mapping of node attributes.
在一个实施方式中,所述当前行为树中的动作节点包括:顺序执行的如下动作节点:模型训练器和应用程序部署器;或者包括:顺序执行的如下动作节点:模型训练器、模型转换器和应用程序部署器;其中,模型训练器用于对一训练模型进行新数据源或训练参数的再训练;模型转换器用于将训练好的模型从源格式转换为目标格式;应用程序部署器用于将模型部署到指定的目标设备。In one embodiment, the action nodes in the current behavior tree include: the following action nodes executed sequentially: model trainer and application deployer; or include: the following action nodes executed sequentially: model trainer, model converter and application deployer; wherein, the model trainer is used to retrain a training model with a new data source or training parameters; the model converter is used to convert the trained model from the source format to the target format; the application deployer is used to convert the The model is deployed to the specified target device.
本发明实施例中提出的工作流建模实施方法,包括:提供用户基于预先设置的用于构建各种行为树的节点进行行为树构建和配置的图形化人机交互界面;响应用户通过所述图形化人机交互界面进行的行为树创建操作,生成对应当前工作流的当前行为树,并将所述当前行为树保持为可扩展标记语言文件;所述节点包括根节点、逻辑控制节点和动作节 点;其中,一个行为树用于表征一个工作流,所述逻辑控制节点用于实现工作流中的逻辑控制,动作节点用于实现工作流中的业务操作,且所述动作节点包括:将不同工业领域工作流中的通用性操作封装而成的通用动作节点,和将不同工业领域工作流中的非通用性操作封装而成的面向具体工业领域的专有动作节点;根据用户的运行或调试指令,通过访问所述可扩展标记语言文件运行所述当前行为树,并实现所述当前行为树对应的当前工作流。The workflow modeling implementation method proposed in the embodiment of the present invention includes: providing a graphical human-computer interaction interface for users to construct and configure behavior trees based on preset nodes used to construct various behavior trees; The behavior tree creation operation performed by the graphical human-computer interaction interface generates the current behavior tree corresponding to the current workflow, and keeps the current behavior tree as an extensible markup language file; the nodes include root nodes, logic control nodes and actions node; wherein, a behavior tree is used to represent a workflow, the logic control node is used to realize the logic control in the workflow, and the action node is used to realize the business operation in the workflow, and the action node includes: different General action nodes encapsulated by general operations in workflows in industrial fields, and proprietary action nodes oriented to specific industrial fields by encapsulating non-general operations in workflows in different industrial fields; according to the user's operation or debugging An instruction for running the current behavior tree by accessing the extensible markup language file, and realizing the current workflow corresponding to the current behavior tree.
在一个实施方式中,所述当前行为树为:用户通过添加、连接和配置根节点、所需的逻辑控制节点和所需的动作节点构建而成的行为树;或者为:用户根据所需的工作流类型从子行为树节点库中选取的子行为树节点,所述子行为树节点为已存储的历史行为树实例;用户根据所需工作流类型从行为树模板库中选取对应的行为树模板后,基于所述行为树模板进行配置以及进行节点调整或不调整后得到的行为树,所述行为树模板为预先存储的行为树模板或根据用户的历史行为树实例转存的行为树模板。In one embodiment, the current behavior tree is: a behavior tree built by the user by adding, connecting and configuring root nodes, required logic control nodes and required action nodes; The workflow type is a sub-behavior tree node selected from the sub-behavior tree node library, and the sub-behavior tree node is a stored historical behavior tree instance; the user selects the corresponding behavior tree from the behavior tree template library according to the required workflow type After the template, configure the behavior tree based on the behavior tree template and adjust the nodes or not adjust the behavior tree. The behavior tree template is a pre-stored behavior tree template or a behavior tree template dumped according to the user's historical behavior tree instance .
在一个实施方式中,每个动作节点均由接口部分和实现部分组成;对于实现部分,每个动作节点是一个应用程序;对于接口部分,每个动作节点是一个可在人机交互界面上进行拖放、连接及属性配置的图形元素;所述当前行为树中的每个动作节点被执行时,所述动作节点接口部分的属性配置中的输入将被读取并传输给所述动作节点的实现部分,并在所述实现部分完成对应操作后,操作结果将转换为所述动作节点接口部分的属性配置中的输出。In one embodiment, each action node is composed of an interface part and an implementation part; for the implementation part, each action node is an application program; for the interface part, each action node is an Graphical elements of drag and drop, connection and attribute configuration; when each action node in the current behavior tree is executed, the input in the attribute configuration of the interface part of the action node will be read and transmitted to the action node The implementation part, and after the implementation part completes the corresponding operation, the operation result will be converted into the output in the attribute configuration of the action node interface part.
在一个实施方式中,进一步包括:将所述当前行为树作为一个表征行为树实例的子行为树节点保存到子行为树节点库中;和/或,将所述当前行为树的框架作为一个行为树模板保存到行为树模板库中。In one embodiment, it further includes: saving the current behavior tree as a sub-behavior tree node representing a behavior tree instance in the sub-behavior tree node library; and/or, using the frame of the current behavior tree as a behavior Tree templates are saved to the behavior tree template library.
在一个实施方式中,进一步包括:将构建行为树的所有节点基于知识图谱的语法构建成一行为树知识图谱进行存储;将所述当前行为树基于知识图谱的语法构建成一知识图谱实例;所述行为树知识图谱以及所述知识图谱实例包括:分别表示构建行为树的各个节点的节点,以及表示节点之间关系或节点属性的多条边。In one embodiment, it further includes: constructing all nodes of the behavior tree into a behavior tree knowledge graph based on the grammar of the knowledge graph for storage; constructing the current behavior tree into a knowledge graph instance based on the grammar of the knowledge graph; the behavior The tree knowledge graph and the instance of the knowledge graph include: nodes respectively representing the nodes of the behavior tree, and multiple edges representing the relationship between the nodes or the attributes of the nodes.
在一个实施方式中,进一步包括:在用户构建所述当前行为树时,基于所述行为树知识图谱以及历史知识图谱实例为所述用户进行逻辑控制节点和/或动作节点的推荐、错误检查以及节点属性的智能映射。In one embodiment, it further includes: when the user builds the current behavior tree, recommending logic control nodes and/or action nodes, error checking and Smart mapping of node attributes.
本发明实施例中提出的又一种工作流建模实施系统,包括:至少一个存储器和至少一个处理器,其中:所述至少一个存储器用于存储计算机程序;所述至少一个处理器用于调用所述至少一个存储器中存储的计算机程序执行如上任一实施方式所述的工作流建模实施方法。Another workflow modeling implementation system proposed in the embodiments of the present invention includes: at least one memory and at least one processor, wherein: the at least one memory is used to store computer programs; the at least one processor is used to call the The computer program stored in the at least one memory executes the workflow modeling implementation method described in any one of the above implementation manners.
本发明实施例中提出的一种计算机可读存储介质,其上存储有计算机程序;所述计算机程序能够被一处理器执行并实现如上任一实施方式所述的实现通用的工作流建模方法。A computer-readable storage medium proposed in an embodiment of the present invention, on which a computer program is stored; the computer program can be executed by a processor and implement a general workflow modeling method as described in any of the above implementation modes .
从上述方案中可以看出,由于本发明实施例中,用行为树图来表示工作流的操作流程,即将不同工业领域工作流中的相关操作封装成独立的节点,使节点具有可重用性,实现了特定业务与工程平台的解耦,然后以行为树的形式组织节点,生成从开发到实施的直观的工作流操作流程,从而降低了工作流建模和实施的复杂度。It can be seen from the above scheme that in the embodiment of the present invention, the behavior tree diagram is used to represent the operation process of the workflow, that is, the related operations in the workflow of different industrial fields are encapsulated into independent nodes, so that the nodes are reusable. It realizes the decoupling of specific business and engineering platforms, and then organizes nodes in the form of behavior tree to generate an intuitive workflow operation process from development to implementation, thereby reducing the complexity of workflow modeling and implementation.
此外,通过采用知识图谱的形式来表示和保存构建行为树中节点以及行为树实例,并在此基础上实现节点、属性或工作流的推荐功能,从而可进一步降低工作量建模和实施的复杂度。In addition, by using the knowledge graph to represent and save the nodes and instances of the behavior tree in the construction of the behavior tree, and based on this, the recommendation function of the node, attribute or workflow can be further reduced, which can further reduce the complexity of workload modeling and implementation Spend.
进一步地,通过将已构建的行为树存储为子行为树节点或行为树模板,可进一步降低工作量建模和实施的复杂度。Further, by storing the constructed behavior tree as a sub-behavior tree node or a behavior tree template, the complexity of workload modeling and implementation can be further reduced.
附图说明Description of drawings
下面将通过参照附图详细描述本发明的优选实施例,使本领域的普通技术人员更清楚本发明的上述及其它特征和优点,附图中:Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, so that those of ordinary skill in the art will be more aware of the above-mentioned and other features and advantages of the present invention. In the accompanying drawings:
图1为本发明实施例中一种通用的工作流建模实施系统的示例性结构图。FIG. 1 is an exemplary structural diagram of a general workflow modeling implementation system in an embodiment of the present invention.
图2A为本发明一个例子中的封装的模型训练器节点的示意图。FIG. 2A is a schematic diagram of an encapsulated model trainer node in an example of the present invention.
图2B为本发明一个例子中的人机交互界面的示意图。FIG. 2B is a schematic diagram of a human-computer interaction interface in an example of the present invention.
图2C为本发明一个例子中的行为树存储格式的示意图。FIG. 2C is a schematic diagram of a behavior tree storage format in an example of the present invention.
图2D为本发明一个例子中人工智能应用中的行为树示意图。FIG. 2D is a schematic diagram of a behavior tree in an artificial intelligence application in an example of the present invention.
图2E为本发明一个例子中质检生产线应用中的行为树示意图。FIG. 2E is a schematic diagram of a behavior tree in an application of a quality inspection production line in an example of the present invention.
图3为本发明一个例子中行为树知识图谱的示意图。Fig. 3 is a schematic diagram of a behavior tree knowledge map in an example of the present invention.
图4A为本发明一个例子中的行为树示意图。Fig. 4A is a schematic diagram of a behavior tree in an example of the present invention.
图4B为将图4A所示行为树转换为知识图谱实例的示意图。FIG. 4B is a schematic diagram of converting the behavior tree shown in FIG. 4A into a knowledge graph example.
图5为本发明一个例子中用户构建行为树时的节点推荐示意图。FIG. 5 is a schematic diagram of node recommendation when a user builds a behavior tree in an example of the present invention.
图6为本发明实施例中一种工作流建模实施方法的示例性流程图。Fig. 6 is an exemplary flow chart of a method for implementing workflow modeling in an embodiment of the present invention.
图7为本发明实施例中又一种工作流建模实施系统的示例性流程图。Fig. 7 is an exemplary flowchart of another system for implementing workflow modeling in an embodiment of the present invention.
其中,附图标记如下:Wherein, the reference signs are as follows:
标号label 含义meaning
110110 接口库 interface library
120120 图形化界面模块 Graphical Interface Module
130130 编辑引擎模块 Edit Engine Module
140140 行为树引擎执行模块Behavior tree engine execution module
141141 行为树引擎模块Behavior Tree Engine Module
142142 执行器模块 actuator module
150150 知识图谱模块 Knowledge graph module
160160 节点服务模块 Node service module
601~604601~604 步骤 step
7171 存储器 memory
7272 处理器 processor
7373 显示器 monitor
7474 总线bus
具体实施方式Detailed ways
本发明实施例中,为了提高工作流开发的效率、灵活性和可扩展性,考虑提供一种能够面向不同工业领域如自动化系统、人工智能、机器人等可采用一个统一的行为操作来构建对应工作流的通用的工作流建模平台,该通用的工作流建模平台采用行为树图来表示每个工作流。具体地,可将面向不同工业领域的工作流中的通用操作封装为通用的节点,将工作流中的非通用性操作封装为面向具体领域的专有节点。这些节点具有可重用性,并可实现特定业务与工程平台的解耦。以行为树的形式来组织节点,可生成从开发到执行的直观的工作流程。此外,可采用知识图谱的形式来表示和保存各个行为树实例,并在此基础上实现节点、属性或工作流的推荐功能。进一步地,还可以将行为树实例或行为树模板作为一个节点集成到系统中,使得用户可以从中选择与其工作流任务相对应的行为树,而不是从头开始创建工作流。In the embodiment of the present invention, in order to improve the efficiency, flexibility and scalability of workflow development, it is considered to provide a unified behavioral operation for different industrial fields such as automation systems, artificial intelligence, robots, etc. to construct corresponding tasks. A common workflow modeling platform for streams, which uses a behavior tree diagram to represent each workflow. Specifically, general operations in workflows oriented to different industrial fields can be packaged as general nodes, and non-general operations in workflows can be packaged as dedicated nodes oriented to specific fields. These nodes are reusable and can realize the decoupling of specific business and engineering platforms. Organizing nodes in the form of behavior trees allows for an intuitive workflow from development to execution. In addition, each behavior tree instance can be represented and saved in the form of a knowledge graph, and on this basis, the recommendation function of nodes, attributes or workflows can be realized. Furthermore, a behavior tree instance or a behavior tree template can also be integrated into the system as a node, so that users can select a behavior tree corresponding to their workflow tasks instead of creating a workflow from scratch.
为使本发明的目的、技术方案和优点更加清楚,以下举实施例对本发明进一步详细说明。In order to make the purpose, technical solution and advantages of the present invention clearer, the following examples are given to further describe the present invention in detail.
图1为本发明实施例中一种通用的工作流建模实施系统的示例性结构图。如图1中的实线部分所示,该系统可包括:节点库110、图形化界面模块120、编辑引擎模块130和行为树引擎执行模块140。此外,如图1中的虚线部分所示,在另一个实施例中,该系统可 进一步包括:知识图谱模块150。FIG. 1 is an exemplary structural diagram of a general workflow modeling implementation system in an embodiment of the present invention. As shown by the solid line in FIG. 1 , the system may include: a node library 110 , a graphical interface module 120 , an editing engine module 130 and a behavior tree engine execution module 140 . In addition, as shown by the dotted line in Figure 1, in another embodiment, the system may further include: a knowledge graph module 150.
其中,节点库110中设置有用于构建各种行为树的节点,所述节点包括根节点、逻辑控制节点和动作节点;其中,一个行为树用于表征一个工作流,逻辑控制节点用于实现工作流中的逻辑控制,动作节点用于实现工作流中的业务操作,且所述动作节点包括:将不同工业领域工作流中的通用性操作封装而成的通用动作节点,和将不同工业领域工作流中的非通用性操作封装而成的面向具体工业领域的专有动作节点。Among them, the node library 110 is provided with nodes for constructing various behavior trees, and the nodes include root nodes, logic control nodes and action nodes; wherein, a behavior tree is used to represent a workflow, and logic control nodes are used to implement work flow. The logic control in the flow, the action node is used to realize the business operation in the workflow, and the action node includes: the general action node that encapsulates the general operation in the workflow of different industrial fields, and the work of different industrial fields The non-universal operations in the flow are encapsulated into proprietary action nodes for specific industrial fields.
其中,根节点为行为树的开始节点,一个行为树中只有一个根节点。Among them, the root node is the start node of the behavior tree, and there is only one root node in a behavior tree.
逻辑控制节点用于实现工作流中的逻辑控制,逻辑控制节点独立于工业应用的特定业务。通过逻辑控制节点,用户可以根据自己的需求创建各种工作流。本实施例中,逻辑控制节点可包括:基础控制节点、装饰器节点和条件节点。在其他实施方式中,逻辑控制节点也可只包括基础控制节点、装饰器节点和条件节点中的一部分。例如,只包括基础控制节点和条件节点,或者仅包括基础控制节点和装饰器节点等,或者虽然三种类型的节点都包括,但有些类型仅包括其中的一部分节点。具体可根据实际需要确定,此处不对其进行限制。The logic control node is used to realize the logic control in the workflow, and the logic control node is independent of the specific business of the industrial application. Through logical control nodes, users can create various workflows according to their needs. In this embodiment, the logical control nodes may include: basic control nodes, decorator nodes and conditional nodes. In other implementation manners, the logic control nodes may only include some of the basic control nodes, decorator nodes and condition nodes. For example, only base control nodes and condition nodes are included, or only base control nodes and decorator nodes are included, or although all three types of nodes are included, some types include only a part of them. Specifically, it may be determined according to actual needs, and is not limited here.
下面对上述各节点进行简单描述。The above-mentioned nodes are briefly described below.
一、基础控制节点:其定义如何在行为树中执行分支,用于实现所述工作流中的分支逻辑控制,如顺序、并行、选择器等。每个基础控制节点可以有一到多个子节点。基础控制节点主要包括:1. Basic control node: it defines how to execute branches in the behavior tree, and is used to implement branch logic control in the workflow, such as sequence, parallelism, selector, etc. Each base control node can have one or more child nodes. Basic control nodes mainly include:
1)顺序节点,该节点会从左边依次触发路由到各个子节点,直到找到一个返回失败或运行的子节点,并将该失败或运行返回给其父节点;当且仅当该节点的所以子节点均返回成功时,该节点才向父节点返回成功。1) Sequential node, which will trigger routing from the left to each child node in turn, until it finds a child node that returns failure or operation, and returns the failure or operation to its parent node; if and only if all child nodes of the node When all nodes return success, the node returns success to the parent node.
2)选择节点,该节点会从左边依次触发路由到各个子节点,直到找到返回成功或运动的子节点,然后将该成功或运行返回到至其父节点。只有当该节点的所有子节点都返回失败时,该节点才会返回失败。2) Select a node, and the node will trigger routing to each child node from the left until a child node that returns success or movement is found, and then the success or operation is returned to its parent node. A node returns failure only if all of the node's children return failure.
3)并行节点,该节点会从左边触发路由到其所有子节点,如果M个子节点返回成功,则返回成功;如果N-M+1个子节点返回失败,则返回失败,否则返回运行。其中N是子节点数,M<=N是用户定义的阈值。3) Parallel node, which will trigger routing from the left to all its child nodes. If M child nodes return success, return success; if N-M+1 child nodes return failure, return failure, otherwise return to run. where N is the number of child nodes and M<=N is a user-defined threshold.
二、装饰器节点:其决定是否可以执行行为树中的分支甚至单个节点,用于控制工作流的打断和跳转控制。每个装饰器节点只能有一个子节点。装饰器节点主要包括:2. Decorator node: It determines whether a branch or even a single node in the behavior tree can be executed, and is used to control workflow interruption and jump control. Each decorator node can only have one child node. Decorator nodes mainly include:
1)取反(Inverter)节点,用于对子节点取反。触发子节点一次,若子节点失败,则返回成功;若子节点成功则返回失败。如果子节点返回运行,该节点也返回运行。1) Inverter (Inverter) node is used to invert child nodes. Trigger the child node once, if the child node fails, it returns success; if the child node succeeds, it returns failure. If the child node returns running, the node also returns running.
2)强制成功(Force Success)节点,如果子节点返回运行,该节点也返回运行;否则,该节点将始终返回成功。2) Force Success (Force Success) node, if the child node returns running, the node also returns running; otherwise, the node will always return success.
3)强制失败(Force Failure)节点,如果子节点返回运行,该节点也返回运行;否则,该节点将始终返回失败。3) Force Failure (Force Failure) node, if the child node returns to run, the node also returns to run; otherwise, the node will always return to fail.
4)重复(Repeat)节点,可触发其子节点最多N次,只要子节点返回成功,就将N作为输入端口传递;如果子节点返回失败,则中断循环,并且也返回失败。4) A Repeat node can trigger its child nodes up to N times. As long as the child node returns success, N will be passed as the input port; if the child node returns failure, the cycle will be interrupted and failure will also be returned.
5)重试(Retry)节点,可触发其子节点最多N次,只要子节点返回失败,就将N作为输入端口传递;如果子节点返回成功,则中断循环,并且也返回成功。5) The Retry node can trigger its child nodes up to N times. As long as the child node returns failure, N will be passed as the input port; if the child node returns success, the loop will be interrupted and success will also be returned.
执行节点是行为树的叶子,没有子节点。其分为两类:Execution nodes are the leaves of the behavior tree and have no children. It falls into two categories:
三、条件节点,用于执行条件判断,返回判断结果。其根据条件是否成立返回成功或失败。条件节点从不返回运行状态。3. Condition node, used to execute conditional judgment and return the judgment result. It returns success or failure depending on whether the condition is true. Conditional nodes never return a running state.
条件节点和下面要介绍的动作节点均为行为树的叶子,没有子节点。二者也可合称为执行节点。The condition node and the action node described below are the leaves of the behavior tree and have no child nodes. The two can also be collectively referred to as an execution node.
动作节点,用于执行命令,实现工作流中的具体业务操作,动作节点没有输出连接。如果操作正确完成,则返回成功;如果操作失败,则返回失败。当操作正在进行时,则返回运行。Action nodes are used to execute commands and implement specific business operations in the workflow. Action nodes have no output connections. Returns success if the operation completed correctly, or failure if the operation failed. Returns running while the operation is in progress.
这些动作节点中包括:将各工业领域的相关业务操作封装而成的可重用的独立的动作节点。其中,将不同工业领域工作流中的通用性操作封装而成的节点为通用动作节点,和将不同工业领域工作流中的非通用性操作封装而成的面向具体工业领域的节点为专有动作节点。通过动作节点,封装后的工作可以在不同的工作流中重用。These action nodes include: reusable independent action nodes that encapsulate relevant business operations in various industrial fields. Among them, nodes that encapsulate general operations in workflows in different industrial fields are general action nodes, and nodes that encapsulate non-general operations in workflows in different industrial fields for specific industrial fields are proprietary actions node. Through action nodes, encapsulated work can be reused in different workflows.
下面列出了一些示例性的通用动作节点:Some example generic action nodes are listed below:
(1)数据收集类节点,其可包括:(1) Data collection nodes, which may include:
文件读取器:用于从CSV、TDMS等格式的文件中读取数据。File Reader: Used to read data from files in CSV, TDMS, etc. formats.
数据库连接器:支持与MS SQL、MongoDB等常用数据库的连接。Database connector: supports connection with common databases such as MS SQL and MongoDB.
OPC-UA客户端:用于从自动化领域常用的OPC-UA服务器获取数据。OPC-UA client: used to obtain data from OPC-UA servers commonly used in the field of automation.
(2)数据处理类节点,其可包括:(2) Data processing nodes, which may include:
数据清理器:用于对源数据进行格式化,删除异常数据以及重复数据等。Data Cleaner: Used to format source data, delete abnormal data and duplicate data, etc.
数据转换器:用于将源数据从源格式转换为目标格式。Data Converter: Used to convert source data from source format to target format.
数据增强器:用于对数据进行空间变换,颜色变换等处理以扩充数据集。Data enhancer: used to perform spatial transformation, color transformation and other processing on the data to expand the data set.
上述节点为不同工业领域均可能涉及到的通用动作节点。当然,在其他实施方式中,还有更多的通用动作节点,此处不对其进行一一列举。此外,还有一些面向特定工业领域的专有动作节点,这些专有动作节点可作为动作节点中面向特定工业领域的扩展节点。下面简单列举两类:The above nodes are general action nodes that may be involved in different industrial fields. Of course, in other implementation manners, there are more general action nodes, which are not listed here. In addition, there are some proprietary action nodes for specific industrial fields, and these proprietary action nodes can be used as extension nodes for specific industrial fields in the action nodes. Here are two simple categories:
(1)面向人工智能(AI)的模型管理类节点,其可包括:(1) Model management nodes for artificial intelligence (AI), which may include:
模型导入器:该节点用于从模型存储区如模型库或本地PC机导入经过训练的模型。Model Importer: This node is used to import a trained model from a model storage area such as a model library or a local PC.
模型训练器:用于对导入的训练模型进行新数据源或训练参数的再训练。图2A中示出了一个封装了模型训练操作的模型训练器节点的示意图。如图2A所示,该节点属于动作节点中的模型训练器节点,采用的协议为RESTful API,AI模型的URL为:https://IP.port/api/v1/train,输入为:训练数据集的打包文件,输出为:训练好的模型文件。Model Trainer: Used to retrain the imported training model with new data sources or training parameters. Figure 2A shows a schematic diagram of a model trainer node that encapsulates model training operations. As shown in Figure 2A, this node belongs to the model trainer node in the action node, the protocol adopted is RESTful API, the URL of the AI model is: https://IP.port/api/v1/train, and the input is: training data The package file of the set, the output is: the trained model file.
模型转换器:用于将训练好的模型从源格式转换为目标格式。例如,从Tensorflow frozen pb(.pb)到ONNX(.ONNX)。Model Converter: Used to convert a trained model from a source format to a target format. For example, from Tensorflow frozen pb(.pb) to ONNX(.ONNX).
模型适配器:用于基于自动机器学习根据当前确定的AI应用类型实现自动化的特征提取、模型选择和参数优化等模型适配过程,即实现从模型库中自动选取合适的AI模型。Model Adapter: It is used to realize automatic feature extraction, model selection, parameter optimization and other model adaptation processes based on automatic machine learning according to the currently determined AI application type, that is, to automatically select the appropriate AI model from the model library.
应用程序部署器:用于将AI模型及其周边程序打包为AI应用,然后将其部署到指定的设备。Application Deployer: Used to package the AI model and its peripheral programs into AI applications, and then deploy them to specified devices.
具体实现时,可将所有AI框架(如TensorFlow、Scikit-learn、ONNX、Kubeflow和AutoML)封装为行为树中的AI动作节点。In specific implementation, all AI frameworks (such as TensorFlow, Scikit-learn, ONNX, Kubeflow, and AutoML) can be encapsulated as AI action nodes in the behavior tree.
……...
(2)面向工业自动化的生产线质检类节点,其可包括:(2) Production line quality inspection nodes for industrial automation, which may include:
传送带控制器:用于控制传送带的启停。Conveyor belt controller: used to control the start and stop of the conveyor belt.
相机控制器:用于控制相机的拍照操作。Camera controller: used to control the camera's camera operation.
机器人拾取:用于从当前生产线上拾取对应的产品。Robot picking: used to pick up the corresponding products from the current production line.
质量检验器:用于对机器人拾取的产品进行质检,将合格产品放置在第一位置,将不合格产品放置在第二位置。Quality inspector: It is used for quality inspection of the products picked up by the robot, placing qualified products in the first position, and placing unqualified products in the second position.
机器人拾取:用于将质检后的产品放至对应的位置。Robot pick-up: used to put the products after quality inspection to the corresponding position.
运动控制器:用于对生产线上的产品进行定位。Motion controller: used to position products on the production line.
……...
此外,还可以有更多的面向其他工业领域的专有动作节点。此处不再一一列举。其中, 面向不同工业领域的节点可作为动作节点的扩展节点进行存储,并且用户也可以对节点进行扩展,并将其保持至节点库中。In addition, there can be more proprietary action nodes for other industrial fields. They are not listed here. Among them, nodes oriented to different industrial fields can be stored as extended nodes of action nodes, and users can also expand nodes and keep them in the node library.
本实施例中,每个动作节点可由接口部分和实现部分组成。对于实现部分,每个动作节点将是一个应用程序(例如,容器化应用程序),其中包含功能代码和运行依赖项。该应用程序可独立运行,并通过特定的网络通信接口,如RESTful API和RPC对外公开。对于接口部分,每个动作节点都是一个图形元素,可以在人机交互界面中进行拖放,且每个动作节点都有一个属性面板,用于配置动作节点的属性,例如输入和输出。In this embodiment, each action node may consist of an interface part and an implementation part. For the implementation part, each action node will be an application (e.g., a containerized application) that contains functional code and runtime dependencies. The application can run independently and be exposed through specific network communication interfaces, such as RESTful API and RPC. For the interface part, each action node is a graphic element that can be dragged and dropped in the human-computer interaction interface, and each action node has a property panel for configuring the properties of the action node, such as input and output.
每个动作节点都可以单独配置和执行。在执行动作节点时,用户在动作节点接口部分配置的输入将被读取并转换到相应的应用程序。在完成特定的操作如模型转换后,操作结果如转换后的模型将转换回动作节点接口部分的输出。Each action node can be configured and executed individually. When the action node is executed, the input configured by the user in the interface part of the action node will be read and converted to the corresponding application. After completing a specific operation such as model conversion, the operation result such as the converted model will be converted back to the output of the interface part of the action node.
本实施例中,每个运动节点的接口部分和实现部分可单独存储。例如,接口库110中可只存储动作节点的接口部分,动作节点的实现部分可存储在一节点服务模块160中,该节点服务模块160可位于一服务器中或者也可以位于本地。In this embodiment, the interface part and implementation part of each motion node can be stored separately. For example, the interface library 110 may only store the interface part of the action node, and the implementation part of the action node may be stored in a node service module 160, and the node service module 160 may be located in a server or locally.
综上,节点的状态主要包括:成功、失败和运行。In summary, the status of the node mainly includes: success, failure and operation.
进一步地,本实施例中,为了提高用户建模的效率,还可允许用户将已经创建的行为树作为一个行为树实例存储为一个子行为树节点,方便该用户或其他用户在类似应用中直接调用。Further, in this embodiment, in order to improve the efficiency of user modeling, users are also allowed to store the created behavior tree as a behavior tree instance as a sub-behavior tree node, which is convenient for the user or other users to directly transfer.
此外,为了提高用户建模的效率并允许用户进行所需要的修改及编辑,还可以为用户设置针对不同工作流类型的行为树模板,并且该行为树模板也可以作为一个节点进行存储,方便用户在建模时直接调用并进行必要的参数配置以及节点调整便可生成所需的行为树。此外,还可以将用户已经创建的行为树存储为一个行为树模板节点,该行为树模板节点与前述的子行为树节点的区别在于,行为树模板只存储行为树中的节点及节点间的逻辑所构成的行为树框架,不存储具体的配置数据;而子行为树节点则不仅存储行为树中的节点及节点间的逻辑,还存储各节点的配置数据。In addition, in order to improve the efficiency of user modeling and allow users to modify and edit as needed, behavior tree templates for different workflow types can also be set for users, and the behavior tree templates can also be stored as a node, which is convenient for users It can generate the desired behavior tree by directly invoking and making necessary parameter configurations and node adjustments during modeling. In addition, the behavior tree created by the user can also be stored as a behavior tree template node. The difference between this behavior tree template node and the aforementioned sub-behavior tree nodes is that the behavior tree template only stores the nodes in the behavior tree and the logic between nodes The behavior tree frame formed does not store specific configuration data; while the sub-behavior tree nodes not only store the nodes in the behavior tree and the logic between nodes, but also store the configuration data of each node.
图形化界面模块120用于提供用户基于所述节点存储模块中的节点进行行为树构建和配置的图形化人机交互界面。在一实施方式中,可包括节点库呈现界面、行为树编辑界面、节点配置界面、变量配置界面、数据黑板界面、以及运行监控界面等。The graphical interface module 120 is used to provide a graphical human-computer interaction interface for users to construct and configure behavior trees based on the nodes in the node storage module. In one embodiment, it may include a node library presentation interface, a behavior tree editing interface, a node configuration interface, a variable configuration interface, a data blackboard interface, and an operation monitoring interface.
其中,节点库呈现界面用于呈现节点库110中存储的节点给用户供用户选择。例如,图2B中左侧示出了一个例子中节点库呈现界面的示意图。Wherein, the node library presentation interface is used for presenting the nodes stored in the node library 110 to the user for selection by the user. For example, the left side of FIG. 2B shows a schematic diagram of a node library presentation interface in an example.
行为树编辑界面是用于提供用户进行行为树构建操作的界面。其中,行为树构建操 作可包括节点的拖拽操作、节点间的关联操作等。例如,图2B的中间示出了一个例子中行为树编辑界面的示意图。The behavior tree editing interface is an interface for providing users with behavior tree construction operations. Among them, the behavior tree construction operation may include the drag operation of nodes, the association operation between nodes, etc. For example, the middle of FIG. 2B shows a schematic diagram of the behavior tree editing interface in an example.
节点配置界面可在用户点击需要进行属性配置的节点时显示所述节点的属性,包括输入参数、输出参数等,用户还可以设置节点的输入参数和输出参数。其中,输入参数和输出参数除了可以配置相应的值之外,还可以将其与其他节点之间进行输入输出的关联。例如,节点3的输入值来自于节点1的输出值。The node configuration interface can display the properties of the node when the user clicks on the node to be configured, including input parameters, output parameters, etc. The user can also set the input parameters and output parameters of the node. Among them, in addition to configuring corresponding values for input parameters and output parameters, they can also be associated with other nodes for input and output. For example, the input value of node 3 comes from the output value of node 1.
变量配置界面用于在需要配置全局变量时,提供用户对全局变量进行配置操作。The variable configuration interface is used to provide users with configuration operations on global variables when global variables need to be configured.
数据黑板界面用于呈现所记录的节点实例列表,节点实例列表以列表的形式或树状的形式呈现行为树中的各个节点。用户可以通过黑板界面修改节点的属性,并且可在行为树运行时监视所有节点实例的状态。例如,图2B中右侧示出了一个例子中数据黑板界面的示意图。The data blackboard interface is used to present the recorded node instance list, and the node instance list presents each node in the behavior tree in the form of a list or a tree. Users can modify the properties of nodes through the blackboard interface, and monitor the status of all node instances when the behavior tree is running. For example, the right side of FIG. 2B shows a schematic diagram of the data blackboard interface in an example.
运行监控界面用于供用户设置监控所需的节点或自定义数据,并呈现行为树在调试或运行过程中的中间结果数据或最终结果数据。The running monitoring interface is used for users to set the nodes or custom data required for monitoring, and present the intermediate or final result data of the behavior tree during debugging or running.
编辑引擎模块130用于响应用户基于所述图形化人机交互界面进行的行为树创建操作,并生成对应当前工作流的当前行为树,将所述当前行为树保持为可扩展标记语言(XML,Extensible Markup Language)文件。The editing engine module 130 is used to respond to the behavior tree creation operation performed by the user based on the graphical human-computer interaction interface, and generate a current behavior tree corresponding to the current workflow, and keep the current behavior tree as an Extensible Markup Language (XML, Extensible Markup Language) file.
本实施例中,编辑引擎模块130用于响应用户基于所述图形化人机交互界面进行的节点拖放操作在行为树中添加节点;响应用户的节点删除操作从行为树中删除节点;响应用户的节点属性配置操作,将配置参数存储在配置文件中;响应用户的保存或加载或退出行为树操作将行为树进行保存或加载或退出。其中,加载行为树时,若存在对应的系统配置文件,则同时加载该系统配置文件对相应的节点进行初始化。In this embodiment, the editing engine module 130 is used to respond to the node drag and drop operation performed by the user based on the graphical human-computer interaction interface to add a node in the behavior tree; to respond to the user's node deletion operation to delete the node from the behavior tree; to respond to the user The node attribute configuration operation stores the configuration parameters in the configuration file; saves, loads or exits the behavior tree in response to the user's save or load or exit behavior tree operation. Wherein, when loading the behavior tree, if there is a corresponding system configuration file, the system configuration file is loaded at the same time to initialize the corresponding nodes.
本实施例中,可定义采用XML文件格式来保存当前行为树。如在一个例子中,针对图2C所示的行为树,可将其存储为如下所示的格式文件:In this embodiment, an XML file format can be defined to save the current behavior tree. As an example, for the behavior tree shown in Figure 2C, it can be stored as a format file as shown below:
Figure PCTCN2021109876-appb-000001
Figure PCTCN2021109876-appb-000001
Figure PCTCN2021109876-appb-000002
Figure PCTCN2021109876-appb-000002
此外,编辑引擎模块130还用于响应用户将当前行为树(通常为调试或运行成功的行为树)保持为子行为树节点和/或行为树模板的操作,将所述当前行为树存储为子行为树节点和/或行为树模板。相应地,编辑引擎模块130还用于响应用户加载子行为树节点和/或行为树模板的操作,将所述子行为树节点和/或行为树模板加载到图形化界面模块120的行为树编辑界面上呈现给用户。In addition, the editing engine module 130 is also used to store the current behavior tree as a child behavior tree node and/or behavior tree template in response to the user's operation of keeping the current behavior tree (usually a behavior tree that has been debugged or successfully run) as a child behavior tree node and/or a behavior tree template. Behavior tree nodes and/or behavior tree templates. Correspondingly, the editing engine module 130 is also configured to load the sub-behavior tree nodes and/or behavior tree templates into the behavior tree editor of the graphical interface module 120 in response to the user's operation of loading the sub-behavior tree nodes and/or behavior tree templates. presented to the user on the interface.
图2D示出了一个例子中人工智能应用中的行为树示意图。如图2D所示,该行为树中包括顺序执行的如下动作节点:模型训练器(图2D中简称训练)和应用程序部署器(图2D中简称部署)。在其他实施方式中,还可以包括顺序执行的如下动作节点:模型训练器、模型转换器和应用程序部署。或者包括:顺序执行的如下动作节点:模型导入器、模型训练器和应用程序部署器,或者包括顺序执行的如下动作节点:模型导入器、模型训练器、模型转换器和应用程序部署器;或者包括顺序执行的如下动作节点:模型适配器、模型训练器和应用程序部署器。此外,还可进一步包括:数据收集器和数据预处理器。具体可根据实际需要确定,此处不对其进行限制。Fig. 2D shows a schematic diagram of a behavior tree in an artificial intelligence application in an example. As shown in FIG. 2D , the behavior tree includes the following action nodes executed sequentially: model trainer (referred to as training in FIG. 2D ) and application deployer (referred to as deployment in FIG. 2D ). In other implementation manners, the following action nodes executed sequentially may also be included: model trainer, model converter, and application deployment. Or include: the following action nodes executed sequentially: model importer, model trainer, and application deployer, or include the following action nodes executed sequentially: model importer, model trainer, model converter, and application deployer; or Contains the following action nodes executed sequentially: Model Adapter, Model Trainer, and Application Deployer. In addition, it may further include: a data collector and a data preprocessor. Specifically, it may be determined according to actual needs, and is not limited here.
图2E中示出了一个例子中质检生产线应用中的行为树示意图。FIG. 2E shows a schematic diagram of a behavior tree in an example of a quality inspection production line application.
行为树引擎执行模块140用于根据用户的运行或调试指令,通过访问所述XML文件运行所述当前行为树,并实现所述当前行为树对应的当前工作流。The behavior tree engine execution module 140 is configured to run the current behavior tree by accessing the XML file according to the user's running or debugging instruction, and realize the current workflow corresponding to the current behavior tree.
本实施例中,行为树引擎执行模块140可从行为树的根节点开始运行,该根节点可生成允许以给定频率触发节点的信号,该信号被发送至其子节点。每个节点只有在接收到所述触发信号时才执行。如果正在执行,则子节点立即返回运行给父节点;如果实现了目标,则返回成功;否则返回失败。其具有以下全部或部分功能:In this embodiment, the behavior tree engine execution module 140 can start to run from the root node of the behavior tree, and the root node can generate a signal allowing the node to be triggered at a given frequency, and the signal is sent to its child nodes. Each node executes only when said trigger signal is received. If it is executing, the child node immediately returns to run to the parent node; if the goal is achieved, it returns success; otherwise, it returns failure. It has all or some of the following functions:
1)运行:运行行为树,如果节点返回期望值,则行为树结果为成功,否则为失败。1) Run: run the behavior tree, if the node returns the expected value, the result of the behavior tree is success, otherwise it is failure.
2)调试:调试功能与运行功能类似,主要用于在正式执行工作量之前调试复杂任务。为了方便对调试过程进行监控,可在需要监控的动作节点的属性中设置断点。设置断点后,在调试行为树时,会在该动作节点处暂停两次,一次是在执行动作节点前供用户检查输入值,另一次是在执行完该动作节点后供用户检查输出值。2) Debugging: The debugging function is similar to the running function, and is mainly used to debug complex tasks before officially executing the workload. In order to monitor the debugging process conveniently, you can set breakpoints in the properties of the action nodes that need to be monitored. After setting the breakpoint, when debugging the behavior tree, it will pause at the action node twice, one is for the user to check the input value before executing the action node, and the other is for the user to check the output value after the action node is executed.
3)监控:在运行或调试行为树时,用户可以添加一些节点或自定义数据到运行监控界面进行监控。例如,当一个机器人正在运行时,可以添加一个自定义的数据,如“关节位置” 来监视当前的机器人关节位置。3) Monitoring: When running or debugging a behavior tree, users can add some nodes or custom data to the running monitoring interface for monitoring. For example, when a robot is running, you can add a custom data such as "joint position" to monitor the current robot joint position.
4)错误处理:节点可具有错误属性,包括错误ID和错误消息,可以在节点执行失败时,通过节点的错误属性获取详细的错误信息。4) Error handling: Nodes can have error attributes, including error IDs and error messages. When a node fails to execute, detailed error information can be obtained through the node's error attributes.
5)系统日志记录:本实施例中可支持系统日志机制。可以记录重要的信息,对分析一些复杂的问题非常有用。5) System log record: In this embodiment, a system log mechanism may be supported. Important information can be recorded, which is very useful for analyzing some complex problems.
在一个实施方式中,行为树引擎执行模块140可包括:行为树引擎模块141和执行器模块142。其中,行为树引擎模块141用于运行所述行为树,并在运行到动作节点时,将所述动作节点的接口部分打包提供给所述执行器模块142,由所述执行器模块142对其进行解析并封装为对应的执行请求发送给设置有所述动作节点的实现部分的节点服务模块160,并接收所述节点服务模块160执行所述动作节点的实现部分后返回的执行结果,将所述执行结果反馈给所述行为树引擎模块141,由所述行为树引擎模块141通过图形化界面模块120的运行监控界面呈现给用户。In one embodiment, the behavior tree engine execution module 140 may include: a behavior tree engine module 141 and an executor module 142 . Wherein, the behavior tree engine module 141 is used to run the behavior tree, and when it runs to an action node, it provides the interface part of the action node as a package to the executor module 142, and the executor module 142 executes it Parsing and packaging as a corresponding execution request is sent to the node service module 160 provided with the implementation part of the action node, and receiving the execution result returned by the node service module 160 after executing the implementation part of the action node, and converting the The execution result is fed back to the behavior tree engine module 141, and the behavior tree engine module 141 presents it to the user through the operation monitoring interface of the graphical interface module 120.
执行器模块142可以为支持不同协议的执行器,例如,RESTful API执行器、SDK执行器、GRPC执行器或ROS执行器等。The executor module 142 may be an executor supporting different protocols, for example, a RESTful API executor, an SDK executor, a GRPC executor, or a ROS executor.
知识图谱模块150用于将构建行为树的所有节点基于知识图谱的语法构建成一行为树知识图谱进行存储;所述行为树知识图谱包括:分别表示构建行为树的各个节点的节点,以及表示节点之间关系或节点属性的多条边。知识图谱模块150还用于在用户构建所述当前行为树时,基于所述行为树知识图谱为所述用户进行控制节点和/或动作节点的推荐、错误检查以及节点属性的智能映射。The knowledge map module 150 is used to construct all nodes of the behavior tree based on the grammar of the knowledge map into a behavior tree knowledge map for storage; the behavior tree knowledge map includes: nodes representing each node of the construction behavior tree, and nodes representing nodes multiple edges between relationships or node attributes. The knowledge graph module 150 is also used for recommending control nodes and/or action nodes, error checking, and intelligent mapping of node attributes for the user based on the behavior tree knowledge graph when the user constructs the current behavior tree.
具体实现时,知识图谱模块150可包括四个子模块:数据采集子模块、知识融合子模块、知识处理子模块和知识图数据库。During specific implementation, the knowledge graph module 150 may include four sub-modules: a data acquisition sub-module, a knowledge fusion sub-module, a knowledge processing sub-module, and a knowledge graph database.
其中,数据采集子模块支持结构化数据,可从节点库110中获取构建行为树的所有节点。此外,还可以在用户构建完成每个行为树时,收集所述行为树中的节点组成及关联关系。Among them, the data collection sub-module supports structured data, and can obtain all nodes for constructing a behavior tree from the node library 110 . In addition, when the user finishes constructing each behavior tree, the node composition and association relationship in the behavior tree can also be collected.
知识融合子模块用于进行共指消解和实体消歧处理。其中,共指消解用于解决多个引用对应同一实体对象的问题。通过使用共同引用解析技术,这些引用项可以关联(合并)到正确的实体对象。例如,针对不同行为树包括同一节点的情况,可通过知识融合技术将该节点关联到正确的节点上。实体消歧是解决同名实体歧义问题的一种特殊技术。通过实体消歧,可以根据当前上下文准确地建立实体链接。The knowledge fusion sub-module is used for coreference resolution and entity disambiguation processing. Among them, coreference resolution is used to solve the problem that multiple references correspond to the same entity object. By using common reference resolution techniques, these referenced items can be associated (merged) to the correct entity object. For example, for the situation that different behavior trees include the same node, the node can be associated with the correct node through the knowledge fusion technology. Entity disambiguation is a special technique to solve the problem of ambiguity of entities with the same name. Through entity disambiguation, entity links can be accurately established according to the current context.
知识处理子模块用于实现知识推理、质量评价和本体抽取。其中,知识推理是从知 识图谱数据库中已有的实体关系数据出发,通过计算机推理,在实体之间建立新的关联,从而扩展和丰富知识网络。质量评价是知识图谱数据库构建技术的重要组成部分。该部分的意义在于通过对低置信度知识的舍弃,量化知识的可信性,保证知识图谱数据库的质量。本体抽取是知识处理中的一个重要部分,用来表示知识本身与知识之间的关系,而这个模型需要不断更新模型中的知识。Knowledge processing sub-module is used to realize knowledge reasoning, quality evaluation and ontology extraction. Among them, knowledge reasoning starts from the existing entity relationship data in the knowledge graph database, and establishes new associations between entities through computer reasoning, thereby expanding and enriching the knowledge network. Quality evaluation is an important part of knowledge graph database construction technology. The significance of this part is to quantify the credibility of knowledge and ensure the quality of knowledge graph database by discarding low confidence knowledge. Ontology extraction is an important part of knowledge processing, which is used to represent the relationship between knowledge itself and knowledge, and this model needs to continuously update the knowledge in the model.
知识图谱数据库用于保存和构建行为树知识图谱并供进一步使用。The knowledge graph database is used to save and construct the behavior tree knowledge graph for further use.
本实施例中的知识图谱语法可如下所示:The knowledge map grammar in this embodiment can be as follows:
1)定义主要类,表1中示出了一个例子中所定义的类。1) Define main classes, Table 1 shows the classes defined in an example.
Figure PCTCN2021109876-appb-000003
Figure PCTCN2021109876-appb-000003
表1Table 1
2)定义数据属性,表2中示出了一个例子中所定义的数据属性。2) Define data attributes. Table 2 shows the data attributes defined in an example.
数据属性data attribute
输入enter
输出output
取反Negate
强制成功force success
强制失败force failure
重复repeat
重试Retry
表2Table 2
3)定义对象属性。3) Define the object properties.
顺序:(A,顺序,B),表示只有在类A成功执行之后才执行类B。Sequence: (A, sequence, B), which means that class B is executed only after class A is successfully executed.
选择:(A,选择,B),表示选择要执行的A或B。例如,(数据收集A,选择,数据收集B),其中,数据收集A是从摄像头采集数据,数据收集B是从互联网采集数据,此时只需要根据用户的需求选择一个。Choice: (A, choice, B), means to choose A or B to be executed. For example, (data collection A, selection, data collection B), wherein, data collection A is to collect data from the camera, and data collection B is to collect data from the Internet. At this time, only one needs to be selected according to the needs of the user.
并行:(A,并行,B),表示A和B同时执行,不相互依赖。Parallel: (A, parallel, B), means that A and B are executed at the same time and do not depend on each other.
表3中示出了一个例子中所定义的对象属性。Table 3 shows an example of the object properties defined.
Figure PCTCN2021109876-appb-000004
Figure PCTCN2021109876-appb-000004
Figure PCTCN2021109876-appb-000005
Figure PCTCN2021109876-appb-000005
表3table 3
在定义了类、数据属性和对象属性之后,可以构建一如图3中所示的行为树知识图谱。After defining classes, data attributes, and object attributes, a behavior tree knowledge graph as shown in Figure 3 can be constructed.
本实施例中可进一步将用户构建的行为树基于知识图谱的语法构建成知识图谱实例进行存储,以便在用户构建所述当前行为树时,基于所述行为树知识图谱以及历史的知识图谱实例为所述用户进行逻辑控制节点和/或动作节点的推荐、错误检查以及节点属性的智能映射。In this embodiment, the behavior tree constructed by the user can be further constructed into a knowledge graph instance based on the grammar of the knowledge graph for storage, so that when the user constructs the current behavior tree, the knowledge graph instance based on the behavior tree knowledge graph and history is The user performs recommendation of logical control nodes and/or action nodes, error checking, and intelligent mapping of node attributes.
图4A为本发明一个例子中的行为树示意图。图4B为将图4A所示行为树转换为知识图谱实例的示意图。Fig. 4A is a schematic diagram of a behavior tree in an example of the present invention. FIG. 4B is a schematic diagram of converting the behavior tree shown in FIG. 4A into a knowledge graph example.
如图5所示,示出了本发明一个例子中用户构建行为树时的节点推荐示意图。如图5的灰色虚线框内所示,在为顺序节点创建动作节点时,系统推荐了动作5、动作6和动作7等,并分别给出了匹配度75%、50%、20%等,以方便用户进行选择。As shown in FIG. 5 , it shows a schematic diagram of node recommendation when a user constructs a behavior tree in an example of the present invention. As shown in the gray dashed box in Figure 5, when creating an action node for a sequence node, the system recommends Action 5, Action 6, and Action 7, etc., and gives matching degrees of 75%, 50%, and 20%, respectively. To facilitate the user to choose.
以上对本发明实施例中通用的工作流建模实施系统进行了详细描述,下面再对本发明实施例中通用的工作流建模实施方法进行详细描述。本发明实施例中的工作流建模实施方法可在实施本发明实施例中的工作流建模实施系统上实施,对于本发明方法实施例中未详细披露的细节可参见本发明系统实施例中的相应描述,此处不再一一赘述。The general implementation system of workflow modeling in the embodiment of the present invention has been described in detail above, and the general implementation method of workflow modeling in the embodiment of the present invention will be described in detail below. The workflow modeling implementation method in the embodiment of the present invention can be implemented on the workflow modeling implementation system in the embodiment of the present invention. For the details not disclosed in the method embodiment of the present invention, please refer to the system embodiment of the present invention The corresponding descriptions are not repeated here.
图6为本发明实施例中一种工作流建模实施方法的示例性结构图。如图6中的实线部分所示,该方法可包括如下步骤:Fig. 6 is an exemplary structural diagram of a method for implementing workflow modeling in an embodiment of the present invention. As shown in the solid line part in Figure 6, the method may include the following steps:
步骤601,设置一如图1所示的具有图形化人机交互界面的通用工作流创建平台,该平台中设置有用于构建各种行为树的节点。所述节点可包括:根节点、逻辑控制节点和动作节点;其中,一个行为树用于表征一个工作流,逻辑控制节点用于实现工作流中的逻辑控 制,动作节点用于实现工作流中的业务操作,且所述动作节点包括:将不同工业领域工作流中的通用性操作封装而成的通用动作节点,和将不同工业领域工作流中的非通用性操作封装而成的面向具体工业领域的专有动作节点。 Step 601 , setting up a general workflow creation platform with a graphical human-computer interaction interface as shown in FIG. 1 , where nodes for building various behavior trees are set. The nodes may include: a root node, a logic control node and an action node; wherein, a behavior tree is used to represent a workflow, the logic control node is used to realize the logic control in the workflow, and the action node is used to realize the workflow in the workflow. Business operations, and the action nodes include: a general action node that encapsulates general operations in workflows in different industrial fields, and a specific industry-oriented node that encapsulates non-general operations in workflows in different industrial fields Proprietary action node for .
其中,根节点为行为树的开始节点,一个行为树中只有一个根节点。Among them, the root node is the start node of the behavior tree, and there is only one root node in a behavior tree.
逻辑控制节点用于实现工作流中的逻辑控制,逻辑控制节点独立于工业应用的特定业务。通过逻辑控制节点,用户可以根据自己的需求创建各种工作流。本实施例中,逻辑控制节点可包括:基础控制节点、装饰器节点和条件节点。在其他实施方式中,逻辑控制节点也可只包括基础控制节点、装饰器节点和条件节点中的一部分。例如,只包括基础控制节点和条件节点,或者仅包括基础控制节点和装饰器节点等,或者虽然三种类型的节点都包括,但有些类型仅包括其中的一部分节点。具体可根据实际需要确定,此处不对其进行限制。The logic control node is used to realize the logic control in the workflow, and the logic control node is independent of the specific business of the industrial application. Through logical control nodes, users can create various workflows according to their needs. In this embodiment, the logical control nodes may include: basic control nodes, decorator nodes and conditional nodes. In other implementation manners, the logic control nodes may only include some of the basic control nodes, decorator nodes and condition nodes. For example, only base control nodes and condition nodes are included, or only base control nodes and decorator nodes are included, or although all three types of nodes are included, some types include only a part of them. Specifically, it may be determined according to actual needs, and is not limited here.
本实施例中,节点的状态主要包括:成功、失败和运行。In this embodiment, the status of the node mainly includes: success, failure and running.
这些动作节点中包括:将各工业领域的相关业务操作封装而成的可重用的独立的动作节点。通过动作节点,封装后的工作可以在不同的工作流中重用。These action nodes include: reusable independent action nodes that encapsulate relevant business operations in various industrial fields. Through action nodes, encapsulated work can be reused in different workflows.
本实施例中,每个动作节点可由接口部分和实现部分组成。对于实现部分,每个动作节点将是一个应用程序,其中包含功能代码和运行依赖项。该应用程序可独立运行,并通过特定的网络通信接口,如RESTful API和远程过程调用(RPC)接口对外公开。对于接口部分,每个动作节点都是一个图形元素,可以在人机交互界面的工作流编辑器中进行拖放,且每个节点都有一个属性面板,用于配置动作节点的属性,例如输入和输出。每个动作节点都可以单独配置和执行。在执行动作节点时,用户在动作节点接口部分配置的输入将被读取并转换到相应的应用程序。在完成特定的操作如模型转换后,操作结果如转换后的模型将转换回动作节点接口部分的输出。In this embodiment, each action node may consist of an interface part and an implementation part. For the implementation part, each action node will be an application that contains functional code and runtime dependencies. The application can run independently and be exposed through specific network communication interfaces, such as RESTful API and remote procedure call (RPC) interface. For the interface part, each action node is a graphic element that can be dragged and dropped in the workflow editor of the human-computer interaction interface, and each node has a property panel for configuring the properties of the action node, such as input and output. Each action node can be configured and executed individually. When the action node is executed, the input configured by the user in the interface part of the action node will be read and converted to the corresponding application. After completing a specific operation such as model conversion, the operation result such as the converted model will be converted back to the output of the interface part of the action node.
本实施例中,每个运动节点的接口部分和实现部分可单独存储。例如,接口部分可存储在接口库中,实现部分可存储在一节点服务模块中,该节点服务模块可位于一运行时服务器或本地。此外,接口库中还用于存储逻辑控制节点。In this embodiment, the interface part and implementation part of each motion node can be stored separately. For example, the interface part can be stored in the interface library, and the implementation part can be stored in a node service module, which can be located on a runtime server or locally. In addition, the interface library is also used to store logic control nodes.
步骤602,响应用户通过所述图形化人机交互界面进行的行为树创建操作,生成对应当前工作流的当前行为树,并将所述当前行为树保持为XML文件。Step 602: Generate a current behavior tree corresponding to the current workflow in response to the behavior tree creation operation performed by the user through the graphical human-computer interaction interface, and save the current behavior tree as an XML file.
本实施例中,所述当前行为树为:用户通过添加、连接和配置根节点、所需的逻辑控制节点和所需的动作节点构建而成的行为树;或者为:用户根据所需的工作流类型从子行为树节点库中选取的子行为树节点,所述子行为树节点为已存储的历史行为树实例;用户根据所需工作流类型从行为树模板库中选取对应的行为树模板后,基于所述行为树模 板进行配置以及进行节点调整或不调整后得到的行为树,所述行为树模板为预先存储的行为树模板或根据用户的历史行为树实例转存的行为树模板。In this embodiment, the current behavior tree is: a behavior tree built by the user by adding, connecting and configuring root nodes, required logic control nodes and required action nodes; The flow type is a sub-behavior tree node selected from the sub-behavior tree node library, and the sub-behavior tree node is a stored historical behavior tree instance; the user selects the corresponding behavior tree template from the behavior tree template library according to the required workflow type Finally, configure the behavior tree based on the behavior tree template and adjust the nodes or not adjust the behavior tree, the behavior tree template is a pre-stored behavior tree template or a behavior tree template dumped according to the user's historical behavior tree instance.
其中,子行为树节点库和行为树模板库可与节点库并列,或者也可以为节点库中的一部分。Wherein, the sub-behavior tree node library and the behavior tree template library can be juxtaposed with the node library, or can also be a part of the node library.
本发明实施例中的一般执行逻辑是从左到右、从上到下的,并且具体的执行逻辑是由逻辑控制节点控制的。The general execution logic in the embodiment of the present invention is from left to right and from top to bottom, and the specific execution logic is controlled by the logic control node.
本实施例中,可进一步将所述当前行为树中添加的每个节点转换为一个节点实例添加到一节点实例列表中进行存储或查看,所述节点实例列表以列表形式或树状形式呈现所述当前行为树中的所有节点。In this embodiment, each node added in the current behavior tree can be further converted into a node instance and added to a node instance list for storage or viewing, and the node instance list presents all nodes in list form or tree form. Describes all nodes in the current behavior tree.
步骤603,根据用户的运行或调试指令,通过访问所述可XML文件运行所述当前行为树,并实现所述当前行为树对应的当前工作流。Step 603: According to the user's running or debugging instruction, access the XML file to run the current behavior tree, and implement the current workflow corresponding to the current behavior tree.
如前所示,在执行动作节点时,用户在动作节点接口部分配置的输入将被读取并转换到动作节点的实现部分。在实现部分完成特定的操作后,操作结果将转换回动作节点接口部分的输出。As shown before, when an action node is executed, the input configured by the user in the interface part of the action node will be read and converted to the implementation part of the action node. After the implementation part completes a specific operation, the result of the operation is converted back to the output of the interface part of the action node.
具体实现时,可将执行过程中的中间结果及最终结果显示出来。During specific implementation, the intermediate results and final results during the execution process can be displayed.
在一些实施方式中,对于相同的应用场景,例如将相同类型的AI模型部署到相同类型的目标设备中并实现相同的AI应用类型的情况,为了避免重复构建行为树的人力、时间等的浪费,对于用户已构建完成最好是已调试或运行成功的当前行为树作为一个行为树实例进行保存,例如将其作为一个表征行为树实例的子行为树节点保存到子行为树节点库中。当需要再次构建相同的行为树时,直接调用该行为树实例即可。In some implementations, for the same application scenario, for example, deploying the same type of AI model to the same type of target device and implementing the same type of AI application, in order to avoid the waste of manpower and time for repeatedly building behavior trees For the user, the current behavior tree that has been built, preferably debugged or run successfully, is saved as a behavior tree instance, for example, it is saved as a sub-behavior tree node representing the behavior tree instance in the sub-behavior tree node library. When it is necessary to build the same behavior tree again, just call the behavior tree instance directly.
此外,对于类似的应用场景,例如将不同类型的AI模型部署到相同类型的目标设备中并实现相同的AI应用类型的情况,为了避免重复构建行为树的人力、时间等的浪费,对于用户已构建完成最好是已调试或运行成功的当前行为树的框架作为一个行为树模板进行保存。当然,也可以预先设置对应不同工作流的行为树模板。这些行为树模板可存储在行为树模板库中。当用户需要构建类似的行为树时,可选取对应的行为树模板并对其进行必要的配置以得到用于实现所需工作流的行为树。In addition, for similar application scenarios, such as deploying different types of AI models to the same type of target device and implementing the same type of AI application, in order to avoid the waste of manpower and time in repeatedly building behavior trees, for users who have already It is best to save the framework of the current behavior tree that has been debugged or successfully run as a behavior tree template after the construction is completed. Of course, behavior tree templates corresponding to different workflows can also be preset. These Behavior Tree Templates can be stored in the Behavior Tree Template Library. When users need to build a similar behavior tree, they can select the corresponding behavior tree template and perform necessary configurations to obtain a behavior tree for realizing the required workflow.
此外,为了进一步增加行为树构建的便利性,在用户创建行为树时,为用户进行节点的推荐、错误检查以及节点属性的智能映射,可进一步将In addition, in order to further increase the convenience of behavior tree construction, when users create behavior trees, node recommendation, error checking and intelligent mapping of node attributes can be carried out for users, which can further
行为树实例转化为知识图谱实例进行保存。相应地,可如图6中的虚线部分所示,进一步包括如下步骤:The behavior tree instance is converted into a knowledge graph instance for saving. Correspondingly, as shown in the dotted line part in Fig. 6, the following steps are further included:
步骤604,将构建行为树的所有节点基于知识图谱的语法构建成一行为树知识图谱进行存储;此外,还可进一步将所述当前行为树基于知识图谱的语法构建成一知识图谱实例;所述行为树知识图谱以及所述知识图谱实例包括:分别表示构建行为树的各个节点的节点,以及表示节点之间关系或节点属性的多条边。 Step 604, building all nodes of the behavior tree into a behavior tree knowledge graph based on the grammar of the knowledge graph for storage; in addition, the current behavior tree can be further constructed into a knowledge graph instance based on the grammar of the knowledge graph; the behavior tree The knowledge graph and the instance of the knowledge graph include: nodes respectively representing the nodes of the behavior tree, and multiple edges representing the relationship between the nodes or the attributes of the nodes.
相应地,在用户创建行为树时,便可基于存储的行为树知识图谱以及历史知识图谱实例为所述用户进行控制节点和/或动作节点的推荐、错误检查以及节点属性的智能映射。本实施例中可进行相似性计算与比较、深度学习等。Correspondingly, when a user creates a behavior tree, the recommendation of control nodes and/or action nodes, error checking, and intelligent mapping of node attributes can be performed for the user based on the stored behavior tree knowledge graph and historical knowledge graph instances. Similarity calculation and comparison, deep learning, etc. can be performed in this embodiment.
图7为本申请实施例中又一种工作流建模实施系统的结构示意图,该系统可用于实施图6中所示的方法,或实现图1中所示的系统。如图7所示,该系统可包括:至少一个存储器71、至少一个处理器72和至少一个显示器73。此外,还可以包括一些其它组件,例如通信端口等。这些组件通过总线74进行通信。FIG. 7 is a schematic structural diagram of another system for implementing workflow modeling in an embodiment of the present application. The system can be used to implement the method shown in FIG. 6 or implement the system shown in FIG. 1 . As shown in FIG. 7 , the system may include: at least one memory 71 , at least one processor 72 and at least one display 73 . In addition, some other components may also be included, such as communication ports and the like. These components communicate via bus 74 .
其中,至少一个存储器71用于存储计算机程序。在一个实施方式中,该计算机程序可以理解为包括图1所示的工作流建模实施系统的各个模块。此外,至少一个存储器71还可存储操作系统等。操作系统包括但不限于:Android操作系统、Symbian操作系统、Windows操作系统、Linux操作系统等等。Among them, at least one memory 71 is used to store computer programs. In one embodiment, the computer program can be understood as including various modules of the workflow modeling implementation system shown in FIG. 1 . In addition, at least one memory 71 can also store an operating system and the like. The operating system includes but is not limited to: Android operating system, Symbian operating system, Windows operating system, Linux operating system and so on.
至少一个处理器72用于调用至少一个存储器71中存储的计算机程序,执行本申请实施例中所述的工作流建模实施方法。处理器72可以为CPU,处理单元/模块,ASIC,逻辑模块或可编程门阵列等。其可通过所述通信端口进行数据的接收和发送。At least one processor 72 is configured to invoke a computer program stored in at least one memory 71 to execute the workflow modeling implementation method described in the embodiment of the present application. The processor 72 may be a CPU, a processing unit/module, an ASIC, a logic module or a programmable gate array, and the like. It can receive and send data through the communication port.
至少一个显示器73用于显示人机交互界面。At least one display 73 is used to display the human-computer interaction interface.
具体地,至少一个处理器72用于调用至少一个存储器71中存储的计算机程序使所述系统执行上述任一实施方式中的工作流建模实施方法中的操作。Specifically, at least one processor 72 is configured to invoke a computer program stored in at least one memory 71 to enable the system to execute the operations in the workflow modeling implementation method in any of the foregoing implementation manners.
需要说明的是,上述各流程和各结构图中不是所有的步骤和模块都是必须的,可以根据实际的需要忽略某些步骤或模块。各步骤的执行顺序不是固定的,可以根据需要进行调整。各模块的划分仅仅是为了便于描述采用的功能上的划分,实际实现时,一个模块可以分由多个模块实现,多个模块的功能也可以由同一个模块实现,这些模块可以位于同一个设备中,也可以位于不同的设备中。It should be noted that not all steps and modules in the above-mentioned processes and structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as required. The division of each module is only to facilitate the description of the functional division adopted. In actual implementation, one module can be divided into multiple modules, and the functions of multiple modules can also be realized by the same module. These modules can be located in the same device. , or on a different device.
可以理解,上述各实施方式中的硬件模块可以以机械方式或电子方式实现。例如,一个硬件模块可以包括专门设计的永久性电路或逻辑器件(如专用处理器,如FPGA或ASIC)用于完成特定的操作。硬件模块也可以包括由软件临时配置的可编程逻辑器件或电路(如包括 通用处理器或其它可编程处理器)用于执行特定操作。至于具体采用机械方式,或是采用专用的永久性电路,或是采用临时配置的电路(如由软件进行配置)来实现硬件模块,可以根据成本和时间上的考虑来决定。It can be understood that the hardware modules in the foregoing embodiments may be implemented mechanically or electronically. For example, a hardware module may include specially designed permanent circuits or logic devices (such as special-purpose processors, such as FPGAs or ASICs) to perform specific operations. Hardware modules may also include programmable logic devices or circuits (including, for example, general-purpose processors or other programmable processors) temporarily configured by software to perform particular operations. As for implementing the hardware module in a mechanical way, using a dedicated permanent circuit, or using a temporarily configured circuit (such as configured by software) to realize the hardware module, it can be decided according to cost and time considerations.
此外,本申请实施例中还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序能够被一处理器执行并实现本申请实施例中所述的工作流建模实施方法。具体地,可以提供配有存储介质的系统或者装置,在该存储介质上存储着实现上述实施例中任一实施方式的功能的软件程序代码,且使该系统或者装置的计算机(或CPU或MPU)读出并执行存储在存储介质中的程序代码。此外,还可以通过基于程序代码的指令使计算机上操作的操作系统等来完成部分或者全部的实际操作。还可以将从存储介质读出的程序代码写到插入计算机内的扩展板中所设置的存储器中或者写到与计算机相连接的扩展单元中设置的存储器中,随后基于程序代码的指令使安装在扩展板或者扩展单元上的CPU等来执行部分和全部实际操作,从而实现上述实施方式中任一实施方式的功能。用于提供程序代码的存储介质实施方式包括软盘、硬盘、磁光盘、光盘(如CD-ROM、CD-R、CD-RW、DVD-ROM、DVD-RAM、DVD-RW、DVD+RW)、磁带、非易失性存储卡和ROM。可选择地,可以由通信网络从服务器计算机上下载程序代码。In addition, the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and the computer program can be executed by a processor to implement the workflow modeling implementation method described in the embodiment of the present application . Specifically, a system or device equipped with a storage medium may be provided, on which the software program code for realizing the functions of any implementation manner in the above-mentioned embodiments is stored, and the computer (or CPU or MPU of the system or device) ) to read and execute the program code stored in the storage medium. In addition, an operating system or the like operated on a computer may also complete part or all of the actual operations through instructions based on program codes. It is also possible to write the program code read from the storage medium into the memory set in the expansion board inserted into the computer or into the memory set in the expansion unit connected to the computer, and then based on the instructions of the program code, the memory installed in the The expansion board or the CPU on the expansion unit executes part or all of the actual operations, so as to realize the functions of any one of the above-mentioned implementation manners. Embodiments of storage media for providing program codes include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), Tape, non-volatile memory card, and ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.
从上述方案中可以看出,由于本发明实施例中,用行为树图来表示工作流的操作流程,即将不同工业领域工作流中的相关操作封装成独立的节点,使节点具有可重用性,实现了特定业务与工程平台的解耦,然后以行为树的形式组织节点,生成从开发到实施的直观的工作流操作流程,从而降低了工作流建模和实施的复杂度。It can be seen from the above scheme that in the embodiment of the present invention, the behavior tree diagram is used to represent the operation process of the workflow, that is, the related operations in the workflow of different industrial fields are encapsulated into independent nodes, so that the nodes are reusable. It realizes the decoupling of specific business and engineering platforms, and then organizes nodes in the form of behavior tree to generate an intuitive workflow operation process from development to implementation, thereby reducing the complexity of workflow modeling and implementation.
此外,通过采用知识图谱的形式来表示和保存构建行为树中节点以及行为树实例,并在此基础上实现节点、属性或工作流的推荐功能,从而可进一步降低工作量建模和实施的复杂度。In addition, by using the knowledge graph to represent and save the nodes and instances of the behavior tree in the construction of the behavior tree, and based on this, the recommendation function of the node, attribute or workflow can be further reduced, which can further reduce the complexity of workload modeling and implementation Spend.
进一步地,通过将已构建的行为树存储为子行为树节点或行为树模板,可进一步降低工作量建模和实施的复杂度。Further, by storing the constructed behavior tree as a sub-behavior tree node or a behavior tree template, the complexity of workload modeling and implementation can be further reduced.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of the present invention. within the scope of protection.

Claims (14)

  1. 工作流建模实施系统,其特征在于,包括:The workflow modeling implementation system is characterized by including:
    节点库(110),其中设置有用于构建各种行为树的节点,所述节点包括根节点、逻辑控制节点和动作节点;其中,一个行为树用于表征一个工作流,所述逻辑控制节点用于实现工作流中的逻辑控制,动作节点用于实现工作流中的业务操作,且所述动作节点包括:将不同工业领域工作流中的通用性操作封装而成的通用动作节点,和将不同工业领域工作流中的非通用性操作封装而成的面向具体工业领域的专有动作节点;A node library (110), wherein nodes for constructing various behavior trees are provided, and the nodes include root nodes, logic control nodes and action nodes; wherein, a behavior tree is used to represent a workflow, and the logic control nodes use To realize the logic control in the workflow, the action nodes are used to realize the business operations in the workflow, and the action nodes include: general action nodes that encapsulate common operations in workflows in different industrial fields, and different Proprietary action nodes for specific industrial fields encapsulated by non-universal operations in industrial workflows;
    图形化界面模块(120),用于提供用户基于所述节点存储模块中的节点进行行为树构建和配置的图形化人机交互界面;A graphical interface module (120), configured to provide a graphical human-computer interaction interface for users to construct and configure behavior trees based on the nodes in the node storage module;
    编辑引擎模块(130),用于响应用户通过所述图形化人机交互界面进行的行为树创建操作,并生成对应当前工作流的当前行为树,将所述当前行为树保持为可扩展标记语言文件;The editing engine module (130) is used to respond to the behavior tree creation operation performed by the user through the graphical human-computer interaction interface, and generate a current behavior tree corresponding to the current workflow, and maintain the current behavior tree as an extensible markup language document;
    行为树引擎执行模块(140),用于根据用户的运行或调试指令,通过访问所述可扩展标记语言文件运行所述当前行为树,并实现所述当前行为树对应的当前工作流。A behavior tree engine execution module (140), configured to run the current behavior tree by accessing the extensible markup language file according to a user's running or debugging instruction, and realize the current workflow corresponding to the current behavior tree.
  2. 根据权利要求1所述的工作流建模实施系统,其特征在于,每个动作节点均由接口部分和实现部分组成;对于实现部分,每个动作节点是一个应用程序;对于接口部分,每个动作节点是一个可在所述人机交互界面上进行拖放、连接及属性配置的图形元素;The workflow modeling implementation system according to claim 1, wherein each action node is composed of an interface part and an implementation part; for the implementation part, each action node is an application program; for the interface part, each The action node is a graphic element that can be dragged and dropped, connected and configured on the human-computer interaction interface;
    每个动作节点的接口部分设置在所述节点库中,每个节点的实现部分设置在一节点服务模块中;The interface part of each action node is set in the node library, and the implementation part of each node is set in a node service module;
    所述行为树引擎执行模块(140)包括:行为树引擎模块(141)和执行器模块(142);所述行为树引擎模块(141)用于运行所述当前行为树,并在运行到动作节点时,将所述动作节点的接口部分打包提供给所述执行器模块(142),由所述执行器模块(142)对其进行解析并封装为对应的执行请求发送给设置有所述动作节点的实现部分的运行时服务器中,并接收所述运行时服务器执行所述动作节点的实现部分后返回的执行结果,将所述执行结果反馈给所述行为树引擎模块(141),由所述行为树引擎模块(141)通过图形化界面模块(120)呈现给用户。The behavior tree engine execution module (140) includes: a behavior tree engine module (141) and an executor module (142); the behavior tree engine module (141) is used to run the current behavior tree, and when running to an action node, the interface part of the action node is packaged and provided to the executor module (142), and the executor module (142) parses it and encapsulates it as a corresponding execution request and sends it to the device configured with the action In the runtime server of the implementation part of the node, and receive the execution result returned by the runtime server after executing the implementation part of the action node, feed back the execution result to the behavior tree engine module (141), and the The behavior tree engine module (141) is presented to the user through the graphical interface module (120).
  3. 根据权利要求1所述的工作流建模实施系统,其特征在于,所述编辑引擎模块(130)进一步用于响应用户通过所述图形化人机交互界面进行的将所当前行为树保持为子行为树节点和/或行为树模板的操作,将所述当前行为树作为所述节点库(110)中的一个节点存储为子行为树节点和/或行为树模板,以提供用户进行行为树创建时直接调用。The workflow modeling implementation system according to claim 1, characterized in that, the editing engine module (130) is further configured to respond to the user through the graphical human-computer interaction interface to maintain the current behavior tree as a child The operation of the behavior tree node and/or the behavior tree template, storing the current behavior tree as a node in the node library (110) as a sub-behavior tree node and/or behavior tree template, to provide the user with behavior tree creation when called directly.
  4. 根据权利要求1所述的工作流建模实施系统,其特征在于,进一步包括:知识图 谱模块(150),用于将构建行为树的所有节点基于知识图谱的语法构建成一行为树知识图谱进行存储;将所述当前行为树基于知识图谱的语法构建成一知识图谱实例;所述行为树知识图谱以及所述知识图谱实例包括:分别表示构建行为树的各个节点的节点,以及表示节点之间关系或节点属性的多条边。The workflow modeling implementation system according to claim 1, further comprising: a knowledge graph module (150), configured to construct a behavior tree knowledge graph for storing all nodes of the behavior tree based on the syntax of the knowledge graph ; Construct the current behavior tree into a knowledge graph instance based on the syntax of the knowledge graph; the behavior tree knowledge graph and the knowledge graph instance include: respectively represent the nodes of each node of the behavior tree, and represent the relationship between nodes or Multiple edges for node attributes.
  5. 根据权利要求4所述的工作流建模实施系统,其特征在于,所述知识图谱模块(150)进一步用于在用户构建所述当前行为树时,基于所述行为树知识图谱以及历史知识图谱实例为所述用户进行控制节点和/或动作节点的推荐、错误检查以及节点属性的智能映射。The workflow modeling implementation system according to claim 4, wherein the knowledge graph module (150) is further configured to, when the user constructs the current behavior tree, based on the behavior tree knowledge graph and historical knowledge graph Examples include recommending control nodes and/or action nodes, error checking, and intelligent mapping of node attributes for the user.
  6. 根据权利要求1至5中任一项所述的工作流建模实施系统,其特征在于,所述当前行为树中的动作节点包括:The workflow modeling implementation system according to any one of claims 1 to 5, wherein the action nodes in the current behavior tree include:
    顺序执行的如下动作节点:模型训练器和应用程序部署器;或者包括:The following action nodes executed sequentially: model trainer and application deployer; or include:
    顺序执行的如下动作节点:模型训练器、模型转换器和应用程序部署器;The following action nodes are executed sequentially: model trainer, model converter, and application deployer;
    其中,模型训练器用于对一训练模型进行新数据源或训练参数的再训练;Wherein, the model trainer is used for retraining a training model with a new data source or training parameters;
    模型转换器用于将训练好的模型从源格式转换为目标格式;The model converter is used to convert the trained model from the source format to the target format;
    应用程序部署器用于将模型部署到指定的目标设备。The application deployer is used to deploy the model to the specified target device.
  7. 工作流建模实施方法,其特征在于,包括:The implementation method of workflow modeling is characterized by comprising:
    提供用户基于预先设置的用于构建各种行为树的节点进行行为树构建和配置的图形化人机交互界面;响应用户通过所述图形化人机交互界面进行的行为树创建操作,生成对应当前工作流的当前行为树,并将所述当前行为树保持为可扩展标记语言文件;所述节点包括根节点、逻辑控制节点和动作节点;其中,一个行为树用于表征一个工作流,所述逻辑控制节点用于实现工作流中的逻辑控制,动作节点用于实现工作流中的业务操作,且所述动作节点包括:将不同工业领域工作流中的通用性操作封装而成的通用动作节点,和将不同工业领域工作流中的非通用性操作封装而成的面向具体工业领域的专有动作节点;Provide the user with a graphical human-computer interaction interface for constructing and configuring behavior trees based on the preset nodes used to construct various behavior trees; in response to the behavior tree creation operation performed by the user through the graphical human-computer interaction interface, generate a corresponding current The current behavior tree of the workflow, and keep the current behavior tree as an extensible markup language file; the nodes include root nodes, logic control nodes and action nodes; wherein, a behavior tree is used to represent a workflow, and the The logic control node is used to implement the logic control in the workflow, and the action node is used to implement the business operation in the workflow, and the action node includes: a general action node that encapsulates the general operations in the workflow in different industrial fields , and the proprietary action nodes for specific industrial fields that encapsulate non-universal operations in workflows in different industrial fields;
    根据用户的运行或调试指令,通过访问所述可扩展标记语言文件运行所述当前行为树,并实现所述当前行为树对应的当前工作流。According to the user's running or debugging instruction, the current behavior tree is executed by accessing the extensible markup language file, and the current workflow corresponding to the current behavior tree is realized.
  8. 根据权利要求7所述的工作流建模实施方法,其特征在于,所述当前行为树为:用户通过添加、连接和配置根节点、所需的逻辑控制节点和所需的动作节点构建而成的行为树;或者为:The implementation method of workflow modeling according to claim 7, wherein the current behavior tree is constructed by the user by adding, connecting and configuring root nodes, required logic control nodes and required action nodes Behavior tree for ; or for:
    用户根据所需的工作流类型从子行为树节点库中选取的子行为树节点,所述子行为树节点为已存储的历史行为树实例;The sub-behavior tree node selected by the user from the sub-behavior tree node library according to the required workflow type, and the sub-behavior tree node is a stored historical behavior tree instance;
    用户根据所需工作流类型从行为树模板库中选取对应的行为树模板后,基于所述行为树模板进行配置以及进行节点调整或不调整后得到的行为树,所述行为树模板为预先存储的行为树模板或根据用户的历史行为树实例转存的行为树模板。After the user selects the corresponding behavior tree template from the behavior tree template library according to the required workflow type, configure the behavior tree based on the behavior tree template and perform node adjustment or no adjustment to obtain the behavior tree. The behavior tree template is a pre-stored Behavior tree templates or behavior tree templates dumped based on the user's historical behavior tree instances.
  9. 根据权利要求7所述的工作流建模实施方法,其特征在于,每个动作节点均由接口部分和实现部分组成;对于实现部分,每个动作节点是一个应用程序;对于接口部分,每个动作节点是一个可在人机交互界面上进行拖放、连接及属性配置的图形元素;The implementation method of workflow modeling according to claim 7, wherein each action node is composed of an interface part and an implementation part; for the implementation part, each action node is an application program; for the interface part, each The action node is a graphic element that can be dragged and dropped, connected and configured on the human-computer interface;
    所述当前行为树中的每个动作节点被执行时,所述动作节点接口部分的属性配置中的输入将被读取并传输给所述动作节点的实现部分,并在所述实现部分完成对应操作后,操作结果将转换为所述动作节点接口部分的属性配置中的输出。When each action node in the current behavior tree is executed, the input in the attribute configuration of the interface part of the action node will be read and transmitted to the implementation part of the action node, and the corresponding After the operation, the operation result will be transformed into the output in the attribute configuration of the interface part of the action node.
  10. 根据权利要求7所述的工作流建模实施方法,其特征在于,进一步包括:将所述当前行为树作为一个表征行为树实例的子行为树节点保存到子行为树节点库中;和/或,将所述当前行为树的框架作为一个行为树模板保存到行为树模板库中。The workflow modeling implementation method according to claim 7, further comprising: saving the current behavior tree as a sub-behavior tree node representing a behavior tree instance in the sub-behavior tree node library; and/or , saving the framework of the current behavior tree as a behavior tree template in the behavior tree template library.
  11. 根据权利要求7至10中任一项所述的工作流建模实施方法,其特征在于,进一步包括:将构建行为树的所有节点基于知识图谱的语法构建成一行为树知识图谱进行存储;将所述当前行为树基于知识图谱的语法构建成一知识图谱实例;所述行为树知识图谱以及所述知识图谱实例包括:分别表示构建行为树的各个节点的节点,以及表示节点之间关系或节点属性的多条边。The workflow modeling implementation method according to any one of claims 7 to 10, further comprising: constructing all nodes of the behavior tree into a behavior tree knowledge graph based on the syntax of the knowledge graph for storage; The current behavior tree is constructed into a knowledge graph instance based on the grammar of the knowledge graph; the behavior tree knowledge graph and the knowledge graph instance include: nodes representing each node of the constructed behavior tree, and nodes representing the relationship between nodes or node attributes Multiple sides.
  12. 根据权利要求11所述的工作流建模实施方法,其特征在于,进一步包括:在用户构建所述当前行为树时,基于所述行为树知识图谱以及历史知识图谱实例为所述用户进行逻辑控制节点和/或动作节点的推荐、错误检查以及节点属性的智能映射。The workflow modeling implementation method according to claim 11, further comprising: when the user builds the current behavior tree, performing logic control for the user based on the behavior tree knowledge graph and historical knowledge graph instances Recommendations for nodes and/or action nodes, error checking, and intelligent mapping of node attributes.
  13. 工作流建模实施系统,其特征在于,包括:至少一个存储器和至少一个处理器,其中:A workflow modeling implementation system, comprising: at least one memory and at least one processor, wherein:
    所述至少一个存储器用于存储计算机程序;said at least one memory is for storing computer programs;
    所述至少一个处理器用于调用所述至少一个存储器中存储的计算机程序执行如权利要求7至12中任一项所述的工作流建模实施方法。The at least one processor is configured to call a computer program stored in the at least one memory to execute the workflow modeling implementation method according to any one of claims 7 to 12.
  14. 计算机可读存储介质,其上存储有计算机程序;其特征在于,所述计算机程序能够被一处理器执行并实现如权利要求7至12中任一项所述的工作流建模实施方法。A computer-readable storage medium, on which a computer program is stored; characterized in that, the computer program can be executed by a processor to implement the workflow modeling implementation method according to any one of claims 7 to 12.
PCT/CN2021/109876 2021-07-30 2021-07-30 Workflow modeling implementation system and method, and storage medium WO2023004805A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/109876 WO2023004805A1 (en) 2021-07-30 2021-07-30 Workflow modeling implementation system and method, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/109876 WO2023004805A1 (en) 2021-07-30 2021-07-30 Workflow modeling implementation system and method, and storage medium

Publications (1)

Publication Number Publication Date
WO2023004805A1 true WO2023004805A1 (en) 2023-02-02

Family

ID=85087396

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/109876 WO2023004805A1 (en) 2021-07-30 2021-07-30 Workflow modeling implementation system and method, and storage medium

Country Status (1)

Country Link
WO (1) WO2023004805A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116521026A (en) * 2023-06-30 2023-08-01 北京机械工业自动化研究所有限公司 Visualization method, device and equipment for green factory evaluation
CN117610320A (en) * 2024-01-23 2024-02-27 中国人民解放军国防科技大学 Directed acyclic graph workflow engine cyclic scheduling method, device and equipment
CN117634865A (en) * 2024-01-25 2024-03-01 卓望数码技术(深圳)有限公司 Workflow creation method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719832A (en) * 2005-07-15 2006-01-11 复旦大学 Network working flow describing and verificating method driven normally
US20160154910A1 (en) * 2014-11-28 2016-06-02 Siemens Aktiengesellschaft Common plant model for modeling of physical plant items of a production plant
CN108460199A (en) * 2018-02-11 2018-08-28 西南电子技术研究所(中国电子科技集团公司第十研究所) CNI modelings
CN110244941A (en) * 2019-06-17 2019-09-17 三角兽(北京)科技有限公司 Task development approach, device, electronic equipment and computer readable storage medium
CN110377279A (en) * 2019-07-24 2019-10-25 江苏中威科技软件系统有限公司 Visualization guidance is without code construction workflow and automatic verification method and system
CN111079244A (en) * 2019-06-20 2020-04-28 中国航天系统科学与工程研究院 Distributed simulation platform based on behavior tree

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719832A (en) * 2005-07-15 2006-01-11 复旦大学 Network working flow describing and verificating method driven normally
US20160154910A1 (en) * 2014-11-28 2016-06-02 Siemens Aktiengesellschaft Common plant model for modeling of physical plant items of a production plant
CN108460199A (en) * 2018-02-11 2018-08-28 西南电子技术研究所(中国电子科技集团公司第十研究所) CNI modelings
CN110244941A (en) * 2019-06-17 2019-09-17 三角兽(北京)科技有限公司 Task development approach, device, electronic equipment and computer readable storage medium
CN111079244A (en) * 2019-06-20 2020-04-28 中国航天系统科学与工程研究院 Distributed simulation platform based on behavior tree
CN110377279A (en) * 2019-07-24 2019-10-25 江苏中威科技软件系统有限公司 Visualization guidance is without code construction workflow and automatic verification method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116521026A (en) * 2023-06-30 2023-08-01 北京机械工业自动化研究所有限公司 Visualization method, device and equipment for green factory evaluation
CN116521026B (en) * 2023-06-30 2023-10-03 北京机械工业自动化研究所有限公司 Visualization method, device and equipment for green factory evaluation
CN117610320A (en) * 2024-01-23 2024-02-27 中国人民解放军国防科技大学 Directed acyclic graph workflow engine cyclic scheduling method, device and equipment
CN117610320B (en) * 2024-01-23 2024-04-02 中国人民解放军国防科技大学 Directed acyclic graph workflow engine cyclic scheduling method, device and equipment
CN117634865A (en) * 2024-01-25 2024-03-01 卓望数码技术(深圳)有限公司 Workflow creation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
WO2023004805A1 (en) Workflow modeling implementation system and method, and storage medium
WO2016090929A1 (en) Method, server and system for software system fault diagnosis
US11951631B2 (en) Object marking to support tasks by autonomous machines
US20180224821A1 (en) Rich contextualization of automation data
CN111797969A (en) Neural network model conversion method and related device
US20210263834A1 (en) Code Generation Platform
Zander et al. A model-driven engineering approach for ros using ontological semantics
WO2018176025A1 (en) System and method for engineering autonomous systems
WO2023004806A1 (en) Device deployment method for ai model, system, and storage medium
US11126405B1 (en) Utilizing augmented reality and artificial intelligence to automatically generate code for a robot
WO2023142062A1 (en) Workflow generation method and system, and medium and program product
CN116880823A (en) Application development method and system based on container technology, electronic equipment and storage medium
Niermann et al. Software framework concept with visual programming and digital twin for intuitive process creation with multiple robotic systems
WO2023164841A1 (en) Workflow execution method and apparatus, and storage medium and program product
Lindorfer et al. Towards user-oriented programming of skill-based automation systems using a domain-specific meta-modeling approach
WO2023142079A1 (en) Workflow creation method and system, medium and program product
WO2023142061A1 (en) Workflow generation method, device and system, medium, and program product
WO2023142076A1 (en) Workflow control method, apparatus and system, and medium and program product
CN111752554B (en) Multi-model cooperation system and method based on model arrangement
CN116009844A (en) Obstetric and research integrated platform supporting visual dragging for carrying out vehicle networking data fusion analysis
EP4089492A1 (en) System and method for generating and displaying targeted information related to robots working in an operating environment
WO2023164835A1 (en) Workflow execution method and apparatus, storage medium, and program product
Velesaca et al. Optimizing Smart Factory Operations: A Methodological Approach to Industrial System Implementation based on OPC-UA
Zhang et al. An Expandable and Generalized Method for Equipment Information Reflection in Digital Twin Workshop Systems
WO2023142078A1 (en) Workflow construction method and system, medium, and program product

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21951395

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE