Flow chart version control method and device and electronic equipment
By analyzing and comparing the xml files of the BPMN2.0 flowchart, marking and displaying changes in the flowchart, the problem of low efficiency in flowchart version management in the existing technology is solved, and the automatic comparison and version management of flowcharts are realized, improving the improvement of flowcharts Efficiency.
Patent Information
- Application Number
- CN202411294937.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-03
AI Technical Summary
In the prior art, the version comparison and management of the BPMN2.0 flowchart is inefficient, and it is impossible to effectively identify and label the internal parameter configuration changes of the interface flowchart node, which makes manual comparison time-consuming and labor-intensive, and existing tools can only compare xml files. The interface flow chart cannot be compared.
By obtaining the xml file of the flowchart of the historical version and pre-updated version, parsing and comparing the node's attribute information, marking out newly added, deleted and modified nodes, and visually displaying them on the flowchart, realizing automatic comparison of the flowchart and version management.
It realizes automatic comparison and management of flowchart versions, saves manpower, improves efficiency, and can effectively identify and mark changes in flowcharts, solving the problem of inefficiency in version management.
Smart Images

Figure CN119250055A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a flowchart version control method, a flowchart version control device, a computer-readable storage medium, and an electronic device. Background Art
[0002] The current workflow application scenarios are quite extensive. The flowchart design of the workflow engine based on the BPMN2.0 specification is mostly rendered using bpmn.js. When relevant personnel design flowcharts, they often modify and update the flowcharts, making the version control of flowcharts particularly important. The flowcharts of the BPMN2.0 specification used in the workflow are different from other types of flowcharts. It is necessary to configure relevant parameters on the element nodes of the flowchart, such as configuring listeners and gateway parameters. Only after configuring parameters can the workflow engine cooperate with the workflow engine to transfer the process. Before the version update operation of the flowchart, it is necessary to compare the differences before and after the version of the flowchart to see if the modification is correct. Manual verification is time-consuming and laborious, and may not be in place. In particular, the parameter configuration modification operation of the element node on the flowchart cannot be directly identified on the flowchart. It is necessary to click on the corresponding node to view the parameters. In this case, the manual comparison of the two flowcharts will be relatively time-consuming.
[0003] When the BPMN2.0 flowchart is used in the business process, the flowchart may be modified, for example, some nodes or connecting lines are added or deleted, and the layout of the flowchart is adjusted. In another case, when the BPMN2.0 flowchart cooperates with the workflow engine to process the business process, certain internal parameter configurations will be made in the node elements, such as listener parameter configuration, routing parameter configuration, etc. The modification of the flowchart will also include the modification of the node internal parameter configuration. When updating the flowchart version, it is necessary to compare the two versions of the flowchart before and after the modification. The difference before and after the modification can be quickly identified for a simple flowchart with few nodes, but for a flowchart with complex business processes and many nodes, the difference between the two flowcharts may not be quickly identified, and a node-by-node comparison is required. The modification of the node's internal parameter configuration cannot be directly identified on the flowchart, and the corresponding node needs to be clicked to view the parameter configuration. For example: the comparison of flowcharts in the prior art is only the comparison of the changes in the interface painting and the visible elements, and the internal parameter configuration of the flowchart cannot be compared. The second prior art compares the underlying XML element files of two BPMN2.0 flowcharts, but cannot compare and annotate the interface flowcharts. It can be seen that the current XML file comparison tool can only compare the XML format files of two BPMN2.0 flowcharts, and cannot compare the interface flowcharts. The current flowchart comparison tool cannot compare the parameter configuration changes inside the visualized flowchart nodes.
[0004] Therefore, there is a need for an automatic management method for version updates of BPMN2.0 flowcharts. Summary of the invention
[0005] The main purpose of the present application is to provide a flowchart version control method, a flowchart version control device, a computer-readable storage medium and an electronic device, so as to at least solve the problem of low efficiency in the prior art of only manually comparing the changes before and after the flowchart is updated.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a version control method for a flowchart is provided, including: obtaining an xml file corresponding to a historical version of the flowchart to obtain a first xml file, and obtaining an xml file corresponding to a pre-updated version of the flowchart to obtain a second xml file; parsing the first xml file to obtain multiple first element data, parsing the second xml file to obtain multiple second element data, and comparing the first element data and the second element data one by one, wherein the first element data at least includes the attribute information of the node in the historical version of the flowchart, and the second element data at least includes the attribute information of the node in the pre-updated version of the flowchart; when the first element data and the second element data are different, marking them on the historical version flowchart and / or the pre-updated version flowchart, respectively, to visualize the changes in the flowchart.
[0007] Optionally, when the first element data and the second element data are different, marking is performed on the historical version flowchart and / or the pre-updated version flowchart, respectively, including: comparing each second element data with each first element data one by one; when the second element data is newly added compared to the first element data, marking a new addition mark on the node corresponding to the second element data in the pre-updated version flowchart, wherein each first element data corresponds to a node in the historical version flowchart, and each second element data corresponds to a node in the pre-updated version flowchart; when the second element data is deleted compared to the first element data, marking a deletion mark on the node corresponding to the first element data in the historical version flowchart; when the second element data is modified compared to the first element data, marking a modification mark on the node corresponding to the first element data in the historical version flowchart, and marking the modification mark on the node corresponding to the second element data on the pre-updated version flowchart.
[0008] Optionally, when the first element data and the second element data are different, marking them on the historical version flowchart and / or the pre-updated version flowchart respectively includes: comparing the overall layout of multiple second element data with the overall layout of multiple first element data; when the overall layout of the second element data is different from the overall layout of the first element data, marking the nodes corresponding to the first element data on the historical version flowchart with layout change identifiers, and marking the nodes corresponding to the second element data on the pre-updated version flowchart with the layout change identifiers, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart.
[0009] Optionally, when the first element data and the second element data are different, they are marked on the historical version flowchart and / or the pre-updated version flowchart, respectively, and also include: comparing the internal parameters of the node corresponding to each of the first element data with the internal parameters of the node corresponding to each of the second element data, respectively, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; when the internal parameters of the nodes are different, the node corresponding to the first element data on the historical version flowchart is marked with a parameter change identifier, and the node corresponding to the second element data on the pre-updated version flowchart is marked with the parameter change identifier.
[0010] Optionally, after marking on the historical version flowchart and / or the pre-updated version flowchart, the method further includes: obtaining the marked node, determining the attribute information of the marked node before marking, obtaining first attribute information, determining the attribute information of the marked node after marking, obtaining second attribute information, wherein the attribute information includes at least a node name and operation information, wherein the marked node is a node that has been marked in the historical version flowchart and / or the pre-updated version flowchart; generating a change information table based on the first attribute information and the second attribute information, wherein the marked node corresponds one-to-one to the change information table.
[0011] Optionally, after marking on the historical version flowchart and / or the pre-updated version flowchart, the method further includes: obtaining marked nodes and determining the change type of each marked node, wherein the marked nodes are nodes that have been marked in the historical version flowchart and / or the pre-updated version flowchart; generating a flowchart overall change information table based on the marked nodes and the change type of each marked node.
[0012] Optionally, after marking on the historical version flowchart and / or the pre-updated version flowchart respectively, the method further includes: determining whether the node data in the pre-updated version flowchart is correct; if the node data is correct, updating the historical version flowchart according to the pre-updated version flowchart.
[0013] According to another aspect of the present application, a version control device for a flowchart is provided, including: an acquisition unit, used to acquire an XML file corresponding to a historical version of the flowchart to obtain a first XML file, and acquire an XML file corresponding to a pre-updated version of the flowchart to obtain a second XML file, wherein the XML file is a file containing basic information of the flowchart; a comparison unit, used to parse the first XML file to obtain a plurality of first element data, parse the second XML file to obtain a plurality of second element data, and compare the first element data with the second element data one by one; a marking unit, used to mark the historical version flowchart and / or the pre-updated version flowchart respectively when the first element data and the second element data are different, so as to visually display the changes in the flowchart.
[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute any one of the version control methods of the flowcharts.
[0015] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a version control method for executing any one of the flowcharts.
[0016] Apply the technical solution of the present application, obtain the xml file corresponding to the historical version flowchart, obtain the first xml file, and obtain the xml file corresponding to the pre-updated version flowchart, obtain the second xml file; parse the first xml file to obtain multiple first element data, parse the second xml file to obtain multiple second element data, compare the first element data and the second element data one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-updated version flowchart; when the first element data and the second element data are different, mark them on the historical version flowchart and / or the pre-updated version flowchart respectively to visualize the changes in the flowchart. Compared with the prior art, which can only compare flowcharts manually, which is time-consuming, labor-intensive and inefficient, the present application can parse the xml file, obtain element data and compare them, mark them in different situations to mark the changed places, realize the automatic comparison and display of different versions of flowcharts, save manpower and improve efficiency. Therefore, it can solve the problem of low efficiency and confusion in flowchart management and control versions in the prior art, and achieve the effect of improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A hardware structure block diagram of a mobile terminal for executing a version control method of a flowchart provided in an embodiment of the present application is shown;
[0019] Figure 2 A schematic diagram of a flowchart version control method provided in an embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram of a process flow of a specific flow chart version control method provided in an embodiment of the present application is shown;
[0021] Figure 4 A specific historical version flow chart provided by an embodiment of the present application is shown;
[0022] Figure 5 A specific pre-update version flow chart provided by an embodiment of the present application is shown;
[0023] Figure 6 A structural block diagram of a version control device of a flowchart provided in an embodiment of the present application is shown.
[0024] The above drawings include the following reference numerals:
[0025] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0026] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0030] BPMN2.0 standard: BPMN is a set of standards called Business Process Modeling Notation (BPMN-Business Process Modeling Notation) developed by BPMI (The Business Process Management Initiative). After more than two years of efforts by the BPMI Notation Working Group, the BPMN 1.0 specification was released in May 2004. Later, BPMI was merged into the OMG organization. In 2011, OMG launched the BPMN2.0 standard and redefined BPMN (Business Process Model and Notation).
[0031] bpmn.js: bpmn.js is a BPMN2.0 rendering toolkit and web modeler. Written in JavaScript, it embeds BPMN2.0 flowcharts into modern browsers without the need for backend server support.
[0032] As introduced in the background technology, the flowchart version control in the prior art is chaotic and inefficient, and the historical version cannot be traced. In order to solve the problem of chaotic and inefficient flowchart version control, the embodiments of the present application provide a flowchart version control method, a flowchart version control device, a computer-readable storage medium and an electronic device.
[0033] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0034] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a version control method of a flowchart of an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0035] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the version control method of the flowchart in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific network examples may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] In this embodiment, a version control method for a flowchart running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] Figure 2 1 is a flowchart of a version control method according to a flowchart of an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0038] Step S201, obtaining an XML file corresponding to a historical version flowchart to obtain a first XML file, and obtaining an XML file corresponding to a pre-updated version flowchart to obtain a second XML file;
[0039] Specifically, the method is based on the redevelopment and transformation of bpmn.js, uses a browser to access a specific URL address, and displays it in the form of a web page. The actual application process includes the following parts: file upload module, underlying XML file comparison module, flowchart visualization display comparison module, and XML file update module. The file upload module first uploads the XML files of the two BPMN2.0 flowcharts to the tool in a sequential order, that is, obtains the XML file corresponding to the historical version of the flowchart, and obtains the XML file corresponding to the pre-updated version of the flowchart. The pre-updated version of the flowchart can be an XML image file drawn and modified by a local integrated BPMN-related drawing tool, or it can be an XML image file drawn or modified elsewhere; both files can be uploaded to compare with the existing XML graphics (historical version flowchart) files in the local module.
[0040] Step S202, parsing the first xml file to obtain a plurality of first element data, parsing the second xml file to obtain a plurality of second element data, and comparing the first element data with the second element data one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-update version flowchart;
[0041] Specifically, parse the XML file and compare the two groups of elements one by one to determine the differences between the elements. The differences are mainly divided into the following categories: overall newly added elements, overall deleted elements, elements with layout changes, and elements with parameter configuration changes. You can use the "importXML" of the BPMN Viewer to parse the XML file.
[0042] Step S203, when the first element data and the second element data are different, marking is performed on the historical version flowchart and / or the pre-updated version flowchart respectively to visualize the changes of the flowchart.
[0043] Specifically, after the comparison, the flowchart is visually displayed on the interface. The display method can be: the flowchart uploaded first is displayed on the left, and the flowchart uploaded later is displayed on the right, and the several changes compared are marked and displayed on the two flowcharts. This includes displaying the mark color for the newly added nodes, and adding a + mark in the upper right corner; displaying the mark color for the deleted nodes, and adding a deletion mark in the upper right corner; displaying the mark color for the nodes with parameter configuration changes, and adding a parameter configuration modification mark in the upper right corner; displaying the mark color for layout changes, and adding a layout change mark in the upper right corner. The user can customize the design of each mark color according to his or her preferences. In the specific implementation process, the display method can also be a top-down display method.
[0044] Through this embodiment, the xml file corresponding to the historical version flowchart is obtained to obtain the first xml file, and the xml file corresponding to the pre-updated version flowchart is obtained to obtain the second xml file; the first xml file is parsed to obtain multiple first element data, the second xml file is parsed to obtain multiple second element data, and the first element data and the second element data are compared one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-updated version flowchart; when the first element data and the second element data are different, the historical version flowchart and / or the pre-updated version flowchart are marked respectively to visualize the changes in the flowchart. Compared with the prior art, which can only be compared manually, which is time-consuming, labor-intensive and inefficient, the present application can parse the xml file, obtain the element data and compare them, mark them in different situations, and mark the changed places, so as to realize the automatic comparison and display of different versions of flowcharts, save manpower and improve efficiency. Therefore, it can solve the problem of confusion and low efficiency of flowchart management version in the prior art, and achieve the effect of improving efficiency.
[0045] In the specific implementation process, the above step S203, when the above first element data and the above second element data are different, is marked on the above historical version flow chart and / or the above pre-updated version flow chart respectively, which can be implemented by the following steps: each of the above second element data is compared with each of the above first element data one by one; when the above second element data is newly added compared to the above first element data, the node corresponding to the above second element data in the above pre-updated version flow chart is marked with a new addition mark, wherein each of the above first element data corresponds to a node in the above historical version flow chart, and each of the above second element data corresponds to a node in the above pre-updated version flow chart; when the above second element data is deleted compared to the above first element data, the node corresponding to the above first element data in the above historical version flow chart is marked with a deletion mark; when the above second element data is modified compared to the above first element data, the node corresponding to the above first element data in the above historical version flow chart is marked with a modification mark, and the node corresponding to the above second element data in the above pre-updated version flow chart is marked with the modification mark. The method marks the modified process nodes through the above steps, so that which nodes have changed can be intuitively indicated.
[0046] In some optional implementations, a mark color is displayed for newly added nodes, and a "+" mark is attached to the upper right corner, indicating a new addition. Since what is newly added is the pre-updated version flowchart compared to the historical version flowchart, the node does not exist on the historical version flowchart, and it is only necessary to mark it on the pre-updated version flowchart; a mark color is displayed for deleted nodes, and a deletion mark is attached to the upper right corner. Since deletion is also the pre-updated version flowchart compared to the historical version flowchart, the node exists on the historical version flowchart but not on the pre-updated version flowchart, so it is only necessary to mark the deletion mark on the historical version flowchart; in the case of modification, both the historical version flowchart and the pre-updated version flowchart have the node, so a modification mark is attached to the upper right corner of the corresponding node, and the user can customize the color of each of the above marks according to his or her preferences.
[0047] In some other optional implementations, the above-mentioned step S203 is marked on the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart respectively when the above-mentioned first element data and the above-mentioned second element data are different, and can also be implemented by the following steps: comparing the overall layout of the multiple above-mentioned second element data with the overall layout of the multiple above-mentioned first element data; when the overall layout of the above-mentioned second element data is different from the overall layout of the above-mentioned first element data, marking the nodes corresponding to the above-mentioned first element data on the above-mentioned historical version flowchart with layout change identifiers, and marking the nodes corresponding to the above-mentioned second element data on the above-mentioned pre-updated version flowchart with the above-mentioned layout change identifiers, wherein each of the above-mentioned first element data corresponds to a node in the above-mentioned historical version flowchart, and each of the above-mentioned second element data corresponds to a node in the above-mentioned pre-updated version flowchart. The method compares the overall layout through the above-mentioned steps and marks it when it changes, so that the layout changes can be visualized.
[0048] In the specific implementation process, the layout change is the change of the overall layout of the flowchart. Therefore, an overall comparison is required. The mark color is displayed on the changed node, and a layout change mark is added in the upper right corner. The color can also be marked. In the actual application process, the color and shape of the mark can be set according to the user's preferences.
[0049] In some other optional implementations, the above-mentioned step S203 is marked on the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart respectively when the above-mentioned first element data and the above-mentioned second element data are different, which can be achieved by the following steps: the internal parameters of the nodes corresponding to each of the above-mentioned first element data are compared one by one with the internal parameters of the nodes corresponding to each of the above-mentioned second element data, wherein each of the above-mentioned first element data corresponds to a node in the above-mentioned historical version flowchart, and each of the above-mentioned second element data corresponds to a node in the above-mentioned pre-updated version flowchart; when the internal parameters of the above-mentioned nodes are different, the nodes corresponding to the above-mentioned first element data on the above-mentioned historical version flowchart are marked with parameter change identifiers, and the nodes corresponding to the above-mentioned second element data on the above-mentioned pre-updated version flowchart are marked with the above-mentioned parameter change identifiers. The method compares the internal parameters of the nodes through the above-mentioned steps, so that it is possible to compare whether the internal parameters of the nodes have changed, and to perform visual display.
[0050] During the specific implementation process, each element data corresponds to a node, and the internal parameters of the node corresponding to the first element data are compared one by one with the internal parameters of the node corresponding to each of the above-mentioned second element data. In different cases, it is indicated that the internal parameters of the node have changed, and the parameter change identifier is marked on the historical version flowchart and the pre-update version flowchart respectively.
[0051] In some optional implementations, after marking on the above historical version flowchart and / or the above pre-updated version flowchart in step S203, the above method further includes the following steps: Step S204: Acquire the marked node, determine the attribute information of the above marked node before marking, obtain the first attribute information, determine the attribute information of the above marked node after marking, obtain the second attribute information, wherein the above attribute information at least includes the node name and operation information, wherein the above marked node is a node that has been marked in the above historical version flowchart and / or the above pre-updated version flowchart; Step S205: Generate a change information table based on the above first attribute information and the above second attribute information, wherein the above marked node corresponds one-to-one to the above change information table. The method generates a change information table for the changes of the nodes marked in the above steps through the above steps, so that the changes of the marked nodes can be intuitively displayed.
[0052] Specifically, you can click on each changed node, and a change details list (change information table) will pop up after clicking. The list shows the details of this node and the comparative attribute values of the two diagrams. There is a comparison list on the design page. Click the comparison list button to display the change details of all nodes in the list, so that you can intuitively see the node changes of the two versions of the flowchart. The design allows you to directly jump to the corresponding position in the flowchart by clicking on the list node, and mark it with a dotted line in the figure. The above design can clearly compare the BPMN2.0 flowcharts, so that you can intuitively see which nodes have changed, and you can also see the specific details of the changes through the details list.
[0053] In some optional implementations, after marking the above historical version flowchart and / or the above pre-updated version flowchart in step S203, the above method further includes the following: step S206: obtaining the marked nodes, and determining the change type of each of the above marked nodes, wherein the above marked nodes are nodes that have been marked in the above historical version flowchart and / or the above pre-updated version flowchart; step S207: generating a flowchart overall change information table according to the above marked nodes and the above change type of each of the above marked nodes. The method generates a flowchart overall change information table with the change types of all marked nodes through the above steps, so that which nodes have changed can be intuitively displayed.
[0054] During the specific implementation process, a flowchart overall change information table is also set up, including nodes and node change types, so that through this list, you can directly obtain which nodes in the flowchart have changed and what type of changes have occurred, such as: addition, deletion, or modification.
[0055] In some optional implementations, after the above step S203 marks the above historical version flowchart and / or the above pre-updated version flowchart respectively, the above method further includes the following steps: Step S208: Determine whether the node data in the above pre-updated version flowchart is correct; Step S209: If the above node data is correct, update the above historical version flowchart according to the above pre-updated version flowchart. The method confirms whether the pre-updated node data is correct after comparing the flowcharts through the above steps, so that the correctness of the update can be guaranteed.
[0056] Specifically, different versions of the flowchart are compared and then updated to confirm whether the node element information that needs to be updated is accurate; and it is convenient for version control.
[0057] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the version control method of the flowchart of the present application will be described in detail below in combination with specific embodiments.
[0058] This embodiment relates to a specific flow chart version control method, such as Figure 3 As shown, the following steps are included:
[0059] Step S1: Start;
[0060] Step S2: Upload the flowchart process definition file (xml file);
[0061] Step S3: XML file parsing;
[0062] Step S4: element (element data) comparison;
[0063] Step S5: determine element changes;
[0064] Step S6: adding, deleting, modifying, changing the layout, changing the internal configuration parameters;
[0065] Step S7: Visual display of the flow chart;
[0066] Step S8: a newly added node is marked as a newly added element identifier (newly added identifier), and a display of the newly added element changes of the node is established; a deleted node is marked as a deleted element identifier (deleted identifier), and a display of the deleted element changes of the node is established; a modified node is marked as a modified element identifier (modified identifier), and a display of the modified element changes of the node is established; a node whose layout has changed is marked with a layout change identifier, and a display of the layout change details of the node is established; a node whose internal parameters have changed is marked with a node internal parameter configuration change identifier (parameter change identifier), and a display of the node internal parameter configuration change details of the node is established;
[0067] Step S9: Change comparison list (change information table);
[0068] Step S10: Update the underlying XML file of the flow chart;
[0069] Step S11: End.
[0070] This embodiment relates to a specific historical version flow chart, such as Figure 4As shown, the left side is the pre-update version flowchart, and the right side is the pre-update version flowchart. The historical version flowchart on the left includes the following processes. In order to indicate the number of elements in the flowchart, each element is indicated by an ID number below: Start ID: node_000, head office agent initiates ID: node_001, head office agent reviews ID: node_002, judgment ID: node_001, approval by the person in charge if approved ID: node_004, return to the head office agent if rejected ID: node_001; if the person in charge approves and agrees, judgment ID: node_005, if approved, judgment whether it is a debt type ID: node_006, return to the head office agent if rejected ID: node_00 1; If it is a debt type, the person in charge will approve ID: node_007, if it is not a debt type, the information will be supplemented ID: node_011; If the person in charge approves ID: node_007 and agrees, the judgment ID: node_008, if agree, the superior will approve ID: node_009, if returned, it will continue to go back to the person in charge for approval ID: node_004; After the superior approves ID: node_009, the judgment ID: node_010, if agree, the information will be supplemented ID: node_011; then supplement materials ID: node_012, end ID: node_013.
[0071] This embodiment also relates to a specific pre-update version flow chart, such as Figure 5 As shown, compared with the historical version of the flowchart, the flowchart is as follows: Start ID: node_000, the head office manager initiates ID: node_001, the head office manager reviews ID: node_002 and judges ID: node_001 and is deleted, and goes directly to the person in charge for approval ID: node_004, and judges ID: node_005. If agreed, it is determined whether it is a debt type ID: node_006. If it is returned, it returns to the head office manager to initiate ID: node_001; if it is a debt type, the operation department manager approves ID: node_007, and if it is not a debt type, it is carried out Information is supplemented with ID: node_011; the operation department leader approves ID: node_007 and then judges with ID: node_008. If he agrees, the superior approves with ID: node_009. If it is rejected, it goes back to the person in charge for approval with ID: node_004; after the superior approves with ID: node_009, it is judged with ID: node_010. If he agrees, the information is supplemented with ID: node_011; then the materials are supplemented with ID: node_012, and a processing node with ID: node_014 is added, and finally it ends with ID: node_013.
[0072] The present embodiment relates to a specific list of change details of a flowchart, as shown in Table 1, wherein sequence number 1 indicates that the node change type is name, which is approved by the responsible leader before modification and approved by the responsible leader of the operations department after modification; sequence number 2 is the description of the name node change, which is null (none) before modification and is {'$type': "bpmn:Documentation", "text": "New description"} after modification; sequence number 3 is the listener information for the name node change, which is null (none) before modification and is ${PushTaskListener} and ${PushXykyyTaskListener} after modification.
[0073] Table 1 Internal configuration modification node change details list
[0074]
[0075] This embodiment involves a specific overall change list of a flowchart, as shown in Table 2, the node ID corresponding to sequence number 1 is node_002, and the change type is a deletion change; the node ID corresponding to sequence number 2 is node_003, and the change type is a deletion change; the node ID corresponding to sequence number 3 is node_007, and the change type is a configuration change; the node ID corresponding to sequence number 4 is node_013, and the change type is a layout change; the node ID corresponding to sequence number 5 is node_014, and the change type is a new addition change.
[0076] Table 2 List of overall changes in the flow chart
[0077]
[0078] The embodiment of the present application also provides a version control device for a flowchart. It should be noted that the version control device for the flowchart of the embodiment of the present application can be used to execute the version control method for the flowchart provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions have been made and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0079] The following is an introduction to the version control device of the flowchart provided in the embodiment of the present application.
[0080] Figure 6 Schematic diagram of a version control device according to a flowchart of an embodiment of the present application. Figure 6 As shown, the device comprises:
[0081] The acquisition unit 10 is used to acquire the XML file corresponding to the historical version flowchart to obtain a first XML file, and acquire the XML file corresponding to the pre-updated version flowchart to obtain a second XML file, wherein the above XML files are files containing basic information of the flowchart;
[0082] Specifically, the method is based on the redevelopment and transformation of bpmn.js, uses a browser to access a specific URL address, and displays it in the form of a web page. The actual application process includes the following parts: file upload module, underlying XML file comparison module, flowchart visualization display comparison module, and XML file update module. The file upload module first uploads the XML files of the two BPMN2.0 flowcharts to the tool in a sequential order, that is, obtains the XML file corresponding to the historical version of the flowchart, and obtains the XML file corresponding to the pre-updated version of the flowchart. The pre-updated version of the flowchart can be an XML image file drawn and modified by a local integrated BPMN-related drawing tool, or it can be an XML image file drawn or modified elsewhere; both files can be uploaded to compare with the existing XML graphics (historical version flowchart) files in the local module.
[0083] A comparison unit 20 is used to parse the first XML file to obtain a plurality of first element data, parse the second XML file to obtain a plurality of second element data, and compare the first element data with the second element data one by one;
[0084] Specifically, parse the XML file and compare the two groups of elements one by one to determine the differences between the elements. The differences are mainly divided into the following categories: overall newly added elements, overall deleted elements, elements with layout changes, and elements with parameter configuration changes. You can use the "importXML" of the BPMN Viewer to parse the XML file.
[0085] The marking unit 30 is used to mark the historical version flowchart and / or the pre-updated version flowchart respectively when the first element data and the second element data are different, so as to visually display the changes of the flowchart.
[0086] Specifically, after the comparison, the flowchart is visually displayed on the interface. The display method can be: the flowchart uploaded first is displayed on the left, and the flowchart uploaded later is displayed on the right, and the several changes compared are marked and displayed on the two flowcharts. This includes displaying the mark color for the newly added nodes, and adding a + mark in the upper right corner; displaying the mark color for the deleted nodes, and adding a deletion mark in the upper right corner; displaying the mark color for the nodes with parameter configuration changes, and adding a parameter configuration modification mark in the upper right corner; displaying the mark color for layout changes, and adding a layout change mark in the upper right corner. The user can customize the design of each mark color according to his or her preferences. In the specific implementation process, the display method can also be a top-down display method.
[0087] Through this embodiment, the xml file corresponding to the historical version flowchart is obtained to obtain the first xml file, and the xml file corresponding to the pre-updated version flowchart is obtained to obtain the second xml file; the first xml file is parsed to obtain multiple first element data, the second xml file is parsed to obtain multiple second element data, and the first element data and the second element data are compared one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-updated version flowchart; when the first element data and the second element data are different, the historical version flowchart and / or the pre-updated version flowchart are marked respectively to visualize the changes in the flowchart. Compared with the prior art, which can only be compared manually, which is time-consuming, labor-intensive and inefficient, the present application can parse the xml file, obtain the element data and compare them, mark them in different situations, and mark the changed places, so as to realize the automatic comparison and display of different versions of flowcharts, save manpower and improve efficiency. Therefore, it can solve the problem of confusion and low efficiency of flowchart management version in the prior art, and achieve the effect of improving efficiency.
[0088] In the specific implementation process, the marking unit includes a first comparison module, a first marking module, a second marking module and a third marking module. The first comparison module is used to compare each of the second element data with each of the first element data one by one; the first marking module is used to mark the node corresponding to the second element data in the pre-updated version flow chart with a new addition mark when the second element data is newly added compared to the first element data, wherein each of the first element data corresponds to a node in the historical version flow chart, and each of the second element data corresponds to a node in the pre-updated version flow chart; the second marking module is used to mark the node corresponding to the first element data in the historical version flow chart with a deletion mark when the second element data is deleted compared to the first element data; the third marking module is used to mark the node corresponding to the first element data in the historical version flow chart with a modification mark when the second element data is modified compared to the first element data, and mark the node corresponding to the second element data in the pre-updated version flow chart with the modification mark. The method marks the modified process nodes through the above steps, so that it can intuitively indicate which nodes have changed.
[0089] In some optional implementations, a mark color is displayed for newly added nodes, and a "+" mark is attached to the upper right corner, indicating a new addition. Since what is newly added is the pre-updated version flowchart compared to the historical version flowchart, the node does not exist on the historical version flowchart, and it is only necessary to mark it on the pre-updated version flowchart; a mark color is displayed for deleted nodes, and a deletion mark is attached to the upper right corner. Since deletion is also the pre-updated version flowchart compared to the historical version flowchart, the node exists on the historical version flowchart but not on the pre-updated version flowchart, so it is only necessary to mark the deletion mark on the historical version flowchart; in the case of modification, both the historical version flowchart and the pre-updated version flowchart have the node, so a modification mark is attached to the upper right corner of the corresponding node, and the user can customize the color of each of the above marks according to his or her preferences.
[0090] In some other optional implementations, the marking unit includes a second comparison module and a fourth marking module, the second comparison module is used to compare the overall layout of the plurality of second element data with the overall layout of the plurality of first element data; the fourth marking module is used to mark the layout change identifier at the node corresponding to the first element data on the historical version flowchart, and mark the layout change identifier at the node corresponding to the second element data on the pre-updated version flowchart, when the overall layout of the second element data is different from that of the first element data, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart. The method compares the overall layout through the above steps and marks the changes in the layout, so that the layout changes can be visualized.
[0091] In the specific implementation process, the layout change is the change of the overall layout of the flowchart. Therefore, an overall comparison is required. The mark color is displayed on the changed node, and a layout change mark is added in the upper right corner. The color can also be marked. In the actual application process, the color and shape of the mark can be set according to the user's preferences.
[0092] In some other optional embodiments, the marking unit further includes a third comparison module and a fifth marking module, wherein the third comparison module is used to compare the internal parameters of the nodes corresponding to each of the first element data with the internal parameters of the nodes corresponding to each of the second element data, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; the fifth marking module is used to mark the node corresponding to the first element data on the historical version flowchart with a parameter change identifier, and mark the node corresponding to the second element data on the pre-updated version flowchart with the parameter change identifier when the internal parameters of the nodes are different. The method compares the internal parameters of the nodes through the above steps, so that it can compare whether the internal parameters of the nodes have changed, and perform a visual display.
[0093] During the specific implementation process, each element data corresponds to a node, and the internal parameters of the node corresponding to the first element data are compared one by one with the internal parameters of the node corresponding to each of the above-mentioned second element data. In different cases, it is indicated that the internal parameters of the node have changed, and the parameter change identifier is marked on the historical version flowchart and the pre-update version flowchart respectively.
[0094] In some optional embodiments, the device further includes a first determination unit and a generation unit, the first determination unit is used to obtain the marked node, determine the attribute information of the marked node before marking, obtain the first attribute information, determine the attribute information of the marked node after marking, obtain the second attribute information, wherein the attribute information at least includes the node name and operation information, wherein the marked node is a node that has been marked in the historical version flowchart and / or the pre-update version flowchart; the generation unit is used to generate a change information table according to the first attribute information and the second attribute information, wherein the marked node corresponds to the change information table one by one. The method generates a change information table for the changes of the nodes marked in the previous steps through the above steps, so that the changes of the marked nodes can be intuitively displayed.
[0095] Specifically, you can click on each changed node, and a change details list (change information table) will pop up after clicking. The list shows the details of this node and the comparative attribute values of the two diagrams. There is a comparison list on the design page. Click the comparison list button to display the change details of all nodes in the list, so that you can intuitively see the node changes of the two versions of the flowchart. The design allows you to directly jump to the corresponding position in the flowchart by clicking on the list node, and mark it with a dotted line in the figure. The above design can clearly compare the BPMN2.0 flowcharts, so that you can intuitively see which nodes have changed, and you can also see the specific details of the changes through the details list.
[0096] In some optional implementations, the device further includes a second determination unit and a second generation unit: the second determination unit is used to obtain the marked nodes and determine the change type of each of the marked nodes, wherein the marked nodes are nodes that have been marked in the historical version flowchart and / or the pre-update version flowchart; the second generation unit is used to generate a flowchart overall change information table based on the marked nodes and the change type of each of the marked nodes. The method generates a flowchart overall change information table from the change types of all marked nodes through the above steps, so that which nodes have changed can be intuitively displayed.
[0097] During the specific implementation process, a flowchart overall change information table is also set up, including nodes and node change types, so that through this list, you can directly obtain which nodes in the flowchart have changed and what type of changes have occurred, such as: addition, deletion, or modification.
[0098] In some optional implementations, the device further includes a third determination unit and an update unit: the third determination unit is used to determine whether the node data in the pre-updated version flowchart is correct; the update unit is used to update the historical version flowchart according to the pre-updated version flowchart if the node data is correct. The method confirms whether the pre-updated node data is correct after comparing the flowcharts through the above steps, so that the correctness of the update can be guaranteed.
[0099] Specifically, different versions of the flowchart are compared and then updated to confirm whether the node element information that needs to be updated is accurate; and it is convenient for version control.
[0100] The version control device of the above flowchart includes a processor and a memory. The above acquisition unit, comparison unit and marking unit are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions. The above modules are all located in the same processor; or, the above modules are located in different processors in any combination.
[0101] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of low efficiency that can only be solved by manually comparing the changes before and after the flowchart is updated can be solved by adjusting the kernel parameters.
[0102] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0103] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the version control method of the flowchart.
[0104] Specifically, the version control method of the flowchart includes:
[0105] Step S201, obtaining an XML file corresponding to a historical version flowchart to obtain a first XML file, and obtaining an XML file corresponding to a pre-updated version flowchart to obtain a second XML file;
[0106] Specifically, the method is based on the redevelopment and transformation of bpmn.js, uses a browser to access a specific URL address, and displays it in the form of a web page. The actual application process includes the following parts: file upload module, underlying XML file comparison module, flowchart visualization display comparison module, and XML file update module. The file upload module first uploads the XML files of the two BPMN2.0 flowcharts to the tool in a sequential order, that is, obtains the XML file corresponding to the historical version of the flowchart, and obtains the XML file corresponding to the pre-updated version of the flowchart. The pre-updated version of the flowchart can be an XML image file drawn and modified by a local integrated BPMN-related drawing tool, or it can be an XML image file drawn or modified elsewhere; both files can be uploaded to compare with the existing XML graphics (historical version flowchart) files in the local module.
[0107] Step S202, parsing the first xml file to obtain a plurality of first element data, parsing the second xml file to obtain a plurality of second element data, and comparing the first element data with the second element data one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-update version flowchart;
[0108] Specifically, parse the XML file and compare the two groups of elements one by one to determine the differences between the elements. The differences are mainly divided into the following categories: overall newly added elements, overall deleted elements, elements with layout changes, and elements with parameter configuration changes. You can use the "importXML" of the BPMN Viewer to parse the XML file.
[0109] Step S203, when the first element data and the second element data are different, marking is performed on the historical version flowchart and / or the pre-updated version flowchart respectively to visualize the changes of the flowchart.
[0110] Specifically, after the comparison, the flowchart is visually displayed on the interface. The display method can be: the flowchart uploaded first is displayed on the left, and the flowchart uploaded later is displayed on the right, and the several changes compared are marked and displayed on the two flowcharts. This includes displaying the mark color for the newly added nodes, and adding a + mark in the upper right corner; displaying the mark color for the deleted nodes, and adding a deletion mark in the upper right corner; displaying the mark color for the nodes with parameter configuration changes, and adding a parameter configuration modification mark in the upper right corner; displaying the mark color for layout changes, and adding a layout change mark in the upper right corner. The user can customize the design of each mark color according to his or her preferences. In the specific implementation process, the display method can also be a top-down display method.
[0111] Optionally, in the case where the first element data and the second element data are different, they are marked on the historical version flowchart and / or the pre-updated version flowchart, respectively, including: comparing each of the second element data with each of the first element data one by one; in the case where the second element data is newly added compared to the first element data, marking the node corresponding to the second element data in the pre-updated version flowchart with a new addition mark, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; in the case where the second element data is deleted compared to the first element data, marking the node corresponding to the first element data in the historical version flowchart with a deletion mark; in the case where the second element data is modified compared to the first element data, marking the node corresponding to the first element data in the historical version flowchart with a modification mark, and marking the node corresponding to the second element data on the pre-updated version flowchart with the modification mark.
[0112] Optionally, when the first element data and the second element data are different, they are respectively marked on the historical version flowchart and / or the pre-updated version flowchart, and also include: comparing the overall layout of multiple second element data with the overall layout of multiple first element data; when the overall layout of the second element data is different from the overall layout of the first element data, marking the nodes corresponding to the first element data on the historical version flowchart with layout change identifiers, and marking the nodes corresponding to the second element data on the pre-updated version flowchart with the layout change identifiers, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart.
[0113] Optionally, in the case where the first element data and the second element data are different, they are respectively marked on the historical version flowchart and / or the pre-updated version flowchart, and also include: comparing the internal parameters of the nodes corresponding to each of the first element data with the internal parameters of the nodes corresponding to each of the second element data, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; in the case where the internal parameters of the nodes are different, the nodes corresponding to the first element data on the historical version flowchart are marked with parameter change identifiers, and the nodes corresponding to the second element data on the pre-updated version flowchart are marked with the parameter change identifiers.
[0114] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart, the above-mentioned method also includes: obtaining the marked node, determining the attribute information of the above-mentioned marked node before marking, obtaining the first attribute information, determining the attribute information of the above-mentioned marked node after marking, obtaining the second attribute information, wherein the above-mentioned attribute information at least includes the node name and operation information, wherein the above-mentioned marked node is a node that has been marked in the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart; generating a change information table according to the above-mentioned first attribute information and the above-mentioned second attribute information, wherein the above-mentioned marked node corresponds one-to-one to the above-mentioned change information table.
[0115] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart, the above-mentioned method also includes: obtaining the marked nodes and determining the change type of each of the above-mentioned marked nodes, wherein the above-mentioned marked nodes are nodes that have been marked in the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart; generating a flowchart overall change information table based on the above-mentioned marked nodes and the above-mentioned change type of each of the above-mentioned marked nodes.
[0116] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart respectively, the above-mentioned method also includes: determining whether the node data in the above-mentioned pre-update version flowchart is correct; if the above-mentioned node data is correct, updating the above-mentioned historical version flowchart according to the above-mentioned pre-update version flowchart.
[0117] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, at least the following steps are implemented:
[0118] Step S201, obtaining an XML file corresponding to a historical version flowchart to obtain a first XML file, and obtaining an XML file corresponding to a pre-updated version flowchart to obtain a second XML file;
[0119] Step S202, parsing the first xml file to obtain a plurality of first element data, parsing the second xml file to obtain a plurality of second element data, and comparing the first element data with the second element data one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-update version flowchart;
[0120] Step S203, when the first element data and the second element data are different, marking is performed on the historical version flowchart and / or the pre-updated version flowchart respectively to visualize the changes of the flowchart.
[0121] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0122] Optionally, in the case where the first element data and the second element data are different, they are marked on the historical version flowchart and / or the pre-updated version flowchart, respectively, including: comparing each of the second element data with each of the first element data one by one; in the case where the second element data is newly added compared to the first element data, marking the node corresponding to the second element data in the pre-updated version flowchart with a new addition mark, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; in the case where the second element data is deleted compared to the first element data, marking the node corresponding to the first element data in the historical version flowchart with a deletion mark; in the case where the second element data is modified compared to the first element data, marking the node corresponding to the first element data in the historical version flowchart with a modification mark, and marking the node corresponding to the second element data on the pre-updated version flowchart with the modification mark.
[0123] Optionally, when the first element data and the second element data are different, they are respectively marked on the historical version flowchart and / or the pre-updated version flowchart, and also include: comparing the overall layout of multiple second element data with the overall layout of multiple first element data; when the overall layout of the second element data is different from the overall layout of the first element data, marking the nodes corresponding to the first element data on the historical version flowchart with layout change identifiers, and marking the nodes corresponding to the second element data on the pre-updated version flowchart with the layout change identifiers, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart.
[0124] Optionally, in the case where the first element data and the second element data are different, they are respectively marked on the historical version flowchart and / or the pre-updated version flowchart, and also include: comparing the internal parameters of the nodes corresponding to each of the first element data with the internal parameters of the nodes corresponding to each of the second element data, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; in the case where the internal parameters of the nodes are different, the nodes corresponding to the first element data on the historical version flowchart are marked with parameter change identifiers, and the nodes corresponding to the second element data on the pre-updated version flowchart are marked with the parameter change identifiers.
[0125] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart, the above-mentioned method also includes: obtaining the marked node, determining the attribute information of the above-mentioned marked node before marking, obtaining the first attribute information, determining the attribute information of the above-mentioned marked node after marking, obtaining the second attribute information, wherein the above-mentioned attribute information at least includes the node name and operation information, wherein the above-mentioned marked node is a node that has been marked in the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart; generating a change information table according to the above-mentioned first attribute information and the above-mentioned second attribute information, wherein the above-mentioned marked node corresponds one-to-one to the above-mentioned change information table.
[0126] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart, the above-mentioned method also includes: obtaining the marked nodes and determining the change type of each of the above-mentioned marked nodes, wherein the above-mentioned marked nodes are nodes that have been marked in the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart; generating a flowchart overall change information table based on the above-mentioned marked nodes and the above-mentioned change type of each of the above-mentioned marked nodes.
[0127] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart respectively, the above-mentioned method also includes: determining whether the node data in the above-mentioned pre-update version flowchart is correct; if the above-mentioned node data is correct, updating the above-mentioned historical version flowchart according to the above-mentioned pre-update version flowchart.
[0128] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the above method in each embodiment of the present application are implemented:
[0129] Step S201, obtaining an XML file corresponding to a historical version flowchart to obtain a first XML file, and obtaining an XML file corresponding to a pre-updated version flowchart to obtain a second XML file;
[0130] Step S202, parsing the first xml file to obtain a plurality of first element data, parsing the second xml file to obtain a plurality of second element data, and comparing the first element data with the second element data one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-update version flowchart;
[0131] Step S203, when the first element data and the second element data are different, marking is performed on the historical version flowchart and / or the pre-updated version flowchart respectively to visualize the changes of the flowchart.
[0132] Optionally, in the case where the first element data and the second element data are different, they are marked on the historical version flowchart and / or the pre-updated version flowchart, respectively, including: comparing each of the second element data with each of the first element data one by one; in the case where the second element data is newly added compared to the first element data, marking the node corresponding to the second element data in the pre-updated version flowchart with a new addition mark, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; in the case where the second element data is deleted compared to the first element data, marking the node corresponding to the first element data in the historical version flowchart with a deletion mark; in the case where the second element data is modified compared to the first element data, marking the node corresponding to the first element data in the historical version flowchart with a modification mark, and marking the node corresponding to the second element data on the pre-updated version flowchart with the modification mark.
[0133] Optionally, when the first element data and the second element data are different, they are respectively marked on the historical version flowchart and / or the pre-updated version flowchart, and also include: comparing the overall layout of multiple second element data with the overall layout of multiple first element data; when the overall layout of the second element data is different from the overall layout of the first element data, marking the nodes corresponding to the first element data on the historical version flowchart with layout change identifiers, and marking the nodes corresponding to the second element data on the pre-updated version flowchart with the layout change identifiers, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart.
[0134] Optionally, in the case where the first element data and the second element data are different, they are respectively marked on the historical version flowchart and / or the pre-updated version flowchart, and also include: comparing the internal parameters of the nodes corresponding to each of the first element data with the internal parameters of the nodes corresponding to each of the second element data, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; in the case where the internal parameters of the nodes are different, the nodes corresponding to the first element data on the historical version flowchart are marked with parameter change identifiers, and the nodes corresponding to the second element data on the pre-updated version flowchart are marked with the parameter change identifiers.
[0135] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart, the above-mentioned method also includes: obtaining the marked node, determining the attribute information of the above-mentioned marked node before marking, obtaining the first attribute information, determining the attribute information of the above-mentioned marked node after marking, obtaining the second attribute information, wherein the above-mentioned attribute information at least includes the node name and operation information, wherein the above-mentioned marked node is a node that has been marked in the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart; generating a change information table according to the above-mentioned first attribute information and the above-mentioned second attribute information, wherein the above-mentioned marked node corresponds one-to-one to the above-mentioned change information table.
[0136] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart, the above-mentioned method also includes: obtaining the marked nodes and determining the change type of each of the above-mentioned marked nodes, wherein the above-mentioned marked nodes are nodes that have been marked in the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart; generating a flowchart overall change information table based on the above-mentioned marked nodes and the above-mentioned change type of each of the above-mentioned marked nodes.
[0137] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart respectively, the above-mentioned method also includes: determining whether the node data in the above-mentioned pre-update version flowchart is correct; if the above-mentioned node data is correct, updating the above-mentioned historical version flowchart according to the above-mentioned pre-update version flowchart.
[0138] Step S201, obtaining an XML file corresponding to a historical version flowchart to obtain a first XML file, and obtaining an XML file corresponding to a pre-updated version flowchart to obtain a second XML file;
[0139] Step S202, parsing the first xml file to obtain a plurality of first element data, parsing the second xml file to obtain a plurality of second element data, and comparing the first element data with the second element data one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-update version flowchart;
[0140] Step S203, when the first element data and the second element data are different, marking is performed on the historical version flowchart and / or the pre-updated version flowchart respectively to visualize the changes of the flowchart.
[0141] Optionally, in the case where the first element data and the second element data are different, they are marked on the historical version flowchart and / or the pre-updated version flowchart, respectively, including: comparing each of the second element data with each of the first element data one by one; in the case where the second element data is newly added compared to the first element data, marking the node corresponding to the second element data in the pre-updated version flowchart with a new addition mark, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; in the case where the second element data is deleted compared to the first element data, marking the node corresponding to the first element data in the historical version flowchart with a deletion mark; in the case where the second element data is modified compared to the first element data, marking the node corresponding to the first element data in the historical version flowchart with a modification mark, and marking the node corresponding to the second element data on the pre-updated version flowchart with the modification mark.
[0142] Optionally, when the first element data and the second element data are different, they are respectively marked on the historical version flowchart and / or the pre-updated version flowchart, and also include: comparing the overall layout of multiple second element data with the overall layout of multiple first element data; when the overall layout of the second element data is different from the overall layout of the first element data, marking the nodes corresponding to the first element data on the historical version flowchart with layout change identifiers, and marking the nodes corresponding to the second element data on the pre-updated version flowchart with the layout change identifiers, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart.
[0143] Optionally, in the case where the first element data and the second element data are different, they are respectively marked on the historical version flowchart and / or the pre-updated version flowchart, and also include: comparing the internal parameters of the nodes corresponding to each of the first element data with the internal parameters of the nodes corresponding to each of the second element data, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; in the case where the internal parameters of the nodes are different, the nodes corresponding to the first element data on the historical version flowchart are marked with parameter change identifiers, and the nodes corresponding to the second element data on the pre-updated version flowchart are marked with the parameter change identifiers.
[0144] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart, the above-mentioned method also includes: obtaining the marked node, determining the attribute information of the above-mentioned marked node before marking, obtaining the first attribute information, determining the attribute information of the above-mentioned marked node after marking, obtaining the second attribute information, wherein the above-mentioned attribute information at least includes the node name and operation information, wherein the above-mentioned marked node is a node that has been marked in the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart; generating a change information table according to the above-mentioned first attribute information and the above-mentioned second attribute information, wherein the above-mentioned marked node corresponds one-to-one to the above-mentioned change information table.
[0145] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart, the above-mentioned method also includes: obtaining the marked nodes and determining the change type of each of the above-mentioned marked nodes, wherein the above-mentioned marked nodes are nodes that have been marked in the above-mentioned historical version flowchart and / or the above-mentioned pre-updated version flowchart; generating a flowchart overall change information table based on the above-mentioned marked nodes and the above-mentioned change type of each of the above-mentioned marked nodes.
[0146] Optionally, after marking on the above-mentioned historical version flowchart and / or the above-mentioned pre-update version flowchart respectively, the above-mentioned method also includes: determining whether the node data in the above-mentioned pre-update version flowchart is correct; if the above-mentioned node data is correct, updating the above-mentioned historical version flowchart according to the above-mentioned pre-update version flowchart.
[0147] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0148] 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 in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0149] 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.
[0150] 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.
[0151] 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.
[0152] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0153] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0155] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0156] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0157] 1) In the version control method of the flowchart of the present application, the xml file corresponding to the historical version flowchart is obtained to obtain the first xml file, and the xml file corresponding to the pre-updated version flowchart is obtained to obtain the second xml file; the first xml file is parsed to obtain multiple first element data, the second xml file is parsed to obtain multiple second element data, and the first element data and the second element data are compared one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-updated version flowchart; when the first element data and the second element data are different, the historical version flowchart and / or the pre-updated version flowchart are marked respectively to visualize the changes in the flowchart. Compared with the prior art, which can only compare flowcharts manually, which is time-consuming, labor-intensive and inefficient, the present application can parse the xml file, obtain the element data and compare them, mark them in different situations, and mark the changed places, so as to realize the automatic comparison and display of different versions of flowcharts, save manpower and improve efficiency. Therefore, it can solve the problem of confusion and low efficiency of flowchart control versions in the prior art, and achieve the effect of improving efficiency.
[0158] 2) In the version control device of the flowchart of the present application, the xml file corresponding to the historical version flowchart is obtained to obtain the first xml file, and the xml file corresponding to the pre-updated version flowchart is obtained to obtain the second xml file; the first xml file is parsed to obtain multiple first element data, the second xml file is parsed to obtain multiple second element data, and the first element data and the second element data are compared one by one, wherein the first element data at least includes the attribute information of the node in the historical version flowchart, and the second element data at least includes the attribute information of the node in the pre-updated version flowchart; when the first element data and the second element data are different, the historical version flowchart and / or the pre-updated version flowchart are marked respectively to visualize the changes in the flowchart. Compared with the prior art, which can only compare flowcharts manually, which is time-consuming, labor-intensive and inefficient, the present application can parse the xml file, obtain the element data and compare them, mark them in different situations, and mark the changed places, so as to realize the automatic comparison and display of different versions of flowcharts, save manpower and improve efficiency. Therefore, it can solve the problem of confusion and low efficiency of flowchart control versions in the prior art, and achieve the effect of improving efficiency.
[0159] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for version control of a flowchart, characterized in that: include: Obtain the XML file corresponding to the historical version flowchart to obtain a first XML file, and obtain the XML file corresponding to the pre-updated version flowchart to obtain a second XML file; Parse the first xml file to obtain a plurality of first element data, parse the second xml file to obtain a plurality of second element data, and compare the first element data with the second element data one by one, wherein the first element data at least includes attribute information of the nodes in the historical version flowchart, and the second element data at least includes attribute information of the nodes in the pre-update version flowchart; In the case where the first element data and the second element data are different, they are marked on the historical version flowchart and / or the pre-updated version flowchart respectively to visually display the changes in the flowchart.
2. The version control method according to claim 1, characterized in that: In the case where the first element data and the second element data are different, marking them on the historical version flowchart and / or the pre-update version flowchart respectively includes: Compare each of the second element data with each of the first element data one by one; In the case where the second element data is newly added compared to the first element data, a node corresponding to the second element data in the pre-updated version flowchart is marked with a new addition identifier, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; In the case where the second element data is deleted compared to the first element data, a deletion mark is marked on the node corresponding to the first element data in the historical version flow chart; When the second element data is modified compared to the first element data, the node corresponding to the first element data in the historical version flowchart is marked with a modification identifier, and the node corresponding to the second element data on the pre-update version flowchart is marked with the modification identifier.
3. The version control method according to claim 1, characterized in that: In the case where the first element data and the second element data are different, marking is performed on the historical version flowchart and / or the pre-updated version flowchart respectively, further comprising: comparing the overall layout of the plurality of the second element data with the overall layout of the plurality of the first element data; When the overall layout of the second element data is different from the overall layout of the first element data, the nodes corresponding to the first element data on the historical version flowchart are marked with layout change identifiers, and the nodes corresponding to the second element data on the pre-updated version flowchart are marked with the layout change identifiers, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart.
4. The version control method according to claim 1, characterized in that: In the case where the first element data and the second element data are different, marking is performed on the historical version flowchart and / or the pre-updated version flowchart respectively, further comprising: Compare the internal parameters of the nodes corresponding to each of the first element data with the internal parameters of the nodes corresponding to each of the second element data one by one, wherein each of the first element data corresponds to a node in the historical version flowchart, and each of the second element data corresponds to a node in the pre-updated version flowchart; When the internal parameters of the nodes are different, the node corresponding to the first element data on the historical version flowchart is marked with a parameter change identifier, and the node corresponding to the second element data on the pre-update version flowchart is marked with the parameter change identifier.
5. The version control method according to claim 1, characterized in that: After marking on the historical version flowchart and / or the pre-update version flowchart, the method further includes: Acquire a marked node, determine the attribute information of the marked node before marking, obtain first attribute information, determine the attribute information of the marked node after marking, obtain second attribute information, wherein the attribute information at least includes a node name and operation information, wherein the marked node is a node that has been marked in the historical version flowchart and / or the pre-update version flowchart; A change information table is generated according to the first attribute information and the second attribute information, wherein the marking nodes correspond one to one with the change information table.
6. The version control method according to claim 1, characterized in that: After marking on the historical version flowchart and / or the pre-update version flowchart, the method further includes: Acquire marked nodes, and determine the change type of each marked node, wherein the marked nodes are nodes that have been marked in the historical version flowchart and / or the pre-update version flowchart; A flowchart overall change information table is generated according to the marked nodes and the change type of each marked node.
7. The version control method according to claim 1, characterized in that: After marking respectively on the historical version flowchart and / or the pre-updated version flowchart, the method further includes: Determining whether the node data in the pre-update version flow chart is correct; When the node data is correct, the historical version flowchart is updated according to the pre-updated version flowchart.
8. A version control device for a flowchart, characterized in that: include: An acquisition unit is used to acquire an XML file corresponding to a historical version of the flowchart to obtain a first XML file, and acquire an XML file corresponding to a pre-updated version of the flowchart to obtain a second XML file, wherein the XML file is a file containing basic information of the flowchart; a comparing unit, configured to parse the first XML file to obtain a plurality of first element data, parse the second XML file to obtain a plurality of second element data, and compare the first element data with the second element data one by one; A marking unit is used to mark the historical version flowchart and / or the pre-updated version flowchart respectively when the first element data and the second element data are different, so as to visually display the changes of the flowchart.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the version control method of the flowchart described in any one of claims 1 to 7.
10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a version control method for executing the flowchart described in any one of claims 1 to 7.
