METHOD AND DEVICE FOR WORKFLOW DEVICE AS WELL AS PLATFORM AND COMPUTER-READABLE MEDIUM
Patent Information
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- SIEMENS AG
- Filing Date
- 2022-02-28
- Publication Date
- 2026-08-05
AI Technical Summary
Behavior tree models and functional block models are unable to directly cooperate, requiring time-consuming and complicated conversion for integration.
A method and apparatus that allows direct cooperation between behavior tree models and functional block models by nesting one into the other, enabling seamless integration and execution of workflows across different workcells.
Facilitates convenient and fast integration of workflows, leveraging the advantages of both models for various scenarios, and enhances collaboration between OT engineers and machine learning programmers.
Description
Technical field
[0001] Embodiments of the present application mainly relate to the technical field of industry, in particular to a workflow creation method and apparatus, a platform and a computer-readable medium.Background art
[0002] A workflow may be simply defined as a description of a series of operation processes. Workflows are widely used in automated systems, artificial intelligence, robots and other fields. For example, a workflow of a product sorting line in an automated system may be simply defined as start-up, photography, classification, and moving a product to a target position. A model deployment workflow in the field of artificial intelligence may be described as data collection, data marking, model training and model deployment.
[0003] Programmers who work in machine learning are more familiar with the creation of workflows using behavior tree models, whereas conventional OT (operational technology) engineers tend to edit and view workflows in event-based functional blocks. Workflows formed by behavior tree models or functional block models can respectively control corresponding execution engines to perform specific operations; however, behavior tree models and functional block models belong to two different systems, so at the present time, if it is necessary for the execution engines respectively corresponding to the two types of model to cooperate, the only option is to convert one type of model to the other type, and then completely integrate it with the other type of model, but this method is very time-consuming and complicated.
[0004] GONG JIANXING et al., "Agent Behavior Combination Modeling by Multi-method Integration", Proceedings of the 5th International Conference on Frontiers of Educational Technologies, 2019 relates to the integration of different behaviour specification formalisms, in particular behaviour trees and task graphs, within a unified modelling framework for agent behaviour.Summary of the invention
[0005] Embodiments of the present application provide a workflow creation method and apparatus, a platform, and a computer-readable medium, thus solving the problem of behavior tree models and functional block models being unable to directly cooperate.
[0006] The invention is defined by the appended set of claims.Brief description of the drawings
[0007] The drawings below are merely intended to illustrate and explain embodiments of the present application schematically, without limiting the scope thereof. In the drawings: Fig. 1 is a flow chart of a workflow creation method according to an embodiment of the present application. Fig. 2A is a schematic drawing of a functional block model constructed in an embodiment according to the present application. Fig. 2B is a schematic drawing of a behavior tree nested into a functional block model in an embodiment according to the present application. Fig. 3 is a flow chart of another workflow creation method according to an embodiment of the present application. Fig. 4A is a schematic drawing of a behavior tree constructed in an embodiment according to the present application. Fig. 4B is a schematic drawing of a functional block model nested into a behavior tree in an embodiment according to the present application. Fig. 5 is a schematic drawing of a workflow creation apparatus according to an embodiment of the present application. Fig. 6 is a schematic drawing of another workflow creation apparatus according to an embodiment of the present application. Fig. 7 is a schematic drawing of a workflow creation platform according to an embodiment of the present application. Brief description of the drawings
[0008] 100: workflow creation method 101 - 104: method steps 300: workflow creation method 301 - 304: method steps 50: workflow creation apparatus 51: graphical interface module 52: editing / processing module 60: workflow creation apparatus 61: graphical interface module 62: editing / processing module 700: information processing platform 701: memory 702: processor Detailed description of embodiments
[0009] The subject matter described herein is now discussed with reference to exemplary embodiments. It should be understood that the sole purpose of discussing these embodiments is to enable those skilled in the art to better understand and thereby implement the subject matter described herein, without limiting the protection scope, applicability or examples expounded in the claims. Changes may be made to the functions and arrangement of the discussed elements without departing from the scope of protection of the content of embodiments of the present application. Various processes or components may be omitted from, replaced in or added to various examples as required. For example, the described method may be performed in a different order to that described, and various steps may be added, omitted or combined. Furthermore, features described in relation to some examples may also be combined in other examples.
[0010] As used herein, the term "comprising" and variants thereof denote open terms meaning "including but not limited to". The term "based on" means "at least partly based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc. may denote different or identical objects. Other definitions may be included below, whether explicit or implicit. Unless clearly specified in the context, the definition of a term is the same throughout the description.
[0011] Embodiments of the present application are described in detail below with reference to the drawings.
[0012] Low code is essentially computer software, which may be deployed on an IPC (industrial computer) or SBC (single-board computer); low code provides a graphical user interface, allowing users to perform low-code development in the OT domain and / or the IT domain.
[0013] A workcell may be a system or equipment combination capable of realizing a relatively complete and independent control process and operation. In embodiments of the present application, workflows are created with workcells as the basic unit; this is more in keeping with the characteristics of industrial control, and can increase development integration while reducing development complexity. For example, taking the technical field of industry as an example, workcells may be defined according to the actual industrial scenario, e.g. one process may be defined to correspond to one workcell, or one workstation in a process may be defined as one workcell, or one machine in a workstation may be defined to correspond to one workcell, etc., with different workcells having different process flows.
[0014] A behavior tree is a type of formalized graphical modeling language, using clearly defined symbols to clearly represent hundreds or even thousands of natural language requests, and is a tree structure containing logic nodes and behavior nodes.
[0015] Fig. 1 is a flow chart of a workflow creation method according to a non-claimed embodiment of the present application; as shown in Fig. 1, the workflow creation method comprises: Step 101, receiving an operation, performed by a user on a graphical user interface, of constructing a functional block model.
[0016] As shown in Fig. 2A, the user may construct a functional block model on the graphical user interface, the functional block model comprising multiple functional blocks, and further comprising control nodes, e.g. a start node and an end node, at two ends of the functional block model. Each functional block is used to define an operation to be realized by a physical device in a workcell.
[0017] A functional block comprises an input event, an output event, input data and output data. Different functional blocks are connected to each other in sequence; the output event of a first functional block is connected to the input event of a second functional block, and output data of the first functional block is connected to input data of the second functional block. Optionally, the input event of a functional block may comprise a start event, and the output event of a functional block may comprise a success event and a failure event.
[0018] Step 102, receiving an operation, performed by the user on the graphical user interface, of nesting a behavior tree into the second functional block in the functional block model. The behavior tree is used to define an operation to be executed by a first workcell. The functional block model is used to define an operation to be executed by a second workcell.
[0019] As shown in Fig. 2B, the user may nest a behavior tree into the second functional block in the functional block model.
[0020] Step 103, in response to an operation performed by the user on the graphical user interface, the first functional block in the functional block model triggering the input event of the second functional block.
[0021] Step 104, the second functional block triggering an execution signal to a root node in the behavior tree at a preset frequency, so that the behavior tree starts execution from the root node and outputs an execution result.
[0022] If the root node returns not an execution result but an execution state indicating "running", the second functional block continues triggering an execution signal to the root node in the behavior tree, until the root node returns an execution result.
[0023] Step 105, the second functional block triggering a corresponding output event according to the execution result.
[0024] If the execution result is "success", the second functional block triggers an output event representing success to a third functional block connected to the second functional block. If the execution result is "failure", the second functional block triggers an output event representing failure to an execution engine connected to the first workcell.
[0025] Step 106, generating an instance of the functional block model.
[0026] Optionally, when the behavior tree is nested into the second functional block in the functional block model, data accessible by the behavior tree comprises data outputted by the first functional block connected to the second functional block.
[0027] After generating the instance of the functional block model, the instance of the functional block model is parsed, and a workflow corresponding to the functional block model is deployed on an execution engine controlling the second workcell, so that the second workcell connected to the execution engine executes an operation according to the workflow of the functional block model. The behavior tree is used to define an operation to be executed by a corresponding workcell; therefore, when the second functional block triggers an output event representing success to the third functional block, this means that a workflow corresponding to a behavior tree instance has been deployed on an execution engine controlling the first workcell, so that the first workcell connected to this execution engine executes an operation according to a workflow of the behavior tree. Optionally, the execution engine may be runtime. Optionally, the execution engine corresponding to the behavior tree instance and the execution engine corresponding to the functional block model instance may be distributed in different places, or integrated in a single host computer.
[0028] Thus, the operation to be executed by the first workcell defined by the behavior tree and the operation to be executed by the second workcell defined by the functional block model may be executed in the same workflow, so that the execution engines respectively corresponding to the two operations cooperate under the control of the same workflow. Combining the behavior tree and the functional block model directly is not only very convenient and fast, but can also exploit their respective advantages in terms of modeling for different scenarios, as well as facilitating cooperation between OT engineers and machine learning programmers to control different workcells.
[0029] Fig. 3 is a flow chart of another workflow creation method according to the invention as shown in Fig. 3, the workflow creation method comprises: Step 301, receiving an operation, performed by a user on a graphical user interface, of constructing a behavior tree.
[0030] As shown in Fig. 4A, the user may construct the behavior tree on the graphical user interface. Step 302, receiving an operation, performed by the user on the graphical user interface, of nesting the functional block model into a first leaf node in the behavior tree. The functional block model is used to define an operation to be executed by a first workcell. The behavior tree is used to define an operation to be executed by a second workcell.
[0031] As shown in Fig. 2B, the user may nest a functional block model composed of multiple functional blocks into the first leaf node in the behavior tree.
[0032] Step 303, in response to an operation performed by the user on the graphical user interface, triggering, at a parent node connected to the first leaf node, a first execution signal to the first leaf node, and the first leaf node triggering a start event to start execution of the functional block model.
[0033] Step 304, controlling execution of the functional block model in the first leaf node, according to the status of triggering of the first leaf node by the parent node within one propagation cycle of an execution signal of the behavior tree.
[0034] According to the invention, when the parent node does not trigger an execution signal to the first leaf node within one propagation cycle of an execution signal of the behavior tree, the functional block model in the first leaf node pauses execution, until the first leaf node has an execution signal triggered by the parent node again, and the functional block model continues execution.
[0035] Execution / pausing of execution of the functional block model in the first leaf node is controlled according to the status of triggering / not triggering the first leaf node by the parent node within one propagation cycle of an execution signal of the behavior tree. In other words, the workflow in the functional block model in the first leaf node continues to be executed only when the first leaf node has an execution signal triggered, and the first leaf node returns a "running" execution state to the parent node. When execution of the workflow in the functional block model in the first leaf node is paused, an execution engine corresponding to the behavior tree sends a pause signal to an execution engine corresponding to the functional block model in the first leaf node.
[0036] Optionally, after the functional block model in the first leaf node pauses execution, information of a first functional block currently paused in the workflow is saved, and when triggered with an execution signal by the parent node again, the functional block model starts to continue execution from the first functional block. A memory function of the functional block model is thus added.
[0037] Step 305, after the first leaf node outputs an execution result, the first leaf node triggering a corresponding output event to the parent node according to the execution result.
[0038] Step 306, generating an instance of the behavior tree.
[0039] Optionally, when the functional block model is nested into the first leaf node in the behavior tree, data accessible by a third functional block in the functional block model in the first leaf node comprises: data outputted by a second functional block connected to the third functional block, and data of the behavior tree. Data of the behavior tree may comprise: global data / partial data of the behavior tree. The term "third functional block" does not specifically mean one particular functional block in the functional block model; it may denote any one of the functional blocks, or each of the functional blocks in the functional block model. The range of data accessible by the functional block model can thus be expanded.
[0040] Through embodiments of the present application, an operation to be executed by the first workcell defined by the functional block model and an operation to be executed by the second workcell defined by the behavior tree may be executed in the same workflow, so that the execution engines respectively corresponding to the two operations cooperate under the control of the same workflow.
[0041] Optionally, by combining the responsive method of nesting a behavior tree into a functional block in a functional block model with the responsive method of nesting a functional block model into a leaf node in a behavior tree, inter-nesting may be performed multiple times. For example, a first behavior tree may be nested into a first functional block in a first functional block model, then a second functional block model may be nested into a first leaf node in the first behavior tree, and depending on actual circumstances, inter-nesting modes may continue to be added, so as to achieve a greater variety of possibilities.
[0042] Fig. 5 is a schematic drawing of a workflow creation apparatus according to an embodiment of the present application; as shown in Fig. 5, the workflow creation apparatus comprises: A graphical interface module 51, configured to: provide a graphical user interface for a user to perform an operation of constructing a functional block model and an operation of nesting a behavior tree into a second functional block in the functional block model. The behavior tree is used to define an operation to be executed by a first workcell. A workflow is used to define an operation to be executed by a second workcell.
[0043] An editing / processing module 52, configured such that: after a first functional block in the functional block model triggers an input event of the second functional block, in response to an operation performed by the user on the graphical user interface, the second functional block triggers an execution signal to a root node in the behavior tree at a preset frequency, so that the behavior tree starts execution from the root node and outputs an execution result. The second functional block triggers a corresponding output event according to the execution result. An instance of the functional block model is generated.
[0044] Fig. 6 is a schematic drawing of another workflow creation apparatus according to an embodiment of the present application; as shown in Fig. 6, the workflow creation apparatus comprises: A graphical interface module 61, configured to: provide a graphical user interface for a user to perform an operation of constructing a behavior tree and an operation of nesting a functional block model into a first leaf node in the behavior tree. The functional block model is used to define an operation to be executed by a first workcell. The behavior tree is used to define an operation to be executed by a second workcell.
[0045] An editing / processing module 62, configured such that: in response to an operation performed by the user on the graphical user interface, a first execution signal is triggered to the first leaf node, at a parent node connected to the first leaf node, and the first leaf node triggers a start event to start execution of the functional block model, then execution of the functional block model in the first leaf node is controlled according to the status of triggering of the first leaf node by the parent node within one propagation cycle of an execution signal of the behavior tree. After the first leaf node outputs an execution result, the first leaf node triggers a corresponding output event to the parent node according to the execution result. An instance of the behavior tree is generated.
[0046] Embodiments of the present application further propose a workflow creation platform 700. Fig. 7 is a schematic drawing of a workflow creation platform 700 according to an embodiment of the present application. As shown in Fig. 7, the workflow creation platform 700 comprises a processor 702 and a memory 701, the memory 701 storing instructions which, when executed by the processor 702, realize the method 100 or method 300 described above.
[0047] The at least one processor 702 may comprise a microprocessor, an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a central processing unit (CPU), a graphical processing unit (GPU), a state machine, etc. Embodiments of computer-readable media include but are not limited to floppy disks, CD-ROM, magnetic disks, memory chips, ROM, RAM, ASIC, configured processors, fully optical media, all magnetic tapes or other magnetic media, or any other media from which instructions can be read by a computer processor.
[0048] Additionally, various other forms of computer-readable media can send or carry instructions to a computer, including routers, private or public networks, or other wired and wireless transmission devices or channels. The instructions may comprise code in any computer programming language, including C, C++, C language, Visual Basic, java and JavaScript.
[0049] In addition, embodiments of the present application further provide a computer-readable medium, having stored thereon computer-readable instructions which, when executed by a processor, cause the processor to perform the OT domain low-code development method described above. Embodiments of computer-readable media include floppy disks, hard disks, magneto-optical disks, optical disks (e.g. CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tape, non-volatile memory cards and ROM. Optionally, computer-readable instructions may be downloaded from a server computer or the cloud via a communication network.
[0050] It should be explained that not all of the steps and modules in the procedures and system structure drawings above are necessary; certain steps or modules may be omitted according to actual needs. The order in which the steps are performed is not fixed, and may be adjusted as needed. The system structures described in the embodiments above may be physical structures or logic structures, i.e. some modules might be realized by the same physical entity, or some modules might be realized by multiple physical entities separately, or may be realized jointly by certain components in multiple independent devices.
Claims
1. A workflow creation method comprising: - receiving (301) an operation, performed by a user on a graphical user interface, of constructing a behavior tree; - receiving (302) an operation, performed by the user on the graphical user interface, of nesting a functional block model into a first leaf node in the behavior tree, wherein the functional block model is used to define an operation to be executed by a first workcell, and the behavior tree is used to define an operation to be executed by a second workcell; - in response to an operation performed by the user on the graphical user interface, triggering (303), at a parent node connected to the first leaf node, a first execution signal to the first leaf node, and the first leaf node triggering a start event to start execution of the functional block model; - controlling (304) execution of the functional block model in the first leaf node, according to the status of triggering of the first leaf node by the parent node within one propagation cycle of an execution signal of the behavior tree; - after the first leaf node outputs an execution result, the first leaf node triggering (305) a corresponding output event to the parent node according to the execution result; - generating (306) an instance of the behavior tree; wherein the step of controlling (304) execution of the functional block model in the first leaf node, according to the status of triggering of the first leaf node by the parent node within one propagation cycle of an execution signal of the behavior tree, comprises: - when the parent node does not trigger an execution signal to the first leaf node within one propagation cycle of an execution signal of the behavior tree, the functional block model in the first leaf node pauses execution, until the first leaf node is triggered with an execution signal by the parent node again, and the functional block model continues execution; - controlling execution / pausing of execution of the functional block model in the first leaf node according to the status of triggering / not triggering the first leaf node by the parent node within one propagation cycle of an execution signal of the behavior tree.
2. The method as claimed in claim 1, wherein after the functional block model in the first leaf node pauses execution, the method further comprises: - saving information of a first functional block currently paused in the workflow, and when triggered with an execution signal by the parent node again, the functional block model starting to continue execution from the first functional block.
3. The method as claimed in claim 1 wherein the method further comprises: - when the functional block model is nested into the first leaf node in the behavior tree, data accessible by a third functional block in the functional block model in the first leaf node comprises: data outputted by a second functional block connected to the third functional block, and data of the behavior tree.
4. A workflow creation apparatus, comprising: - a graphical interface module (51), configured to: - provide a graphical user interface for a user to perform an operation of constructing a functional block model and an operation of nesting a behavior tree into a second functional block in the functional block model, wherein the behavior tree is used to define an operation to be executed by a first workcell, and the workflow is used to define an operation to be executed by a second workcell; - processor configured to perform the steps of the method of any of claims 1 to 3.
5. A computer-readable medium, wherein the computer-readable medium stores a computer-readable instruction which, when executed by a processor, causes the processor to perform a step of the method as claimed in any one of claims 1 to 3.