Intelligent writing system and method based on multi-source knowledge base enhancement

By constructing a multi-source knowledge base and combining writing task decomposition and quality optimization, the problems of limited knowledge sources and low quality of generated content in intelligent writing are solved, and the efficient generation of logically coherent and professional texts is achieved.

CN121935346APending Publication Date: 2026-04-28CHINA SOUTHERN POWER GRID DIGITAL GRID GROUP (GUANGDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA SOUTHERN POWER GRID DIGITAL GRID GROUP (GUANGDONG) CO LTD
Filing Date
2025-12-29
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing intelligent writing technologies, when used for professional texts such as scientific research papers and industry reports, have limited knowledge sources and struggle to fully utilize multi-source knowledge resources. As a result, the generated content is insufficient in terms of factual accuracy, terminology, and argumentation depth. Furthermore, the inadequate integration of multi-source knowledge leads to inconsistencies in the logic of the generated text and inconsistent expressions of the same concept.

Method used

By constructing a multi-source knowledge base, including the collection of structured, semi-structured, and unstructured data, as well as semantic vector libraries and knowledge graphs, and combining writing task decomposition, retrieval quality information calculation, and quality optimization coefficients, high-quality drafts are generated and iteratively optimized to ensure the factual accuracy, logical coherence, and professionalism of the generated content.

Benefits of technology

It improves the accuracy, consistency, and professionalism of the generated text. Through the efficient integration of multi-source knowledge and a self-correction mechanism, it forms a closed-loop optimization system, solving the problems of insufficient knowledge sources and low quality of generated content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121935346A_ABST
    Figure CN121935346A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent writing system and method based on multi-source knowledge base enhancement, and particularly relates to the technical field of intelligent writing, knowledge resources can be efficiently integrated in a writing task by comprehensively collecting structured, semi-structured and non-structured multi-source knowledge data and combining construction of a semantic vector library and a knowledge graph, and the writing efficiency is improved. The key points of each chapter can be identified and accurately extracted by decomposing a writing task, so that the understanding of a writing structure is optimized, the reliability and authority of quoted information are guaranteed by introducing retrieval quality information such as semantic relevancy, field matching degree and source credibility in a retrieval process, and the retrieval efficiency is improved. According to the method, the hierarchical structure and the causal relationship of the multi-source knowledge are combined, a writing outline can be more reasonably constructed, a full text first draft is generated, the quality of the full text can be evaluated in real time based on a self-correction mechanism of a quality optimization coefficient, a segment to be optimized is positioned, and it is ensured that the quality of the generated content meets a preset standard through iterative rewriting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent writing technology, and more specifically, to an intelligent writing system and method based on multi-source knowledge base enhancement. Background Technology

[0002] In intelligent writing scenarios for professional texts such as scientific research papers and industry reports, existing technologies mostly rely on language models trained on single corpora or simple retrieval + generation architectures. Their knowledge sources are limited and outdated, making it difficult to fully utilize multi-source knowledge resources such as standards and specifications, technical manuals, domain papers, and internal company documents. This results in significant deficiencies in the accuracy of facts, the professionalism of terminology, and the depth of argumentation in the generated content. On the other hand, knowledge augmentation methods that rely solely on vector retrieval or keyword matching often only provide fragmented factual support in localized sections, lacking a unified model of the hierarchical structure, causal relationships, and citation connections between multi-source knowledge. This leads to problems such as incoherent context, inconsistent expression of the same concept, and a disconnect between background and solution in the generated text. As writing tasks become increasingly complex, users not only expect the automatic generation of "decent text" but also hope that the system can understand the implicit requirements of different writing styles regarding chapter structure, technical points, and argumentation paths. However, existing methods often operate independently in the three stages of multi-source knowledge fusion, writing intent understanding, and self-correction of generation quality: the knowledge base cannot be reorganized on demand for specific writing goals, the generation model struggles to accurately perceive knowledge coverage blind spots and logical breaks, and quality assessment lacks a feedback channel that can be traced back to knowledge evidence. These problems are intertwined: insufficient knowledge fusion amplifies the risk of illusion in the generation model, and illusory text, in turn, weakens quality assessment and user trust; inadequate understanding of writing structure leads to vague retrieval targets, and erroneous retrieval results further undermine the consistency of the entire text's logic, making it difficult for the collaboration between multi-source knowledge and intelligent writing to form a closed loop. Summary of the Invention

[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide an intelligent writing system and method based on multi-source knowledge base enhancement to address the problems raised in the background art.

[0004] To achieve the above objectives, the present invention provides the following technical solution: The intelligent writing method based on multi-source knowledge base enhancement includes the following steps: Collect structured, semi-structured, and unstructured multi-source knowledge data, construct a semantic vector library and knowledge graph, and obtain a multi-source knowledge base; Obtain the writing task instructions input by the user, and decompose the writing task instructions into writing tasks to obtain the writing task decomposition results. Based on the results of the writing task decomposition, a search is conducted in a multi-source knowledge base, and the search quality information during the search process is obtained to calculate the search quality score. Based on the search quality score, the search knowledge set for the target chapter is selected. Under the constraints of the retrieved knowledge set, according to the preset style rules and chapter structure template, a partial writing outline for each chapter is generated, and a full draft is generated based on the partial writing outline and the retrieved knowledge set. The quality optimization information of the full draft is obtained, the quality optimization coefficient is calculated, the segment to be optimized is located based on the quality optimization coefficient, and the segment to be optimized is iteratively rewritten to generate an optimized manuscript that meets the quality optimization coefficient threshold.

[0005] In a preferred embodiment, the writing task instruction input by the user includes the writing topic, writing type, target chapter structure, and specific constraints. Natural language processing technology is used to parse the writing task instructions input by the user and extract the elements of the writing task instructions, including: task theme extraction, text type identification, chapter structure identification, and constraint condition extraction. The writing task instructions are analyzed to obtain the writing theme, genre, chapter structure, and constraints. Based on the parsing results of the writing task instructions, the writing task instructions are decomposed into writing tasks, including: chapter decomposition, paragraph decomposition, task priority and dependency relationship; The results of breaking down the writing task are transformed into a structured target writing task.

[0006] In a preferred embodiment, the retrieval quality information includes semantic relevance, domain matching degree, and source credibility.

[0007] In a preferred embodiment, the logic for obtaining semantic relevance is as follows: the target writing task text is labeled as a target text vector. The search text to be retrieved is marked as a search text vector. Calculate semantic relevance: ,in This represents semantic relevance.

[0008] In a preferred embodiment, the logic for obtaining the domain matching degree is as follows: The frequency of word i is calculated by counting the number of times word i appears in the target writing task text and then dividing the number of times word i appears by the total number of words in the target writing task text. Simultaneously calculate the inverse document frequency of word i in the target writing task text: ,in The inverse document frequency of word i in the text for the writing task. The total number of documents in the text for the writing task to the target. The number of words i contained in the document; Multiplying the term frequency and inverse document frequency of the target writing task text yields the term frequency-inverse document frequency. ; The frequency of word i is calculated by counting the number of times word i appears in the text to be retrieved and then dividing the number of times word i appears by the total number of words in the text. Simultaneously calculate the inverse document frequency of word i in the text to be retrieved: ,in The inverse document frequency of word i in the text to be retrieved. This represents the total number of documents in the text to be searched. The number of words i contained in the document; Multiplying the term frequency and inverse document frequency of the text to be retrieved yields the term frequency-inverse document frequency. ; Domain matching degree is calculated based on term frequency-inverse document frequency: ,in The total number of words in the text for the writing task.

[0009] In a preferred embodiment, the source credibility It is obtained by weighted summation of journal impact score, citation count score, and publication date score; The journal impact score is quantified using the journal's impact factor, as detailed below: ,in Rate the journal's impact. The impact factor of the target journal. The impact factor is the highest level of citations a journal receives in the past two years, which is the ratio of the number of times the journal has been cited to the number of articles published in that journal during the same period. The citation score refers to the ratio of the number of times a document is cited to the maximum number of citations in the target field. The publication date score refers to the time difference between the publication date of the document and the current time.

[0010] In a preferred embodiment, the semantic relevance, domain matching degree, and source credibility are normalized, units and dimensions are removed, and a weighted sum is obtained to obtain the retrieval quality score. Based on the calculated search quality score, the search results are sorted, and a set of search knowledge that meets the quality requirements is selected: the search quality score is compared with the search quality score threshold, the search results are traversed, and the search results with a search quality score less than the search quality score threshold are removed, while the search results with a search quality score greater than or equal to the search quality score threshold are retained to obtain the search knowledge set.

[0011] In a preferred embodiment, the quality optimization information includes a context relevance coefficient, a completeness coefficient, and a readability coefficient.

[0012] In a preferred embodiment, the context relevance coefficient, completeness coefficient, and readability coefficient are normalized, units and dimensions are removed, and a weighted sum is obtained to obtain the quality optimization coefficient. Based on the quality optimization coefficient, the segment to be optimized is located, and the segment is iteratively rewritten to generate an optimized manuscript that meets the quality optimization coefficient threshold, as follows: The quality optimization coefficient is compared with the preset quality optimization coefficient threshold. If the quality optimization coefficient is less than the quality optimization coefficient threshold, optimization continues. If the quality optimization coefficient is greater than or equal to the quality optimization coefficient threshold, the current manuscript quality is considered to meet the requirements, and the optimization process ends.

[0013] In a preferred embodiment, the intelligent writing system based on multi-source knowledge base enhancement includes a knowledge base construction module, a writing task decomposition module, a retrieval quality screening module, a first draft generation module, and a first draft quality optimization module. The knowledge base construction module is used to collect structured, semi-structured, and unstructured multi-source knowledge data, construct a semantic vector library and a knowledge graph, and obtain a multi-source knowledge base. The writing task decomposition module is used to obtain the writing task instructions input by the user, decompose the writing task instructions into writing tasks, and obtain the writing task decomposition results. The retrieval quality screening module is used to search in a multi-source knowledge base based on the results of the writing task decomposition, obtain retrieval quality information during the retrieval process, calculate the retrieval quality score, and filter out the retrieval knowledge set of the target chapter based on the retrieval quality score. The first draft generation module is used to generate partial writing outlines for each chapter under the constraints of the retrieved knowledge set, according to preset style rules and chapter structure templates, and generate full-text first drafts based on the partial writing outlines and the retrieved knowledge set. The draft quality optimization module is used to obtain quality optimization information of the full draft, calculate the quality optimization coefficient, and iteratively rewrite the segments to be optimized to generate optimized manuscripts that meet the quality optimization coefficient threshold.

[0014] The technical effects and advantages of this invention are as follows: 1. The intelligent writing method based on multi-source knowledge base enhancement provided by this invention can effectively solve the problems of limited knowledge sources, low quality of generated content, and insufficient integration of multi-source knowledge in existing technologies. By comprehensively collecting structured, semi-structured, and unstructured multi-source knowledge data, and combining the construction of semantic vector libraries and knowledge graphs, it can efficiently integrate rich knowledge resources such as standards and specifications, technical manuals, and domain papers in writing tasks, greatly improving the factual accuracy, terminology professionalism, and argumentation depth of the generated text. At the same time, by decomposing the writing task, it can identify and accurately extract the key points of each chapter, thereby optimizing the understanding of the writing structure and avoiding the logical inconsistency problem caused by the ambiguity of the retrieval target in traditional methods. Furthermore, by introducing semantic relevance, domain matching degree, and source in the retrieval process, it can further enhance the writing method. Retrieving quality information such as credibility not only accurately filters out knowledge content highly relevant to the task objective, but also ensures the reliability and authority of the cited information, preventing the emergence of illusory text during the generation process. During the generation process, combining the hierarchical structure and causal relationships of multi-source knowledge, a more reasonable writing outline can be constructed and a full draft can be generated, ensuring the coherence and depth of the text. Finally, based on the self-correction mechanism of the quality optimization coefficient, the quality of the full text can be evaluated in real time, and the segments to be optimized can be located. Through iterative rewriting, the quality of the generated content can be ensured to meet the preset standards. This method combines knowledge fusion, writing structure understanding and quality self-correction to form a closed-loop optimization system, which greatly improves the accuracy, consistency and professionalism of intelligent writing and solves the problem of insufficient collaboration between multi-source knowledge and intelligent writing in existing methods. Attached Figure Description

[0015] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings; Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 This is a flowchart of the system in Embodiment 2 of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] Example 1: Figure 1 The present invention provides an intelligent writing method based on multi-source knowledge base enhancement, comprising the following steps: Collect structured, semi-structured, and unstructured multi-source knowledge data, construct a semantic vector library and knowledge graph, and obtain a multi-source knowledge base; Obtain the writing task instructions input by the user, and decompose the writing task instructions into writing tasks to obtain the writing task decomposition results. Based on the writing task decomposition results, a search is conducted in a multi-source knowledge base, and the search quality information obtained during the search process is used to calculate the search quality score. The search quality information includes semantic relevance, domain matching degree, and source credibility. The search knowledge set of the target chapter is selected based on the search quality score. Under the constraints of the retrieved knowledge set, according to the preset style rules and chapter structure template, a partial writing outline for each chapter is generated, and a full draft is generated based on the partial writing outline and the retrieved knowledge set. The quality optimization information of the full draft is obtained and the quality optimization coefficient is calculated. The quality optimization information includes the context relevance coefficient, the completeness coefficient, and the readability coefficient. The segment to be optimized is located based on the quality optimization coefficient, and the segment to be optimized is iteratively rewritten to generate an optimized manuscript that meets the quality optimization coefficient threshold.

[0018] Collect structured, semi-structured, and unstructured multi-source knowledge data, construct a semantic vector library and knowledge graph, and obtain a multi-source knowledge base; The structured data acquisition includes: extracting knowledge data from structured sources such as relational databases, tabular data, and sensor data; using SQL queries and API interfaces to extract the dataset to local storage; and performing data cleaning and unit standardization. The semi-structured data acquisition includes: collecting data from semi-structured data sources such as experimental logs and technical reports in XML / JSON format, and using regular expressions and an XML parsing library to perform structured processing on the data; The unstructured data collection includes: extracting relevant physics knowledge from unstructured texts such as scientific research papers, patent documents, technical reports, and web pages; using natural language processing technology to perform entity recognition, syntactic analysis, and relation extraction to extract physical entities and their relationships. The collected structured, semi-structured, and unstructured multi-source knowledge data are denoised and standardized, including removing redundant information, filling in missing values, and removing stop words and restoring word forms in text data to ensure data quality and uniform format. Using a pre-trained semantic embedding model, text data is semantically vectorized, converting each entity, formula, experimental description, etc., into a high-dimensional vector to obtain a vectorized knowledge set. It should be noted that the pre-trained semantic embedding model can be an existing semantic embedding model, such as Word2Vec, GloVe, BERT, etc. Entities and relationships are extracted from multi-source knowledge data after denoising and standardization. A knowledge graph is constructed using a graph database. Each entity is a node in the graph, and the physical relationships between entities, such as current passing through a resistor, are edges of the graph. Nodes and edges are attached with attributes, including entity definitions, experimental data, formulas, etc. Ultimately, this will form a multi-source knowledge base that supports multi-dimensional retrieval, reasoning, and knowledge fusion.

[0019] Obtain the writing task instructions input by the user, and decompose the writing task instructions into writing tasks to obtain the writing task decomposition results. The writing task instructions input by the user include: writing topic: such as "optimization control method of power system", "quantum computing experimental design", etc.; writing type: such as scientific research paper, patent specification, technical report, etc.; target chapter structure: such as background technology, existing problems, solutions, technical effects, implementation methods, etc.; specific constraints: such as word limit, required technical terms, specific format requirements, etc. It should be noted that user commands can be provided through text boxes, voice input, etc. Natural Language Processing (NLP) technology is used to parse the writing task instructions input by the user, extracting key elements including: Task Topic Extraction: Entity recognition technology is used to extract the topic and keywords from the task; Genre Type Recognition: Text classification models are used to identify the genre type, and pre-trained genre classification models can be employed; Chapter Structure Recognition: Based on the chapter and paragraph requirements provided by the user, a preliminary chapter framework is identified and constructed, using template matching methods or machine learning-based sequence labeling techniques to identify chapter tags; Constraint Extraction: Constraints in the task, such as word limits, citation requirements, and technical terms, are extracted, and a corresponding list of task constraints is generated. The writing task instructions are analyzed to obtain the writing theme, genre, chapter structure, and constraints. Based on the parsing results of the writing task instructions, the writing task instructions are decomposed into writing tasks, including: Chapter decomposition: Based on the chapter structure in the task, the main content of the task is divided, such as background technology, existing problems, solutions, etc., and the writing objectives of each chapter are defined; Paragraph decomposition: The chapter requirements are further refined into paragraph-level tasks. For example, the background technology chapter can be decomposed into sub-tasks such as existing technology, technical defects, and solution requirements; Task priority and dependencies: The dependencies between chapters or paragraphs are identified, clarifying which parts are the foundation for subsequent writing and which can be generated in parallel.

[0020] The writing task is broken down into a structured target writing task, with each subtask including: Task ID: Uniquely identifies each subtask; Task title: For example, background technology introduction, technical solution description; Task objective: Define the specific writing objectives that need to be achieved in this task; Task dependencies: List the prerequisite tasks that the current subtask depends on, such as background technology depending on existing technology analysis; Task constraints: such as word count limits, citation standards, style requirements, etc.; Based on the results of the writing task decomposition, a search is conducted in a multi-source knowledge base, and the search quality information during the search process is obtained to calculate the search quality score. Based on the search quality score, the search knowledge set for the target chapter is selected. The retrieval quality information includes semantic relevance, domain matching degree, and source credibility; In this embodiment of the invention, semantic relevance measures the degree of semantic matching between the retrieved results and the writing topic given in the user's task instructions. It represents the "relevance" of the retrieval results to the task objective. More relevant retrieval results are assigned higher weights, ensuring that the retrieved documents, data, or technical information are closely related to the user's writing task in terms of content and technology, thereby supporting an efficient and accurate writing generation process. By calculating semantic similarity and filtering based on relevance, the quality of retrieval results can be greatly improved, providing a solid knowledge foundation for generating high-quality, demand-compliant writing content. The logic for obtaining semantic relevance is as follows: the target writing task text is labeled as a target text vector. The search text to be retrieved is marked as a search text vector. Calculate semantic relevance: ,in For semantic relevance; In this embodiment of the invention, domain matching degree measures the relevance of search results to a specific domain (such as physics and engineering), ensuring that the retrieved content is not only semantically matched but also closely related to the required technical field and expertise. Specifically, domain matching degree not only focuses on the surface content similarity of documents or data but also emphasizes whether this content conforms to the subject area and technical background required for the task. Knowledge content with high domain matching degree can ensure that the documents or data cited during the writing process are consistent with the background and requirements of the task. In multi-task or multi-chapter writing, domain matching degree can help determine which search results are suitable for use in which chapters. The logic for obtaining domain matching degree is as follows: The frequency of word i is calculated by counting the number of times word i appears in the target writing task text and then dividing the number of times word i appears by the total number of words in the target writing task text. Simultaneously calculate the inverse document frequency of word i in the target writing task text: ,in The inverse document frequency of word i in the text for the writing task. The total number of documents in the text for the writing task to the target. The number of words i contained in the document; Multiplying the term frequency and inverse document frequency of the target writing task text yields the term frequency-inverse document frequency. ; The frequency of word i is calculated by counting the number of times word i appears in the text to be retrieved and then dividing the number of times word i appears by the total number of words in the text. Simultaneously calculate the inverse document frequency of word i in the text to be retrieved: ,in The inverse document frequency of word i in the text to be retrieved. This represents the total number of documents in the text to be searched. The number of words i contained in the document; Multiplying the term frequency and inverse document frequency of the text to be retrieved yields the term frequency-inverse document frequency. ; Domain matching degree is calculated based on term frequency-inverse document frequency: ,in The total number of words in the text for the writing task; In this embodiment of the invention, source credibility refers to the evaluation of retrieved knowledge sources to determine whether they are reliable, authoritative, and verified. Specifically, source credibility reflects the reliability and accuracy of documents, data, technical reports, or other information sources, ensuring that the retrieved information is not only semantically and domain-relevant, but also that the source itself is trustworthy. In retrieval processes involving multi-source knowledge bases, source credibility is one of the key indicators for judging knowledge quality; it helps ensure that retrieved knowledge sources are reliable, peer-reviewed, or from recognized academic institutions or authoritative publications; it can reduce misleading conclusions caused by low-quality or erroneous information; in multi-source knowledge base retrieval processes, when multiple search results meet the requirements of semantic relevance and domain matching, source credibility can serve as a standard for further screening and ranking. Credibility of the source It is obtained by weighted summation of journal impact score, citation count score, and publication date score; The journal impact score is quantified using the journal's impact factor, as detailed below: ,in Rate the journal's impact. The impact factor of the target journal. The impact factor is the highest level of citations a journal receives in the past two years, which is the ratio of the number of times the journal has been cited to the number of articles published in that journal during the same period. The citation score refers to the ratio of the number of times a document is cited to the maximum number of citations in the target field. The publication date score refers to the time difference between the publication date of the document and the current time; The semantic relevance, domain matching degree, and source credibility are normalized, units and dimensions are removed, and then weighted and summed to obtain the retrieval quality score: In the formula To retrieve quality scores, For semantic relevance, For domain matching degree, To ensure the credibility of the source, These represent preset proportional coefficients for semantic relevance, domain matching, and source credibility, respectively. All are greater than 0; Based on the calculated search quality score, the search results are sorted, and a set of search knowledge that meets the quality requirements is selected: the search quality score is compared with the search quality score threshold, the search results are traversed, and the search results with a search quality score less than the search quality score threshold are removed, while the search results with a search quality score greater than or equal to the search quality score threshold are retained to obtain the search knowledge set.

[0021] Under the constraints of the retrieved knowledge set, and according to the preset style rules and chapter structure template, a partial writing outline for each chapter is generated. Based on the partial writing outline and the retrieved knowledge set, a first draft of the full text is generated, as follows: By loading the configuration file, the preset style rules and chapter structure templates are obtained, the writing style and format requirements of each chapter are defined, the target writing task of each chapter is retrieved from the writing task decomposition results, and information retrieval technology is used to select literature, technical terms and theoretical content that meet the target writing task from the retrieved knowledge set according to the target writing task of the chapter, so as to ensure that the content of each chapter is closely connected with the information in the knowledge base. It should be noted that information retrieval technology refers to the analysis and filtering of text in a knowledge base using keyword-based retrieval algorithms and semantic retrieval models to extract relevant academic literature, technical terms, and theoretical content. These technologies help to quickly find the information that best matches the chapter's objectives from a large amount of literature. Examples include TF-IDF, BM25, BERT, and Sentence-BERT. These information retrieval technologies are existing and mature, so they will not be elaborated upon further. Based on the preset chapter structure template, and combined with the target writing task literature, technical terms and theoretical content selected from the retrieved knowledge set, a partial writing outline for each chapter is generated. At the same time, the generative model is used to combine the partial writing outline with the selected target writing task literature, technical terms and theoretical content to generate the preliminary text of each chapter, ensuring that the content is accurate and the logic is clear. It should be noted that generative models refer to pre-trained generative models that generate initial drafts. These models can generate coherent paragraphs based on given input text (such as partial writing outlines and relevant literature). This generation process can automatically organize content and generate clear logical structures and natural language text. For example, ChatGPT, BART, and other such generative models are existing mature technologies, so they will not be elaborated upon further. Using a style conversion algorithm, the writing style of each chapter is adjusted according to preset style rules to ensure a consistent document style and ultimately generate a full draft.

[0022] It should be noted that style conversion algorithms refer to adjusting generated text through text style adjustment models to ensure that the language style meets requirements such as academic rigor, conciseness, and formality. These algorithms can adjust tone, sentence structure, and vocabulary while preserving the original content to meet different stylistic needs, such as CTRL or UniLM. The aforementioned style conversion algorithms are existing mature technologies and will not be elaborated upon further. The quality optimization information of the full draft is obtained, the quality optimization coefficient is calculated, the segment to be optimized is located based on the quality optimization coefficient, and the segment to be optimized is iteratively rewritten to generate an optimized manuscript that meets the quality optimization coefficient threshold.

[0023] The quality optimization information includes context relevance coefficient, completeness coefficient, and readability coefficient; In this embodiment of the invention, the context relevance coefficient is used to measure the semantic consistency and logical fluency between different parts of a text, especially in multi-paragraph or long texts, to assess the relevance and connectivity between paragraphs or sentences. A high context relevance coefficient indicates that the different parts of the text are consistent and coherent in terms of theme, semantics, and information expression. The core of the context relevance coefficient is semantic consistency, which reflects the degree of semantic connection between different paragraphs, sentences, or text fragments. This coefficient helps ensure that the content is related and the information is delivered clearly and fluently during the writing process, avoiding reader confusion due to information breaks or logical jumps. The logic for obtaining the context relevance coefficient is as follows: Index and label the sentences in the initial draft of the full text, and mark the text vector of each sentence as follows: And calculate the context relevance coefficient based on the semantic similarity between different statements: ,in For context-related coefficients, Let j be the text vector containing the content of the j-th statement. Let h be the text vector of the h-th statement, and N be the total number of statements in the first draft of the full text. In this embodiment of the invention, the completeness coefficient is used to measure whether the text contains all the necessary information and details, especially whether the target content is fully covered according to the predetermined structure and theme during the writing process. The completeness coefficient reflects the degree of information coverage in the text, ensuring that the core content of each chapter or paragraph is fully developed without omitting key details, background information, or arguments; The logic for obtaining the completeness coefficient is as follows: Keyword extraction was performed on the partial writing outlines of each chapter, and a target keyword set was created. Let M represent the total number of keywords, and each keyword... This represents the content mentioned in the partial writing outline of each chapter; It should be noted that keyword extraction algorithms are used to extract representative and important words from the local writing outline of each chapter. These words are usually closely related to the theme of the chapter. For example, the TextRank algorithm and the TF-IDF algorithm are existing mature technologies, so they will not be described in detail. Use indicator functions to identify whether the initial draft of the full text contains keywords from the local writing outlines of each chapter: ; And calculate the completeness coefficient based on the number of representations of the indicator functions: ,in The completeness coefficient. for The statistical quantity, for Statistical count; In this embodiment of the invention, the readability coefficient is an indicator used to measure the readability of text. It considers factors such as text structure, language complexity, sentence length, and lexical diversity, aiming to help assess the ease of reading a document. A higher readability coefficient indicates that the text is easier to understand and more suitable for a wider readership. The readability coefficient It is obtained by weighted summation of average sentence length and average word length; Average sentence length is an important factor affecting readability; longer sentences are often more difficult to understand. Average sentence length reflects the complexity of sentences in a text, and the specific calculation formula is as follows: ,in For average sentence length, Let N be the word count of the j-th sentence in the first draft of the full text, and N be the total number of sentences in the first draft of the full text. Average word length is an important indicator of readability. Longer words are generally more difficult to understand, especially when they appear frequently in the text. Average word length is used to represent the average length of words in the text, and the specific calculation formula is as follows: ,in The average word length, The length of the g-th word in the initial draft of the full text, expressed in characters. This represents the total number of words in the initial draft of the full text. The context relevance coefficient, completeness coefficient, and readability coefficient are normalized, units and dimensions are removed, and then weighted and summed to obtain the quality optimization coefficient: In the formula For quality optimization coefficients, For context-related coefficients, The completeness coefficient. Readability score These represent the preset proportional coefficients for context relevance, completeness, and readability, respectively. All are greater than 0; Based on the quality optimization coefficient, the segment to be optimized is located, and the segment is iteratively rewritten to generate an optimized manuscript that meets the quality optimization coefficient threshold, as follows: The quality optimization coefficient is compared with a preset quality optimization coefficient threshold. If the quality optimization coefficient is less than the threshold, optimization continues. Using each piece of information in the quality optimization coefficient, the specific segments in the initial draft that need optimization can be located. This can be done based on the following criteria: Semantic similarity-based segment localization: Analyze the semantic similarity between sentences in the text, identify sentence pairs or paragraph pairs with low semantic similarity, and find paragraphs or sentences in the text with large semantic inconsistencies or logical jumps based on the low semantic similarity value, and mark them as segments to be optimized. Completeness-based optimization segment location: Perform keyword matching on each chapter, analyze which chapters or paragraphs are missing some important keywords, find chapters or paragraphs with more missing keywords, and mark them as segments to be optimized. Readability-based optimized segment location: Marking long sentences, complex sentences, or parts of the text that use long words; If the quality optimization coefficient is greater than or equal to the quality optimization coefficient threshold, the current manuscript quality is considered to meet the requirements, and the optimization process ends. By iteratively rewriting the fragments to be optimized and modifying the unqualified parts, until the quality optimization coefficient reaches the preset quality optimization coefficient threshold, an optimized manuscript that meets the requirements is generated.

[0024] The intelligent writing method based on multi-source knowledge base enhancement provided by this invention effectively solves the problems of limited knowledge sources, low quality of generated content, and insufficient integration of multi-source knowledge in existing technologies. By comprehensively collecting structured, semi-structured, and unstructured multi-source knowledge data, and combining it with the construction of semantic vector libraries and knowledge graphs, it can efficiently integrate rich knowledge resources such as standards and specifications, technical manuals, and domain papers in writing tasks, greatly improving the factual accuracy, terminology professionalism, and argumentation depth of the generated text. Furthermore, by decomposing the writing task, it can identify and accurately extract the key points of each chapter, thereby optimizing the understanding of the writing structure and avoiding the logical inconsistency problems caused by vague retrieval targets in traditional methods. Moreover, by introducing semantic relevance, domain matching, and source availability into the retrieval process... Reliability and other retrieval quality information can not only accurately filter out knowledge content highly relevant to the task objective, but also ensure the reliability and authority of the cited information, preventing the emergence of illusory text during the generation process. During the generation process, combining the hierarchical structure and causal relationship of multi-source knowledge can more reasonably construct the writing outline and generate the first draft of the full text, ensuring the coherence and depth of the text. Finally, based on the self-correction mechanism of the quality optimization coefficient, the quality of the full text can be evaluated in real time, and the segments to be optimized can be located. Through iterative rewriting, the quality of the generated content can be ensured to meet the preset standards. This method combines knowledge fusion, writing structure understanding and quality self-correction to form a closed-loop optimization system, which greatly improves the accuracy, consistency and professionalism of intelligent writing and solves the problem of insufficient collaboration between multi-source knowledge and intelligent writing in existing methods.

[0025] Example 2: This example introduces an intelligent writing system based on multi-source knowledge base enhancement, such as... Figure 2 As shown, it includes a knowledge base construction module, a writing task decomposition module, a search quality screening module, a first draft generation module, and a first draft quality optimization module; The knowledge base construction module is used to collect structured, semi-structured, and unstructured multi-source knowledge data, construct a semantic vector library and a knowledge graph, and obtain a multi-source knowledge base. The writing task decomposition module is used to obtain the writing task instructions input by the user, decompose the writing task instructions into writing tasks, and obtain the writing task decomposition results. The retrieval quality screening module is used to perform retrieval in a multi-source knowledge base based on the writing task decomposition results, and to obtain retrieval quality information during the retrieval process to calculate the retrieval quality score. The retrieval quality information includes semantic relevance, domain matching degree, and source credibility. The retrieval quality score is used to filter out the retrieval knowledge set of the target chapter. The first draft generation module is used to generate partial writing outlines for each chapter under the constraints of the retrieved knowledge set, according to preset style rules and chapter structure templates, and generate full-text first drafts based on the partial writing outlines and the retrieved knowledge set. The first draft quality optimization module is used to obtain the quality optimization information of the full text first draft and calculate the quality optimization coefficient. The quality optimization information includes the context relevance coefficient, the completeness coefficient, and the readability coefficient. Based on the quality optimization coefficient, the module locates the segment to be optimized and iteratively rewrites the segment to be optimized to generate an optimized manuscript that meets the quality optimization coefficient threshold.

[0026] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0027] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0028] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0029] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system and method described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0030] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways.

[0031] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An intelligent writing method based on multi-source knowledge base enhancement, characterized by: Includes the following steps: Collect structured, semi-structured, and unstructured multi-source knowledge data, construct a semantic vector library and knowledge graph, and obtain a multi-source knowledge base; Obtain the writing task instructions input by the user, and decompose the writing task instructions into writing tasks to obtain the writing task decomposition results. Based on the results of the writing task decomposition, a search is conducted in a multi-source knowledge base, and the search quality information during the search process is obtained to calculate the search quality score. Based on the search quality score, the search knowledge set for the target chapter is selected. Under the constraints of the retrieved knowledge set, according to the preset style rules and chapter structure template, a partial writing outline for each chapter is generated, and a full draft is generated based on the partial writing outline and the retrieved knowledge set. The quality optimization information of the full draft is obtained, the quality optimization coefficient is calculated, the segment to be optimized is located based on the quality optimization coefficient, and the segment to be optimized is iteratively rewritten to generate an optimized manuscript that meets the quality optimization coefficient threshold.

2. The intelligent writing method based on multi-source knowledge base enhancement according to claim 1, characterized in that: The writing task instructions input by the user include the writing topic, writing type, target chapter structure, and specific constraints. Natural language processing technology is used to parse the writing task instructions input by the user and extract the elements of the writing task instructions, including: task theme extraction, text type identification, chapter structure identification, and constraint condition extraction. The writing task instructions are analyzed to obtain the writing theme, genre, chapter structure, and constraints. Based on the parsing results of the writing task instructions, the writing task instructions are decomposed into writing tasks, including: chapter decomposition, paragraph decomposition, task priority and dependency relationship; The results of breaking down the writing task are transformed into a structured target writing task.

3. The intelligent writing method based on multi-source knowledge base enhancement according to claim 1, characterized in that: The retrieval quality information includes semantic relevance, domain matching degree, and source credibility.

4. The intelligent writing method based on multi-source knowledge base enhancement according to claim 3, characterized in that: The logic for obtaining semantic relevance is as follows: the target writing task text is labeled as a target text vector. The search text to be retrieved is marked as a search text vector. Calculate semantic relevance: ,in This represents semantic relevance.

5. The intelligent writing method based on multi-source knowledge base enhancement according to claim 3, characterized in that: The logic for obtaining domain matching degree is as follows: The frequency of word i is calculated by counting the number of times word i appears in the target writing task text and then dividing the number of times word i appears by the total number of words in the target writing task text. Simultaneously calculate the inverse document frequency of word i in the target writing task text: ,in The inverse document frequency of word i in the text for the writing task. The total number of documents in the text for the writing task to the target. The number of words i contained in the document; Multiplying the term frequency and inverse document frequency of the target writing task text yields the term frequency-inverse document frequency. ; The frequency of word i is calculated by counting the number of times word i appears in the text to be retrieved and then dividing the number of times word i appears by the total number of words in the text. ; Simultaneously calculate the inverse document frequency of word i in the text to be retrieved: ,in The inverse document frequency of word i in the text to be retrieved. This represents the total number of documents in the text to be searched. The number of words i contained in the document; Multiplying the term frequency and inverse document frequency of the text to be retrieved yields the term frequency-inverse document frequency. ; Domain matching degree is calculated based on term frequency-inverse document frequency: ,in The total number of words in the text for the writing task.

6. The intelligent writing method based on multi-source knowledge base enhancement according to claim 3, characterized in that: Credibility of the source It is obtained by weighted summation of journal impact score, citation count score, and publication date score; The journal impact score is quantified using the journal's impact factor, as detailed below: ,in Rate the journal's impact. The impact factor of the target journal. The impact factor is the highest level of citations a journal receives in the past two years, which is the ratio of the number of times the journal has been cited to the number of articles published in that journal during the same period. The citation score refers to the ratio of the number of times a document is cited to the maximum number of citations in the target field. The publication date score refers to the time difference between the publication date of the document and the current time.

7. The intelligent writing method based on multi-source knowledge base enhancement according to claim 3, characterized in that: The semantic relevance, domain matching degree, and source credibility are normalized, units and dimensions are removed, and then weighted and summed to obtain the retrieval quality score. Based on the calculated search quality score, the search results are sorted, and a set of search knowledge that meets the quality requirements is selected: the search quality score is compared with the search quality score threshold, the search results are traversed, and the search results with a search quality score less than the search quality score threshold are removed, while the search results with a search quality score greater than or equal to the search quality score threshold are retained to obtain the search knowledge set.

8. The intelligent writing method based on multi-source knowledge base enhancement according to claim 1, characterized in that: The quality optimization information includes context relevance coefficient, completeness coefficient, and readability coefficient.

9. The intelligent writing method based on multi-source knowledge base enhancement according to claim 8, characterized in that: The context relevance coefficient, completeness coefficient, and readability coefficient are normalized, units and dimensions are removed, and then weighted and summed to obtain the quality optimization coefficient. Based on the quality optimization coefficient, the segment to be optimized is located, and the segment is iteratively rewritten to generate an optimized manuscript that meets the quality optimization coefficient threshold, as follows: The quality optimization coefficient is compared with the preset quality optimization coefficient threshold. If the quality optimization coefficient is less than the quality optimization coefficient threshold, optimization continues. If the quality optimization coefficient is greater than or equal to the quality optimization coefficient threshold, the current manuscript quality is considered to meet the requirements, and the optimization process ends.

10. An intelligent writing system based on multi-source knowledge base enhancement, used to implement the intelligent writing method based on multi-source knowledge base enhancement as described in any one of claims 1-9, characterized in that: It includes modules for knowledge base construction, writing task decomposition, search quality screening, draft generation, and draft quality optimization. The knowledge base construction module is used to collect structured, semi-structured, and unstructured multi-source knowledge data, construct a semantic vector library and a knowledge graph, and obtain a multi-source knowledge base. The writing task decomposition module is used to obtain the writing task instructions input by the user, decompose the writing task instructions into writing tasks, and obtain the writing task decomposition results. The retrieval quality screening module is used to search in a multi-source knowledge base based on the results of the writing task decomposition, obtain retrieval quality information during the retrieval process, calculate the retrieval quality score, and filter out the retrieval knowledge set of the target chapter based on the retrieval quality score. The first draft generation module is used to generate partial writing outlines for each chapter under the constraints of the retrieved knowledge set, according to preset style rules and chapter structure templates, and generate full-text first drafts based on the partial writing outlines and the retrieved knowledge set. The draft quality optimization module is used to obtain quality optimization information of the full draft, calculate the quality optimization coefficient, and iteratively rewrite the segments to be optimized to generate optimized manuscripts that meet the quality optimization coefficient threshold.