WO2023142062A1 - 工作流生成方法、系统、介质及程序产品 - Google Patents

工作流生成方法、系统、介质及程序产品 Download PDF

Info

Publication number
WO2023142062A1
WO2023142062A1 PCT/CN2022/075059 CN2022075059W WO2023142062A1 WO 2023142062 A1 WO2023142062 A1 WO 2023142062A1 CN 2022075059 W CN2022075059 W CN 2022075059W WO 2023142062 A1 WO2023142062 A1 WO 2023142062A1
Authority
WO
WIPO (PCT)
Prior art keywords
workflow
node
behavior tree
nodes
function block
Prior art date
Application number
PCT/CN2022/075059
Other languages
English (en)
French (fr)
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 CN202280089272.6A priority Critical patent/CN118556241A/zh
Priority to PCT/CN2022/075059 priority patent/WO2023142062A1/zh
Publication of WO2023142062A1 publication Critical patent/WO2023142062A1/zh

Links

Images

Classifications

    • 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 embodiments of the present application relate to the field of industrial technology, and in particular, to a workflow generation method, system, computer-readable storage medium, and computer program product.
  • 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.
  • Embodiments of the present application provide a workflow generation method, system, computer-readable storage medium, and computer program product, so as to realize workflow creation quickly and conveniently.
  • a method for generating a workflow including: receiving a behavior tree construction operation performed by a user on a graphical user interface, the behavior tree construction operation includes adding behavior tree nodes including function block nodes and Connection operation; wherein, a behavior tree is used to represent the workflow of business operations to be performed by each resource in a work unit, and the function block node is used to realize the business operations in the workflow; in response to the behavior tree construction operation , instantiate each behavior tree node, and establish a connection relationship between each instantiated behavior tree node; wherein, some or all of the instantiated function block nodes are associated with resources for performing corresponding business operations; based on the instance The connection relationship between the nodes of the optimized behavior tree is generated to generate a behavior tree corresponding to a workflow.
  • a workflow generation system which includes a node library, wherein a behavior tree node for constructing a behavior tree is provided; the behavior tree node includes: a function block node; wherein, a behavior tree is used to represent a work unit The workflow of the operation to be performed by each resource in the workflow; the function block node is used to realize the business operation in the workflow; the graphical interface module is configured to provide a graphical user interface for the user to perform a behavior tree construction operation, and the behavior tree construction The operation includes adding and connecting operations to behavior tree nodes including function block nodes; the editing processing module is configured to respond to the construction operation of the behavior tree, instantiate each behavior tree node, and establish each instantiation The connection relationship between the behavior tree nodes; wherein, some or all of the instantiated function block nodes are associated with resources for performing corresponding business operations; based on the connection relationship between the instantiated behavior tree nodes, a corresponding A behavior tree for a workflow.
  • another workflow generation system including: at least one memory configured to store computer-readable codes; at least one processor configured to invoke the computer-readable codes to execute the steps in the method.
  • an IT domain OT domain fusion system including IT equipment and the workflow generation system described in any one of the above implementation manners; wherein, the workflow is an OT domain workflow; and the working unit is an OT domain The work unit in the domain; the resource is an OT resource; and the workflow generation system further includes: an OT domain microservice generator, which is used to generate a microservice based on the behavior tree, so that the IT device can call the The runtime of the work unit is triggered by the microservice to execute the OT domain workflow.
  • a computer-readable medium where computer-readable instructions are stored on the computer-readable medium, and when the computer-readable instructions are executed by a processor, the processor executes the method provided in the first aspect. steps in the method.
  • a computer program product tangibly stored on a computer-readable medium and comprising computer-readable instructions that, when executed, cause at least one processor to perform a first
  • various steps in the method are provided.
  • a behavior tree can be used to represent the operation flow of the workflow. Due to the reusability of nodes, the decoupling of specific business and engineering platforms is realized; and, organizing nodes in the form of behavior trees can generate an intuitive workflow operation process from development to implementation, thereby reducing the cost of workflow construction. complexity, enabling quick and easy workflow creation.
  • the behavior tree is parsed, and the OT domain workflow corresponding to the behavior tree is deployed on the runtime of the work unit, so that each resource in the work unit follows the specified Execute actions in the workflow described above. In this way, the purpose of controlling the operation of the work unit based on the workflow is achieved.
  • the workflow is an OT domain workflow; the work unit is a work unit in the OT domain; and the device is an OT device. In this way, workflow creation in the OT domain is realized.
  • a microservice is generated based on the OT domain workflow, so that the IT equipment in the IT domain triggers the runtime execution of the main controller of the work unit by invoking the microservice. Describe the OT domain workflow. In this way, IT devices can invoke microservices generated based on OT domain workflows, thereby triggering the execution of OT workflows and realizing the integration of IT domains and OT domains.
  • FIG. 1A is an exemplary flow chart of a workflow generation method provided by various embodiments of the present application.
  • FIG. 1B is an example diagram of a resource knowledge graph in an example of the present application.
  • FIG. 1C is an example diagram in which resource nodes are associated with function block nodes in an example of the present application.
  • FIG. 1D is an exemplary flow chart of another workflow generation method provided by various embodiments of the present application.
  • FIG. 2A is a schematic diagram of a behavior tree created in an example of the present application.
  • FIG. 2B to FIG. 2S are respectively schematic diagrams of partial behavior trees created in an example of the present application.
  • FIG. 2T is an example of building a behavior tree based on the function block nodes of the function block type diagram in an example of the present application.
  • 2U to 2X are schematic diagrams of hiding or displaying data input ports or data output ports in an example of the present application, respectively.
  • FIG. 2Y is a schematic diagram of adding data blocks to four function block nodes in the behavior tree and displaying corresponding data in each data block in an example of the present application.
  • Fig. 3 is an exemplary structural diagram of a workflow generation system provided by an embodiment of the present application.
  • FIGS. 4A to 4D are schematic diagrams of workflow generation systems provided by various embodiments of the present application.
  • FIG. 4E is a schematic diagram of an application scenario in the field of industrial automation.
  • FIG. 5 is a schematic diagram of hardware implementation of the workflow generation system provided by the embodiment of the present application.
  • the term “comprising” and its variants represent open terms meaning “including but not limited to”.
  • the term “based on” means “based at least in part 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 refer to different or the same object. The following may include other definitions, either express or implied. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout the specification.
  • FIG. 1A shows an exemplary flow chart of a method for generating a workflow provided by an embodiment of the present application. As shown in Figure 1A, the method may include the following steps:
  • Step S11A receiving the behavior tree construction operation performed by the user on the graphical user interface based on the preset behavior tree nodes.
  • a behavior tree is used to represent a workflow, and the workflow is used to define operations to be performed by a work unit, for example, it may represent a distributed process within a work unit.
  • the workflow here can also be subdivided into main workflow and sub-workflow.
  • the main workflow is used to define the start, end, and other flow controls that trigger the flow of the entire unit of work.
  • the main workflow is the entry point of the entire process, which is linked to at least one sub-workflow.
  • Sub-workflows are usually main workflows, and each sub-workflow corresponds to a sub-process for implementing specific business operations.
  • a work cell may be a combination of resources such as systems or devices capable of implementing a relatively complete and independent control process and operation.
  • the workflow is created with the work unit as the basic unit, which is more in line with the characteristics of industrial control, can improve the integration degree of development, and reduce the complexity of development.
  • the work unit can be defined according to the actual industrial scene, for example: you can define a process corresponding to a work unit, or you can define a work station in the process as a work unit, or you can also define A station in the workstation corresponds to a work unit, etc. Different work units have different technological processes.
  • the behavior tree nodes may include: flow control nodes and function block nodes. Each of them will be described in detail below.
  • Flow control nodes are used to implement logical control in workflows, which are usually independent of specific business operations in work units. Through flow control nodes, users can create various workflows according to their needs.
  • the flow control node may include: a main control node, a logic control node, and a conditional node.
  • the flow control node may also include: one or any combination of a master control node, a logic control node, and a condition node. They are briefly explained below.
  • the main control node may include: some or all of a Start node, an End node, a Goto node, an Anchor node, a Stop node, and an Abort node.
  • the main control nodes in this embodiment are not standard behavior tree elements, but in this embodiment they can be used to control the main flow of the workflow and can be linked to the state machine of the workflow.
  • the start node is mandatory, and one of the end node or the go-to node can also be mandatory.
  • the main control node is mainly used to define the start and end of the workflow.
  • other element nodes can control the state machine (such as abort and stop) or mark the key process steps that can be jumped (such as critical nodes).
  • Logical control nodes can include: sequence (Se, Sequence) node, reactive sequence (RSe, Reactive Sequence) node, parallel (Pa, Parallel) node, process internal quality control (IPQ, In-Process QC) node, priority ( Pr, Priority (Fallback)) node, reactive priority (RPr, Reactive Priority (Fallback)) node, whether conditional judgment (ITE, If-Then-Else) node, and multi-branch selection (Sw, Switch) node some or all.
  • Logical control nodes can define how to execute branching in the behavior tree, and are used to implement branching logic control in the workflow, etc. A brief description of each node is given below:
  • Sequence node which can have one or more sub-nodes, and will trigger routing to each sub-node in sequence according to the workflow sequence.
  • Reactive sequence node which has the same function as the sequence node, but will continuously check the trigger conditions.
  • Parallel node which can have one or more sub-nodes, starts up sequentially from top to bottom, and executes all sub-nodes in multi-process or multi-thread simultaneously.
  • the quality control node in the process is that the quality engineer performs quality inspection on a part of the process steps. If the inspection fails, the exception handling process will be executed, and if it succeeds, it will continue.
  • Priority node Execute each sub-branch in order according to the priority. If the previous execution fails, the next one will be executed, and any branch will pass if the execution is successful.
  • Reactive priority node The function is the same as the priority node, but the trigger condition will be continuously checked.
  • condition judgment node check the trigger expression, if it is true, execute the true branch, if it is false, execute the false branch.
  • Multi-branch selection node check the trigger expression, and execute different branches according to different conditions, all of which are not satisfied to execute the default (default) branch.
  • condition node is usually the basic logical element of the check expression in the behavior tree, which is used to execute the condition 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.
  • conditional node may also be included in a function block node.
  • conditional nodes can also be used as a single type of node.
  • Function block nodes are used to execute commands and implement business operations in the workflow. Typically, success is returned if the operation completed correctly, and failure is returned if the operation failed. Returns running while the operation is in progress.
  • the function block nodes include logic nodes, and may also include some specific types of function block nodes, such as manual (Manual) nodes, dynamic (Dynamic) nodes, delay (Delay) nodes, and idle (Empty ( idle)) some or all of the nodes.
  • dynamic node is used to dynamically inject node instance at runtime.
  • the manual node represents a manual step, stop at the current node before obtaining the confirmation signal, and exit after obtaining the confirmation signal.
  • Delay node means to exit the current node after a specified time delay.
  • An idle node means no operation is performed, a placeholder, and can be replaced by any function block node.
  • each logical node may correspond to an operation template, and each operation template predefines operations that at least one type of resource (such as collaborative robot or PLC) can perform.
  • the operations may include: actions, methods, or Skill.
  • each operation template may consist of an interface part and an implementation part.
  • the implementation part can be an application (for example, a containerized application) that contains functional code and runtime dependencies.
  • the application program can run independently and be exposed to the outside world through a specific network communication interface.
  • the interface part may be a logical node presented as a graphical element, that is, it can be dragged and dropped, connected and configured in a graphical user interface like other behavior tree nodes.
  • each logical node may have a parameter panel for configuring parameters of the logical node, such as input and output parameters. Of course, these input and output parameters can also be preset with default values.
  • Each logical node can be configured and executed individually.
  • the user-configured input for the logical node is read and transferred to the implementation part of the action template, the corresponding application.
  • the result of the operation such as the transformed model will be converted back to the output of the logical node.
  • the interface part and implementation part of each operation template can be stored separately.
  • the interface part that is, the logical node
  • its implementation part may be stored in a node service module, which may be called a runtime (Runtime) in this embodiment.
  • the node service module can be located in a server or locally.
  • the above-mentioned logical nodes follow an information model for runtime interaction with the main controller.
  • the standardization of communication between the OT domain workflow and the main controllers of various OT devices is realized.
  • these physical devices, personnel, and virtualized noun resources are collectively referred to as resources in this article, and these resources usually refer to resources that can execute workflows on site as the main body of each operation.
  • the resource as the main body of operation can be used as a common configuration parameter of the function block node to configure the corresponding resource for the required function block node when creating the behavior tree; or, when creating the function block node, set the function Block nodes are configured with resources as the subject of operation execution, so that when creating a behavior tree, it is not necessary to configure resources for the required function block nodes.
  • the resource knowledge graph includes: various resource nodes, and connections representing relationships among resource nodes.
  • FIG. 1B an example diagram of a resource knowledge graph in an example is shown in FIG. 1B .
  • the resource knowledge graph is a factory resource knowledge graph, which describes the real system configuration of a factory.
  • the factory (F, Factory) node has an industrial computer (IPC) node
  • the industrial computer (IPC) node has a collaborative robot (CR, Cooperative Robot) node, a PLC node and a bar code scanner (BCS, Bar Code Scanner) node.
  • IPC industrial computer
  • BCS Bar Code Scanner
  • the collaborative robot (CR, Cooperative Robot) node has a gripper (CJ, Clamping Jaw) node, a torque wrench (TW, Torque Wrench) node and a camera (CA, Camera) node;
  • the PLC node has a button (B, Button) node and LED warning light nodes.
  • CJ Clamping Jaw
  • TW Torque Wrench
  • CA Camera
  • B Button
  • LED warning light nodes LED warning light nodes.
  • Each function block node can be associated with a resource node, and the function block node can be instantiated as an operation of the corresponding resource.
  • a logical node can be instantiated as an operation of a corresponding device by associating a device resource node.
  • a resource header may be set for the function block node, and resources associated with the function block node will be displayed in the resource header.
  • each resource node can be associated with a corresponding function block node in advance, so that when creating a behavior tree, the function block node associated with the corresponding resource can be directly pulled, and there is no need for temporary configuration.
  • FIG. 1C shows an example diagram in which each resource node is associated with a function block node. As shown in FIG. 1C , for the resources shown in the resource knowledge graph shown in FIG. 1B , corresponding function block nodes are respectively associated.
  • the industrial computer (IPC) node is associated with a button (PB, Press Button) node and a dialog box (DDB, Display Dialog Box on Screen) node;
  • the collaborative robot (CR, Cooperative Robot) node is associated with a linear movement (LM, Linear Move) nodes and joint movement (SM, Shutdown Mobile) nodes;
  • PLC nodes are associated with read I/O (RIO, Read I/O) nodes and write I/O (WIO, Write I/O) nodes;
  • the bar code scanner (BCS, Bar Code Scanner) node is associated with the scanning bar code (SBC, Scan Bar Code) node;
  • the jaw (CJ, Clamping Jaw) node is associated with the open (O, Open) node and the grab (Gr, Grab) node Node;
  • torque wrench (TW, Torque Wrench) node is associated with twist (T, Twist) node;
  • camera (CA, Camera) node is associated with registration (R, Register)
  • resource nodes may not be pre-associated with function block nodes, but corresponding resource nodes may be associated with required function block nodes when the behavior tree is created.
  • function block nodes associated with resource nodes (which may be called dedicated function block nodes) and function block nodes not associated with resource nodes (which may be called general function block nodes).
  • resource nodes which may be called dedicated function block nodes
  • function block nodes not associated with resource nodes which may be called general function block nodes.
  • this embodiment may further include the following decorator nodes:
  • Decorator nodes are mainly used to decorate function block nodes driven by logic control nodes, for example, can be used to decide whether a branch or even a single node in a behavior tree can be executed.
  • Rp, Repeat repeat
  • Rt retry
  • TO Timeout
  • Tm Timer
  • negation Iv, Inverter
  • FR Force Run
  • forced success forced success
  • FF Force Failed
  • G Guard
  • Negative node which can have a child node, used to negate the child node. If the child node fails, it returns success; if the child node succeeds, it returns failure.
  • a mandatory failure node which can have a child node (such as a function block node), regardless of whether its child node is successful or not, the node will always return failure.
  • a repeated node which may have a child node (such as a function block node), can repeatedly execute its child node for a fixed number of times.
  • a retry node which can have a child node (such as a function block node), can trigger its child node up to N times, if its child node returns failure, retry and the number of times will be reduced by one, when the number of retries is zero , returns success; if the child node returns success, break the loop and also return success.
  • N is a positive integer.
  • a one-time node which may have a child node, means that its child node is only executed once in the workflow, and will not be executed until the workflow is restarted.
  • a timeout node which may have a child node, which is used to time the execution time of its child nodes (such as function block nodes), and exit execution when the specified time exceeds (even if the execution is not completed).
  • a timer node which may have a child node, executes its child node (such as a function block node) after the specified time is reached.
  • a monitoring node which may have at least one child node, and is used to monitor the status of all its child nodes. When any child node executes incorrectly, an error will be reported. When all child nodes are normal, it returns normal.
  • a decorator node may also be contained within a flow control node. That is, flow control nodes may include: all or part of main control nodes, logic control nodes, and decorator nodes.
  • each behavior tree node can be listed on the graphical user interface in the form of an icon, and the user can determine the node needed to create a workflow by selecting and dragging the icon to add to the canvas.
  • the node performs necessary parameter configuration, such as resource configuration and/or input and output parameter configuration.
  • the behavior tree corresponding to the workflow can include multiple function block nodes.
  • the behavior tree of the corresponding workflow is finally generated by performing corresponding discharge connections on the dragged nodes. That is, the behavior tree construction operation includes adding and connecting nodes of the behavior tree. Further, an operation of associating resources for the added function block nodes may also be included. In addition, it may also include: configuration operations on the input and output parameters of the behavior tree nodes.
  • Step S12A in response to the construction operation of the behavior tree, generate a behavior tree corresponding to a workflow, and part or all of the function block nodes in the behavior tree are associated with resources for executing corresponding business operations.
  • all function block nodes in the behavior tree need to be associated with resources that perform corresponding business operations; for action flows that do not need to be implemented by on-site resources temporarily, such as simulation work flow, it is not necessary for all function block nodes to be associated with resources for performing corresponding business operations.
  • a collaborative robot may not be purchased yet.
  • the corresponding general function block node can be used for simulation in advance. When it is confirmed that it is feasible, it can be purchased.
  • each behavior tree node may be instantiated in response to the behavior tree construction operation, and a connection relationship between each instantiated behavior tree node may be established.
  • some or all of the instantiated function block nodes are associated with resources for executing corresponding business operations. By performing this step, the added function block node can be instantiated as an operation of the corresponding resource. Then, based on the connection relationship between the instantiated behavior tree nodes, a behavior tree corresponding to a workflow is generated.
  • the aforementioned behavior tree nodes may be stored in a node library.
  • the node library may further include a workflow (WF, WorkFlow) node and a sub-workflow (SWF, SubWorkFlow) node.
  • FIG. 2A shows a schematic diagram of constructing a behavior tree of a work unit of a quality inspection production line in an example.
  • FIG. 2B to FIG. 2S respectively show schematic diagrams of partial behavior trees constructed in an example. Wherein, the direction of the arrow indicates the execution sequence of the corresponding node.
  • the function block nodes can be understood as presented in the form of a label graph, and the construction of this behavior tree based on the function block label graph requires the participation of flow control nodes and even decorator nodes.
  • an embodiment of the present invention also provides a method for constructing a behavior tree based on a function block type diagram. In the method, the function block nodes are presented in the form of a type diagram. In practical applications, these two behavior tree construction methods can coexist, and when one of the behavior tree construction methods is used, the other method will also be constructed synchronously.
  • FIG. 1D shows an exemplary flow chart of another workflow generation method provided by the embodiment of the present application. As shown in Figure 1D, the method may include the following steps:
  • Step S11B receiving the addition and connection operation of the function block node performed by the user on the graphical user interface based on the function block type diagram.
  • the type diagram and the label diagram can be understood as two presentation modes of the same function block node, and their functions are both used to realize a corresponding business operation.
  • FIG. 2T shows an example of constructing a behavior tree based on the function block nodes of the function block type graph in an example.
  • two function block nodes F1, F2 are shown.
  • the functional block type diagram may include:
  • a function block name 201 used to indicate the type of business operation. For example, screw fastening, image capture, video recording, visual guidance, etc.
  • the default function block name will be generated by adding the default name of the function block definition plus the instance number.
  • the logical node in the function block node is taken as an example , the names are represented by "logical node 1" and "logical node 2".
  • Function block names are editable, but should be unique within the current global workflow.
  • the function block header 202 used to indicate the resource for executing the business operation is a torque wrench
  • the resource for image collection is a monitor
  • the resource for video recording is a monitor
  • the resource for visual guidance is a camera.
  • the functional block header 202 of a logical node is generally a physical resource, such as "physical node 1" and "physical node 2" as shown in Fig. 2U.
  • the resource indicated by the function block header 202 may be pre-associated, or the corresponding resource may be associated through resource configuration after the function block node is added.
  • connection operation of the function block nodes may include: a connection operation between the link output port 204 and the link input port 203 between the two function block nodes F1 and F2.
  • a link connection 205 is established between the two function block nodes F1 and F2.
  • the link connection 205 in this example is a one-way connection used to indicate the running process of the workflow. For example, it can indicate the execution order of the two function block nodes, that is, the function block node F1 on the left is executed first, and then the function block node on the right is executed. F2.
  • the connection endpoint is positioned on the link input port 203 .
  • the first sensitive area which is called the first sensitive area here
  • the second sensitive area which is referred to as the second sensitive area herein, and is used to receive the user's point in the second sensitive area.
  • the connection endpoint is positioned on the link output port 204.
  • the interconnected function block nodes F1 and F2 in response to the connection operation between the link output port 204 and the link input port 203 between the two function block nodes F1 and F2, can be further An instruction label 207 for indicating the execution order of each function block node is generated, and the instruction label 207 is marked on the function block type diagram of the function block nodes F1 and F2. 1 and 2 as shown in the picture.
  • the instruction tag 205 can also be used as an index of jump instructions and as a chapter index of the documentation.
  • Input data chunk 208 for representing the set of all data input ports and output data chunk 209 for representing the set of all data output ports.
  • the number of data input ports of the function block node can be marked on the input data block 208, such as 5 on the input data block 208 of the function block node F1 and the input data block 208 of the function block node F2 2 above, if the number of data input ports is zero, the input data chunk 208 can be hidden.
  • the number of data output ports of the function block node can be marked on the output data block 209, such as 3 on the output data block 209 of the function block node F1 and 1 on the output data block 209 of the function block node F2 , if the number of data output ports is zero, the output data chunk 209 can be hidden.
  • each data input port of the function block node can be expanded or hidden by clicking on the input data block 208 .
  • Each data output port of the function block node can be expanded or hidden by clicking on the output data block 209 .
  • 2U shows a schematic diagram of hiding the data input port of logical node 2 by clicking
  • 2V shows a schematic diagram of hiding the data output port of logical node 1 by clicking
  • FIG. 2W shows that each data input port is displayed simultaneously.
  • a schematic diagram of each data output port FIG. 2X shows a schematic diagram of simultaneously hiding each data input port and each data output port.
  • connection operation of the function block nodes may also include: a connection operation between the data output port 211 and the data input port 210 between the corresponding data of the two function block nodes F1 and F2.
  • a data connection 212 is established between the two function block nodes F1 and F2.
  • Data connection 212 in this example is used to indicate data transmission between two function block nodes F1 and F2.
  • a data connection 212 is established between the data output port 211 of the output data 1 of the function block node F1 and the data input port 210 of the input data 2 of the function block node F2, which means that the output of the function block node F1 Data 1 is used as input data 2 of the function block node F2.
  • a sensitive area can also be provided within the set range of the data input port 210 output), which is referred to as the third sensitive area here, and is used to locate the connection end point on the data input port 210 when the user's click and connection operations are received in the third sensitive area.
  • the third sensitive area there may also be a sensitive area (not shown in the figure) within the setting range of the data output port 211, which is referred to as the fourth sensitive area here, and is used to receive the user's click in the fourth sensitive area.
  • the connection endpoint is positioned on the data output port 211 .
  • the function block icon 213, specifically, the function block icon 213 may be a vector icon 213, which is used to visually represent the service operation of the function block node.
  • the function block icons 213 may also be omitted.
  • Function block main body 214 for carrying the above components.
  • the adding operation of the function block node may include: dragging and dropping the function block main body 214 .
  • Step S12B in response to the addition and connection operations of the function block nodes, construct a behavior tree corresponding to a workflow.
  • the behavior tree including the flow control node and the function block node based on the function block label graph in S12A can be constructed synchronously; similarly, in step S12A, the construction includes When the flow control node and the behavior tree of the function block node based on the function block label diagram, the behavior tree based on the function block type diagram in S12B can also be constructed synchronously. And the two behavior tree construction interfaces can be switched according to the user's choice. For example, according to the user's click operation on the behavior tree based on the function block type diagram or the behavior tree based on the function block label diagram, the behavior tree based on the function block type diagram or the function block label diagram based The Behavior Tree toggles the display.
  • At least one of the function block nodes in the behavior tree can be further Add and connect at least one data block to each function block node.
  • each data block is used to present the corresponding data in the business operation of the function block node connected to it.
  • the types of data blocks can include some or all of data pairs, data tables, images, videos, charts, etc.
  • Fig. 2Y shows a schematic diagram of adding data blocks to four function block nodes in the behavior tree and displaying corresponding data in each data block in an example of the present application.
  • the function block node associated with the monitor to record the production video is added with a type of real-time video data (Live Data -Video) data block;
  • the function block node associated with the screw fastening of the torque wrench is added with a data block of type Live Data-Text and a data block of type Live Data-Chart ;
  • the function block node of the robot image acquisition associated with the monitor is added with a data block of type Live Data-Image;
  • the function block node of the machine vision guide associated with a camera is added with a type of Live Video Data (Live Data-Video) data block.
  • each data block may include a data block label 215 for indicating the type of data block and a data block body 216 having a display area for presenting specific data.
  • the data block label 215 can be a draggable label, for example, can be moved to any position in the canvas.
  • the size of the display area of the data block 216 is adjustable, and is used to display different types of data from the data layer in real time.
  • a monitoring link 217 is established between each data block and the corresponding function block node, and one function block can be mapped to multiple data blocks. When the workflow is executed, for example, at runtime, the monitoring and output data corresponding to the function block nodes will be transmitted to the corresponding data blocks for real-time display.
  • the data block in this embodiment is a low-code data block, which is different from other SCADA and dashboard systems in that the low-code data block in this embodiment is also a low-code element, which can be used as a part of the behavior tree, and all of its Properties can all be managed in low-code logic.
  • the data source in the low-code data block comes from the data layer, which can obtain data through the interface provided by the data layer at runtime or in the cloud execution engine.
  • the data source can be a time series database, RDBMS or NoSQL.
  • Low-code data block is a flexible, scalable and adaptable system that can be applied to any functional block node that can be associated with physical devices.
  • the data blocks used to implement data monitoring can be considered as the visual interface of the data layer.
  • At least one of the function block nodes in the behavior tree can be further Add and connect at least one data block to each function block node.
  • each data block is used to present the corresponding data in the business operation of the function block node connected to it.
  • the types of data blocks can include some or all of data pairs, data tables, images, videos, charts, etc.
  • FIG. 2Y shows a schematic diagram of adding data blocks to four function block nodes in the behavior tree and displaying corresponding data in each data block in an example of the present application.
  • the function block node associated with the monitor to record the production video is added with a type of real-time video data (Live Data -Video) data block;
  • the function block node associated with the screw fastening of the torque wrench is added with a data block of type Live Data-Text and a data block of type Live Data-Chart ;
  • the function block node of the robot image acquisition associated with the monitor is added with a data block of type Live Data-Image;
  • the function block node of the machine vision guide associated with a camera is added with a type of Live Video Data (Live Data-Video) data block.
  • each data block may include a data block label 215 for indicating the type of data block and a data block body 216 having a display area for presenting specific data.
  • the data block label 215 can be a draggable label, for example, can be moved to any position in the canvas.
  • the size of the display area of the data block 216 is adjustable, and is used to display different types of data from the data layer in real time.
  • a monitoring link 217 is established between each data block and the corresponding function block node, and one function block can be mapped to multiple data blocks. When the workflow is executed, for example, at runtime, the monitoring and output data corresponding to the function block nodes will be transmitted to the corresponding data blocks for real-time display.
  • the data block in this embodiment is a low-code data block, which is different from other SCADA and dashboard systems in that the low-code data block in this embodiment is also a low-code element, which can be used as a part of the behavior tree, and all of its Properties can all be managed in low-code logic.
  • the data source in the low-code data block comes from the data layer, which can obtain data through the interface provided by the data layer at runtime or in the cloud execution engine.
  • the data source can be a time series database, RDBMS or NoSQL.
  • Low-code data block is a flexible, scalable and adaptable system that can be applied to any functional block node that can be associated with physical devices.
  • the data blocks used to implement data monitoring can be considered as the visual interface of the data layer.
  • this embodiment may further include the following step S13 as shown by the dotted line in FIG. 1A and FIG. 1B .
  • Step S13 analyzing the behavior tree, deploying the workflow corresponding to the behavior tree to the runtime of the corresponding work unit, so that the runtime executes the workflow to control the workflow in the work unit
  • Each resource executes business operations according to the workflow.
  • the runtime may further provide corresponding data obtained during the execution of the business operation to the corresponding data block for display.
  • the corresponding data acquired during the execution of business operations may be directly provided to the corresponding data block for display or provided to the corresponding data block through a third-party device for display at runtime.
  • the work unit may have a main controller, and in this case, the runtime may be located on the work unit's main controller.
  • the equipment resources in the resources can be connected to the main controller, and the main controller can control the equipment resources connected to it to perform corresponding business operations according to the runtime workflow; the human resources in the resources can be directly based on The workflow at runtime prompts for the appropriate action.
  • the behavior tree can be stored in a Markup markup language such as XML (Extensible Markup Language), and can be verified by an XML Schema (XSD) prototype to verify that the XML format of the behavior tree is correct.
  • XML Extensible Markup Language
  • XSD XML Schema
  • the OT domain usually refers to operational technology (Operational Technology, OT), which integrates hardware and software, and detects or triggers processes in the enterprise by directly monitoring and/or controlling physical devices (called OT devices). changes or events.
  • OT utilizes computers to monitor or change physical conditions such as industrial control systems (Industrial Control System, ICS).
  • ICS Industrial Control System
  • the industrial control system is based on computer-implemented facilities, systems, and equipment for remote monitoring and/or control of key industrial processes to achieve physical functions.
  • the word "OT” is used to distinguish industrial control systems from traditional information technology (Information Technology, IT) systems in terms of technical implementation and functions.
  • the above workflow generation method in this embodiment can be used in this OT domain as a low-code development method in the OT domain.
  • the workflow generation method shown in Figure 1A can be implemented in the OT domain, such as an OT domain low-code development platform, and correspondingly, the workflow can be an OT domain workflow; the work unit can be an OT domain A working unit; the device may be an OT device.
  • OT devices may include, but are not limited to: Internet of Things (IoT) devices, Programmable Logic Controllers (PLC), Robotics, Manual Process, Industrial Computers (Industrial Personal Computer, IPC) and so on.
  • the above workflow generation method in this embodiment can be used in this ITOT system as a low-code development method in the OT domain that can be integrated with the IT domain.
  • the workflow generation method shown in Figure 1A can be implemented in the OT domain, such as an OT domain low-code development platform, and correspondingly, the workflow can be an OT domain workflow; the work unit can be a work in the OT domain unit.
  • the IT equipment can call the microservice directly or through a knowledge center.
  • the corresponding data obtained during the execution of the business operation may be provided to the corresponding data block through the microservice for display at runtime.
  • the corresponding data obtained during the execution of business operations may be provided to the knowledge center during runtime, and the knowledge center shall process the data including filtering, and then directly provide or pass through the microservice Provided to the corresponding data block for display.
  • an API of the microservice may be generated based on the behavior tree.
  • the processing procedure in the API includes each operation in the OT domain workflow
  • the input parameter of the API is the parameter obtained from the input port of the OT domain workflow
  • the output parameter of the API is the Parameters output by the output port of the OT domain workflow.
  • the specific implementation methods include but are not limited to the following two:
  • the code developers in the OT domain can notify the code developers in the IT domain of the names and IP addresses of the generated microservices. In this way, the code developers in the IT domain can directly assign the The information is written into the code, so that the IT equipment can call the microservice.
  • Method 1 is more suitable for scenarios with a small number of microservices.
  • each microservice is registered on the knowledge center platform, so that an IT domain code development tool realizes that IT equipment discovers the connected microservices through the knowledge center platform.
  • an IT domain code development tool can be used to realize the connected microservices discovered by the IT domain equipment through the knowledge center through code development.
  • the device that completes microservice registration can be an OT domain microservice generator or a third-party device.
  • the third-party device can be regarded as a part of the OT domain low-code development platform, or implemented in the knowledge center platform.
  • Method 2 is more suitable for scenarios with a large number of microservices.
  • IT equipment may include, but not limited to: Manufacturing Operation Management (MOM) system, Manufacturing Execution System (MES), Enterprise Resource Planning (Enterprise Resource Planning, ERP) system, enterprise service Bus (Enterprise Service Bus, ERP), Product Lifecycle Management (Product Lifecycle Management, PLM) system, etc.
  • MOM Manufacturing Operation Management
  • MES Manufacturing Execution System
  • ERP Enterprise Resource Planning
  • ERP enterprise Resource Planning
  • ERP enterprise Service Bus
  • PLM Product Lifecycle Management
  • the IT domain code development tool can be programmed to realize that IT equipment invokes microservices through a knowledge platform to trigger the runtime execution of the OT domain workflow of the main controller of the work unit, thereby realizing the code development of the IT domain
  • the platform controls the process of the OT domain, which realizes the integration of the IT domain and the OT domain.
  • the microservice is automatically generated by the OT domain microservice generator based on the OT domain behavior tree. It is not necessary for the code development tools of the IT domain to understand the details of the OT domain workflow. It only needs to obtain the identification (such as: name) and IP address of the microservice That is, developers in the IT domain do not need to understand OT domain devices and control processes, and are easy to implement and understand.
  • the applicable fields of the embodiments of the present application include but are not limited to: Industrial Automation, Logistics, Laboratory, Maritime, Smart Grid, Electric Vehicle Infrastructure Vehicle Infrastructure), Electric Vehicle, Building Automation, Smart City, Water Treatment, Garbage Recycling and Smart Farm, etc.
  • the workflow generation method in the embodiment of the present application has been described in detail above, and the workflow generation system in the embodiment of the present application will be described in detail below.
  • the workflow generation system in the embodiment of the present application can be used to implement the workflow generation method in the embodiment of the present application.
  • For the details not disclosed in the system embodiment of the present invention please refer to the corresponding description in the method embodiment of the present invention, here I won't repeat them one by one.
  • Fig. 3 shows a schematic structural diagram of a workflow generation system in an embodiment of the present application.
  • the system may include: a node library 110 , a graphical interface module 120 and an editing processing module 130 .
  • the node library 110 is provided with behavior tree nodes for constructing behavior trees; the behavior tree nodes may include: flow control nodes and function block nodes.
  • a behavior tree is used to represent a workflow, and the workflow is used to define an operation to be performed by a work unit.
  • the flow control node is used to realize the logic control in the workflow;
  • the function block node is used to realize the business operation in the workflow, and
  • the function block node may include: logic nodes, each logic node corresponds to an operation template, each The operation template predefines at least one type of operations that can be performed by resources such as equipment, and the operations include actions, methods or skills.
  • the node library 110 may further include various types of data blocks, and each data block is used to present corresponding data in the business operations of the function block nodes connected thereto.
  • the types of the data blocks include: some or all of data types such as data pairs, data tables, images, videos, and graphs.
  • the resources are represented in the form of resource nodes, and all resource nodes are associated and stored in the form of a resource knowledge graph;
  • the resource knowledge graph includes: each resource node, and a connection representing the relationship between the resource nodes.
  • this embodiment may further include: a resource library 150, configured to store various resources in the form of a resource knowledge graph, and each resource can perform at least one business operation.
  • the flow control node may include: some or all of the main control node, logic control node and condition node; the main control node may include: a start node, an end node, a go node, a key node , stop node, abort some or all of the nodes.
  • the logic control nodes include: some or all of sequence nodes, reactive sequence nodes, parallel nodes, intra-process quality control nodes, priority nodes, reactive priority nodes, condition judgment nodes, and multi-branch selection nodes.
  • the function block nodes may further include: some or all of manual nodes, dynamic nodes, delay nodes, and idle nodes.
  • the behavior tree node further includes: a decorator node, which may include: a repeat node, a retry node, a one-off node, a timeout node, a timer node, a negate node, a forced run node, and a forced success Some or all of nodes, force-fail nodes, and monitor nodes.
  • a decorator node which may include: a repeat node, a retry node, a one-off node, a timeout node, a timer node, a negate node, a forced run node, and a forced success
  • some or all of the function block nodes in the node library 110 are respectively bound with resources for executing the service operations corresponding to the function block nodes.
  • the function block nodes in the node library 110 can be presented in the form of label diagrams as shown in Figures 2A to 2T, or in the form of type diagrams in Figures 2T to 2X .
  • the function block nodes in the node library 110 may also only be presented in the form of a type diagram.
  • the specific structure of the function block node in the form of a function block type graph may be shown in FIG. 2T . I won't repeat them here.
  • the graphical interface module 120 is configured to provide a graphical user interface GUI for the user to perform behavior tree building operations based on the behavior tree nodes in the node library. In addition, adding and connecting data blocks can also be performed on the graphical user interface GUI.
  • the graphical user interface may include a first graphical user interface for constructing a behavior tree based on a flow control node and a function block node in the form of a function block label graph, and a second graph for constructing a behavior tree based on a function block node in the form of a function block type diagram user interface, and the two graphical user interfaces can be switched and displayed according to the user's selection.
  • the behavior tree construction operation may include adding function block nodes and connecting operations.
  • the adding operation of the function block node may include: a drag operation on the main body of the function block; the connection operation of the function block node may include: between two function block nodes The connection operation between the link output port and the link input port, and the connection operation between the data output port and the data input port between the corresponding data of two function block nodes.
  • each behavior tree node can be listed on the graphical user interface GUI in the form of an icon.
  • the editing processing module 130 is configured to generate a behavior tree corresponding to a workflow in response to the construction operation of the behavior tree.
  • the editing processing module 130 is further configured to add and connect at least one data block for each function block node in the at least one function block node in the behavior tree in response to the adding and connecting operation of the data block.
  • the editing processing module 130 may respond to the behavior tree construction operation, instantiate each behavior tree node, and establish a connection relationship between each instantiated behavior tree node; based on the The connection relationship between the instantiated behavior tree nodes generates a behavior tree corresponding to a workflow.
  • some or all of the instantiated function block nodes are associated with resources for executing corresponding business operations. For example, through this operation, a logical node is instantiated as an operation corresponding to a resource such as a device.
  • each behavior tree node and each data block can be listed on the graphical user interface in the form of an icon, and the user can determine the node needed to create the workflow by selecting and dragging the icon to add to the canvas, and further , and also perform necessary parameter configuration on the node, such as resource configuration and/or input/output parameter configuration.
  • the behavior tree corresponding to the workflow can include multiple logical nodes. Determine the execution sequence between logical nodes, and finally generate a behavior tree corresponding to the workflow by making corresponding discharge connections to the dragged nodes.
  • the behavior tree construction operation may include: an operation of adding a function block node and associating a resource for the added function block node.
  • the workflow generation system in this embodiment may further include: a parsing and deployment module 140 configured to parse the behavior tree, and deploy the workflow corresponding to the behavior tree to the corresponding The runtime of the work unit, so that the runtime executes the workflow to control each resource in the work unit to perform business operations according to the workflow.
  • the corresponding data acquired during the execution of the business operation may be provided to the corresponding data block for display.
  • the worker unit may have a master controller, in which case the runtime may reside on the master controller of the worker unit.
  • the equipment resources in the resources can be connected to the main controller, and the main controller can control the equipment resources connected to it to perform corresponding operations according to the runtime workflow; the human resources in the resources can be directly based on the running The workflow at the time prompts you to perform the appropriate action.
  • the work unit may have a main controller, and in this case, the runtime may be located on the work unit's main controller.
  • the equipment resources in the resources can be connected to the main controller, and the main controller can control the equipment resources connected to it to perform corresponding operations according to the runtime workflow; the human resources in the resources can be directly based on the running The workflow at the time prompts you to perform the appropriate action.
  • FIG. 4A shows an OT domain low-code development platform 100 provided by an embodiment of the present application, and the platform 100 can be used to implement the workflow generation system shown in FIG. 3 .
  • the OT domain low-code development platform 100 may include:
  • An OT domain low-code development tool 10 the OT domain low-code development tool 10 can be configured to implement the graphical interface module 120 and the editing processing module 130 in the workflow generation system shown in FIG.
  • the parse deployment module 140 in the workflow generation system is shown.
  • the node library 110 and the resource library 150 in the workflow generation system shown in FIG. 3 can be stored in a memory.
  • the OT domain low-code development platform 100 may also include the runtime 30 of the main controller of the above-mentioned working unit.
  • the OT domain low-code development tool 10 can deploy the OT domain workflow corresponding to the generated behavior tree to the runtime 30 of the main controller of the work unit, so that the runtime 30 executes the workflow to control the workflow connected to the Each OT resource such as an OT device in the work unit on the main controller executes an operation according to the OT domain workflow.
  • the composition of the OT domain low-code development platform 100 shown in FIG. 4A and FIG. 4B only involves the OT domain.
  • the integration of the IT domain and the OT domain has become increasingly important for the digital transformation of enterprises. What needs to be realized is how the enterprise can control the processes in the OT domain in an understandable and non-IT programming way.
  • the OT domain low-code development platform 100 shown in FIG. 4C solves how to control the flow of the OT domain through the code development platform 300 of the IT domain.
  • the OT domain low-code development platform 100 may further include an OT domain microservice generator 20 , which can generate microservices 40 based on the OT domain behavior tree.
  • the IT domain code development tool 301 can be programmed to enable the IT device to call the microservice 40 through a knowledge center 200 to trigger the runtime 30 of the main controller of the work unit to execute the OT domain workflow.
  • the code development platform 300 of the IT domain can control the process of the OT domain, that is, the integration of the IT domain and the OT domain is realized.
  • the microservice 40 is automatically generated by the OT domain microservice generator 20 based on the OT domain behavior tree. It is not necessary for the code development tool 301 in the IT domain to understand the details of the OT domain workflow. It only needs to obtain the identification of the microservice 40 (for example: name ) and IP address, it is not necessary for IT domain developers to understand OT domain devices and control processes, and it is easy to implement and understand.
  • the code developers in the OT domain can notify the code developers in the IT domain of the names and IP addresses of the generated microservices 40, so that the code developers in the IT domain can directly assign the microservices 40 to The information of 40 is written into the code, so as to implement the call of the IT equipment to the microservice 40.
  • Method 1 is more suitable for scenarios with a small number of microservices.
  • each microservice 40 can be registered on the knowledge center 200 , so that the IT domain code development tool 301 can realize the connected microservice 40 through the knowledge center 200 by the IT domain equipment through code development.
  • the device for completing the registration of the microservice 40 may be the OT domain microservice generator 20 or a third-party device 50 as shown in FIG. 4D .
  • the third-party device 50 can be regarded as a part of the low-code development platform 100 in the OT domain, or implemented in the knowledge center 200 .
  • Method 2 is more suitable for scenarios with a large number of microservices. By registering microservices on the knowledge center platform, it is more effective to realize the calling of microservices by IT equipment, and strengthen the integration of OT domain and IT domain.
  • the OT domain microservice generator 20 can generate the API of the microservice 40 based on the OT domain behavior tree, wherein, the processing procedure in the API can include the operation of each functional block in the OT domain workflow, and the input parameter of the API is OT
  • the parameters obtained by the input port of the domain workflow, and the output parameters of the API are the parameters output by the output port of the OT domain workflow.
  • FIG. 4E An application scenario of the OT domain low-code development platform 100 provided in the embodiment of the present application in the field of industrial automation is shown in FIG. 4E .
  • the low-code development tool 10 generates a behavior tree corresponding to the OT domain workflow under the operation of the user, and the OT domain workflow defines the operations to be performed by the production line as a work unit shown on the right side of FIG. 4E .
  • the corresponding workflow is generated and published to the runtime 30, so that the runtime 30 controls the completion of the production line operation of the work unit; at the same time, the corresponding microservice can be generated by the microservice generator 20 based on the behavior tree and registered in The knowledge center 200, so that the code development tool 301 in the IT domain can call the corresponding microservice through the knowledge center 200.
  • the user can edit each node including the function block node by dragging and dropping to edit the behavior tree of the OT domain. Data (for example: workpiece processing parameters), control the operation of the entire work unit.
  • the working unit here is a production line, which includes machines, conveyor belts, robotic arms, people, PLC, AGB, etc.
  • the code development tool 301 of the IT domain can also be located on the same hardware device as the low-code development tool 10 , for example, on the same computer.
  • FIG. 5 shows a schematic structural diagram of another workflow generation system provided by the embodiment of the present application.
  • the system can be used to implement the method shown in Fig. 1A, or realize the workflow generation system shown in Fig. 3, or realize the workflow generation system described in any one of Fig. 4A to Fig. 4D , that is, the low-code development platform 100 in the OT domain.
  • the aforementioned OT domain low-code development tool 10, OT domain microservice generator 20, runtime 30, and third-party device 60 can all be implemented as individual hardware devices, such as servers, workstations, single-chip microcomputers or processing chips.
  • these devices are implemented on the same hardware device, which is stored in at least one memory as a software program, and is called by at least one processor to implement the aforementioned OT domain low-code development method.
  • the node library 110 and each generated microservice 40 may be stored in at least one memory.
  • the system may include: at least one memory 51 , at least one processor 52 and at least one display 53 .
  • some other components may also be included, such as a communication port (not shown in FIG. 5 ) and the like. These components communicate via bus 54 .
  • At least one memory 51 is used to store computer programs.
  • At least one memory 51 may include computer readable media such as random access memory (RAM).
  • at least one memory 51 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.
  • the above computer stored program may include the following program modules: node library 110, graphical interface module 120, editing and processing module 130, parsing and deployment module 140, optionally, may also include OT domain microservice generator 20, runtime 30, third-party device 50.
  • At least one processor 52 is configured to invoke a computer program stored in at least one memory 51 to execute the workflow generation method described in the embodiment of the present application.
  • At least one processor 52 may be a microprocessor, an application specific integrated circuit (ASIC), a digital signal processor (DSP), a central processing unit (CPU), a graphics processing unit (GPU), a state machine, or the like. It can receive and send data through the communication port.
  • ASIC application specific integrated circuit
  • DSP digital signal processor
  • CPU central processing unit
  • GPU graphics processing unit
  • state machine or the like. It can receive and send data through the communication port.
  • At least one display 53 is used to display a graphical user interface.
  • At least one processor 52 is configured to invoke a computer program stored in at least one memory 51 to enable the system to execute the operations in the workflow generation method in any of the foregoing implementation manners.
  • the communication interface is used to implement communication with other devices, such as communication with the knowledge center 200 .
  • the OT domain low-code development tool 10 used to implement the graphical interface module 120, the editing processing module 130, and the parsing and deployment module 140 can be a lightweight web-based application program, which can be used in industrial sites (such as edge device or local server), or in the cloud (public cloud such as AWS or private cloud such as OpenStack). Its visual engineering paradigm is derived from the Function Block Typed Diagram (FBTD).
  • FBTD Function Block Typed Diagram
  • the OT domain microservice generator 20 can use modern translation programming languages to generate standard APIs such as RESTful or RPC.
  • Runtime 30 can easily implement OT domain workflow and provide openness based on the ecosystem of open source communities (such as Python).
  • the runtime 30 can be deployed on an embedded IoT device such as a single board computer (Single Board Computer, SBC).
  • the embodiment of the present application may include an apparatus having an architecture different from that shown in FIG. 5 .
  • the above architecture is only exemplary, and is used to explain the workflow construction method provided by the embodiment of the present application.
  • the embodiment of the present application also provides an IT domain OT domain integration system, that is, an ITOT system, which may include IT equipment and the workflow generation system in any implementation manner of the present application.
  • an ITOT system which may include IT equipment and the workflow generation system in any implementation manner of the present application.
  • it may further include: a code development platform 300 in the IT domain as shown in FIG. 4C and FIG. 4D .
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-readable codes, and when the computer-readable codes are executed by the processor, the processor executes the aforementioned workflow construction method.
  • an embodiment of the present application further provides a computer program product, the computer program product is tangibly stored on a computer-readable medium and includes computer-readable instructions, and when executed, the computer-readable instructions cause at least one processing The controller executes the steps in the workflow generation method in the embodiment of the present application.
  • a system or device equipped with a storage medium may be provided, on which computer-readable codes for realizing the functions of any implementation manner in the above-mentioned embodiments are stored, and the computer (or CPU or The MPU) reads and executes the computer readable codes stored in the storage medium.
  • the computer or CPU or The MPU
  • some or all of the actual operations can also be completed by an operating system or the like operating on the computer through instructions based on computer readable codes.
  • examples of computer-readable media include, but are not limited to, floppy disks, CD-ROMs, magnetic disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW , DVD+RW), memory chips, ROM, RAM, ASIC, configured processor, all-optical media, all tape or other magnetic media, or any other media from which a computer processor can read instructions.
  • various other forms of computer-readable media can transmit or carry instructions to the computer, including routers, private or public networks, or other wired and wireless transmission devices or channels, such as downloading from a server computer or cloud by a communication network computer readable instructions. Instructions may include code in any computer programming language, including C, C++, C++, Visual Basic, java, and JavaScript.

Landscapes

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

Abstract

提供了一种工作流生成方法、系统、介质及程序产品。其中,方法包括:接收用户在图形用户界面上进行的行为树构建操作,行为树构建操作包括对包括功能块节点在内的行为树节点的添加及连线操作;其中,一个行为树用于表征一个用于定义一个工作单元中各资源要执行的业务操作的工作流;功能块节点用于实现工作流中的业务操作;响应于行为树的构建操作,将各个行为树节点实例化,并建立各个实例化的行为树节点之间的连接关系;其中,实例化的功能块节点中的部分或全部关联有执行对应业务操作的资源;基于实例化的行为树节点之间的连接关系,生成对应一工作流的行为树。

Description

工作流生成方法、系统、介质及程序产品 技术领域
本申请实施例涉及工业技术领域,尤其涉及一种工作流生成方法、系统、计算机可读存储介质和计算机程序产品。
背景技术
工作流可以简单地定义为对一系列操作过程的描述。工作流广泛应用于自动化系统、人工智能、机器人等领域。例如,自动化系统中的一条产品分拣线的工作流可以简单地描述为启动、拍照、分类并将产品移动到目标位置。在人工智能领域的模型部署工作流可以描述为数据收集、数据标注、模型训练和模型部署。
但目前这些工作流只有文本描述,如果用户想要执行这样的工作流,需要遵循文本描述,并且可能使用多种工程工具,然这些工具几乎互不相关,提供了完全不同的用户操作行为,这既是对用户的挑战,也会由于开发周期长而大大增加成本,降低效率,限制灵活性。例如,在人工智能领域,用户需要使用一个工具进行数据采集,手动或使用其他工具进行数据标注,编写python脚本进行模型训练,还需要部署工具进行部署。
为此,本领域内技术人员还在致力于寻找其他的工作流解决方案。
发明内容
本申请实施例提供一种工作流生成方法、系统、计算机可读存储介质和计算机程序产品,用以快速方便地实现工作流创建。
第一方面,提供一种工作流生成方法,包括:接收用户在图形用户界面上进行的行为树的构建操作,所述行为树构建操作包括对包括功能块节点在内的行为树节点的添加及连线操作;其中,一个行为树用于表征一个工作单元中各资源要执行的业务操作的工作流,所述功能块节点用于实现工作流中的业务操作;响应于所述行为树构建操作,将各个行为树节点实例化,并建立各个实例化的行为树节点之间的连接关系;其中,实例化的功能块节点中的部分或全部关联有执行对应业务操作的资源;基于所述实例化的行为树节点之间的连接关系,生成对应一工作流的行为树。
第二方面,提供一种工作流生成系统,包括节点库,其中设置有用于构建行为树的行为树节点;所述行为树节点包括:功能块节点;其中,一个行为树用于表征一个工作单元中各资源要执行的操作的工作流;所述功能块节点用于实现工作流中的业务操作;图形界面模块, 被配置为提供用户进行行为树构建操作的图形用户界面,所述行为树构建操作包括对包括功能块节点在内的行为树节点的添加及连线操作;编辑处理模块,被配置为响应于所述行为树的构建操作,将各个行为树节点实例化,并建立各个实例化的行为树节点之间的连接关系;其中,实例化的功能块节点中的部分或全部关联有执行对应业务操作的资源;基于所述实例化的行为树节点之间的连接关系,生成对应一工作流的行为树。
第三方面,提供另一种工作流生成系统,包括:至少一个存储器,被配置为存储计算机可读代码;至少一个处理器,被配置为调用所述计算机可读代码,执行第一方面提供的方法中各步骤。
第四方面,提供一种IT域OT域融合系统,包括IT设备和如上任一实施方式中所述的工作流生成系统;其中,所述工作流为OT域工作流;所述工作单元为OT域内的工作单元;所述资源为OT资源;且所述工作流生成系统进一步包括:OT域微服务生成器,用于基于所述行为树生成一个微服务,以使得所述IT设备通过调用所述微服务而触发所述工作单元的运行时执行所述OT域工作流。
第五方面,提供一种计算机可读介质,所述计算机可读介质上存储有计算机可读指令,所述计算机可读指令在被处理器执行时,使所述处理器执行第一方面提供的方法中各步骤。
第六方面,提供一种计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可读指令,所述计算机可读指令在被执行时使至少一个处理器执行第一方面提供的方法中各步骤。
本申请实施例中,通过将对应各类资源能够执行的业务操作封装为对应的功能块节点,因此可用行为树来表示工作流的操作流程。由于节点具有可重用性,因此实现了特定业务与工程平台的解耦;并且,以行为树的形式组织节点,可生成从开发到实施的直观的工作流操作流程,从而降低了工作流构建的复杂度,实现了快速方便地工作流创建。
对于上述任一方面,可选地,解析所述行为树,将所述行为树对应的OT域工作流部署到所述工作单元的运行时上,以使得所述工作单元中的各个资源按照所述工作流执行操作。这样,实现了基于工作流控制工作单元操作的目的。
对于上述任一方面,可选地,所述工作流为OT域工作流;所述工作单元为OT域内的工作单元;所述设备为OT设备。这样,实现了OT域内的工作流创建。
对于上述任一方面,可选地,基于所述OT域工作流生成一个微服务,以使得IT域的IT设备通过调用所述微服务而触发所述工作单元的主控制器的运行时执行所述OT域工作流。这样,IT设备可以调用基于OT域工作流生成的微服务,从而触发OT工作流的执行,实现 了IT域和OT域的融合。
附图说明
图1A为本申请各实施例提供的一种工作流生成方法的示例性流程图。
图1B为本申请一个例子中的一个资源知识图谱的示例图。
图1C为本申请一个例子中为各资源节点关联了功能块节点的示例图。
图1D为本申请各实施例提供的又一种工作流生成方法的示例性流程图。
图2A为本申请一个例子中创建的行为树的示意图。
图2B至图2S分别为本申请一个例子中创建的部分行为树的示意图。
图2T为本申请一个例子中基于功能块类型图的功能块节点构建行为树的示例。
图2U至图2X分别为本申请一个例子中隐藏或显示数据输入端口或数据输出端口的示意图。
图2Y为本申请一个例子中为行为树中的四个功能块节点分别添加了数据块以及在各个数据块中显示相应数据的示意图。
图3为本申请一个实施例提供的工作流生成系统的示例性结构图。
图4A至图4D为本申请各实施例提供的工作流生成系统的示意图。
图4E为工业自动化领域的一个应用场景的示意图。
图5为本申请实施例提供的工作流生成系统的硬件实现的示意图。
附图标记列表:
S11~S13:工作流生成方法中的步骤
201:功能块名称
202:功能块头
203:链路输入端口
204:链路输出端口
205:链路连接
206:敏感区
207:指令标签
208:输入数据组块
209:输出数据组块
210:数据输入端口
211:数据输出端口
212:数据连接
213:功能块图标
214:功能块主体
215:数据块标签
216:数据块体
217:监控链路
110:节点库
120:图形界面模块
130:编辑处理模块
140:解析部署模块
150:资源库
100:OT域低代码开发平台
10:OT域低代码开发工具
20:OT域微服务生成器
30:工作单元的主控制器上的运行时
40:微服务
50:第三方装置
200:知识中台
300:IT域的代码开发平台
301:IT域的代码开发工具
51:至少一个存储器
52:至少一个处理器
53:至少一个显示器
54:总线
具体实施方式
现在将参考示例实施方式讨论本文描述的主题。应该理解,讨论这些实施方式只是为了使得本领域技术人员能够更好地理解从而实现本文描述的主题,并非是对权利要求书中所阐述的保护范围、适用性或者示例的限制。可以在不脱离本申请实施例内容的保护范围的情况下,对所讨论的元素的功能和排列进行改变。各个示例可以根据需要,省略、替代或者添加 各种过程或组件。例如,所描述的方法可以按照与所描述的顺序不同的顺序来执行,以及各个步骤可以被添加、省略或者组合。另外,相对一些示例所描述的特征在其它例子中也可以进行组合。
如本文中使用的,术语“包括”及其变型表示开放的术语,含义是“包括但不限于”。术语“基于”表示“至少部分地基于”。术语“一个实施例”和“一实施例”表示“至少一个实施例”。术语“另一个实施例”表示“至少一个其他实施例”。术语“第一”、“第二”等可以指代不同的或相同的对象。下面可以包括其他的定义,无论是明确的还是隐含的。除非上下文中明确地指明,否则一个术语的定义在整个说明书中是一致的。
下面结合附图对本申请实施例进行详细说明。
图1A示出了本申请实施例提供的一种工作流生成方法的示例性流程图。如图1A所示,该方法可包括如下步骤:
步骤S11A,接收用户在图形用户界面上基于预先设置的行为树节点进行的行为树的构建操作。
本实施例中,一个行为树用于表征一个工作流,所述工作流用于定义一个工作单元要执行的操作,例如,它可以表示工作单元内的分布式进程。具体实现时,这里的工作流还可细分为主工作流和子工作流。主工作流用于限定开始、结束以及触发整个工作单元流程的其他流控制。主工作流是整个流程的入口,其链接到至少一个子工作流。子工作流通常为主要工作流,每个子工作流对应一个子流程,用于实现具体的业务操作。
其中,工作单元(Workcell)可以为能够实现一个相对完整和独立的控制流程和操作的系统或设备等资源的组合。本实施例中,以工作单元为基本单位进行工作流创建,更符合工业控制的特点,可提高开发的集成度,并降低开发的复杂度。例如,以工业技术领域为例,工作单元可以根据实际的工业场景定义,比如:可以定义一个工序对应一个工作单元,或者也可以定义工序中的一个工站为一个工作单元,又或者也可以定义工站中的一个工位对应一个工作单元等,不同的工作单元的工艺流程不同。
本实施例中,行为树节点可包括:流控制节点和功能块节点。下面对其分别进行详细描述。
一、流控制节点
流控制节点用于实现工作流中的逻辑控制,其通常独立于工作单元中的特定业务操作。通过流控制节点,用户可以根据自己的需求创建各种工作流。
具体实现时,流控制节点可包括:主控制节点、逻辑控制节点、以及条件节点等。或者,流控制节点也可包括:主控制节点、逻辑控制节点、以及条件节点中的一个或任意组合。下 面分别对其进行简单说明。
1、主控制节点
主控制节点可包括:开始(Start)节点、结束(End)节点、转到(Goto)节点、关键(Anchor)节点、停止(Stop)节点、中止(Abort)节点中的部分或全部。
本实施例中的主控制节点不是标准的行为树元素,但本实施例中它们可用于控制工作流的主要流程,并可链接到工作流的状态机。其中,开始节点是强制性的,此外结束节点或转到节点中的一个也可以是强制性的。主控制节点主要用于定义工作流的开始和结束。此外,其他元素节点可以控制状态机(如中止和停止)或标注可以跳转的关键工艺步骤(如关键节点)。
2、逻辑控制节点
逻辑控制节点可包括:顺序(Se,Sequence)节点、反应性顺序(RSe,Reactive Sequence)节点、并行(Pa,Parallel)节点、工艺内质量控制(IPQ,In-Process QC)节点、优先级(Pr,Priority(Fallback))节点、反应性优先级(RPr,Reactive Priority(Fallback))节点、是否条件判断(ITE,If-Then-Else)节点、以及多分支选择(Sw,Switch)节点中的部分或全部。
逻辑控制节点可定义如何在行为树中执行分支,用于实现所述工作流中的分支逻辑控制等。下面对其中的各个节点进行简单描述如下:
1)顺序节点,该节点可以有一到多个子节点,会按照工作流的顺序依次触发路由到各个子节点。
2)反应性顺序节点,功能同顺序节点,但是会持续检查触发条件。
3)并行节点,该节点可以有一到多个子节点,由上至下顺序启动,并在多进程或多线程中同时执行所有子节点。
4)工艺内质量控制节点,是由质量工程师对一部分工艺步骤做质量检验,如果检验失败就执行异常处理流程,如果成功就继续。
5)优先级节点:按照优先级依次执行各个子分支,如果上一个执行失败就执行下一个,任一分支执行成功就通过。
6)反应性优先级节点:功能同优先级节点,但是会持续检查触发条件。
7)是否条件判断节点:检查触发表达式,如果为真执行真分支,如果为假执行假分支。
8)多分支选择节点:检查触发表达式,并根据不同条件执行不同分支,都不满足执行默认(default)分支。
通常情况下,顺序节点和并行节点可驱动工作流中的大部分逻辑。
3、条件(C,Condition)节点
条件节点通常为行为树中检查表达式的基本逻辑元素,用于执行条件判断,返回判断结果。其根据条件是否成立返回成功或失败。条件节点从不返回运行状态。
此外,在其他实施方式中,条件节点也可包括在功能块节点之内。或者,条件节点也可单独作为一类节点。
二、功能块(FB,Function Block)节点
功能块节点用于执行命令,实现工作流中的业务操作。通常情况下,如果操作正确完成,则返回成功;如果操作失败,则返回失败。当操作正在进行时,则返回运行。
本实施例中,功能块节点包括逻辑节点,此外还可以包括一些特定类型的功能块节点,例如可包括手动(Manual)节点、动态(Dynamic)节点、延迟(Delay)节点、以及空闲(Empty(idle))节点中的部分或全部。其中,动态节点用于在运行时动态注入节点实例。手动节点表示人工步骤,在获取确认信号前停止在当前节点,获取确认信号后退出。延迟节点表示在延时指定时间后退出当前节点。空闲结点表示不执行任何操作,占位符,可以被任意功能块节点替换。其中,每个逻辑节点可对应一个操作模板,每个操作模板预先定义至少一类资源(如协作机器人类或PLC类等设备)能够执行的操作,例如,所述操作可包括:动作、方法或技能。
具体实现时,每个操作模板可由接口部分和实现部分组成。其中实现部分可以是一个应用程序(例如,容器化应用程序),其中包含功能代码和运行依赖项。该应用程序可独立运行,并通过特定的网络通信接口对外公开。接口部分可以是以图形元素呈现的逻辑节点,即其与其他行为树节点一样,可以在图形用户界面中进行拖放、连接和配置。具体实现时,每个逻辑节点可有一个参数面板,用于配置逻辑节点的参数,例如输入和输出参数。当然,这些输入输出参数也可以预先设置有默认值。
每个逻辑节点都可以单独配置和执行。在执行行为树中的逻辑节点时,用户为逻辑节点配置的输入将被读取并传输到操作模板的实现部分,即相应的应用程序。在完成特定的操作如模型转换后,操作结果如转换后的模型将转换回逻辑节点的输出。
本实施例中,每个操作模板的接口部分和实现部分可单独存储。例如,节点库中可只存储接口部分即逻辑节点,其实现部分可存储在一节点服务模块中,本实施例中可称该节点服务模块为运行时(Runtime)。节点服务模块可位于一服务器中或者也可以位于本地。
可选地,上述逻辑节点遵循与主控制器的运行时交互的信息模型。这样,实现了OT域工作流与各种OT设备的主控制器之间的通信的标准化。
此外,考虑到一功能块节点所对应的业务操作可能由不同的主体执行,例如可以是具体 的某个物理设备,也可以是某个人员,还可能是其它的虚拟化名词资源,为描述方便,本文中将这些物理设备、人员、虚拟化名词资源等统称为资源,这些资源通常指现场能够执行工作流的作为各操作主体的资源。
具体实现时,可将作为操作执行主体的资源作为功能块节点的一个普通配置参数在创建行为树时对所需的功能块节点进行相应的资源配置;或者,在创建功能块节点时就为功能块节点配置好作为操作执行主体的资源,这样创建行为树时便无需再对所需的功能块节点进行资源配置。
又或者,为了方便对资源的管理,这些资源也可以资源节点的形式表示,且这些资源节点可以资源知识图谱的形式进行存储。所述资源知识图谱包括:各个资源节点,以及表示资源节点间关系的连线。例如,图1B中示出了一个例子中的一个资源知识图谱的示例图。如图1B所示,该资源知识图谱为一个工厂资源知识图谱,即描述了一工厂的真实系统组态。该工厂(F,Factory)节点具有工控机(IPC)节点,工控机(IPC)节点具有协作机器人(CR,Cooperative Robot)节点、PLC节点和条码扫描器(BCS,Bar Code Scanner)节点。其中,协作机器人(CR,Cooperative Robot)节点具有夹爪(CJ,Clamping Jaw)节点、力矩扳手(TW,Torque Wrench)节点和摄像头(CA,Camera)节点;PLC节点具有按钮(B,Button)节点和LED报警灯节点。当然,有些应用中,某类设备如协作机器人可能不止一个,则该类设备的各个设备可通过标号或型号等加以区分,此处不再一一赘述。
每个功能块节点可通过关联一个资源节点,将该功能块节点实例化为对应资源的操作。例如,某逻辑节点可通过关联一设备资源节点实例化为对应设备的操作。具体实现时,可为功能块节点设置一个资源头(Header),功能块节点所关联的资源会显示在该资源头中。
具体关联过程可有多种不同的实现方式。例如,可预先为每个资源节点关联对应的功能块节点,这样创建行为树时便直接拉取关联有对应资源的功能块节点即可,无需再临时配置。例如,图1C中示出了一个例子中为各资源节点关联了功能块节点的示例图。如图1C所示,针对图1B所示的资源知识图谱中示出的资源,分别关联有对应的功能块节点。其中,工控机(IPC)节点关联有按按钮(PB,Press Button)节点和在屏幕上显示对话框(DDB,Display Dialog Box on Screen)节点;协作机器人(CR,Cooperative Robot)节点关联有线性移动(LM,Linear Move)节点和关节移动(SM,Shutdown Mobile)节点;PLC节点关联有读I/O(RIO,Read I/O)节点和写I/O(WIO,Write I/O)节点;条码扫描器(BCS,Bar Code Scanner)节点关联有扫条码(SBC,Scan Bar Code)节点;夹爪(CJ,Clamping Jaw)节点关联有打开(O,Open)节点和抓取(Gr,Grab)节点;力矩扳手(TW,Torque Wrench)节点关联有拧(T,Twist)节点;摄像头(CA,Camera)节点关联有注册(R,Register)节点、标定(Cb, Calibration)节点、拍照(TP,Take Photo)节点、物体识别(OR,Object Recognition)节点;按钮(B,Button)节点关联有按按钮(PB,Press Button)节点;LED报警灯节点关联有开关打开(SO,Switch On)节点和开关关闭(SF,Switch Off)节点。
或者,也可以不为功能块节点预先关联资源节点,而是在创建行为树时再为所需的功能块节点关联对应的资源节点。
又或者,还可以同时存在预先关联有资源节点的功能块节点(可称为专用功能块节点)和未关联有资源节点的功能块节点(可称为通用功能块节点)。因为通用功能块节点虽然没有关联现场资源,但并不影响包括该功能块节点的行为树对应的工作流的模拟仿真。例如,可能某个协作机器人还没有采购,为了验证可实施性,可预先采用对应的通用功能块节点进行仿真,在确定具有可实施性时,再着手采购即可。
此外,本实施例中还可进一步包括如下的装饰器节点:
三、装饰器节点
装饰器节点主要用于装饰由逻辑控制节点驱动的功能块节点,例如,可用于决定是否可以执行行为树中的分支甚至单个节点。可包括:重复(Rp,Repeat)节点、重试(Rt,Retry)节点、一次性(OS,One-Shot)节点、超时(TO,Timeout)节点、定时器(Tm,Timer)节点、取反(Iv,Inverter)节点、强制运行(FR,Force Run)节点、强制成功(FO,Force OK)节点、强制失败(FF,Force Failed)节点、以及监视(G,Guard)节点中的部分或全部。下面对其中的各个装饰器节点进行简要说明:
1)取反节点,其可以有一个子节点,用于对子节点取反。若子节点失败,则返回成功;若子节点成功则返回失败。
2)强制成功节点,其可以有一个子节点(如功能块节点),不论其子节点是否成功,该节点将始终返回成功。
3)强制失败节点,其可以有一个子节点(如功能块节点),不论其子节点是否成功,该节点将始终返回失败。
4)重复节点,其可以有一个子节点(如功能块节点),可重复执行其子节点固定次数。
5)重试节点,其可以有一个子节点(如功能块节点),可触发其子节点最多N次,如果其子节点返回失败,则重试且次数减一,当重试次数为零时,返回成功;如果子节点返回成功,则中断循环,并且也返回成功。其中,N为正整数。
6)一次性节点,其可以有一个子节点,表示在工作流中其子节点只执行一次,在重启工作流前不再执行。
7)超时节点,其可以有一个子节点,用于对其子节点(如功能块节点)的执行时间进行计时,当超过指定时间后退出执行(哪怕没有执行完)。
8)定时器节点,其可以有一个子节点,在达到指定时间后,执行其子节点(如功能块节点)。
9)强制运行节点,其可以有一个子节点,不论其子节点(如功能块节点)是否执行完毕,都会强制返回正在运行状态。
10)监视节点,其可以有至少一个子节点,用于监视其所有子节点的状态。当任意一个子节点执行错误时,即报错。当全部子节点都正常时,才返回正常。
在其他实施方式中,装饰器节点也可以包含在流控制节点之内。即流控制节点可包括:主控制节点、逻辑控制节点、装饰器节点中的全部或部分。
本实施例中,各行为树节点可以图标的形式列举在图形用户界面上,用户可通过选择、拖拽图标添加到画布上的方式来确定创建工作流所需要的节点,进一步地,还可对节点进行必要的参数配置,如资源配置和/或输入输出参数配置。其中,若一个工作单元要执行的操作,即所需工作流中定义的操作不止一项,则对应该工作流的行为树可包括多个功能块节点,按照操作的顺序和相互关系,可设置对应的流控制节点,通过对所拖拽的节点进行相应的排放连接最终生成对应工作流的行为树。即所述行为树构建操作包括对行为树节点的添加及连线操作。进一步地,还可包括为所添加的功能块节点关联资源的操作。此外,还可包括:对行为树节点的输入输出参数的配置操作。
步骤S12A,响应于所述行为树的构建操作,生成对应一工作流的行为树,所述行为树中的部分或全部功能块节点关联有执行对应业务操作的资源。通常情况下,对于需要由现场资源实施的工作流,该行为树中的全部功能块节点需关联有执行对应业务操作的资源;对于暂时不需要现场资源实施的动作流,例如进行模拟仿真的工作流,则不需要全部功能块节点均关联执行对应业务操作的资源。例如,可能某个协作机器人还没有采购,为了验证可实施性,可预先采用对应的通用功能块节点进行仿真,在确定具有可实施性时,再着手采购即可。
本实施例中,可响应于所述行为树构建操作,将各个行为树节点实例化,并建立各个实例化的行为树节点之间的连接关系。其中,实例化的功能块节点中的部分或全部关联有执行对应业务操作的资源。通过执行本步骤,可将所添加的功能块节点实例化为对应资源的操作。然后基于所述实例化的行为树节点之间的连接关系,生成对应一工作流的行为树。
具体实现时,上述行为树节点可存储在节点库中。此外,对于类似的应用场景,为了避免重复构建行为树的人力、时间等的浪费,对于用户已构建完成最好是已调试或运 行成功的对应工作流或对应子工作流的行为树(或未实例化的行为树框架)作为一个工作流节点或子工作流节点进行存储。相应地,节点库中可进一步包括工作流(WF,WorkFlow)节点和子工作流(SWF,SubWorkFlow)节点。当用户需要构建类似的行为树时或构建包括该工作流或子工作流的行为树时,可选取对应的工作流节点或子工作流节点并对其进行必要的配置以得到用于实现所需工作流的行为树。
图2A中示出了一个例子中构建质检生产线工作单元的行为树的示意图。图2B至图2S分别示出了一个例子中构建的部分行为树的示意图。其中,箭头方向表示对应节点的执行顺序。
上述表征工作流的行为树的构建过程中,功能块节点可以理解为以标签图的形式呈现,并且这种基于功能块标签图的行为树的构建需要流控制节点甚至以及装饰器节点的参与。此外,本发明实施例中还提供一种基于功能块类型图的行为树构建方法,该方法中,功能块节点以类型图的形式呈现。实际应用中,这两种行为树构建方法可以共存,并且采用其中一种方式进行行为树构建时,另外一种方式也被同步构建。例如,当基于功能块类型图顺序连接两个功能块节点时,则同步构建基于功能块标签图的行为树时,会自动添加一个顺序节点,并为该顺序节点由上到下添加所述两个功能块节点。
图1D示出了本申请实施例提供的另一种工作流生成方法的示例性流程图。如图1D所示,该方法可包括如下步骤:
步骤S11B,接收用户在图形用户界面上基于功能块类型图进行的功能块节点的添加及连线操作。本申请中,类型图和标签图可以理解为是同一功能块节点的两种呈现方式,其功能都是用于实现一个对应的业务操作。
图2T中示出了一个例子中基于功能块类型图的功能块节点构建行为树的示例。该示例中,示出了两个功能块节点F1、F2。如图2T所示,功能块类型图可包括:
1)用于指示业务操作的类型的功能块名称201。例如,螺丝紧固、图像采集、录制视频、视觉向导等。具体实现时,可在将功能块节点从节点库拖动到画布上时,默认功能块名称将由功能块定义的默认名称加上实例编号生成,图2U中以功能块节点中的逻辑节点为例,名称采用“逻辑节点1”和“逻辑节点2”来表示。功能块名称是可编辑的,但在当前的全局工作流中应该是唯一的。
2)用于指示执行业务操作的资源的功能块头202。例如,执行螺丝紧固的资源为力矩扳手,执行图像采集的资源为监控器,执行录制视频的资源为监控器,执行视觉向导的资源为摄像头等。通常情况下,逻辑节点的功能块头202一般为物理资源,如图2U中所示的“物 理节点1”和“物理节点2”。如前所述,功能块头202所指示的资源可以是预先关联的,也可以是在添加该功能块节点后通过资源配置完成对应资源的关联。
3)用于触发链路连接的链路输入端口203和链路输出端口204。本实施例中,功能块节点的连线操作可包括:在两个功能块节点F1和F2之间的链路输出端口204和链路输入端口203之间的连线操作。通过该连线操作,在两个功能块节点F1和F2之间建立了链路连接205。本示例中的链路连接205为用于指示工作流运行过程的单向连接,例如,可指示两个功能块节点的执行顺序,即先执行左边的功能块节点F1再执行右边的功能块节点F2。
具体实现时,为了避免点选误差,提高功能块节点连线的灵敏度,在链路输入端口203的设定范围内具有一个敏感区206,这里称为第一敏感区,用于在该第一敏感区内接收到用户的点选及连线操作时,将连线端点定位到所述链路输入端口203上。同理,在链路输出端口204的设定范围内也可具有一个敏感区(图中未示出),这里称为第二敏感区,用于在该第二敏感区内接收到用户的点选及连线操作时,将连线端点定位到所述链路输出端口204上。
此外,本实施例中,响应于两个功能块节点F1和F2之间的链路输出端口204和链路输入端口203之间的连线操作,可进一步为相互连接的功能块节点F1和F2生成用于指示各功能块节点执行顺序的指令标签207,并将所述指令标签207标识在所述功能块节点F1和F2的功能块类型图上。如图中所示的1和2。此外,该指令标签205还可用于作为跳转指令的索引,以及作为说明文档的章节索引。
4)用于表示所有数据输入端口的集合的输入数据组块208和用于表示所有数据输出端口的集合的输出数据组块209。本实施例中,可将功能块节点的数据输入端口的数量标识在输入数据组块208上,如功能块节点F1的输入数据组块208上的5和功能块节点F2的输入数据组块208上的2,如果数据输入端口的数量为零,则可以隐藏该输入数据组块208。同理可将功能块节点的数据输出端口的数量标识在输出数据组块209上,如功能块节点F1的输出数据组块209上的3和功能块节点F2的输出数据组块209上的1,如果数据输出端口的数量为零,则可以隐藏该输出数据组块209。
本实施例中,如图2U至2X所示,通过点击所述输入数据组块208可展开或隐藏所述功能块节点的各个数据输入端口。通过点击所述输出数据组块209可展开或隐藏所述功能块节点的各个数据输出端口。其中,2U中示出了通过点击隐藏逻辑节点2的数据输入端口的示意图,2V中示出了通过点击隐藏逻辑节点1的数据输出端口的示意图,图2W中示出了同时显示各个数据输入端口和各个数据输出端口的示意图,图2X中示出了同时隐藏各个数据输入端口和各个数据输出端口的示意图。
5)用于触发数据传输的数据输入端口210和数据输出端口211。本实施例中,功能块节点的连线操作还可包括:在两个功能块节点F1和F2的对应数据之间的数据输出端口211和数据输入端口210之间的连线操作。通过该连线操作,在两个功能块节点F1和F2之间建立了数据连接212。本示例中的数据连接212用于指示两个功能块节点F1和F2之间的数据传输。如图2U所示,在功能块节点F1的输出数据1的数据输出端口211与功能块节点F2的输入数据2的数据输入端口210之间建立有数据连接212,即表示功能块节点F1的输出数据1作为功能块节点F2的输入数据2。
具体实现时,与链路输入/输出端口相类似,为了避免点选误差,提高功能块节点连线的灵敏度,在数据输入端口210的设定范围内也可具有一个敏感区(图中未示出),这里称为第三敏感区,用于在该第三敏感区内接收到用户的点选及连线操作时,将连线端点定位到所述数据输入端口210上。同理,在数据输出端口211的设定范围内也可具有一个敏感区(图中未示出),这里称为第四敏感区,用于在该第四敏感区内接收到用户的点选及连线操作时,将连线端点定位到所述数据输出端口211上。
6)功能块图标213,具体地,该功能块图标213可以为矢量图标213,用于形象化地表示功能块节点的业务操作。当然,在其他实施方式中,功能块图标213也可以省略。
7)用于承载上述各组成部分的功能块主体214。本实施例中,功能块节点的添加操作可包括:对功能块主体214的拖拽操作。
步骤S12B,响应于所述功能块节点的添加及连线操作,构建对应一工作流的行为树。
本步骤中,响应于所述功能块节点的添加及连线操作,可同步构建S12A中包括流控制节点和基于功能块标签图的功能块节点的行为树;同理,步骤S12A中,构建包括流控制节点和基于功能块标签图的功能块节点的行为树时,也可同步构建S12B中的基于所述功能块类型图的行为树。并且这两种行为树构建界面可根据用户的选择进行切换。例如,可根据用户对基于所述功能块类型图的行为树或基于功能块标签图的行为树的点选操作,对所述基于所述功能块类型图的行为树或基于功能块标签图的行为树进行切换显示。
进一步地,在其他实施方式中,无论是基于标签图形式的功能块节点还是基于类型图形式的功能块节点进行行为树的创建,均可以进一步为所述行为树中的至少一个功能块节点中的每个功能块节点添加并连接至少一个数据块。其中,每个数据块用于呈现与之连接的功能块节点的业务操作中的对应数据。数据块的类型可包括数据对、数据表、图像、视频和图表等中的部分或全部。
图2Y示出了本申请一个例子中为行为树中的四个功能块节点分别添加了数据块以 及在各个数据块中显示相应数据的示意图。该例子中,以基于功能块类型图的行为树创建界面为例,如图2Y所示,本示例中,关联有监视器的录制生产视频的功能块节点添加有类型为实时视频数据(Live Data-Video)的数据块;关联有力矩扳手的螺丝紧固的功能块节点添加有类型为实时文本数据(Live Data-Text)的数据块和类型为实时图表数据(Live Data-Chart)的数据块;关联有监控器的机器人图像采集的功能块节点添加有类型为实时图像数据(Live Data-Image)的数据块;关联有摄像头的机器视觉向导的功能块节点添加有类型为实时视频数据(Live Data-Video)的数据块。
如图2Y所示,每个数据块可包括用于指示数据块的类型的数据块标签215和具有用于呈现具体数据的显示区域的数据块体216。其中,数据块标签215可以是一个可拖动的标签,例如可以移动到画布中的任何位置。数据块体216的显示区域的大小可调,用于实时显示来自数据层的不同类型的数据。在每个数据块与对应的功能块节点之间建立有监控链路217,一个功能块可以映射到多个数据块。当工作流被执行时例如在运行时中执行时,功能块节点对应的监控和输出数据将传输到对应的数据块以实时显示。
本实施例中的数据块为低代码数据块,其与其他SCADA和仪表板系统的区别在于:本实施例中的低代码数据块也是低代码元素,其可作为行为树的一部分,且其所有属性都可以在低代码逻辑中管理。
其中,低代码数据块中的数据源来自于数据层,其可在运行时或云执行引擎中通过数据层提供的接口获取数据。数据源可以是时间序列数据库、RDBMS或NoSQL。低代码数据块是一个灵活的可扩展可适配的系统,可以适用于任何可以关联物理设备的功能块节点。总之,用于实现数据监控的数据块可以认为是数据层的可视化界面。
进一步地,在其他实施方式中,无论是基于标签图形式的功能块节点还是基于类型图形式的功能块节点进行行为树的创建,均可以进一步为所述行为树中的至少一个功能块节点中的每个功能块节点添加并连接至少一个数据块。其中,每个数据块用于呈现与之连接的功能块节点的业务操作中的对应数据。数据块的类型可包括数据对、数据表、图像、视频和图表等中的部分或全部。
图2Y示出了本申请一个例子中为行为树中的四个功能块节点分别添加了数据块以及在各个数据块中显示相应数据的示意图。该例子中,以基于功能块类型图的行为树创建界面为例,如图2Y所示,本示例中,关联有监视器的录制生产视频的功能块节点添加有类型为实时视频数据(Live Data-Video)的数据块;关联有力矩扳手的螺丝紧固的功能块节点添加有类型为实时文本数据(Live Data-Text)的数据块和类型为实时图表数据 (Live Data-Chart)的数据块;关联有监控器的机器人图像采集的功能块节点添加有类型为实时图像数据(Live Data-Image)的数据块;关联有摄像头的机器视觉向导的功能块节点添加有类型为实时视频数据(Live Data-Video)的数据块。
如图2Y所示,每个数据块可包括用于指示数据块的类型的数据块标签215和具有用于呈现具体数据的显示区域的数据块体216。其中,数据块标签215可以是一个可拖动的标签,例如可以移动到画布中的任何位置。数据块体216的显示区域的大小可调,用于实时显示来自数据层的不同类型的数据。在每个数据块与对应的功能块节点之间建立有监控链路217,一个功能块可以映射到多个数据块。当工作流被执行时例如在运行时中执行时,功能块节点对应的监控和输出数据将传输到对应的数据块以实时显示。
本实施例中的数据块为低代码数据块,其与其他SCADA和仪表板系统的区别在于:本实施例中的低代码数据块也是低代码元素,其可作为行为树的一部分,且其所有属性都可以在低代码逻辑中管理。
其中,低代码数据块中的数据源来自于数据层,其可在运行时或云执行引擎中通过数据层提供的接口获取数据。数据源可以是时间序列数据库、RDBMS或NoSQL。低代码数据块是一个灵活的可扩展可适配的系统,可以适用于任何可以关联物理设备的功能块节点。总之,用于实现数据监控的数据块可以认为是数据层的可视化界面。
此外,在其他实施方式中,该实施例可如图1A和图1B中的虚线部分所示,进一步包括下述步骤S13。
步骤S13,对所述行为树进行解析,将所述行为树对应的工作流部署到对应的工作单元的运行时上,以使得所述运行时执行所述工作流以控制所述工作单元中的各个资源按照所述工作流执行业务操作。针对连接有数据块的行为树,所述运行时可进一步将执行业务操作过程中获取的对应数据提供给对应的数据块进行显示。具体实现时,运行时可将执行业务操作过程中获取的对应数据直接提供给对应的数据块进行显示或通过第三方设备提供给对应的数据块进行显示。
具体实现时,该工作单元可具有一个主控制器,此时,运行时可位于该工作单元的主控制器上。相应地,资源中的设备资源可连接到该主控制器上,由该主控制器根据运行时的工作流控制与之连接的设备资源执行相应的业务操作;资源中的人力资源等可直接根据运行时的工作流提示执行相应的操作。
本实施例中,行为树可以Markup标记语言例如XML(可扩展标记语言)来存储,并且可被XML Schema(XSD)原型来校验,以验证该行为树的XML格式是正确的。对所述 行为树进行解析后可得到以“节点链接汇编”的形式表示的工作流,之后将该工作流编译并下载到对应的工作单元的主控制器的运行时上即可。
此外,根据Gartner的定义,OT域通常指运营技术(Operational Technology,OT),其集合了硬件和软件,通过直接地监视和/或控制物理设备(称为OT设备),检测或触发企业中过程的变化或发生的事件。OT利用计算机监视或改变诸如工业控制系统(Industrial Control System,ICS)的物理状态。其中,工业控制系统是基于计算机实现的设施、系统和设备,用于远程监视和/或控制关键的工业过程,实现物理功能。“OT”这个词的叫法用于将工业控制系统和传统的信息技术(Information Technology,IT)系统在技术实现和功能上加以区分。
目前,市场上存在诸多IT低代码开发工具或平台。其中,部分工具针对物联网的使用场景,面向有经验的IT工程师,而OT工程师和初级IT工程师则难以理解其范式。而部分工具更适用于IT域低代码开发的使用场景,不能很好地适用于OT域。
本实施例中的上述工作流生成方法可以用于此OT域,作为一种OT域低代码开发方法。具体地,图1A所示工作流生成方法可以在OT域例如一OT域低代码开发平台上予以实现,相应地,所述工作流可以为OT域工作流;所述工作单元可以为OT域内的工作单元;所述设备可以为OT设备。这里,OT设备可包括但不限于:物联网(Internet of Things,IoT)设备、可编程逻辑控制器(Programmable Logic Controller,PLC)、机器人(Robotics)、人工过程(Manual Process)、工控机(Industrial Personal Computer,IPC)等。
此外,本申请实施例中,考虑到目前IT域、OT域融合在企业数字化转型过程中变得日趋重要。为了将IT域、OT域融合为ITOT系统,目前一个亟待解决的问题是企业如何采用易于理解、而不是IT域编程的方式来收集OT域的数据并控制OT域过程。
本实施例中的上述工作流生成方法可以用于此ITOT系统,作为一种可与IT域融合的OT域低代码开发方法。同样,图1A所示工作流生成方法可以在OT域例如一OT域低代码开发平台上予以实现,相应地,所述工作流可以为OT域工作流;所述工作单元可以为OT域内的工作单元。
此外,为了实现IT域、OT域融合,可在图1A所示工作流生成方法的基础上,进一步包括:基于所述行为树生成一个微服务,以使得一IT设备通过调用所述微服务而触发所述工作单元的主控制器的运行时执行所述OT域工作流。具体实现时,所述IT设备可直接调用或通过一个知识中台调用所述微服务。相应地,本实施例中,运行时可将执行业务操作过程中获取的对应数据通过所述微服务提供给对应的数据块进行显示。或者,运行时可将执行业务操作过程中获取的对应数据提供给所述知识中台,由所述知识中台对所述数据进行包括过滤在内的处理后,直接提供或通过所述微服务提供给对应的数据块进行显示。
在基于所述行为树生成一个微服务时,可基于所述行为树生成所述微服务的API。其中,所述API中的处理过程包括所述OT域工作流中各个操作,所述API的输入参数为所述OT域工作流的的输入端口获取的参数,所述API的输出参数为所述OT域工作流的输出端口输出的参数。
若要实现IT域能够调用微服务,则需要IT域能够获取微服务的信息。具体实现的方式包括但不限于以下两种:
方式一、
在方式一中,OT域的代码开发人员可将生成的各微服务的名称和IP地址通知IT域的代码开发人员,这样,IT域的代码开发人员在开发过程中可直接将各微服务的信息写入代码中,从而实现IT设备对微服务的调用。方式一比较适合微服务数量较少的场景。
方式二、
在方式二中,可采用注册、发现机制。即在所述知识中台上注册各微服务,以使得一IT域代码开发工具实现IT设备通过所述知识中台发现已连接的所述微服务。具体实现时,可利用一IT域代码开发工具通过代码开发实现IT域设备通过知识中台发现已连接的微服务。而完成微服务注册的装置可以是OT域微服务生成器或一个第三方装置。该第三方装置可以视为OT域低代码开发平台的一部分,或者在知识中台中实现。方式二比较适合微服务数量较多的场景。
本实施例中,IT设备可包括但不限于:制造运营管理(Manufacturing Operation Management,MOM)系统、制造执行系统(manufacturing execution system,MES)、企业资源计划(Enterprise Resource Planning,ERP)系统、企业服务总线(Enterprise Service Bus,ERP)、产品生命周期管理(Product Lifecycle Management,PLM)系统等。
本实施例中,由于IT域代码开发工具可通过编程实现IT设备通过一个知识中台调用微服务而触发工作单元的主控制器的运行时执行OT域工作流,从而实现了IT域的代码开发平台对OT域流程的控制,即实现了IT域和OT域的融合。这里,微服务是OT域微服务生成器基于OT域行为树自动生成的,无需IT域的代码开发工具理解OT域工作流的细节,仅需获取微服务的标识(比如:名称)和IP地址即可,无需IT域的开发人员了解OT域设备和控制流程,容易实现和理解。
本申请实施例可适用的领域包括但不限于:工业自动化(Industrial Automation),物流(Logistics),实验室(Laboratory),船舶电气(Maritime),智能电网(Smart Grid),电动汽车基础设施(Electric Vehicle Infrastructure),电动汽车(Electric Vehicle),楼宇自动化(Building Automation),智慧城市(Smart City),污水处理(Water Treatment),垃圾回收(Garbage Recycling) 和智慧农业(Smart Farm)等。
以上对本申请实施例中的工作流生成方法进行了详细描述,下面再对本申请实施例中的工作流生成系统进行详细描述。本申请实施例中的工作流生成系统可用于实施本申请实施例中的工作流生成方法,对于本发明系统实施例中未详细披露的细节可参见本发明方法实施例中的相应描述,此处不再一一赘述。
图3示出了本申请实施例中一种工作流生成系统的结构示意图。如图3所示,该系统可包括:节点库110、图形界面模块120和编辑处理模块130。
其中,节点库110中设置有用于构建行为树的行为树节点;所述行为树节点可包括:流控制节点和功能块节点。其中,一个行为树用于表征一个工作流,所述工作流用于定义一个工作单元要执行的操作。所述流控制节点用于实现工作流中的逻辑控制;所述功能块节点用于实现工作流中的业务操作,功能块节点可包括:逻辑节点,每个逻辑节点对应一个操作模板,每个操作模板预先定义至少一类资源如设备能够执行的操作,所述操作包括:动作、方法或技能。此外,节点库110中可进一步包括各个类型的数据块,每个数据块用于呈现与之连接的功能块节点的业务操作中的对应数据。所述数据块的类型包括:数据对、数据表、图像、视频和图表等数据类型中的部分或全部。
在一个实施方式中,所述资源以资源节点的形式表示,且所有资源节点以资源知识图谱的形式关联存储;所述资源知识图谱包括:各个资源节点,以及表示资源节点间关系的连线。相应地,本实施例中可如图中的虚线部分所示,进一步包括:资源库150,用于以资源知识图谱的形式存储各个资源,每个资源能够执行至少一种业务操作。
在一个实施方式中,所述流控制节点可包括:主控制节点、逻辑控制节点和条件节点中的部分或全部;所述主控制节点可包括:开始节点、结束节点、转到节点、关键节点、停止节点、中止节点中的部分或全部。所述逻辑控制节点包括:顺序节点、反应性顺序节点、并行节点、工艺内质量控制节点、优先级节点、反应性优先级节点、是否条件判断节点、以及多分支选择节点中的部分或全部。
在一个实施方式中,所述功能块节点还可进一步包括:手动节点、动态节点、延迟节点、以及空闲节点中的部分或全部。
在一个实施方式中,所述行为树节点进一步包括:装饰器节点,其可包括:重复节点、重试节点、一次性节点、超时节点、定时器节点、取反节点、强制运行节点、强制成功节点、强制失败节点、以及监视节点中的部分或全部。
在一个实施方式中,所述节点库110中的部分或全部功能块节点分别绑定有执行所述功能块节点对应的业务操作的资源。
此外,在另一个实施方式中,节点库110中的功能块节点既可以如图2A至图2T中所示的标签图的形式呈现,也可以如图2T至图2X中的类型图的形式呈现。当然,在其他实施方式中,节点库110中的功能块节点也可以只以类型图的形式呈现。其中,功能块类型图形式的功能块节点的具体结构可如图2T所示。此处不再赘述。
图形界面模块120被配置为提供用户基于所述节点库中的行为树节点进行行为树构建操作的图形用户界面GUI。此外,该图形用户界面GUI上还可以进行数据块的添加及连接操作。
具体实现时,图形用户界面可包括基于流控制节点和功能块标签图形式的功能块节点构建行为树的第一图形用户界面和基于功能块类型图形式的功能块节点构建行为树的第二图形用户界面,且两个图形用户界面可根据用户的选择进行切换显示。其中,行为树构建操作可包括功能块节点的添加及连线操作。在第二图形用户界面上,所述功能块节点的添加操作可包括:对所述功能块主体的拖拽操作;所述功能块节点的连线操作可包括:在两个功能块节点之间的链路输出端口和链路输入端口之间的连线操作,以及在两个功能块节点的对应数据之间的数据输出端口和数据输入端口之间的连线操作。
其中,各行为树节点可以图标的形式列举在图形用户界面GUI上。
编辑处理模块130被配置为响应于所述行为树的构建操作,生成对应一工作流的行为树。此外,编辑处理模块130还被配置为响应于所述数据块的添加及连接操作,为所述行为树中的至少一个功能块节点中的每个功能块节点添加并连接至少一个数据块。
具体实现时,在一个实施方式中,编辑处理模块130可响应于所述行为树构建操作,将各个行为树节点实例化,并建立各个实例化的行为树节点之间的连接关系;基于所述实例化的行为树节点之间的连接关系,生成对应一工作流的行为树。其中,实例化的功能块节点中的部分或全部关联有执行对应业务操作的资源。例如,通过该操作,逻辑节点被实例化为对应资源如设备的操作。
本实施例中,各行为树节点以及各数据块可以图标的形式列举在图形用户界面上,用户可通过选择、拖拽图标添加到画布上的方式来确定创建工作流所需要的节点,进一步地,还可对节点进行必要的参数配置,如资源配置和/或输入输出参数配置。
其中,若一个工作单元要执行的业务操作,即所需工作流中定义的业务操作不止一项,则对应该工作流的行为树可包括多个逻辑节点,按照操作的顺序和相互关系,可确定逻辑节点之间的执行顺序,并通过对所拖拽的节点进行相应的排放连接最终生成对应工作流的行为树。
在一个实施方式中,所述行为树构建操作可包括:添加功能块节点操作以及为所添加的 功能块节点关联资源的操作。
与图1A所示方法相对应,本实施例中的工作流生成系统可进一步包括:解析部署模块140,其被配置为解析所述行为树,将所述行为树对应的工作流部署到对应的工作单元的运行时上,以使得所述运行时执行所述工作流以控制所述工作单元中的各个资源按照所述工作流执行业务操作。进一步地,可将执行业务操作过程中获取的对应数据提供给对应的数据块进行显示。具体地,该工作单元可具有一个主控制器,此时,运行时可位于该工作单元的主控制器上。相应地,资源中的设备资源可连接到该主控制器上,由该主控制器根据运行时的工作流控制与之连接的设备资源执行相应的操作;资源中的人力资源等可直接根据运行时的工作流提示执行相应的操作。
具体实现时,该工作单元可具有一个主控制器,此时,运行时可位于该工作单元的主控制器上。相应地,资源中的设备资源可连接到该主控制器上,由该主控制器根据运行时的工作流控制与之连接的设备资源执行相应的操作;资源中的人力资源等可直接根据运行时的工作流提示执行相应的操作。
图4A示出了本申请实施例提供的一种OT域低代码开发平台100,该平台100可用于实现图3所示的工作流生成系统。
如前所述,目前还没有一种适用于OT域的低代码开发工具和平台。图4A所示的平台100中,由于预先定义了各类OT设备能够执行操作的操作模板(可视为提供了OT域的能力),并基于操作模板构造了对应的逻辑节点,同时设置了用于构建OT域工作流的其他行为树节点,因此可以方便且快捷地创建对应OT域工作流的行为树,实现了适用于OT域的低代码开发。开发工程师无需对各类OT设备有深入的理解,即能实现OT域开发。
具体地,如图4A所示,OT域低代码开发平台100可包括:
一个OT域低代码开发工具10,该OT域低代码开发工具10可被配置为实现图3所示工作流生成系统中的图形界面模块120和编辑处理模块130,进一步地,还可实现图3所示工作流生成系统中的解析部署模块140。图3所示工作流生成系统中的节点库110以及资源库150可存储在一存储器上。
进一步地,如图4B所示,OT域低代码开发平台100还可包括上述工作单元的主控制器的运行时30。OT域低代码开发工具10可将生成的行为树对应的OT域工作流部署到工作单元的主控制器的运行时30上,以使得所述运行时30执行所述工作流以控制连接到该主控制器上的该工作单元中的各个OT资源如OT设备按照OT域工作流执行操作。
图4A和图4B所示的OT域低代码开发平台100的组成仅涉及OT域。但IT域与OT域融合对于企业数字化转型已经变得越来越重要。需要实现的是企业如何采用一种易懂且非IT 编程的方式来控制OT域的流程。图4C所示的OT域低代码开发平台100解决了如何通过IT域的代码开发平台300来控制OT域的流程。如图4C所示,OT域低代码开发平台100在图4B所示的结构基础上,还可进一步包括一个OT域微服务生成器20,其可基于OT域行为树生成微服务40。这样,IT域代码开发工具301即可通过编程实现IT设备通过一个知识中台200调用微服务40而触发工作单元的主控制器的运行时30执行OT域工作流。从而实现了IT域的代码开发平台300对OT域流程的控制,即实现了IT域和OT域的融合。这里,微服务40是OT域微服务生成器20基于OT域行为树自动生成的,无需IT域的代码开发工具301理解OT域工作流的细节,仅需获取微服务40的标识(比如:名称)和IP地址即可,无需IT域的开发人员了解OT域设备和控制流程,容易实现和理解。
若要实现IT域能够调用微服务40,则需要IT域能够获取微服务40的信息。与图1A所示方法相对应,其可实现的方式包括但不限于以下两种:
方式一、
在方式一中,OT域的代码开发人员可将生成的各微服务40的名称和IP地址通知IT域的代码开发人员,这样,IT域的代码开发人员在开发过程中可直接将各微服务40的信息写入代码中,从而实现IT设备对微服务40的调用。方式一比较适合微服务数量较少的场景。
方式二、
在方式二中,可采用注册、发现机制。其中,可在知识中台200上注册各微服务40,这样IT域代码开发工具301则可通过代码开发实现IT域设备通过知识中台200发现已连接的微服务40。而完成微服务40注册的装置可以使OT域微服务生成器20或如图4D所示的一个第三方装置50。该第三方装置50可以视为OT域低代码开发平台100的一部分,或者在知识中台200中实现。方式二比较适合微服务数量较多的场景。通过在知识中台上注册微服务,更加有效地实现了IT设备对微服务的调用,加强了OT域和IT域的融合。
可选地,OT域微服务生成器20可基于OT域行为树生成微服务40的API,其中,API中的处理过程可包括OT域工作流中各个功能块的操作,API的输入参数为OT域工作流的的输入端口获取的参数,API的输出参数为OT域工作流的输出端口输出的参数。
本申请实施例提供的OT域低代码开发平台100在工业自动化领域的一个应用场景如图4E所示。低代码开发工具10在用户的操作下生成对应OT域工作流的行为树,该OT域工作流定义了图4E右侧所示的作为一个工作单元的生产线要执行的操作。基于该行为树生成对应的工作流发布到运行时30,以便由运行时30控制完成所述工作单元的生产线操作;同时可基于该行为树由微服务生成器20生成对应的微服务并注册到知识中台200,这样IT域的代码开发工具301便可通过知识中台200调用对应的微服务。用户可如图4E左下角GUI中所 示通过拖拽编辑包括功能块节点在内的各个节点实现对OT域行为树的编辑,比如:首先通过知识中台200从数据库&服务器处获取所需的数据(比如:工件加工参数),控制整个工作单元的运行。这里的工作单元为一个生产线,生产线上包括机器、传送带、机械臂、人、PLC、AGB等。具体实现时,IT域的代码开发工具301也可和低代码开发工具10位于同一硬件设备上,例如同一台电脑上。
图5示出了本申请实施例提供的又一种工作流生成系统的结构示意图。如图5所示,该系统可用于实施图1A中所示的方法,或实现图3中所示的工作流生成系统,或实现图4A至图4D中任一项所述的工作流生成系统,即OT域低代码开发平台100。其中,前述的OT域低代码开发工具10、OT域微服务生成器20、运行时30、第三方装置60均可实现为单独的各个硬件设备,比如:服务器、工作站、单片机或处理芯片。或者,这些装置在同一台硬件设备上实现,其作为软件程序存储在至少一个存储器中,通过至少一个处理器的调用来实现前述的OT域低代码开发方法。其中,节点库110和生成的各个微服务40可存储在至少一个存储器中。
如图5所示,该系统可包括:至少一个存储器51、至少一个处理器52和至少一个显示器53。此外,还可以包括一些其它组件,例如通信端口(图5中未示出)等。这些组件通过总线54进行通信。
其中,至少一个存储器51用于存储计算机程序。至少一个存储器51可包括计算机可读介质,例如随机存取存储器(RAM)。此外,至少一个存储器51还可存储操作系统等。操作系统包括但不限于:Android操作系统、Symbian操作系统、Windows操作系统、Linux操作系统等等。上述计算机存储程序可包括如下程序模块:节点库110、图形界面模块120、编辑处理模块130、解析部署模块140,可选地,还可包括OT域微服务生成器20、运行时30、第三方装置50。
至少一个处理器52用于调用至少一个存储器51中存储的计算机程序,执行本申请实施例中所述的工作流生成方法。至少一个处理器52可以为微处理器、专用集成电路(ASIC)、数字信号处理器(DSP)、中央处理单元(CPU)、图形处理单元(GPU)、状态机等。其可通过所述通信端口进行数据的接收和发送。
至少一个显示器53用于显示图像用户界面。
具体地,至少一个处理器52用于调用至少一个存储器51中存储的计算机程序使所述系统执行上述任一实施方式中的工作流生成方法中的操作。
此外,通信接口用于实现与其他设备之间的通信,比如与知识中台200之间通信。
本申请实施例中,用于实现图形界面模块120、编辑处理模块130和解析部署模块140 的OT域低代码开发工具10可以为轻量级的基于web的应用程序,可在工业现场(比如边缘设备或本地服务器)上实现,也可在云端(诸如AWS的公共云或诸如OpenStack的私有云)上实现。其可视化的工程范式源于功能块类型图表(Function Block Typed Diagram,FBTD)。OT域微服务生成器20可使用现代的翻译编程语言来生成诸如RESTful或RPC的标准API。运行时30可简单地实现OT域工作流,并基于开源社区(比如Python)的生态系统提供开放性。运行时30可部署在诸如单板计算机(Single Board Computer,SBC)的嵌入式IoT设备上。
应当提及的是,本申请实施例可以包括具有不同于图5所示架构的装置。上述架构仅仅是示例性的,用于解释本申请实施例提供的工作流构建方法。
此外,本申请实施例还提供一种IT域OT域融合系统,即ITOT系统,其可包括IT设备和本申请任一实施方式中的工作流生成系统。此外,还可进一步包括:如图4C和图4D所示的IT域的代码开发平台300。
此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机可读代码,计算机可读代码在被处理器执行时,使处理器执行前述的工作流构建方法。另外,本申请实施例还提供一种计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可读指令,所述计算机可读指令在被执行时使至少一个处理器执行本申请实施例中的工作流生成方法中的步骤。
具体地,可以提供配有存储介质的系统或者装置,在该存储介质上存储着实现上述实施例中任一实施方式的功能的计算机可读代码,且使该系统或者装置的计算机(或CPU或MPU)读出并执行存储在存储介质中的计算机可读代码。此外,还可以通过基于计算机可读代码的指令使计算机上操作的操作系统等来完成部分或者全部的实际操作。还可以将从存储介质读出的计算机可读代码写到插入计算机内的扩展板中所设置的存储器中或者写到与计算机相连接的扩展单元中设置的存储器中,随后基于计算机可读代码的指令使安装在扩展板或者扩展单元上的CPU等来执行部分和全部实际操作,从而实现上述实施方式中任一实施方式的功能。本实施例中,计算机可读介质的实施例包括但不限于软盘、CD-ROM、磁盘、光盘(如CD-ROM、CD-R、CD-RW、DVD-ROM、DVD-RAM、DVD-RW、DVD+RW)、存储器芯片、ROM、RAM、ASIC、配置的处理器、全光介质、所有磁带或其他磁性介质,或计算机处理器可以从中读取指令的任何其他介质。此外,各种其它形式的计算机可读介质可以向计算机发送或携带指令,包括路由器、专用或公用网络、或其它有线和无线传输设备或信道,例如可以由通信网络从服务器计算机上或云上下载计算机可读指令。指令可以包括任何计算机编程语言的代码,包括C、C++、C语言、Visual Basic、java和JavaScript。
需要说明的是,上述各流程和各系统结构图中不是所有的步骤和模块都是必须的,可以根据实际的需要忽略某些步骤或模块。各步骤的执行顺序不是固定的,可以根据需要进行调整。上述各实施例中描述的系统结构可以是物理结构,也可以是逻辑结构,即,有些模块可能由同一物理实体实现,或者,有些模块可能分由多个物理实体实现,或者,可以由多个独立设备中的某些部件共同实现。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (14)

  1. 工作流生成方法,其特征在于,包括:
    接收用户在图形用户界面上进行的行为树构建操作,所述行为树构建操作包括对包括功能块节点在内的行为树节点的添加及连线操作;其中,一个行为树用于表征一个工作单元中各资源要执行的业务操作的工作流;所述功能块节点用于实现工作流中的业务操作;
    响应于所述行为树构建操作,将各个行为树节点实例化,并建立各个实例化的行为树节点之间的连接关系;其中,实例化的功能块节点中的部分或全部关联有执行对应业务操作的资源;
    基于所述实例化的行为树节点之间的连接关系,生成对应一工作流的行为树。
  2. 根据权利要求1所述的工作流生成方法,其特征在于,接收用户在图形用户界面上进行的行为树构建操作之前,进一步包括:预先为部分或全部功能块节点分别关联执行所述功能块节点对应的业务操作的资源。
  3. 根据权利要求1所述的工作流生成方法,其特征在于,所述行为树构建操作进一步包括:为所添加的功能块节点关联资源的操作。
  4. 根据权利要求2或3所述的工作流生成方法,其特征在于,所述资源以资源节点的形式表示,且所有资源节点以资源知识图谱的形式关联存储;所述资源知识图谱包括:各个资源节点,以及表示资源节点间关系的连线。
  5. 根据权利要求1至4中任一项所述的工作流生成方法,其特征在于,进一步包括:对所述行为树进行解析,将所述行为树对应的工作流部署到对应的工作单元的运行时上,以使得所述工作单元中的各个资源按照所述工作流执行操作。
  6. 根据权利要求5所述的工作流生成方法,其特征在于,所述工作流为OT域工作流;所述工作单元为OT域内的工作单元;所述资源包括OT设备。
  7. 工作流生成系统,其特征在于,包括:
    节点库(110),其中设置有用于构建行为树的行为树节点;所述行为树节点包括:功能块节点;其中,一个行为树用于表征一个工作单元中各资源要执行的业务操作的工作流;所述功能块节点用于实现工作流中的业务操作;
    图形界面模块(120),被配置为提供用户进行行为树构建操作的图形用户界面,所述行为树构建操作包括对包括功能块节点在内的行为树节点的添加及连线操作;
    编辑处理模块(130),被配置为响应于所述行为树构建操作,将各个行为树节点实例化,并建立各个实例化的行为树节点之间的连接关系;其中,实例化的功能块节点中的部分或全部关联有执行对应业务操作的资源;基于所述实例化的行为树节点之间的连接关系,生成对应一工作流的行为树。
  8. 根据权利要求7所述的工作流生成系统,其特征在于,进一步包括:资源库(150),用于以资源知识图谱的形式存储各个资源,每个资源能够执行至少一种业务操作;所述资源知识图谱包括:表示各个资源的节点,以及表示节点间关系的连线。
  9. 根据权利要求8所述的工作流生成系统,其特征在于,所述资源库(150)中的每个资源分别关联有所述节点库(110)中的一个功能块节点。
  10. 根据权利要求7至9中任一项所述的工作流生成系统,其特征在于,进一步包括:解析部署模块(140),被配置为解析所述行为树,将所述行为树对应的工作流部署到对应的工作单元的运行时(30)上,以使得所述工作单元中的各个资源按照所述工作流执行操作。
  11. 一种工作流生成系统,其特征在于,包括:
    至少一个存储器(51),被配置为存储计算机可读代码;
    至少一个处理器(52),被配置为调用所述计算机可读代码,执行如权利要求1~6中任一项所述的工作流生成方法中的步骤。
  12. 一种IT域OT域融合系统,其特征在于,包括:
    IT设备;和
    如权利要求7至11中任一项所述的工作流生成系统;其中,所述工作流为OT域工作流;所述工作单元为OT域内的工作单元;所述资源为OT资源;且所述工作流生成系统进一步包括:OT域微服务生成器(20),用于基于所述行为树生成一个微服务(40),以使得所述IT设备通过调用所述微服务(40)而触发所述工作单元的运行时(30)执行所述OT域工作流。
  13. 一种计算机可读介质,其特征在于,所述计算机可读介质上存储有计算机可读指令,所述计算机可读指令在被处理器执行时,使所述处理器执行如权利要求1~6中任一项所述的工作流生成方法中的步骤。
  14. 一种计算机程序产品,其特征在于,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可读指令,所述计算机可读指令在被执行时使至少一个处理器执行根据权利要求1~6中任一项所述的工作流生成方法中的步骤。
PCT/CN2022/075059 2022-01-29 2022-01-29 工作流生成方法、系统、介质及程序产品 WO2023142062A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202280089272.6A CN118556241A (zh) 2022-01-29 2022-01-29 工作流生成方法、系统、介质及程序产品
PCT/CN2022/075059 WO2023142062A1 (zh) 2022-01-29 2022-01-29 工作流生成方法、系统、介质及程序产品

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/075059 WO2023142062A1 (zh) 2022-01-29 2022-01-29 工作流生成方法、系统、介质及程序产品

Publications (1)

Publication Number Publication Date
WO2023142062A1 true WO2023142062A1 (zh) 2023-08-03

Family

ID=87470198

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075059 WO2023142062A1 (zh) 2022-01-29 2022-01-29 工作流生成方法、系统、介质及程序产品

Country Status (2)

Country Link
CN (1) CN118556241A (zh)
WO (1) WO2023142062A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993233A (zh) * 2023-09-28 2023-11-03 南通华隆微电子股份有限公司 一种提高二极管封装质量的方法与系统
CN117132246A (zh) * 2023-10-27 2023-11-28 安联奇智(安徽)科技有限公司 柔性生产线的能耗统计系统、方法、设备和介质
CN118250288A (zh) * 2024-05-24 2024-06-25 杭州宇泛智能科技股份有限公司 基于场景组件化的AIoT中台数据处理方法、装置及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933010A (zh) * 2017-12-15 2019-06-25 中国科学院沈阳自动化研究所 一种面向个性化定制的工业cps系统和实现方法
EP3614319A1 (en) * 2018-08-20 2020-02-26 Siemens Aktiengesellschaft Tracking execution of an industrial workflow of a petri net
CN111723176A (zh) * 2019-03-18 2020-09-29 西门子股份公司 一种用于生成合成交互的语义描述的方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933010A (zh) * 2017-12-15 2019-06-25 中国科学院沈阳自动化研究所 一种面向个性化定制的工业cps系统和实现方法
EP3614319A1 (en) * 2018-08-20 2020-02-26 Siemens Aktiengesellschaft Tracking execution of an industrial workflow of a petri net
CN111723176A (zh) * 2019-03-18 2020-09-29 西门子股份公司 一种用于生成合成交互的语义描述的方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993233A (zh) * 2023-09-28 2023-11-03 南通华隆微电子股份有限公司 一种提高二极管封装质量的方法与系统
CN116993233B (zh) * 2023-09-28 2023-12-12 南通华隆微电子股份有限公司 一种提高二极管封装质量的方法与系统
CN117132246A (zh) * 2023-10-27 2023-11-28 安联奇智(安徽)科技有限公司 柔性生产线的能耗统计系统、方法、设备和介质
CN117132246B (zh) * 2023-10-27 2024-02-06 安联奇智(安徽)科技有限公司 柔性生产线的能耗统计系统、方法、设备和介质
CN118250288A (zh) * 2024-05-24 2024-06-25 杭州宇泛智能科技股份有限公司 基于场景组件化的AIoT中台数据处理方法、装置及系统

Also Published As

Publication number Publication date
CN118556241A (zh) 2024-08-27

Similar Documents

Publication Publication Date Title
WO2023142062A1 (zh) 工作流生成方法、系统、介质及程序产品
WO2023164841A1 (zh) 工作流执行方法、装置、存储介质及程序产品
Strasser et al. Framework for distributed industrial automation and control (4DIAC)
CN110587601B (zh) 一种应用于智能巡检机器人的控制系统
WO2023004805A1 (zh) 工作流建模实施系统、方法及存储介质
WO2023142079A1 (zh) 工作流创建方法、系统、介质及程序产品
Ye et al. Implementation of a production-control system using integrated automation ML and OPC UA
CN114240382A (zh) 基于结构化流程模板的流程实例生成方法及装置
WO2023142076A1 (zh) 工作流控制方法、装置、系统、介质及程序产品
WO2023142061A1 (zh) 工作流生成方法、装置、系统、介质及程序产品
WO2023142078A1 (zh) 工作流构建方法、系统、介质及程序产品
WO2023142066A1 (zh) 工作流构建及监控方法、系统、介质及程序产品
Schüller et al. Composing complex and hybrid AI solutions
Fend et al. CPSAML: A language and code generation framework for digital twin based monitoring of mobile cyber-physical systems
WO2023164844A1 (zh) 工作流执行方法、系统、介质及程序产品
WO2023164822A1 (zh) 动态工作流实现方法、系统、介质及程序产品
WO2023164835A1 (zh) 工作流执行方法、装置、存储介质及程序产品
WO2023142077A1 (zh) 工作流生成方法、装置、系统、介质及程序产品
Mellmann et al. Naoth software architecture for an autonomous agent
Ferayorni et al. Domain driven simulation modeling for software design
Dalibor et al. Tagging Model Properties for Flexible Communication.
CN116107730A (zh) 流程控制方法、装置及设备
Pfrommer et al. Deploying software functionality to manufacturing resources safely at runtime
Cui et al. A software architecture supporting self-adaptation of wireless control networks
CN113190328A (zh) 一种面向系统辨识的容器化云工作流处理系统及方法

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: 22922892

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022922892

Country of ref document: EP

Effective date: 20240729

NENP Non-entry into the national phase

Ref country code: DE