CN-122022719-A - Data processing method and device, electronic equipment and storage medium
Abstract
The method comprises the steps of firstly, inquiring a corresponding BPMN instance according to a flow instance and converting the BPMN instance into xml; the method comprises the steps of obtaining node data of a flow instance, wherein the node data comprises node addresses and node types, determining color information corresponding to the node types, calling BPMN js to render xml into a visual BPMN flow chart, and finally determining the color information of each node according to the node addresses, the node types and the color information corresponding to the node types, so that a target flow chart capable of reflecting the execution state of the flow instance in real time is obtained, and the technical effects of rapidly identifying key paths, abnormal nodes or predicting follow-up steps of the execution of the flow instance are achieved.
Inventors
- WANG JIALIANG
- CHENG LIN
- XU GUANLIN
Assignees
- 奇瑞汽车股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260106
Claims (10)
- 1. A data processing method, applied to a first device, in which a business process management model is deployed, the method being performed by the first device, the method comprising: inputting a flow instance into the business flow management model to obtain flow data of the flow instance, wherein the flow data is used for indicating that the flow instance is described by an xml character string; the method comprises the steps of obtaining node data of a flow instance, wherein the node data are used for indicating node addresses of all nodes in the flow instance and node types of each node, and the node types are finished nodes, unfinished nodes, current nodes or abnormal nodes; Determining color information of each node type according to the node type in the node data, wherein the color information comprises a first color corresponding to the completed node, a second color corresponding to the unfinished node, a third color corresponding to the current node or a fourth color corresponding to the abnormal node; and generating a target flow chart based on the flow data, the node data and the color information of each node type, wherein in the target flow chart, the node color of each node is determined by the node type and the color information corresponding to each node.
- 2. The method of claim 1, wherein a first processing module is further disposed in the first device, the first processing module being configured to draw a flow chart, the generating a target flow chart based on the flow data, the node data, and the color information for each node type, the method comprising: the first processing module reads the flow data to obtain an initial flow chart of the flow instance; And obtaining a target flow chart according to the initial flow chart, the node data and the color information of each node type.
- 3. The method of claim 2, wherein the obtaining a target flow chart from the initial flow chart, the node data, and the color information for each node type, the method comprising: determining the node color of each node in the flow example according to the color information of each node type and the node address in the node data; And obtaining a target flow chart according to the initial flow chart, the node color of each node and the node address.
- 4. A method according to claim 3, wherein the obtaining a target flow chart from the initial flow chart, the node color of each node and the node address comprises: determining a target element of the node in the first processing module according to the node address of the node; modifying the color attribute of the target element according to the node color of the node; and obtaining the target flow chart according to the color attribute of the target element and the initial flow chart.
- 5. The method of claim 1, wherein prior to the obtaining the node data for the flow instance, the method further comprises: The method comprises the steps of acquiring the execution state of each node in the node data, wherein the execution state comprises the execution completion, the execution incompletion, the execution in progress and the execution abnormality; and defining the type of the node according to the execution state to obtain the node type.
- 6. The method of claim 5, wherein prior to said determining color information for each type of node based on node type in said node data, said method further comprises: And respectively defining different colors for the node types in the node data to obtain color information corresponding to each node type.
- 7. A data processing apparatus for application to a first device, the first device having a business process management model deployed therein, the method performed by the first device, the apparatus comprising: the first acquisition module is used for inputting a flow instance into the business flow management model and acquiring flow data of the flow instance, wherein the flow data is used for indicating that the flow instance is described by an xml character string; The system comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring node data of a flow instance, and the node data is used for indicating node addresses of all nodes in the flow instance and node types of each node, and the node types are finished nodes, unfinished nodes, current nodes or abnormal nodes; The first processing module is used for determining color information of each node type according to the node type in the node data, wherein the color information comprises a first color corresponding to the completed node, a second color corresponding to the unfinished node, a third color corresponding to the current node or a fourth color corresponding to the abnormal node; And the second processing module is used for generating a target flow chart based on the flow data, the node data and the color information of each node type, wherein in the target flow chart, the node color of each node is determined by the node type and the color information corresponding to each node.
- 8. An electronic device, the electronic device comprising: A processor; A memory having stored thereon computer readable instructions which, when executed by the processor, implement the data processing method of any of claims 1 to 6.
- 9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code which is callable by a processor or an electronic device to perform the data processing method according to any one of claims 1 to 6.
- 10. A computer program product comprising computer instructions which, when executed by a processor, implement the data processing method of any one of claims 1 to 6.
Description
Data processing method and device, electronic equipment and storage medium Technical Field The present application relates to the field of business process management and visualization technologies, and in particular, to a data processing method, apparatus, electronic device, and storage medium. Background In the context of digital transformation, business process management (Business Process Management, BPM) is increasingly in urgent demand for visualization and real-time monitoring. The business process model and symbol (Business Process Modeling Notation, BPMN) are used as global universal process modeling standard, are visual grammar of the business process, can realize communication, analysis and execution processes based on the business process, and describe the end-to-end business process from beginning to end by using standardized graphic elements. However, the conventional BPMN flowchart is only used for showing the logic of the flow service, and cannot show the real-time execution state of the progress of the flow service. Disclosure of Invention In view of this, embodiments of the present application provide a data processing method, apparatus, electronic device, and storage medium, which can implement automatic highlighting of a standard flowchart based on a business process management model, achieve the purpose of dynamically reflecting an execution state of a process, and quickly identify an abnormal execution situation and predict subsequent steps of a process instance. The application adopts the following technical scheme. In a first aspect, an embodiment of the present application provides a data processing method, applied to a first device, where a business process management model is deployed, where the method is performed by the first device, where the method includes: The method comprises the steps of inputting a flow instance into a business flow management model, obtaining flow data of the flow instance, wherein the flow data are used for indicating that the flow instance is described by an xml character string, obtaining node data of the flow instance, the node data are used for indicating node addresses of all nodes in the flow instance and node types of each node, the node types are completed nodes, unfinished nodes, current nodes or abnormal nodes, color information of each node type is determined according to the node types in the node data, the color information comprises a first color corresponding to the completed nodes, a second color corresponding to the unfinished nodes, a third color corresponding to the current nodes or a fourth color corresponding to the abnormal nodes, a target flow chart is generated based on the flow data, the node data and the color information of each node type, and in the target flow chart, the node color of each node is determined by the node type and the color information corresponding to each node. In some embodiments, a first processing module is further disposed in the first device, where the first processing module is configured to draw a flowchart, generate a target flowchart based on the flow data, the node data, and color information of each node type, and the method includes: the first processing module reads the flow data to obtain an initial flow chart of the flow instance, and obtains a target flow chart according to the initial flow chart, the node data and the color information of each node type. In some embodiments, a target flowchart is obtained from an initial flowchart, node data, and color information for each node type, the method comprising: And according to the initial flow chart, the node color of each node and the node address, obtaining a target flow chart. In some embodiments, a target flow chart is obtained from an initial flow chart, a node color and a node address of each node, the method comprising: The method comprises the steps of determining a target element of a node in a first processing module according to a node address of the node, modifying a color attribute of the target element according to a node color of the node, and obtaining a target flow chart according to the color attribute of the target element and an initial flow chart. In some embodiments, the method further comprises obtaining node data for the flow instance: The method comprises the steps of obtaining an execution state of each node in node data, wherein the execution state comprises completed execution, incomplete execution, executing and abnormal execution, and defining the type of the node according to the execution state to obtain the node type. In some embodiments, before determining color information for each type of node based on the node type in the node data, the method further comprises: and respectively defining different colors for the node types in the node data to obtain color information corresponding to each node type. According to a second aspect of an embodiment of the present application, there is provided a data processing a