High-quality domain corpus synthesis method based on policy knowledge graph

By conducting strategic planning and quality assessment of the policy knowledge graph, high-quality domain corpora are generated, which solves the problems of insufficient semantic coherence and structure in corpus generation in existing technologies, and realizes the synthesis of high-quality, highly structured policy texts.

CN121745113APending Publication Date: 2026-03-27NINGBO QIFU NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies lack the ability to connect causal, hierarchical, and parallel relationships in policy texts when generating them, resulting in deficiencies in semantic coherence and discourse structure. Furthermore, the generation path optimization is uncontrollable, making it difficult to generate high-quality, highly structured domain corpora.

Method used

By performing strategy planning on the policy knowledge graph, extracting strategy planning parameters, traversing the graph to extract knowledge element sets, generating multiple candidate synthesis paths, and sorting and screening them according to quality assessment criteria, the knowledge elements are assembled to generate the initial synthesized corpus. Through multiple rounds of iterative evaluation and adjustment, the convergence conditions are met.

Benefits of technology

It has achieved the generation of high-quality domain-specific corpora, improved the thematic consistency and domain-specific specialization of the corpora, ensured that the synthesized corpora conform to the common paradigms of policy texts in terms of macro-structure, and achieved reasonable connection and transition of knowledge points in terms of micro-structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745113A_ABST
    Figure CN121745113A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of knowledge graph and corpus synthesis, and discloses a high-quality domain corpus synthesis method based on a policy knowledge graph. The method comprises the steps of performing policy planning on a policy knowledge graph, and extracting policy planning parameters; traversing the atlas according to the parameters, and extracting a knowledge element set; analyzing the knowledge element set to generate a plurality of candidate synthesis paths; and sorting and screening the paths according to a quality evaluation standard to determine an optimal synthesis path. And driving the knowledge elements to assemble according to the optimal path to generate an initial synthetic corpus. And performing multi-round iterative evaluation and adjustment on the initial synthetic corpus until a preset convergence condition is met, and outputting the corpus meeting the condition as a final synthetic corpus. According to the method, knowledge is extracted from the policy knowledge graph in a planning manner, contents are organized intelligently, and high-quality policy field corpora with a strict structure and coherent semantics can be generated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of knowledge graph and corpus synthesis, in particular to a high-quality field corpus synthesis method based on a policy knowledge graph. BACKGROUND

[0002] At present, automatic generation of text or corpus based on knowledge graph is a common technical direction. In professional fields such as policy and law, the usual practice is to directly obtain entities and relationships from existing knowledge graphs through rule matching, random walk or simple graph query, and then fill in predefined text templates. The knowledge graph is regarded as a static data warehouse, and the corpus generation process is weakly related to the logical structure and field characteristics inherent in the graph. The existing technology focuses on the acquisition of knowledge elements, but lacks consideration of the unique organizational logic of policy text. The generated corpus often has deficiencies in semantic coherence and structural coherence, and it is difficult to reflect the rigorous cause-and-effect, hierarchical and parallel relationships of policy text.

[0003] Another type of improvement method is to try to introduce more complex generation models. These models usually rely on large-scale general corpus training, and when generating highly specialized and structured policy domain corpus, factual errors, logical confusion or unprofessional expression problems are prone to occur. The existing scheme has defects in the optimization of the generation path. They either adopt a fixed and linear assembly order or are determined by the "black box" of the generation model, lacking a controllable and explicit quality standard-based path evaluation and selection mechanism. The quality of the final synthesized corpus is unpredictable, and it is difficult to optimize according to different synthesis goals. How to plan the extraction of knowledge from the policy knowledge graph and intelligently select and optimize the organization path of the content, so as to synthesize high-quality and structured domain corpus, has become a technical problem to be solved. SUMMARY

[0004] The purpose of the present application is to provide a high-quality domain corpus synthesis method based on a policy knowledge graph to solve the problems raised in the background art.

[0005] To achieve the above purpose, the present application provides a high-quality domain corpus synthesis method based on a policy knowledge graph, which comprises: Strategy planning is performed on the policy knowledge graph, and strategy planning parameters are extracted; According to the strategy planning parameters, the policy knowledge graph is traversed, and a knowledge element set is extracted; The knowledge element set is analyzed to generate a plurality of candidate synthesis paths; According to the quality evaluation standard, the plurality of candidate synthesis paths are sorted and selected to determine the optimal synthesis path; According to the preferred synthesis path, the driving knowledge element is assembled to generate an initial synthesis corpus; The initial synthesis corpus is subjected to multiple rounds of iterative evaluation and adjustment until the preset convergence condition is met; Output the corpus that meets the convergence condition as the final synthesis corpus.

[0006] Preferably, the policy knowledge graph is subjected to strategy planning, and strategy planning parameters are extracted, including: The graph structure of the policy knowledge graph is subjected to semantic analysis to identify core policy entities and their associated relationships; A strategy tree is constructed with the core policy entity as the root node, and different semantic expansion directions from the root node to different leaf nodes are enumerated in the strategy tree; Each semantic expansion direction in the strategy tree is configured with a weight parameter and a priority parameter, which are combined to form the strategy planning parameters.

[0007] Preferably, according to the strategy planning parameters, the policy knowledge graph is traversed to extract a knowledge element set, including: According to the weight parameter and the priority parameter in the strategy planning parameters, the starting node and the search depth for traversal in the policy knowledge graph are determined; Starting from the starting node, according to the search depth, guided graph walking is performed in the policy knowledge graph along the semantic expansion directions defined by the strategy tree; During the walking process, the attributes of the nodes, the types of the nodes, the relationship types between the nodes and their corresponding attributes are collected, and each complete walking path and the information collected thereon are encapsulated as an independent knowledge element; All independent knowledge elements generated by the walking paths are summarized to constitute the knowledge element set.

[0008] Preferably, the knowledge element set is analyzed to generate multiple candidate synthesis paths, including: The feature of each independent knowledge element in the knowledge element set is extracted to obtain the meta-feature vector of each independent knowledge element; The semantic correlation degree between the meta-feature vectors of any two independent knowledge elements is calculated; Based on the semantic correlation degree, a knowledge element correlation network is constructed, wherein the nodes are independent knowledge elements, and the weight of the edges is the semantic correlation degree; In the knowledge element correlation network, a path search algorithm is applied to find multiple subgraph paths connecting a specific number of nodes, and each subgraph path constitutes a candidate synthesis path.

[0009] Preferably, the plurality of candidate synthetic paths are ranked and screened according to the quality evaluation criteria to determine the preferred synthetic path, comprising: calculating a diversity score for each candidate synthetic path, the diversity score being based on the type distribution dispersion of independent knowledge elements in the candidate synthetic path; calculating a coherence score for each candidate synthetic path, the coherence score being based on the average semantic correlation between adjacent independent knowledge elements in the candidate synthetic path; calculating a coverage score for each candidate synthetic path, the coverage score being based on the number of core policy entities covered by the candidate synthetic path; weighting and summing the diversity score, the coherence score and the coverage score of each candidate synthetic path to obtain a comprehensive quality score; ranking all candidate synthetic paths in descending order according to the comprehensive quality score, and selecting at least one candidate synthetic path with the highest ranking as the preferred synthetic path.

[0010] Preferably, the independent knowledge elements are assembled according to the preferred synthetic path to generate an initial synthetic corpus, comprising: reading the independent knowledge elements in the path in the order of the nodes of the preferred synthetic path; filling the node attribute and relationship attribute information contained in the independent knowledge elements into the corresponding slots of the corpus template according to the preset corpus template; In the filling process, the filled slot content is subjected to lexical checking and local sentence adjustment by applying grammar rules and domain terminology dictionaries to ensure basic grammatical correctness; The contents of the corpus template after all slots are filled and adjusted are concatenated in the order of the preferred synthetic path to generate the initial synthetic corpus.

[0011] Preferably, the initial synthetic corpus is evaluated and adjusted in multiple rounds of iteration until the preset convergence condition is met, comprising: inputting the initial synthetic corpus into a pre-trained domain language model to obtain an overall semantic fluency score of the initial synthetic corpus; aligning and verifying the initial synthetic corpus with the policy knowledge graph to calculate the accuracy of the information expressed by the initial synthetic corpus and the corresponding entity relationship in the policy knowledge graph; If the overall semantic fluency score is lower than the fluency threshold, or the accuracy is lower than the accuracy threshold, an adjustment mechanism is triggered; The adjustment mechanism comprises: backtracking to the preferred synthesis path, replacing an independent knowledge element in the preferred synthesis path that causes a low score or fine-tuning the order of the independent knowledge elements in the preferred synthesis path according to the evaluation result to generate an adjusted synthesis path; According to the adjusted synthesis path, re-perform knowledge element assembly to generate a new round of synthesized corpus, and repeat the evaluation and adjustment steps until the overall semantic fluency score and accuracy of the generated synthesized corpus both reach their respective threshold values, satisfying the preset convergence condition.

[0012] Preferably, the method further comprises a cross-graph consistency enhancement step, specifically comprising: Obtaining at least one auxiliary policy knowledge graph associated with the target policy knowledge graph; Extracting key entity and relationship assertions from the final synthesized corpus that satisfies the convergence condition; Searching and verifying the key entity and relationship assertions in the at least one auxiliary policy knowledge graph; If a node or edge with semantic conflict with the key entity and relationship assertions is found in the auxiliary policy knowledge graph, the conflict information is fed back to the policy planning step as a constraint condition to update the policy planning parameters to avoid the semantic conflict in synthesis.

[0013] Preferably, the method further comprises a dynamic adaptation step of the synthesized corpus, specifically comprising: Monitoring the input requirements of the target application scenario, including corpus length range, keyword density, and style feature; Dynamically trimming or expanding the preferred synthesis path to adapt to the corpus length range; When assembling knowledge elements, dynamically selecting different corpus templates and vocabulary expression libraries according to the keyword density and style feature; In the evaluation and adjustment step, introduce a style evaluation model matching the style feature to evaluate and optimize the style compliance of the generated corpus.

[0014] Preferably, dynamically trimming or expanding the preferred synthesis path to adapt to the corpus length range comprises: Calculating the estimated corpus length corresponding to the current preferred synthesis path; Comparing the estimated corpus length with the corpus length range required by the target application scenario; If the estimated corpus length exceeds the upper limit of the corpus length range, remove at least one independent knowledge element with the lowest weight according to the weight order of the independent knowledge elements in the preferred synthesis path to realize path trimming; If the estimated corpus length is lower than the lower limit of the corpus length range, additional independent knowledge elements with the highest semantic association degree with the end node of the preferred synthesis path are selected from the knowledge element set and added to the preferred synthesis path to realize path expansion.

[0015] Compared with the prior art, the present application has the following advantages: By performing strategy planning on the policy knowledge graph and extracting parameters, the subsequent traversal and knowledge extraction of the graph are no longer random or purposeless. The strategy planning parameters can encode the extraction intent, so that the knowledge element set has inherent relevance and structural basis in the extraction stage, avoiding the information fragmentation and topic dispersion problems that may be caused by simple queries. The generated knowledge element set is more consistent with the expected theme and logical framework of the target corpus, providing semantic coherence and domain-focused raw materials for subsequent high-quality synthesis, and improving the theme consistency and domain professionalism of the synthesized corpus.

[0016] From the knowledge element set, multiple candidate synthesis paths are generated, and are sorted and selected according to the explicit quality evaluation standard, changing the uncontrollability of traditional fixed templates or end-to-end generation. The structure and organization of the corpus itself are regarded as an optimizable problem. The quality evaluation standard can quantitatively score the candidate paths from multiple dimensions such as logical order, information integrity, and emphasis degree, so as to dynamically select the optimal content assembly blueprint. According to the preferred path, the knowledge element assembly is driven, which can ensure that the generated corpus conforms to the common paradigm of policy texts in macro structure and realizes reasonable connection and transition of knowledge points in micro structure. The synthesis process is highly controllable and interpretable, which can generate corpus variants with different structures but high quality according to different quality preferences, and improves the overall quality of the final corpus in terms of chapter logic and information organization. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 The working principle diagram of the high-quality domain corpus synthesis method based on the policy knowledge graph according to the present application; Figure 2 The flowchart of the strategy planning and parameter extraction sub-module; Figure 3 The flowchart of the candidate synthesis path generation sub-module; Figure 4 The trend chart of semantic fluency and information accuracy in the policy corpus synthesis iteration process; Figure 5 The length range distribution comparison chart of the policy synthesis corpus in different application scenarios. DETAILED DESCRIPTION

[0018] 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.

[0019] Please see Figure 1 This invention provides a method for synthesizing high-quality domain corpora based on policy knowledge graphs. The method includes: performing strategy planning on the policy knowledge graph, extracting strategy planning parameters containing information such as weights and priorities during the strategy planning process; performing guided traversal on the policy knowledge graph based on the strategy planning parameters, encapsulating collected nodes, relationships, and other information into independent knowledge elements during the traversal, and forming a knowledge element set; subsequently analyzing the knowledge element set, constructing a knowledge element association network by calculating the semantic correlation between knowledge elements, and searching and generating multiple candidate synthesis paths in the network; calculating, sorting, and filtering these candidate synthesis paths according to preset quality evaluation criteria to determine the preferred synthesis path; assembling the knowledge elements in the preferred synthesis path according to the order specified therein, and filling them into a preset corpus template to generate an initial synthesized corpus; this initial synthesized corpus needs to undergo multiple rounds of iterative evaluation and adjustment, with evaluation involving semantic fluency and knowledge accuracy; if a preset threshold is not reached, an adjustment mechanism is triggered, the corpus is regenerated and evaluated after adjustment, until the convergence condition is met; and outputting the corpus that meets the convergence condition as a high-quality domain synthesized corpus.

[0020] Example 1: See Figure 2The process of strategy planning for a policy knowledge graph and extracting strategy planning parameters includes semantic parsing of the graph structure to identify core policy entities and their relationships. Using the identified core policy entities as root nodes, a strategy tree is constructed, enumerating various semantic expansion directions from the root node to different leaf nodes. Corresponding weight and priority parameters are assigned to each semantic expansion direction in the strategy tree; the combination of these parameters constitutes the strategy planning parameters. The process of traversing the policy knowledge graph and extracting a set of knowledge elements based on the strategy planning parameters includes determining the starting node and search depth for traversal based on the weight and priority parameters. Starting from the starting node, guided graph walks are performed along the semantic expansion directions defined by the strategy tree, according to the set search depth. During the walk, the attributes, node types, relationship types between nodes, and their corresponding attributes of the nodes traversed are collected. Each complete walk path and all the information collected along it are encapsulated into an independent knowledge element. The set of independent knowledge elements generated by all the traversal paths constitutes the knowledge element set.

[0021] In practical implementation, the policy knowledge graph contains multiple policy entity nodes and relational edges. The structure of the policy knowledge graph is determined through semantic parsing to identify core policy entities and their relationships. For example, in a policy knowledge graph concerning science and technology innovation policies, semantic parsing identifies R&D subsidies as a core policy entity and identifies the applicable object relationship between R&D subsidies and high-tech enterprises. In some embodiments, a strategy tree is constructed with the core policy entity as the root node, enumerating different semantic extension directions from the root node to different leaf nodes. For example, with R&D subsidies as the root node, semantic extension directions include leaf nodes such as application conditions, subsidy amount, and application process. Weight parameters and priority parameters are configured for each semantic extension direction in the strategy tree, combining to form strategy planning parameters. The weight parameters reflect the importance of the semantic extension direction in corpus synthesis, while the priority parameters determine the traversal order. Optionally, the weight parameters are calculated based on the association strength between the semantic extension direction and the core policy entity, which is measured by the attributes and node degree of the edges in the policy knowledge graph. It can be understood that the configuration of the weight and priority parameters affects the direction of subsequent graph traversal.

[0022] In practice, the policy knowledge graph is traversed based on strategy planning parameters to extract a set of knowledge elements. The starting node and search depth for traversing the policy knowledge graph are determined according to the weight and priority parameters in the strategy planning parameters. The starting node is typically a core policy entity node, and the search depth is determined by the maximum path length from the root node to a leaf node in the strategy tree. Starting from the starting node, guided graph walks are performed in the policy knowledge graph along the semantic expansion direction defined by the strategy tree, according to the search depth. The graph walk follows the semantic expansion direction in the strategy tree; for example, starting from the R&D subsidy node, the walk first moves along the application conditions direction to the enterprise qualification node, and then along the subsidy amount direction to the funding ratio node. During the walk, the attributes of the nodes traversed, node types, relationship types between nodes, and their corresponding attributes are collected. Each complete walk path and the information collected along it are encapsulated into an independent knowledge element. An independent knowledge element contains the walk path sequence and the attribute set of all nodes and relationships on the path. All independent knowledge elements generated by all walk paths are aggregated to form a knowledge element set. This knowledge element set is used for the generation of subsequent candidate synthesis paths.

[0023] To specify the configuration of the weight parameters, a formula is introduced to calculate the weights in the semantic expansion direction. Weight parameters Defined by the following formula: in: Indicates the first Weight parameters for each semantic extension direction, Nodes representing the direction of semantic expansion Degree in the policy knowledge graph This represents the maximum degree of all nodes in the policy knowledge graph. Relationships indicating the direction of semantic expansion Relationship with core policy entities semantic similarity, and It is the harmonic coefficient, which satisfies Degree reflects the connectivity importance of a node in the graph, while semantic similarity is calculated based on the vector representation of relation types. This formula integrates structural and semantic features to quantify the weight of semantic expansion directions. In data comparison, different weight parameter configurations lead to different graph traversal paths. For example, when the weight parameter emphasizes node degree, the traversal tends to favor nodes with high connectivity, resulting in a knowledge element set containing more general policy information; when the weight parameter emphasizes semantic similarity, the traversal is closer to the semantic context of core policy entities, making the knowledge element set more domain-specific. Priority parameters directly affect the traversal order; higher-priority semantic expansion directions are traversed first, thus influencing the composition order of the knowledge element set.

[0024] In practical implementation, the weight and priority parameters in the strategy planning parameters are instantiated through the semantic expansion directions enumerated by the strategy tree. For example, for the core policy entity "R&D subsidies," the strategy tree enumerates three semantic expansion directions: direction A (application conditions), direction B (subsidy amount), and direction C (application process). The weight parameter for direction A is calculated to be 0.5, for direction B to be 0.3, and for direction C to be 0.2 using the formula above. The priority parameters are arranged in descending order of the weight parameters, i.e., direction A has the highest priority, followed by direction B, and then direction C has the lowest priority. When traversing the policy knowledge graph, starting from the "R&D subsidies" node, the process first traverses along direction A, collecting relevant node and relationship information and encapsulating it into knowledge elements; then it traverses along direction B, and finally along direction C. The knowledge elements generated by all traversal paths constitute a knowledge element set for subsequent steps.

[0025] Example 2: See Figure 3 The process of analyzing a set of knowledge elements to generate multiple candidate synthesis paths includes feature extraction for each independent knowledge element in the set, resulting in a meta-feature vector for each independent knowledge element. The semantic correlation between the meta-feature vectors of any two independent knowledge elements is calculated. Based on the calculated semantic correlation, a knowledge element association network is constructed, where nodes are independent knowledge elements and the weights of the edges connecting nodes represent the corresponding semantic correlation. In this knowledge element association network, a path search algorithm is applied to find multiple subgraph paths that can connect a specific number of nodes; each such subgraph path constitutes a candidate synthesis path. The process of ranking and filtering multiple candidate synthesis paths according to quality evaluation criteria to determine the preferred synthesis path includes calculating a diversity score for each candidate synthesis path, based on the dispersion of the type distribution of the independent knowledge elements contained in the candidate synthesis path. A coherence score is calculated for each candidate synthesis path, based on the average semantic correlation between adjacent independent knowledge elements in the candidate synthesis path. For each candidate synthesis path, a coverage score is calculated based on the number of core policy entities covered by that path. The diversity, coherence, and coverage scores of each candidate synthesis path are weighted and summed to obtain a comprehensive quality score for each path. All candidate synthesis paths are then ranked in descending order according to their comprehensive quality scores, and at least one of the top-ranked paths is selected as the preferred synthesis path.

[0026] In practical implementation, the knowledge element set contains multiple independent knowledge elements. Each independent knowledge element encapsulates information collected from the policy knowledge graph's traversal path. Feature extraction is performed on each independent knowledge element in the knowledge element set to obtain a meta-feature vector for each independent knowledge element. The meta-feature vector includes dimensions such as node type distribution, relation type frequency, and attribute value statistics. The semantic correlation degree between the meta-feature vectors of any two independent knowledge elements is calculated. The semantic correlation degree reflects the similarity between the two independent knowledge elements in terms of semantic content. Based on the semantic correlation degree, a knowledge element association network is constructed, where nodes are independent knowledge elements and the weights of edges are the semantic correlation degrees. In the knowledge element association network, a path search algorithm is applied to find multiple subgraph paths connecting a specific number of nodes. Each subgraph path constitutes a candidate synthesis path. In some embodiments, the path search algorithm employs weighted depth-first search or heuristic search to explore highly relevant paths in the knowledge element association network. For example, in a science and technology innovation policy scenario, the knowledge element association network may contain nodes such as "R&D subsidy - application conditions," "R&D subsidy - subsidy amount," and "high-tech enterprise - recognition standards." The path search algorithm may find a subgraph path connecting these nodes, forming a candidate synthesis path. Optionally, the path search algorithm sets a minimum path length and a maximum path length to control the complexity of the candidate synthesis path. It is understood that the structure and semantic relevance threshold of the knowledge element association network affect the quantity and quality of candidate synthesis paths.

[0027] In practice, multiple candidate synthesis paths are ranked and screened according to quality assessment criteria to determine the preferred synthesis path. A diversity score is calculated for each candidate synthesis path, based on the dispersion of the type distribution of independent knowledge elements within that path. For example, Shannon entropy or the Gini coefficient can be used to measure the dispersion of type distribution; higher dispersion results in a higher diversity score. A coherence score is calculated for each candidate synthesis path, based on the average semantic relevance between adjacent independent knowledge elements within that path. A coverage score is also calculated for each candidate synthesis path, based on the number of core policy entities covered by that path. The diversity, coherence, and coverage scores for each candidate synthesis path are weighted and summed to obtain a comprehensive quality score. All candidate synthesis paths are then ranked in descending order according to the comprehensive quality score, and at least one of the top-ranked candidate synthesis paths is selected as the preferred synthesis path.

[0028] In some embodiments, the weighting coefficients used in the weighted summation are pre-set according to application requirements. For example, in scenarios emphasizing content diversity, the diversity score has a higher weighting coefficient. In terms of data comparison, different weighting coefficient configurations lead to different preferred synthesis path selections. For instance, when the coherence score has a higher weighting coefficient, the overall quality score tends to select paths with high semantic relevance between adjacent knowledge elements, resulting in a more fluid content synthesis path. When the coverage score has a higher weighting coefficient, the overall quality score tends to select paths that cover more core policy entities, resulting in a more complete information synthesis path. Optionally, the formula for calculating the overall quality score is expressed as: in: This indicates the overall quality score. Indicates diversity score, Indicates consistency rating. Indicates coverage score, , , It is a weighting coefficient and satisfies It can be understood that this formula quantifies the overall quality of candidate synthesis paths, providing a numerical basis for ranking and selection.

[0029] In practice, the diversity score, coherence score, and coverage score in the quality assessment criteria are calculated using specific indicators. For example, the diversity score is calculated using the dispersion of the type distribution of independent knowledge elements, and the dispersion of the type distribution uses entropy values. measure: in: It is the first The proportion of each type of independent knowledge element in the path. The coherence score is calculated by the average semantic relevance between adjacent independent knowledge elements in the path, and the coverage score is calculated by the ratio of the number of core policy entities appearing in the path to the total number of core policy entities. These scores depend on the knowledge element set and the core policy entities defined in the strategy planning parameters. Data comparisons show the differences in scores among different candidate synthesis paths. For example, path A has a diversity score of 0.8, a coherence score of 0.9, and a coverage score of 0.7, while path B has a diversity score of 0.6, a coherence score of 0.8, and a coverage score of 0.9. Depending on the weighting coefficients, the overall quality score may differ, thus affecting the selection of the optimal synthesis path.

[0030] Example 3: The process of assembling knowledge elements according to a preferred synthesis path to generate an initial synthetic corpus includes sequentially reading each independent knowledge element contained in the preferred synthesis path according to the node order. Based on a preset corpus template, the node attributes, relational attributes, and other information contained in the independent knowledge elements are filled into the corresponding slots of the corpus template. During the filling process, grammatical rules and a domain terminology dictionary are applied to perform lexical checks and local sentence structure adjustments on the filled slot content to ensure basic syntactic correctness. The corpus template content with all slots filled and adjusted is then concatenated according to the order of knowledge elements in the preferred synthesis path to generate the initial synthetic corpus.

[0031] The process involves iteratively evaluating and adjusting the initial synthesized corpus until a preset convergence condition is met. This includes inputting the initial synthesized corpus into a pre-trained domain language model, which outputs an overall semantic fluency score for the initial synthesized corpus. The initial synthesized corpus is then aligned and validated against a policy knowledge graph, and the accuracy of the information expressed by the corpus with the corresponding entity relationships in the policy knowledge graph is calculated. If the overall semantic fluency score is lower than a preset fluency threshold, or the calculated accuracy is lower than a preset accuracy threshold, an adjustment mechanism is triggered. This adjustment mechanism involves backtracking to the preferred synthesis path, replacing independent knowledge elements that lead to low scores in the preferred synthesis path based on the evaluation results, or fine-tuning the order of independent knowledge elements in the preferred synthesis path to generate an adjusted synthesis path. Based on this adjusted synthesis path, knowledge elements are reassembled to generate a new round of synthesized corpus, and the evaluation and adjustment steps are repeated until the overall semantic fluency score and accuracy of the newly generated synthesized corpus both reach their respective thresholds, at which point the preset convergence condition is met.

[0032] In practice, the optimized synthesis path contains an ordered sequence of independent knowledge elements. Following the node order of the optimized synthesis path, the independent knowledge elements are read sequentially. Each independent knowledge element contains node attributes, node types, and relational attribute information collected during the traversal of the policy knowledge graph. Based on a pre-defined corpus template, the node attributes and relational attribute information contained in the independent knowledge elements are filled into the corresponding slots of the corpus template. During the filling process, grammatical rules and a domain terminology dictionary are applied to perform lexical checks and local sentence structure adjustments on the filled slot content to ensure basic syntactic correctness. Grammatical rules include subject-verb agreement and tense consistency, while the domain terminology dictionary ensures the standardized use of professional vocabulary. The corpus template content, with all slots filled and adjusted, is then concatenated according to the order of the optimized synthesis path to generate the initial synthesized corpus. Connectives can be inserted or word order adjusted during the concatenation process to ensure paragraph coherence. The corpus template is a predefined structured text framework. Optionally, multiple corpus template variations exist for different policy types or contexts. It can be understood that the design of the corpus template affects the final style and structure of the generated corpus. In a scenario illustrating science and technology innovation policies, an optimal synthesis path for "R&D subsidies" might sequentially include three independent knowledge elements: "Policy Name: R&D Expense Deduction," "Applicable Entities: High-tech Enterprises," and "Support Method: Proportional Reduction." The preset corpus template is "[Policy Name] policy for [Applicable Entities], and its [Support Method]." After filling in the template, the initial synthesized corpus is "The R&D expense deduction policy for high-tech enterprises, with proportional reduction." Data comparison shows that when using different corpus templates, the same optimal synthesis path can generate initial synthesized corpora with different expressions.

[0033] In practice, the initial synthesized corpus undergoes multiple rounds of iterative evaluation and adjustment until a preset convergence condition is met. The initial synthesized corpus is then input into a pre-trained domain language model to obtain an overall semantic fluency score. The domain language model is a neural network model trained on large-scale policy domain texts, and the overall semantic fluency score reflects the quality of the synthesized corpus in terms of language fluency and contextual coherence. The initial synthesized corpus is aligned with a policy knowledge graph, calculating the accuracy of the information expressed by the initial synthesized corpus with the corresponding entity relations in the policy knowledge graph. Alignment verification is performed by comparing the consistency between the entity relation triples extracted from the corpus and the triples stored in the knowledge graph. If the overall semantic fluency score is lower than a fluency threshold, or the accuracy is lower than an accuracy threshold, an adjustment mechanism is triggered. This adjustment mechanism includes backtracking to the preferred synthesis path, replacing independent knowledge elements in the preferred synthesis path that lead to low scores based on the evaluation results, or fine-tuning the order of independent knowledge elements in the preferred synthesis path to generate an adjusted synthesis path. Based on the adjusted synthesis path, knowledge elements are reassembled to generate a new round of synthesized corpus. The evaluation and adjustment steps are repeated until the overall semantic fluency score and accuracy of the generated synthesized corpus reach their respective thresholds and meet the preset convergence conditions.

[0034] Optionally, the overall semantic fluency score can be calculated using the following formula: in: This indicates the overall semantic fluency score. This indicates the total number of words in the synthesized corpus. Indicates the first in the corpus One word, Indicates that the parameter is The pre-trained domain language model calculates the given prior language. Under the condition of word number 1 The probability of each word appearing This represents taking the natural logarithm. It can be understood that this formula quantifies fluency by calculating the average log-likelihood of the corpus under the domain language model. In some embodiments, the accuracy threshold and fluency threshold are preset according to the quality requirements of the synthesized corpus. Data comparison shows the impact of different threshold settings on the number of iterations and the final synthesized corpus. For example, setting higher fluency and accuracy thresholds leads to more adjustment iterations, but the quality of the final output corpus is higher; setting lower thresholds may reduce the number of iterations, but the corpus quality may decrease accordingly. When replacing independent knowledge elements in the adjustment mechanism, other independent knowledge elements with high semantic relevance to the preferred synthesis path context are selected from the knowledge element set for replacement. Fine-tuning the order adjusts the arrangement of independent knowledge elements without changing the path node set.

[0035] See Figure 4 This diagram focuses on the core stages of multi-round iterative evaluation and adjustment of the initial synthesized corpus, intuitively presenting the dynamic optimization process of quality indicators during policy corpus synthesis: the horizontal axis represents the iteration rounds, and the vertical axis represents the quality score, containing three core elements: the black square broken line represents semantic fluency, the gray triangle broken line represents information accuracy, and the dashed line represents the preset convergence threshold. This diagram clearly verifies the effectiveness of the iterative evaluation-adjustment mechanism, reflecting both the gradual optimization process of corpus quality and providing a visual basis for judging whether the corpus meets the convergence conditions. It serves as a key reference for quality control in the synthesis of policy knowledge graph corpora.

[0036] Example 4: The cross-graph consistency enhancement step includes acquiring at least one auxiliary policy knowledge graph associated with the target policy knowledge graph. Key entities and relational assertions are extracted from the final synthesized corpus that meets the convergence criteria. These key entities and relational assertions are then retrieved and verified in at least one auxiliary policy knowledge graph. If nodes or edges in the auxiliary policy knowledge graph are found to semantically conflict with the extracted key entities and relational assertions, this conflict information is used as a constraint and fed back to the strategy planning step to update the strategy planning parameters, thereby avoiding such semantic conflicts in subsequent synthesis processes. The dynamic adaptation step for the synthesized corpus includes monitoring the input requirements of the target application scenario, including corpus length range, keyword density, and stylistic features. The preferred synthesis path is dynamically pruned or expanded to adapt to the monitored corpus length range. When assembling knowledge elements, different corpus templates and lexical expression libraries are dynamically selected based on the monitored keyword density and stylistic features. In the evaluation and adjustment steps, a style evaluation model that matches the monitored stylistic features is introduced to evaluate and optimize the style conformity of the generated corpus.

[0037] The cross-graph consistency enhancement step includes acquiring at least one auxiliary policy knowledge graph associated with the target policy knowledge graph. These auxiliary and target policy knowledge graphs belong to the same policy domain but may originate from different regions or time periods. From the final synthesized corpus that meets the convergence criteria, key entities and relational assertions are extracted. Key entities include policy names and applicable objects, while relational assertions include phrases such as "R&D expense deduction policy - applicable to - technology-based SMEs". The key entities and relational assertions are then searched and validated in at least one auxiliary policy knowledge graph. The search process involves finding identical or highly similar entity nodes and relational edges in the auxiliary graph. If nodes or edges in the auxiliary policy knowledge graph that semantically conflict with key entities or relational assertions are found, this conflict information is used as a constraint and fed back to the strategy planning step to update the strategy planning parameters, thereby avoiding semantic conflicts in subsequent synthesis.

[0038] In some embodiments, semantic conflict is determined based on a quantified inconsistency score. Calculated by comparing the attributes and relationships of assertions in the target and auxiliary maps: in: Indicates inconsistency scores. This represents the set of attributes and relationships associated with key entities and relationship assertions in the target policy knowledge graph. This represents the set of attributes and relationships associated with the same key entities in the auxiliary policy knowledge graph. This represents the size of the intersection of two sets. This represents the size of the union of two sets. It can be understood as the inconsistency score. The closer the score is to 1, the higher the degree of semantic conflict. When the inconsistency score exceeds the preset conflict threshold, a semantic conflict is determined to exist. Optionally, updating the strategy planning parameters involves reducing the weight parameter of the semantic expansion direction that generated the conflict assertion in the policy tree, or placing it later in the priority parameters. Data comparison reflects the difference in cross-graph consistency between the synthetic corpora generated based on the same core policy entity before and after updating the strategy planning parameters. The frequency of triggering conflict alerts in the auxiliary graph is reduced for the corpora generated after updating the parameters.

[0039] In practice, the dynamic adaptation steps for synthesized corpora include monitoring the input requirements of the target application scenario. These requirements include corpus length range, keyword density, and stylistic features. Target application scenarios can include policy briefing generation, policy Q&A, or policy interpretation reports. Different scenarios have different input requirements. The optimal synthesis path is dynamically trimmed or expanded to adapt to the corpus length range. Dynamic trimming involves removing low-weight knowledge elements based on their weight ranking within the path, while dynamic expansion involves adding additional knowledge elements with high semantic relevance to the path from the knowledge element set. When assembling knowledge elements, different corpus templates and vocabulary repositories are dynamically selected based on keyword density and stylistic features. For example, the policy briefing scenario requires high keyword density and a concise style, so a compact briefing template and a formal, concise vocabulary repository are selected; the policy interpretation scenario requires lower terminology density and a more detailed narrative style, so a highly explanatory template and a vocabulary repository containing detailed explanations are selected. In the evaluation and adjustment steps, a style evaluation model matching the stylistic features of the text is introduced to assess and optimize the style conformity of the generated corpus. This model, trained on a specific textual corpus, evaluates the degree of matching between the generated corpus and the target style in terms of sentence complexity, word usage features, etc., and uses this matching degree as an optimization objective of the adjustment mechanism. Input requirements for different application scenarios are provided in the form of configuration parameters. The monitoring process involves reading these configuration parameters. Table 1 shows a comparison of input requirement data.

[0040] Table 1: Input Requirements for Different Target Application Scenarios As can be understood, the data comparison in Table 1 illustrates the different parameter combinations that need to be processed in the dynamic adaptation step. The specific operation of dynamically pruning or expanding the preferred synthesis path to adapt to the corpus length range is based on a comparison between the estimated corpus length of the current path and the target range. The estimated corpus length is estimated by the sum of the attribute text lengths contained in all independent knowledge elements in the path and the sum of the fixed text lengths of the template. Optionally, keyword density is evaluated by statistically analyzing the number of predefined domain keywords in the generated corpus and calculating the number per unit length. If the requirement is not met, synonyms or near-synonyms are selected from the lexical expression library to replace the original expressions to improve keyword density. The style evaluation model assesses the style conformity of the generated corpus. If the evaluation score is lower than the style threshold, an adjustment mechanism is triggered, selecting corpus template variants or lexical expressions that better conform to the target style when reassembling the corpus.

[0041] See Figure 5This diagram is a core data visualization of the dynamic adaptation process of the synthesized corpus: the horizontal axis represents four policy application scenarios, the vertical axis represents the corpus length, and the light and dark bars correspond to the minimum and maximum length constraints for each scenario. This diagram clearly quantifies the constraints of scenarios on corpus length, explaining the necessity of dynamic adaptation and providing clear quantitative standards for path adjustments. It is a key reference for ensuring that the synthesized corpus meets the needs of different scenarios.

[0042] Example 5: The process of dynamically pruning or expanding the preferred synthesis path to adapt to the corpus length range includes calculating the estimated corpus length corresponding to the current preferred synthesis path. This estimated corpus length is compared with the corpus length range required by the target application scenario. If the estimated corpus length exceeds the upper limit of the corpus length range, at least one independent knowledge element with the lowest weight is removed according to the weight ranking of each independent knowledge element in the preferred synthesis path, thus achieving path pruning. If the estimated corpus length is lower than the lower limit of the corpus length range, an additional independent knowledge element with the highest semantic relevance to the terminal node of the preferred synthesis path is selected from the knowledge element set and added to the preferred synthesis path, thus achieving path expansion.

[0043] In practice, the estimated corpus length corresponding to the current preferred synthesis path is calculated. This calculation considers the information content encapsulated by all independent knowledge elements within the path, as well as the inherent text structure of the preset corpus template. For a specific preferred synthesis path, the estimated corpus length is... The following formula can be used for estimation: in: This indicates the estimated corpus length, measured in characters. This represents the total number of independent knowledge elements contained in the currently preferred synthesis path. Indicates the first The character length of the core text attributes in each independent knowledge element. Indicates the first The character length of other auxiliary attribute text in an independent knowledge element. and It is a coefficient used to adjust the weights of the core text and the auxiliary text. This represents the total character length of the fixed text inherent in the selected corpus template, excluding slot-filled portions. This formula provides a forward-looking estimate of the final synthesized corpus length, comparing the estimated corpus length to the range of corpus lengths required by the target application scenario, with the minimum length among the ranges. and maximum length The form is given, and the purpose of comparison is to determine... Does it meet the requirements? .

[0044] In some embodiments, if the estimated corpus length exceeds the upper limit of the corpus length range, i.e. Then, based on the weight ranking of independent knowledge elements in the optimized synthesis path, at least one independent knowledge element with the lowest weight is removed, thus achieving path pruning. The weight ranking of independent knowledge elements is based on their contribution to the comprehensive quality score used in generating the optimized synthesis path, or their centrality index in the knowledge element association network. For example, in an optimized synthesis path about "talent introduction policy," which includes independent knowledge elements "A: policy target," "B: application conditions," "C: reward standards," and "D: application materials," their weight ranking is B>A>C>D. If the estimated length exceeds the upper limit, the independent knowledge element D with the lowest weight is removed first. Data comparison is reflected before and after path pruning, and the estimated corpus length. The relationship with the target scope changes, and after removing one or more low-weight independent knowledge elements, the new estimated corpus length... Should meet Furthermore, the pruning operation prioritizes removing knowledge elements that contribute less to the semantic coherence of the path's core meaning.

[0045] In practice, if the estimated corpus length is lower than the lower limit of the corpus length range, that is... Then, from the knowledge element set, an additional independent knowledge element with the highest semantic relevance to the terminal node of the preferred synthesis path is selected and added to the preferred synthesis path to achieve path expansion. The semantic relevance is calculated based on the similarity of the meta-feature vectors between knowledge elements, and the terminal node refers to the last independent knowledge element arranged in sequence in the preferred synthesis path. For example, in a path about "tax incentives", the terminal independent knowledge element is "incentive amount". Calculation from the knowledge element set shows that "processing procedure" has the highest semantic relevance to "incentive amount", so "processing procedure" is added as an additional independent knowledge element to the end of the path. Optionally, path expansion can be performed multiple times, each time calculating and selecting semantic relevance based on the current new path terminal node, until the estimated corpus length of the expanded path meets the requirements. Data comparison shows that path expansion increases the information content of the synthesized corpus, but it is necessary to ensure the semantic coherence between the newly added independent knowledge elements and the original path. That is, the semantic correlation between the newly added knowledge elements and the original terminal knowledge elements must be higher than the preset correlation threshold to prevent the introduction of irrelevant or excessively abrupt content, which would lead to a decline in corpus quality.

[0046] It is understandable that dynamic pruning and dynamic expansion operations alter the structure and content of the preferred synthesis path, thereby directly affecting the length and information composition of the final synthesized corpus. In some embodiments, coefficients and The value of is adjusted based on the degree to which the core text and auxiliary text are utilized in the corpus template. For example, in a briefing template that emphasizes concise expression, The value may be set low to reduce the weight of auxiliary text length in the prediction. The weight ranking of independent knowledge elements can be determined based on a combination of factors, such as the magnitude of their meta-feature vectors, the order in which they are selected when generating the current preferred synthesis path, or the original weight of their semantic expansion direction in policy planning. The operation of dynamically pruning or expanding the preferred synthesis path to adapt to the corpus length range is a key mechanism in responding to the input requirements of the target application scenario in the dynamic adaptation step of the synthesized corpus.

[0047] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for synthesizing high-quality domain corpora based on policy knowledge graphs, characterized in that, The method includes: Perform strategy planning on the policy knowledge graph and extract strategy planning parameters; Based on the strategy planning parameters, the policy knowledge graph is traversed to extract a set of knowledge elements; The knowledge element set is analyzed to generate multiple candidate synthesis paths; Based on the quality assessment criteria, the multiple candidate synthesis paths are sorted and screened to determine the preferred synthesis path; According to the preferred synthesis path, knowledge elements are assembled to generate an initial synthesized corpus. The initial synthesized corpus is evaluated and adjusted in multiple rounds until the preset convergence condition is met; Output the corpus that satisfies the convergence condition as the final synthesized corpus.

2. The method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 1, characterized in that, Strategy planning is performed on the policy knowledge graph, and strategy planning parameters are extracted, including: Semantic parsing is performed on the graph structure of the policy knowledge graph to identify core policy entities and their relationships; Construct a policy tree with the core policy entity as the root node, and enumerate different semantic extension directions from the root node to different leaf nodes in the policy tree; Weight parameters and priority parameters are configured for each semantic expansion direction in the policy tree, and these parameters are combined to form the policy planning parameters.

3. The method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 2, characterized in that, Based on the aforementioned strategy planning parameters, the policy knowledge graph is traversed to extract a set of knowledge elements, including: Based on the weight and priority parameters in the strategy planning parameters, determine the starting node and search depth for traversing the policy knowledge graph; Starting from the starting node, and following the semantic expansion direction defined by the policy tree, a guided graph walk is performed in the policy knowledge graph according to the search depth; During the process of walking, the attributes of the nodes passed through, the node types, the relationship types between nodes and their corresponding attributes are collected, and each complete walking path and the information collected on it are encapsulated into an independent knowledge element. The set of independent knowledge elements generated by all traversal paths is formed by summing them up.

4. The method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 3, characterized in that, The knowledge element set is analyzed to generate multiple candidate synthesis paths, including: For each independent knowledge element in the knowledge element set, feature extraction is performed to obtain the meta-feature vector of each independent knowledge element; Calculate the semantic correlation between the meta-feature vectors of any two independent knowledge elements; Based on the semantic relevance, a knowledge element association network is constructed, where nodes are independent knowledge elements and the weight of the edges is the semantic relevance. In the knowledge element association network, a path search algorithm is applied to find multiple subgraph paths that connect a specific number of nodes, and each subgraph path constitutes a candidate synthesis path.

5. The method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 4, characterized in that, Based on quality assessment criteria, the multiple candidate synthesis paths are sorted and screened to determine the preferred synthesis path, including: A diversity score is calculated for each candidate synthesis path, the diversity score being based on the dispersion of the type distribution of independent knowledge elements in that candidate synthesis path; A coherence score is calculated for each candidate synthesis path, the coherence score being based on the average semantic relevance between adjacent independent knowledge elements in that candidate synthesis path; A coverage score is calculated for each candidate synthesis path, the coverage score being based on the number of core policy entities covered by that candidate synthesis path; The diversity score, coherence score, and coverage score of each candidate synthesis path are weighted and summed to obtain the overall quality score. All candidate synthesis paths are sorted in descending order according to the comprehensive quality score, and at least one candidate synthesis path with the highest ranking is selected as the preferred synthesis path.

6. The method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 5, characterized in that, Following the preferred synthesis path, knowledge elements are assembled to generate an initial synthesized corpus, including: According to the node order of the preferred synthesis path, read the independent knowledge elements in the path sequentially; According to the preset corpus template, the node attributes and relational attribute information contained in the independent knowledge element are filled into the corresponding slots of the corpus template; During the filling process, grammar rules and domain terminology dictionaries are applied to perform lexical checks and local sentence structure adjustments on the filled slot content to ensure basic syntactic correctness. The content of the corpus template, after all slots have been filled and adjusted, is concatenated in the order of the preferred synthesis path to generate the initial synthesized corpus.

7. The method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 6, characterized in that, The initial synthesized corpus is evaluated and adjusted iteratively in multiple rounds until a preset convergence condition is met, including: The initial synthesized corpus is input into a pre-trained domain language model to obtain the overall semantic fluency score of the initial synthesized corpus; Alignment verification is performed between the initial synthesized corpus and the policy knowledge graph, and the accuracy of the information expressed by the initial synthesized corpus and the corresponding entity relationship in the policy knowledge graph is calculated. If the overall semantic fluency score is lower than the fluency threshold, or the accuracy is lower than the accuracy threshold, an adjustment mechanism is triggered. The adjustment mechanism includes: tracing back to the preferred synthesis path, replacing the independent knowledge elements in the preferred synthesis path that cause low scores based on the evaluation results, or fine-tuning the order of the independent knowledge elements in the preferred synthesis path to generate an adjusted synthesis path; Based on the adjusted synthesis path, knowledge elements are reassembled to generate a new round of synthesized corpus. The evaluation and adjustment steps are repeated until the overall semantic fluency score and accuracy of the generated synthesized corpus reach their respective thresholds, satisfying the preset convergence conditions.

8. The method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 7, characterized in that, The method further includes a cross-graph consistency enhancement step, specifically including: Obtain at least one auxiliary policy knowledge graph associated with the target policy knowledge graph; Extract key entities and relation assertions from the final synthesized corpus that meets the convergence conditions; The key entities and relationship assertions are retrieved and verified in at least one auxiliary policy knowledge graph. If a node or edge is found in the auxiliary policy knowledge graph that has a semantic conflict with the key entity and relation assertion, the conflict information is used as a constraint and fed back to the policy planning step to update the policy planning parameters in order to avoid the semantic conflict in the synthesis.

9. The method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 1, characterized in that, The method also includes a dynamic adaptation step for the synthesized corpus, specifically including: The input requirements for monitoring the target application scenario include the corpus length range, keyword density, and stylistic features. The preferred synthesis path is dynamically trimmed or expanded to fit the corpus length range; When assembling knowledge elements, different corpus templates and vocabulary expression libraries are dynamically selected based on the keyword density and stylistic features. In the evaluation and adjustment steps, a style evaluation model that matches the stylistic features of the text is introduced to evaluate and optimize the style conformity of the generated corpus.

10. A method for synthesizing high-quality domain corpora based on policy knowledge graphs according to claim 9, characterized in that, Dynamically pruning or expanding the preferred synthesis path to adapt to the corpus length range includes: Calculate the estimated corpus length corresponding to the current preferred synthesis path; The estimated corpus length is compared with the corpus length range required by the target application scenario; If the estimated corpus length exceeds the upper limit of the corpus length range, then according to the weight sorting of independent knowledge elements in the preferred synthesis path, at least one independent knowledge element with the lowest weight is removed to achieve path pruning. If the estimated corpus length is lower than the lower limit of the corpus length range, then an additional independent knowledge element with the highest semantic relevance to the terminal node of the preferred synthesis path is selected from the knowledge element set and added to the preferred synthesis path to achieve path expansion.