Method and device for generating articles containing structured graphs based on large models
By generating structured information in the large model and utilizing constraints, the problem of large models generating uneditable illustrations is solved, and the editability of structured diagrams and their matching with article content are achieved, which is suitable for articles of various styles.
Patent Information
- Application Number
- CN202510863624.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-06-26
AI Technical Summary
In the prior art, images generated by large models are usually unstructured and non-editable. It is impossible to insert structured illustrations corresponding to the document content into the document, and the editing function of the illustrations cannot be realized.
By using a large model to generate structured information according to the outline before the article is generated, including nodes and hierarchical relationships, and using constraints to convert it into an editable structured diagram, it is presented in the article using a structure diagram editor, supporting users to adjust the content and form of the diagram.
The generated structured diagram matches the article content and is editable. Users can modify the content and form of the diagram as needed to achieve a comprehensive effect of both text and graphics.
Smart Images

Figure CN120373266B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of large model technology, and in particular to a method and device for generating structured graph articles based on a large model. Background Art
[0002] With the rapid development of large-scale model technology, using large models to generate images has become commonplace. However, the core principles of large-scale model generation are generally based on generative artificial intelligence technology, especially the diffusion model that has emerged in recent years. The core idea of the diffusion model is to simulate the gradual diffusion of noise into an image and then reversely remove the noise to generate the image. Specifically, random noise is gradually added to a real image until it becomes pure noise. The model is then trained to gradually remove the noise from the pure noise and restore the original image. When using it, the user provides a text description as input. The large model uses a pre-trained text encoder to convert the text into a semantic vector. Then, starting with a random noise image, the model gradually predicts and removes the noise based on the semantic vector over multiple time steps. Through multiple iterations, it gradually generates a high-resolution image that matches the text description.
[0003] When using documents, users are usually accustomed to inserting structured illustrations corresponding to the document content into the documents. Since the images generated by the above method 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] The embodiments of the present application provide a method and device for generating an article containing structured graphics based on a large model, which is used to solve the technical problem in the prior art that a large model cannot be used to generate structured and editable illustrations corresponding to the document content.
[0005] According to one aspect of the present application, a method for generating an article containing a structured graph based on a large model is provided, comprising:
[0006] Before the article is generated, the macro model is used to generate first structured information based on the outline of the article, and a preset position and preset type of a structured graph corresponding to the first structured information in the article, wherein the first structured information includes hierarchical relationships between nodes, and the nodes include text content;
[0007] Using first constraints to constrain each node and hierarchical relationship in the first structured information so that the first structured information is converted into second structured information, the first constraints including at least one of the following: size, position, and shape of nodes and lines between nodes;
[0008] converting the second structural information into a source file of a structure diagram editor;
[0009] During the article generation process, a structured graph that meets the preset category and is generated using the source file is presented at the preset position.
[0010] Furthermore, in the present application, the use of the large model to generate the first structured information according to the outline of the article, and the preset position and preset type of the structured graph corresponding to the first structured information in the article include:
[0011] Input the relevant introduction of the structured graph into the big model;
[0012] The large model is used to analyze the types of structured graphs that match different positions in the outline.
[0013] Furthermore, in the present application, the inputting of the relevant introduction of the structured graph into the macro model includes: inputting the name, function, applicable scenario, and example of the structured graph into the macro model;
[0014] The method of using the large model to analyze the types of structured graphs matched at different positions in the outline further includes:
[0015] A second constraint is employed to constrain the hierarchical structure of the structured graph.
[0016] Furthermore, in the present application, the step of converting the second structured information into a source file of a structure diagram editor may also include:
[0017] Input examples of structured graphs with color schemes to the big model;
[0018] Using the large model, forming a color scheme for each node and / or a connection between nodes in the first structured information according to the example of the color scheme;
[0019] The color scheme is added to the second structured information.
[0020] Furthermore, in the present application, converting the second structured information into a source file of a structure diagram editor includes:
[0021] An example of using a prompt word project to configure the second structured information of various structured diagrams and adapting it to the source file of a structure diagram editor;
[0022] A source file of a structure diagram editor corresponding to the second structured information is generated by using a large model according to the prompt word project.
[0023] Furthermore, in this application, the structure diagram editor is diagrams.net or Visio.
[0024] A second aspect of the present application provides an apparatus for generating an article with a structured graph based on a large model, comprising:
[0025] A first generation module, before generating an article, uses a large model to generate first structured information based on the outline of the article, and a preset position and preset type of a structured graph corresponding to the first structured information in the article, wherein the first structured information includes hierarchical relationships between nodes, and the nodes include text content;
[0026] a first constraint module, configured to constrain each node and hierarchical structure relationship in the first structured information using a first constraint condition, so as to convert the first structured information into second structured information, wherein the first constraint condition includes at least one of the following: size, position, and shape of nodes and lines between nodes;
[0027] A conversion module, converting the second structured information into a source file of a structure diagram editor;
[0028] The presentation module is used to present, at the preset position during the article generation process, a structured graph generated by using the source file and meeting the preset category.
[0029] The third aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method described in the first aspect of the present application.
[0030] The fourth aspect of the present application provides a computer-readable storage medium, which is used to store a computer program. When the computer program is run on a computer, the computer executes the method described in the first aspect of the present application.
[0031] According to a fifth aspect of the present application, a computer program product is provided, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the method described in the first aspect of the present application.
[0032] In this embodiment of the present application, the content, location, and type of structured information are generated through an outline before the article is generated. Constraints are used to establish a bridge between the structured information and the new visualization model. Finally, the structured information is presented at the corresponding position in the article through a structured graph editor, thereby obtaining an article with a structured graph. Users can select, modify, and delete the content in the structured graph as needed, making it easy to quickly obtain an article with both text and images. This fills the current technical gap in the inability to generate structured graphs using large language models. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0034] Figure 1 It is a flowchart of a method for generating an article containing a structured graph based on a large model according to an embodiment of the present application.
[0035] Figure 2 This is a schematic diagram of a technical architecture diagram generated in the article according to an embodiment of the present application.
[0036] Figure 3 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 the present application.
[0037] Figure 4 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0038] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0039] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] The embodiment of the present invention is based on the defect that the generative images in the prior art cannot be edited, and provides a method for generating articles containing structured graphs based on a large model. The structured graph generated by this embodiment is generated as the large language model generates the article. The method can eventually output an article containing a structured graph, and the content of 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 location of the structured graph, or the content of the structured graph matches the paragraph below the location of the structured graph. The structured graph generated by this embodiment is editable, so the user can adjust the content and form of the structured graph as needed, for example, change the content of the structured graph text, change the hierarchy and hierarchical relationship and number of the structured graph, change the border form and size of the nodes in the structured graph, change the form of the lines between the nodes in the structured graph, etc., and can also delete the structured graph, add a new structured graph, etc. This type of article is rich in pictures and text, and is suitable for a variety of styles.
[0041] In order to make the structure of the article more in line with the user's requirements, in this embodiment, when using a large model to generate an article, an outline of the article will be generated for the user to adjust and confirm, and then the process of generating the article in this embodiment will be executed based on the confirmed outline.
[0042] 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 question and answer project" that can provide intelligent questions and answers.
[0043] First, the user established a knowledge base about the "XX Intelligent Question and Answer Project" in the big model, which contains various materials about the project.
[0044] Then, the user interacts with the big model and instructs it to output a project introduction article about the "XX Intelligent Question Answering Project".
[0045] At this point, the large model first feeds back to the user the article outline based on the information in the knowledge base as follows:
[0046] 1. Project Scope
[0047] 1.1 Project Background and Objectives
[0048] 1.1.1 Project Implementation Background
[0049] 1.1.2 Project Objectives and Expected Outcomes
[0050] 1.1.3 Overview of Project Implementation Scope
[0051] 1.2 Intelligent Question and Answer Module
[0052] 1.2.1 Module Function Introduction
[0053] 1.2.2 Application Scenarios and Advantages
[0054] 1.3 Knowledge Base Import Module
[0055] 1.3.1 Module Function Overview
[0056] 1.3.2 Data Import Process
[0057] 1.3.3 Knowledge Base Management and Maintenance
[0058] 1.4 Document Writing Module
[0059] 1.4.1 Module Function Introduction
[0060] 1.4.2 Writing Process and Specifications
[0061] 1.4.3 Document Format and Style
[0062] 1.4.4 Writing Tools and Resources
[0063] 2. Project Implementation Content
[0064] 2.1 Intelligent Question and Answer Module Design
[0065] 2.1.1 Module Architecture Design
[0066] 2.1.2 Implementation of key technologies
[0067] 2.2 Knowledge Base Import Process
[0068] 2.2.1 Preparation before importing
[0069] 2.2.2 Data Format Conversion
[0070] 2.2.3 Data import steps
[0071] 2.2.4 Verification after import
[0072] 2.3 Documentation Standards
[0073] 2.3.1 Writing principles and requirements
[0074] 2.3.2 Document structure and format
[0075] 2.3.3 Writing Process and Steps
[0076] 2.3.4 Review and Release Process
[0077] Next, the user modifies the above article outline and confirms it or directly confirms it and feeds it back to the big model.
[0078] After receiving the article outline confirmed by the user, the large model starts to execute the article generation process as follows.
[0079] like Figure 1 As shown in FIG. 1 , a flow chart of a method for generating an article containing a structured graph based on a large model in this embodiment is shown. Figure 1 It can be seen that the method comprises the following steps:
[0080] Step S102: Before the article is generated, a large model is used to generate first structured information according to the outline of the article, and a preset position and preset type of a structured graph corresponding to the first structured information in the article, wherein the first structured information includes a hierarchical relationship between each node and the nodes, and the nodes include text content.
[0081] In the prior art, a structured graph is also called a diagram, which is drawn based on structured content. The structured content is generally in the form of a tree, and in a few cases is a directed graph, such as a flow chart.
[0082] There are many types of structured graphs. In an embodiment of the present invention, relevant information of various structured graphs is pre-input into the big model so that it can learn it. When inputting, the name, function, applicable scenario, and example of the structured graph are specifically input into the big model, which facilitates the use of the big model to analyze the types of structured graphs matching different positions in the article outline later.
[0083] In this embodiment, the structured graphs include the following types:
[0084] Functional composition diagram, technical architecture diagram, mind map, class diagram, state diagram, pie chart, entity relationship diagram, Gantt chart, flow chart, Kanban diagram, XY diagram, quadrant diagram.
[0085] The specific functions and applicable occasions of each diagram are introduced as follows:
[0086] Functional Decomposition Diagram
[0087] Functionality: Hierarchically demonstrates how a system or complex thing is composed of multiple smaller functional modules.
[0088] Applicable occasions: When the text describes a whole being broken down into multiple parts, and there is a clear subordinate or inclusive relationship between these parts, emphasizing structure and composition.
[0089] Technical Architecture Diagram
[0090] Functionality: Shows the various components that make up a technical system (such as servers, databases, APIs, etc.) and how they connect and interact with each other.
[0091] Applicable when: 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.
[0092] Mind Map
[0093] Function: Radiate related ideas, concepts or information points around a central theme.
[0094] Suitable for: When the text revolves around a core concept and lists its multiple aspects, sub-topics, related ideas, or brainstorming.
[0095] Class Diagram
[0096] Function: In object-oriented design, it describes the classes (abstract things) in the system, their attributes (features), methods (behaviors), and static relationships between classes (such as inheritance and association).
[0097] Applicable when: When the text describes some clear "objects" or "concepts", and explains their characteristics, what they can do, and the inherent and structural connections between them (for example: "employee" is a kind of "person", "order" contains "goods").
[0098] State Machine Diagram
[0099] Function: Describes the various states that an object or system goes through during its life cycle, as well as the events or conditions that cause state changes.
[0100] Suitable for: When the text describes something (such as an order or user account) that goes through different stages or states, and there are clear triggers to make it move from one state to another.
[0101] Pie Chart
[0102] Function: Displays the percentage or proportion of each part to the whole.
[0103] When to use: When the text provides a set of categorical data that together form a whole, and the focus is on showing the contribution of each category to the total (e.g., market share distribution, budget composition).
[0104] Entity Relationship Diagram
[0105] Function: Display the main "entities" (such as people, objects, concepts) in the data model and the relationships between them.
[0106] When to use: When describing different types of information (entities) that need to be stored and managed, and explaining how these types of information are related to each other (for example: "a customer can have multiple orders, and an order belongs to only one customer").
[0107] Gantt Chart
[0108] Function: Based on the timeline, it shows the start and end time, duration and dependencies of each task in the project.
[0109] Applicable occasions: 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.
[0110] Flowchart
[0111] Function: Use standard graphical symbols and arrows to represent the sequence of steps and decision points in a process, workflow, or algorithm.
[0112] When to use: When the text describes a series of steps in sequence, especially when it contains conditional judgments (if...then...else...) and branching logic.
[0113] Kanban Board
[0114] Function: Visually display the flow and status of work tasks at different stages in the workflow (such as "to be done", "in progress", and "completed").
[0115] When to use: When describing how tasks or work items are transferred between different processing stages, emphasizing workflow management and status tracking (for example, task boards in agile development).
[0116] XY Plot
[0117] 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).
[0118] Applicable occasions: When the text provides paired numerical data and the intention is to analyze whether there is a certain correlation between them.
[0119] Quadrant Chart
[0120] Function: Divide things or concepts into four quadrants through two different evaluation dimensions (axes).
[0121] When to use: When the text analyzes or categorizes things based on two main criteria or factors, forming a 2x2 classification framework (for example, categorizing tasks based on "importance" and "urgency").
[0122] When inputting, each structured graph is based on the examples of the above structured graphs, and is referred to in the prior art, which will not be specifically presented here.
[0123] During input, based on the characteristics of each structured graph, a second constraint is applied to constrain the hierarchical structure of the structured graph. This constraint primarily includes upper and lower limits on the number of levels, and upper and lower limits on the number of nodes per level. The specific values of these limits vary depending on the type of graph, ensuring that the generated graph conforms to conventional formats. For example, a technical architecture graph may have a lower limit of 2 levels and an upper limit of 5 levels, and a lower limit of 1 node per level and an upper limit of 10 nodes.
[0124] In the embodiment of "XX intelligent question answering project", Figure 2 The diagram is a technical architecture diagram generated in the "2.1.1 Module Architecture Design" section according to the outline. Taking this diagram as an example, before the diagram is generated, in step S102, the corresponding first structured information is generated as follows (displayed in JSON format):
[0125] {
[0126] "name": "Intelligent Question Answering Module Design",
[0127] "description": "",
[0128] "type": "Root",
[0129] "parent": "",
[0130] "children": [
[0131] {
[0132] "name": "Application Layer",
[0133] "description": "",
[0134] "type": "Layer",
[0135] "parent": "Intelligent question-answering module design",
[0136] "children": [
[0137] {
[0138] "name": "User Interface",
[0139] "description": "",
[0140] "type": "Instance",
[0141] "parent": "Application layer",
[0142] "children": []
[0143] },
[0144] {
[0145] "name": "API interface",
[0146] "description": "",
[0147] "type": "Instance",
[0148] "parent": "Application layer",
[0149] "children": []
[0150] } ]
[0152] },
[0153] {
[0154] "name": "Service Layer",
[0155] "description": "",
[0156] "type": "Layer",
[0157] "parent": "Intelligent question-answering module design",
[0158] "children": [
[0159] {
[0160] "name": "Natural Language Processing Engine",
[0161] "description": "",
[0162] "type": "Instance",
[0163] "parent": "Service layer",
[0164] "children": []
[0165] },
[0166] {
[0167] "name": "Knowledge Retrieval Service",
[0168] "description": "",
[0169] "type": "Instance",
[0170] "parent": "Service layer",
[0171] "children": []
[0172] },
[0173] {
[0174] "name": "Question-Answering Generation Model",
[0175] "description": "",
[0176] "type": "Instance",
[0177] "parent": "Service layer",
[0178] "children": []
[0179] },
[0180] {
[0181] "name": "Semantic Understanding Module",
[0182] "description": "",
[0183] "type": "Instance",
[0184] "parent": "Service layer",
[0185] "children": []
[0186] } ]
[0188] },
[0189] {
[0190] "name": "Infrastructure Layer",
[0191] "description": "",
[0192] "type": "Layer",
[0193] "parent": "Intelligent question-answering module design",
[0194] "children": [
[0195] {
[0196] "name": "Database Service",
[0197] "description": "",
[0198] "type": "Instance",
[0199] "parent": "Infrastructure layer",
[0200] "children": []
[0201] },
[0202] {
[0203] "name": "Computing Resource",
[0204] "description": "",
[0205] "type": "Instance",
[0206] "parent": "Infrastructure layer",
[0207] "children": []
[0208] },
[0209] {
[0210] "name": "Storage Resource",
[0211] "description": "",
[0212] "type": "Instance",
[0213] "parent": "Infrastructure layer",
[0214] "children": []
[0215] } ]
[0217] },
[0218] {
[0219] "name": "Data Layer",
[0220] "description": "",
[0221] "type": "Layer",
[0222] "parent": "Intelligent question-answering module design",
[0223] "children": [
[0224] {
[0225] "name": "Knowledge Base",
[0226] "description": "",
[0227] "type": "Instance",
[0228] "parent": "Data layer",
[0229] "children": []
[0230] },
[0231] {
[0232] "name": "Question and Answer History",
[0233] "description": "",
[0234] "type": "Instance",
[0235] "parent": "Data layer",
[0236] "children": []
[0237] } ]
[0239] } ]
[0241] }
[0242] The first structured information specifies the parent-child relationship between nodes and the content of each node. Figure 2This lays the foundation for the data structure. However, only the first structural information mentioned above is not enough to obtain Figure 2 Therefore, this embodiment further implements the following steps:
[0243] Step S104: Use a first constraint condition to constrain each node and hierarchical relationship in the first structured information, so that the first structured information is converted 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 lines between the nodes.
[0244] Specifically, each graph has corresponding implementation logic. Figure 2 Taking the technical architecture diagram shown in the figure as an example, it is implemented through the following logic:
[0245] First, logical constraints are constructed, and the technical architecture diagram is obtained as a hierarchical structure based on the first structured information analysis, and its specific hierarchical relationship is obtained.
[0246] Next, select a pre-recorded technical architecture diagram template and determine the width and shape of each submodule based on the number and content of each layer. For example, if there is a three-layer structure, the layout direction and shape of each submodule, such as horizontal, vertical, or rectangular, will be determined based on the number of submodules and the number of words within each submodule.
[0247] Next, based on the above results, the width and height of the top module and the spacing between submodules are determined so that the submodules are evenly distributed.
[0248] Finally, specific components are added to each module according to the template, and in some preferred embodiments, they can also be colored when needed.
[0249] Then Figure 3 Taking the functional composition diagram shown in FIG. 1 as an example, the implementation logic corresponding to the functional composition diagram in step S104 is as follows:
[0250] First, logical constraints are constructed, and according to the first structured information analysis, the functional composition diagram is obtained as a classic tree structure without color matching, and its hierarchical structural relationship is obtained.
[0251] 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 width of leaf nodes needs to be consistent, the spacing of leaf nodes needs to be consistent, the width of other nodes needs to take into account their leaf nodes, the spacing of other nodes needs to be balanced, and all nodes need to take into account the text length.
[0252] Finally, the connection arrows between the related nodes in the tree structure are constructed, including the starting and ending positions of the arrows, line shape, arrow style, etc.
[0253] After the above processing, the second structured information contains the necessary conditions for visualizing the first structured information: the size, position, shape, and color of each node and the lines between the nodes.
[0254] The above color scheme can be directly agreed upon in the logic, for example, by agreeing on the RGB value of the color of a specific chart type, agreeing on the color difference between different nodes, etc., so that a relatively unified style is achieved when generating images.
[0255] In some preferred embodiments, the color scheme may also be implemented by automatic color matching of a large model, which needs to be performed before converting the second structural information into a source file of a structure diagram editor:
[0256] Input examples of structured graphs with color schemes to the big model;
[0257] A color scheme for each node and / or a connection between nodes in the first structured information is formed using a large model according to an example of the color scheme.
[0258] In some preferred embodiments, converting the second structured information into a source file of a structure diagram editor includes:
[0259] An example of using a prompt word project to configure the second structured information of various structured diagrams to adapt to the source file of the structure diagram editor;
[0260] A source file of a structure diagram editor corresponding to the second structured information is generated by using a large model according to the prompt word project.
[0261] The second structured information already contains all the contents of the visual diagram, so step S106 is executed to convert the second structured information into a source file of a structure diagram editor. In this embodiment, the structure diagram editor is diagrams.net or Visio.
[0262] Finally, step S108 is executed, that is, in the article generation process, a structured diagram that meets the preset type and is generated using the source file is presented at the preset position. The generated diagram visualizes all the information in the source file of the structure diagram editor to Figure 2 For example, the corresponding position of "2.1.1 Module Architecture Design" is as follows Figure 2 The effect shown.
[0263] 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 graph based on a large model, such as Figure 3 As shown, the device includes:
[0264] A first generation module is configured to generate, before generating an article, first structured information based on the article outline using a large model, and a preset position and preset type of a structured graph corresponding to the first structured information in the article, wherein the first structured information includes hierarchical relationships between nodes, and the nodes include corresponding text content;
[0265] a first constraint module, configured to constrain each node and hierarchical structure relationship in the first structured information using a first constraint condition, so as to convert the first structured information into second structured information, wherein the first constraint condition includes at least one of the following: size, position, and shape of nodes and lines between nodes;
[0266] A conversion module, configured to convert the second structured information into a source file of a structure diagram editor;
[0267] The presentation module is used to present, at the preset position during the article generation process, a structured graph generated by using the source file and meeting the preset category.
[0268] It should be noted that although several units or subunits of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the application, the features and functions of two or more units described above can be embodied in a single unit. Conversely, the features and functions of a single unit described above can be further divided and embodied by multiple units.
[0269] Based on the same inventive concept as the above-mentioned method embodiment, an electronic device is also provided in an embodiment of the present application, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the electronic device implements the control method in the above-mentioned embodiment.
[0270] In one embodiment, the electronic device may be a server. In this embodiment, the structure of the electronic device may be as follows: Figure 3 As shown, it includes a memory 2001 , a communication module 2003 and one or more processors 2002 .
[0271] Memory 2001 is used to store computer programs executed by processor 2002. Memory 2001 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and programs required for running instant messaging functions, while the data storage area may store various instant messaging messages and operating instruction sets.
[0272] Memory 2001 may be a volatile memory, such as random-access memory (RAM); a non-volatile memory, such as read-only memory, flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or any other medium capable of carrying or storing a desired computer program in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 2001 may be a combination of the aforementioned memories.
[0273] The processor 2002 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 2002 is configured to implement the above-mentioned audio data processing method when calling the computer program stored in the memory 2001 .
[0274] The communication module 2003 is used to communicate with terminal devices and other servers.
[0275] The specific connection medium between the memory 2001, the communication module 2003 and the processor 2002 is not limited in the embodiment of the present application. Figure 4 In the embodiment, the memory 2001 and the processor 2002 are connected via a bus 2004. The bus 2004 is connected to the processor 2002 via a bus 2004. Figure 4 The arrows in the figure are used to illustrate the connection between the other components. The connection between the components is for illustrative purposes only and is not intended to be limiting. The bus 2004 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Figure 4 The diagram shows that only one arrow is used, but this does not mean that there is only one bus or one type of bus.
[0276] Based on the same inventive concept as the above-mentioned method embodiment, an embodiment of the present invention further provides a computer-readable storage medium for storing a computer program. When the computer program is executed on a computer, the electronic device implements the control method in the above-mentioned embodiment. The computer-readable storage medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with 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 thereof.
[0277] Based on the same inventive concept as the above-mentioned method embodiment, an embodiment of the present invention further provides a computer program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the control method according to the various exemplary embodiments of the present application described above in this specification. The program product can adopt any combination of one or more readable media. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the commands executed by the processor of the computer or other programmable data processing device generate commands for implementing the steps in the process Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0278] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall 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: include: Before the article is generated, the macro model is used to generate first structured information based on the outline of the article, and a preset position and preset type of a structured graph corresponding to the first structured information in the article, wherein the first structured information includes hierarchical relationships between nodes, and the nodes include text content; Using first constraints to constrain each node and hierarchical relationship in the first structured information so that the first structured information is converted into second structured information, the first constraints including at least one of the following: size, position, and shape of nodes and lines between nodes; converting the second structural information into a source file of a structure diagram editor; During the article generation process, a structured graph that meets the preset category and is generated using the source file is presented at the preset position.
2. The method according to claim 1, characterized in that The step of generating the first structured information according to the outline of the article using the large model, and 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 into the big model; The large model is used to analyze the types of structured graphs that match different positions in the outline.
3. The method according to claim 2, characterized in that The step of inputting the relevant introduction of the structured graph into the big model includes: inputting the name, function, applicable scenario, and example of the structured graph into the big model; The method of using the large model to analyze the types of structured graphs matched at different positions in the outline further includes: A second constraint is employed to constrain the hierarchical structure of the structured graph.
4. The method according to claim 1, wherein The converting of the second structured information into a source file of a structure diagram editor also includes: Input examples of structured graphs with color schemes to the big model; Using the large model, forming a color scheme for each node and / or a connection between nodes in the first structured information according to the example of the color scheme; The color scheme is added to the second structured information.
5. The method according to any one of claims 1 to 4, characterized in that The converting the second structured information into a source file of a structure diagram editor includes: An example of using a prompt word project to configure the second structured information of various structured diagrams to adapt to the source file of the structure diagram editor; A source file of a structure diagram editor corresponding to the second structured information is generated by using a large model according to the prompt word project.
6. The method according to claim 1, characterized in that The structure diagram editor is diagrams.net or Visio.
7. A device for generating an article with a structured graph based on a large model, characterized in that: include: A first generation module is configured to generate, before generating an article, first structured information based on the article outline using a large model, and a preset position and preset type of a structured graph corresponding to the first structured information in the article, wherein the structured information includes hierarchical relationships between nodes, and the nodes include corresponding text content; a first constraint module, configured to constrain each node and hierarchical structure relationship in the first structured information using a first constraint condition, so as to convert the first structured information into second structured information, wherein the first constraint condition includes at least one of the following: size, position, and shape of nodes and lines between nodes; A conversion module, converting the second structured information into a source file of a structure diagram editor; The presentation module is used to present, at the preset position during the article generation process, a structured graph generated by using the source file and meeting the preset category.
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 is run on a computer, the computer is caused to perform 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. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Chart generation method and device, equipment and storage medium
CN117574868A
Method and device for generating description document
CN118132142A