A method and system for circulating a process in a workflow
By obtaining and parsing process configuration files, dividing nodes and setting permission values, and detecting anomalies in real time, it solves the problem of inability to accurately configure and identify illegal processes in the existing technology, realizes stable circulation and exception handling of workflow, and improves workflow execution efficiency.
Patent Information
- Application Number
- CN202310863130.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-07-13
AI Technical Summary
The existing technology cannot accurately configure the workflow process and cannot identify and handle illegal processes, resulting in the inability to timely investigate and handle abnormal situations.
By obtaining the process configuration file, parsing and generating process circulation instructions, dividing workflow nodes, setting the permission values of operators and circulation persons, detecting abnormal information in real time, and processing according to the exception type, including branch merge circulation and reverse rollback.
It achieves accurate configuration of workflow processes and stable and reliable circulation, prevents abnormal process circulation, and improves workflow execution efficiency and exception handling capabilities.
Smart Images

Figure CN117151613B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of process management, and in particular to a process circulation method and system in a workflow. Background Art
[0002] The concept of workflow originated from the field of production organization and office automation. It is a concept proposed for activities with fixed procedures in daily work. The purpose is to improve work efficiency, better control processes, enhance customer service, and effectively manage business processes by breaking down work into well-defined tasks or roles, executing these tasks according to certain rules and processes and monitoring them. Workflow is to organize a group of tasks to complete a certain business process: it defines the triggering sequence and triggering conditions of the tasks. Each task can be completed by one or more software systems, or by one or a group of people, or by one or more people in collaboration with the software system.
[0003] The existing workflow execution method refers to the definition of the process model, distributes process activities to different process participants according to the execution status of the process, requires them to complete the activities according to the specifications, and automatically completes the transfer of process-related documents, information or tasks between different executors. However, this process circulation method relies on the knowledge, skills and business experience of the process participants. The process participants take the lead in formulating the appropriate process execution sequence based on the process context content. When there are various abnormal situations in the process, the abnormal situations cannot be checked in time. Summary of the invention
[0004] The embodiment of the present invention provides a method and system for circulating a process in a workflow, so as to solve the technical problems in the prior art that the workflow process cannot be accurately configured and illegal processes cannot be identified.
[0005] In order to achieve the above object, the present invention provides a method for circulating a process in a workflow, the method comprising:
[0006] Acquire a process configuration file, parse the process configuration file, and generate a process circulation instruction of the process configuration file, wherein the process configuration file is an extensible markup language XML file;
[0007] Generate a process circulation chain based on the process circulation instruction, divide the process circulation chain into workflow nodes, set a process operator and a process circulator, and generate different authority values for the process operator and the process circulator respectively;
[0008] Generating different node identifiers for the divided workflow nodes, and circulating the process configuration file according to the node identifiers and the authority values;
[0009] Real-time anomaly detection is performed on the process configuration file. When abnormal information is detected, the abnormal type of the abnormal information is judged, and the process configuration file is subjected to abnormal processing according to the judgment result.
[0010] In one of the embodiments, when the process configuration file is circulated according to the node identifier and the authority value, the process includes:
[0011] Parse each node identifier, and when a branch node identifier is obtained, determine the number of branches to be branched according to the branch node identifier;
[0012] Determine whether branch merging and circulation is required based on the relationship between the number of branches to be merged and the preset number,
[0013] When the number of branches to be merged is greater than or equal to the preset number, it is determined that branch merging and circulation is required;
[0014] When the number of branches to be circulated is less than the preset number, it is determined that branch merging and circulation is not necessary.
[0015] In one embodiment, when determining that branch merging and circulation is required, the process includes:
[0016] Perform node branching according to the branch node identifier to obtain multiple branch chains, and obtain the influence degree A and historical operation duration T of each branch chain;
[0017] Determine a first merging factor of the branch chain according to the impact degree A, and determine a second merging factor of the branch chain according to the historical operation duration T of the branch chain;
[0018] Calculating the comprehensive degree value of the branch chain according to the first merging factor and the second merging factor;
[0019] Sorting the comprehensive degree values of all branch chains by numerical value, and generating a first branch chain set from branch chains whose comprehensive degree values are greater than or equal to a preset degree value, and generating a second branch chain set from branch chains whose comprehensive degree values are less than the preset degree value;
[0020] Adjacent branch chains in the second branch chain set are combined in pairs according to the numerical order of all comprehensive degree values to obtain combined branch chains, and the combined branch chains are branch-merged and circulated.
[0021] In one embodiment, after the branch chains in the second branch chain set are combined in pairs according to the numerical value order to obtain the combined branch chains, the method further includes:
[0022] Determine whether there are any remaining branch chains in the second branch chain set,
[0023] If so, the remaining branch chains will not be merged and circulated.
[0024] In one embodiment, when determining the first merging factor of the branch chain according to the impact degree A, it includes:
[0025] Preset the influence degree matrix B of the branch chain, set B (B1, B2, B3, B4), where B1 is the first preset influence degree, B2 is the second preset influence degree, B3 is the third preset influence degree, B4 is the fourth preset influence degree, and B1<B2<B3<B4;
[0026] A first merging factor matrix C of a preset branch chain is set as C (C1, C2, C3, C4, C5), wherein C1 is a first preset first merging factor, C2 is a second preset first merging factor, C3 is a third preset first merging factor, C4 is a fourth preset first merging factor, C5 is a fifth preset first merging factor, and C1<C2<C3<C4<C5;
[0027] The first merging factor of the branch chain is set according to the relationship between the influence degree A of the branch chain and each preset influence degree:
[0028] When A<B1, the first preset first merging factor C1 is selected as the first merging factor of the branch chain;
[0029] When B1≤A<B2, the second preset first merging factor C2 is selected as the first merging factor of the branch chain;
[0030] When B2≤A<B3, the third preset first merging factor C3 is selected as the first merging factor of the branch chain;
[0031] When B3≤A<B4, the fourth preset first merging factor C4 is selected as the first merging factor of the branch chain;
[0032] When B4≤A, the fifth preset first merging factor C5 is selected as the first merging factor of the branch chain.
[0033] In one embodiment, when determining the second merging factor of the branch chain according to the historical operation duration T of the branch chain, it includes:
[0034] The historical operation duration matrix G of the preset branch chain is set to G (G1, G2, G3, G4), where G1 is the first preset historical operation duration, G2 is the second preset historical operation duration, G3 is the third preset historical operation duration, G4 is the fourth preset historical operation duration, and G1<G2<G3<G4;
[0035] A second merging factor matrix D of the preset branch chain is set to D (D1, D2, D3, D4, D5), wherein D1 is the first preset second merging factor, D2 is the second preset second merging factor, D3 is the third preset second merging factor, D4 is the fourth preset second merging factor, D5 is the fifth preset second merging factor, and D1<D2<D3<D4<D5;
[0036] The second merging factor of the branch chain is set according to the relationship between the historical operation duration T of the branch chain and each preset historical operation duration:
[0037] When T<G1, the first preset second merging factor D1 is selected as the second merging factor of the branch chain;
[0038] When G1≤T<G2, the second preset second merging factor D2 is selected as the second merging factor of the branch chain;
[0039] When G2≤T<G3, the third preset second merging factor D3 is selected as the second merging factor of the branch chain;
[0040] When G3≤T<G4, the fourth preset second merging factor D4 is selected as the second merging factor of the branch chain;
[0041] When G4≤T, the fifth preset second merging factor D5 is selected as the second merging factor of the branch chain.
[0042] In one of the embodiments, when abnormal information is detected, the abnormal type of the abnormal information is judged, and the process configuration file is subjected to abnormal processing according to the judgment result, including:
[0043] Determine the abnormal type of the abnormal information,
[0044] When the exception type is a process circulation exception, the workflow nodes in the process circulation exception are reorganized;
[0045] When the exception type is a process operation exception, the workflow node with the process operation exception is reversely rolled back.
[0046] In one embodiment, when a workflow node with abnormal process operation is reversely rolled back, the process includes:
[0047] Acquire an unfinished workflow node according to the node identifier;
[0048] Put the unfinished workflow nodes into a first rollback set, and sort them according to the pending completion time of each unfinished workflow node, wherein the unfinished workflow nodes include workflow nodes with abnormal process operations;
[0049] Put the workflow node with abnormal process operation into the second rollback set, and determine the node type of the workflow node with abnormal process operation.
[0050] When the node type is a main workflow node, all sub-workflow nodes corresponding to the main workflow node are reversely rolled back in the order of time to be completed;
[0051] When the node type is a sub-workflow node, the sub-workflow node is reversely rolled back in the order of time to be completed.
[0052] In one embodiment, after reverse rolling back the workflow node with abnormal process operation, the method further includes:
[0053] An exception report is generated according to the reverse rollback situation, and the exception report is sent.
[0054] In order to achieve the above object, the present invention provides a workflow process circulation system, the system comprising:
[0055] An acquisition module, used for acquiring a process configuration file, parsing the process configuration file, and generating a process circulation instruction of the process configuration file, wherein the process configuration file is an extensible markup language XML file;
[0056] A generating module, used for generating a process circulation chain based on the process circulation instruction, dividing the process circulation chain into workflow nodes, and setting process operators and process circulators, and generating different authority values for the process operators and the process circulators respectively;
[0057] A circulation module, used to generate different node identifiers for the divided workflow nodes, and circulate the process configuration file according to the node identifiers and the authority values;
[0058] The processing module is used to perform real-time anomaly detection on the process configuration file, and when abnormal information is detected, judge the abnormal type of the abnormal information, and perform abnormal processing on the process configuration file according to the judgment result.
[0059] The present invention provides a method and system for circulating a process in a workflow, which has the following beneficial effects compared with the prior art:
[0060] The present invention discloses a process circulation method and system in a workflow, which obtains a process configuration file, parses the process configuration file, generates a process circulation instruction, generates a process circulation chain based on the process circulation instruction, divides the process circulation chain into workflow nodes, and sets a process operator and a process circulator, generates different authority values for the process operator and the process circulator respectively, generates different node identifiers for the divided workflow nodes, circulates the process configuration file according to the node identifier and the authority value, performs real-time anomaly detection on the process configuration file, judges the anomaly type of the anomaly information when anomaly information is detected, and performs anomaly processing on the process configuration file according to the judgment result. The present invention can accurately configure the workflow process, ensure stable and reliable process circulation, and prevent process circulation anomalies from occurring during the execution of the workflow. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic diagram of a flow chart of a method for circulating a process in a workflow according to an embodiment of the present invention is shown;
[0062] Figure 2 A schematic diagram of the structure of a workflow process circulation system in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0063] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0064] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0065] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0066] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0067] The following is a description of preferred embodiments of the present invention with reference to the accompanying drawings.
[0068] like Figure 1 As shown, an embodiment of the present invention discloses a method for circulating a process in a workflow, characterized in that the method comprises:
[0069] S110: Acquire a process configuration file, parse the process configuration file, and generate a process circulation instruction of the process configuration file, wherein the process configuration file is an extensible markup language XML file.
[0070] In this embodiment, the process circulation instruction can be set according to the process configuration file, such as data collection, data review, report generation, report review, and report submission.
[0071] S120: Generate a process circulation chain based on the process circulation instruction, divide the process circulation chain into workflow nodes, set a process operator and a process circulator, and generate different authority values for the process operator and the process circulator respectively.
[0072] In this embodiment, the process circulation chain is data collection-data review-report generation-report review-report submission, data collection is the first workflow node, data review is the second workflow node, and other examples are not given one by one.
[0073] In this embodiment, the process operator refers to a person who can perform operations. For example, when conducting data review, all data will be submitted to the corresponding person for review. The corresponding person is the process operator. The process circulator refers to the person who submits the data. The authority of the process operator is much greater than that of the process circulator. The process circulator can only make relevant submissions and cannot view specific content.
[0074] It should be understood that the present invention can ensure the normal progress of the workflow, while performing authority division to avoid leakage of related content.
[0075] S130: generating different node identifiers for the divided workflow nodes, and circulating the process configuration file according to the node identifiers and the authority values.
[0076] In some embodiments of the present application, when the process configuration file is circulated according to the node identifier and the authority value, the process includes:
[0077] Parse each node identifier, and when a branch node identifier is obtained, determine the number of branches to be branched according to the branch node identifier;
[0078] Determine whether branch merging and circulation is required based on the relationship between the number of branches to be merged and the preset number,
[0079] When the number of branches to be merged is greater than or equal to the preset number, it is determined that branch merging and circulation is required;
[0080] When the number of branches to be circulated is less than the preset number, it is determined that branch merging and circulation is not necessary.
[0081] In this embodiment, the node identifier may be a branch node identifier, which means that node branching is required, such as data review, which may be divided into primary review, secondary review, and final review.
[0082] In this embodiment, when the number of branches to be processed is greater than or equal to the preset number, the number of branches is large and the process circulation time is long, so the branches are merged and circulated. The present invention shortens the process circulation time and improves workflow efficiency without affecting the process circulation.
[0083] In some embodiments of the present application, when determining that branch merging and circulation is required, the process includes:
[0084] Perform node branching according to the branch node identifier to obtain multiple branch chains, and obtain the influence degree A and historical operation duration T of each branch chain;
[0085] Determine a first merging factor of the branch chain according to the impact degree A, and determine a second merging factor of the branch chain according to the historical operation duration T of the branch chain;
[0086] Calculating the comprehensive degree value of the branch chain according to the first merging factor and the second merging factor;
[0087] Sorting the comprehensive degree values of all branch chains by numerical value, and generating a first branch chain set from branch chains whose comprehensive degree values are greater than or equal to a preset degree value, and generating a second branch chain set from branch chains whose comprehensive degree values are less than the preset degree value;
[0088] Adjacent branch chains in the second branch chain set are combined in pairs according to the numerical order of all comprehensive degree values to obtain combined branch chains, and the combined branch chains are branch-merged and circulated.
[0089] In this embodiment, the first-level review, the second-level review and the final review are divided into a branch chain.
[0090] In this embodiment, the influence degree of the branch chain refers to the importance of each branch chain, such as the importance of the first-level review is 2, the importance of the second-level review is 4, and the importance of the final review is 6. The historical operation duration refers to the historical operation duration corresponding to each branch chain.
[0091] In this embodiment, the comprehensive degree value refers to the sum of the first merging factor and the second merging factor.
[0092] In this embodiment, when the comprehensive degree value is greater than or equal to the preset degree value, it indicates that the corresponding branch chain will not be merged and circulated.
[0093] In this embodiment, adjacent branch chains in the second branch chain set are combined in pairs according to the numerical order of all comprehensive degree values to obtain combined branch chains. For example, if there are 10 branch chains in total, the first one is generated with label 1, the second one is generated with label 2, and so on. Label 1 and label 2 are combined, and label 3 and label 4 are combined. Examples are not given one by one here.
[0094] It should be understood that the present invention can effectively shorten the process circulation time and improve work efficiency by branching, merging and circulating.
[0095] In some embodiments of the present application, after the branch chains in the second branch chain set are combined in pairs according to the numerical value order to obtain the combined branch chains, the method further includes:
[0096] Determine whether there are any remaining branch chains in the second branch chain set,
[0097] If so, the remaining branch chains will not be merged and circulated.
[0098] In this embodiment, if there are nine branch chains in the second branch chain set, the ninth branch chain cannot form a combination, so the ninth branch chain is not subjected to branch merging and circulation.
[0099] In some embodiments of the present application, when determining the first merging factor of the branch chain according to the impact degree A, it includes:
[0100] Preset the influence degree matrix B of the branch chain, set B (B1, B2, B3, B4), where B1 is the first preset influence degree, B2 is the second preset influence degree, B3 is the third preset influence degree, B4 is the fourth preset influence degree, and B1<B2<B3<B4;
[0101] A first merging factor matrix C of a preset branch chain is set as C (C1, C2, C3, C4, C5), wherein C1 is a first preset first merging factor, C2 is a second preset first merging factor, C3 is a third preset first merging factor, C4 is a fourth preset first merging factor, C5 is a fifth preset first merging factor, and C1<C2<C3<C4<C5;
[0102] The first merging factor of the branch chain is set according to the relationship between the influence degree A of the branch chain and each preset influence degree:
[0103] When A<B1, the first preset first merging factor C1 is selected as the first merging factor of the branch chain;
[0104] When B1≤A<B2, the second preset first merging factor C2 is selected as the first merging factor of the branch chain;
[0105] When B2≤A<B3, the third preset first merging factor C3 is selected as the first merging factor of the branch chain;
[0106] When B3≤A<B4, the fourth preset first merging factor C4 is selected as the first merging factor of the branch chain;
[0107] When B4≤A, the fifth preset first merging factor C5 is selected as the first merging factor of the branch chain.
[0108] In this embodiment, the first merging factor of the branch chain is set according to the relationship between the influence degree A of the branch chain and each preset influence degree. The present invention can provide reliable data support for calculating the comprehensive degree value.
[0109] In some embodiments of the present application, when determining the second merging factor of the branch chain according to the historical operation duration T of the branch chain, it includes:
[0110] The historical operation duration matrix G of the preset branch chain is set to G (G1, G2, G3, G4), where G1 is the first preset historical operation duration, G2 is the second preset historical operation duration, G3 is the third preset historical operation duration, G4 is the fourth preset historical operation duration, and G1<G2<G3<G4;
[0111] A second merging factor matrix D of the preset branch chain is set to D (D1, D2, D3, D4, D5), wherein D1 is the first preset second merging factor, D2 is the second preset second merging factor, D3 is the third preset second merging factor, D4 is the fourth preset second merging factor, D5 is the fifth preset second merging factor, and D1<D2<D3<D4<D5;
[0112] The second merging factor of the branch chain is set according to the relationship between the historical operation duration T of the branch chain and each preset historical operation duration:
[0113] When T<G1, the first preset second merging factor D1 is selected as the second merging factor of the branch chain;
[0114] When G1≤T<G2, the second preset second merging factor D2 is selected as the second merging factor of the branch chain;
[0115] When G2≤T<G3, the third preset second merging factor D3 is selected as the second merging factor of the branch chain;
[0116] When G3≤T<G4, the fourth preset second merging factor D4 is selected as the second merging factor of the branch chain;
[0117] When G4≤T, the fifth preset second merging factor D5 is selected as the second merging factor of the branch chain.
[0118] In this embodiment, the second merging factor of the branch chain is set according to the relationship between the historical operation duration T of the branch chain and each preset historical operation duration, which can further ensure the calculation accuracy of the comprehensive degree value.
[0119] S140: Performing real-time anomaly detection on the process configuration file, and when abnormal information is detected, determining the abnormal type of the abnormal information, and performing abnormal processing on the process configuration file according to the determination result.
[0120] In some embodiments of the present application, when abnormal information is detected, the abnormal type of the abnormal information is judged, and the process configuration file is subjected to abnormal processing according to the judgment result, including:
[0121] Determine the abnormal type of the abnormal information,
[0122] When the exception type is a process circulation exception, the workflow nodes in the process circulation exception are reorganized;
[0123] When the exception type is a process operation exception, the workflow node with the process operation exception is reversely rolled back.
[0124] In this embodiment, when the exception type is a process circulation exception, that is, an abnormal operation generated by a process circulator, it is a process circulation exception. At this time, the workflow nodes in the process circulation exception are reorganized, that is, the circulation is performed again.
[0125] In this embodiment, when the exception type is a process operation exception, that is, an abnormal operation generated by a process operator, the workflow node in the process operation exception is reversely rolled back.
[0126] It should be understood that the present invention implements different processing methods according to different exception types, which can prevent the workflow from being chaotic and ensure the normal progress of the workflow.
[0127] In some embodiments of the present application, when a workflow node with abnormal process operation is reversely rolled back, the process includes:
[0128] Acquire an unfinished workflow node according to the node identifier;
[0129] Put the unfinished workflow nodes into a first rollback set, and sort them according to the pending completion time of each unfinished workflow node, wherein the unfinished workflow nodes include workflow nodes with abnormal process operations;
[0130] Put the workflow node with abnormal process operation into the second rollback set, and determine the node type of the workflow node with abnormal process operation.
[0131] When the node type is a main workflow node, all sub-workflow nodes corresponding to the main workflow node are reversely rolled back in the order of time to be completed;
[0132] When the node type is a sub-workflow node, the sub-workflow node is reversely rolled back in the order of time to be completed.
[0133] In this embodiment, the incompletely executed workflow nodes include incomplete workflow nodes and abnormal workflow nodes.
[0134] In this embodiment, the time to be completed refers to the order in which the workflow nodes are completed.
[0135] In this embodiment, when the node type is a main workflow node, that is, the above-mentioned data review node, the sub-workflow node is the above-mentioned first-level review-second-level review-final review.
[0136] In this embodiment, when the node type is a main workflow node, all sub-workflow nodes corresponding to the main workflow node will be reversely rolled back in the order of completion time. That is to say, when an abnormality occurs in the data review node, it is necessary to review the first-level review-second-level review-final review. When the node type is a sub-workflow node, the sub-workflow nodes will be reversely rolled back in the order of completion time. At this time, only the corresponding sub-workflow nodes need to be re-reviewed.
[0137] It should be understood that the present invention can process the abnormal information in a targeted manner, improve the efficiency of abnormal processing, and ensure the thorough processing of the abnormal information.
[0138] In some embodiments of the present application, after reverse rolling back the workflow node in which the process operation is abnormal, the process further includes:
[0139] An exception report is generated according to the reverse rollback situation, and the exception report is sent.
[0140] In order to further explain the technical idea of the present invention, the technical solution of the present invention is now described in combination with specific application scenarios.
[0141] Correspondingly, such as Figure 2 As shown, a workflow process circulation system, the system includes:
[0142] An acquisition module, used for acquiring a process configuration file, parsing the process configuration file, and generating a process circulation instruction of the process configuration file, wherein the process configuration file is an extensible markup language XML file;
[0143] A generating module, used for generating a process circulation chain based on the process circulation instruction, dividing the process circulation chain into workflow nodes, and setting process operators and process circulators, and generating different authority values for the process operators and the process circulators respectively;
[0144] A circulation module, used to generate different node identifiers for the divided workflow nodes, and circulate the process configuration file according to the node identifiers and the authority values;
[0145] The processing module is used to perform real-time anomaly detection on the process configuration file, and when abnormal information is detected, judge the abnormal type of the abnormal information, and perform abnormal processing on the process configuration file according to the judgment result.
[0146] In summary, the embodiments of the present invention obtain a process configuration file, parse the process configuration file, obtain a process circulation instruction, generate a process circulation chain based on the process circulation instruction, divide the process circulation chain into workflow nodes, and set a process operator and a process circulator, respectively generate different authority values for the process operator and the process circulator, generate different node identifiers for the divided workflow nodes, circulate the process configuration file according to the node identifier and the authority value, perform real-time anomaly detection on the process configuration file, and when abnormal information is detected, judge the abnormal type of the abnormal information, and perform abnormal processing on the process configuration file according to the judgment result. The present invention can accurately configure the workflow process, ensure stable and reliable process circulation, and prevent process circulation anomalies from occurring during the execution of the workflow.
[0147] In the description of the above embodiments, specific features, structures, materials or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0148] Although the present invention has been described above with reference to the embodiments, various modifications may be made thereto and parts thereof may be replaced with equivalents without departing from the scope of the present invention. In particular, as long as there is no structural conflict, the various features in the embodiments disclosed by the present invention may be used in combination with each other in any manner, and the fact that these combinations are not fully described in this specification is only for the sake of omitting space and saving resources. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
[0149] Those skilled in the art can understand that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for circulating a process in a workflow, characterized in that: The method comprises: Acquire a process configuration file, parse the process configuration file, and generate a process circulation instruction of the process configuration file, wherein the process configuration file is an extensible markup language XML file; Generate a process circulation chain based on the process circulation instruction, divide the process circulation chain into workflow nodes, set a process operator and a process circulator, and generate different authority values for the process operator and the process circulator respectively; Generating different node identifiers for the divided workflow nodes, and circulating the process configuration file according to the node identifiers and the authority values; Performing real-time anomaly detection on the process configuration file, and when abnormal information is detected, determining the abnormal type of the abnormal information, and performing abnormal processing on the process configuration file according to the determination result; When the process configuration file is circulated according to the node identifier and the authority value, it includes: Parse each node identifier, and when a branch node identifier is obtained, determine the number of branches to be branched according to the branch node identifier; Determine whether branch merging and circulation is required based on the relationship between the number of branches to be merged and the preset number, When the number of branches to be merged is greater than or equal to the preset number, it is determined that branch merging and circulation is required; When the number of branches to be merged is less than the preset number, it is determined that branch merging and circulation is not necessary; When judging the need for branch merging and circulation, include: Perform node branching according to the branch node identifier to obtain multiple branch chains, and obtain the influence degree A and historical operation duration T of each branch chain; Determine a first merging factor of the branch chain according to the impact degree A, and determine a second merging factor of the branch chain according to the historical operation duration T of the branch chain; Calculating the comprehensive degree value of the branch chain according to the first merging factor and the second merging factor; Sorting the comprehensive degree values of all branch chains by numerical value, and generating a first branch chain set from branch chains whose comprehensive degree values are greater than or equal to a preset degree value, and generating a second branch chain set from branch chains whose comprehensive degree values are less than the preset degree value; Adjacent branch chains in the second branch chain set are combined in pairs according to the numerical order of all comprehensive degree values to obtain combined branch chains, and the combined branch chains are branch-merged and circulated.
2. The workflow process circulation method according to claim 1, characterized in that: After the branch chains in the second branch chain set are combined in pairs according to the numerical value order to obtain combined branch chains, the method further includes: Determine whether there are any remaining branch chains in the second branch chain set, If so, the remaining branch chains will not be merged and circulated.
3. The workflow process circulation method according to claim 1, characterized in that: When determining the first merging factor of the branch chain according to the impact degree A, it includes: Preset the influence degree matrix B of the branch chain, set B (B1, B2, B3, B4), where B1 is the first preset influence degree, B2 is the second preset influence degree, B3 is the third preset influence degree, B4 is the fourth preset influence degree, and B1<B2<B3<B4; A first merging factor matrix C of a preset branch chain is set as C (C1, C2, C3, C4, C5), wherein C1 is a first preset first merging factor, C2 is a second preset first merging factor, C3 is a third preset first merging factor, C4 is a fourth preset first merging factor, C5 is a fifth preset first merging factor, and C1<C2<C3<C4<C5; The first merging factor of the branch chain is set according to the relationship between the influence degree A of the branch chain and each preset influence degree: When A<B1, the first preset first merging factor C1 is selected as the first merging factor of the branch chain; When B1≤A<B2, the second preset first merging factor C2 is selected as the first merging factor of the branch chain; When B2≤A<B3, the third preset first merging factor C3 is selected as the first merging factor of the branch chain; When B3≤A<B4, the fourth preset first merging factor C4 is selected as the first merging factor of the branch chain; When B4≤A, the fifth preset first merging factor C5 is selected as the first merging factor of the branch chain.
4. The workflow process circulation method according to claim 1, characterized in that: When determining the second merging factor of the branch chain according to the historical operation duration T of the branch chain, it includes: The historical operation duration matrix G of the preset branch chain is set to G (G1, G2, G3, G4), where G1 is the first preset historical operation duration, G2 is the second preset historical operation duration, G3 is the third preset historical operation duration, G4 is the fourth preset historical operation duration, and G1<G2<G3<G4; A second merging factor matrix D of the preset branch chain is set to D (D1, D2, D3, D4, D5), wherein D1 is the first preset second merging factor, D2 is the second preset second merging factor, D3 is the third preset second merging factor, D4 is the fourth preset second merging factor, D5 is the fifth preset second merging factor, and D1<D2<D3<D4<D5; The second merging factor of the branch chain is set according to the relationship between the historical operation duration T of the branch chain and each preset historical operation duration: When T<G1, the first preset second merging factor D1 is selected as the second merging factor of the branch chain; When G1≤T<G2, the second preset second merging factor D2 is selected as the second merging factor of the branch chain; When G2≤T<G3, the third preset second merging factor D3 is selected as the second merging factor of the branch chain; When G3≤T<G4, the fourth preset second merging factor D4 is selected as the second merging factor of the branch chain; When G4≤T, the fifth preset second merging factor D5 is selected as the second merging factor of the branch chain.
5. The workflow process circulation method according to claim 1, characterized in that: When abnormal information is detected, the abnormal type of the abnormal information is judged, and the process configuration file is subjected to abnormal processing according to the judgment result, including: Determine the abnormal type of the abnormal information, When the exception type is a process circulation exception, the workflow nodes in the process circulation exception are reorganized; When the exception type is a process operation exception, the workflow node with the process operation exception is reversely rolled back.
6. The workflow process circulation method according to claim 5, characterized in that: When rolling back a workflow node that is experiencing process operation abnormality, the following steps are included: Acquire an unfinished workflow node according to the node identifier; Put the unfinished workflow nodes into a first rollback set, and sort them according to the pending completion time of each unfinished workflow node, wherein the unfinished workflow nodes include workflow nodes with abnormal process operations; Put the workflow node with abnormal process operation into the second rollback set, and determine the node type of the workflow node with abnormal process operation. When the node type is a main workflow node, all sub-workflow nodes corresponding to the main workflow node are reversely rolled back in the order of time to be completed; When the node type is a sub-workflow node, the sub-workflow node is reversely rolled back in the order of time to be completed.
7. The workflow process circulation method according to claim 6, characterized in that: After rolling back the workflow node with abnormal process operation, it also includes: An exception report is generated according to the reverse rollback situation, and the exception report is sent.
8. A workflow process circulation system, applied to the workflow process circulation method according to any one of claims 1 to 7, characterized in that: The system comprises: An acquisition module, used for acquiring a process configuration file, parsing the process configuration file, and generating a process circulation instruction of the process configuration file, wherein the process configuration file is an extensible markup language XML file; A generating module, used for generating a process circulation chain based on the process circulation instruction, dividing the process circulation chain into workflow nodes, and setting process operators and process circulators, and generating different authority values for the process operators and the process circulators respectively; A circulation module, used to generate different node identifiers for the divided workflow nodes, and circulate the process configuration file according to the node identifiers and the authority values; The processing module is used to perform real-time anomaly detection on the process configuration file, and when abnormal information is detected, judge the abnormal type of the abnormal information, and perform abnormal processing on the process configuration file according to the judgment result.
