An extensible general workflow framework system

By introducing scheduling policy modules and class templates into the workflow framework system to realize customized work content and context data, forming a directed graph to support data transmission, solving the shortcomings of data transmission and scheduling policy customization among work projects in the prior art. , realizes the general scalability of workflows and the satisfaction of complex business needs.

CN113051175BActive Publication Date: 2025-02-14HANGZHOU ZHIQIANLI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202110419887.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-19
Publication Date
2025-02-14
Estimated Expiration
2041-04-19

AI Technical Summary

Technical Problem

The existing workflow framework system has shortcomings in data transmission and scheduling policy customization among work projects, and cannot meet the needs of complex business environments.

Method used

Design an extensible general workflow framework system, implement the scheduling policy customization of work items and workflows through the first scheduling policy module and the second scheduling policy module, and use function pointers and class templates to realize the customization of work content and context data. , form a directed graph to support data transmission.

Benefits of technology

The workflow framework supports data transmission between various work projects, and the work project scheduling strategy supports user customization, which has the universal scalability of workflows, and meets complex business needs such as semiconductor testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113051175B_ABST
    Figure CN113051175B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an extensible general workflow framework system, including a schedulable workflow, a schedulable work item, a first scheduling strategy module and a second scheduling strategy module; wherein the first scheduling strategy module is used to customize the scheduling strategy for scheduling the work item; the second scheduling strategy module is used to customize the scheduling strategy for scheduling the workflow; the work item includes the executed work content and the context object, the executed work content is customized through a function pointer, the context object realizes the customization of context data through a class template, and each of the work items in the workflow forms a directed graph. The present invention realizes that the workflow framework supports data transmission between each work item, the scheduling strategy of the work item supports user customization, and has the general extensibility of the workflow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to an extensible universal workflow framework system. Background Art

[0002] There is an open source framework for existing workflows, which implements functions such as workflow formation and scheduling. The scheduling design and implementation are divided into two levels: workflow and work items. A workflow can contain several work items, which include Job work items for specific execution content and Condition work items for defining conditions and directions.

[0003] Each job item does one thing, which is customized through a function pointer. The type of the function pointer is fixed as: std::function<void()> , that is, the execution content without parameters and return values. Each Condition work item is used to define the conditions and direction, that is, to which Job work item is scheduled when the conditions are met. When there are multiple Job work items downstream of a Condition work item, only the Job work items that meet the condition judgment are scheduled.

[0004] However, in the current workflow framework system, the data transmission between the work content nodes that each work item actually needs to execute in the workflow is defined by discrete global variables in the framework. Such a framework lacks guidance for users; the workflow scheduling strategy cannot be customized, which cannot meet the complex business environment and loses the core expansion requirements of the workflow. The current scheduling scheme in the framework, when using the definition of conditions and the direction of the Condition work item, only allows the scheduling of one directly downstream specific execution content Job work item, while many business situations require the synchronous execution of all or multiple directly downstream specific execution content Job work items. It does not meet the application requirements in the semiconductor testing field, that is, the workflow framework does not support data transmission between various work items, the scheduling strategy of the work item does not support user customization, and does not have the general scalability of the workflow.

[0005] Therefore, it is necessary to design a new system to realize the workflow framework to support data transfer between various work items, the scheduling strategy of work items to support user customization, and have the general scalability of workflow. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide an extensible general workflow framework system.

[0007] To solve the above technical problems, the purpose of the present invention is achieved through the following technical solutions: providing an extensible general workflow framework system, including a schedulable workflow, a schedulable work item, a first scheduling policy module and a second scheduling policy module; wherein the first scheduling policy module is used to customize the scheduling policy for scheduling the work item; the second scheduling policy module is used to customize the scheduling policy for scheduling the workflow; the work item includes the executed work content and the context object, the executed work content is customized through a function pointer, the context object realizes the customization of context data through a class template, and each of the work items in the workflow forms a directed graph.

[0008] A further technical solution is as follows: the first scheduling strategy module customizes the content executed by the work item by adopting a class template and a function pointer.

[0009] Its further technical solution is: the first scheduling strategy module realizes customized scheduling of the work item scheduling strategy through interface definition and class inheritance.

[0010] Its further technical solution is: the first scheduling strategy module implements customized scheduling of the work item by defining a virtual function interface and class inheritance.

[0011] A further technical solution is: the virtual function is used to be overwritten by a subclass of the class to which the virtual function belongs.

[0012] A further technical solution is: the second scheduling strategy module uses queues to optimize and implement breadth-first scheduling of the workflow.

[0013] Its further technical solution is: the work item includes a function body, a set of subsequent work items of the current work item, a set of predecessor dependent work items of the current work item, and a work item that is first scheduled in the corresponding workflow.

[0014] A further technical solution is that the data transferred between the work items are defined in the associated context object, and the types of related context objects are synchronously defined and specified when different businesses inherit the work items.

[0015] A further technical solution is to define a set of pre-dependent work items of the current work item and a work item that is first scheduled in the corresponding workflow, so that each work item in the workflow forms a directed graph.

[0016] A further technical solution is as follows: the workflow includes a starting work item, a schedulable topology structure constructor, a default scheduled process, and a work item set consisting of a number of the work items.

[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention customizes the work content to be executed through function pointers, the context object realizes the customization of context data through class templates, the setting of context objects can realize the definition of transmitted data, and the various work items in the workflow form a directed graph, the setting of the directed graph can realize the transmission of data, realize the workflow framework supports data transmission between various work items, the scheduling strategy of the work items supports user customization, and has the general extensibility of the workflow.

[0018] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0020] Figure 1 A schematic diagram of the operation of an extensible general workflow framework system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0023] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0024] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0025] See also Figure 1 , Figure 1 The working diagram of an extensible general workflow framework system provided for an embodiment of the present invention can be used in semiconductor testing scenarios. The definition of workflow in WFMC (Workflow Management System) refers to the full or semi-automatic operation of the entire or part of the operation process under computer support. The solution goal of the workflow is to automate the process of transferring documents, information or tasks between multiple participants according to certain predefined rules, so as to achieve a certain expected business goal and promote the realization of this goal. In the field of semiconductor testing, realizing the automated execution of test items is the most fundamental requirement for improving test efficiency. The workflow framework is required to support data transfer between various work items, and the scheduling strategy of work items supports user customization.

[0026] The above-mentioned extensible general workflow framework system includes a schedulable workflow, a schedulable work item, a first scheduling policy module and a second scheduling policy module; wherein the first scheduling policy module is used to customize the scheduling policy for scheduling the work item; the second scheduling policy module is used to customize the scheduling policy for scheduling the workflow; the work item includes the executed work content and the context object, the executed work content is customized through a function pointer, and the context object realizes the customization of context data through a class template, and each of the work items in the workflow forms a directed graph.

[0027] In this embodiment, a scheduling policy for scheduling work items is defined with the help of a first scheduling policy module, and a scheduling policy for scheduling the workflow is defined with the help of a second scheduling policy module.

[0028] In this embodiment, the main functional interface of the first scheduling strategy module is Dispatch (Context, work item), which means calling the specific work content of the work item under the context object, and the default implementation is Work->DoWork(), that is, just calling the work content of its own execution. The Dispatch function is designed as a virtual function, that is, the virtual function can be overridden by the subclass of the class to which it belongs, and is used to implement the scheduling strategy belonging to the subclass characteristics.

[0029] The work content is customized through function pointers, and the behavior customization of subclasses is achieved through override, such as std::function<R(W*,P*)> , where W* represents the pointer to the object of the current work item, P* represents the pointer to the context object of the current work item, and R represents the return value of the function. The types of these three variables can be specified through the class template parameters of the work item. The data transferred between work items are uniformly defined in their associated context objects. The class of the work item is designed as a template class and the class type of the context object therein is also templated and specified through the parameters of the class template, that is, when inheriting work items according to different businesses, the relevant context types can be defined and specified synchronously.

[0030] In one embodiment, the first scheduling strategy module customizes the content executed by the work item by using a class template and a function pointer.

[0031] In this embodiment, the work items required to deal with workflows of different business types are not different, that is, the content required to be executed in each work item will change with different businesses. This scalability perfectly solves this problem. For example, for workflows related to the "scientific computing" business, the content executed by the work item can be a mathematical operation based on a certain formula.

[0032] In one embodiment, the first scheduling policy module implements a scheduling policy for customizing the work item through interface definition and class inheritance.

[0033] In one embodiment, the first scheduling strategy module implements a scheduling strategy for custom scheduling of the work item by defining an interface of a virtual function and class inheritance, and the virtual function is used to be overridden by a subclass of the class to which the virtual function belongs.

[0034] In one embodiment, the second scheduling strategy module uses queues for optimization to implement breadth-first scheduling of workflows.

[0035] The first scheduling strategy module and the second scheduling strategy module formulate different scheduling strategies for different business types of workflows, that is, the scheduling order between each work item in the workflow can be customized according to business needs. For example, for workflows related to "scientific computing" business, if a workflow is used to define a complex calculation process, there is naturally a priority order, and this order can be converted into a scheduling strategy in the workflow framework.

[0036] There is bound to be a front-to-back dependency relationship between work items in a workflow, which is generally manifested as the downstream work item needs to obtain the data of the upstream work item. For example, in a workflow related to the "scientific computing" business, for a complex calculation process, the calculation result output of the upstream work item must be used as the calculation input of the downstream work item. In the field of "applied mathematics", the data required by the work item is no longer a simple value, but more of a complex data structure. The workflow framework perfectly supports the definition of this data structure and its transmission between different work items.

[0037] In one embodiment, the second scheduling strategy module uses queues for optimization to implement breadth-first scheduling of the workflow.

[0038] In one embodiment, the work item includes a function body, a set of successor work items of the current work item, a set of predecessor dependent work items of the current work item, and a work item that is first scheduled in the corresponding workflow.

[0039] A work item is defined as an operator that can be scheduled and controlled and can be inherited; the work content to be executed is technically implemented as a function pointer and can be customized by the user; the function body is the function body pointed to by the function pointer used to call the work content to be executed; the context object is defined as the context object of the work content to be executed during the execution process and can be customized by the user; the work item that is first scheduled in the workflow to which it belongs can be marked as the work content to be started.

[0040] In one embodiment, the data transferred between the work items are defined in the associated context object, and the types of related context objects are synchronously defined and specified when inheriting work items according to different businesses.

[0041] The data transferred between work items are uniformly defined in their associated context objects. The class of the work item is designed as a template class and the class type of the context object therein is also templated and specified through the parameters of the class template. That is, when inheriting work items according to different businesses, the relevant context types can be defined and specified synchronously.

[0042] In one embodiment, a set of work items that are predecessor dependencies of the current work item and the work items that are first scheduled in the corresponding workflow are defined, so that each of the work items in the workflow forms a directed graph.

[0043] Specifically, data transfer between work items depends on two properties defined by each work item: the set of work items that are predecessor dependencies of the current work item and the work item that is scheduled first in the workflow to which it belongs. This allows each work item in the workflow to form a directed graph. Through these two properties, each work item can obtain data from the context objects of its related upstream and downstream work items.

[0044] In one embodiment, the workflow includes a starting work item, a schedulable topology structure builder, a default scheduled process, and a work item set consisting of a number of the work items.

[0045] A work item set is defined as a set of any number of work items; the default scheduled process is marked as the main process.

[0046] This system supports customization of the scheduling strategy of work items; supports customization of the execution content of work items; supports data transfer between work items, and the data structure is customizable.

[0047] See also Figure 1 In the above-mentioned extensible general workflow framework system, a complete workflow includes a starting work item, and the scheduling order is work item 1->work item 2->work item 4->work item 3->work item 5->work item 6; only when the upstream work items are scheduled, can the current work item be scheduled, for example, work item 5 must wait for work item 4 and work item 3 to be scheduled; the scheduling of the workflow is formulated by the second scheduling strategy module, and the user can customize the scheduling of the workflow through this module; and each work item in the workflow is formulated by the first scheduling strategy module, which is used to define the scheduling of the work item through the first scheduling strategy module; and the executable work content of the work item is customized by the class template and the function pointer, the customization of the context between the work items can be realized by the class template, and the data interaction between the various work items in the same workflow is realized by the directed graph.

[0048] The above-mentioned extensible general workflow framework system customizes the work content to be executed through function pointers, and the context object realizes the customization of context data through class templates. The setting of context objects can realize the definition of transmitted data, and the various work items in the workflow form a directed graph. The setting of the directed graph can realize the transmission of data, so that the workflow framework supports data transmission between various work items, and the scheduling strategy of work items supports user customization, and has the general extensibility of workflow.

[0049] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. An extensible general workflow framework system, characterized in that: It includes a schedulable workflow, a schedulable work item, a first scheduling policy module and a second scheduling policy module; wherein the first scheduling policy module is used to customize the scheduling policy for scheduling the work item; the second scheduling policy module is used to customize the scheduling policy for scheduling the workflow; the work item includes the executed work content and the context object, the executed work content is customized through a function pointer, the context object realizes the customization of context data through a class template, and each of the work items in the workflow forms a directed graph; The work item includes a function body, a set of subsequent work items of the current work item, a set of work items that are predecessor dependencies of the current work item, and a work item that is first scheduled in the corresponding workflow; A work item is defined as a worker that can be scheduled and controlled and can be inherited; the work content to be executed is technically implemented as a function pointer and can be customized by the user; the function body is the function body pointed to by the function pointer used to call the work content to be executed; the context object is defined as the context object of the work content to be executed during the execution process and can be customized by the user; the work item that is scheduled first in the workflow to which it belongs can be marked as the work content to be started; By defining a set of work items that are pre-dependent on the current work item and a work item that is scheduled first in the corresponding workflow, each of the work items in the workflow forms a directed graph; The data transfer between work items depends on two properties defined by each work item: the set of work items that are predecessor dependencies of the current work item and the work item that is scheduled first in the corresponding workflow. This enables the various work items in the workflow to form a directed graph. Through these two properties, each work item can obtain the data in the context objects of its related upstream and downstream work items.

2. The scalable universal workflow framework system according to claim 1, characterized in that: The first scheduling strategy module customizes the content executed by the work item by using a class template and a function pointer.

3. The scalable universal workflow framework system according to claim 2, characterized in that: The first scheduling strategy module implements a scheduling strategy for customizing the work item through interface definition and class inheritance.

4. The scalable universal workflow framework system according to claim 3, characterized in that: The first scheduling strategy module implements a scheduling strategy for customizing the scheduling of the work item by defining a virtual function interface and class inheritance.

5. The scalable universal workflow framework system according to claim 4, characterized in that: The virtual function is used to be overridden by a subclass of the class to which the virtual function belongs.

6. An extensible universal workflow framework system according to any one of claims 1 to 5, characterized in that: The second scheduling strategy module uses queues for optimization to implement breadth-first scheduling of the workflow.

7. The scalable universal workflow framework system according to claim 1, characterized in that: The data transferred between the work items are defined in the associated context object, and the types of related context objects are synchronously defined and specified when the work items are inherited by different businesses.

8. The scalable universal workflow framework system according to claim 1, characterized in that: The workflow includes a starting work item, a schedulable topology structure builder, a default scheduled process, and a work item set consisting of a number of the work items.

Citation Information

Patent Citations

  • Multi-thread concurrent system

    CN106325980A

  • Task scheduling method, device and equipment

    CN109766196A

  • Task scheduling method, device and equipment, and storage medium

    CN111984390A

  • Component based user self-definition event mechanism

    US20040154024A1