Flow chart generation method and device, electronic equipment and storage medium
By using pre-trained large language models and planners to generate flow charts, the problem of time-consuming and error-prone designing flow charts is solved, and the automatic generation of flow charts is achieved and efficient and accurate results are achieved.
Patent Information
- Application Number
- CN202411520992.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, manual design flow charts are time-consuming and labor-intensive, prone to errors, and cannot effectively solve this problem.
Use a pre-trained large language model to parse the target document, generate multiple target tasks, and generate a flow chart through a symbolic planner and a neural planner, and finally determine the target flow chart based on the evaluation results.
The automatic generation of flowcharts is realized, reducing manual operation time and cost, improving work efficiency and reducing error rate.
Smart Images

Figure CN119721288A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a flowchart generation method, device, electronic device and storage medium. Background Art
[0002] In the modern information society, flowcharts play a vital role in project management, business process design, system architecture planning and other fields. They help to decompose, analyze and implement various tasks through intuitive graphical representation. However, most of the existing flowchart generation methods rely on manual design or simple rule matching, which is not only time-consuming and labor-intensive, but also prone to errors.
[0003] Therefore, there is an urgent need for a flowchart generation method to solve the problems of manually designed flowcharts, such as being time-consuming, labor-intensive, and error-prone. Summary of the invention
[0004] The present invention provides a flow chart generation method, device, electronic device and storage medium, which are used to solve the defects of manually designing flow charts in the prior art, which are time-consuming, labor-intensive and error-prone.
[0005] The present invention provides a flow chart generating method, comprising the following steps: Use the pre-trained large language model to parse the target document and obtain multiple target tasks; Based on the multiple target tasks, generate corresponding flowcharts; Based on a preset evaluation scheme, the plurality of flow charts are evaluated respectively to obtain evaluation results of the flow charts; Based on the evaluation results of each of the flowcharts, a target flowchart is determined.
[0006] According to a flowchart generation method provided by the present invention, the pre-trained large language model is used to parse the target document to obtain multiple target tasks, including: Using a pre-trained large language model, semantic analysis is performed on the target document to obtain multiple task steps; Performing structured processing on each of the task steps to obtain a corresponding structured task, wherein the structured task includes a complex task and a non-complex task, wherein the complex task is a complex structured task determined based on a preset standard, and the non-complex task is a simple structured task determined based on a preset standard; After each of the complex tasks is decomposed into a plurality of subtasks, the subtasks and the non-complex tasks are used as the target tasks.
[0007] According to a flowchart generation method provided by the present invention, after the target document is parsed using the pre-trained large language model to obtain multiple target tasks, the method further includes: Adjusting decoding parameters of the large language model; Parsing the target document using the adjusted large language model to obtain a plurality of target tasks corresponding to the decoding parameters; Based on the multiple target tasks corresponding to the decoding parameters, a corresponding flowchart is generated.
[0008] According to a flowchart generation method provided by the present invention, generating corresponding flowcharts based on the multiple target tasks includes: Processing the plurality of target tasks using a symbolic planner to obtain a first plan; Processing the plurality of target tasks using a neural planner to obtain a second plan; Determining a target plan based on the first plan and the second plan; Based on the target plan, a flow chart is generated.
[0009] According to a flowchart generation method provided by the present invention, the flowchart is generated based on the target plan, including: Based on the target plan, generating drawing code; Based on the drawing code, the flow chart is drawn using an API interface.
[0010] According to a flowchart generation method provided by the present invention, after determining the target flowchart based on the evaluation results of each flowchart, the method further includes: receiving user feedback on the target flowchart; Based on the feedback and external validation results, the symbolic planner and the neural planner are adjusted.
[0011] The present invention also provides a flow chart generating device, comprising the following modules: The parsing module is used to: parse the target document using a pre-trained large language model to obtain multiple target tasks; A generating module, used to: generate corresponding flow charts based on the multiple target tasks; An evaluation module, used to: evaluate the multiple flow charts respectively based on a preset evaluation scheme, and obtain evaluation results of each of the flow charts; The selection module is used to determine a target flowchart based on the evaluation results of each of the flowcharts.
[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, any of the flowchart generation methods described above is 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 flowchart generation method described in any one of the above is 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 flowchart generating method described in any one of the above is implemented.
[0015] The flowchart generation method, device, electronic device and storage medium provided by the present invention use a pre-trained large language model to parse the target document to obtain multiple target tasks; based on the multiple target tasks, a corresponding flowchart is generated; based on a preset evaluation scheme, multiple flowcharts are evaluated separately to obtain evaluation results of each flowchart; based on the evaluation results of each flowchart, a target flowchart is determined. This solution automatically parses the natural language description document input by the user, extracts key information and performs logical combing and task planning to realize the automatic generation of flowcharts. Compared with traditional manual design methods, it greatly reduces the time and cost of manual operation, improves work efficiency, and is less prone to errors. 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 one of the flowchart diagrams of the flowchart generation method provided by the present invention; Figure 2 This is the second flowchart diagram of the flowchart generation method provided by the present invention; Figure 3 It is a schematic diagram of the use process of the flowchart generation system provided by the present invention; Figure 4 It is a schematic diagram of an example of using the system project management provided by the present invention; Figure 5 This is a schematic diagram of an example of the use of the system business process design provided by the present invention; Figure 6 It is a structural schematic diagram of a flow chart generating device provided by the present invention; Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0018] 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.
[0019] It should be noted that in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. The orientation or position relationship indicated by the terms "upper", "lower" and the like is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be a connection between two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0020] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0021] Combine the following Figure 1-Figure 7 The flowchart generation method, device, electronic device and storage medium provided by the embodiments of the present invention are described.
[0022] Figure 1 It is one of the flowchart diagrams of the flowchart generation method provided by the present invention; Figure 2 This is the second flowchart diagram of the flowchart generation method provided by the present invention; like Figure 1-Figure 2 As shown, the method includes the following: S110, using the pre-trained large language model, parses the target document to obtain multiple target tasks; S120, generating a corresponding flowchart based on the multiple target tasks; S130, based on a preset evaluation scheme, evaluating the multiple flowcharts respectively to obtain evaluation results of the flowcharts; S140, determining a target flowchart based on the evaluation results of each of the flowcharts.
[0023] It should be noted that the execution subject of the flowchart generation method provided in the embodiment of the present invention may be a flowchart generation device, and the flowchart generation device may include but is not limited to: a server, a computer device, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. The execution subject of the flowchart generation method may also be a flowchart generation system, and the flowchart generation system belongs to the flowchart generation device. For ease of understanding, the following embodiments take the flowchart generation system as the execution subject to illustrate the flowchart generation method provided by the present invention.
[0024] It can be understood that the flowchart generation method provided by the present invention can also be applied to architecture diagram generation.
[0025] In S110, the target document is the document based on which the flowchart to be generated is based. For example, when a project schedule diagram needs to be generated, the target document may be a project plan document, and when a business process diagram needs to be generated, the target document may be a business process specification.
[0026] In S130, multiple flow charts are obtained; multi-dimensional evaluation criteria are established, which may include but are not limited to feasibility, efficiency, user preference, etc., to evaluate and screen the generated solutions.
[0027] During the specific implementation process, each flowchart is evaluated based on a preset evaluation scheme to obtain a score / rating corresponding to each flowchart.
[0028] In S140, the best solution is selected, for example, the flowchart with the highest score or the highest rating is selected as the target flowchart.
[0029] Optionally, multiple flowcharts are evaluated and screened according to a preset evaluation scheme, flowcharts that do not meet preset requirements are filtered out, and the remaining flowcharts are used as final target flowcharts.
[0030] The flowchart generation method provided by the embodiment of the present invention uses a pre-trained large language model to parse the target document to obtain multiple target tasks; based on the multiple target tasks, a corresponding flowchart is generated; based on a preset evaluation scheme, multiple flowcharts are evaluated respectively to obtain evaluation results of each flowchart; based on the evaluation results of each flowchart, a target flowchart is determined. This solution automatically parses the natural language description document input by the user, extracts key information, and performs logical combing and task planning to realize the automatic generation of flowcharts. Compared with the traditional manual design method, it greatly reduces the time and cost of manual operation, improves work efficiency, and is less prone to errors.
[0031] In an optional embodiment, the pre-trained large language model is used to parse the target document to obtain multiple target tasks, including: Using a pre-trained large language model, semantic analysis is performed on the target document to obtain multiple task steps; Performing structured processing on each of the task steps to obtain a corresponding structured task, wherein the structured task includes a complex task and a non-complex task, wherein the complex task is a complex structured task determined based on a preset standard, and the non-complex task is a simple structured task determined based on a preset standard; After each of the complex tasks is decomposed into a plurality of subtasks, the subtasks and the non-complex tasks are used as the target tasks.
[0032] In an embodiment of the present invention, a large language model is used to perform semantic analysis on natural language description documents, identify key steps, conditions and decision points, convert the extracted information into structured data for easy subsequent processing, decompose complex tasks into several subtasks, and formulate detailed plans for each subtask.
[0033] Optionally, according to environmental feedback, the detailed planning of each subtask is gradually completed, and the task decomposition and planning strategy is dynamically adjusted. According to environmental feedback, the detailed planning of each subtask is gradually completed, and the task decomposition and planning strategy is dynamically adjusted.
[0034] The flowchart generation method provided in the embodiment of the present invention utilizes a large language model to parse document content, automatically extracts and structures key information, decomposes complex tasks into subtasks, and formulates a specific plan for each subtask. By dynamically adjusting the task decomposition strategy, flexible and efficient task planning is achieved, and a more accurate and reasonable flowchart is generated.
[0035] In an optional embodiment, after the target document is parsed using the pre-trained large language model to obtain multiple target tasks, the method further includes: Adjusting decoding parameters of the large language model; Parsing the target document using the adjusted large language model to obtain a plurality of target tasks corresponding to the decoding parameters; Based on the multiple target tasks corresponding to the decoding parameters, a corresponding flowchart is generated.
[0036] In the embodiment of the present invention, by adjusting the decoding parameters (such as temperature and top-k) of the large language model, a variety of possible flow chart schemes are generated to increase the diversity of the schemes.
[0037] The flowchart generation method provided in the embodiment of the present invention generates a variety of possible flowchart schemes by adjusting the decoding strategy of the large language model, thereby increasing the diversity of the schemes and ensuring that the generated flowchart is accurate and reliable.
[0038] In an optional embodiment, generating a corresponding flowchart based on the multiple target tasks includes: Processing the plurality of target tasks using a symbolic planner to obtain a first plan; Processing the plurality of target tasks using a neural planner to obtain a second plan; Determining a target plan based on the first plan and the second plan; Based on the target plan, a flow chart is generated.
[0039] In the embodiment of the present invention, a symbolic planner is used to formalize the task, generate a symbolic description and use a solver for planning. A neural planner is used to perform efficient planning in a specific field, and the generated plan is combined with symbolic planning for optimization.
[0040] The symbolic planner uses symbolic representation to describe the world state, target conditions, and actions that can be taken, and then finds a series of action sequences from the initial state to the target state. First, the actual problem is converted into a form that the symbolic planner can handle, that is, the state space, available actions, their preconditions and effects, and the target state are defined; then, the symbolic planner uses a search algorithm to explore the state space and find one or more valid paths from the initial state to the target state. In this process, multiple feasible solutions may be encountered, and the planner will select the optimal or most suitable one as the final result.
[0041] The Neural Planner combines deep learning technology and traditional symbolic planning methods to solve planning problems by learning data-driven methods. Traditional symbolic planners rely on explicitly defined states, actions, and goals, while the Neural Planner can automatically build a planning model by learning to extract useful information from raw data. Here, the Neural Planner is built based on a deep learning framework, and the deep learning model architecture can include but is not limited to: recurrent neural networks, convolutional neural networks, reinforcement learning, graph neural networks, etc.
[0042] The flowchart generation method provided by the embodiment of the present invention combines a symbolic planner and a neural planner, and utilizes the efficiency of the symbolic planner and the flexibility of the neural planner to improve the overall planning capability.
[0043] In an optional embodiment, generating a flowchart based on the target plan includes: Based on the target plan, generating drawing code; Based on the drawing code, the flow chart is drawn using an API interface.
[0044] In the embodiment of the present invention, the system automatically generates drawing code (such as Python's Matplotlib, Graphviz, etc.) according to the selected solution, calls external drawing tools, and draws a flowchart or architecture diagram through an API interface.
[0045] The flowchart generation method provided by the embodiment of the present invention realizes efficient flowchart drawing by automatically generating drawing codes.
[0046] In an optional embodiment, after determining the target flowchart based on the evaluation results of each flowchart, the method further includes: receiving user feedback on the target flowchart; Based on the feedback and external validation results, the symbolic planner and the neural planner are adjusted.
[0047] In the embodiment of the present invention, after each flow chart is generated, optimization is performed through self-reflection and external feedback to adjust the planning strategy. Specifically, the system collects user feedback on the generated chart, and adjusts the planning and generation strategy to optimize the flow chart based on the feedback and external verification results (the results of evaluation using an external knowledge base or a third-party evaluation tool).
[0048] The flowchart generation method provided by the embodiment of the present invention introduces a self-reflection and external verification mechanism, which can continuously optimize the generation results through iterative feedback, reduce errors and illusions in the planning process, and use external knowledge bases and tools for verification to ensure that the generated flowchart is accurate and reliable.
[0049] In an optional embodiment, the latest knowledge and historical experience are provided through information retrieval-assisted text generation; the knowledge is embedded in the model parameters through fine-tuning to enhance the model's memory ability. The latest knowledge and common process support are provided through retrieval-augmented generation (RAG) technology and embedded memory methods to enhance the system's knowledge management capabilities.
[0050] In an optional embodiment, an intuitive user interface is designed to facilitate users to input documents, view and adjust the generated flowcharts; collect user feedback and analyze it to continuously optimize system performance. By providing a user-friendly interactive interface, allowing users to input description documents, adjust generation parameters, edit and customize the generated flowcharts, personalized needs are met and the practicality of the system is improved.
[0051] Figure 3 This is a schematic diagram of the use of the flowchart generation system provided by the present invention. Figure 3 , describes in detail the complete usage process from user input description document to generating flowchart.
[0052] The user enters the description document through the interactive interface of the system. The description document can be a project plan, business process description, technical architecture document, etc. The document format can be a common format such as text file, PDF, etc. Specifically, the user uploads or pastes the description document content on the system interface; the user can select some initial setting parameters, such as the flowchart type, the task part to focus on, etc.
[0053] Use a large language model to perform semantic analysis on documents and extract information such as task steps, conditions, and decision points. Convert the extracted information into structured data for subsequent processing.
[0054] According to the document content and structured information, the extracted information is decomposed and planned, complex tasks are decomposed into multiple subtasks, and specific planning steps and execution sequence are formulated for each subtask.
[0055] By adjusting the decoding strategy of the large language model, multiple possible flowchart solutions are generated for users to choose from. The generated solutions are evaluated according to preset evaluation criteria (such as feasibility, efficiency, etc.) and the best solution is selected.
[0056] Automatically generate drawing code (such as Python's Matplotlib, Graphviz, etc.) according to the selected solution. Call external drawing tools to draw flowcharts or architecture diagrams through API interfaces.
[0057] Collect user feedback on the generated graphs; adjust planning and generation strategies based on feedback and external validation results to continuously improve generation results.
[0058] The system uses retrieval-augmented generation (RAG) technology and embedded memory methods to provide the latest knowledge and common process support, improving the system's knowledge management capabilities. Specifically, the system retrieves the latest relevant knowledge in real time during the generation process to assist in graphics generation; using embedded memory, common processes and historical experience are embedded in the model to improve generation quality.
[0059] Users can edit and adjust the generated flowchart through the system interface. Users can save the customized flowchart for subsequent use.
[0060] Figure 4 This is a schematic diagram of an example of using the system project management provided by the present invention. Figure 4 As shown, the user uploads the project plan document; the system parses the document, extracts project tasks and time nodes; task decomposition and planning generate a project task decomposition diagram; the system generates multiple plans and selects the best plan; the project schedule plan is automatically generated and drawn; the user edits and customizes the diagram and saves the final version.
[0061] Figure 5 This is a schematic diagram of an example of the system business process design provided by the present invention. Figure 5 As shown, the user uploads the business process description; the system parses the document, extracts the business process steps and decision points; task decomposition and planning generate a business process decomposition diagram; the system generates multiple solutions and selects the best solution; the business process diagram is automatically generated and drawn; the user edits and customizes the diagram and saves the final version.
[0062] In summary, the flowchart generation method provided by the present invention can automatically parse the natural language description document input by the user, extract key information and perform logical sorting and task planning, so as to realize the automatic generation of flowcharts and architecture diagrams. Compared with the traditional manual design method, it greatly reduces the time and cost of manual operation and improves work efficiency. Through dynamic task decomposition and progressive planning, it can flexibly respond to complex tasks and generate more accurate and reasonable flowcharts. During the generation process, the system combines multiple scheme selection and optimization mechanisms to evaluate and screen the optimal scheme to ensure that the generated flowchart has clear logic and complete steps. It supports multiple input document formats and diverse initial setting parameters, and can dynamically adjust the generation strategy and results according to user needs. Users can also edit and customize the generated flowchart through the interactive interface to meet individual needs. It can meet personalized needs and adapt to different application scenarios; it introduces self-reflection and external verification mechanisms, which can continuously optimize the generation results through iterative feedback, reduce errors and illusions in the planning process, and use external knowledge bases and tools for verification to ensure that the generated flowcharts are accurate and reliable; it can provide the latest knowledge support through retrieval-enhanced generation technology and embedded memory methods, and embed common processes and historical experience into the model to improve the generation effect. The system retrieves relevant knowledge in real time during the generation process to assist the large language model in generating flowcharts that meet current needs; it has designed a user-friendly interactive interface with easy operation. Users can easily upload documents, view and adjust the generated flowcharts, and edit and save the final results. It also provides a detailed feedback mechanism to continuously optimize performance based on user opinions to ensure a good user experience.
[0063] The flowchart generating device provided in the embodiment of the present application is described below. The flowchart generating device described below and the flowchart generating method described above can be referred to each other.
[0064] Figure 6 is a schematic diagram of the structure of the flowchart generating device provided by the present invention, such as Figure 6 As shown, the flow chart generating device may include but is not limited to; The parsing module 610 is used to: parse the target document using a pre-trained large language model to obtain multiple target tasks; A generating module 620 is used to: generate corresponding flow charts based on the multiple target tasks; The evaluation module 630 is used to evaluate the multiple flowcharts respectively based on the preset evaluation scheme to obtain the evaluation results of each of the flowcharts; The selection module 640 is used to determine a target flowchart based on the evaluation results of each of the flowcharts.
[0065] It should be noted that the flowchart generating device provided in the embodiment of the present invention can execute the flowchart generating method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.
[0066] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the flowchart generation method, which includes: using a pre-trained large language model to parse the target document to obtain multiple target tasks; Based on the multiple target tasks, generate corresponding flowcharts; Based on a preset evaluation scheme, the plurality of flow charts are evaluated respectively to obtain evaluation results of the flow charts; Based on the evaluation results of each of the flowcharts, a target flowchart is determined.
[0067] In addition, the logic instructions in the above-mentioned memory 730 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 can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable 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.
[0068] 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 in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the flowchart generation method provided by the above methods, the method includes: using a pre-trained large language model to parse the target document to obtain multiple target tasks; Based on the multiple target tasks, generate corresponding flowcharts; Based on a preset evaluation scheme, the plurality of flow charts are evaluated respectively to obtain evaluation results of the flow charts; Based on the evaluation results of each of the flowcharts, a target flowchart is determined.
[0069] 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 flowchart generation method provided by the above methods, the method comprising: using a pre-trained large language model to parse a target document to obtain multiple target tasks; Based on the multiple target tasks, generate corresponding flowcharts; Based on a preset evaluation scheme, the plurality of flow charts are evaluated respectively to obtain evaluation results of the flow charts; Based on the evaluation results of each of the flowcharts, a target flowchart is determined.
[0070] 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.
[0071] 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.
[0072] 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 generation method, characterized in that: include: Use the pre-trained large language model to parse the target document and obtain multiple target tasks; Based on the multiple target tasks, generate corresponding flowcharts; Based on a preset evaluation scheme, the plurality of flow charts are evaluated respectively to obtain evaluation results of the flow charts; Based on the evaluation results of each of the flowcharts, a target flowchart is determined.
2. The flowchart generation method according to claim 1, characterized in that: The pre-trained large language model is used to parse the target document to obtain multiple target tasks, including: Using a pre-trained large language model, semantic analysis is performed on the target document to obtain multiple task steps; Performing structured processing on each of the task steps to obtain a corresponding structured task, wherein the structured task includes a complex task and a non-complex task, wherein the complex task is a complex structured task determined based on a preset standard, and the non-complex task is a simple structured task determined based on a preset standard; After each of the complex tasks is decomposed into a plurality of subtasks, the subtasks and the non-complex tasks are used as the target tasks.
3. The flowchart generation method according to claim 1, characterized in that: After the target document is parsed using the pre-trained large language model to obtain multiple target tasks, the following step is also included: Adjusting decoding parameters of the large language model; Parsing the target document using the adjusted large language model to obtain a plurality of target tasks corresponding to the decoding parameters; Based on the multiple target tasks corresponding to the decoding parameters, a corresponding flowchart is generated.
4. The flowchart generation method according to any one of claims 1 to 3, characterized in that: The generating a corresponding flowchart based on the multiple target tasks includes: Processing the plurality of target tasks using a symbolic planner to obtain a first plan; Processing the plurality of target tasks using a neural planner to obtain a second plan; Determining a target plan based on the first plan and the second plan; Based on the target plan, a flow chart is generated.
5. The flowchart generation method according to claim 4, characterized in that: The step of generating a flow chart based on the target plan includes: Based on the target plan, generating drawing code; Based on the drawing code, the flow chart is drawn using an API interface.
6. The flowchart generation method according to claim 4, characterized in that: After determining the target flowchart based on the evaluation results of each flowchart, the method further includes: receiving user feedback on the target flowchart; Based on the feedback and external validation results, the symbolic planner and the neural planner are adjusted.
7. A flow chart generating device, characterized in that: include: The parsing module is used to: parse the target document using a pre-trained large language model to obtain multiple target tasks; A generating module, used to: generate corresponding flow charts based on the multiple target tasks; An evaluation module, used to: evaluate the multiple flow charts respectively based on a preset evaluation scheme, and obtain evaluation results of each of the flow charts; The selection module is used to determine a target flowchart based on the evaluation results of each of the flowcharts.
8. 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 flowchart generating method according to any one of claims 1 to 6 is implemented.
9. 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 flowchart generating method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the flowchart generating method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Data updating method and device for agent memory and electronic equipment
CN121560898A