A method, system, device and medium for a new designer to be compatible with old processes
Patent Information
- Application Number
- CN202211562713.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2042-12-05
AI Technical Summary
由于上述原因,一方面,旧版与新版设计器设计的流程之间数据结构会存在较大的差异性;另一方面,由于用户现场环境的要求和限制,导致有可能存在使用不同版本设计器开发业务的流程的情况,那么这就需要做到新版设计器对旧版流程的兼容性,否则用户如果有升级设计器的需要,那就需要在新版设计器重新开发一个业务流程,过程较为费时费力
[0032] This invention provides a method, system, device, and medium for a new version of a designer to be compatible with an older version of a workflow. The method involves importing and decompressing an older workflow package, reading and decrypting its JSON data, extracting data fields containing workflow information from the JSON data in the older workflow diagram, and recording a mapping dictionary between the current node and the next node. A new workflow is created by reading global variable parameters from the older workflow and adding them to the new workflow. The nodes in the older workflow diagram are recursively traversed according to the mapping dictionary, and the data structure of the older workflow is transformed into the data structure of the new workflow, completing the compatibility import. Compared with existing technologies, this invention eliminates the need for users to manually develop a workflow suitable for the new designer by referring to the older workflow. Instead, during the import of the older workflow package into the new designer, the background automatically transforms the data structure of the older workflow into a data structure suitable for the new designer, achieving automated compatibility.
Smart Images

Figure CN116028113B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data structure compatibility processing technology, and in particular to a method, system, device and medium for a new version of a designer to be compatible with an old version of the process. Background Technology
[0002] Currently, due to changes in the underlying architecture of the workflow and updates and iterations of its functions, the designer exists in two significantly different versions (0.5.x and 1.x). For these reasons, firstly, there will be significant differences in the data structures between workflows designed by the old and new versions of the designer; secondly, due to the requirements and limitations of the user's on-site environment, there may be situations where different versions of the designer are used to develop business workflows. Therefore, it is necessary to ensure compatibility between the new and old versions of the designer. Otherwise, if users need to upgrade their designer, they will have to redevelop a business workflow using the new version, a time-consuming and laborious process.
[0003] If the new version of the process designer is incompatible with the import of the old version of the process, and users want to further develop the old process on the new version of the designer, they need to redesign the process on the new version of the designer based on the functions (structure) of the old process. However, a complete business process is often quite complex and lengthy, so manually migrating the old process to the new version of the designer will be quite time-consuming. Moreover, redesigning a complex business process is prone to unnecessary errors that may cause the process to malfunction, and it also adds a lot of unnecessary workload to the user.
[0004] Therefore, the existing technology still needs further improvement and enhancement. Summary of the Invention
[0005] The purpose of this invention is to provide a method, system, device, and medium for a new version of the designer to be compatible with an old version of the process. This allows the old version of the process to be imported into the new version of the designer, and the decrypted process data structure to be converted into the new version of the data structure, thereby achieving the effect of converting the old version of the process into the new version of the process without requiring the user to redesign the process.
[0006] To achieve the above objectives, in a first aspect, the present invention provides a method for a new version of a designer to be compatible with an older version of the workflow, wherein the method includes:
[0007] Import and decompress the old process package, read the old process JSON data from the old process package and decrypt it;
[0008] Extract the data fields containing process information from the old process JSON data and record the mapping dictionary between the current node and the next node; wherein, the node mapping is established by reading the old process JSON data from the old process package, and the structure is similar to {current node id: next node id}.
[0009] Create a new version of the process, read the global variable parameters of the old process from the JSON data of the old process, and add them to the new version of the process;
[0010] The nodes of the old flowchart in the old process package are recursively traversed according to the mapping dictionary, and the data structure of the data fields containing process information in the old process JSON data is transformed into the data structure of the new process to complete the compatibility import.
[0011] Furthermore, the step of recursively traversing the nodes of the old flowchart in the old process package according to the mapping dictionary, and transforming the data structure containing process information data fields in the old process JSON data into the data structure of the new process, also includes:
[0012] When recursively traversing the nodes of the old flowchart in the old flowchart package according to the mapping dictionary, it is determined whether the old flowchart has a next node.
[0013] If there is a next node, the node type is determined according to the data structure of the old process, and the corresponding compatibility processing is performed for different types of nodes. The node types include ordinary process blocks and container classes.
[0014] Conversely, if the import is successful, a compatible import is completed.
[0015] Furthermore, if the node type is a normal process block, a subprocess of the new process is created, and a component for calling the subprocess is added to the main process of the new process to call the subprocess.
[0016] Furthermore, if the node type is a container type, a container type component is added to the new process to read the data structure of the global variable parameters of the old process and migrate the parameter name, parameter type and parameter value of each parameter of the old process to the data structure of the new process.
[0017] Furthermore, the sub-process for creating the new version of the process also includes:
[0018] Fill the sub-process with the components corresponding to the old version of the process;
[0019] Iterate through the component list of the old process and create new components corresponding to the old process in the sub-process;
[0020] Read the parameter data structure of the old process, format the data structure of the old process into a data structure suitable for the new process, and generate a new component suitable for the new process.
[0021] Furthermore, the step of traversing the component list of the old process and creating new components corresponding to the old process in the sub-process further includes:
[0022] The reused process blocks of the old process are converted into sub-processes of the new process; the parameter data structure of the reused process block is read and formatted into a data structure suitable for the sub-process.
[0023] And in the sub-process, a component for calling the sub-process is populated to call the sub-process.
[0024] Furthermore, the container class includes conditional branching, loop continuation, loop exit, and exception handling.
[0025] Secondly, the present invention provides a system for a new version of the designer to be compatible with the old version of the process, wherein the system includes a data decompression module, a decryption and extraction module, a process creation module and a data processing module;
[0026] The data decompression module is used to import and decompress the old process package, read the old process JSON data from the old process package and decrypt it;
[0027] The decryption and extraction module is used to extract data fields containing process information from the old version of the process JSON data and record the mapping dictionary between the current node and the next node;
[0028] The process creation module is used to read the global variable parameters of the old process from the old process JSON data and add them to the new process;
[0029] The data processing module is used to recursively traverse the nodes of the old flowchart in the old process package according to the mapping dictionary, and transform the data structure of the data fields containing process information in the old process JSON data into the data structure of the new process, thereby completing the compatibility import.
[0030] Thirdly, the present invention provides a computer device including a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory to enable the computer device to perform a method of a new version of a designer being compatible with an older version of a process.
[0031] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when the computer program is run, implements a method for a new version of a designer to be compatible with an older version of a process.
[0032] This invention provides a method, system, device, and medium for a new version of a designer to be compatible with an older version of a workflow. The method involves importing and decompressing an older workflow package, reading and decrypting its JSON data, extracting data fields containing workflow information from the JSON data in the older workflow diagram, and recording a mapping dictionary between the current node and the next node. A new workflow is created by reading global variable parameters from the older workflow and adding them to the new workflow. The nodes in the older workflow diagram are recursively traversed according to the mapping dictionary, and the data structure of the older workflow is transformed into the data structure of the new workflow, completing the compatibility import. Compared with existing technologies, this invention eliminates the need for users to manually develop a workflow suitable for the new designer by referring to the older workflow. Instead, during the import of the older workflow package into the new designer, the background automatically transforms the data structure of the older workflow into a data structure suitable for the new designer, achieving automated compatibility. Attached Figure Description
[0033] Figure 1 This is a system block diagram of a method for a new version of a designer to be compatible with an old version of a process according to an embodiment of the present invention;
[0034] Figure 2 This is a system block diagram of a method for determining node type in a new version of the designer that is compatible with the old version of the process, according to an embodiment of the present invention.
[0035] Figure 3 This is a system block diagram of a method for filling components corresponding to the old process in the sub-process provided by an embodiment of the present invention;
[0036] Figure 4 This is a system block diagram of a method for converting a reused process block of the old process into a sub-process of the new process, provided by an embodiment of the present invention;
[0037] Figure 5 This is a system block diagram of a system for a new version of the designer that is compatible with the old version of the process according to an embodiment of the present invention;
[0038] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0039] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. The embodiments are given for illustrative purposes only and should not be construed as limiting the present invention. The accompanying drawings are for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.
[0040] The backend of this application is a Python backend built on the Flask framework, which contains a series of functional interfaces involved in the product.
[0041] In one embodiment, such as Figure 1 As shown, the present invention provides a method for a new version of a designer to be compatible with an older version of the workflow, wherein the method includes:
[0042] S1. Import and decompress the old process package, read the old process JSON data from the old process package and decrypt it;
[0043] S2. Extract the data fields containing process information from the old version of the process JSON data and record the mapping dictionary between the current node and the next node. This application reads the data containing process information parameters from the JSON data obtained in step S1, then extracts the data corresponding to the nodes of the old version of the flowchart from the read data, and then establishes a mapping dictionary between the current node and the next node based on the node data of the flowchart. The data fields containing process information refer to data fields that can reveal the content structure of the entire process. The advantage of defining such a data structure in this application is that the front-end and back-end can form an agreement, which facilitates front-end rendering and back-end processing, and also provides data reference for the new version to be compatible with the old version. The selection and extraction are performed by using the Python programming language according to the reading methods corresponding to the JSON or dictionary data.
[0044] S3. Create a new version of the process. Read the global variable parameters of the old process from the JSON data of the old process and add them to the new process. This application creates a new version of the process in the background, which is equivalent to clicking "Create Process" on the new designer page to get an empty new process without adding any components. At the same time, the background will automatically design a correspondence between the global variable parameter data structure of the old process and the new process, thereby migrating the global variable parameters of the old process to the new process. This way, users do not have to worry about data incompatibility issues after importing the old process package into the new designer.
[0045] S4. Recursively traverse the nodes of the old flowchart in the old process package according to the mapping dictionary, and transform the data structure of the data fields containing process information in the old process JSON data into the data structure of the new process to complete the compatibility import.
[0046] After the above series of compatibility operations, users can basically run the old process without manual processing by importing it with one click in the new version of the designer. Automated compatibility can also effectively reduce a series of errors that may occur during the process of manually redeveloping the process.
[0047] In step S4, this application also needs to determine whether the old flowchart has a next node when recursively traversing the nodes of the old flowchart in the old process package according to the mapping dictionary. In this application, the distinction of nodes is made by including the name, id, parameters and other attributes of each node in the data structure of the entire process. The backend can distinguish the type of the current node based on these attributes, which is faster and more accurate.
[0048] In the node determination of the old version of the flowchart in this application, if there is a next node, the node type is determined according to the data structure of the old version of the flowchart, and corresponding compatibility processing is performed for different types of nodes. The node types include ordinary process blocks and container classes; otherwise, the compatibility import is completed. For example... Figure 2 , 3 As shown in Figure 4, S41, if the node type is a normal process block, then create a subprocess of the new process, and add a component to call the subprocess in the main process of the new process to call the subprocess.
[0049] In step S41, the sub-process for creating the new version of the process further includes filling the sub-process with components corresponding to the old version of the process:
[0050] S411. Traverse the component list of the old process and create new components corresponding to the old process in the sub-process. During the recursive traversal, based on the recorded mapping data dictionary, automatically convert the data structure of the old process into the data structure of the new process one by one during the compatibility process. This not only ensures data security but also effectively reduces a large number of manual operations, saving manpower and time costs.
[0051] S412. Read the parameter data structure of the old version of the process, format it according to the structural differences between the old and new versions, and format the data structure of the old version of the process into a data structure suitable for the new version of the process; generate a new component that conforms to the business functions of the old version of the process and is suitable for the new version of the process. Compare the data structures of the global variable parameters of the old version of the process with those of the new version of the process, thereby migrating the global variables of the old version to the new version of the process. This ensures that users do not have to worry about data incompatibility issues after importing the old version of the process package into the new version designer, thus ensuring the security of the data compatibility process.
[0052] In step S411, for the component list that processes the traversal of the old version process, a new version component corresponding to the old version process is created in the sub-process, which also includes: converting the reuse process block of the old version process into a sub-process of the new version process.
[0053] S4111. Read the parameter data structure of the reused process block and format it according to the structural differences between the old and new versions. During this process, the data structure of the global variable parameters of the old process and the new process can be automatically compared, thereby migrating the global variables of the old process to the new process, reducing a lot of manual operation and saving manpower and time costs.
[0054] S4112. Format the parameter data structure of the reused process block into a data structure suitable for the sub-process; during the compatibility process, automatically convert the data structure of the old process to the data structure of the new process one by one, ensuring the security of data during the conversion process.
[0055] S4113, and fill in a component that calls the sub-process in the sub-process to call the sub-process.
[0056] S42. If the node type is a container class, then add a container class component to the new process, read the data structure of the global variable parameters of the old process, and migrate the parameter name, parameter type and parameter value of each parameter of the old process to the data structure of the new process; wherein, the container class includes conditional branch, continue loop, exit loop and exception handling.
[0057] Based on the above method, this invention eliminates the need for users to manually develop a new workflow suitable for the new designer by referring to the old workflow. Instead, during the process of importing the old workflow package into the new designer, the background automatically converts the data structure of the old workflow into a data structure suitable for the new designer, achieving automated compatibility and effectively reducing a large amount of manual operation, saving manpower and time costs.
[0058] Based on the above method for making the new version of the designer compatible with the old workflow, such as Figure 5 As shown, this embodiment of the invention provides a system for a new version of the designer to be compatible with the old version of the process, wherein the system includes a data decompression module 101, a decryption and extraction module 102, a process creation module 103 and a data processing module 104;
[0059] The data decompression module 101 is used to import and decompress the old process package, read the old process JSON data from the old process package and decrypt it;
[0060] The decryption and extraction module 102 is used to extract data fields containing process information from the old version of the process JSON data and record the mapping dictionary between the current node and the next node. This system reads data containing process information parameters from the JSON data obtained from the data decompression module 101, then extracts the data corresponding to the nodes of the old version of the flowchart from the read data, and then establishes a mapping dictionary between the current node and the next node based on the node data of the flowchart. The data fields containing process information refer to data fields that reveal the content structure of the entire process. The advantage of defining such a data structure in this application is that the front-end and back-end can form an agreement, facilitating front-end rendering and back-end processing, and also providing data reference for new versions to be compatible with old versions. The selection and extraction are performed using the Python programming language according to the corresponding reading methods for JSON or dictionary data.
[0061] The process creation module 103 is used to read the global variable parameters of the old process from the old process JSON data and add them to the new process. This system creates a new process in the background, which is equivalent to clicking "Create Process" on the new designer page to get an empty new process without adding any components. At the same time, the background will automatically design a correspondence between the global variable parameter data structure of the old process and the new process, thereby migrating the global variable parameters of the old process to the new process. This way, users do not have to worry about data incompatibility issues after importing the old process package into the new designer.
[0062] The data processing module 104 is used to recursively traverse the nodes of the old flowchart in the old process package according to the mapping dictionary, and transform the data structure of the data fields containing process information in the old process JSON data into the data structure of the new process, thereby completing the compatibility import.
[0063] After compatibility operations with the above systems, users can basically run the old process without manual processing by importing it with one click in the new designer. Automated compatibility can also effectively reduce a series of errors that may occur during the process of manually redeveloping the process.
[0064] The various modules in the system that is compatible with the old workflow in the new version of the designer can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or they can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0065] Based on the above-mentioned method and system for a new version of the designer to be compatible with the old version of the workflow, such as Figure 3As shown in the figure, an embodiment of the present invention provides a computer device including a memory, a processor, and a transceiver, which are connected to each other via a bus; the memory is used to store a set of computer program instructions and data, and can transmit the stored data to the processor; the processor can execute the program instructions stored in the memory to perform the steps of the above method.
[0066] The memory may include volatile memory or non-volatile memory, or both; the processor may be a central processing unit, a microprocessor, an application-specific integrated circuit, a programmable logic device, or a combination thereof. By way of example, but not limitation, the programmable logic device described above may be a complex programmable logic device, a field-programmable gate array, a general-purpose array logic, or any combination thereof.
[0067] In addition, memory can be a physically independent unit or integrated with the processor.
[0068] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have the same component arrangement.
[0069] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0070] In summary, the embodiments of the present invention provide a method, system, device, and medium for a new version of the designer to be compatible with an old version of the process. The new version of the designer of the present invention can automatically be compatible with the old version of the process. This method does not require users to manually develop a process suitable for the new version of the designer by referring to the old version of the process. Instead, during the process of importing the old version of the process package into the new version of the designer, the background automatically converts the data structure of the old version of the process into a data structure suitable for the new version of the designer, thereby achieving the effect of automatic compatibility.
[0071] The above description is only a preferred embodiment of the present invention. It should be noted that for ordinary counters in the art, several improvements and substitutions can be made without departing from the counting principle of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention.
Claims
1. A method for a new version of a designer to be compatible with an older workflow, characterized in that, The method includes: Import and decompress the old process package, read the old process JSON data from the old process package and decrypt it; Extract the data fields containing process information from the old version of the process JSON data and record the mapping dictionary between the current node and the next node; Create a new version of the process, read the global variable parameters of the old process from the JSON data of the old process, and add them to the new version of the process; The nodes of the old flowchart in the old process package are recursively traversed according to the mapping dictionary, and the data structure of the data fields containing process information in the old process JSON data is transformed into the data structure of the new process to complete the compatibility import. The step of recursively traversing the nodes of the old flowchart in the old process package according to the mapping dictionary, and transforming the data structure of the data fields containing process information in the old process JSON data into the data structure of the new process, further includes: When recursively traversing the nodes of the old flowchart in the old flowchart package according to the mapping dictionary, it is determined whether the old flowchart has a next node. If there is a next node, the node type is determined according to the data structure of the old process, and the corresponding compatibility processing is performed for different types of nodes. The node types include ordinary process blocks and container classes. Conversely, if the import is successful, a compatible import is completed.
2. The method for a new version of the designer to be compatible with an older version of the workflow as described in claim 1, characterized in that, If the node type is a normal process block, then a subprocess of the new process is created, and a component for calling the subprocess is added to the main process of the new process to call the subprocess.
3. The method for a new version of the designer to be compatible with an older version of the workflow as described in claim 1, characterized in that, If the node type is a container, then a container component is added to the new process, reads the data structure of the global variable parameters of the old process, and migrates the parameter name, parameter type, and parameter value of each parameter of the old process to the data structure of the new process.
4. The method for a new version of the designer to be compatible with an older version of the workflow as described in claim 2, characterized in that, The sub-process for creating the new version of the process also includes: Fill the sub-process with the components corresponding to the old version of the process; Iterate through the component list of the old process and create new components corresponding to the old process in the sub-process; Read the parameter data structure of the old process, format the data structure of the old process into a data structure suitable for the new process, and generate a new component suitable for the new process.
5. The method for a new version of the designer to be compatible with an older version of the workflow as described in claim 4, characterized in that, The step of traversing the component list of the old process and creating new components corresponding to the old process in the sub-process also includes: The reused process blocks of the old process are transformed into sub-processes of the new process; Read the parameter data structure of the reused process block and format the parameter data structure of the reused process block into a data structure suitable for the sub-process; And in the sub-process, a component for calling the sub-process is populated to call the sub-process.
6. The method for a new version of the designer to be compatible with an older version of the workflow as described in claim 3, characterized in that, The container class includes conditional branching, loop continuation, loop exit, and exception handling.
7. A system where a new version of the designer is compatible with an older version of the workflow, characterized in that, The system includes a data decompression module, a decryption and extraction module, a process creation module, and a data processing module. The data decompression module is used to import and decompress the old process package, read the old process JSON data from the old process package and decrypt it; The decryption and extraction module is used to extract data fields containing process information from the old version of the process JSON data and record the mapping dictionary between the current node and the next node; The process creation module is used to create a new version of the process, read the global variable parameters of the old process from the JSON data of the old process, and add them to the new process. The data processing module is used to recursively traverse the nodes of the old flowchart in the old process package according to the mapping dictionary, and convert the data structure of the data fields containing process information in the old process JSON data into the data structure of the new process, thus completing the compatibility import. Specifically, the recursive traversal of the nodes of the old flowchart in the old process package according to the mapping dictionary, and the conversion of the data structure of the data fields containing process information in the old process JSON data into the data structure of the new process, further includes: when recursively traversing the nodes of the old flowchart in the old process package according to the mapping dictionary, determining whether the old flowchart has a next node; if there is a next node, determining the node type according to the data structure of the old process, and performing corresponding compatibility processing for different types of nodes, where the node types include ordinary process blocks and container classes; otherwise, the compatibility import is completed.
8. A computer device, characterized in that: The device includes a processor and a memory, the processor being connected to the memory for storing computer programs, and the processor for executing the computer programs stored in the memory to cause the computer device to perform the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Business process data format conversion method and device
CN113626644A