A method, device and storage medium for simplifying flow chart
By using pre-trained classifiers to distinguish key nodes and non-critical nodes, the process mining algorithm is used to generate simplified flow charts, which solves the problem of difficult-to-understand flow chart complexity in the prior art, and realizes the simplification of flow charts and the retention of semantics. .
Patent Information
- Application Number
- CN202210427535.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-04-22
AI Technical Summary
Existing flowchart simplification methods are difficult to effectively reduce the number of nodes while retaining the original semantics, making the flowchart complexity difficult to understand.
A pre-trained classifier is used to predict nodes in the process log, distinguish between key nodes and non-critical nodes, and save non-critical nodes as sub-nodes, and apply the process mining algorithm to generate a simplified flow chart.
By reducing the number of nodes in the flowchart, the main semantics and steps of the original business are retained, and the generated flowchart is more simplified and has better practical application effects.
Smart Images

Figure CN114722101B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method, a device and a storage medium for simplifying a flow chart, and belongs to the technical field of process mining. Background Art
[0002] The goal of process mining is to restore the business process diagram from the log file, so that the enterprise can understand the actual execution status of the business process and diagnose problems in the business execution process.
[0003] In actual use, a business often contains dozens or hundreds of steps, plus various variations, resulting in a flowchart containing a large number of nodes, which is very complex and difficult to understand, and it is not convenient to see the overall picture of the business process.
[0004] As attached Figure 2 As shown in the figure, the original flowchart on the right has many nodes and is not easy to understand. In actual use, there may be hundreds of nodes, which is even more difficult to understand. The simplified flowchart on the left is very simple and easy to understand.
[0005] There are generally several ways to simplify flowcharts. One is based on the attributes of events, such as merging all operations of the same person into one node, or merging operations on the same application into one node. This method is simple and effective, and retains certain semantics, but the operations of the same person or the same application vary greatly, and the semantics of the entire business cannot be retained. Another method is based on statistics, only displaying nodes that appear more than a certain number of times. In this way, the complexity of the flowchart can be arbitrarily controlled, but some key nodes may be hidden due to insufficient occurrences, affecting the understanding of the business process. Summary of the invention
[0006] The purpose of the present invention is to overcome the deficiencies in the prior art and to provide a method, device and storage medium for simplifying a flowchart, which can effectively reduce the nodes in the flowchart while retaining the original semantics.
[0007] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0008] In a first aspect, the present invention provides a method for simplifying a flow chart, comprising:
[0009] Obtaining nodes pre-extracted from the process log to be simplified;
[0010] Send each node into the pre-trained classifier for prediction and obtain the prediction result;
[0011] Determine whether it is a critical node based on the prediction results. If so, keep it in the process log and save the previous non-critical nodes as child nodes of this node. If not, mark it as a non-critical node.
[0012] Apply the process mining algorithm to the simplified process log to obtain the simplified flow chart.
[0013] Furthermore, the method for training the classifier comprises:
[0014] Get multiple business processes;
[0015] Select a part of the business process from multiple business processes and filter out candidate nodes based on multiple rules;
[0016] Extract key nodes from candidate nodes and mark them as 1, mark the remaining nodes as 0, and divide them into training set, test set and validation set;
[0017] Training the classifier using the training set and the test set of the labeled data;
[0018] The trained classifier is used to test on the nodes of the business process in the validation set of the labeled data, the business process nodes with prediction errors are added to the labeled data, and the classifier is retrained until the accuracy meets the requirement.
[0019] Furthermore, the selecting candidate nodes according to the plurality of rules includes:
[0020] Through the pre-set query conditions, multiple nodes are searched at one time, and all searched nodes are used as candidate nodes;
[0021] Alternatively, semantic rules can be expressed by writing code to filter out candidate nodes.
[0022] Furthermore, the method further includes: when training the classifier, each node is converted into a vector and then classified.
[0023] Furthermore, the method of converting each node into a vector includes:
[0024] Convert all node attributes into a piece of text, and then use the encoder to generate sentence vectors;
[0025] Alternatively, each attribute can be quantized to one or more 0 or 1 values and then merged into a vector.
[0026] Furthermore, when judging whether it is a key node according to the prediction result, if all nodes of a business process have been processed and non-key nodes still exist, a virtual node is created to collect all non-key nodes.
[0027] Furthermore, the key nodes include a plurality of different groups of non-key nodes, and one of the plurality of different groups of non-key nodes needs to be selected as a representative through a predetermined selection method.
[0028] In a second aspect, the present invention provides a device with a simplified flow chart, comprising:
[0029] A node acquisition unit, which acquires nodes extracted in advance from the process log to be simplified;
[0030] The prediction unit sends each node to a pre-trained classifier for prediction and obtains the prediction result;
[0031] The judgment unit determines whether it is a key node based on the prediction result. If so, it is retained in the process log and the previous non-key nodes are saved as child nodes of the node; if not, it is marked as a non-key node;
[0032] The flowchart acquisition unit is used to apply a process mining algorithm to the simplified process log to obtain a simplified flowchart.
[0033] In a third aspect, the present invention provides a device for simplifying a flow chart, comprising a processor and a storage medium;
[0034] The storage medium is used to store instructions;
[0035] The processor is configured to operate according to the instructions to execute the steps of any of the aforementioned methods.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the aforementioned methods.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] The present invention provides a method, device and storage medium for simplifying a flowchart. The process mining algorithm is not changed. Before application, the original log is converted to distinguish key nodes from non-key nodes, so that the number of records in the original log is greatly reduced, thereby making the generated flowchart more simplified. Moreover, since each node can be expanded, the main semantics and steps of the original business are retained to the greatest extent. In summary, the present invention can effectively reduce the nodes in the flowchart while retaining the original semantics, and has a good practical application effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart diagram of a method for simplifying a flowchart provided by an embodiment of the present invention;
[0040] Figure 2 It is a schematic diagram of a simplified before and after flow chart provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0042] like Figure 1 As shown, the present invention introduces a method for simplifying a flow chart, comprising:
[0043] Obtaining nodes pre-extracted from the process log to be simplified;
[0044] Send each node into the pre-trained classifier for prediction and obtain the prediction result;
[0045] Determine whether it is a critical node based on the prediction results. If so, keep it in the process log and save the previous non-critical nodes as child nodes of this node. If not, mark it as a non-critical node.
[0046] Apply the process mining algorithm to the simplified process log to obtain the simplified flow chart.
[0047] Specifically, the method for training the classifier includes:
[0048] Get multiple business processes;
[0049] Select a part of the business process from multiple business processes and filter out candidate nodes based on multiple rules;
[0050] Extract key nodes from candidate nodes and mark them as 1, mark the remaining nodes as 0, and divide them into training set, test set and validation set;
[0051] Training the classifier using the training set and the test set of the labeled data;
[0052] The trained classifier is used to test on the nodes of the business process in the validation set of the labeled data, the business process nodes with prediction errors are added to the labeled data, and the classifier is retrained until the accuracy meets the requirement.
[0053] Specifically, the candidate nodes are selected according to multiple rules, including:
[0054] Through the pre-set query conditions, multiple nodes are searched at one time, and all searched nodes are used as candidate nodes;
[0055] Alternatively, semantic rules can be expressed by writing code to filter out candidate nodes.
[0056] Specifically, it also includes: when training the classifier, each node is converted into a vector and then classified.
[0057] Specifically, the method of converting each node into a vector includes:
[0058] Convert all node attributes into a piece of text, and then use the encoder to generate sentence vectors;
[0059] Alternatively, each attribute can be quantized to one or more 0 or 1 values and then merged into a vector.
[0060] Specifically, when judging whether it is a key node according to the prediction result, if all nodes of a business process have been processed and non-key nodes still exist, a virtual node is created and all non-key nodes are collected.
[0061] Specifically, the key nodes include multiple groups of different non-key nodes, and one of the multiple groups of different non-key nodes needs to be selected as a representative through a predetermined selection method; the specific method is: select the sub-node combination with the largest number of repetitions as the representative.
[0062] Embodiment 1, the method of simplifying the flowchart provided in this embodiment, its application process specifically involves the following steps:
[0063] Get an event log file in CSV format from the business system. This business system can be an ERP, CRM system, or data directly exported from the background database, obtained after preprocessing, format conversion, and semantic alignment. The format can be CSV, XES, and other different ways. In this embodiment, it is CSV format. In the CSV file, each record contains three key fields: timestamp, case number, business step, and multiple business attribute fields, such as <2020-03-15 10:00:00, 100, Create order, purchase, Zhang San, Nanjing branch>. Use the "business step" field in each record to represent the current record, and use this field as the node label in the flowchart. There are often many business steps in a business process, of which only a few steps are more important and are key nodes. For example, in the "accounts payable" process, "create order" is a key node, and some operations before "create order", such as "modify submitter" and "revise submission time", are not important and can be hidden in the flowchart without affecting the understanding of the overall process.
[0064] 2. Assume that there are 10,000 business processes (each business process is a case, which contains multiple execution steps). Most of the steps in each business process are unimportant, and only a few are key nodes that can represent the main progress of the business process.
[0065] 3. First group by case number, and put all business steps of the same business in one group. Select a small number of business processes, such as 1,000, for batch labeling. In this embodiment, these data are imported into the database and queried using SQL statements. In order to find all "order" related operations, SQL statements can be used to query all business steps containing the word "order" and mark them all as key nodes. SQL statements can also be used to find business steps containing the word "modify". If they are marked as key nodes, further determine whether they are for modifying the order amount. If so, keep them as key nodes. If not, change them to non-key nodes. In addition to using SQL statements to query and label, you can also directly use code to label key nodes for more flexible semantic representation.
[0066] 4. Manually review the marked nodes and delete the nodes that were incorrectly selected.
[0067] 5. Export the marked business data and add key node flags. Each piece of data should contain at least four fields: timestamp, case number, business step, and key node flag, and sort by case number and timestamp. Convert this data into input for the classifier for training. In this embodiment, the classifier is a BERT model, and the input is a piece of text. Each input contains the current business step, the previous two business steps, and the corresponding key node tags. Standard delimiters are used between different business steps. <sep>To separate. The conversion results are similar: <sep>Modify Submitter 0 <sep>Modify submission time 0 <sep>Create Order 1 <sep>, and send this conversion result to the BERT model for training. If there is no other step before the current business step, the default value ("start", 0) is used to fill it.
[0068] 6. In addition to adding key node markers, you can also add other business attributes to allow the model to learn more business context. If the field is of text type, you can use it directly or simply process it before using it. If it is a number or date type, you can convert it to a string before using it. You can also quantize each attribute to one or more 0 or 1 values, and then merge them into a vector.
[0069] 7. In order to reduce the workload of data annotation, business data can be annotated in batches and the classifier can be trained multiple times. Each time the annotated data is trained, it is divided into three parts: training set, test set and validation set. The training set and test set are used to train the model, and the validation set is used to manually review the prediction results, summarize the characteristics of the prediction errors, and then annotate new business data based on the characteristics, and retrain the classifier together with the original annotated data; for example, if the prediction accuracy of the node containing the word "audit" is low in the prediction results, a batch of business data containing this word can be added to the unlabeled data, re-annotated, and the classifier can be trained again. Repeat this process until the prediction results are satisfactory. This can speed up the classifier training and obtain feedback on the annotation results at a faster speed.
[0070] 8. For the process log to be simplified, each operation step is first converted into a format consistent with the training data. In this embodiment, each operation step is first converted into " <sep>Create an order". If there are steps, their corresponding string representations are appended to the front. If there are no steps, the default step is used. <sep>Start 0". After the conversion, let the model predict the next character. If the output is "1", it means it is a key node, and if the output is "0", it means it is a non-key node. Add this result after the original string representation to get " <sep>Create Order 1, which is used to predict the type of the next operation step. Repeat this process to obtain the prediction results for each node.
[0071] For key nodes, save the original records; for non-key nodes, first determine its parent node. If there is a key node behind it, then the key node is its parent node. If there is no key node, create a virtual node as the parent node. The label of the virtual node can use a fixed representation, such as "other". After determining the parent node, put the corresponding record in the additional table, and establish an association with the corresponding key node through the case number and the parent node. After all nodes are processed, a group of representative child nodes must be selected for each key node. In this embodiment, the selection criterion is the child node group with the most occurrences, and the virtual node is represented by an empty group.
[0072] 9. Apply the process mining algorithm to the simplified log file. In this embodiment, the InductiveMiner algorithm is used to obtain the flow chart. Each node in the chart corresponds to a key node. By querying the inclusion relationship between the key node and the non-key node, the corresponding non-key node group can be queried. When the user selects a node on the flow chart, it can be expanded into a group of non-key node information, which represents the corresponding business operation in more detail and is convenient for the user to understand.
[0073] Embodiment 2: This embodiment provides a device with a simplified flow chart, including:
[0074] A node acquisition unit, which acquires nodes extracted in advance from the process log to be simplified;
[0075] The prediction unit sends each node to a pre-trained classifier for prediction and obtains the prediction result;
[0076] The judgment unit determines whether it is a key node based on the prediction result. If so, it is retained in the process log and the previous non-key nodes are saved as child nodes of the node; if not, it is marked as a non-key node;
[0077] The flowchart acquisition unit is used to apply a process mining algorithm to the simplified process log to obtain a simplified flowchart.
[0078] Embodiment 3, this embodiment provides a device with simplified flowchart, including a processor and a storage medium;
[0079] The storage medium is used to store instructions;
[0080] The processor is used to operate according to the instructions to execute the steps of the method according to any one of Embodiment 1.
[0081] Embodiment 4: This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any method described in Embodiment 1 are implemented.
[0082] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0083] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0084] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0085] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0086] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.< / sep> < / sep> < / sep> < / sep> < / sep> < / sep> < / sep> < / sep>
Claims
1. A method for simplifying a flow chart, characterized in that: include: Obtaining nodes pre-extracted from the process log to be simplified; Send each node into the pre-trained classifier for prediction and obtain the prediction result; Determine whether it is a critical node based on the prediction results. If so, keep it in the process log and save the previous non-critical nodes as child nodes of this node. If not, mark it as a non-critical node. Apply process mining algorithm to the simplified process log to obtain a simplified flow chart; The method for training the classifier comprises: Get multiple business processes; Select a part of the business process from multiple business processes and filter out candidate nodes based on multiple rules; Extract key nodes from candidate nodes and mark them as 1, mark the remaining nodes as 0, and divide them into training set, test set and validation set; Training the classifier using the training set and the test set of the labeled data; Use the trained classifier to test on the nodes of the business process in the validation set of the labeled data, add the business process nodes with incorrect predictions to the labeled data, and retrain the classifier until the accuracy reaches the required level; The candidate nodes are screened out according to multiple rules, including: Through the pre-set query conditions, multiple nodes are searched at one time, and all searched nodes are used as candidate nodes; Alternatively, semantic rules can be expressed by writing code to filter out candidate nodes; It also includes: when training the classifier, converting each node into a vector and then classifying it; The method of converting each node into a vector comprises: Convert all node attributes into a piece of text, and then use the encoder to generate sentence vectors; Alternatively, each attribute can be quantized to one or more 0 or 1 values and then merged into a vector.
2. The method for simplifying a flowchart according to claim 1, characterized in that: When judging whether it is a key node according to the prediction result, if all nodes of a business process have been processed and non-key nodes still exist, a virtual node is created and all non-key nodes are collected.
3. The method for simplifying a flowchart according to claim 1, characterized in that: The key nodes include multiple groups of different non-key nodes, and one of the multiple groups of different non-key nodes needs to be selected as a representative through a predetermined selection method.
4. A device for simplifying a flow chart, characterized in that: include: A node acquisition unit, which acquires nodes extracted in advance from the process log to be simplified; The prediction unit sends each node to a pre-trained classifier for prediction and obtains the prediction result; The judgment unit determines whether it is a key node based on the prediction result. If so, it is retained in the process log and the previous non-key nodes are saved as child nodes of the node; if not, it is marked as a non-key node; The flowchart acquisition unit is used to apply the process mining algorithm to the simplified process log to obtain a simplified flowchart; wherein: The method for training the classifier comprises: Get multiple business processes; Select a part of the business process from multiple business processes and filter out candidate nodes based on multiple rules; Extract key nodes from candidate nodes and mark them as 1, mark the remaining nodes as 0, and divide them into training set, test set and validation set; Training the classifier using the training set and the test set of the labeled data; Use the trained classifier to test on the nodes of the business process in the validation set of the labeled data, add the business process nodes with incorrect predictions to the labeled data, and retrain the classifier until the accuracy reaches the required level; The candidate nodes are screened out according to multiple rules, including: Through the pre-set query conditions, multiple nodes are searched at one time, and all searched nodes are used as candidate nodes; Alternatively, semantic rules can be expressed by writing code to filter out candidate nodes; It also includes: when training the classifier, converting each node into a vector and then classifying it; The method of converting each node into a vector comprises: Convert all node attributes into a piece of text, and then use the encoder to generate sentence vectors; Alternatively, each attribute can be quantized to one or more 0 or 1 values and then merged into a vector.
5. A device for simplifying a flow chart, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
