Workflow component generation method, device, equipment and storage medium
Patent Information
- Application Number
- CN202110423477.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-20
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2041-04-20
AI Technical Summary
[0004]本发明的主要目的在于解决现有的构件生成方法未考虑到业务流程的频发改变,使得生成的构件复用性较低的问题
[0019]本发明提供的技术方案中,获取工作流模型对应的逻辑函数矩阵,比如现有应用系统的工作流模型中,待生成构件的局部逻辑函数矩阵,然后在该逻辑函数矩阵中提取出待生成构件的应用逻辑起点和应用逻辑终点;接着识别出两者之前的应用逻辑节点之间的流程逻辑结构,并应用逻辑节点进行简化合并处理,即将具有相应流程逻辑结构的多个应用逻辑节,采用预置算法,合并成一个虚拟节点,在此处体现为一个逻辑节点组合,以抽象逻辑函数矩阵中的应用逻辑节点,最后将抽象后的逻辑节点组合与应用逻辑起点和应用逻辑中点分别进行组合连接,即可得到工作流构件,在构件中加入工作流的流程信息,即流程逻辑结构,并抽象化低维度的应用逻辑节点,使得构件中的应用描述更具有通用性,可以适用于多个常规或者特殊的软件开发场景,以提升构件的复用性。
Smart Images

Figure CN113190223B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of component design, and more particularly to a method, apparatus, device, and storage medium for generating workflow components. Background Technology
[0002] Components are actual, replaceable parts of an application system used to implement specific functions. They conform to a set of interface standards and can implement a set of interfaces. Component-based software development allows new application systems to be developed by assembling existing components, meaning that components are reusable.
[0003] After the modeling of special business processes in the software field is completed, changes in business requirements may cause frequent changes in the process logic of certain parts of the business process. These changes may make the components unable to be directly applied to software iteration updates or other software development. In other words, the existing component generation methods do not take into account the frequent changes in business processes, resulting in low reusability of the generated components. Summary of the Invention
[0004] The main objective of this invention is to solve the problem that existing component generation methods do not take into account the frequent changes in business processes, resulting in low reusability of the generated components.
[0005] The first aspect of the present invention provides a method for generating workflow components, comprising: obtaining a logic function matrix corresponding to a workflow model, extracting application logic start points and application logic end points from the logic function matrix, and identifying all application logic nodes between the application logic start points and the application logic end points and the flow logic structure between each application logic node; simplifying and merging each application logic node according to the flow logic structure to obtain multiple logic node combinations; and combining and connecting the application logic start points and the application logic end points with the logic node combinations to form a workflow component.
[0006] Optionally, in a first implementation of the first aspect of the present invention, identifying all application logic nodes between the application logic start point and the application logic end point, and the flow logic structure between each application logic node, includes: searching for one or more application logic nodes between the application logic start point and the application logic end point in the logic function matrix; identifying the flow logic between each application logic node respectively, and determining the flow logic structure between each application logic node and each connected application logic node according to the flow logic.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the step of simplifying and merging each application logic node according to the process logic structure to obtain multiple logic node combinations includes: simplifying and merging each application logic node according to the process logic structure to obtain multiple logic node combinations and recording them, and determining whether the logic node combinations meet a preset minimum simplification condition; if not, further simplifying and merging each logic node combination according to the process logic structure between each logic node combination until the second logic node combination meets the preset minimum simplification condition, at which point the simplification and merging process stops, resulting in multiple logic node combinations.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the step of simplifying and merging each application logic node according to the process logic structure to obtain multiple logic node combinations and recording them includes: simplifying and merging each application logic node according to the process logic structure to obtain multiple logic node combinations with cross structures and recording them; replacing the corresponding application logic nodes in the logic function matrix with logic node combinations with cross structures to obtain a simplified function matrix, and identifying the process logic structure between each application logic node in the simplified function matrix; and simplifying and merging each application logic node in the simplified function matrix according to the process logic structure between each application logic node in the simplified function matrix to obtain multiple logic node combinations with sequential structures and recording them.
[0009] Optionally, in the fourth implementation of the first aspect of the present invention, before combining and connecting the application logic start point and the application logic end point with logic nodes to form a workflow component, the method further includes: calculating the frequency of simplified merging processing of each application logic node based on the application logic nodes included in each logic node combination; selecting a preset number of application logic nodes as reference logic nodes based on the frequency of each application logic node; and removing the logic node combination if it includes the reference logic node.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, after combining and connecting the application logic start point and the application logic end point with logic nodes to form a workflow component, the method further includes: obtaining a configuration file corresponding to the workflow component, comparing the configuration file with a pre-set standard workflow component's corresponding structural specification file, and performing integrity verification on the workflow component based on the comparison result; if the workflow component passes the integrity verification, then performing logical rationality verification on the workflow component based on the configuration file; if the workflow component passes the rationality verification, then instantiating the component body of the application logic node corresponding to the workflow component based on the configuration file to execute the workflow component.
[0011] A second aspect of the present invention provides a workflow component generation apparatus, comprising: an identification module, configured to acquire a logic function matrix corresponding to a workflow model, extract application logic start points and application logic end points from the logic function matrix, and identify all application logic nodes between the application logic start points and the application logic end points, and the flow logic structure between each application logic node; a simplification and merging module, configured to simplify and merge each application logic node according to the flow logic structure to obtain multiple logic node combinations; and a connection module, configured to connect the application logic start points and the application logic end points to the logic node combinations respectively to form a workflow component.
[0012] Optionally, in a first implementation of the second aspect of the present invention, the identification module includes: a search unit, configured to search for one or more application logic nodes between the application logic start point and the application logic end point in the logic function matrix; and an identification unit, configured to identify the flow logic between each application logic node, and determine the flow logic structure between each application logic node and each connected application logic node according to the flow logic.
[0013] Optionally, in a second implementation of the second aspect of the present invention, the simplification and merging module includes: a simplification and merging unit, configured to perform simplification and merging processing on each of the application logic nodes according to the process logic structure, obtain multiple logic node combinations and record them, and determine whether the logic node combinations meet the preset minimum simplification conditions; and a loop unit, configured to, if the logic node combinations do not meet the preset minimum simplification conditions, further perform simplification and merging processing on each of the logic node combinations according to the process logic structure between each logic node combination, until the second logic node combination meets the preset minimum simplification conditions and the simplification and merging processing stops, thereby obtaining multiple logic node combinations.
[0014] Optionally, in a third implementation of the second aspect of the present invention, the simplification and merging unit is further configured to: perform sequential simplification and merging processing on each of the application logic nodes according to the process logic structure to obtain multiple combinations of logic nodes with cross structures and record them; replace the corresponding application logic nodes in the logic function matrix with combinations of logic nodes with cross structures to obtain a simplified function matrix, and identify the process logic structure between each application logic node in the simplified function matrix; and perform cross-structure simplification and merging processing on each application logic node in the simplified function matrix according to the process logic structure between each application logic node in the simplified function matrix to obtain multiple combinations of logic nodes with sequential structures and record them.
[0015] Optionally, in a fourth implementation of the second aspect of the present invention, the workflow component generation device further includes: a statistics module, used to count the frequency of simplified merging processing of each application logic node according to the application logic nodes included in each logic node combination; a selection module, used to select a preset number of application logic nodes as reference logic nodes according to the frequency of each application logic node; and a rejection module, used to reject the logic node combination if it includes the reference logic node.
[0016] Optionally, in a fifth implementation of the second aspect of the present invention, the workflow component generation device further includes: an integrity verification module, configured to obtain a configuration file corresponding to the workflow component, compare the configuration file with a structural specification file corresponding to a preset standard workflow component, and perform integrity verification on the workflow component based on the comparison result; a rationality verification module, configured to perform logical rationality verification on the workflow component based on the configuration file if the workflow component passes the integrity verification; and an instantiation module, configured to instantiate the component body of the application logic node corresponding to the workflow component based on the configuration file if the workflow component passes the rationality verification, so as to execute the workflow component.
[0017] A third aspect of the present invention provides a workflow component generation apparatus, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the workflow component generation apparatus to perform the workflow component generation method described above.
[0018] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described method for generating workflow components.
[0019] The technical solution provided by this invention involves obtaining the logic function matrix corresponding to the workflow model, such as the local logic function matrix of the component to be generated in the workflow model of an existing application system. Then, the application logic start point and application logic end point of the component to be generated are extracted from the logic function matrix. Next, the flow logic structure between the application logic nodes before the two is identified, and the logic nodes are simplified and merged. That is, multiple application logic sections with corresponding flow logic structures are merged into a virtual node using a preset algorithm, which is represented as a logic node combination in this case. This abstracts the application logic nodes in the logic function matrix. Finally, the abstract logic node combination is combined and connected with the application logic start point and application logic midpoint respectively to obtain the workflow component. The workflow flow information, i.e., the flow logic structure, is added to the component, and the low-dimensional application logic nodes are abstracted, making the application description in the component more universal and applicable to multiple conventional or special software development scenarios, thereby improving the reusability of the component. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the first embodiment of the workflow component generation method in this invention;
[0021] Figure 2 This is a schematic diagram of a second embodiment of the workflow component generation method in this invention;
[0022] Figure 3 This is a schematic diagram of a third embodiment of the workflow component generation method in this invention;
[0023] Figure 4 This is a schematic diagram of one embodiment of the workflow component generation device in this invention;
[0024] Figure 5 This is a schematic diagram of another embodiment of the workflow component generation device in this invention;
[0025] Figure 6 This is a schematic diagram of one embodiment of the workflow component generation device in this invention. Detailed Implementation
[0026] This invention provides a method, apparatus, device, and storage medium for generating workflow components. The method involves obtaining the logic function matrix corresponding to the workflow model, extracting the application logic start point and application logic end point from the logic function matrix, identifying all application logic nodes between the application logic start point and application logic end point, and the flow logic structure between each application logic node. Based on the flow logic structure, the application logic nodes are simplified and merged to obtain multiple logic node combinations. The application logic start point and application logic end point are then combined and connected with the logic node combinations to form workflow components. This invention achieves the generation of workflow components and improves the reusability of components in software development.
[0027] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The first embodiment of the workflow component generation method in this invention includes:
[0029] 101. Obtain the logic function matrix corresponding to the workflow model, extract the application logic start point and application logic end point from the logic function matrix, and identify all application logic nodes between the application logic start point and application logic end point and the process logic structure between each application logic node.
[0030] It is understood that the executing entity of this invention can be a workflow component generation device, a terminal, or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.
[0031] In this embodiment, each application system corresponds to a workflow model. Here, based on the specific requirements of the component to be generated, an application system that meets the requirements is selected, and a local logic matrix that meets the requirements is extracted from the workflow model corresponding to the application system. This is the logic function matrix corresponding to the workflow model matrix mentioned in this embodiment.
[0032] The logic function matrix contains application logic nodes corresponding to each functional module, and different application logic nodes are connected through a process logic structure to represent the jump relationship between two consecutive application logic nodes.
[0033] Specifically, the flow logic structure between application logic nodes can be represented by a logic function. Define the logic function F: P1*P2→{0, 1}, where P1 and P2 are two connected application logic nodes or a set of application logic nodes. The flow logic structure and the corresponding logic function are shown below:
[0034] (1) Sequential structure: then f1(P1, P2) = 1, otherwise f1(P1, P2) = 0;
[0035] (2) Concurrent splitting structure: then f2(P1, P2) = 1, otherwise f1(P1, P2) = 0;
[0036] (3) Concurrent aggregation structure: then f3(P1, P2) = 1, otherwise f1(P1, P2) = 0;
[0037] (4) Select the split structure: then f4(P1, P2) = 1, otherwise f1(P1, P2) = 0;
[0038] (5) Select the polymer structure: then f5(P1, P2) = 1, otherwise f1(P1, P2) = 0;
[0039] In this embodiment, the application logic starting point and application logic ending point of the component to be generated are determined in the logic function matrix, that is, the application function that starts and ends of the component; then, a search is performed in the logic function matrix to identify the application logic nodes that need to be passed from the application logic starting point to the application logic ending point, that is, the intermediate application functions involved by the component in a normal application scenario.
[0040] For example, if the component to be generated needs to be redirected from page A to page B beforehand, in a typical business process, it would require going through pages {C1, C2, ..., C}. i}, then page A, page B, page C i In the logic function matrix, these serve as the starting point, ending point, and node of the application logic, respectively.
[0041] In addition, the process logic structure between each application logic node is identified, that is, whether the quality control of each application logic node is a sequential structure, a concurrent split structure, a concurrent aggregation structure, a selection split structure, or a selection aggregation structure.
[0042] 102. Based on the process logic structure, simplify and merge each application logic node to obtain multiple logic node combinations;
[0043] In this embodiment, each application logic node in the logic function matrix is a fine-grained application function. Here, by simplifying the merging process, each application logic node with process logic structure characteristics is merged to abstract the application characteristics of the application logic node, reduce the scenario specificity of the subsequently generated components, and improve their versatility.
[0044] In this embodiment, the simplification and merging process of each application logic node is divided into two parts. The first part is to perform preliminary sequential structure simplification and merging processing on each application logic node. The second part is to perform further cross structure simplification and merging processing on each application logic node. The cross structure includes concurrent split structure, concurrent aggregation structure, selection split structure, and selection aggregation structure. The sequential structure simplification and merging processing is used to merge some simple application functions that jump directly, while the cross structure simplification and merging processing is used to merge application functions that are specific to a certain scenario, extracting only the logical characteristics of that application function.
[0045] Furthermore, each application logic node can be simplified and merged step by step from the inside out. That is, the aforementioned sequential structure simplification and merging process and cross structure simplification and merging process are executed cyclically, and an exit condition is set in advance. When the simplification degree of the application logic node reaches the exit condition, the execution stops.
[0046] Specifically, for application logic nodes with different process logic structures, the corresponding simplification and merging rules are used for transformation. The logic function matrix is judged in turn to see if it contains sequential structure, concurrent split structure, concurrent aggregation structure, selection split structure and selection aggregation structure. If it does, the corresponding sequential simplification rule, concurrent split simplification rule, concurrent aggregation simplification rule, selection split simplification rule and selection aggregation simplification rule are used to merge every two or more application logic nodes into a set of logic nodes.
[0047] 103. Combine and connect the application logic start point and application logic end point with logic nodes to form workflow components.
[0048] In this embodiment, after each simplification and merging process, at least one set of logical nodes is obtained. All sets of logical nodes obtained after multiple simplification and merging processes are integrated to form multiple potential design schemes for the component to be generated. Then, the logical node sets generated by the same round of simplification and merging processes are used to form workflow components.
[0049] Furthermore, the two sets of logical nodes are also connected through the process logic structure of the two application logical nodes before and after them, which can be regarded as the process logic structure between the two sets of logical nodes. For multiple sets of logical nodes after the same round of simplified merging, the process logic structure between them has been determined. Then, they are combined and connected with the application logic start point and the application logic end point respectively to obtain the design scheme of a workflow component. By analogy, the design scheme of the workflow component with the same number of simplified merging is obtained.
[0050] For example, after the first simplification and merging process, we get a set T1 of multiple logical node combinations. After the second simplification and merging process, we get a set T2 of multiple logical node combinations. After the third simplification and merging process, we get a set T3 of multiple logical node combinations. Then, by connecting T1, T2, and T3 with logical starting points and logical ending points respectively, we can get the design schemes of the three workflow components.
[0051] In this embodiment of the invention, the logic function matrix corresponding to the workflow model is obtained, such as the local logic function matrix of the component to be generated in the workflow model of an existing application system. Then, the application logic start point and application logic end point of the component to be generated are extracted from the logic function matrix. Next, the process logic structure between the application logic nodes before the two is identified, and the application logic nodes are simplified and merged. That is, multiple application logic sections with corresponding process logic structures are merged into a virtual node using a preset algorithm, which is represented as a logic node combination in this case. The application logic nodes in the abstract logic function matrix are then combined and connected with the application logic start point and application logic midpoint respectively to obtain the workflow component. The workflow process information, i.e., the process logic structure, is added to the component, and the low-dimensional application logic nodes are abstracted, making the application description in the component more universal and applicable to multiple conventional or special software development scenarios, thereby improving the reusability of the component.
[0052] Please see Figure 2 A second embodiment of the workflow component generation method in this invention includes:
[0053] 201. Obtain the logic function matrix corresponding to the workflow model, and extract the application logic start point and application logic end point from the logic function matrix;
[0054] 202. Search for one or more application logic nodes between the application logic start point and the application logic end point in the logic function matrix;
[0055] In this embodiment, starting from the application logic starting point, one or more application logic nodes connected to it are searched. Then, based on the searched application logic nodes, one or more application logic nodes connected to the searched application logic nodes are further searched. This process continues until one or more application logic nodes connected to the application logic ending point are finally found, thus obtaining all application logic nodes between the application logic starting point and the application logic ending point.
[0056] The searched application logic nodes can be connected through sequential structure, concurrent split structure, concurrent aggregation structure, selective split structure, or selective aggregation structure.
[0057] 203. Identify the flow logic between each application logic node, and determine the flow logic structure between each application logic node and each connected application logic node based on the flow logic.
[0058] In this embodiment, based on the local connection characteristics between each application logic node, the process logic between each application logic node is identified, that is, the connection logic between every two application logic nodes is sequential connection, concurrent split connection, concurrent aggregation connection, selective split connection, or selective aggregation connection.
[0059] After determining the flow logic between each application logic node, the flow logic structure between each application logic node and the connected application logic nodes is further determined. The flow logic structure can indicate the connection relationship between one application logic node and another application logic node, or the connection relationship between one application logic node and multiple application logic nodes.
[0060] Furthermore, the flow logic between application nodes can be represented by logical function expressions. Based on the logical function expressions between a certain application logic node and other connected application logic nodes, the flow logic structure between that application logic node and each connected application logic node can be determined and represented by a logical function expression.
[0061] Specifically, for a sequential structure, the logical function expression corresponding to each application logic node is as follows:
[0062] f1(P1, P2)=f1(P2, P3)=1;
[0063] For a parallel structure, the logical function expression for each application logic node is:
[0064] f2(P1, P2)=f1(P1, P3)=1; f3(P2, P4)=f3(P5, P4)=1;
[0065] For the selection structure, the logical function expression corresponding to each application logical node is:
[0066] f3(P1, P2)=f3(P1, P3)=1; f4(P2, P4)=f4(P3, P4)=1;
[0067] For iterative structures, the logical function expressions corresponding to each application logic node are as follows:
[0068] f4(P1, P2)=f5(P2, P1)=1; f4(P1, P4)=f1(P5, P1)=1;
[0069] Among them, P1, P2, P3, P4, and P5 are application logic nodes, or combinations of logic nodes.
[0070] 204. Based on the process logic structure, simplify and merge each application logic node to obtain multiple logic node combinations and record them, and determine whether the logic node combinations meet the preset minimum simplification conditions.
[0071] 205. If not satisfied, then based on the flow logic structure between each logical node combination, further simplify and merge each logical node combination until the second logical node combination meets the preset minimum simplification condition, and stop the simplification and merging process to obtain multiple logical node combinations.
[0072] In this embodiment, the simplest conditions for application logic nodes are set according to business requirements. These simplest optimization conditions can be the number of simplification and merging processes (N) and the number of logic node sets after simplification and merging (M). If a logic node combination is obtained from the Nth simplification and merging process, then the corresponding logic node combination satisfies the simplest conditions. If the simplification and merging process yields fewer than or equal to M logic node combinations, then the corresponding logic node combination satisfies the simplest conditions.
[0073] Preferably, the following simplification condition can be set: after simplification and merging, only one logical node combination is obtained, that is, the application logic start point and the application logic end point are only connected by one logical node combination, and the corresponding logical function expression is: f(P) s P v )=f(P v P e =1, which means the simplest condition is: the process logic structure of the application logic start point, the combination of logic nodes and the application logic end point is a sequential structure.
[0074] In addition, the process logic structure includes sequential structure and cross structure, corresponding to two different simplification and merging methods. That is, the simplification and merging process of each logic node includes two parts, which can be specifically simplified and merged using the following methods:
[0075] (1) Based on the process logic structure, the sequential structure of each application logic node is simplified and merged to obtain multiple logical node combinations with cross structures and record them.
[0076] (2) Replace the corresponding application logic nodes in the logic function matrix with a combination of logic nodes with cross structures to obtain a simplified function matrix, and identify the flow logic structure between each application logic node in the simplified function matrix.
[0077] (3) Based on the flow logic structure between each application logic node in the simplified function matrix, the cross structure of each application logic node in the simplified function matrix is simplified and merged to obtain multiple logical node combinations with sequential structures and record them.
[0078] In this embodiment, all application logic nodes with sequential structures in the logic function matrix are first simplified and merged to obtain a combination of logic nodes containing only cross structures. Then, the combination of logic nodes with cross structures is simplified and merged again. At this time, a new combination of logic nodes with sequential structures may be generated. The aforementioned simplification and merging of sequential structures and cross structures are then executed cyclically. The cross structures include parallel structures, selection structures, and iterative structures.
[0079] Different process logic structures are processed using corresponding simplification and merging methods, and can be expressed by corresponding logical function expressions. The specific logical function expressions for the combination of logical nodes after simplification and merging of each type of process logic structure are as follows:
[0080] For P1, P2, P3 in a sequential structure, if T1 = {P1, P2} and f1 = {P1 → P2}, then the simplified and merged logical function expression of each logical node combination is: f1 = (T1, P3) = 1;
[0081] For parallel structures P1, P2, P3, P4, if T2 = {P2, P3} and f2 = {P2||P3}, then the simplified combined logical function expression of each logical node is: f1(P1, T2) = f1(T2, P4) = 1;
[0082] For the selected structure P1, P2, P3, P4, if T3 = {P2, P3} and f3 = {P2^P3}, then the simplified and merged logical function expression of each logical node combination is: f1 = (T3, P3) = f1(T3, P4) = 1;
[0083] For the sequential structure P1, P2, P3, P4, if T4 = {P1, P2} and f4 = {P2 ∪ P3}, then the simplified and merged logical function expression of each logical node combination is: f1 = (P3, T4) = f1(T4, P4) = 1.
[0084] 206. Combine and connect the application logic start point and application logic end point with logic nodes to form workflow components.
[0085] This invention describes in detail the identification of the process logic structure between application logic nodes. Based on the logical relationship between the target application logic node and other connected application logic nodes, the process logic relationship between the target application logic node and one or more application logic nodes is determined, and the application part and process part of the component are associated. Then, the simplified merging process of application logic nodes is further explained. Through the cyclical simplified merging process of sequential structure and cross structure, the application logic nodes are abstracted, and the common features of the process logic structure are extracted. Finally, the workflow component formed by the set of logic nodes is more suitable for different scenarios and its reusability is improved.
[0086] Please see Figure 3 A third embodiment of the workflow component generation method in this invention includes:
[0087] 301. Obtain the logic function matrix corresponding to the workflow model, extract the application logic start point and application logic end point from the logic function matrix, and identify all application logic nodes between the application logic start point and application logic end point and the process logic structure between each application logic node.
[0088] 302. Based on the process logic structure, simplify and merge each application logic node to obtain multiple logic node combinations;
[0089] 303. Based on the application logic nodes contained in each combination of logic nodes, count the frequency of simplified merging processing for each application logic node.
[0090] 304. Based on the frequency of each application logic node, select a preset number of application logic nodes as reference logic nodes;
[0091] 305. If a logical node combination contains a reference logical node, then the logical node combination is removed.
[0092] In this embodiment, when the logical node combination containing the application logical node is re-simplified and merged, it is equivalent to the application logical node itself being re-simplified and merged. The more times an application logical node is simplified and merged, the higher its frequency of appearing in the logical node combination, and the more unstable it is. This means that the application logical node is not suitable for general scenarios, but is specifically designed for the specific scenario corresponding to this workflow model. In this case, the application logical node with a high frequency of simplification and merging can be removed.
[0093] Specifically, after multiple simplification and merging processes, the final result is a set of multiple logical node combinations {T1, T2, ..., T...} n If, after statistical analysis, the k most frequent application logic nodes {C1, C2, ..., C} are obtained... k}, then it will contain {C1, C2, ..., C} k The set of logical node combinations of} is removed.
[0094] 306. Combine and connect the application logic start point and application logic end point with logic nodes to form workflow components;
[0095] 307. Obtain the configuration file corresponding to the workflow component, compare the configuration file with the structural specification file corresponding to the preset standard workflow component, and verify the integrity of the workflow component based on the comparison results;
[0096] In this embodiment, the integrity verification of workflow components is performed by comparing the configuration file corresponding to the workflow component with the structure specification file corresponding to the pre-configured standard workflow component to determine whether the structures involved in the two are consistent. The structure planning file can be in XML (Extensible Markup Language) format. The integrity verification of the configuration file is performed using the Schema specification. If the configuration file conforms to the Schama specification, the process proceeds to the next step; otherwise, error handling is performed.
[0097] 308. If the workflow component passes the integrity verification, then perform a logical rationality verification on the workflow component according to the configuration file.
[0098] In this embodiment, the logical rationality verification of workflow components mainly verifies whether the workflow process involved in the configuration file is reasonable, whether the logical organization of resources and data information can meet the requirements of the corresponding workflow process, and whether the component body content is complete.
[0099] 309. If the workflow component passes the rationality verification, the component body of the corresponding application logic node of the workflow component is instantiated according to the configuration file to execute the workflow component.
[0100] In this embodiment, the instantiation process of the constructor of the application logic node corresponding to the workflow component mainly includes the following three steps:
[0101] 1) Component loading: Load the various functional modules corresponding to the component body in the configuration file, such as program packages and executable programs, into the preset workflow management system according to the specified path.
[0102] 2) Data information deployment: Based on the data section of the configuration file, deploy the corresponding data objects to the corresponding locations in the workflow management system to realize entity parsing of the application part in the workflow component.
[0103] 3) Process Management: After the application part of the workflow component is parsed, the parsed result is passed to the process manager, and the process manager is used to instantiate the process part of the workflow component.
[0104] The workflow components are parsed to generate workflow processes. The workflow manager manages the lifecycle of the workflow processes, including instantiating workflow processes and performing operations such as starting, suspending, resuming and stopping workflow processes, as well as decomposing workflow processes into basic activity units.
[0105] In this embodiment of the invention, after simplifying and merging to obtain multiple sets of logical nodes, unstable application logical nodes are screened out, and the sets of logical nodes containing the application logical nodes are removed, thereby improving the versatility of workflow components and enhancing their reusability.
[0106] The method for generating workflow components in the embodiments of the present invention has been described above. The apparatus for generating workflow components in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 4 One embodiment of the workflow component generation device in this invention includes:
[0107] The identification module 401 is used to obtain the logic function matrix corresponding to the workflow model, extract the application logic start point and application logic end point in the logic function matrix, and identify all application logic nodes between the application logic start point and the application logic end point and the process logic structure between each application logic node.
[0108] The simplification and merging module 402 is used to simplify and merge each of the application logic nodes according to the process logic structure to obtain a combination of multiple logic nodes.
[0109] The connection module 403 is used to combine and connect the application logic start point and the application logic end point with logic nodes respectively to form workflow components.
[0110] In this embodiment of the invention, the logic function matrix corresponding to the workflow model is obtained, such as the local logic function matrix of the component to be generated in the workflow model of an existing application system. Then, the application logic start point and application logic end point of the component to be generated are extracted from the logic function matrix. Next, the process logic structure between the application logic nodes before the two is identified, and the application logic nodes are simplified and merged. That is, multiple application logic sections with corresponding process logic structures are merged into a virtual node using a preset algorithm, which is represented as a logic node combination in this case. The application logic nodes in the abstract logic function matrix are then combined and connected with the application logic start point and application logic midpoint respectively to obtain the workflow component. The workflow process information, i.e., the process logic structure, is added to the component, and the low-dimensional application logic nodes are abstracted, making the application description in the component more universal and applicable to multiple conventional or special software development scenarios, thereby improving the reusability of the component.
[0111] Please see Figure 5 Another embodiment of the workflow component generation device in this invention includes:
[0112] The identification module 401 is used to obtain the logic function matrix corresponding to the workflow model, extract the application logic start point and application logic end point in the logic function matrix, and identify all application logic nodes between the application logic start point and the application logic end point and the process logic structure between each application logic node.
[0113] The simplification and merging module 402 is used to simplify and merge each of the application logic nodes according to the process logic structure to obtain a combination of multiple logic nodes.
[0114] The connection module 403 is used to combine and connect the application logic start point and the application logic end point with logic nodes respectively to form workflow components.
[0115] In this embodiment of the invention, the identification module 401 includes:
[0116] Search unit 4011 is used to search for one or more application logic nodes between the application logic start point and the application logic end point in the logic function matrix;
[0117] The identification unit 4012 is used to identify the process logic between each application logic node, and to determine the process logic structure between each application logic node and each connected application logic node according to the process logic.
[0118] In this embodiment of the invention, the simplified merging module 402 includes:
[0119] The simplification and merging unit 4021 is used to simplify and merge each of the application logic nodes according to the process logic structure, obtain multiple logic node combinations and record them, and determine whether the logic node combinations meet the preset minimum simplification conditions.
[0120] The loop unit 4022 is used to further simplify and merge each logical node combination according to the flow logic structure between each logical node combination if the logical node combination does not meet the preset simplification condition, until the second logical node combination meets the preset simplification condition and the simplification and merging process stops, resulting in multiple logical node combinations.
[0121] In this embodiment of the invention, the simplified merging unit 4021 is further configured to:
[0122] Based on the process logic structure, each application logic node is simplified and merged according to its sequential structure to obtain multiple combinations of logic nodes with cross structures, which are then recorded.
[0123] By replacing the corresponding application logic nodes in the logic function matrix with a combination of logic nodes with cross structures, a simplified function matrix is obtained, and the flow logic structure between each application logic node in the simplified function matrix is identified.
[0124] Based on the flow logic structure between each application logic node in the simplified function matrix, the application logic nodes in the simplified function matrix are simplified and merged through cross-structure processing to obtain multiple combinations of logic nodes with sequential structures, which are then recorded.
[0125] In this embodiment of the invention, the workflow component generation device further includes:
[0126] The statistics module 404 is used to count the frequency of simplified merging processing of each application logic node based on the application logic nodes contained in each logical node combination.
[0127] The selection module 405 is used to select a preset number of application logic nodes as reference logic nodes according to the frequency of each application logic node.
[0128] The elimination module 406 is used to eliminate the logical node combination if the logical node combination contains the reference logical node.
[0129] In this embodiment of the invention, the workflow component generation device further includes:
[0130] The integrity verification module 407 is used to obtain the configuration file corresponding to the workflow component, compare the configuration file with the structural specification file corresponding to the preset standard workflow component, and perform integrity verification on the workflow component based on the comparison result.
[0131] The rationality verification module 408 is used to perform logical rationality verification on the workflow component according to the configuration file if the workflow component passes the integrity verification.
[0132] The instantiation module 409 is used to instantiate the component body of the application logic node corresponding to the workflow component according to the configuration file if the workflow component passes the rationality verification, so as to execute the workflow component.
[0133] This invention describes in detail the identification of the process logic structure between application logic nodes, associating the application part and process part of the component; then it further explains the simplified merging process of application logic nodes, abstracting the application logic nodes, extracting the common features of the process logic structure, and finally making the workflow component formed by the set of logic nodes more suitable for different scenarios, thus improving its reusability; next, it introduces that after simplifying and merging to obtain multiple sets of logic nodes, unstable application logic nodes are also screened out, and the set of logic nodes containing the application logic nodes is removed, improving the versatility of the workflow component, and further improving the reusability of the workflow component.
[0134] above Figure 4 and Figure 5 The workflow component generation device in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The workflow component generation device in this embodiment of the invention will be described in detail from the perspective of hardware processing.
[0135] Figure 6This is a schematic diagram of a workflow component generation device 600 provided in an embodiment of the present invention. The workflow component generation device 600 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) for storing application programs 633 or data 632. The memory 620 and storage media 630 can be temporary or persistent storage. The program stored in the storage media 630 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the workflow component generation device 600. Furthermore, the processor 610 may be configured to communicate with the storage media 630 and execute the series of instruction operations in the storage media 630 on the workflow component generation device 600.
[0136] The workflow component generation device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input / output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 6 The illustrated workflow component generation device structure does not constitute a limitation on the workflow component generation device, and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0137] The present invention also provides a workflow component generation apparatus, wherein the computer apparatus includes a memory and a processor, the memory storing computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of the workflow component generation method described in the above embodiments. The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, storing instructions that, when executed on a computer, cause the computer to perform the steps of the workflow component generation method.
[0138] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0139] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0140] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating workflow components, characterized in that, The method for generating the workflow components includes: Obtain the logic function matrix corresponding to the workflow model, extract the application logic start point and application logic end point from the logic function matrix, and identify all application logic nodes between the application logic start point and application logic end point and the process logic structure between each application logic node. According to the process logic structure, the application logic nodes are simplified and merged to obtain multiple logic node combinations, including: simplifying and merging all application logic nodes with sequential structures in the logic function matrix according to the process logic structure to obtain logic node combinations containing only cross structures; simplifying and merging the logic node combinations with cross structures; if a new logic node combination with sequential structure is generated, the simplification and merging of sequential structure and cross structure are repeatedly executed until the logic node combination meets the preset minimum simplification condition, at which point the simplification and merging process stops, resulting in multiple logic node combinations. The application logic start point and the application logic end point are respectively combined and connected with logic node combinations to form a workflow component. This includes: according to the application logic nodes contained in each logic node combination, counting the frequency of simplified merging processing of each application logic node; selecting a preset number of application logic nodes as reference logic nodes according to the frequency of each application logic node; and removing the logic node combination if it contains the reference logic node.
2. The method for generating workflow components according to claim 1, characterized in that, The process logic structure for identifying all application logic nodes between the application logic start point and the application logic end point, and the flow logic structure between each application logic node, includes: Search the logical function matrix for one or more application logic nodes between the application logic start point and the application logic end point; Identify the flow logic between each application logic node, and determine the flow logic structure between each application logic node and each connected application logic node based on the flow logic.
3. The method for generating workflow components according to claim 1, characterized in that, Based on the aforementioned process logic structure, the application logic nodes are simplified and merged to obtain multiple logic node combinations, which are then recorded, including: Based on the process logic structure, each application logic node is simplified and merged according to its sequential structure to obtain multiple combinations of logic nodes with cross structures, which are then recorded. By replacing the corresponding application logic nodes in the logic function matrix with a combination of logic nodes with cross structures, a simplified function matrix is obtained, and the flow logic structure between each application logic node in the simplified function matrix is identified. Based on the flow logic structure between each application logic node in the simplified function matrix, the application logic nodes in the simplified function matrix are simplified and merged through cross-structure processing to obtain multiple combinations of logic nodes with sequential structures, which are then recorded.
4. The method for generating workflow components according to claim 1, characterized in that, After combining and connecting the application logic start point and the application logic end point with logic nodes to form workflow components, the method further includes: Obtain the configuration file corresponding to the workflow component, compare the configuration file with the structural specification file corresponding to the preset standard workflow component, and verify the integrity of the workflow component based on the comparison result; If the workflow component passes the integrity verification, then the logical rationality verification of the workflow component is performed according to the configuration file. If the workflow component passes the rationality verification, then according to the configuration file, the component body of the application logic node corresponding to the workflow component is instantiated to execute the workflow component.
5. A device for generating workflow components, characterized in that, The workflow component generation device includes: The identification module is used to obtain the logic function matrix corresponding to the workflow model, extract the application logic start point and application logic end point in the logic function matrix, and identify all application logic nodes between the application logic start point and the application logic end point and the process logic structure between each application logic node. The simplification and merging module is used to simplify and merge each of the application logic nodes according to the process logic structure to obtain multiple logic node combinations. Specifically, according to the process logic structure, all application logic nodes with sequential structures in the logic function matrix are simplified and merged to obtain logic node combinations containing only cross structures; the logic node combinations with cross structures are simplified and merged for cross structures; if logic node combinations with sequential structures are generated again, the simplification and merging processes for sequential structures and cross structures are executed cyclically until the logic node combination meets the preset minimum simplification condition, at which point the simplification and merging process stops, resulting in multiple logic node combinations. The connection module is used to connect the application logic start point and the application logic end point to logic node combinations to form workflow components. Specifically, based on the application logic nodes contained in each logic node combination, the frequency of simplification and merging processing of each application logic node is counted. Based on the frequency of each application logic node, a preset number of application logic nodes are selected as reference logic nodes. If the logic node combination contains the reference logic node, the logic node combination is removed.
6. The workflow component generation apparatus according to claim 5, characterized in that, The workflow component generation device further includes: The integrity verification module is used to obtain the configuration file corresponding to the workflow component, compare the configuration file with the structural specification file corresponding to the preset standard workflow component, and perform integrity verification on the workflow component based on the comparison result. A rationality verification module is used to perform logical rationality verification on the workflow component according to the configuration file if the workflow component passes the integrity verification. An instantiation module is used to instantiate the component body of the application logic node corresponding to the workflow component according to the configuration file if the workflow component passes the rationality verification, so as to execute the workflow component.
7. A workflow component generation device, characterized in that, The device for generating the workflow components includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the workflow component generation device to perform the workflow component generation method as described in any one of claims 1-5.
8. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the method for generating workflow components as described in any one of claims 1-5.
Citation Information
Patent Citations
A control flow graph construction method for object-oriented programming
CN109408034A