Method and device for generating article containing structured graph based on large model

By generating and constraining structured information based on the outline before the article is generated, the problem that the big model cannot generate structured illustrations is solved, and the application of editable structured pictures in the article is realized to meet users' needs for both pictures and texts.

CN120373266AActive Publication Date: 2025-07-25NANJING YUNCHUANG LARGE DATA TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510863624.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-07-25
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

Existing large models cannot generate structured and editable illustrations corresponding to the content of the document, resulting in users being unable to insert structured illustrations matching the content of the document into the document and edit them.

Method used

Before the article is generated, a large model is used to generate structured information, including node and hierarchical relationships, and is converted into the second structured information through constraints, and finally converted into the source file of the structure diagram editor to realize the visualization and editing of the structured diagram.

Benefits of technology

An editable structured diagram has been generated, and users can adjust the content and form of the diagram according to their needs to achieve the effect of both pictures and texts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373266A_ABST
    Figure CN120373266A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for generating an article containing a structured graph based on a large model, and the method comprises the steps: generating first structured information according to an outline of the article through the large model before the article is generated, and enabling the structured graph corresponding to the first structured information to be at a preset position and a preset type in the article; adopting a first constraint condition to constrain each node and hierarchical structure relationship in the first structured information, so that the first structured information is converted into second structured information; converting the second structured information into a source file of a structure chart editor; and in an article generation process, presenting the structured graph which is generated by utilizing the source file and meets the preset type at the preset position. A user can select, modify, delete and the like contents in the structured graph according to needs, an article with both pictures and texts can be conveniently and quickly obtained, and the technical blank that the structured graph cannot be generated by using a large language model at present is filled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of large model technologies, and particularly to a method and apparatus for generating a graph article containing structured content based on a large model. Background Art

[0002] With the rapid development of large model technologies, it has become common to use large models to generate images. However, the core principle of the images generated by current large models is usually based on generative artificial intelligence technologies, especially the diffusion models that have emerged in recent years. The core idea of the diffusion model is to simulate the process of noise gradually spreading to an image and then reverse denoising to generate the image. Specifically, it includes gradually adding random noise to a real image until it becomes pure noise, and then training the model to gradually remove the noise from the pure noise to restore the original image. When in use, the user provides a text description as input, and the large model uses a pre-trained text encoder to convert the text into a semantic vector. Then, starting from a random noise image, the model gradually predicts and removes the noise based on the semantic vector in multiple time steps. Through multiple-step iteration, a high-resolution image that conforms to the text description is gradually generated.

[0003] When users use documents, they are usually accustomed to inserting structured illustrations corresponding to the document content. Since the images generated by the above methods are usually unstructured and non-editable, it is impossible to insert structured illustrations corresponding to the document content and implement the editing function of the illustrations in products that use existing large models to generate documents. Summary of the Invention

[0004] Embodiments of this application provide a method and apparatus for generating a graph article containing structured content based on a large model, which are used to solve the technical problem in the prior art that it is impossible to generate structured and editable illustrations corresponding to document content using a large model.

[0005] According to one aspect of this application, a method for generating an article containing a structured graph based on a large model is provided, including: Before generating the article, use the large model to generate first structured information, the preset position and preset type of the structured graph corresponding to the first structured information in the article, where the first structured information includes each node and the hierarchical structure relationship between the nodes, and the nodes include text content; Use a first constraint condition to constrain each node and hierarchical structure relationship in the first structured information, so that the first structured information is transformed into second structured information. The first constraint condition includes at least one of the following: the size, position, and shape of the nodes and the connections between the nodes; Convert the second structured information into the source file of a structure diagram editor; During the article generation process, at the preset position, a structured graph generated using the source file and meeting the preset type is presented.

[0006] Furthermore, in the present application, the first structured information generated by the large model according to the outline of the article, the preset position and preset type of the structured graph corresponding to the first structured information in the article include: Input the relevant introduction of the structured graph to the large model; Use the large model to analyze the types of structured graphs matched at different positions in the outline.

[0007] Furthermore, in the present application, inputting the relevant introduction of the structured graph to the large model includes: inputting the name, function, applicable scenario, and example of the structured graph to the large model; After using the large model to analyze the types of structured graphs matched at different positions in the outline, it further includes: Adopt a second constraint condition to constrain the hierarchical structure of the structured graph.

[0008] Furthermore, in the present application, before converting the second structured information into the source file of the structure diagram editor, it further includes: Input the example of the structured graph with a color scheme to the large model; Use the large model to form a color scheme for each node and / or the connection line between nodes in the first structured information according to the example of the color scheme; Add the color scheme to the second structured information.

[0009] Furthermore, in the present application, converting the second structured information into the source file of the structure diagram editor includes: Use prompt engineering to configure examples of the adaptation of the second structured information of various structured graphs to the source file of the structure diagram editor; Use the large model to generate the source file of the structure diagram editor corresponding to the second structured information according to the prompt engineering.

[0010] Furthermore, in the present application, the structure diagram editor is diagrams.net or Visio.

[0011] The second aspect of the present application provides a device for generating an article with a structured graph based on a large model, including: A first generation module, before article generation, uses a large model to generate first structured information, a preset position and a preset type in the article of a structured graph corresponding to the first structured information, wherein the first structured information includes each node and the hierarchical structure relationship between the nodes, and the nodes include text content; A first constraint module, which is used to constrain each node and hierarchical structure relationship in the first structured information by using first constraint conditions, so that the first structured information is transformed into second structured information, and the first constraint conditions include at least one of the following: the size, position, and shape of the nodes and the lines connecting the nodes; A conversion module that converts the second structured information into a source file of a structure diagram editor; A presentation module, which is used to present, during article generation, at the preset position, a structured graph that meets the preset type generated by using the source file.

[0012] In a third aspect of the present application, there is provided an electronic device, including 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 electronic device implements the method described in the first aspect of the present application.

[0013] In a fourth aspect of the present application, there is provided a computer-readable storage medium, which is used to store a computer program. When the computer program runs on a computer, the computer is caused to execute the method described in the first aspect of the present application.

[0014] In a fifth aspect of the present application, there is provided a computer program product, which includes a computer program. When the program product runs on an electronic device, the computer program is used to cause the electronic device to execute the method described in the first aspect of the present application.

[0015] In the embodiments of the present application, before article generation, the content, position, and type of structured information are generated through an outline, and a bridge between the structured information and the visualization is established in a constrained manner. Finally, the structured information is presented at the corresponding position of the article through a structure diagram editor, so as to obtain an article with a structured graph. Users can perform operations such as selection, modification, and deletion on the content in the structured graph according to their needs, which is convenient for quickly obtaining a vivid article with both pictures and texts, filling the technical gap that currently large language models cannot generate articles with structured graphs. Description of the Drawings

[0016] The accompanying drawings, which form a part of this application, are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation of this application. In the drawings: Figure 1 is a flowchart of a method for generating an article containing a structured graph based on a large model according to an embodiment of this application.

[0017] Figure 2 is a schematic diagram of a technical architecture graph generated in an article according to an embodiment of this application.

[0018] Figure 3 is a schematic diagram of an apparatus for generating an article containing a structured graph based on a large model according to an embodiment of this application.

[0019] Figure 4 is a schematic diagram of an electronic device according to an embodiment of this application. Detailed implementation manners

[0020] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments may be combined with each other. The following will refer to the accompanying drawings and combine with the embodiments to detail this application.

[0021] It should be noted that the steps shown in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than here.

[0022] Embodiments of the present invention are based on the defect that generated pictures in the prior art cannot be edited, and provide a method for generating an article containing a structured graph based on a large model. The structured graph generated in this embodiment is generated along with the generation of the article by the large language model. This method can finally output an article containing a structured graph, and the content in the structured graph matches the content of the article near the structured graph. For example, the content of the structured graph matches the paragraph above the position where the structured graph is located, or the content of the structured graph matches the paragraph below the position where the structured graph is located. The structured graph generated in this embodiment is editable. Therefore, the user can adjust the content and form of the structured graph according to needs. For example, change the content of the text in the structured graph, change the level and hierarchical relationship and quantity of the structured graph, change the border form and size of the nodes in the structured graph, change the form of the connection lines between the nodes in the structured graph, etc., and can also perform operations such as deleting the structured graph and adding new structured graphs. This type of article is illustrated with pictures and texts and is suitable for various styles.

[0023] In order to make the structure of the article more in line with the user's requirements, in this embodiment, when using the large model to generate an article, an outline of the article will be generated first for the user to adjust and confirm, and then the process of generating the article in this embodiment will be executed for the confirmed outline.

[0024] In an embodiment of the present invention, a user wants to use the method of this embodiment to generate an article introducing a project for an "XX Intelligent Q&A Project" that can provide intelligent Q&A.

[0025] First, the user creates a knowledge base about the "XX Intelligent Q&A Project" in the large model, and there are various materials about the project in the knowledge base.

[0026] Then, the user interacts with the large model and issues an instruction to let the large model output an article introducing the "XX Intelligent Q&A Project".

[0027] At this time, the large model first feeds back the following article outline to the user according to the materials in the knowledge base: 1. Project implementation scope 1.1 Project background and objectives 1.1.1 Project implementation background 1.1.2 Project objectives and expected outcomes 1.1.3 Overview of project implementation scope 1.2 Intelligent Q&A module 1.2.1 Module function introduction 1.2.2 Application scenarios and advantages 1.3 Knowledge base import module 1.3.1 Module function overview 1.3.2 Data import process 1.3.3 Knowledge base management and maintenance 1.4 Document writing module 1.4.1 Module function introduction 1.4.2 Writing process and specifications 1.4.3 Document format and style 1.4.4 Writing tools and resources 2. Project implementation content 2.1 Intelligent Q&A module design 2.1.1 Module architecture design 2.1.2 Key technology implementation 2.2 Knowledge base import process 2.2.1 Preparation before import 2.2.2 Data format conversion 2.2.3 Data import steps 2.2.4 Verification after Import 2.3 Document Writing Specifications 2.3.1 Writing Principles and Requirements 2.3.2 Document Structure and Format 2.3.3 Writing Process and Steps 2.3.4 Review and Release Process Next, the user modifies the above article outline and then confirms it or directly confirms and feedbacks it to the large model.

[0028] After receiving the confirmed article outline from the user, the large model starts to execute the article generation process as follows.

[0029] As Figure 1 shown, it is a schematic flowchart of a method for generating an article containing a structured diagram based on a large model in this embodiment. It can be Figure 1 seen that the method includes the following steps: Step S102: Before article generation, use the large model to generate first structured information according to the article outline, the preset position and preset type of the structured diagram corresponding to the first structured information in the article. Among them, the first structured information includes the hierarchical structure relationship between each node and the nodes, and the nodes include text content.

[0030] In the prior art, a structured diagram is also called a diagram, which is drawn depending on structured content. The structured content is generally tree-shaped, and in a few cases, it is a directed graph, such as a flowchart.

[0031] There are many types of structured diagrams. In the embodiments of the present invention, the relevant information of various structured diagrams is pre-input to the large model for it to learn. When inputting, specifically, the name, function, applicable scenario, and example of the structured diagram are input to the large model to facilitate later use of the large model to analyze the types of structured diagrams matched at different positions in the article outline.

[0032] In this embodiment, the structured diagrams include the following types: Functional Composition Diagram, Technical Architecture Diagram, Mind Map, Class Diagram, State Diagram, Pie Chart, Entity Relationship Diagram, Gantt Chart, Flowchart, Kanban Chart, XY Chart, Quadrant Chart.

[0033] The function and applicable occasion of each specific diagram are introduced as follows: Functional Composition Diagram (Functional Decomposition Diagram) Function: Hierarchically display how a system or complex thing is composed of multiple smaller functional modules.

[0034] Applicable occasions: When the text describes a whole being decomposed into multiple parts, and there are clear subordinate or inclusion relationships between these parts, emphasizing the structure and composition.

[0035] Technical Architecture Diagram Function: To show the various components (such as servers, databases, APIs, etc.) that make up a technical system and the connection and interaction methods between them.

[0036] Applicable occasions: When the text describes the technical implementation details of a software, hardware, or network system, including which technical components are used and how they work together.

[0037] Mind Map Function: Around a central theme, radiate out related ideas, concepts, or information points.

[0038] Applicable occasions: When the text expands around a core concept, listing its multiple aspects of characteristics, sub-themes, related ideas, or making a brainstorming list.

[0039] Class Diagram Function: In object-oriented design, to describe the classes (abstractions of things) in the system, their attributes (characteristics), methods (behaviors), and the static relationships between classes (such as inheritance, association).

[0040] Applicable occasions: When the text describes some clear "objects" or "concepts", and explains their characteristics, what they can do, and the inherent, structural connections between them (for example: "Employee" is a type of "Person", "Order" contains "Goods").

[0041] State Machine Diagram Function: To describe the various different states that an object or system experiences during its life cycle, and the events or conditions that cause state changes.

[0042] Applicable occasions: When the text describes that something (such as an order, a user account) will go through different stages or states, and there are clear triggering conditions to cause it to migrate from one state to another.

[0043] Pie Chart Function: To show the percentage or proportion of each part in the whole.

[0044] Applicable scenarios: When the text provides a set of categorical data that together form a whole, and the focus is on showing the contribution share of each category relative to the total (e.g., market share distribution, budget composition).

[0045] Entity Relationship Diagram Function: Show the main "entities" (such as people, things, concepts) in a data model and their interrelationships.

[0046] Applicable scenarios: When the text describes different types of information (entities) that need to be stored and managed and explains how these information types are related (e.g., "A customer can have multiple orders, and an order belongs to only one customer").

[0047] Gantt Chart Function: Based on the time axis, show the start and end times, durations, and dependencies of various tasks in a project.

[0048] Applicable scenarios: When the text describes a project plan that includes multiple tasks and mentions the planned start time, end time, duration, or sequence of these tasks.

[0049] Flowchart Function: Use standard graphic symbols and arrows to represent the step sequence and decision points of a process, workflow, or algorithm.

[0050] Applicable scenarios: When the text describes a series of operation steps in sequence, especially when it contains conditional judgments (if... then... else...) and branching logic.

[0051] Kanban Board Function: Visually show the flow and status of work tasks at different stages in the workflow (such as "to do", "in progress", "completed").

[0052] Applicable scenarios: When the text describes how tasks or work items transfer between different processing stages, emphasizing workflow management and status tracking (e.g., task kanban in agile development).

[0053] XY Plot Function: Show the relationship between two sets of numerical variables (scatter plot) or the trend of one variable changing with another continuous variable (usually time) (line chart).

[0054] Applicable scenarios: When the text provides paired numerical data and intends to analyze whether there is a certain correlation between them.

[0055] Quadrant Chart Function: Divide things or concepts into four quadrants through two different evaluation dimensions (axes).

[0056] Applicable occasions: When text analyzes or classifies things based on two main criteria or factors, forming a 2x2 classification framework (for example, classifying tasks according to "importance" and "urgency").

[0057] When inputting, for each structured diagram, refer to the prior art for examples of various structured diagrams as above, and no specific display is made here.

[0058] When inputting, according to the characteristics of each structured diagram, use the second constraint condition to constrain the hierarchical structure of the structured diagram, mainly including the upper and lower limits of the number of levels, and the upper and lower limits of the number of nodes in each level. The specific numerical values of the upper and lower limits are related to different types of diagrams. In this way, the form of the generated diagram can conform to the convention. For example, the lower limit of the number of levels of the technical architecture diagram is 2 levels, the upper limit is 5 levels, the lower limit of the number of nodes in each level is 1, and the upper limit is 10.

[0059] In the embodiment of the "XX Intelligent Q&A Project", as Figure 2 shown is the technical architecture diagram generated according to the outline at the "2.1.1 Module Architecture Design" section. Taking this diagram as an example, before generating this diagram, in step S102, the corresponding first structured information example generated is as follows (shown in JSON format): { "name": "Intelligent Q&A Module Design", "description": "", "type": "Root", "parent": "", "children": { "name": "Application Layer", "description": "", "type": "Layer", "parent": "Intelligent Q&A Module Design", "children": { "name": "User Interaction Interface", "description": "", "type": "Instance", "parent": "Application layer", "children": [] }, { "name": "API interface", "description": "", "type": "Instance", "parent": "Application layer", "children": [] } }, { "name": "Service layer", "description": "", "type": "Layer", "parent": "Intelligent Q&A module design", "children": { "name": "Natural language processing engine", "description": "", "type": "Instance", "parent": "Service layer", "children": [] }, { "name": "Knowledge retrieval service", "description": "", "type": "Instance", "parent": "Service layer", "children": [] }, { "name": "Question and answer generation model", "description": "", "type": "Instance", "parent": "Service layer", "children": [] }, { ​"name": "Semantic Understanding Module", "description": "", "type": "Instance", "parent": "Service Layer", "children": [] } }, { "name": "Infrastructure Layer", "description": "", "type": "Layer", "parent": "Intelligent Q&A Module Design", "children": { "name": "Database Service", "description": "", "type": "Instance", "parent": "Infrastructure Layer", "children": [] }, { "name": "Computing Resources", "description": "", "type": "Instance", "parent": "Infrastructure Layer", "children": [] }, { "name": "Storage Resources", "description": "", "type": "Instance", "parent": "Infrastructure Layer", "children": [] } }, { "name": "Data Layer", "description": "", ​​"type": "Layer", "parent": "Intelligent Q&A Module Design", "children": { "name": "Knowledge Base", "description": "", "type": "Instance", "parent": "Data Layer", "children": [] }, { "name": "Q&A History Record", "description": "", "type": "Instance", "parent": "Data Layer", "children": [] } } } The above first structured information stipulates the parent-child relationships between nodes and the content of each node, laying a data structure foundation for construction. However, only with the above first structured information, it is still impossible to obtain Figure 2 , therefore, the following steps are further implemented in this embodiment: Figure 2 Step S104: Use the first constraint condition to constrain each node and hierarchical structure relationship in the first structured information, so that the first structured information is transformed into the second structured information. The first constraint condition includes at least one of the following: the size, position, and shape of the nodes and the connections between nodes. Specifically, for each type of graph, there is a corresponding implementation logic. Taking the technical architecture graph shown in

[0060] as an example, it is specifically implemented through the following logic: Figure 2 First, construct logical constraints, and analyze the technical architecture graph to obtain a hierarchical structure and its specific hierarchical relationships according to the first structured information. First, construct logical constraints, and analyze the technical architecture graph to obtain a hierarchical structure and its specific hierarchical relationships according to the first structured information.

[0061] Then, select a pre-reserved template of the technical architecture graph, and determine the width and form of each sub-module according to the number and content of sub-modules in each layer. For example, when there is a three-layer structure, determine the arrangement direction and form of each sub-module according to the number of sub-modules and the number of words in the sub-module, such as horizontal arrangement, vertical arrangement, or rectangular arrangement.​​

[0062] Next, based on the above results, determine the width and height of the top-level module, as well as the spacing between sub-modules so that the sub-modules are evenly distributed.

[0063] Finally, add specific components to each module according to the template. In some preferred embodiments, coloring may also be required when necessary.

[0064] Taking again Figure 3 the functional composition diagram shown as an example, the implementation logic corresponding to the functional composition diagram in step S104 is as follows: First, construct logical constraints. According to the analysis of the first structured information, it is obtained that the functional composition diagram is a classic tree structure, without color matching, and the hierarchical structure relationship it has is obtained.

[0065] Then, determine the width and spacing of each node, including: leaf nodes need to be vertical text, other nodes need to be horizontal text, the widths of leaf nodes need to be consistent, the spacings of leaf nodes need to be consistent, the widths of other nodes need to take into account their leaf nodes, the spacings of other nodes need to be balanced, and all nodes need to take into account the text length.

[0066] Finally, construct the connection arrows between the related nodes in the tree structure, including the start and end positions, line shapes, arrow styles, etc. of the arrows.

[0067] After the above processing, the second structured information contains the necessary conditions for visualizing the first structured information: namely, the size, position, shape, and color of each node and the connection lines between nodes.

[0068] The above color matching scheme can be directly agreed in the logic. For example, agree on the RGB values of the colors of a specific chart type, and agree on the color differences between different nodes, etc., so that a relatively unified style is available when generating pictures.

[0069] In some preferred embodiments, the color matching scheme can also be realized by automatic color matching of the large model, and it is necessary to execute before converting the second structured information into the source file of the structure diagram editor: Input an example of a structured diagram with a color matching scheme to the large model; Use the large model to form a color matching scheme for each node and / or the connection lines between nodes in the first structured information according to the example of the color matching scheme.

[0070] In some preferred embodiments, the conversion of the second structured information into the source file of the structure diagram editor includes: Use prompt engineering to configure examples of the adaptation of the second structured information of various structured diagrams to the source file of the structure diagram editor; Using a large model, generate the source file of the structure diagram editor corresponding to the second structured information according to the prompt engineering.

[0071] All the content that should be included in the visualization charts is already in the second structured information. Therefore, perform step S106, that is, convert the second structured information into the source file of the structure diagram editor. In this embodiment, the structure diagram editor is diagrams.net or Visio.

[0072] Finally, perform step S108, that is, during the article generation process, at the preset position, present the structured diagram that meets the preset type generated using the source file. The generated diagram visualizes all the information in the source file of the structure diagram editor. Figure 2 For example, at the corresponding position of "2.1.1 Module Architecture Design", present an effect as Figure 2 shown.

[0073] Based on the same inventive concept as the above method embodiment, the embodiment of the present application also provides a device for generating an article with a structured diagram based on a large model, as Figure 3 shown. The device includes: A first generation module, used to generate, before article generation, the first structured information, the preset position and preset type of the structured diagram corresponding to the first structured information in the article using a large model. Among them, the first structured information includes each node and the hierarchical structure relationship between the nodes, and the node includes the corresponding text content; A first constraint module, used to constrain each node and hierarchical structure relationship in the first structured information using the first constraint condition, so that the first structured information is transformed into the second structured information. The first constraint condition includes at least one of the following: the size, position, and shape of the nodes and the connections between the nodes; A conversion module, used to convert the second structured information into the source file of the structure diagram editor; A presentation module, used to present, during the article generation process, at the preset position, the structured diagram that meets the preset type generated using the source file.

[0074] It should be noted that although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more of the above-mentioned units can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0075] Based on the same inventive concept as the above method embodiments, an electronic device is further provided in an embodiment of the present application, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the control method in the above embodiments.

[0076] In one embodiment, the electronic device may be a server. In this embodiment, the structure of the electronic device may be as Figure 3 shown, including a memory 2001, a communication module 2003, and one or more processors 2002.

[0077] The memory 2001 is used to store the computer program executed by the processor 2002. The memory 2001 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system and programs required to run the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0078] The memory 2001 may be a volatile memory, such as a random-access memory (RAM); the memory 2001 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or the memory 2001 is any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2001 may be a combination of the above memories.

[0079] The processor 2002 may include one or more central processing units (CPUs) or be a digital processing unit, etc. The processor 2002 is used to implement the above audio data processing method when calling the computer program stored in the memory 2001.

[0080] The communication module 2003 is used to communicate with terminal devices and other servers.

[0081] In the embodiments of the present application, the specific connection medium between the above memory 2001, communication module 2003, and processor 2002 is not limited. In the embodiments of the present application Figure 4 it is connected between the memory 2001 and the processor 2002 through a bus 2004, and the bus 2004 is in Figure 4It is described by an arrow in the middle. The connection manners between other components are only for illustrative purposes and are not restrictive. The bus 2004 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Figure 4 it is only described by one arrow in the middle, but it does not describe that there is only one bus or one type of bus.

[0082] Based on the same inventive concept as the above method embodiments, the embodiments of the present invention further provide a computer-readable storage medium, which is used to store a computer program. When the computer program runs on a computer, the electronic device is enabled to implement the control method in the above embodiments. The computer-readable storage medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0083] Based on the same inventive concept as the above method embodiments, the embodiments of the present invention further provide a computer program product, which includes a computer program. When the program product runs on an electronic device, the computer program is used to enable the electronic device to execute the steps in the control method according to various exemplary embodiments described above in this specification. The program product may adopt any combination of one or more readable media. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in Figure 1 one process or multiple processes and / or Figure 1 one block or multiple blocks.

[0084] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

Claims

1. A method for generating an article containing a structured graph based on a large model, characterized in that, Including: Before article generation, use a large model to generate first structured information according to the outline of the article, the preset position and preset type of the structured diagram corresponding to the first structured information in the article. Wherein, the first structured information includes each node and the hierarchical structure relationship between the nodes, and the nodes include text content; Use the first constraint condition to constrain each node and hierarchical structure relationship in the first structured information, so that the first structured information is transformed into second structured information. The first constraint condition includes at least one of the following: the size, position, and shape of the nodes and the connections between the nodes; Convert the second structured information into the source file of a structure diagram editor; During article generation, at the preset position, present the structured diagram that meets the preset type generated using the source file.

2. The method according to claim 1, wherein The step of using a large model to generate first structured information according to the outline of the article, the preset position and preset type of the structured diagram corresponding to the first structured information in the article includes: Input the relevant introduction of the structured diagram to the large model; Use the large model to analyze the types of structured diagrams matched at different positions in the outline.

3. The method according to claim 2, wherein The step of inputting the relevant introduction of the structured diagram to the large model includes: inputting the name, function, applicable scenario, and example of the structured diagram to the large model; After using the large model to analyze the types of structured diagrams matched at different positions in the outline, it further includes: Use the second constraint condition to constrain the hierarchical structure of the structured diagram.

4. The method according to claim 1, wherein Before converting the second structured information into the source file of a structure diagram editor, it further includes: Input the example of the structured diagram with a color scheme to the large model; Use the large model to form a color scheme for each node and / or the connections between the nodes in the first structured information according to the example of the color scheme; Add the color scheme to the second structured information.

5. The method according to any one of claims 1 to 4, characterized in that, The step of converting the second structured information into the source file of a structure diagram editor includes: Use prompt engineering to configure examples of the adaptation of the second structured information of various structured diagrams to the source file of the structure diagram editor; Use the large model to generate the source file of the structure diagram editor corresponding to the second structured information according to the prompt engineering.

6. The method according to claim 1, characterized in that, The structure diagram editor is diagrams.net or Visio.

7. An apparatus for generating an article with a structured graph based on a large model, characterized in that, Including: A first generation module, used before article generation, to use a large model to generate first structured information according to the outline of the article, the preset position and preset type of the structured diagram corresponding to the first structured information in the article. Wherein, the structured information includes each node and the hierarchical structure relationship between the nodes, and the nodes include the corresponding text content; A first constraint module, used to use the first constraint condition to constrain each node and hierarchical structure relationship in the first structured information, so that the first structured information is transformed into second structured information. The first constraint condition includes at least one of the following: the size, position, and shape of the nodes and the connections between the nodes; A conversion module that converts the second structured information into a source file of a structure diagram editor; A presentation module for presenting, during the article generation process, at the preset position, a structured diagram that meets the preset type and is generated using the source file.

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 electronic device implements the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, and when the computer program runs on a computer, the computer executes the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program, and when the program product runs on an electronic device, the computer program is used to cause the electronic device to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for generating structured document guide view

    CN102902697A

  • Chart generation method and device, equipment and storage medium

    CN117574868A

  • Flow chart drawing method and system, computer readable storage medium and terminal

    CN117707536A

  • Method and device for generating description document

    CN118132142A

  • Information graph generation method, device and equipment and readable storage medium

    CN119378524A