Process chart generation method based on AI large model
By using a large AI model to convert natural language into Markdown syntax and combining it with Mermaid syntax to draw flowcharts, and supporting online editing on draw.io, the system solves the problems of low efficiency and format incompatibility in existing technologies, and achieves automatic generation and secondary editing of high-precision flowcharts.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies are inefficient in flowchart drawing, making it difficult for non-professional users to draw complex graphics, and the generated results are inaccurate, cannot be edited, and have incompatible formats.
The AI large model converts natural language into Markdown syntax, uses Mermaid syntax to draw flowcharts, and supports online editing on draw.io, enabling high-precision display and secondary editing.
It improves flowchart drawing efficiency, reduces user operation costs, and achieves seamless compatibility with draw.io and secondary editing capabilities.
Smart Images

Figure CN121639841A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of software development, project management, and education, and in particular to a method for generating flowcharts based on large AI models. Background Technology
[0002] Flowcharts are a crucial tool in software development, project management, and education, providing a visual representation of business processes, system architecture, and other information. Traditional flowchart creation requires users to manually use drawing tools like Visio and Draw.io, dragging and connecting various graphical elements. This method is not only inefficient but also presents a significant challenge for non-professional drafters, making it difficult to create complex flowcharts. With the development of Natural Language Processing (NLP) and Large Language Modeling (LLM) technologies, flowcharts can now be described using natural language and then generated through relevant techniques.
[0003] However, existing technologies for converting natural language into flowcharts suffer from inaccurate conversion, incompatible generated graphic formats, inability to meet user needs in different scenarios, and inability to edit and modify the generated flowcharts.
[0004] Existing technical solutions: Traditional flowchart creation tools (such as Visio) require manual dragging and dropping of components; Existing NLP to flowchart conversion tools; Existing technology patent CN114326660A (Flowchart generation method and system based on natural language processing).
[0005] Disadvantages of existing technology: Traditional flowchart creation tools (such as Visio) require manual dragging and dropping of components, which is inefficient; Existing NLP-to-flowchart tools suffer from semantic understanding bias (error rate >40%). For example, CN114326660A generates results that lack standard format support, making secondary editing impossible, and the export format is limited to SVG. Summary of the Invention
[0006] In view of the above problems, the present invention is proposed to provide a flowchart table generation method based on a large AI model that overcomes or at least partially solves the above problems.
[0007] According to one aspect of the present invention, a method for generating flowcharts based on large AI models is provided, the method comprising: Acquire natural language; The natural language is converted into Markdown syntax using a large model; Flowchart drawing is achieved using the memmaid syntax in Markdown. It can be displayed on web pages or related software, or through relevant processing, it can support secondary editing, downloading and exporting from online draw.io websites.
[0008] Optionally, the flowchart drawing using the mermaid syntax in Markdown specifically includes: The syntax parser performs relevant validations on the output markdown format string, parses it according to Mermaid-related syntax, obtains the parsing results, stores them in the browser's memory, and provides them for use in the next stage. Based on the parsing results, an abstract syntax tree is used for syntax rendering to obtain the parsed structural data. The rendering engine is based on the parsed structural data. Virtual DOM and incremental updates; Real-time preview; Error feedback: This tool converts online draw previews, connects to relevant interfaces on draw.io, and encrypts the generated content using URL encoding.
[0009] Optionally, the step of using an abstract syntax tree to render the syntax based on the parsing results to obtain the parsed structured data specifically includes: Based on the parsing results, perform syntax rendering according to the relevant templates in the syntax tree; The syntax tree is a template for the flowchart, and the data of each node in the process is rendered according to the template requirements.
[0010] Optionally, the rendering engine based on the parsed structural data specifically includes: The parsed structured data is then integrated into the Mermaid syntax rendering engine in the browser using JavaScript programming techniques for syntax validation and version adaptation before rendering.
[0011] Optionally, the error feedback specifically includes: real-time syntax error location and repair suggestions.
[0012] Optionally, the virtual DOM and incremental updates specifically include: implementing incremental updates through a Diff algorithm to provide a fast response when dealing with large-scale modifications.
[0013] Optionally, the preview modes of the real-time preview include: SVG mode, defaults to high-precision rendering; Canvas mode is suitable for very large charts.
[0014] This invention provides a flowchart generation method based on an AI large-scale model. The method includes: acquiring natural language; converting the natural language into Markdown syntax using the large-scale model; drawing the flowchart using Mermaid syntax in Markdown; displaying it on a webpage or related software, or, through relevant processing, enabling secondary editing, downloading, and exporting via the online website draw.io. This method automatically generates high-precision flowcharts using natural language descriptions, achieves seamless compatibility with draw.io, reduces user operating costs, allows for secondary editing and fine-tuning, and improves flowchart operation efficiency.
[0015] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart of a flowchart table generation method based on a large AI model provided in an embodiment of the present invention; Figure 2 A schematic diagram illustrating the implementation principle of the real-time preview module from the mermaid syntax provided in this embodiment of the invention; Figure 3 The timing diagrams used to represent 3 and 4 in the embodiments of the present invention are shown. Figure 4 This is a flowchart illustrating the rendering process based on relevant data, provided for an embodiment of the present invention. Detailed Implementation
[0018] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0019] The terms "comprising" and "having," and any variations thereof, in the specification, embodiments, claims, and drawings of this invention are intended to cover non-exclusive inclusion, such as including a series of steps or units.
[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0021] The large model converts natural language into Markdown syntax, and uses Mermaid syntax within Markdown to create flowcharts for display on web pages or related software. Alternatively, through further processing, it can support online websites like draw.io for editing, downloading, and exporting. The overall process is as follows: Figure 1 As shown.
[0022] First, natural language is input into the large model, which can be any model on the market, such as DeepSeek. Semantic recognition is achieved through custom prompts, which are then recognized as the corresponding Mermaid syntax code. At the same time, a real-time preview is performed, and the corresponding draw.io file is generated and saved for subsequent secondary modifications.
[0023] Detailed introduction: The process consists of four stages: natural language input, semantic parsing, large model parsing, and mermaid. The output is powered by the large model and is based on DeepSeek. Through conversation training and given corresponding prompts (including roles, skills, workflows, and final examples), the process outputs the mermaid syntax of relevant flowcharts or sequences as required.
[0024] The implementation principles from mermaid syntax to the real-time preview module, such as... Figure 2 As shown. Specifically, after the large model outputs the mermaid syntax, it serves as the input for the next stage, which involves the process shown in the diagram, with details as follows: Syntax parser: After processing the output Markdown format string, it performs relevant validations, parses it according to Mermaid syntax, stores it in the browser's memory, and provides it for use in the next stage. Abstract Syntax Tree: Based on the parsing results in step 1, syntax rendering is performed according to the relevant templates in the syntax tree. For example, if the words "graph TD" are recognized in step 1, it indicates a flowchart. In this case, the syntax tree is a flowchart-related template, and the data of each node in the flowchart is rendered according to the template requirements. Rendering Engine: The parsed structural data is used to connect to the Mermaid syntax rendering engine in the browser using JavaScript programming technology, and syntax verification and version adaptation are performed before rendering.
[0025] Virtual DOM and incremental updates: Incremental updates are implemented through the Diff algorithm (40% performance improvement), enabling fast response when dealing with large batches of modifications.
[0026] The timing diagram is used to represent, as follows: Figure 3 As shown.
[0027] Real-time preview: There are two preview modes: SVG mode (default high-precision rendering) and Canvas mode (suitable for very large charts).
[0028] Error feedback: Real-time syntax error location and repair suggestions.
[0029] This tool converts the online preview of Draw.io data and connects to relevant APIs of draw.io. It encrypts the generated content using URL encoding. Access it via HYPERLINK "https: / / app.diagrams.net / url" https: / / app.diagrams.net / urlEncode.
[0030] Detailed introduction: Expressing one's intention: Taking deepseek as an example, the user enters "Give me a simple loan process".
[0031] The large model provides the following Mermaid code. Users don't care about this; it's just provided here to illustrate the principle.
[0032] The rendering flowchart is based on relevant data. Figure 4 As shown.
[0033] It supports exporting XML for secondary editing, and also supports reverse editing.
[0034] It pioneered a three-tiered transformation architecture: Natural Language - Mermaid Syntax - draw.io XML, while also supporting online editing and secondary editing functions. Supports bidirectional format conversion engine: Supports bidirectional conversion between Mermaid and draw.io XML. Beneficial effects: The invention aims to automatically generate high-precision flowcharts through natural language descriptions, achieve seamless compatibility with draw.io, reduce user operation costs, and enable secondary editing and fine-tuning, thereby rapidly improving the efficiency of flowchart operations.
[0035] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1.A method for generating an AI big model-based flowchart table, the method comprising: The generation method comprises: acquiring natural language; convert the natural language into markdown syntax through a large model; realize flowchart drawing through mermaid syntax in markdown syntax; display in a webpage or related software, or realize the function of secondary editing, downloading and exporting through online draw.io related websites through related processing. 2.The AI large model-based flowchart generation method of claim 1, wherein, The flowchart drawing through the mermaid syntax in the markdown syntax specifically comprises: a syntax parser, which performs related verification after outputting a markdown format string, performs parsing according to mermaid related syntax, obtains a parsing result, stores the parsing result in a browser memory, and provides use for a next stage; adopting an abstract syntax tree for syntax rendering according to the parsing result to obtain structure data after parsing; a rendering engine according to the structure data after parsing; virtual DOM and incremental updating; real-time preview; error feedback: convert the online preview into draw.io related interfaces, and encrypt the generated content through url encode. 3.The AI large model-based flowchart generation method of claim 2, wherein, The adopting an abstract syntax tree for syntax rendering according to the parsing result to obtain structure data after parsing specifically comprises: according to the parsing result, performing syntax rendering according to related templates in the syntax tree; the syntax tree is a flowchart related template, and data of each node in the rendering process is rendered according to the template. 4.The AI large model-based flowchart generation method of claim 2, wherein, The rendering engine according to the structure data after parsing specifically comprises: with the help of JavaScript programming technology, the structure data after parsing is connected to a mermaid syntax rendering engine in a browser to perform syntax verification before rendering and version adaptation. 5.The AI large model-based flowchart generation method of claim 2, wherein, The error feedback specifically comprises: real-time syntax error positioning and repair suggestions. 6.The AI large model-based flowchart generation method of claim 2, wherein, The virtual DOM and incremental updating specifically comprise: incremental updating is realized through a Diff algorithm, and quick response is realized for a large number of modifications. 7.The AI large model-based flowchart generation method of claim 2, wherein, The preview mode of the real-time preview comprises: an SVG mode, which is a default high-precision rendering; a Canvas mode, which is suitable for large-scale charts.
Citation Information
Patent Citations
Intelligent debugging method for fuel pump regulator based on RSS-ETR
CN114326660A