Technical flow chart generation method and system based on large language model

Through the technical flowchart generation method based on the large language model, the technical flowchart is automatically drawn and verified, which solves the problems of low efficiency and poor accuracy in the existing technology, and realizes efficient and accurate flowchart generation, supporting efficient project promotion.

CN120429342APending Publication Date: 2025-08-05ZHISHANG EXCELLENCE (CHENGDU) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510520268.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In the prior art, the generation efficiency of technical flow charts is low and the accuracy is poor, and errors and inconsistencies are prone to relying on manual drawing.

Method used

Using large language model training and optimization, the key steps and logical relationships of the technical flowchart are extracted through natural language processing technology, and the flowchart is automatically drawn using the graphic drawing library, combining the verification and correction module to ensure accuracy and completeness.

Benefits of technology

It improves the efficiency of technical flowchart generation, reduces human errors, enhances the accuracy and completeness of flowcharts, reduces project implementation risks, and promotes team collaboration and information sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429342A_ABST
    Figure CN120429342A_ABST
Patent Text Reader

Abstract

The invention relates to a technical flow chart generation method and system based on a large language model, and the method comprises the steps: carrying out the training of a large voice model through the preprocessing text data, and adjusting the parameters of the model in the training process, and continuously optimizing the performance of the model; inputting a technical flow description of a to-be-generated technical flow chart into the trained large language model, extracting key steps, a sequence relationship among the steps, conditional judgment and a loop structure in the technical flow chart by the large language model through a natural language processing technology, and converting the information into a structured data representation form; and according to the extracted structured flow information, automatically drawing a technical flow chart by utilizing a graph drawing library or a tool according to preset graph symbols and layout rules, and labeling and annotating elements in the flow chart. According to the method, the generation efficiency of the technical flow chart is greatly improved, the graphical presentation of the complex technical flow can be completed in a short time, and the time cost is greatly saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method and system for generating a technical flowchart based on a large language model. Background Art

[0002] In the process of modern technology research and development and project implementation, the drawing of technical flowcharts is of great significance for clearly displaying technical processes, improving team collaboration efficiency, and facilitating the understanding and implementation of technical solutions. Traditional methods for generating technical flowcharts often rely on manual drawing, which requires professional drawing knowledge and in-depth understanding of technical processes. This is not only time-consuming and labor-intensive, but also prone to human errors and inconsistencies. With the development of artificial intelligence technology, especially the emergence of large language models, new possibilities have been provided for the automatic generation of technical flowcharts. However, there is currently no mature and efficient method for generating technical flowcharts based on large language models. Therefore, how to solve the problems of low efficiency and poor accuracy in the generation of technical flowcharts in existing technologies is currently a matter of consideration. Summary of the Invention

[0003] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a method and system for generating a technical flowchart based on a large language model, which solves the shortcomings of the existing technology.

[0004] The object of the present invention is achieved through the following technical solution: a method for generating a technical flow chart based on a large language model, the generating method comprising:

[0005] Step 1: Use the preprocessed text data to train the large speech model, and adjust the model parameters during the training process to continuously optimize the model performance;

[0006] Step 2: Input the technical process description of the technical flow chart to be generated into the trained large language model. The large language model uses natural language processing technology to extract the key steps, the sequential relationship between steps, conditional judgments, and loop structures in the technical flow chart, and converts this information into a structured data representation;

[0007] Step 3: Based on the extracted structured process information, use a graphic drawing library or tool to automatically draw a technical flow chart according to predetermined graphic symbols and layout rules, and mark and annotate the elements in the flow chart.

[0008] The generation method also includes: verifying the generated technical flow chart to check whether there are logical errors, irregular graphics drawing and missing information. If so, the technical flow chart is corrected and improved using the feedback mechanism of the large language model.

[0009] The generation method also includes: collecting text data of technical documents, project requirements and technical specifications related to the flowchart to be generated, and performing pre-processing operations such as cleaning, denoising and word segmentation on the text data to convert it into a format that can be understood by the large language model.

[0010] The second step is to analyze the logical relationship through the multi-head attention mechanism, capture the dependency between the steps by calculating the output probability of each step, and generate the topological sorting required by the symbol by maximizing the probability of the correct step, ensuring that the generated step sequence conforms to the logical order and dependency of the technical process. The output probability is P(y i |y <i ,x)=softmax(v T tanh(W1h i +W2s)), where h i is the encoder hidden state, s is the decoder hidden state, and v, W1, W2 are trainable parameters.

[0011] A technical flowchart generation system based on a large language model, the system comprising a model training and optimization module, a process information extraction module, and a flowchart drawing module;

[0012] The model training and optimization module is configured to train the large speech model using the preprocessed text data and adjust the model parameters during the training process to continuously optimize the model performance;

[0013] The process information extraction module is configured to input the technical process description of the technical process diagram to be generated into the trained large language model. The large language model extracts the key steps, the sequential relationship between the steps, the conditional judgment and the loop structure in the technical process diagram through natural language processing technology, and converts this information into a structured data representation;

[0014] The flowchart drawing module is configured to automatically draw a technical flowchart based on the extracted structured process information using a graphic drawing library or tool in accordance with predetermined graphic symbols and layout rules, and to mark and annotate the elements in the flowchart.

[0015] The system also includes a verification and correction module, which is configured to verify the generated technical flowchart to check whether there are logical errors, irregular graphics drawing and missing information. If so, the technical flowchart is corrected and improved using the feedback mechanism of the large language model.

[0016] The system also includes a data collection and preprocessing module, which is configured to collect text data of technical documents, project requirements and technical specifications related to the flowchart to be generated, and perform preprocessing operations such as cleaning, denoising and word segmentation on the data to convert it into a format that can be understood by the large language model.

[0017] The present invention has the following advantages: a method and system for generating technical flowcharts based on a large language model, which greatly improves the efficiency of generating technical flowcharts. Compared with the traditional manual drawing method, it can complete the graphical presentation of complex technical processes in a short time, greatly saving time costs and enabling the technical team to enter the project implementation stage more quickly. Through the precise understanding and analysis of the semantics and logical relationships related to the technical process by the large language model, the accuracy and completeness of the flowchart are effectively improved, and errors caused by human negligence or misunderstanding are reduced, thereby reducing the risks caused by unclear processes during project implementation. The automation feature reduces the dependence on professional draftsmen, so that non-professional technical personnel can easily obtain high-quality technical flowcharts, enhances the convenience and fluency of team collaboration, promotes the efficient dissemination and sharing of technical information within the team, and provides strong and reliable support for technology research and development and project advancement, promoting the entire project process to run more efficiently and accurately, while improving productivity and ensuring project quality and benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application provided below in conjunction with the drawings is not intended to limit the scope of protection of the present application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. The present invention is further described below in conjunction with the drawings.

[0020] like Figure 1 As shown, the present invention specifically relates to a method for generating a technical flowchart based on a large language model to solve the problems of low efficiency and poor accuracy in generating technical flowcharts in the prior art, and specifically includes the following contents:

[0021] S1. Data collection and preprocessing: Collect text data such as technical documents, project requirements, technical specifications, etc. related to the flowchart to be generated, and perform preprocessing operations such as cleaning, denoising, and word segmentation on them to convert them into a format that can be understood by the large language model.

[0022] S2. Model Training and Optimization: Leverage preprocessed text data to train a large language model, enabling it to understand the semantics and logical relationships associated with technical processes. During training, by adjusting model parameters and employing appropriate training algorithms, we continuously optimize the model's performance and improve its ability to accurately and completely understand technical process descriptions.

[0023] S3. Process information extraction: The technical process description of the flowchart to be generated is input into the trained large language model. The model uses natural language processing technology to extract key steps in the technical process, the sequential relationship between steps, conditional judgments, loop structures and other information, and converts this information into a structured data representation.

[0024] S4. Flowchart Drawing: Based on the extracted structured process information, automatically draw a technical flowchart using a graphics drawing library or tool, following predefined graphic symbols and layout rules. During the drawing process, ensure the clarity, accuracy, and aesthetics of the graphics. Also, appropriately label and annotate the elements in the flowchart to enhance its readability.

[0025] S5. Verification and Correction: Verify the generated technical flowchart to check for logical errors, irregular graphics, missing information, and other issues. If any problems are found, the flowchart will be corrected and improved through manual intervention or the feedback mechanism of the large language model to ensure that it meets the actual technical process requirements.

[0026] Furthermore, step S1 includes the following:

[0027] For text cleaning and word segmentation, we use regular expressions to remove noise such as special symbols and combine TF-IDF (term frequency-inverse document frequency) to filter technical terms. The formula is as follows:

[0028]

[0029] Where M is the total number of documents and DF(t) is the number of documents containing term t.

[0030] Furthermore, step S2 includes the following:

[0031] The large language model used in this invention is based on a neural network. Taking the common cross entropy loss function as an example, for a batch containing N training samples, the model's predicted output is y i(i=1,2,…,N), the corresponding true label is t i , then the cross entropy loss function formula is:

[0032]

[0033] Where C represents the total number of categories. By minimizing this loss function, the model parameters θ are updated using stochastic gradient descent (SGD) or other optimization algorithms (such as adaptive learning rate adjustment algorithms such as Adagrad, Adadelta, etc.), as follows:

[0034]

[0035] Among them, α is the learning rate, t is the number of iterations, is the gradient of the loss function L with respect to the parameter θ at the tth iteration.

[0036] Furthermore, the S3 step includes the following:

[0037] The multi-head attention mechanism is used to analyze logical relationships and to capture the dependencies between steps by calculating the output probability of each step. A topological sorting that meets the requirements is then generated by maximizing the probability of the correct step to ensure that the generated step sequence conforms to the logical order and dependencies of the technical process and avoids sequence errors. The output probability is:

[0038] P(y i |y <i ,x)=softmax(v T tanh(W1h i +W2s))

[0039] The probability of selecting each step is calculated by outputting the probability. The relationship between the two is that the pointer network uses the output probability to dynamically select the next step, while being constrained by the topological sorting to ensure the rationality and correctness of the overall process. By maximizing the probability of the correct step, the model can generate a topological sorting that meets the requirements. High and low probabilities indicate compliance with the logical order and the existence of conflicts, respectively. Among them, h i is the encoder hidden state, s is the decoder hidden state, and v, W1, W2 are trainable parameters.

[0040] Furthermore, step S4 includes the following:

[0041] The layout logic of the automatic flowchart generation rules is described by the following constraints:

[0042]

[0043] Furthermore, step S5 includes the following:

[0044] The feedback mechanism based on the large language model uses contrastive learning to generate correction suggestions. The loss function is:

[0045]

[0046] Among them, s p is the positive sample similarity, s n is the negative sample similarity, and τ is the temperature coefficient.

[0047] The foregoing description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Rather, the present invention is capable of various other combinations, modifications, and improvements, and is capable of modifications within the scope of the concepts described herein, through the above teachings, or through techniques or knowledge in the relevant fields. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be within the scope of the appended claims.

Claims

1. A method for generating a technical flowchart based on a large language model, characterized by: The generation method comprises: Step 1: Use the preprocessed text data to train the large speech model, and adjust the model parameters during the training process to continuously optimize the model performance; Step 2: Input the technical process description of the technical flow chart to be generated into the trained large language model. The large language model uses natural language processing technology to extract the key steps, the sequential relationship between steps, conditional judgments, and loop structures in the technical flow chart, and converts this information into a structured data representation; Step 3: Based on the extracted structured process information, use a graphic drawing library or tool to automatically draw a technical flow chart according to predetermined graphic symbols and layout rules, and mark and annotate the elements in the flow chart.

2. The method for generating a technical flowchart based on a large language model according to claim 1, characterized in that: The generation method also includes: verifying the generated technical flow chart to check whether there are logical errors, irregular graphics drawing and missing information. If so, the technical flow chart is corrected and improved using the feedback mechanism of the large language model.

3. The method for generating a technical flowchart based on a large language model according to claim 1, characterized in that: The generation method also includes: collecting text data of technical documents, project requirements and technical specifications related to the flowchart to be generated, and performing pre-processing operations such as cleaning, denoising and word segmentation on the text data to convert it into a format that can be understood by the large language model.

4. The method for generating a technical flowchart based on a large language model according to claim 1, wherein: The second step is to analyze the logical relationship through the multi-head attention mechanism, capture the dependency between the steps by calculating the output probability of each step, and generate the topological sorting required by the symbol by maximizing the probability of the correct step, ensuring that the generated step sequence conforms to the logical order and dependency of the technical process. The output probability is P(y i |y <i ,x)=softmax(v T tanh(W1h i +W2s)), where h i is the encoder hidden state, s is the decoder hidden state, and v, W1, W2 are trainable parameters.

5. A technical flowchart generation system based on a large language model, characterized by: The system includes a model training and optimization module, a process information extraction module and a flow chart drawing module; The model training and optimization module is configured to train the large speech model using the preprocessed text data and adjust the model parameters during the training process to continuously optimize the model performance; The process information extraction module is configured to input the technical process description of the technical process diagram to be generated into the trained large language model. The large language model extracts the key steps, the sequential relationship between the steps, the conditional judgment and the loop structure in the technical process diagram through natural language processing technology, and converts this information into a structured data representation; The flowchart drawing module is configured to automatically draw a technical flowchart based on the extracted structured process information using a graphic drawing library or tool in accordance with predetermined graphic symbols and layout rules, and to mark and annotate the elements in the flowchart.

6. The system for generating a technical flowchart based on a large language model according to claim 5, characterized in that: The system also includes a verification and correction module, which is configured to verify the generated technical flowchart to check whether there are logical errors, irregular graphics drawing and missing information. If so, the technical flowchart is corrected and improved using the feedback mechanism of the large language model.

7. The system for generating a technical flowchart based on a large language model according to claim 5, characterized in that: The system also includes a data collection and preprocessing module, which is configured to collect text data of technical documents, project requirements and technical specifications related to the flowchart to be generated, and perform preprocessing operations such as cleaning, denoising and word segmentation on the data to convert it into a format that can be understood by the large language model.