A quality state evaluation and local regeneration method for document chapter generation

CN123013873APending Publication Date: 2026-10-30CHINA UNIV OF GEOSCIENCES (WUHAN) +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611515094.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]本发明的主要目的在于提供一种面向文档章节生成的质量状态评估与局部重生成方法,解决专业方案文档章节智能生成场景下生成质量无法结构化量化评估、缺陷难以精准分类定位的问题

Benefits of technology

1、本发明将主观质量判断转化为可复现、可计算的结构化评估结果,通过参数完整度、模板结构匹配度、知识内容覆盖度、待补充内容占比和章节完整性五维质量特征的综合评分机制,使得质量评估从经验判断转变为数学计算,确保了评估结果的客观性和一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123013873A_ABST
    Figure CN123013873A_ABST
Patent Text Reader

Abstract

The application provides a quality state evaluation and local regeneration method for document chapter generation, and belongs to the technical field of professional document intelligent generation. The method comprises the following steps: structurally analyzing chapter content to obtain a chapter content unit set and a multi-dimensional dependency graph; calculating a chapter quality state based on multi-dimensional features; determining a defect seed set when the quality state is abnormal; performing defect influence value propagation calculation on the multi-dimensional dependency graph according to the defect seed set to determine a local regeneration range; and performing local regeneration under the constraint of chapter content not included in the local regeneration range. The application converts subjective quality judgment into reproducible structured evaluation results, realizes accurate classification and positioning of defect types and positions, scientifically limits the local repair boundary through the multi-dimensional dependency graph, and constructs a complete closed-loop control from defect identification to repair verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent professional document generation technology, and in particular to a method for quality status assessment and local regeneration of document chapters. Background Technology

[0002] With the large-scale application of big language models and retrieval-enhanced generation technologies in professional document preparation scenarios, automatically generating chapters of professional solution documents based on template nodes, project context, and knowledge retrieval results has become an important technical means to improve preparation efficiency. However, professional solution documents are characterized by strong template constraints, dense parameter elements, and complex knowledge reference relationships. AI-generated results are prone to quality anomalies such as missing parameters, insufficient knowledge coverage, template structure deviation, and redundant content to be supplemented.

[0003] In existing technologies, CN110968997B discloses a highly controllable document generation method. This method constructs a Word template library and a matching template description file, predefines input constraints and fill positions for data entry items, automatically generates a data entry interface with verification components, and completes format compliance verification during the data import stage, achieving parameterized and controllable generation of fixed template documents. Although this technology effectively solves the problem of data entry accuracy in templated documents and achieves strong constraints on parameter format and fill positions from the generation source, it focuses on data verification and format control in the pre-generation entry stage. It lacks targeted solutions for content quality assessment and automated repair of chapters generated by large models, and cannot identify generation-related quality problems such as insufficient knowledge coverage, missing template structure, and lack of content completeness. It is also difficult to meet the need for efficient repair of defects in AI-generated content.

[0004] To improve the quality and reliability of AI-generated documents, the existing technology CN121188187B discloses an intelligent document generation system and method based on generative artificial intelligence. This system obtains a high-fidelity structural baseline by parsing templates through both logical structure and visual layout. It also generates structured feedback information by combining dual verification of content accuracy and structural consistency, driving the generation module to iteratively correct itself, thus giving the AI ​​system the ability to self-check and self-correct. While this technology introduces a closed-loop verification mechanism, which improves the quality and stability of generated documents to some extent, its quality verification dimensions are relatively singular, only covering the factual accuracy of content and the consistency of layout structure. It does not establish a multi-dimensional quantitative evaluation system for professional solution documents, including parameter completeness, knowledge content coverage, the proportion of content to be supplemented, and chapter completeness. Furthermore, the defect identification granularity is too coarse, making it impossible to classify and accurately locate different types of defects such as missing parameters, insufficient knowledge coverage, and missing template structure. It also does not establish a multi-dimensional dependency model between content units and templates, parameters, and knowledge. After quality problems are discovered, corrections are still made by regenerating entire paragraphs or chapters, making it difficult to accurately limit the scope of local repairs. This can easily lead to the repeated rewriting of qualified content, increasing the computational cost of generation, and potentially introducing new content deviations.

[0005] In summary, existing technologies in the field of intelligent generation of professional solution documents mainly suffer from problems such as a single quality assessment dimension and a lack of structured quantitative standards, difficulty in accurately classifying and locating defect types and locations, lack of multi-dimensional dependencies leading to blurred boundaries of local repair, lack of scientific methods for defining the scope of local regeneration, and imperfect closed-loop control mechanisms for local repair. These issues make it difficult to achieve high-quality and low-cost optimization of chapter content while ensuring the consistency of the entire document. Summary of the Invention

[0006] The main objective of this invention is to provide a quality status assessment and local regeneration method for document chapter generation, addressing the problems of unstructured and quantifiable quality assessment and precise defect classification and location in intelligent document chapter generation scenarios for professional solutions. It transforms subjective quality judgments into reproducible and computable structured assessment results, and utilizes a threshold difference method to automatically classify defect types and perform structured reverse mapping to accurately locate defect positions.

[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for quality status assessment and local regeneration of document chapters, comprising the following steps: S1. Perform structured parsing on the obtained chapter content to obtain a set of chapter content units and a multi-dimensional dependency graph; S2. Calculate the chapter quality status based on the multi-dimensional features of the chapter content unit set; S3. When there is an anomaly in the quality status of a chapter, determine the set of defect seeds; S4. Based on the defect seed set, calculate the defect impact value propagation on the multi-dimensional dependency graph to determine the local regeneration range; S5. Based on the local regeneration scope, perform local regeneration under the constraint of preserving chapter content not included in the local regeneration scope to obtain the updated chapter content.

[0008] Preferably, the multi-dimensional dependency graph includes: a vertex set composed of chapter content unit sets, a parent-child hierarchical dependency edge set, a sequential dependency edge set between sibling content units, a parameter reference dependency edge set, a knowledge evidence dependency edge set, and a template node mapping edge set.

[0009] Preferably, in step S2, the multi-dimensional features include parameter completeness, template structure matching degree, knowledge content coverage, proportion of content to be supplemented, and chapter completeness.

[0010] Preferably, in step S2, the chapter quality status is calculated using a weighted comprehensive scoring method, and the calculation formula is as follows: ; in, This represents the chapter's quality rating, with a value ranging from 0 to 1. Indicates parameter completeness. Indicates the template structure matching degree. Indicates the coverage of knowledge content. This indicates the percentage of content to be supplemented. Indicates chapter completeness. , , , and These are the weight coefficients of the five-dimensional quality characteristics, and they satisfy... .

[0011] Preferably, in step S3, determining the defect seed set includes: Calculate the vector difference between each quality characteristic and its corresponding standard threshold. ,in, , , , , ; The difference vector is normalized, and the defect type is determined based on the dimension type corresponding to the largest positive value in the normalized difference vector. Defect severity is determined based on the normalized difference magnitude, when It was determined to be a serious defect at that time. It was judged to be a medium defect at that time. It was determined to be a minor defect at the time; By using a multi-dimensional dependency graph for structured reverse mapping, the content units corresponding to the defect locations are marked as defect seed sets.

[0012] Preferably, in step S4, the calculation of defect impact value propagation includes: Using the content units in the defect seed set as seed nodes, a breadth-first search is performed on the multi-dimensional dependency graph. The traversal depth is determined by the severity of the defect: the traversal depth of severe defects is 3 layers, the traversal depth of medium defects is 2 layers, and the traversal depth of minor defects is 1 layer. Path filtering is performed based on the type and propagation weight of dependency edges. The propagation weight of parameter reference edges is 0.8, the propagation weight of knowledge reference edges is 0.6, and the propagation weight of template order edges is 0.4. Only dependency edges with a propagation weight greater than 0.5 are traversed. The content units reached during traversal are included in the local regeneration range set, and the cumulative value of the path propagation weight of each content unit to the defect seed node is recorded as the regeneration priority coefficient. Perform boundary closure checks on the locally regenerated range set, and when semantic truncation exists, include the content units adjacent to the truncation point into the range set; When the number of content units in the local regeneration range set exceeds 40% of the total number of chapter content units, content units are removed from low to high according to the regeneration priority coefficient until the proportion drops below 40%.

[0013] Preferably, in step S5, the specific method for calculating the propagation of defect effects on the multi-dimensional dependency graph to determine the local regeneration range is as follows: Using the content unit at the defect location as the seed node, a breadth-first search is performed along the dependency edges in the multi-dimensional dependency graph, and the traversal depth is determined by the defect severity. Path filtering is performed based on the type and propagation weight of dependency edges, and only dependency edges with propagation weights greater than a preset value are traversed. Include all content units reached during traversal into the locally regenerated range set; Perform boundary closure checks on the locally regenerated range set. If semantic truncation exists, include the content units adjacent to the truncation point into the range set. Set an upper limit constraint on the local regeneration range. When the number of content units in the range set exceeds a preset percentage of the total number of chapter content units, a range shrinkage mechanism is triggered.

[0014] Preferably, in step S5, local regeneration includes: Construct local regeneration prompts, which include a context-preserving part, a defect repair instruction part, and an output format constraint part; The locally regenerated prompt words are input into the large language model to generate new content units; The newly generated content units replace the original content units in the locally regenerated range set, forming an updated set of chapter content units. Perform a consistency check, which includes detecting the semantic coherence at the replacement boundary, detecting whether the quality features of the chapter after replacement meet the standard threshold, and detecting whether the multi-dimensional dependency graph after replacement maintains connectivity. When the consistency check passes, the updated chapter content is output. When the consistency check fails, the iterative repair mechanism is triggered, and the local regeneration is re-executed until the check passes or the preset maximum number of iterations is reached.

[0015] Preferably, the defect types include parameter missing type, template structure deviation type, insufficient knowledge coverage type, redundant content to be supplemented type, and lack of chapter completeness type.

[0016] Preferably, the formula for calculating parameter completeness is as follows: ,in This represents the number of generated parameters that have been successfully populated. The total number of generation parameters defined for the template node; The formula for calculating the template structure matching degree is as follows: ,in This is a structure matching function for content units and their corresponding template nodes. This represents the total number of content units; The formula for calculating knowledge content coverage is: ,in This represents the number of knowledge points that have been cited and covered. The total number of knowledge points returned in the knowledge retrieval results; The formula for calculating the percentage of content to be supplemented is: ,in The total length of the text marked as to be supplemented. The total text length of the initial content of the chapter; The formula for calculating chapter completeness is: ,in This represents the actual number of paragraph types contained in the chapter. The required number of paragraph types specified for template nodes. This refers to the length of the text used to establish logical breaks between chapters and the preceding and following chapters.

[0017] Beneficial effects: 1. This invention transforms subjective quality judgments into reproducible and calculable structured evaluation results. Through a comprehensive scoring mechanism based on five quality characteristics—parameter completeness, template structure matching degree, knowledge content coverage, proportion of content to be supplemented, and chapter completeness—quality evaluation is transformed from experience-based judgment to mathematical calculation, ensuring the objectivity and consistency of the evaluation results.

[0018] 2. The multi-dimensional dependency graph of this invention includes a vertex set composed of chapter content units, a parent-child hierarchical dependency edge set, a sequential dependency edge set between sibling content units, a parameter reference dependency edge set, a knowledge evidence dependency edge set, and a template node mapping edge set. Through explicit modeling of six types of dependency edges, it provides a structured data foundation for the scientific delimitation of the local regeneration range.

[0019] 3. This invention uses a normalized difference vector to determine the dominant defect type, classifying defect types into parameter missing type, template structure deviation type, knowledge coverage insufficient type, redundant content to be supplemented type, and chapter incomplete type. Based on a multi-dimensional dependency graph, it performs structured reverse mapping, improving the defect location accuracy from the chapter level to the content unit level, thus achieving accurate classification and location of defect type and defect location.

[0020] 4. In the process of local regeneration, this invention retains the chapter content not included in the scope of local regeneration as contextual constraints. After the content replacement is performed, the semantic coherence at the replacement boundary, whether the quality features of the replaced chapter meet the standard threshold, and whether the multi-dimensional dependency graph after replacement maintains connectivity are detected. When the consistency check fails, an iterative repair mechanism is triggered, thus constructing a complete closed-loop control from defect identification to repair verification, ensuring the consistency of the entire text content. Attached Figure Description

[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart of the overall method of the present invention; Figure 2 This is a flowchart of the quality status generation process of this invention. Figure 3 This is a flowchart of the defect type identification and defect location determination process of the present invention; Figure 4 This is a flowchart of the process for determining the local regeneration range of the present invention; Figure 5 This is a flowchart of the partial regeneration and content replacement process of this invention. Detailed Implementation

[0022] Example 1 like Figure 1 As shown, a method for evaluating the quality status of document chapter generation includes the following steps: S1. Obtain the template node, generation parameters, project context and knowledge retrieval results corresponding to the chapter to be generated, and generate the initial content of the chapter; S2. Perform structured parsing on the initial content of the chapter to obtain the set of chapter content units, template node mapping results, and multi-dimensional dependency graph; S3. Extract chapter quality features such as parameter completeness, template structure matching degree, knowledge content coverage, proportion of content to be supplemented, and chapter completeness from the set of chapter content units, and calculate the chapter quality status based on the chapter quality features; S4. When there is an abnormality in the quality status of a chapter, determine the defect type, defect severity, and defect location.

[0023] This embodiment provides a method for quality status assessment and partial regeneration of document chapters. First, during the content generation phase, the system obtains the template node, generation parameters, project context, and knowledge retrieval results corresponding to the chapter to be generated, and then generates the initial content of the chapter using a large language model. Specifically, the template node defines the structural position, heading level, and preset paragraph framework of the chapter within the document template; the generation parameters include the specific numerical parameters, enumerated options, and conditional constraints required to fill in the chapter; the project context covers the type, scale, geographical location, and applicable regulations and standards of the current engineering project; and the knowledge retrieval results consist of relevant technical specifications, standard provisions, and historical case fragments retrieved from the enterprise knowledge base or external regulatory database. The system combines these four types of input information into structured prompts and calls the large language model to generate the initial content of the chapter.

[0024] After content generation is complete, the system enters the structured parsing phase. This embodiment performs multi-level structured parsing on the initial chapter content to establish multi-dimensional dependencies between content units and templates, parameters, and knowledge. Specifically, the system first segments the initial chapter content into sentences and paragraphs, identifying a set of chapter content units at the paragraph level. ,in Indicates the first Each content unit is then mapped to a predefined paragraph frame within the template node. ,in For template node set, For the first Each template node. Finally, the system constructs a multi-dimensional dependency graph, which uses content units as vertices and parameter reference relationships, knowledge reference relationships, and template structure order relationships between content units as edges, forming a directed acyclic graph structure. ,in It is a set of dependency edges.

[0025] After structured parsing is completed, the system enters the quality feature extraction and quality status calculation stage. This embodiment extracts five-dimensional chapter quality features based on the set of chapter content units, specifically including: Parameter completeness measures the degree to which generated parameters are fully populated in the initial content of a chapter. The system iterates through all generated parameters defined in the template nodes, checking the presence of each parameter in the chapter content unit set. The formula for calculating parameter completeness is: ; in, Represents parameter completeness. This represents the number of generated parameters that have been successfully populated in the initial content of the chapter. The total number of generation parameters defined for the template node. When When, it means all parameters have been fully filled; when When the value is zero, it indicates that a parameter is missing.

[0026] Template structure matching degree measures the degree to which the paragraph structure of the initial content of a chapter matches the preset framework of the template nodes. The system compares the paragraph hierarchy, heading sequence, and paragraph order of the chapter content unit set with the template node mapping results. The formula for calculating the template structure matching degree is: ; in, Represents the template structure matching degree. For content units With the corresponding template node The structure matching function takes a value of 1 when the heading level, paragraph type, and sequence position of the content unit match the template node; otherwise, it takes a value of 0. This represents the total number of content units.

[0027] Knowledge content coverage measures the degree to which the initial content of a chapter references and covers the knowledge retrieval results. The system semantically matches key knowledge points in the knowledge retrieval results with the set of chapter content units. The formula for calculating knowledge content coverage is: ; in, Represents the coverage of knowledge content. This represents the number of knowledge points already referenced and covered in the initial content of the chapter. The total number of knowledge points returned in the knowledge retrieval results.

[0028] The "Please Addition Content Ratio" measures the proportion of placeholder content marked as "Please Addition Content" in the initial content of a chapter. The system detects text fragments in the chapter content unit set that contain tags such as "Please Addition," "Please Improve," or similar labels. The formula for calculating the "Please Addition Content Ratio" is as follows: ; in, This represents the percentage of content that needs to be supplemented. The total length of the text marked as to be supplemented. The total length of the initial text of the chapter.

[0029] Chapter integrity measures the logical closure of the initial content of a chapter within the overall document structure. The system checks whether the initial content of a chapter includes a complete introduction, main body, and conclusion paragraphs, and whether the chapter's connection with preceding and following chapters is complete. The formula for calculating chapter integrity is: ; in, Represents the completeness of the chapter. This represents the actual number of paragraph types contained in the chapter. The required number of paragraph types specified for template nodes. This refers to the length of the text used to establish logical breaks between chapters and the preceding and following chapters.

[0030] After extracting the five-dimensional chapter quality features, the system calculates the chapter quality status based on these features. This embodiment uses a weighted comprehensive scoring method to calculate the chapter quality status; the calculation formula is as follows: ; in, This represents the chapter's quality rating, with a value ranging from 0 to 1. , , , and These are the weight coefficients of the five-dimensional quality characteristics, and they satisfy... In this embodiment, the specific allocation of weighting coefficients is as follows: parameter completeness 0.25, template structure matching degree 0.20, knowledge content coverage 0.20, complement of the proportion of content to be supplemented 0.20, and chapter completeness 0.15. This weighting allocation scheme is set according to the quality assessment priority of professional solution documents. Parameter completeness is given the highest weight because missing parameters directly affect the document's executability. Template structure matching degree and knowledge content coverage are secondary, ensuring that the document conforms to the specification framework and that knowledge references are sufficient. The proportion of content to be supplemented and chapter completeness are used to evaluate the completeness and logical coherence of the content.

[0031] The system sets quality status thresholds. ,when If the chapter quality is deemed normal, the initial chapter content is output directly; if... When an anomaly is detected in the chapter's quality status, the defect diagnosis process is triggered. After an anomaly is detected, the system enters the defect diagnosis phase to determine the defect type, severity, and location. This embodiment uses a threshold difference method to automatically classify defect types, specifically executing the following algorithm logic: First, calculate the difference vector between each quality characteristic and its corresponding standard threshold: ; in, , , , , The threshold values ​​for each component are set as follows: , , , , .

[0032] Secondly, the system classifies defect types based on the sign and magnitude of each component in the difference vector: when When the value is the largest positive value in the difference vector, the defect type is determined to be parameter missing, indicating that there are unfilled generation parameters in the initial content of the chapter; when When the value is the largest positive value in the difference vector, the defect type is determined to be template structure deviation type, indicating that there is a deviation between the paragraph structure of the initial content of the chapter and the preset framework of the template node; when When the value is the largest positive value in the difference vector, the defect type is determined to be insufficient knowledge coverage, indicating that the initial content of the chapter does not fully reference the key knowledge points in the knowledge retrieval results; when When the value is the largest positive value in the difference vector, the defect type is determined to be redundant content to be supplemented, indicating that there are too many placeholder marks to be supplemented in the initial content of the chapter. when When the value is the largest positive value in the difference vector, the defect type is determined to be a chapter incompleteness type, indicating that the initial content of the chapter lacks necessary paragraph types or logical connections.

[0033] After determining the defect type, the system calculates the defect severity. This embodiment uses a severity grading method based on the difference amplitude, setting three severity levels: When the maximum positive value in the difference vector is greater than 0.30, it is judged as a serious defect, indicating that the quality feature of this dimension deviates seriously from the standard threshold and local regeneration needs to be performed immediately. When the maximum positive value in the difference vector is between 0.15 and 0.30, it is judged as a medium defect, indicating that the quality characteristic of this dimension deviates moderately from the standard threshold and local correction is required. When the maximum positive value in the difference vector is less than 0.15, it is judged as a minor defect, indicating that the quality feature of this dimension deviates slightly from the standard threshold and can be repaired through content fine-tuning.

[0034] After determining the defect type and severity, the system performs structured reverse mapping to accurately locate the defect. This embodiment utilizes the multi-dimensional dependency graph constructed in step S2. To locate defects, the system performs the following steps: When the defect type is missing parameters, it iterates through all generated parameters defined in the template nodes, checks the presence status of each parameter in the chapter content unit set, and marks the content units corresponding to missing parameters as defect locations. When the defect type is template structure deviation, the system compares the mapping results between the content unit set and the template nodes, and marks the content units with structural mismatches as defect locations. When the defect type is insufficient knowledge coverage, the system iterates through the key knowledge points in the knowledge retrieval results, checks the reference status of each knowledge point in the chapter content unit set, and marks the content units corresponding to unreferenced knowledge points as defect locations. When the defect type is redundant content to be supplemented, the system detects content units containing the "to be supplemented" mark and marks them as defect locations. When the defect type is incomplete chapter structure, the system detects content units missing necessary paragraph types or logical connection breaks and marks them as defect locations.

[0035] This embodiment demonstrates significant advantages using the aforementioned quality status assessment and defect diagnosis methods. First, by transforming subjective quality judgments into reproducible and calculable structured assessment results, it addresses the technical challenge of structurally and quantitatively assessing the quality of generated sections in intelligent professional solution document generation scenarios. The comprehensive scoring mechanism based on five-dimensional quality features transforms quality assessment from experience-based judgment to mathematical calculation, ensuring the objectivity and consistency of the assessment results. Second, the use of a threshold difference method for automatic defect classification enables accurate classification and judgment of different types of defects, such as missing parameters, template structure deviation, insufficient knowledge coverage, redundant content to be supplemented, and lack of section completeness, solving the technical problem of accurately classifying and locating defects. Finally, through a structured reverse mapping mechanism, the defect location is accurately located based on a multi-dimensional dependency graph, providing precise repair boundaries for subsequent local regeneration. This avoids the problem of repeatedly rewriting already qualified content due to regeneration of entire sections or chapters, significantly reducing the computational cost of generation.

[0036] Example 2 like Figure 2As shown, in step S1, the system obtains the template node, generation parameters, project context, and knowledge retrieval results corresponding to the chapter to be generated. The template node is defined in JSON format and includes a chapter identifier, chapter title, paragraph frame array, and generation parameter array. Each element in the paragraph frame array defines the paragraph type, heading level, content length constraint, and required tags. Each element in the generation parameter array includes a parameter name, parameter type, parameter value range, default value, and parameter constraints. The project context is stored in a key-value pair structure and includes project type, project scale, geographical location, applicable standards, and special requirements. The knowledge retrieval results are obtained through a vector database search, returning technical specification clauses, standard parameters, and historical cases related to the chapter topic. Each retrieval result includes knowledge fragment content, knowledge source identifier, and knowledge relevance score.

[0037] When the system calls the large language model to generate the initial content of a chapter, it uses a structured prompt template to populate the template nodes, generation parameters, project context, and knowledge retrieval results into a pre-defined prompt framework. The prompt framework comprises five parts: role definition, task description, input data, output format, and constraints. The role definition defines the large language model as a professional solution document writing expert; the task description clarifies the generation goal as generating chapter content that conforms to the template structure based on the given input; the input data section organizes the template nodes, generation parameters, project context, and knowledge retrieval results in JSON format; the output format section specifies that the output must be in Markdown format, including heading levels, paragraph separators, and parameter placeholders; and the constraints require that the content must be based on the knowledge retrieval results, the parameters must be fully populated, and the structure must conform to the template nodes.

[0038] In step S2, the system performs structured parsing of the initial chapter content. This embodiment employs a two-stage parsing method based on regular expressions and syntax analysis. In the first stage, the system uses regular expressions to identify heading markers, paragraph separators, and parameter placeholders in the initial chapter content, segmenting continuous text into independent content units. In the second stage, the system performs syntax analysis on each content unit, identifying the paragraph type, heading level, and parameter reference relationships. Template node mapping is implemented using a string similarity algorithm. The system calculates the edit distance between the heading of each content unit and the headings of each paragraph frame in the template node, mapping the content unit to the template node with the smallest edit distance.

[0039] The multi-dimensional dependency graph is constructed using a graph database model. The system uses content units as vertices and creates three types of dependency edges: parameter reference edges, connecting content units containing the same generation parameter; knowledge reference edges, connecting content units referencing the same knowledge retrieval result; and template order edges, connecting content units in adjacent order within the template node mapping result. The graph is stored using an adjacency list structure, with each vertex maintaining an outgoing edge list and an incoming edge list, supporting fast reverse mapping queries for defect locations.

[0040] In step S3, the system extracts five-dimensional chapter quality features. The parameter completeness is calculated using an exact string matching algorithm. The system iterates through each generated parameter defined in the template node, performs a full-text search in the chapter content unit set, and determines that the parameter has been filled when its name or value appears in the content unit. The template structure matching degree is calculated using a sequence alignment algorithm. The system compares the paragraph type sequence of the content unit with the paragraph frame type sequence of the template node, calculates the length of the longest common subsequence, and the matching degree is the ratio of the longest common subsequence length to the template node sequence length. The knowledge content coverage is calculated using a semantic similarity algorithm. The system performs semantic encoding comparison between each knowledge fragment in the knowledge retrieval results and the chapter content unit set. When the similarity exceeds the threshold of 0.75, the knowledge point is determined to have been cited. The percentage of content to be supplemented is calculated using a keyword matching algorithm. The system detects whether the content unit contains preset markers such as "to be supplemented," "to be improved," "to be confirmed," and "to be filled in," and counts the total length of the marked text. The calculation of chapter integrity uses a rule matching algorithm. The system detects whether the set of content units contains an introductory paragraph, a main body paragraph, and a conclusion paragraph, and also detects the existence of transition markers between chapters.

[0041] This embodiment, employing the quality status generation process described above, offers significant advantages. First, the two-stage structured parsing method ensures accurate identification of content units and precise mapping of template nodes, providing a reliable data foundation for subsequent quality feature extraction. Second, the construction of a multi-dimensional dependency graph establishes explicit associations between content units and templates, parameters, and knowledge, enabling structured reverse mapping for defect location. Finally, the extraction of five-dimensional quality features covers the core dimensions of professional solution document quality assessment, ensuring the comprehensiveness and accuracy of quality status calculation.

[0042] Example 3 like Figure 3 As shown, in step S4, the system performs defect type identification and defect location determination. When an anomaly exists in the quality status of a section, the system first calls the threshold difference method to automatically classify the defect type. The core of the threshold difference method lies in transforming the deviation of multi-dimensional quality features into a comparable difference vector, and determining the dominant defect type through the extreme value direction of the difference vector.

[0043] The system sets the standard threshold vector for the five-dimensional quality characteristics: ; The components correspond to the parameter completeness threshold, template structure matching threshold, knowledge content coverage threshold, percentage of content to be supplemented threshold, and chapter completeness threshold, respectively. The percentage of content to be supplemented uses a reverse threshold, meaning that a deviation is considered when the actual value exceeds the threshold.

[0044] The system calculates the difference between the current chapter's quality feature vector and the standard threshold vector: ; in, , which is the vector of actual values ​​of the five-dimensional quality features of the current chapter. Note that for the dimension of the proportion of content to be supplemented, the difference is calculated as follows: That is, the actual value minus the threshold, because the higher the proportion of content to be supplemented, the lower the quality.

[0045] The system normalizes the difference vector to eliminate differences in the dimensions: ; The normalized difference vector makes the deviations in each dimension comparable, which makes it easier to determine the dominant defect type.

[0046] The system's logic for determining the defect type is as follows: ; In other words, the defect type is the dimension type corresponding to the largest positive value in the normalized difference vector. This decision logic ensures that when multiple dimensions deviate simultaneously, the system prioritizes processing the defect type with the most severe deviation.

[0047] After determining the defect type, the system calculates the defect severity. This embodiment uses a three-level severity determination based on the normalized difference amplitude: when When this occurs, it is judged as a serious defect, corresponding to the original amplitude where the maximum positive value in the difference vector is greater than 0.30; when When the defect is classified as medium, the corresponding original amplitude with the largest positive value in the difference vector is between 0.15 and 0.30. when When the value is determined to be a minor defect, the original amplitude with the largest positive value in the difference vector being less than 0.15 is considered.

[0048] After determining the severity of the defect, the system performs precise defect location. This embodiment utilizes a multi-dimensional dependency graph. A structured reverse mapping is performed, and the specific localization algorithm is as follows: For parameter missing defects, the system executes a parameter missing location algorithm: iterates through all generated parameter sets defined in the template nodes. For each parameter In the multi-dimensional dependency graph, query the parameter reference edge. If it does not exist... If the edge is a parameter reference to the label, then determine... For missing parameters, the template node mapping result should include... The content unit is marked as the defect location; For template structure deviation defects, the system executes a structure deviation location algorithm: it identifies the paragraph type sequence specified by the template node. The actual paragraph type sequence of the content unit Perform sequence alignment to identify the locations of insertion, deletion, and replacement operations, and mark the content units where the operations occurred as defect locations; For knowledge coverage deficiencies, the system executes a knowledge gap localization algorithm: iterates through the entire set of knowledge points in the knowledge retrieval results. For each knowledge point Calculate its semantic similarity with each content unit. If the maximum similarity is below the threshold of 0.75, then it is determined that... For the knowledge points that are not covered, the template node mapping results will include the most relevant knowledge points. The content unit is marked as the defect location; For redundant defects in the content to be supplemented, the system executes a redundancy marking and localization algorithm: it traverses the set of content units, detects content units containing the content to be supplemented, and directly marks them as the defect locations; For chapter incompleteness defects, the system executes an incompleteness localization algorithm: detecting the set of required paragraph types specified by the template node. For each required paragraph type The corresponding type is searched in the content unit set. If not found, the template node mapping result should contain the relevant type. The location is marked as the defect location.

[0049] This embodiment demonstrates significant advantages using the aforementioned defect type identification and defect location determination methods. First, the threshold difference method eliminates differences in the dimensions of different quality features and threshold scales through normalization, ensuring mathematical rigor and comparability in defect type determination. Second, the three-level severity determination mechanism provides a tiered processing basis for subsequent local regeneration strategies: severe defects trigger complete local regeneration, moderate defects trigger content correction, and minor defects trigger fine-tuning optimization, achieving a rational allocation of computational resources. Finally, the structured reverse mapping mechanism, based on a multi-dimensional dependency graph, achieves precise defect location, improving defect location accuracy from the chapter level to the content unit level, providing accurate repair boundaries for local regeneration.

[0050] Example 4 like Figure 4 As shown, after the system determines the defect type, severity, and location via S4, it enters the local regeneration scope determination stage. The core of local regeneration scope determination lies in calculating the propagation range of the defect's impact based on a multi-dimensional dependency graph, thereby limiting the repair boundary and preventing already acceptable content from being rewritten repeatedly.

[0051] The system executes a local regeneration range determination algorithm, using the defect location content unit determined in step S4 as the seed node, in a multi-dimensional dependency graph. A defect propagation subgraph is constructed. The system performs a breadth-first search, starting from the seed node and traversing along the dependency edges. The traversal depth is determined by the severity of the defect: the traversal depth for severe defects is 3 levels, the traversal depth for medium defects is 2 levels, and the traversal depth for minor defects is 1 level.

[0052] During the traversal, the system filters paths based on the type and propagation weight of dependency edges. Parameter reference edges have a propagation weight of 0.8, knowledge reference edges have a propagation weight of 0.6, and template order edges have a propagation weight of 0.4. The system only traverses dependency edges with a propagation weight greater than 0.5; that is, parameter reference edges and knowledge reference edges participate in propagation, while template order edges do not. This filtering mechanism ensures that the scope of local regeneration is limited to content units with strong parameter and knowledge associations, avoiding excessive expansion of the scope due to weak template order associations.

[0053] The system incorporates all content units reached during traversal into a local regeneration range set. Simultaneously, the system records the cumulative path propagation weight of each content unit reaching the defect seed node, which serves as the regeneration priority coefficient for that content unit. The system performs boundary closure checks on the local regeneration range set. Each content unit in the local regeneration range set is traversed, and its semantic content is checked for complete paragraph semantics. If semantic truncation exists, the content units adjacent to the truncation point are included in the range set to ensure the semantic integrity of the regenerated content.

[0054] The system sets an upper limit constraint on the scope of local regeneration. When the number of content units in the scope set exceeds 40% of the total number of content units in the chapter, a scope shrinkage mechanism is triggered. The scope shrinkage mechanism removes content units according to the regeneration priority coefficient from low to high until the proportion of the scope set drops below 40%. This mechanism prevents the entire chapter from being rewritten due to excessive expansion of the local regeneration scope, ensuring the computational economy of local regeneration.

[0055] This embodiment employs the aforementioned method for determining the local regeneration range, which offers significant advantages. First, the breadth-first search algorithm based on a multi-dimensional dependency graph enables structured propagation analysis of defect impacts, transforming defect repair range determination from subjective judgment to graph traversal computation, ensuring objectivity and reproducibility in range determination. Second, the dependency edge type filtering and traversal depth grading mechanism achieves precise control over the regeneration range, allowing deeper propagation and repair for severe defects while limiting minor defects to a minimum range, thus achieving adaptive matching between repair intensity and defect severity. Finally, the 40% range upper limit constraint and boundary closure check ensure repair integrity while preventing excessive consumption of computational resources, achieving a balance between quality optimization and computational cost.

[0056] Example 5 like Figure 5 As shown, after the system determines the defect type, defect severity and defect location through S4, and obtains the local regeneration range set through the local regeneration range determination process, it enters the local regeneration and content replacement stage.

[0057] The system executes a local regeneration and content replacement algorithm to construct local regeneration prompts. These prompts consist of three parts: a context-preserving part, which includes text from content units outside the scope of local regeneration, serving as contextual constraints during large language model generation; a defect repair instruction part, which explicitly specifies the defect type, defect location, and repair requirements, such as: "Add missing parameters [parameter name]", "Adjust paragraph structure to match template nodes [node identifier]", "Add knowledge references [knowledge fragment identifier]", "Replace the marker to be added with substantive content", and "Add missing paragraph type [paragraph type]"; and an output format constraint part, which stipulates that the output must be in Markdown format compatible with the original content units, maintaining consistency in heading levels and paragraph separations.

[0058] The system invokes a large language model to perform partial regeneration. The partial regeneration prompts are input into the large language model. The model understands the overall semantics of the chapter based on contextually preserved parts, performs targeted content generation based on defect repair instructions, and ensures that the generated result is compatible with the original content structure based on output format constraints. The generated result is one or more new content units, denoted as... .

[0059] The system performs content replacement and consistency verification. The newly generated content units are then... Replace the local regeneration range set The original content units are used to form an updated set of chapter content units. After the replacement, the system performs a consistency check: it checks the semantic coherence at the replacement boundary to ensure a natural transition between the replaced and non-replaced content; it checks whether the quality features of the replaced chapter meet the standard thresholds to verify the effectiveness of the repair; and it checks whether the multi-dimensional dependency graph remains connected after the replacement to ensure the integrity of the dependencies.

[0060] When the consistency check passes, the system outputs the updated chapter content; when the consistency check fails, the system triggers an iterative repair mechanism, expands the scope of local regeneration or adjusts the defect repair instructions, and re-executes local regeneration until the check passes or the maximum number of iterations (3) is reached.

[0061] This embodiment employs the aforementioned local regeneration and content replacement method, which offers significant advantages. First, the context preservation mechanism ensures the semantic integrity of non-defective content units during local regeneration, avoiding the context loss problem caused by rewriting entire chapters. Second, the precise design of defect repair instructions enables the large language model to perform targeted repair operations, improving the accuracy and efficiency of local regeneration. Finally, the consistency verification and iterative repair mechanism construct a closed-loop control for local repair, ensuring that the repaired content meets requirements in three dimensions: semantic coherence, quality feature compliance, and dependency integrity, thus achieving a complete closed loop from defect identification to repair verification.

[0062] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.

Claims

1. A method for quality status assessment and local regeneration of document chapters, characterized in that, Includes the following steps: S1. Perform structured parsing on the obtained chapter content to obtain a set of chapter content units and a multi-dimensional dependency graph; S2. Calculate the chapter quality status based on the multi-dimensional features of the chapter content unit set. The multi-dimensional features include parameter completeness, template structure matching degree, knowledge content coverage, proportion of content to be supplemented, and chapter completeness. S3. When there is an abnormality in the quality status of a chapter, calculate the difference between each quality feature and the corresponding standard threshold and normalize it. Determine the defect type based on the dimension of the quality feature corresponding to the largest positive value in the normalized difference, and determine the severity of the defect based on the magnitude of the normalized difference. Then, use a multi-dimensional dependency graph to perform structured reverse mapping and determine the chapter content unit corresponding to the defect location as the defect seed set. S4. Using the chapter content units in the defect seed set as seed nodes, the defect impact value is propagated on the multi-dimensional dependency graph according to the propagation range determined by the defect severity. The path is filtered according to the type of dependency edge and the corresponding propagation weight. The chapter content units reached by the propagation are determined as the local regeneration range, and the boundary closure of the local regeneration range is checked. S5. Construct local regeneration prompts based on the local regeneration scope, input the local regeneration prompts into the large language model to generate new chapter content units, replace the original chapter content units within the local regeneration scope with the new chapter content units, and perform consistency checks on the replaced chapter content. Under the constraint of retaining chapter content not included in the local regeneration scope, the updated chapter content is obtained. If the consistency check fails, local regeneration is re-executed until the consistency check passes or the preset maximum number of iterations is reached.

2. The method for quality status assessment and local regeneration of document chapter generation according to claim 1, characterized in that: The multi-dimensional dependency graph includes a vertex set composed of chapter content units, a parent-child hierarchical dependency edge set, a sequential dependency edge set between sibling content units, a parameter reference dependency edge set, a knowledge evidence dependency edge set, and a template node mapping edge set.

3. The method for quality status assessment and local regeneration of document chapter generation according to claim 1, characterized in that: In step S2, the chapter quality status is calculated using a weighted comprehensive scoring method. The weighted comprehensive scoring method calculates the chapter quality status score based on the weight coefficients corresponding to parameter completeness, template structure matching degree, knowledge content coverage, proportion of content to be supplemented, and chapter completeness.

4. The method for quality status assessment and local regeneration of document chapter generation according to claim 3, characterized in that: In step S3, the defect types include parameter missing type, template structure deviation type, insufficient knowledge coverage type, redundant content to be supplemented type, and chapter incompleteness type; the severity of the defect is graded according to the normalized difference range.

5. The method for quality status assessment and local regeneration of document chapter generation according to claim 4, characterized in that: In step S3, when performing structured reverse mapping using a multi-dimensional dependency graph, the defect location is mapped to the corresponding chapter content unit according to the dependency relationship corresponding to the determined defect type, and the mapped chapter content unit is used as the defect seed set.

6. The method for quality status assessment and local regeneration of document chapter generation according to claim 1, characterized in that: In step S4, a breadth-first search is performed using the chapter content units in the defect seed set as seed nodes, and the traversal depth is determined by the defect severity. Path selection is performed based on the type and propagation weight of dependency edges. The propagation weight of parameter reference dependency edges is 0.8, the propagation weight of knowledge evidence dependency edges is 0.6, and the propagation weight of template order dependency edges is 0.

4. Dependency edges participating in the propagation of defect impact values ​​are determined according to the preset propagation weight threshold. The chapter content units reached during traversal are included in the local regeneration scope, and the cumulative value of the path propagation weight of each chapter content unit to the defect seed node is recorded as the regeneration priority coefficient.

7. The quality status assessment and local regeneration method for document chapter generation according to claim 6, characterized in that: In step S4, the boundary closure of the local regeneration range is checked. When a semantic truncation is detected in the local regeneration range, the chapter content units adjacent to the truncation point are included in the local regeneration range. When the number of chapter content units in the local regeneration range exceeds the preset proportion of the total number of chapter content units, the local regeneration range is shrunk according to the regeneration priority coefficient.

8. The method for quality status assessment and local regeneration of document chapter generation according to claim 1, characterized in that: In step S5, the local regeneration prompt information includes a context preservation part, a defect repair instruction part, and an output format constraint part; the consistency verification includes semantic coherence detection at the replacement boundary, detection of whether the quality features of the replaced chapter meet the corresponding standard threshold, and connectivity detection of the multi-dimensional dependency graph after replacement.

9. The method for quality status assessment and local regeneration of document chapter generation according to claim 1, characterized in that: The proportion of content to be supplemented is determined based on the length of the text marked as to be supplemented and the total length of the initial content of the chapter. The completeness of the chapter is determined based on the actual number of paragraph types contained in the chapter, the number of required paragraph types specified by the template node, and the length of the logical breaks between the chapter and the preceding and following chapters.

10. The method for quality status assessment and local regeneration of document chapter generation according to claim 1, characterized in that: In step S5, when the consistency check passes, the updated chapter content is output. When the consistency check fails, the corresponding chapter content units within the local regeneration range are regenerated based on the detection result of the failure of the consistency check, while the chapter content not included in the local regeneration range remains unchanged.

Citation Information

Patent Citations

  • Intelligent document generation system and method based on generative artificial intelligence

    CN121188187B