Method and apparatus for instantiating workflow, electronic device, medium, and program product

The method and apparatus for instantiating workflows address the challenge of complex automation projects by enabling quick and accurate workflow instantiation, improving engineering efficiency and accuracy, and reducing development complexity.

WO2025091340A1PCT designated stage expired Publication Date: 2025-05-08SIEMENS AG +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/129135
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2025-05-08

AI Technical Summary

Technical Problem

The complexity of automation projects has increased due to the demand for sustainable production of personalized products, leading to a shortage of experienced engineers capable of designing complex systems, and resulting in reduced engineering quality and efficiency due to misunderstandings and personal mistakes among team members.

Method used

A method and apparatus for instantiating a workflow that allows users to generate a workflow with function blocks and connection relationships through a graphical user interface, and determines attribute values in pre-associated contracts to instantiate the workflow, thereby defining operations for work units in real scenarios.

Benefits of technology

This solution enables quick and accurate instantiation of workflows, improving engineering efficiency and accuracy by providing a common understanding of production processes among engineers from different disciplines, and reducing the complexity of development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023129135_08052025_PF_FP_ABST
    Figure CN2023129135_08052025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of this application mainly relate to the field of automation, and in particular, to a method and an apparatus for instantiating a workflow, an electronic device, a medium, and a program product. An instruction input by a user on a graphical user interface is received, where the instruction is used for generating a workflow including a plurality of function blocks and a connection relationship between the function blocks, and the workflow is used for defining an operation to be performed by a work unit; and an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow is determined to instantiate the workflow.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND APPARATUS FOR INSTANTIATING WORKFLOW, ELECTRONIC DEVICE, MEDIUM, AND PROGRAM PRODUCTTECHNICAL FIELD

[0001] Embodiments of this application mainly relate to the field of automation, and in particular, to a method and an apparatus for instantiating a workflow, an electronic device, a medium, and a program product.BACKGROUND

[0002] An automation system engineering of a production device includes not only automation hardware but also automation software. Therefore, the construction of the system engineering requires in-depth cooperation among process engineers, mechanical engineers, electrical engineers, and automation engineers. However, the knowledge of engineers from each party is limited, and misunderstandings among team members and personal mistakes can reduce the engineering quality and efficiency of the entire project. In addition, the complexity of automation projects has been increasing since the last decade due to the current increased demand for the sustainable production of more and more personalized products. In this case, engineering firms are facing a challenge of a shortage of experienced engineers capable of designing complex systems.SUMMARY

[0003] Embodiments of this application provide a method and an apparatus for instantiating a workflow, an electronic device, a medium, and a program product. Through the embodiments of this application, a workflow can be instantiated quickly and accurately, so that a work unit in a real scenario represented by the workflow can perform a corresponding operation.

[0004] According to a first aspect, a method for instantiating a workflow is provided, including: receiving an instruction input by a user on a graphical user interface, where the instruction is used for generating a workflow including a plurality of function blocks and a connection relationship between the function blocks, and the workflow is used for defining an operation to be performed by a work unit; and determining an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow to instantiate the workflow.

[0005] According to a second aspect, an apparatus for instantiating a workflow is provided, including: a receiving module, configured to: receive an instruction input by a user on a graphical user interface, where the instruction is used for generating a workflow including a plurality of function blocks and a connection relationship between the function blocks, and the workflow is used for defining an operation to be performed by a work unit; and a determining module, configured to: determine an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow to instantiate the workflow.

[0006] According to a third aspect, an electronic device is provided, including: at least one memory, configured to store computer-readable code; and at least one processor, configured to invoke the computer-readable code and implementing steps in the method provided in the first aspect.

[0007] According to a fourth aspect, a computer-readable medium is provided. The computer-readable medium stores computer-readable instructions, and the computer-readable instructions, when executed by a processor, enable the processor to implement steps in the method provided in the first aspect.

[0008] According to a fifth aspect, a computer program product is provided. The computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions, and the computer-executable instructions, when executed, enables at least one processor to implement steps in the method provided in the first aspect.BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The accompanying drawings below are merely intended to provide exemplary descriptions and explanations for embodiments of this application, but are not intended to limit the scope of the embodiments of this application.

[0010] FIG. 1 is a flowchart of a method for instantiating a workflow according to an embodiment of this application;

[0011] FIG. 2 is a schematic diagram of a method for instantiating a workflow according to an embodiment of this application;

[0012] FIG. 3 is a schematic diagram of mapping from a function block description and a contract description to code according to an embodiment of this application;

[0013] FIG. 4 is a schematic diagram of an apparatus for instantiating a workflow according to an embodiment of this application; and

[0014] FIG. 5 is a schematic diagram of an electronic device according to an embodiment of this application.

[0015] Reference Numerals 100: Method for instantiating     101-102: Steps of the method      20: Workflow  a workflow 21-25: Function block          L01: Tank level                   V02, V03: Valve 41: Receiving module           42: Determining module            500: Electronic device  501: Processor                 502: Communication interface      503: Memory 504: Communication bus         505: ProgramDETAILED DESCRIPTION

[0016] A subject described in this specification is discussed now with reference to exemplary implementations. It should be understood that, discussion of the implementations is merely intended to make a person skilled in the art better understand and implement the subject described in this specification, and is not intended to limit the protection scope of the claims, the applicability, or examples. Changes may be made to the functions and arrangements of the discussed elements without departing from the protection scope of the content of the embodiments of this application. Various processes or components may be omitted, replaced, or added in each example according to requirements. For example, the described method may be performed according to a sequence different from the sequence described herein, and steps may be added, omitted, or combined. In addition, features described in some examples may also be combined in other examples.

[0017] As used in this specification, the term "include" and variants thereof represent open terms, and means "include but is not limited to" . The term "based on" represents "at least partially based on" . The terms "one embodiment" and "an embodiment" represent "at least one embodiment" . The term "another embodiment" represents "at least one another embodiment" . The terms "first" , "second" , and the like may represent different objects or the same object. Other definitions may be included explicitly or implicitly in the following. Unless otherwise clearly specified, the definition of one term is consistent in the entire specification.

[0018] The embodiments of this application are described in detail below with reference to the accompanying drawings.

[0019] FIG. 1 is a schematic diagram of a method for instantiating a workflow according to an  embodiment of this application. As shown in FIG. 1, a method for instantiating a workflow 100 includes:

[0020] Step 101: Receive an instruction input by a user on a graphical user interface, where the instruction is used for generating a workflow including a plurality of function blocks and a connection relationship between the function blocks, and the workflow is used for defining an operation to be performed by a work unit.

[0021] The concept of "work unit" proposed in this application can make the development closer to a relatively complete and independent control process and operation, which is more in line with the characteristics of industrial control, improves the integration of the development, and reduces the complexity of the development. The work unit can be defined according to an actual industrial scenario. For example, a workstation on a production line corresponds to a work unit. Different work units have different process flows.

[0022] Optionally, the instruction input by the user on the graphical user interface may be implemented by selecting and dragging icons corresponding to different function blocks and establishing connection lines between different function blocks. Optionally, the user can input a natural language on the graphical user interface to generate a workflow including a plurality of function blocks and a connection relationship between the function blocks.

[0023] Step 102: Determine an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow to instantiate the workflow.

[0024] Optionally, the attribute in the contract includes at least one of the following: a pre-condition, a parameter, an interface, an obligation, or a right. Optionally, a pre-associated contract is a contract template that includes at least one attribute name.

[0025] Optionally, for an attribute in the contract associated with the at least one connection relationship between the function blocks in the workflow, a corresponding attribute value input by the user on the graphical user interface is received; and / or a preset corresponding attribute value is determined.

[0026] In this embodiment of this application, the workflow established by the user on the graphical user interface is received. It should be noted that the function blocks in the workflow are only defined with specific operation actions. Then, the workflow can be instantiated by determining the attribute value in the pre-associated contract on the connection relationship in the workflow. The embodiment of this application eliminates a gap between a process engineering model and an automation engineering model. The contract-based engineering model provides engineers from all parties with a common  understanding of the production process, greatly reducing the professional knowledge requirements of relevant engineers. The engineering becomes less error-prone and the engineering effort is reduced.

[0027] In an embodiment, before step 102, at least one function block of the function blocks in the workflow is decomposed into a set of sub function blocks at at least one level; and the attribute value in the contract pre-associated with the at least one connection relationship between the function blocks / sub function blocks in the workflow is determined to instantiate the workflow. Specifically, it may be an attribute value in a contract associated with at least one connection relationship between the function blocks, between a function block and a sub function block, or between the sub function blocks.

[0028] In an embodiment, as shown in FIG. 2, it is assumed that there is a milk processing scenario, and a workflow 20 established on the graphical user interface includes a plurality of function blocks 21 to 25. The function block 21 represents an operation of connecting a pipe to a milk tank, the function block 22 represents a heating operation, the function block 23 represents an operation of filling the milk tank, the function block 24 represents a stirring operation, and the function block 25 represents a transportation operation. In addition, the function block 23 can further be decomposed into a set of sub function blocks at a level. A sub function block 231 represents an operation of opening a valve of the pipe, a sub function block 232 represents an operation of keeping the valve open, and a sub function block 233 represents an operation of waiting until the milk tank is filled.

[0029] The connection relationship between the function block 23 and the function block 24 is associated with a contract 1, and the contract 1 includes a pre-condition, a parameter, an interface, an obligation, and a right. The pre-condition is defined as: L01, that is a tank level ≥ 1.000 mm, which represents that the pre-condition for starting stirring is that the tank level in the tank ≥ 1.000 mm. The parameter is defined as: stirring takes 5 minutes. Since an interaction effect between operations should be taken into account, the tank level of the milk tank should be defined as an interface. In addition, for safety reasons, it is stipulated that stirring should be stopped when the tank level in the tank is lower than a certain limit (<500 mm). The right column is blank.

[0030] The connection relationship between the function block 24 and the function block 25 is associated with a contract 2, and the contract 2 includes a pre-condition, a right, and the like. The completion of 5 minutes of stirring is a pre-condition for starting transportation, and this can be deduced as a post-condition of the function block 24, that is, the stirring operation. This independent condition setting ensures the reliability of the method. In addition, the  contract 2 further defines the right to transport via a valve V02 or a valve V03 for the function block 25, that is, the transportation operation. It should be noted that the attribute value of each attribute in the contract can be set in advance or obtained according to the user input.

[0031] In an embodiment, after step 102, according to an execution order of the workflow, descriptions corresponding to the function blocks in the workflow and an attribute and the attribute value of the contract included in the workflow are sorted, and corresponding code is generated to obtain sorted total code; and the total code is executed to run the workflow. In this way, the operation of the work unit in the real scenario associated with the workflow is implemented.

[0032] In an embodiment, as shown in FIG. 3, the code can be directly derived from the function block description and the contract description. Specifically, first, an interface attribute in the contract 1 is mapped to code that reads the interface; an obligation attribute is mapped to a corresponding conditional statement and a first instruction corresponding to the conditional statement; and a pre-condition attribute is mapped to a corresponding conditional statement and a second instruction corresponding to the conditional statement. A name and a status in the description of the function block 24 are mapped to the second instruction. Again, a parameter in the contract 1, that is, the duration of 5 minutes, is mapped to corresponding code, that is, start a timer, a corresponding conditional statement, and a third instruction corresponding to the conditional statement. Through this embodiment, process knowledge can be automatically mapped into deployable automation code, and the consistency between an engineering model and the code is ensured, thereby greatly improving the engineering efficiency and accuracy. In addition, it ensures that the code and project definitions are updated simultaneously and simplifies a model conversion process.

[0033] FIG. 2 is a schematic diagram of an apparatus for instantiating a workflow according to an embodiment of this application. As shown in FIG. 2, an apparatus for instantiating a workflow 40 includes:

[0034] a receiving module 41, configured to: receive an instruction input by a user on a graphical user interface, where the instruction is used for generating a workflow including a plurality of function blocks and a connection relationship between the function blocks, and the workflow is used for defining an operation to be performed by a work unit; and

[0035] a determining module 42, configured to: determine an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow to instantiate the workflow.

[0036] Through the embodiments of this application, a workflow can be instantiated quickly and accurately, so that a work unit in a real scenario represented by the workflow can perform a corresponding operation.

[0037] FIG. 5 is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. Specific implementations of the electronic device are not limited in specific embodiments of the present disclosure. Referring to FIG. 5, the electronic device 500 provided in the embodiment of the present disclosure includes: a processor 502, a communication interface 504, a memory 506, and a communication bus 508, where:

[0038] the processor 502, the communication interface 504, and the memory 506 complete communication with each other through the communication bus 508, and

[0039] the communication interface 504 is configured to communicate with other electronic devices or servers.

[0040] The processor 502 is configured to execute a program 510, and specifically may execute relevant steps of instantiating a workflow method 100 in any one of the above embodiments.

[0041] Specifically, the program 510 may include a program code. The program code includes computer operation instructions.

[0042] The processor 502 may be a central processing unit (CPU) , or an Application Specific Integrated Circuit (ASIC) , or one or more integrated circuits configured to implement embodiments of the present disclosure. One or more processors included in a smart device may be processors of a same type, e.g., one or more CPUs; or may be processors of different types, e.g., one or more CPUs and one or more ASICs.

[0043] The memory 506 is configured to store the program 510. The memory 506 may include a high-speed RAM memory, and may further include a non-volatile memory, e.g., at least one disk memory.

[0044] An embodiment of the present disclosure further provides a computer-readable storage medium storing instructions for causing a machine to execute instantiating a workflow method 100 as described herein. Specifically, a system or apparatus equipped with a storage medium may be provided, where the storage medium stores a software program code for implementing the functions of any one embodiment among the above embodiments, and makes a computer (or CPU or MPU) of the system or apparatus read and execute the program code stored in the storage medium.

[0045] In this case, the program code read from the storage medium itself can implement the functions of any one embodiment among the above embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present disclosure.

[0046] Examples of storage mediums for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, or DVD+RW) , a magnetic tape, a non-volatile memory card, and a ROM. Optionally, the program code may be downloaded from a server computer through a communication network.

[0047] In addition, it should be clear that a part or all of the actual operations may be completed not only by executing the program code read by the computer, but also by, e.g., an operating system operating on the computer based on instructions of the program code, thereby realizing the functions of any one embodiment among the above embodiments.

[0048] In addition, it is understandable that the program code read from the storage medium is written into a memory provided in an expansion board inserted into the computer or written into a memory provided in an expansion module connected to the computer, and then a part and all of the actual operations are executed by, e.g., a CPU installed on the expansion board or the expansion module based on the instructions of the program code, thereby realizing the functions of any one embodiment among the above embodiments.

[0049] Embodiments of the present disclosure further provide a computer program product. The computer program product is tangibly stored on a computer-readable medium, and includes computer-executable instructions, where the computer-executable instructions, when executed, cause at least one processor to execute instantiating a workflow method 100 provided in the above embodiments. It should be understood that each solution in the present embodiment has corresponding technical effects in the above method embodiments, which will not be repeated here.

[0050] It should be noted that not all the steps and modules in the above processes and structural diagrams of the system are necessary. Some steps or modules may be omitted based on actual requirements. The execution sequence of the steps is not constant, and may be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, i.e., some modules may be implemented by a given physical entity, or may be implemented by a plurality of physical entities, or may be implemented together by some components in a plurality of standalone devices.

[0051] The nouns and pronouns about individuals in the present patent application are not limited to specific genders.

[0052] In the above embodiments, hardware modules may be implemented mechanically or electrically. For example, a hardware module may include a permanent dedicated circuit or logic (e.g., a dedicated processor, FPGA, or ASIC) to complete corresponding operations.  The hardware module may further include a programmable logic or circuit (e.g., a general-purpose processor or other programmable processors) , which may be temporarily set by software to complete corresponding operations. Specific implementations (mechanical or dedicated permanent circuit, or temporarily provided circuit) may be determined based on costs and time.

[0053] The present disclosure is shown and described in detail above with reference to the drawings and preferred embodiments. However, the present disclosure is not limited to these disclosed embodiments. Based on the above plurality of embodiments, those skilled in the art can know that the code review means in the above different embodiments may be combined to obtain more embodiments of the present disclosure. These embodiments are also encompassed within the scope of protection of the present disclosure.

[0054] Nouns and pronouns referring to people in this patent application are not limited to specific genders.

Claims

1.A method for instantiating a workflow, comprising:receiving (101) an instruction input by a user on a graphical user interface, wherein the instruction is used for generating a workflow comprising a plurality of function blocks and a connection relationship between the function blocks, and the workflow is used for defining an operation to be performed by a work unit; anddetermining (102) an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow to instantiate the workflow.2.The method according to claim 1, wherein the determining (102) an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow comprises:for an attribute in the contract associated with the at least one connection relationship between the function blocks in the workflow, receiving a corresponding attribute value input by the user on the graphical user interface; and / ordetermining a preset corresponding attribute value.3.The method according to claim 1, wherein after the workflow is instantiated, the method further comprises:sorting, according to an execution order of the workflow, descriptions corresponding to the function blocks in the workflow and an attribute and the attribute value of the contract comprised in the workflow, and generating corresponding code to obtain sorted total code; andexecuting the total code to run the workflow.4.The method according to claim 2, wherein the attribute in the contract comprises at least one of the following:a pre-condition, a parameter, an interface, an obligation, or a right.5.The method according to claim 1, whereinbefore the determining (102) an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow to instantiate the workflow, the method further comprises:decomposing at least one function block of the function blocks in the workflow into a set of sub function blocks at at least one level; andthe determining (102) an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow to instantiate the workflow comprises:determining the attribute value in the contract pre-associated with the at least one connection relationship between the function blocks / sub function blocks in the workflow to instantiate the workflow.6.An apparatus for instantiating a workflow, comprising:a receiving module (41) , configured to: receive an instruction input by a user on a graphical user interface, wherein the instruction is used for generating a workflow comprising a plurality of function blocks and a connection relationship between the function blocks, and the workflow is used for defining an operation to be performed by a work unit; anda determining module (42) , configured to: determine an attribute value in a contract pre-associated with at least one connection relationship between the function blocks in the workflow to instantiate the workflow.7.An electronic device (500) , comprising: a processor (501) , a communication interface (502) , a memory (503) , and a communication bus (504) , wherein the processor (501) , the memory (503) , and the communication interface (502) communicate with each other through the communication bus (504) ; andthe memory (503) is configured to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the method for instantiating a workflow according to any one of claims 1 to 5.8.A computer storage medium, storing a computer program, the computer program, when executed by a processor, implementing the method for instantiating a workflow according to any one of claims 1 to 5.9.A computer program product, wherein the computer program product is tangibly stored on a computer-readable medium and comprises a computer executable instruction, and the computer executable instruction, when executed, enables at least one processor to implement the method for instantiating a workflow according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Soft PLC configuration software generation system based on FPGA platform

    CN110376959A

  • Methods and systems for batch processing and execution in a process system

    US20080288089A1