A large model writing method and system based on structured meta-knowledge base
Through the combination of a structured meta-knowledge base and a large language model, dynamic management of articles and paragraphs is realized, solving the problems of insufficient information updates and unstable content generated in the existing technology, and improving the timeliness, accuracy and customization capabilities of text generation.
Patent Information
- Application Number
- CN202510527960.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-04-25
AI Technical Summary
Existing text generation tools lack real-time information update capabilities when generating complex structured documents, resulting in insufficient timeliness of content, unstable quality of generated content, and difficult to meet users' customized needs.
A structured meta-knowledge base is used to extract and store meta-knowledge in articles and paragraphs, and combined with dynamic update mechanisms and large language models, a closed-loop optimization knowledge base management system is formed to realize the automatic extraction and management of meta-knowledge, and generate logically coherent long text content.
It improves the timeliness and accuracy of the knowledge base, ensures the quality stability and logical coherence of generated content, enhances the customization and efficiency of writing, and reduces manual intervention.
Smart Images

Figure CN120087341B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a large model writing method and system based on a structured meta-knowledge base. Background Art
[0002] With the rapid development of information technology and artificial intelligence, text generation technology has shown tremendous potential in the field of content creation. Combined with natural language processing (NLP) and big data analytics, automated writing tools can play a vital role in generating content, from general text to domain-specific reports. However, existing collaborative tools are primarily limited to shallow generation for general scenarios, lack support for complex structured documents, and are insufficiently responsive to the specific content needs of specific domains. These tools often rely on static knowledge bases that lack real-time information updates, resulting in potentially outdated or inaccurate generated content.
[0003] In specific document generation tasks, such as writing reports or documents, the following requirements exist: first, it is necessary to extract the latest information from a constantly updated knowledge base; second, the generated content needs to ensure clear logic and no semantic deviation; finally, it can flexibly generate document content of different styles and structures according to user needs to achieve a high degree of customization. However, existing technologies have significant shortcomings in these aspects. The knowledge base in traditional systems is mostly statically stored, with a long update cycle, and cannot meet the needs of real-time writing; in long-text scenarios, the generated content lacks consistency, and the problem of logical discontinuity is more prominent; there is no closed loop between retrieval and generation, and users need to manually operate or adjust, which increases the cost of use. Therefore, existing technologies still face challenges in the field of article writing. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide a large-model writing method and system based on a structured meta-knowledge base, which aims to systematically solve the problems of insufficient knowledge timeliness and unstable quality of generated content through automatic extraction and dynamic management of meta-knowledge, a logically coherent long text generation method, and a closed-loop optimized knowledge base update mechanism, and ultimately achieve efficient, accurate, and customizable automated creation of professional documents.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for writing a large model based on a structured meta-knowledge base, the method comprising:
[0007] Step 1: Conduct structured learning on the target article, extract and store meta-knowledge of the article and paragraphs, and build a meta-knowledge base for article writing;
[0008] Step 2: updating the quality and usage of meta-knowledge items in the article writing meta-knowledge base according to the knowledge base management mechanism to obtain a final structured meta-knowledge base;
[0009] Step 3: Based on the structured meta-knowledge base, an outline and outline content are generated according to the input article summary and related constraints to integrate and obtain the article writing content.
[0010] As an optional implementation of the first aspect of the present application, step 1 includes: step 11, selecting a target article from the original knowledge base and performing core analysis summary and paragraph split summary to obtain an article summary and a paragraph summary, respectively; step 12, extracting meta-knowledge information based on the article summary and the paragraph summary, the meta-knowledge information including the meta-knowledge of the article and the meta-knowledge of the paragraph; step 13, performing similarity matching on the meta-knowledge information with the meta-knowledge in the original knowledge base and storing it in a database; step 14, vectorizing the meta-knowledge of the database to obtain an article writing meta-knowledge base.
[0011] As an optional implementation of the first aspect of the present application, in step 12, the meta-knowledge of the article includes audience analysis, topic development logic, article structure and logical coherence, and the meta-knowledge of the paragraph includes paragraph structure, grammar, vocabulary, quotations, transition sentences, rhetoric, sentence patterns, tone and intonation, and information supplementation.
[0012] As an optional implementation scheme of the first aspect of the present application, in step 2, the knowledge base management mechanism includes: step 21, updating the quality score of the meta-knowledge item, each meta-knowledge item is a unit representation of the system framework of meta-knowledge; step 22, using retrieval enhancement generation technology to count the frequency of use of the meta-knowledge item in the target article; step 23, when the quality score and the frequency of use of the meta-knowledge item are respectively lower than the first threshold and the second threshold, deleting the meta-knowledge item and transferring the paragraph text of the meta-knowledge item to a similar high-quality meta-knowledge item.
[0013] As an optional implementation of the first aspect of the present application, step 22 includes: setting the initial quality score and usage frequency of the newly added meta-knowledge item to 0; recording the usage frequency of each meta-knowledge item, and each time an article is generated, the usage frequency of the used meta-knowledge item is increased by 1, and each time the retrieval enhancement generation technology statistics are used, the usage frequency of the meta-knowledge item will be increased.
[0014] As an optional implementation of the first aspect of the present application, step 3 includes:
[0015] Step 31: Use a large language model and retrieval-enhanced generation technology to construct an article outline and an article summary from the key information of the article writing meta-knowledge base; Step 32: Based on the article outline and the article summary, use retrieval-enhanced generation technology to obtain meta-knowledge and writing methods related to each paragraph to generate article writing content.
[0016] As an optional implementation of the first aspect of the present application, in step 32, the article writing content includes short text and long text, the short text is a text of no more than two thousand words, which is generated by performing paragraph writing meta-knowledge retrieval using the article writing meta-knowledge base and retrieval enhancement generation technology, and the long text is a text of more than two thousand words, which is obtained by integrating and optimizing the specific content of the section titles generated by all section titles and overviews of the article outline through retrieval enhancement generation technology.
[0017] In a second aspect, an embodiment of the present application provides a large model writing system based on a structured meta-knowledge base, the system comprising:
[0018] The meta-knowledge base construction module is used to perform structured learning on the target article, extract meta-knowledge of articles and paragraphs, and store them to build a meta-knowledge base for article writing;
[0019] A knowledge base updating module, configured to update the quality and usage of meta-knowledge items in the article writing meta-knowledge base according to a knowledge base management mechanism, to obtain a final structured meta-knowledge base;
[0020] The article content generation module is used to generate an outline and outline content based on the structured meta-knowledge base and the input article summary and related constraints to integrate and obtain the article writing content.
[0021] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0022] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0023] Compared with the existing technology, the present invention proposes a large model writing method based on a structured meta-knowledge base, which has the following beneficial effects:
[0024] (1) Improve the timeliness and accuracy of knowledge: Through structured learning, the meta-knowledge of the target article is continuously extracted, and combined with a dynamic update mechanism, the timeliness and quality of the meta-knowledge base are ensured, solving the problem of outdated information in traditional static knowledge bases.
[0025] (2) Improve the quality and stability of generated content: Write based on a structured meta-knowledge base and use meta-knowledge at the article and paragraph levels to guide content generation. Especially for long texts, through step-by-step generation and integrated optimization, the logical coherence and structural clarity of the content are guaranteed, and the stability of the generated quality is improved.
[0026] (3) Enhanced customization and efficiency of writing: Users can input a brief description of the article and related constraints, and the system generates customized outlines and content based on the meta-knowledge base to meet the needs of documents of different styles and structures; the automated process reduces manual intervention and improves writing efficiency.
[0027] (4) Achieve closed-loop optimization: The construction, use, and update of the knowledge base form a closed loop. The system can dynamically manage the actual use effects (quality score, frequency of use) of meta-knowledge items, continuously optimize the knowledge base, and improve overall performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 This is a flowchart of a large model writing method based on a structured meta-knowledge base provided by the first embodiment of the present invention;
[0029] Figure 2 This is a schematic structural diagram of a large model writing system based on a structured meta-knowledge base provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0031] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects and are not used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of this application can be implemented in an order other than those illustrated or described herein. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] In order to illustrate the technical solution described in this application, specific embodiments are provided below.
[0033] Example 1
[0034] See also Figure 1, which is a flowchart of a large model writing method based on a structured meta-knowledge base proposed in the first embodiment of this application. The steps of the proposed method are as follows.
[0035] Step 1: Perform structured learning on the target article, extract the meta-knowledge of the article and paragraphs and store them to build a meta-knowledge base for article writing.
[0036] Specifically, step 1 includes the following sub-steps.
[0037] Step 11: Select the target article from the original knowledge base and perform core analysis summary and paragraph split summary to obtain article summary and paragraph summary respectively.
[0038] Specifically, it first receives the target article (supports docx, doc, markdown, and txt formats) uploaded by users or from the internal article library, and starts preprocessing, including format conversion (converting non-text formats to plain text) and removing irrelevant content (headers, footers, page numbers, and Markdown syntax, etc.).
[0039] After preprocessing, the text is input into a large language model (such as GPT-4o and DeepSeek), and a core analysis and summary is gradually performed through a chain of thought. This chain of thought includes: (1) Overall analysis: Let the model read and understand the entire article, identify the genre (research report, work summary, notice, etc.), summarize the core theme of the article, and extract keywords; (2) Audience and topic development analysis: The model will refer to the analysis results of the first step to further understand the article, identify the target audience of the article and its characteristic preferences, and infer their response to the article; at the same time, the model will also analyze how each part of the article structure supports and develops the theme. (3) Article structure and coherence analysis: The model will identify the main parts of the article and their functions, and describe the logical relationship between the parts; (4) Outline generation: The model generates an outline of the article based on the analysis results of the previous steps.
[0040] The core analysis summary will be stored in the article table of the article database in the knowledge base together with the basic information of the target article.
[0041] Then, paragraph summarization is performed, including paragraph splitting and embedding processing. Regular expressions are used to identify paragraph delimiters in the article, and the text content of each paragraph is split and recorded. After splitting, each paragraph and its position are saved in the paragraph table of the article database, and a foreign key relationship is set with the article in which it is located to indicate the affiliation. Each paragraph of text is input into the embedding model (such as text-embedding-3-large or nomic-text-embed, etc.) to obtain a vectorized representation of its text. The vector is then saved in the paragraph vector table in the vector repository and a foreign key association is made with the record of the paragraph in the article database to indicate that the vector is a vectorized representation of the text of this paragraph.
[0042] To facilitate understanding, the following example is given:
[0043] 1. Receive the document "Research on the Current Situation and Countermeasures of the Construction of Science and Technology Management Cadres in Zhejiang Province" (.docx format) and pre-process it to obtain the article text.
[0044] 2. Core analysis summary of the article:
[0045] (1) Overall Analysis: The article is a work summary, with the core theme being "A Study on the Current Situation and Countermeasures of the Team Building of Science and Technology Management Cadres in Zhejiang Province." The key words are "science and technology management cadres," "team building," "countermeasures and suggestions," "Zhejiang Province," and "scientific and technological innovation." Through a survey of the science and technology management cadre team in Zhejiang Province, the article analyzes the achievements and shortcomings of the current team building. It points out the potential importance of science and technology management in economic development, investigates the composition and quality of the cadre team, and proposes problems encountered in practice and training, as well as necessary countermeasures to strengthen team building.
[0046] (2) Audience and theme development analysis: The target audience is science and technology management cadres, local managers, corporate management, educators and policy makers in scientific research institutions and universities. The theme development logic is "through the investigation of the science and technology management cadre team in Zhejiang Province, analyze its construction results and problems, propose targeted management and training countermeasures, emphasize the importance of science and technology management to economic development, and emphasize the indispensability of the cadre team in scientific and technological innovation."
[0047] (3) Analysis of article structure and coherence: The article is divided into five parts, including introduction (introducing the importance of building a scientific and technological management cadre team and the research background), investigation process (explaining the investigation process and coverage, and providing data support), construction results (showing the results and successful cases of building a scientific and technological management cadre team in Zhejiang Province), problem analysis (analyzing the problems and challenges in building a scientific and technological management cadre team), and countermeasures and suggestions (proposing countermeasures and suggestions for the problems, emphasizing the reform of training and cadre growth mechanisms). The overall structure of the article is clear. The introduction introduces the theme, and the subsequent parts gradually expand on the investigation results, results and existing problems, and finally conclude with specific countermeasures. Each part complements each other and effectively promotes the development of the theme. The part that most effectively promotes the theme is the countermeasures and suggestions because it directly targets reform and optimization.
[0048] (4) Generate an outline:
[0049] Introduction: Background introduction, research purpose and significance.
[0050] Survey process: distribution and collection of questionnaires, special seminars, and data analysis methods.
[0051] Construction achievements: the degree of attention paid to scientific and technological innovation and management, the construction of scientific and technological management institutions and systems, the improvement of the quality of scientific and technological management cadres, the improvement of scientific and technological management level, and social recognition and support.
[0052] Problem analysis: The number of scientific and technological management personnel is insufficient and the workload is too heavy, their quality does not match modern needs, there is insufficient training, and there is a lack of growth opportunities for grassroots cadres.
[0053] Countermeasures and suggestions: formulate medium- and long-term development plans, implement knowledge update plans, promote cadre exchanges, cultivate enterprise science and technology management talents, establish a scientific research management professional title sequence and improve staffing.
[0054] 3. Save the article summary: Use structured query language (SQL) or object-relational mapping (ORM) to save the generated article core analysis summary to the article table in the article database.
[0055] 4. Paragraph Summary: Use regular expressions to split paragraphs and record their positions. Then, store the paragraph text in the paragraph table and associate it with the article table. For example, if the text is summarized as "Science and technology management levels have improved, responsibilities have expanded, coordination capabilities have been enhanced, and the team has been well received," the vector representation is a high-dimensional array (partial dimensions: [-0.005, -0.017, -0.007, -0.003, -0.005, ...]), saved to the vector database, and associated.
[0056] Step 12: Based on the article summary and paragraph summary, extract meta-knowledge information, which includes article meta-knowledge and paragraph meta-knowledge.
[0057] It should be noted that the meta-knowledge of an article may include audience analysis, topic development logic, article structure and logical coherence, and the meta-knowledge of a paragraph includes paragraph structure, grammar and vocabulary, etc.
[0058] Meta-knowledge consists of two parts: description and suggestion. Description is used to explain the understanding of the knowledge item, while suggestion provides the usage scenarios and methods of the knowledge item.
[0059] The large language model extracts meta-knowledge from the article in two steps. The first step extracts meta-knowledge related to audience analysis and topic development logic to understand audience characteristics and the logic behind the article's topic development. The second step extracts meta-knowledge related to the article's structure and logical coherence to analyze the article's organizational framework and the logical relationships between its various parts.
[0060] Each paragraph is then analyzed using dynamically selected cue words to extract paragraph meta-knowledge. The large language model analyzes the paragraph text, generating meta-knowledge categories and features specific to that paragraph. These categories and features are then used to generate cue words to guide the analysis, which the model then uses to further extract meta-knowledge from the paragraph.
[0061] Paragraph meta-knowledge categories include structure, grammar, vocabulary, quotations, transitions, rhetoric, sentence patterns, tone and intonation, and information supplementation. These categories focus on paragraph organization, standardization of language expression, effectiveness of vocabulary usage, accuracy of quotations, cohesion between sentences, use of rhetorical devices, diversity of sentence patterns, expression of tone and intonation, and completeness of information.
[0062] To facilitate understanding, the following example is given:
[0063] Extract the article records stored in step 11 from the article database. Combine the information in the article records with the prompt words and input them into the model to obtain the meta-knowledge of all four articles in two steps. Model output example:
[0064] Audience Analysis
[0065] Description: The audience primarily includes science and technology managers, administrators, and leaders from universities and research institutes. These individuals possess a background in both management and science and are interested in science and technology policy and management efficiency. They express a strong desire to enhance the quality and capabilities of science and technology managers and hope to receive practical advice and solutions to better address management challenges.
[0066] Suggestion: When writing, use concise language to present research results and actual cases, emphasize the importance and necessity of building a team of science and technology management cadres, and provide practical countermeasures to enhance the audience's sense of participation and trust.
[0067] Next, we extract meta-knowledge for the paragraph. We randomly select a paragraph from the article and input it into the large language model along with the prompt words, generating the first model output. This output contains meta-knowledge about the paragraph's structure, grammar, vocabulary, transitions, sentence patterns, and supplementary information. The structure and information references are well utilized, while the vocabulary is poorly utilized.
[0068] The second model outputs meta-knowledge of structure, information supplementation, and vocabulary. Here are high-quality and low-quality paragraph meta-knowledge, respectively.
[0069] Structure (high quality)
[0070] Description: The paragraphs present a clear logical structure, following the general-specific-general pattern, from introducing the research background to analyzing the results, and then to the shortcomings and countermeasures.
[0071] Suggestion: It is recommended to add subheadings in the preliminary results analysis to better guide readers and enhance the logic of the text.
[0072] Vocabulary (low quality)
[0073] Description: The paragraph uses relatively technical terms, such as "technological innovation" and "resource dependence", which are suitable for the target audience, but some expressions can be more concise.
[0074] Suggestion: Simplify some complex expressions, such as giving a more intuitive summary of the “contradiction between the limited supply of production factors and the continuous expansion of the total economic volume”.
[0075] Step 13: perform similarity matching between the meta-knowledge information and the meta-knowledge in the original knowledge base and store them in the database.
[0076] Specifically, the extracted meta-knowledge is embedded to generate a vector representation. Then, in the knowledge item vector table of the vector database, the Euclidean distance between the vector of each knowledge item with the same knowledge category as the meta-knowledge and the meta-knowledge vector is calculated. If the Euclidean distance is less than a threshold, the two pieces of meta-knowledge are considered too similar and are not stored duplicated. Conversely, if the Euclidean distance is greater than or equal to the threshold, the new meta-knowledge is saved to the knowledge item table.
[0077] To facilitate understanding, the following example is given:
[0078] Taking the audience analysis meta-knowledge in article meta-knowledge as an example, the meta-knowledge of other articles and paragraphs is processed in the same way.
[0079] The meta-knowledge is converted into plain text format and vectorized using the embedding model. The output of the model is [-0.009, -0.015, -0.019, 0.036, 0.032, …].
[0080] Traverse all vectors in the knowledge item vector table of the vector database and calculate the Euclidean distance between them and the vector of the meta-knowledge. If no vector has a Euclidean distance less than 0.4 (threshold), save the meta-knowledge into the knowledge item database using structured query language or object-relational mapping.
[0081] Step 14: Vectorize the meta-knowledge of the database to obtain the article writing meta-knowledge base.
[0082] Specifically, for newly stored knowledge items, their vectorized representations will be stored in the knowledge item vector table of the vector database, and a foreign key relationship will be set with the record of the knowledge item in the knowledge item database, indicating that the vector is the vectorized expression of this knowledge item.
[0083] The knowledge item is then linked to the records in the article database through foreign keys. The meta-knowledge of an article is linked to the records in the article table, and the meta-knowledge of a paragraph is linked to the records in the paragraph table, indicating that the knowledge item is extracted from the article / paragraph.
[0084] To facilitate understanding, the following example is used (still taking the audience analysis meta-knowledge from the previous step as an example):
[0085] If the audience analysis meta-knowledge from the previous step is newly added to the knowledge item database, save the corresponding vector obtained in the previous step into the knowledge item vector table in the vector database. Use structured query language or object-relational mapping to establish a foreign key link with the corresponding record in the knowledge item database. Finally, establish a foreign key link between the record in the knowledge item database and the corresponding article record in the article database.
[0086] If the audience analysis meta-knowledge in the previous step is replaced by the existing meta-knowledge in the knowledge item database, a foreign key link is established between the existing meta-knowledge and the corresponding article record in the article database.
[0087] Step 2: Update the quality and usage of meta-knowledge items in the article writing meta-knowledge base according to the knowledge base management mechanism to obtain the final structured meta-knowledge base.
[0088] Specifically, the knowledge base management mechanism in this step is as follows:
[0089] Step 21: Update the quality score of the meta-knowledge item, where each meta-knowledge item is a unit representation of the system framework of meta-knowledge.
[0090] Specifically, the quality scores of meta-knowledge items are updated regularly (e.g., weekly or monthly). During each update cycle, a batch of unrelated meta-knowledge items from different categories are randomly selected. For each extracted meta-knowledge item, another meta-knowledge item from the same category is extracted from the database for comparison. Simultaneously, the articles or paragraphs associated with these two meta-knowledge items are retrieved from the article data table. The two meta-knowledge items are compared (e.g., manually or automatically) to determine their descriptive accuracy and contextual applicability to their associated texts. The quality score of the superior meta-knowledge item is increased by 1, while the inferior meta-knowledge item remains unchanged.
[0091] Step 22: Use retrieval enhancement generation technology to count the usage frequencies of meta-knowledge items in target articles.
[0092] It should be noted that the initial quality score and usage frequency of newly added meta-knowledge items can be set to 0. The usage frequency of each meta-knowledge item is recorded. In the subsequent article generation step (step 3), when a meta-knowledge item is retrieved and used through the search-augmented generation technique to assist in generating article content (for example, optimizing article structure or generating paragraphs), the usage frequency of that meta-knowledge item is incremented by 1. Each use of the search-augmented generation technique increases the usage frequency of the meta-knowledge item. Therefore, the usage frequency statistics process is closely related to the application of RAG (search-augmented generation).
[0093] Step 23: When the quality score and usage frequency of the meta-knowledge item are respectively lower than the first threshold and the second threshold, the meta-knowledge item is deleted and the paragraph text of the meta-knowledge item is transferred to a similar high-quality meta-knowledge item.
[0094] Specifically, the quality score and usage frequency of the meta-knowledge item are checked regularly. If the quality score of a meta-knowledge item is lower than a preset first threshold (for example, a score less than 3), and its usage frequency is lower than a preset second threshold (for example, the number of times used is less than 5 times), then the meta-knowledge item is marked as a low-quality meta-knowledge item. Then, through a similarity matching algorithm (for example, using a similarity threshold slightly looser than step 13), the high-quality meta-knowledge item (with a higher quality score and usage frequency) that is most similar to the low-quality meta-knowledge item in the same knowledge category is searched. If a suitable high-quality meta-knowledge item is found, the article or paragraph text information associated with the low-quality meta-knowledge item (for example, its associated record in the paragraph table) is transferred to the high-quality meta-knowledge item, and then the low-quality meta-knowledge item and its vector representation are deleted.
[0095] Step 3: Based on the structured meta-knowledge base, generate an outline and outline content according to the input article summary and related constraints to integrate the article writing content.
[0096] Specifically, step 3 includes the following sub-steps.
[0097] Step 31: Use the large language model and retrieval enhancement generation technology to construct the article outline and article summary from the key information of the article writing meta-knowledge base.
[0098] Specifically, before generating an article, the system receives initial user input, including but not limited to the genre, title, desired word count, article overview, and supplementary information specific to that genre (e.g., the research report's background, purpose, data sources, methodology, sampling, etc.). Users can also upload relevant files for reference. The uploaded files are segmented, embedded, and stored in a temporary database table to provide supplementary information for subsequent content generation.
[0099] Then, a series (e.g., three) of large language model calls are made to generate the article outline and synopsis:
[0100] First call: The big model generates preliminary audience analysis and keywords for the article based on the initial information.
[0101] Second call: Using RAG technology, the initial information, the audience, and keywords generated in the first call are embedded. Meta-knowledge items related to "topic development logic" and "audience analysis" with high similarity are then retrieved from the meta-knowledge base's knowledge item vector table. Combining these retrieved meta-knowledge items with the initial information allows the large model to generate more precise article topics and topic development logic.
[0102] The third call: If there is a user-uploaded file (already stored in a temporary database table), RAG technology is used to retrieve key supplementary information related to the current topic. Combining the article information generated in the first two steps (topic, logic, audience, etc.) with the retrieved supplementary information, the large model ultimately generates a detailed article outline.
[0103] For example, the user inputs the research report requirement "Application and Future Development of Artificial Intelligence in Manufacturing", with a word count of 1,500, and the overview and background are as described in the original text, and uploads the file "Examples of AI Application in Manufacturing.docx".
[0104] First model call: Generate audiences (manufacturing practitioners, policymakers, etc.) and keywords (artificial intelligence, manufacturing, etc.).
[0105] The second model call embeds the input information and generated audiences / keywords, and searches the meta-knowledge base for meta-knowledge items such as "Research Report Topic Development Logic" and "Audience Analysis for Professionals." Combining this information, it generates a theme (the application and future development of AI in manufacturing) and a theme development logic (discussing applications, analyzing relationships, challenging impacts, and providing recommendations).
[0106] The third model call embeds information such as the topic and logic, and simultaneously searches the temporary database for the "AI Application Examples in Manufacturing.docx" file, identifying relevant examples for each section of the outline. Combining all this information, the following detailed outline is generated.
[0107] Introduction: Research background and purpose, and an overview of the report structure.
[0108] Current status of artificial intelligence technology development: basic concepts of artificial intelligence technology, major areas of technological progress in recent years, and existing cases of artificial intelligence application in manufacturing.
[0109] Current status and development trends of the manufacturing industry: challenges currently facing the manufacturing industry, trend analysis of changes in market demand, and the necessity of transformation and upgrading of the manufacturing industry.
[0110] The potential of artificial intelligence in manufacturing: its application in production, its role in supply chain management, and its impact on quality control and maintenance.
[0111] Market demand and policy environment analysis: Overview of the market demand for artificial intelligence, relevant policy support and regulatory background, and the impact of the policy environment on the development of the manufacturing industry.
[0112] Challenges faced: Barriers to technology implementation, data privacy and security issues, and employee skills and training needs.
[0113] Strategic recommendations: Develop long-term technology development plans, strengthen cooperation with scientific research institutions, and cultivate talents that meet needs.
[0114] Conclusion: The profound impact of artificial intelligence on manufacturing, summarizes the main findings and suggestions of the research, and looks forward to future development directions.
[0115] Step 32: Based on the article outline and article summary, use retrieval-enhanced generation technology to obtain meta-knowledge and writing methods related to each paragraph to generate article writing content.
[0116] It should be noted that article writing content can be divided into two categories: short text and long text:
[0117] Short text generation (e.g., not exceeding a preset threshold, such as 2,000 words): This can be performed in one go. Using RAG technology, the complete outline is embedded, and meta-knowledge items related to "article structure" and "logical coherence" are retrieved from the meta-knowledge base. Paragraph writing meta-knowledge applicable to each outline point (such as "paragraph structure," "quotes," and "transition sentences") and similar paragraph examples are also retrieved. Relevant reference content is also retrieved from a temporary database. The outline, retrieved meta-knowledge items, paragraph examples, and reference content are fed into the large language model to generate the complete short text article.
[0118] Long text generation (for example, exceeding a preset threshold, such as 2,000 words): adopt a step-by-step generation and reintegration approach. First, for each section (or subsection) title and its overview / key points in the outline, a separate RAG call is made. The title and key points of the section are embedded, and relevant paragraph-level meta-knowledge (such as specific paragraph structure, tone, vocabulary suggestions) and similar paragraph examples are retrieved from the meta-knowledge base, and relevant content is retrieved from the temporary database. The large language model is called to generate specific content for the section. This process is repeated for all sections in the outline to obtain the content of each part. Finally, the large model is called again, and the RAG technology is used to embed the entire outline, retrieve meta-knowledge items related to "overall structure of the article", "logical coherence", and "chapter transition", and the previously generated content is integrated, optimized, and transitions are added to ensure that the entire long text is logically smooth and structurally complete.
[0119] For example, if the user's request for 1,500 words is less than the threshold, short text generation is used. The outline is embedded, and relevant article structure meta-knowledge and paragraph writing meta-knowledge (such as introduction paragraph structure, data citation methods, conclusion paragraph writing methods, etc.) are retrieved, along with examples from the temporary library, to generate the full report of approximately 1,500 words in one go.
[0120] If the user requires 5,000 words, the long text generation method will be used. For each section in the outline, such as "Introduction" and "Current Status of Artificial Intelligence Technology Development", RAG calls are made separately: the section title and key points are embedded, relevant paragraph meta-knowledge and examples are retrieved, and the content of the section is generated. For example, when generating the section "Current Status of Artificial Intelligence Technology Development", paragraph structure meta-knowledge about "Explanation of Technical Concepts" and "Listing of Cases" may be retrieved, and relevant AI application examples may be found from the temporary library. After all section contents are generated, another RAG call is made: the overall outline is embedded, the article structure and logical coherence meta-knowledge are retrieved, and the contents of each section are integrated and optimized into a complete 5,000-word report.
[0121] Example 2
[0122] See also Figure 2 , shown is a schematic diagram of the structure of a large model writing system based on a structured meta-knowledge base proposed in the second embodiment of the present application, the system comprising:
[0123] The meta-knowledge base construction module 100 is used to perform structured learning on the target article, extract meta-knowledge of the article and paragraphs, and store them to construct an article writing meta-knowledge base;
[0124] A knowledge base updating module 200 is configured to update the quality and usage of meta-knowledge items in the article writing meta-knowledge base according to a knowledge base management mechanism to obtain a final structured meta-knowledge base;
[0125] The article content generation module 300 is used to generate an outline and outline content based on the structured meta-knowledge base and the input article summary and related constraints to integrate and obtain the article writing content.
[0126] In the embodiments of the present application, a large model writing system based on a structured meta-knowledge base can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, network attached storage (NAS), personal computer (PC), etc., which are not specifically limited in the embodiments of the present application.
[0127] In an embodiment of the present application, a large model writing system based on a structured meta-knowledge base may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0128] The large model writing system based on structured meta-knowledge base provided in the embodiment of the present application can realize Figure 1 In the method embodiment, each process of implementing a large model writing method based on a structured meta-knowledge base is not described here to avoid repetition.
[0129] Optionally, an embodiment of the present application also provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the various processes of the above-mentioned embodiment of the large model writing method based on a structured meta-knowledge base are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be described here.
[0130] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the embodiment of the above-mentioned large model writing method based on a structured meta-knowledge base are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0131] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.
[0132] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0133] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a more preferred embodiment. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of this application.
[0134] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A large model writing method based on a structured meta-knowledge base, characterized by: include: Step 1: Conduct structured learning on the target article, extract and store meta-knowledge of the article and paragraphs to build an article writing meta-knowledge base. The meta-knowledge of the article includes audience analysis, topic development logic, article structure, and logical coherence. The meta-knowledge of the paragraph includes paragraph structure, grammar, vocabulary, quotations, transition sentences, rhetoric, sentence patterns, tone and intonation, and information supplementation. Step 2: updating the quality and usage of meta-knowledge items in the article writing meta-knowledge base according to a knowledge base management mechanism to obtain a final structured meta-knowledge base, wherein the knowledge base management mechanism includes: Step 21: updating the quality score of the meta-knowledge items, each meta-knowledge item being a unit representation of a meta-knowledge system framework; Step 22: using retrieval enhancement generation technology to count the usage frequency of the meta-knowledge items in the target article; Step 23: when the quality score and the usage frequency of the meta-knowledge item are respectively lower than a first threshold and a second threshold, deleting the meta-knowledge item and transferring the paragraph text of the meta-knowledge item to a similar high-quality meta-knowledge item; Step 3: Based on the structured meta-knowledge base, generate an outline and outline content according to the input article summary and related constraints to integrate the article writing content, specifically including: Step 31: Use a large language model and retrieval enhancement generation technology to construct an article outline and an article outline with the key information of the article writing meta-knowledge base; Step 32: Based on the article outline and the article outline, use retrieval enhancement generation technology to obtain meta-knowledge and writing methods related to each paragraph to generate article writing content; wherein in step 32, the article writing content includes short text and long text, the short text is a text of no more than two thousand words, generated by searching for paragraph writing meta-knowledge by the article writing meta-knowledge base and retrieval enhancement generation technology, and the long text is a text of more than two thousand words, which is obtained by integrating and optimizing the specific content of the section titles generated by all section titles and overviews of the article outline through retrieval enhancement generation technology.
2. A large model writing method based on a structured meta-knowledge base according to claim 1, characterized in that: Step 1 includes: Step 11: Select the target article from the original knowledge base and perform core analysis and summary and paragraph split summary to obtain article summary and paragraph summary respectively; Step 12: extracting meta-knowledge information based on the article summary and the paragraph summary, wherein the meta-knowledge information includes meta-knowledge of the article and meta-knowledge of the paragraph; Step 13: performing similarity matching between the meta-knowledge information and the meta-knowledge in the original knowledge base and storing the results in a database; Step 14: vectorize the meta-knowledge of the database to obtain an article writing meta-knowledge base.
3. The large model writing method based on a structured meta-knowledge base according to claim 1, characterized in that: Step 22 includes: Set the initial quality score and usage frequency of the newly added meta-knowledge items to 0, record the usage frequency of each meta-knowledge item, and increase the usage frequency of the used meta-knowledge item by 1 each time an article is generated. Each time the retrieval enhancement generation technology is used, the usage frequency of the meta-knowledge item will be increased.
4. A large model writing system based on a structured meta-knowledge base, characterized by: The system comprises: A meta-knowledge base construction module is used to perform structured learning on the target article, extract and store meta-knowledge of the article and paragraphs, and construct an article writing meta-knowledge base. The meta-knowledge of the article includes audience analysis, topic development logic, article structure, and logical coherence. The meta-knowledge of the paragraph includes paragraph structure, grammar, vocabulary, quotations, transition sentences, rhetoric, sentence patterns, tone and intonation, and information supplementation. A knowledge base update module is configured to update the quality and usage of meta-knowledge items in the article writing meta-knowledge base according to a knowledge base management mechanism to obtain a final structured meta-knowledge base, wherein the knowledge base management mechanism includes: updating the quality scores of meta-knowledge items, each meta-knowledge item being a unit representation of a meta-knowledge system framework; using retrieval enhancement generation technology to count the usage frequency of the meta-knowledge items in the target article; when the quality score and the usage frequency of the meta-knowledge item are respectively lower than a first threshold and a second threshold, deleting the meta-knowledge item and transferring the paragraph text of the meta-knowledge item to a similar high-quality meta-knowledge item; An article content generation module is used to generate an outline and outline content based on the structured meta-knowledge base and the input article summary and related constraints to integrate the article writing content, specifically including: using a large language model and retrieval-enhanced generation technology to construct an article outline and an article outline from the key information of the article writing meta-knowledge base; based on the article outline and the article outline, using retrieval-enhanced generation technology to obtain meta-knowledge and writing methods related to each paragraph to generate article writing content; wherein, the article writing content includes short text and long text, the short text is a text of no more than 2,000 words, generated by searching for paragraph writing meta-knowledge by the article writing meta-knowledge base and retrieval-enhanced generation technology, and the long text is a text of more than 2,000 words, which is obtained by integrating and optimizing the specific content of all section titles and overviews of the article outline through retrieval-enhanced generation technology.
5. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of a large model writing method based on a structured meta-knowledge base as described in any one of claims 1 to 3 are implemented.
6. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the large model writing method based on a structured meta-knowledge base as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Article generation method and apparatus based on large language model, and electronic device
CN117709295A
Method and system for generating bionic hierarchical memory fusion document of large electric semantic model
CN119474347A