Flow chart processing method and device, equipment and storage medium
By extracting and converting the process information of the flowchart, the flowchart is converted into executable code, which solves the difficulty of conversion caused by the increased complexity of the flowchart and improves the efficiency of logical arrangement of the flowchart.
Patent Information
- Application Number
- CN202411339197.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-21
AI Technical Summary
As the complexity of flowcharts increases, it is difficult to convert flowcharts into executable code, and the prior art is difficult to effectively solve this problem.
By obtaining the visual flowchart to be processed, the process information is extracted, including the node type, node attributes, and logical relationships between the logical unit, and the flow chart is converted into executable code or script based on this information.
It simplifies the logical arrangement of flow charts, reduces the difficulty of code development for logical arrangement of flow charts, and improves the efficiency of logical arrangement of flow charts.
Smart Images

Figure CN119336308A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a flowchart processing method, device, equipment and storage medium. Background Art
[0002] In the process of software development and logic arrangement, flowcharts are an important tool for describing the program logic of business processes. Traditional logic arrangement methods often rely on tedious programming work, which is not only inefficient, but also difficult to intuitively display the logic process. With the integration and development of businesses in different fields, business processes tend to be diversified and complex. Flowchart engines can provide powerful process drawing capabilities and simplify flowchart drawing operations, which is an important guarantee for drawing complex flowcharts. Complex flowcharts often mean complex program logic. While flowchart engines simplify flowchart drawing, they also increase the difficulty of converting flowcharts into executable code, which is a major challenge for code development for flowchart logic arrangement. Summary of the invention
[0003] The present invention provides a flowchart processing method, device, equipment and storage medium, which are used to solve the defect in the prior art that it is difficult to convert the flowchart into executable code as the complexity of the flowchart increases.
[0004] The present invention provides a flow chart processing method, comprising the following steps: Obtaining a visual flowchart to be processed; the process nodes of the visual flowchart represent logical units, and the lines between the process nodes represent the execution order and dependency relationship between the logical units; Extracting process information of the visual flowchart; the process information includes node types, node attributes and logical relationships between nodes of the logical unit; The visual flowchart is converted into executable code or script based on the process information.
[0005] According to the flowchart processing method provided by the present invention, converting the visual flowchart into executable code or script based on the process information includes: Parsing the visual flowchart into a rule engine expression based on the process information; Verifying and optimizing the syntax and logic of the rule engine expression to obtain an optimized target expression; The target expression is parsed by a preset parser to convert the target expression into executable code or script.
[0006] According to the flowchart processing method provided by the present invention, parsing the visual flowchart into a rule engine expression based on the process information includes: Get the preset mapping rules; The process information is mapped based on the mapping rule to generate a rule engine expression of the visual flow chart; the rule engine expression is used to describe each of the logical units and the logical relationship between the logical units.
[0007] According to the flowchart processing method provided by the present invention, after verifying and optimizing the syntax and logic of the rule engine expression to obtain the optimized target expression, the method further includes: The target expression is output in text form for viewing.
[0008] According to the flowchart processing method provided by the present invention, the extracting process information of the visual flowchart includes: Obtaining configuration information of each process node in the visual flowchart and connection relationships between the process nodes; The node type and node attribute of the logic unit corresponding to the process node are extracted according to the configuration information, and the logical relationship between the logic units is extracted according to the connection relationship.
[0009] According to the flowchart processing method provided by the present invention, the step of obtaining a visual flowchart to be processed includes: Acquire a process drawing operation of a user in a visualization graphic tool; the visualization graphic tool provides a visualization drawing interface, and the process drawing operation includes dragging and connecting in the visualization drawing interface; A visual flowchart to be processed is drawn in the visual graphics tool according to the process drawing operation.
[0010] According to the flowchart processing method provided by the present invention, after obtaining the visualization process to be processed, the method further includes: The visual flowchart is converted into a preset format and saved for subsequent analysis.
[0011] The present invention also provides a flow chart processing device, comprising the following modules: A flowchart acquisition module is used to acquire a visual flowchart to be processed; the flow nodes of the visual flowchart represent logical units, and the lines between the flow nodes represent the execution order and dependency relationship between the logical units; A flowchart parsing module, used to extract the process information of the visual flowchart; the process information includes the node type, node attributes and logical relationship between nodes of the logical unit; A flowchart conversion module is used to convert the visual flowchart into executable code or script based on the process information.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the flowchart processing method described in any one of the above are implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the flowchart processing method described in any one of the above are implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the flowchart processing methods described above are implemented.
[0015] The flowchart processing method, device, equipment and storage medium provided by the present invention obtain a visual flowchart to be processed and extract process information such as node types, node attributes and logical relationships between nodes of its logical units, and convert the visual flowchart into executable code or script based on the extracted process information, thereby simplifying the logical arrangement of the flowchart, thereby reducing the difficulty of code development for the logical arrangement of the flowchart and improving the efficiency of the logical arrangement of the flowchart. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a schematic flow chart of the flow chart processing method provided by the present invention.
[0018] Figure 2 It is a schematic diagram of the processing flow of the flowchart provided by the present invention.
[0019] Figure 3 It is a structural schematic diagram of the flowchart processing device provided by the present invention.
[0020] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] The embodiment of the present invention provides a flowchart processing method, which can realize the rapid conversion from flowchart to executable code, improve the logic arrangement efficiency of flowchart, and make the logic flow more intuitive and easy to understand. Figure 1 It is a flowchart diagram of the flowchart processing method provided by the present invention, such as Figure 1 As shown, the method comprises the following steps: Step 100, obtaining a visual flowchart to be processed; the process nodes of the visual flowchart represent logical units, and the lines between the process nodes represent the execution order and dependency relationship between the logical units; Step 200, extracting process information of the visual flowchart; the process information includes node types, node attributes and logical relationships between nodes of the logical unit; Step 300: convert the visual flowchart into executable code or script based on the process information.
[0023] First, obtain the visual flowchart to be processed, which consists of process nodes and lines between process nodes. The process nodes of the visual flowchart represent logical units, and the lines between process nodes are directed segments, which represent the execution order and dependency relationship between logical units.
[0024] The lines between process nodes represent the direction and sequence of the process as well as the relationship between nodes. They are key elements for understanding and executing business processes. The functions of the lines between process nodes include identifying direction and sequence, displaying relationships and dependencies, representing branches and decisions, explaining state transitions, and providing a basis for process optimization.
[0025] Among them, for the identification of direction and order, the connection between process nodes is a directed line segment, usually in the form of an arrow, which clearly indicates the direction of the process from one node to another. This directionality ensures that the process is executed in the predetermined order, helping to avoid confusion and errors in operation.
[0026] For the display of relationships and dependencies, the lines between process nodes not only show the direct order of the process, but can also be used to represent the dependencies between nodes. For example, if a task needs to wait for another task to complete before it can start, this dependency can be clearly expressed through the line.
[0027] Regarding the representation of branches and decisions, in complex business processes, it is often necessary to select different execution paths based on specific conditions. The connections between process nodes play an important role in this situation, by forking or merging, showing the decision points in the process and possible multiple execution paths.
[0028] Regarding the description of state transition, in a more abstract process model, such as a state diagram, the lines (transitions) between process nodes represent state changes. Each state transition is defined by a line to characterize how the business system responds to external events or changes in internal logic.
[0029] As a basis for process optimization, by analyzing the connections between process nodes, bottlenecks, redundant steps or potential improvement points in the process can be discovered. Optimizing the connections at the improvement points can significantly improve the execution efficiency and response speed of the entire process.
[0030] The connection between process nodes is one of the foundations for building and understanding complex business processes. It not only helps process designers and process executors grasp the overall structure of the process, but also provides an important basis for optimizing and adjusting the process.
[0031] Furthermore, the process information of the visual flowchart is extracted, and the process information includes the node type of the logic unit, the node attribute and the logical relationship between the nodes, the logical relationship is also the sequential relationship corresponding to the execution order between the logic units, and the dependency relationship between the logic units.
[0032] The node types of the logic unit include task nodes, activity nodes, branch nodes, aggregation nodes, decision nodes and edge nodes.
[0033] Among them, the task node represents a specific work or task and is the basic operation unit in the process. Each task node usually needs to complete specific work content and may be executed by different members or components.
[0034] An activity node refers to a step or stage in a process, which is used to define specific activities performed in the process, such as approval, editing, notification, and other operations, and constitutes the logical structure of the process.
[0035] Branch nodes are used to divide the process into different paths according to specific conditions or rules. Branch nodes allow the process to take different courses of action according to different situations, increasing the flexibility and adaptability of the process.
[0036] An aggregate node is the opposite of a branch node, in that it is used to merge multiple parallel flow paths into a single flow path, usually after all branches have completed their respective tasks.
[0037] Decision nodes allow for decision making within a process, usually based on certain criteria or data inputs to determine the next step in the process. Decision nodes are particularly important for handling complex business logic.
[0038] Edge nodes are usually located at the beginning and end of the process, marking the start and end of the process. For example, the process initiation node and the process end node are both edge nodes, which represent the entry and exit of the process respectively.
[0039] Process nodes are the basis of complex workflows. Different types of process nodes can be combined and configured to meet diverse business needs and logical controls. The functions and roles of different types of nodes help to more effectively design and optimize business processes and improve work efficiency and quality.
[0040] The node attributes of a process node include the node number, the process number to which it belongs, the predecessor process node number, the successor process node number, and the execution role.
[0041] Among them, for the process node number, each process node has a unique number, which helps to accurately identify and track each node in the business system. The node number is usually encoded in a hierarchical code.
[0042] As for the process number, due to the hierarchical nature of business processes, each process node belongs to a larger process. Therefore, each process node will have a corresponding process number to indicate the main process or sub-process to which the process node belongs.
[0043] The predecessor process node number attribute records the information of the previous node of the current process node, which is used to characterize the flow direction and logical order of the process. Through the predecessor process node number, the previous step or decision point in the process can be traced back.
[0044] The successor process node number corresponds to the predecessor process node number. The successor process node number indicates the next node flowing from the current process node, which is crucial for characterizing the direction of the entire process, especially when there are multiple branches and choices.
[0045] For the execution role, each process node needs to be executed by a specific role. The node attributes of the execution role define which users or roles have the right to execute the tasks of the node, ensuring that the tasks can be completed correctly and efficiently.
[0046] For the start conditions, the start conditions of the process node describe which specific conditions must be met to activate the function of the process node. These conditions can be based on factors such as time, events, or data status.
[0047] For the end condition, the end condition defines when the process node will stop its activity, which is usually defined based on the completion of the task or other preset business rules.
[0048] The attributes of process nodes not only support basic process control and management functions, but also provide a high degree of flexibility and scalability, enabling complex business processes to be effectively designed, monitored and optimized.
[0049] Furthermore, the logical relationships between process nodes mainly include sequential relationships, parallel relationships, conditional relationships, and cyclic relationships.
[0050] Among them, the sequence relationship is the most basic way to connect process nodes, which requires that one node can only start after another node is completed. The sequence relationship ensures that tasks are executed in a predetermined order and is often used in operation processes that need to be carried out strictly according to steps.
[0051] Parallel relationships allow multiple process nodes to execute simultaneously. Process nodes with parallel relationships can be independent tasks with no dependencies. Especially when dealing with large or complex tasks, parallel processing can significantly improve the execution efficiency of the process.
[0052] Conditional relationships determine the direction of the process based on specific business rules or data status. For example, a decision node will select different branch paths to continue execution based on different input data. Conditional relationships increase the flexibility and adaptability of the process.
[0053] A loop relationship involves certain nodes being repeatedly executed multiple times according to conditions until a specific end condition is met. This is common in tasks that require repeated verification or iteration, such as multi-level review in an approval process.
[0054] Reasonable design of the logical relationship between process nodes is crucial to building efficient, flexible and reliable business processes. It not only helps to optimize operational processes, but also improves the response speed and service quality of the entire organization.
[0055] Finally, based on the extracted process information, the visual flowchart is converted into executable code or script, thereby simplifying the logical arrangement of the flowchart, reducing the difficulty of software development for complex flowcharts, simplifying the logical arrangement of complex flowcharts, and improving the efficiency of logical arrangement.
[0056] In this embodiment, by obtaining the visual flowchart to be processed and extracting process information such as the node type, node attributes and logical relationships between nodes of its logical units, the visual flowchart is converted into executable code or script based on the extracted process information, thereby simplifying the logical arrangement of the flowchart, thereby reducing the difficulty of code development for the logical arrangement of the flowchart and improving the efficiency of the logical arrangement of the flowchart.
[0057] In one embodiment, the visual flowchart is drawn in a visual graphics tool, so step 100 further includes: Step 101, obtaining a process drawing operation of a user in a visualization graphic tool; the visualization graphic tool provides a visualization drawing interface, and the process drawing operation includes dragging and connecting in the visualization drawing interface; Step 102: Draw a visual flowchart to be processed in the visual graphics tool according to the process drawing operation.
[0058] Obtain the process drawing operation of the user in the visualization graphic tool, wherein the visualization graphic tool provides a visualization drawing interface for the user to perform drawing operations, and the process drawing operations of the user in the visualization graphic interface include dragging and connecting. Draw the visual flowchart to be processed in the visualization graphic tool according to the process drawing operation. Optionally, the visualization graphic tool is a visual flowchart engine, such as the G6 flowchart engine. Using the graphical tools provided by the G6 flowchart engine, the user can quickly build a visual flowchart through simple operations such as dragging, connecting, etc.
[0059] Furthermore, after step 100, the following steps may also be included: Step 103, converting the visual flowchart into a preset format and saving it for subsequent analysis.
[0060] Convert the visual flowchart into a preset format and save it for subsequent parsing. Optionally, convert the visual flowchart into JSON format and save it.
[0061] Optionally, the extraction of process information is implemented based on the configuration information of the visual flowchart, and step 200 further includes: Step 201, obtaining configuration information of each process node in the visual flowchart and connection relationships between the process nodes; Step 202: extract the node type and node attribute of the logic unit corresponding to the process node according to the configuration information, and extract the logical relationship between the logic units according to the connection relationship.
[0062] When extracting process information of a visual flowchart, the configuration information of each process node in the visual flowchart and the connection relationship between each process node are obtained, and then the node type and node attribute of the logic unit corresponding to the process node are extracted according to the configuration information of the process node, and the logical relationship between the logic units is extracted according to the connection relationship between the process nodes.
[0063] In one embodiment, when converting the visual flowchart into executable code or script based on the extracted process information, it is specifically achieved by parsing the process information based on a preset mapping rule. Based on this, step 300 also includes: Step 301, parsing the visual flowchart into a rule engine expression based on the process information; Step 302, verify and optimize the syntax and logic of the rule engine expression to obtain an optimized target expression; Step 303: parse the target expression through a preset parser to convert the target expression into executable code or script.
[0064] When converting the visual flowchart, the visual flowchart is parsed into a rule engine expression based on the extracted process information, and then the syntax and logic of the parsed rule engine expression are verified and optimized to obtain the optimized target expression. The target expression is parsed by a preset parser and converted into executable code or script.
[0065] Furthermore, in step 301, the visual flowchart is parsed into a rule engine expression based on the extracted process information, specifically including: Step 311, obtaining a preset mapping rule; Step 321, mapping the process information based on the mapping rule to generate a rule engine expression of the visual flowchart; the rule engine expression is used to describe each of the logical units and the logical relationship between the logical units.
[0066] When parsing the visual flowchart, a preset mapping rule is obtained, and the extracted process information is mapped based on the mapping rule to generate a rule engine expression of the visual flowchart. The rule engine expression is used to describe the logical units in the visual flowchart and the logical relationships between the logical units.
[0067] Optionally, after step 302, the following steps may also be included: Step 304: Output the target expression in text form for viewing.
[0068] The verified and optimized target expression is output in text form for viewing, including but not limited to being output to a visual drawing interface of a flowchart engine, or being output to a logical arrangement interface of software development for a visual flowchart.
[0069] In one embodiment, referring to Figure 2The flowchart processing flow shown in the figure, the user designs the flowchart in the visual graphical interface provided by the flowchart engine, builds the visual flowchart through simple drag and drop and connection operations, and saves the constructed visual flowchart in JSON format for subsequent parsing. Each process node in the visual flowchart represents a logical unit, and the connection between the process nodes represents the execution order and dependency relationship between the logical units.
[0070] Furthermore, the visual flowchart is parsed by a parser, and based on the specification of the flowchart engine, the node type, node attributes and connection relationship between nodes of each process node in the visual flowchart are parsed to obtain the process information of the visual flowchart.
[0071] Based on the process information obtained through analysis, the connection relationship between the logical units in the visual flowchart is converted into a rule engine expression, such as a liteflow expression, through preset mapping rules. The liteflow expression is a concise and easy-to-read logic description language that can be directly recognized and executed by the logic orchestration system.
[0072] Furthermore, the generated rule engine expressions are verified and optimized to ensure that the syntax of the rule engine expressions is correct and the logic is reasonable. Rule engine expressions with incorrect syntax or unreasonable logic are optimized to obtain optimized target expressions, thereby improving the efficiency of process execution.
[0073] The optimized target expression is parsed by the parser and converted into executable code or script to run in the logic orchestration engine.
[0074] In this embodiment, the design of the flowchart and the parsing of the executable expression are combined. Based on the efficient conversion of the flowchart and the expression, a smooth transition from the flowchart to the executable code is achieved. While reducing the code development difficulty of the logic arrangement of the flowchart, the efficiency and accuracy of the logic arrangement of the flowchart are greatly improved.
[0075] The flowchart processing device provided by the present invention is described below. The flowchart processing device described below and the flowchart processing method described above can be referred to each other.
[0076] Reference Figure 3 , a flowchart processing device provided by an embodiment of the present invention includes: A flowchart acquisition module 10 is used to acquire a visual flowchart to be processed; the flowchart nodes of the visual flowchart represent logical units, and the lines between the flowchart nodes represent the execution order and dependency relationship between the logical units; A flowchart parsing module 20, used to extract the process information of the visual flowchart; the process information includes the node type, node attributes and logical relationship between nodes of the logical unit; The flowchart conversion module 30 is used to convert the visual flowchart into executable code or script based on the process information.
[0077] In one embodiment, the flowchart conversion module 30 is further used to: Parsing the visual flowchart into a rule engine expression based on the process information; Verifying and optimizing the syntax and logic of the rule engine expression to obtain an optimized target expression; The target expression is parsed by a preset parser to convert the target expression into executable code or script.
[0078] In one embodiment, the flowchart conversion module 30 is further used to: Get the preset mapping rules; The process information is mapped based on the mapping rule to generate a rule engine expression of the visual flow chart; the rule engine expression is used to describe each of the logical units and the logical relationship between the logical units.
[0079] In one embodiment, the flowchart processing device further includes an output module, which is used to: The target expression is output in text form for viewing.
[0080] In one embodiment, the flowchart parsing module 20 is further used to: Obtaining configuration information of each process node in the visual flowchart and connection relationships between the process nodes; The node type and node attribute of the logic unit corresponding to the process node are extracted according to the configuration information, and the logical relationship between the logic units is extracted according to the connection relationship.
[0081] In one embodiment, the flowchart acquisition module 10 is further used to: Acquire a process drawing operation of a user in a visualization graphic tool; the visualization graphic tool provides a visualization drawing interface, and the process drawing operation includes dragging and connecting in the visualization drawing interface; A visual flowchart to be processed is drawn in the visual graphics tool according to the process drawing operation.
[0082] In one embodiment, the flowchart processing device further includes a storage module, which is used to: The visual flowchart is converted into a preset format and saved for subsequent analysis.
[0083] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communications interface 420 and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the steps of the flowchart processing method, for example, including: Obtaining a visual flowchart to be processed; the process nodes of the visual flowchart represent logical units, and the lines between the process nodes represent the execution order and dependency relationship between the logical units; Extracting process information of the visual flowchart; the process information includes node types, node attributes and logical relationships between nodes of the logical unit; The visual flowchart is converted into executable code or script based on the process information.
[0084] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0085] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the steps of the flowchart processing method provided in the above embodiments, for example, including: Obtaining a visual flowchart to be processed; the process nodes of the visual flowchart represent logical units, and the lines between the process nodes represent the execution order and dependency relationship between the logical units; Extracting process information of the visual flowchart; the process information includes node types, node attributes and logical relationships between nodes of the logical unit; The visual flowchart is converted into executable code or script based on the process information.
[0086] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the steps of the flowchart processing method provided in the above embodiments, for example, including: Obtaining a visual flowchart to be processed; the process nodes of the visual flowchart represent logical units, and the lines between the process nodes represent the execution order and dependency relationship between the logical units; Extracting process information of the visual flowchart; the process information includes node types, node attributes and logical relationships between nodes of the logical unit; The visual flowchart is converted into executable code or script based on the process information.
[0087] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A flowchart processing method, characterized in that: include: Obtaining a visual flowchart to be processed; the process nodes of the visual flowchart represent logical units, and the lines between the process nodes represent the execution order and dependency relationship between the logical units; Extracting process information of the visual flowchart; the process information includes node types, node attributes and logical relationships between nodes of the logical unit; The visual flowchart is converted into executable code or script based on the process information.
2. The flowchart processing method according to claim 1, characterized in that: The converting the visual flowchart into executable code or script based on the process information includes: Parsing the visual flowchart into a rule engine expression based on the process information; Verifying and optimizing the syntax and logic of the rule engine expression to obtain an optimized target expression; The target expression is parsed by a preset parser to convert the target expression into executable code or script.
3. The flowchart processing method according to claim 2, characterized in that: The step of parsing the visual flowchart into a rule engine expression based on the process information includes: Get the preset mapping rules; The process information is mapped based on the mapping rule to generate a rule engine expression of the visual flow chart; the rule engine expression is used to describe each of the logical units and the logical relationship between the logical units.
4. The flowchart processing method according to claim 2, characterized in that: After verifying and optimizing the syntax and logic of the rule engine expression to obtain the optimized target expression, the method further includes: The target expression is output in text form for viewing.
5. The flowchart processing method according to claim 1, characterized in that: The extracting process information of the visual flowchart includes: Obtaining configuration information of each process node in the visual flowchart and connection relationships between the process nodes; The node type and node attribute of the logic unit corresponding to the process node are extracted according to the configuration information, and the logical relationship between the logic units is extracted according to the connection relationship.
6. The flowchart processing method according to claim 1, characterized in that: The obtaining of a visual flowchart to be processed includes: Acquire a process drawing operation of a user in a visualization graphic tool; the visualization graphic tool provides a visualization drawing interface, and the process drawing operation includes dragging and connecting in the visualization drawing interface; A visual flowchart to be processed is drawn in the visual graphics tool according to the process drawing operation.
7. The flowchart processing method according to claim 6, characterized in that: After obtaining the visualization process to be processed, the method further includes: The visual flowchart is converted into a preset format and saved for subsequent analysis.
8. A flowchart processing device, characterized in that: include: A flowchart acquisition module is used to acquire a visual flowchart to be processed; the flow nodes of the visual flowchart represent logical units, and the lines between the flow nodes represent the execution order and dependency relationship between the logical units; A flowchart parsing module, used to extract the process information of the visual flowchart; the process information includes the node type, node attributes and logical relationship between nodes of the logical unit; A flowchart conversion module is used to convert the visual flowchart into executable code or script based on the process information.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the flowchart processing method according to any one of claims 1 to 7 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the flowchart processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Brain map dialogue strategy visualization method and device based on artificial intelligence
CN120928940A
Spacecraft fault handling flow chart construction and executable script generation method and device
CN121166076A