A large model-based PDD file intelligent preparation and verification method and system
Patent Information
- Application Number
- CN202611311705.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2046-08-27
AI Technical Summary
The existing PDD document compilation process relies on manual processing, making it difficult to achieve automatic traceability and unified verification between methodological rules, parameter definitions, formulas, and document content. This results in a high degree of manual dependence and difficulty in ensuring logical consistency during compilation, verification, and subsequent maintenance.
Construct a knowledge graph that includes methodologies, clauses, formulas, parameters, and PDD document chapters. Generate document content through a large language model and perform dimensional consistency and coverage completeness verification. Perform difference analysis in response to methodology version updates and automatically locate affected document content.
It improves the automation and logical consistency of PDD document creation, verification, and version maintenance, reduces reliance on manual verification, and ensures the traceability and consistency of document content and methodology.
Smart Images

Figure CN122797514B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and intelligent document processing technology, and more specifically, to a method and system for intelligent compilation and verification of PDD documents based on a large model. Background Technology
[0002] Project Design Documents (PDDs) are crucial technical documents in applications such as carbon asset development and the Clean Development Mechanism. Their preparation typically requires adherence to one or more methodological documents, organizing and explaining aspects such as project applicability, baseline scenarios, emission reduction calculations, monitoring parameters, and reporting requirements. Because methodological documents usually contain numerous clauses, formulas, parameter definitions, and interrelated applicability conditions, PDD preparation involves not only text generation but also the selection of methodological clauses, matching project parameters, formula invocation, coverage of monitoring requirements, and subsequent methodological version updates—a complex process involving multiple interconnected steps.
[0003] The current process of creating Product Development Guide (PDD) documents primarily relies on manual labor. The compilers need to combine specific project information with information from multiple methodological documents to find applicable clauses, determine calculation formulas and parameter values, and then create the document content chapter by chapter according to the PDD template. After the document is generated, it still needs to be manually reviewed to verify whether the methodological clause references, parameter values, calculation processes, and monitoring plans meet the requirements. This approach is highly dependent on the professional experience of the compilers, and the workload of manual verification increases further when the project references multiple methodologies, the document content is large, or the methodology is updated.
[0004] With the development of technologies such as large language models, search-enhanced generation, and rule engines, existing technologies have begun to use large language models to assist in document generation or review. For example, large language models are used for text generation, semantic verification, or combined with rule engines to judge the consistency of generated results. However, existing technologies typically treat document text, methodological clauses, calculation formulas, and project parameters as relatively independent data objects, failing to establish a unified, explicit, and computable relationship structure between document content and its sources. Therefore, it remains difficult to achieve automatic traceability and unified verification from methodological rules, parameter definitions, formula dependencies to document content.
[0005] Specifically, when a PDD file references multiple methodologies, existing technologies struggle to automatically determine conflicts between the applicable conditions and parameter constraints of different methodologies before document generation. When generating document content using large language models, it's also difficult to guarantee that the generated values, formulas, and conclusions correspond to valid methodological bases. For generated computational content, traditional text verification or numerical comparison struggles to detect deep-seated computational problems caused by errors in units, physical dimensions, or conversion factors. Furthermore, there's a lack of technical means to perform comprehensive coverage verification based on methodological requirements for monitoring plans. In addition, when methodological documents are updated, existing systems typically require manual comparison of old and new content and locating affected PDD sections, making automatic location of affected document content difficult. These issues result in a high degree of manual reliance during the compilation, verification, and subsequent maintenance of PDD files, and make it difficult to consistently maintain logical consistency between document content and methodological basis.
[0006] In view of this, a method and system for intelligent compilation and verification of PDD files based on a large model is proposed. Summary of the Invention
[0007] This application proposes a method and system for intelligent compilation and verification of PDD files based on a large model, in order to solve one of the aforementioned technical problems.
[0008] The technical solution adopted in this application is as follows: In a first aspect, embodiments of this application provide a method for intelligent compilation and verification of PDD files based on a large model, including: Obtain the original methodology document set, extract the clauses, formulas and parameter elements from the original methodology document set, transform the conditional clauses into first-order logical predicates, and construct a basic relational knowledge graph containing a methodology layer, a clause layer, a formula layer and a parameter layer based on the relationship between the clauses, formulas and parameter elements. The system receives project feature parameters, a set of methodologies to be referenced, and project parameter instance data corresponding to parameter nodes in the parameter layer. It converts the project feature parameters into known fact predicates, and encodes the first-order logic predicates corresponding to the set of methodologies to be referenced with the known fact predicates. These are then input into a satisfiability modular theory solver for satisfiability determination. If the determination result is unsatisfiable, the system identifies the rules causing the conflict and outputs conflict information. If the determination result is satisfiable, the system determines the variable value constraints used to constrain document generation based on the solution results. When the determination result is satisfactory, the content element requirements of the current chapter to be generated are determined according to the standard PDD template. The clause nodes, formula nodes and parameter nodes associated with the current chapter to be generated are determined from the basic association knowledge graph. The structured prompt word input large language model is constructed according to the determined node data, the project parameter instance data and the variable value constraints to generate the initial document text containing the custom markup format. The custom markup format is parsed, and instance nodes are created for document paragraphs and data cells in the initial document text in the document object model. A bidirectional searchable anchoring relationship is established between the instance nodes and the clause nodes, formula nodes or parameter nodes they reference. The instance nodes are then connected to the basic association knowledge graph as PDD document chapter layers to form a five-layer association knowledge graph. Parallel logical verification is performed on the generated document content based on the five-layer association knowledge graph. The parallel logical verification includes at least a dimensional consistency test based on the variable dependency graph and a coverage completeness test based on Boolean satisfiability solution. In response to the version update of the methodology document, a difference analysis is performed on the subgraphs of the methodology knowledge graph before and after the update to identify the changed nodes. Then, a multi-hop search is performed along the five-layer association knowledge graph according to the preset influence propagation direction to locate the document instance nodes affected by the changed nodes and output a structured influence report.
[0009] Preferably, the clauses, formulas, and parameter elements of the original methodology document set are extracted, conditional clauses are transformed into first-order logical predicates, and the basic relational knowledge graph is constructed, including: The pre-set rule parser is invoked to identify the chapter hierarchy, text flow, table structure and mathematical formulas in the original methodology document set, and a large language model is invoked for auxiliary parsing when the confidence of the parsing result is lower than the pre-set confidence threshold. The identified clauses are classified according to the clause type keyword library to determine the corresponding clause type. The clause type includes at least the applicable conditions clause, monitoring requirement clause, calculation formula clause, and baseline setting clause. For the conditional clauses, based on the pre-set mapping relationship between conditional keywords and logical symbols, the conjunction, disjunction, negation, implication, and numerical comparison relationships in the natural language conditions are mapped into corresponding logical expressions to form the first-order logical predicates; Globally unique node identifiers are generated for methodology, clause, formula, and parameter, respectively. Directed association edges are established based on the attribution relationship between methodology and clause, the formula association relationship between clause and formula, the variable reference relationship between formula and parameter, and the monitoring requirement relationship between clause and parameter, to form the basic association knowledge graph.
[0010] Preferably, the determination of satisfiability and the determination of variable value constraints include: The selection state of each methodology in the proposed methodology set is encoded as a Boolean variable. The methodology participating in the satisfiability determination is determined according to the value of each Boolean variable. The first-order logic predicate corresponding to the methodology in the selected state and the known fact predicate together form a constraint set and are input into the satisfiability modular theory solver. When the satisfiability modular theory solver returns an unsatisfiable result, a subset of core rules that cause the unsatisfiability is extracted, the conflict type is determined based on the subset of core rules, and the conflict characteristics are matched with the triggering conditions in the preset resolution strategy library to generate candidate resolution schemes. When the satisfiability modular theory solver returns a satisfiability result, it determines the corresponding specific value constraint for the deterministic equality in the constraint set, determines the corresponding allowed value interval for the inequality in the constraint set, and determines the specific value constraint and / or allowed value interval as the variable value constraint.
[0011] Preferably, constructing a structured prompt word input large language model and generating the initial document text includes: The structured prompts are divided into a background instruction area, a mandatory constraint area, a graph data area, and an output format area. The variable value constraints are filled into the mandatory constraint area using dynamic placeholders. The node data of the clause nodes, formula nodes, and parameter nodes associated with the chapter to be generated are filled into the graph data area. The output format area limits the output of the large language model according to a preset structured format. Receive the structured intermediate results generated by the large language model for the current chapter to be generated. The structured intermediate results are used to form the initial document text. The content corresponding to the project data includes parameter node identifiers and corresponding parameter instance information. The content corresponding to the methodological conclusions includes clause node identifiers. The content corresponding to the formulas includes formula node identifiers. The structured intermediate results are subjected to node identifier existence verification, numerical constraint compliance verification, and formula reference compliance verification. If any verification fails, the current generated result is rejected and regeneration is triggered. If the verification passes, the standardized formula expression and its source reference information are written into the corresponding content according to the corresponding formula node to obtain the initial document text.
[0012] Preferably, the method further includes: The parameter node records the name, definition, data type, unit, monitoring frequency and physical dimension of the corresponding parameter, and generates a parameter instance identifier for the project parameter instance data. It also records the actual value, unit, data source and evidence information of the corresponding parameter in the current project, and establishes the association between the parameter instance identifier and the corresponding parameter node. When generating the initial document text, according to the custom markup format, the content involving parameters, formulas and clauses is written into parameter markup, formula markup and clause markup respectively. The parameter markup carries the corresponding parameter node identifier and parameter instance identifier, the formula markup carries the corresponding formula node identifier and the clause markup carries the corresponding clause node identifier. The parameter markers, formula markers, and clause markers are parsed to extract the target graph node identifiers corresponding to each marker. When parsing the parameter markers, the corresponding parameter instance identifiers are further extracted. The source instance node identifiers, target graph node identifiers, original text fragments, and location paths are recorded in the document object model. For the anchoring relationships corresponding to the parameter markers, the parameter instance identifiers are further recorded to establish the bidirectional searchable anchoring relationships. In response to changes in instance node positions caused by document editing, the position path in the anchoring relationship is updated, while the relationship between the source instance node and the target graph node remains unchanged.
[0013] Preferably, the dimensional consistency test based on the variable dependency graph includes: Extract the variable dependencies of each calculation formula in the document, expand backward from the target output variable along the direction of the input variable, and construct a directed acyclic graph representing the variable calculation dependencies; The physical dimensions of the basic input parameters are read from the parameter nodes, and the physical dimensions of the intermediate and output variables are derived along the directed acyclic graph according to the rules that the dimensions of the operations are consistent for addition and subtraction, multiplication is performed by multiplying the dimensions, division is performed by dividing the dimensions, and exponentiation is performed by exponentiation. When variables with the same dimensions but different units are detected, they are converted to a unified unit according to a preset unit conversion relationship. The system checks whether the physical dimensions on both sides of each calculation formula are consistent, and whether the calculation link involving the conversion between different physical dimensions contains the corresponding conversion factor. When the dimensions are inconsistent or the conversion factor is missing, the system outputs the abnormal location information.
[0014] Preferably, the coverage completeness verification based on Boolean satisfiability includes: The necessary monitoring parameters required by the proposed methodology set are extracted from the five-layer association knowledge graph to form a set of necessary monitoring parameters, and the actual monitoring parameters are extracted from the document instance nodes corresponding to the PDD document chapter layer to form a set of actual monitoring parameters. For each necessary monitoring parameter and each actual monitoring parameter, the coverage relationship is determined based on the parameter node identifier matching result, the preset synonymous parameter equivalence mapping relationship, the unit convertibility and the monitoring frequency comparison result, and a Boolean coverage matrix is generated. Encode the coverage condition that all required monitoring parameters are satisfied by at least one actual monitoring parameter into a Boolean satisfiability problem and input it into the Boolean satisfiability solver; When the Boolean satisfiability solver returns an unsatisfiable result, the subset of necessary monitoring parameters that are not covered is extracted, and the corresponding parameter definitions and source clauses are obtained from the five-layer association knowledge graph to generate a monitoring missing prompt message.
[0015] Preferably, the parallel logic verification further includes cross-computation verification, wherein the cross-computation verification includes: When there are at least two methodologies in the set of proposed methodologies used to calculate the same target index, the target index is calculated independently using the same set of basic input data along the formula dependency path corresponding to each methodology. Determine the deviation between the calculation results corresponding to different methodologies, and compare the deviation with a preset deviation threshold; When the deviation exceeds the preset deviation threshold, a difference analysis is performed on the formula structure, parameter values and project boundary definitions corresponding to different methodologies to determine the difference items that cause the deviation, and a difference analysis report containing the difference items and their source nodes is output.
[0016] Preferably, a difference analysis is performed on the subgraphs of the methodology knowledge graph before and after the update, and a multi-hop search is executed, including: Extract the old version knowledge graph subgraphs before the update and the new version knowledge graph subgraphs after the update. Prioritize node alignment based on methodology number and clause number or formula number. For nodes that have not completed deterministic alignment, perform node matching based on the similarity of the main text or the similarity of the formula structure and parameter set. Configure editing weights for modifying node attributes, inserting or deleting nodes, and inserting or deleting associated edges. Determine the graph editing distance based on the graph editing operations that occur and their corresponding editing weights, and determine the impact level of each changed node in conjunction with the changed node type. Starting from the changed node, the associations between methodology and clause, clause and formula, formula and parameter, and clause and parameter are propagated in the direction from the reference node to the affected node. The reference anchoring relationship between PDD document instance node and clause node, formula node or parameter node is reversed in the direction from the target graph node to the document instance node until the affected document instance node is reached. The structured impact report is generated based on the located document instance nodes and their impact levels; In response to modifications to the PDD document based on the structured impact report, the satisfiability determination and the parallel logic verification are re-executed.
[0017] Secondly, embodiments of this application provide an intelligent PDD (Programmable Data Generation and Verification) system based on a large model, used to implement the method provided in the first aspect above, including: The basic knowledge graph construction module is used to obtain the original methodology document set, extract the clauses, formulas and parameter elements, convert conditional clauses into first-order logical predicates, and construct a basic association knowledge graph containing a methodology layer, a clause layer, a formula layer and a parameter layer based on the relationship between the clauses, formulas and parameter elements. The conflict pre-detection module is used to receive project feature parameters, the set of methodologies to be referenced, and project parameter instance data corresponding to the parameter nodes in the parameter layer. It converts the project feature parameters into known fact predicates, and encodes the first-order logic predicates corresponding to the set of methodologies to be referenced with the known fact predicates and inputs them into the satisfiability modular theory solver for satisfiability determination. When the determination result is unsatisfiable, it determines the rules that cause the conflict and outputs the conflict information. When the determination result is satisfiable, it determines the variable value constraints used to constrain document generation based on the solution result. The constrained document generation module is used to determine the content element requirements of the current chapter to be generated based on the standard PDD template when the determination result is satisfactory, determine the clause nodes, formula nodes and parameter nodes associated with the current chapter to be generated from the basic association knowledge graph, and construct a structured prompt word input large language model based on the determined node data, the project parameter instance data and the variable value constraints to generate initial document text containing custom markup format; The document anchoring module is used to parse the custom markup format, create instance nodes for document paragraphs and data cells in the initial document text in the document object model, establish bidirectional searchable anchoring relationships between the instance nodes and the referenced clause nodes, formula nodes or parameter nodes, and connect the instance nodes as PDD document chapter layers to the basic association knowledge graph to form a five-layer association knowledge graph. The logic verification module is used to perform parallel logic verification on the generated document content based on the five-layer association knowledge graph. The parallel logic verification includes at least a dimensional consistency test based on the variable dependency graph and a coverage completeness test based on Boolean satisfiability solution. The version impact analysis module is used to respond to version updates of methodology documents, perform difference analysis on the subgraphs of the methodology knowledge graph before and after the update, identify change nodes, and perform multi-hop search along the five-layer association knowledge graph according to the preset impact propagation direction to locate the document instance nodes affected by the change nodes and output a structured impact report.
[0018] This application discloses a method and system for intelligent compilation and verification of PDD (Programmable Decision Making) documents based on a large model. The method constructs a knowledge graph containing methodologies, clauses, formulas, parameters, and PDD document chapters, establishing a calculable and traceable relationship between methodological basis and PDD document content. By determining the satisfiability of project features and methodological logic rules, it identifies methodological applicability and rule conflicts before document generation. It also utilizes variable value constraints obtained from the solution and graph node data constraints to constrain the document generation process of the large language model, improving the consistency between generated content and methodological requirements. Furthermore, by establishing bidirectional anchoring relationships between document instance nodes and clause, formula, and parameter nodes, and combining dimensional consistency checks and coverage completeness verification, it achieves automatic verification of the computational logic and the integrity of the monitoring plan. Simultaneously, by performing difference analysis and impact propagation on the knowledge graph before and after methodology version updates, it can automatically locate document content affected by version changes. Therefore, it improves the automation, logical consistency, and traceability of PDD document compilation, verification, and version maintenance, reducing reliance on manual item-by-item verification. Attached Figure Description
[0019] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating an intelligent PDD file compilation and verification method based on a large model, provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a PDD file intelligent compilation and verification system based on a large model, provided in an embodiment of the present invention. Detailed Implementation
[0020] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] like Figure 1 As shown in some embodiments of this application, this embodiment provides a method for intelligent compilation and verification of PDD files based on a large model. Specifically, the method includes the following steps: Step S101: Obtain the original methodology document set, extract the clauses, formulas and parameter elements from the original methodology document set, convert the conditional clauses into first-order logical predicates, and construct a basic relational knowledge graph containing a methodology layer, a clause layer, a formula layer and a parameter layer based on the relationship between the clauses, formulas and parameter elements.
[0022] Specifically, this step is mainly used to convert the unstructured or semi-structured content in the original methodology documents, which are in the form of natural language, mathematical formulas and parameter descriptions, into structured knowledge that can be uniformly processed by computing devices, and to establish the relationship between different knowledge objects, so as to provide a data foundation for subsequent methodology conflict determination, PDD document generation and document verification.
[0023] Specifically, the first step is to obtain the set of original methodologies relevant to the current business scenario. This set may include one or more methodologies, or different versions of the same methodology. Methodologies typically contain applicable conditions, baseline setting requirements, monitoring requirements, calculation rules, and definitions of relevant parameters.
[0024] The acquired original methodology documents are parsed to identify and extract different types of technical elements, such as clauses, formulas, and parameters. Clauses specify the applicable conditions, calculation requirements, and monitoring requirements for the project; formulas represent the numerical calculation relationships specified in the methodology; and parameters represent the data objects used in formula calculations, project condition assessments, or monitoring processes. By distinguishing these different types of elements, the content originally recorded continuously in the methodology documents can be broken down into data objects with clear technical meanings.
[0025] For clauses containing conditional statements, they are further converted into first-order logical predicates. These conditional clauses can be understood as rule-based descriptions containing project attributes, parameter value ranges, or other applicable conditions. For example, they might limit a methodology to a specific project type, or restrict project size or parameter values to meet certain conditions. Through logical processing, the conditional relationships in natural language are transformed into logical expressions that can be recognized and processed by the subsequent logical solution process. This allows for calculation and judgment between the actual characteristics of the project and the applicable conditions of the methodology, rather than relying solely on manual reading and comparison of the methodology text.
[0026] After extracting the clauses, formulas, and parameters, a basic relational knowledge graph is established based on the actual relationships between different elements in the methodology document. The basic relational knowledge graph includes at least a methodology layer, a clause layer, a formula layer, and a parameter layer. Specifically, the methodology layer represents different methodologies and their version information; the clause layer represents the specific rule content within the methodology; the formula layer represents the computational relationships specified by the methodology; and the parameter layer represents the parameters involved in formula calculations, conditional judgments, or monitoring processes.
[0027] Different levels are connected through corresponding relationships. For example, a methodology can be associated with multiple clauses it contains, a clause can be further associated with the calculation formulas or parameters it involves, and a calculation formula can also be associated with one or more parameters that participate in the calculation of the formula.
[0028] After the above processing, the text rules, calculation formulas and parameter definitions that were originally scattered in the methodology file are organized into interconnected structured knowledge objects, which can be retrieved and called according to the relationship between nodes.
[0029] It should be noted that this step creates a basic knowledge graph with methodological knowledge as its main content, primarily used to uniformly organize the clauses, formulas, and parameters on the methodological side. The document content generated after the PDD file is actually produced will be further linked with the basic knowledge graph in subsequent steps, thus forming a five-layered knowledge graph that includes the PDD document chapter layer.
[0030] For example, suppose the original methodology document set includes Methodology A. Methodology A specifies that it is applicable to wind power projects and stipulates that the installed capacity of the project must meet the corresponding scale restrictions; at the same time, Methodology A also specifies the calculation method for emission reductions and the parameters such as power generation and emission factors that need to be used in the calculation process.
[0031] After acquiring methodology A, the system can identify the applicable conditions clauses, emission reduction calculation formulas, and related parameters within methodology A. For the applicable conditions concerning project type and installed capacity, since this content contains explicit conditional relationships, it is converted into corresponding first-order logical predicates. This allows subsequent processing to logically determine whether methodology A meets the applicable conditions based on the specific project type and installed capacity. Simultaneously, corresponding data nodes are established for methodology A, relevant applicable conditions clauses, emission reduction calculation formulas, and parameters such as power generation and emission factors, and relationships are established based on their logical connections within the methodology document. This creates a knowledge association structure where methodology A points to its relevant clauses, corresponding clauses are associated with calculation formulas or parameters, and calculation formulas are associated with the parameters involved in the calculation.
[0032] For example, when receiving project characteristic parameters for a wind power project, the applicability of methodology A to the current project can be determined based on the conditional clauses and logical expressions corresponding to methodology A. When generating emission reduction calculation content in the PDD file, the corresponding methodological basis, calculation formula, and related parameters can be determined based on the basic association knowledge graph, thereby providing a structured data source for subsequent document generation and verification.
[0033] Step S102: Receive project feature parameters, the set of methodologies to be referenced, and project parameter instance data corresponding to the parameter nodes in the parameter layer. Convert the project feature parameters into known fact predicates, and encode the first-order logic predicates corresponding to the set of methodologies to be referenced with the known fact predicates, then input them into the satisfiability modular theory solver for satisfiability determination. When the determination result is unsatisfiable, determine the rules that cause the conflict and output the conflict information. When the determination result is satisfiable, determine the variable value constraints used to constrain document generation based on the solution result.
[0034] Specifically, this step is mainly used to uniformly solve the actual characteristics of the current project and the logical rules in the proposed methodology before the PDD document is generated, to determine whether the proposed methodology can be valid under the current project conditions, and to form the constraint information required for subsequent document generation when the corresponding logical conditions are met.
[0035] Specifically, it receives project feature parameters corresponding to the current project, the set of methodologies the user intends to reference, and project parameter instance data. The project feature parameters describe project attributes that can affect the applicability of methodologies or rule judgments, such as project type, project size, location, implementation time, or other information related to the applicability of methodologies. The set of methodologies to be referenced represents one or more methodologies planned for use in the current PDD file. The project parameter instance data represents the actual project data corresponding to the basic knowledge graph parameter nodes in the current project, providing a project-side data source for subsequent document content generation.
[0036] It should be noted that while project feature parameters and project parameter instance data may have some content correlation, their roles in this embodiment are not entirely the same. Project feature parameters are mainly used for determining the methodological applicability and logical consistency in the current step, while project parameter instance data mainly serves as the actual data basis for subsequent document generation.
[0037] Upon receiving the project feature parameters, the project facts that can participate in logical judgment are converted into known fact predicates. Known fact predicates refer to objective attributes or parameter states that have been determined for the current project, expressed in logical form. This conversion allows project information in natural language or structured field format to be processed in a unified logical form with the first-order logical predicates formed by the methodological conditional clauses in step S101. For example, actual project information such as the project type being wind power and the installed capacity being 50MW can be converted into known facts representing the project type and scale, respectively. Methodological conditions such as "applies only to wind power projects" and "installed capacity must not exceed the corresponding upper limit" have already been converted into corresponding first-order logical predicates in step S101.
[0038] Subsequently, based on the set of methodologies to be referenced, the first-order logical predicates corresponding to the respective methodologies are obtained from the basic association knowledge graph, and these logical rules and the known fact predicates corresponding to the current project are uniformly encoded into constraint information that can be processed by the Satisfiability Modulo Theories (SMT) solver.
[0039] In one implementation, the satisfiability model theoretical solver includes a constraint encoding unit, a Boolean solving unit, a theoretical constraint solving unit, and a result parsing unit. The constraint encoding unit is used to convert the methodology selection state, the first-order logical predicates formed by the methodology clauses, and the known facts of the project into a unified set of constraints. Specifically, whether each proposed methodology is selected is represented as a Boolean variable, discrete conditions such as project type are represented as corresponding logical conditions, and numerical conditions such as installed capacity, parameter values, and their ranges are represented as equality constraints or inequality constraints in the integer or real number domains.
[0040] For a methodology in a selected state, its applicable conditions and parameter constraints are determined as valid constraints in the current constraint set. For example, suppose the selected state of methodology A is true, and methodology A requires that "the project type is wind power generation and the installed capacity does not exceed 50MW". Then, an implication relationship is established between the selected state of methodology A and the above applicable conditions; at the same time, the project type and installed capacity of the current project are added to the constraint set as known facts.
[0041] The Boolean solver unit first determines candidate Boolean assignments based on logical relations such as conjunction, disjunction, negation, and implication in the constraint set. The theoretical constraint solver unit then performs a consistency check on the equality, inequality, and numerical range constraints activated by the current candidate Boolean assignment. When contradictions exist among the theoretical constraints, the corresponding conflicting constraints are fed back to the Boolean solver unit to exclude the current candidate assignment and continue determining other candidate assignments. When a candidate assignment can simultaneously satisfy both the Boolean logical relations and the corresponding numerical theoretical constraints, a satisfactory result is returned; when none of the candidate assignments can simultaneously satisfy the corresponding theoretical constraints, an unsatisfactory result is returned.
[0042] When a satisfactory result is returned, the result parsing unit reads the solution model and valid constraints. For deterministic equations, the numerical values constrained by the equation are used as specific value constraints for the corresponding variables. For the same variable constrained by multiple inequalities, their upper and lower bounds are obtained respectively, and the intervals that are commonly satisfied are calculated to form the allowed value intervals. When an unsatisfactory result is returned, a subset of core rules that cannot be simultaneously satisfied is determined from the conflicting constraints, and conflict information is generated based on the clause nodes associated with the corresponding rules.
[0043] For example, if methodology A is selected and its applicable conditions include "project type is wind power generation" and "installed capacity does not exceed 50MW", when the current project facts are "project type is wind power generation, installed capacity is 50MW", the logical conditions and numerical constraints can be met simultaneously, and the solver returns a satisfactory result. However, if the current project installed capacity is 80MW, then "installed capacity is 80MW" and "installed capacity does not exceed 50MW" cannot be met simultaneously. The theoretical constraint solving unit determines the corresponding numerical constraint conflict, ultimately returns an unsatisfactory result, and identifies the methodology clause corresponding to the installed capacity limit as one of the conflict rules.
[0044] Satisfiability modular theory solvers are used to determine whether constraints consisting of project facts and methodological rules can be simultaneously satisfied. Since methodological conditions may include constraints such as numerical magnitude and range in addition to logical relationships, satisfiability determination can comprehensively assess whether there are logical contradictions between project facts and one or more methodological rules.
[0045] When the solution result is unsatisfiable, it indicates that the current project facts and at least some rules in the proposed methodology cannot be simultaneously satisfied, or that there are constraints between the proposed methodology that cannot be mutually satisfied. In this case, the relevant rules causing the unsatisfiable state are determined based on the solution result, and corresponding conflict information is output to indicate that there is a logical conflict in the current methodology selection or project conditions that needs to be addressed. Until the conflict is resolved, the subsequent PDD document content generation process can be paused, thereby avoiding continuing document generation based on methodologies that do not meet the applicable conditions.
[0046] When the solution result is satisfactory, it indicates that under the current project conditions, the logical constraints corresponding to the proposed methodology can be jointly satisfied. At this point, the variable value constraints related to subsequent document generation can be further determined based on the solution result. Variable value constraints are used to limit the allowed values of project data or calculation parameters during the PDD document generation process, ensuring that the subsequent large language model generating document content is not only constrained by textual semantic cues but also by the value conditions determined by the methodological logical rules.
[0047] It should be noted that the variable value constraints obtained from the satisfiability solution are used to define the value conditions that should be followed during subsequent document generation. This does not mean that a value generated by the solver that satisfies the conditions will necessarily be used as actual project data. Actual project values can still originate from the received project parameter instance data and be adopted by the subsequent document generation process, provided that the corresponding variable value constraints are met.
[0048] Therefore, this step allows for a logical consistency assessment between project facts and methodological rules before document generation, and the assessment result is then passed on to subsequent document generation processes. This ensures that methodological rules are no longer merely textual content for reference by the large language model, but are transformed into logical constraints that actually participate in document generation control.
[0049] For example, suppose the current project is a wind power project with an installed capacity of 50MW, and the user intends to reference methodology A and methodology B in the PDD file. Assume that in step S101, the relevant applicable conditions have been extracted from methodology A and converted into a logical rule representing "the project type is wind power and the installed capacity does not exceed 50MW"; methodology B requires that the project's installed capacity is not less than 30MW.
[0050] After receiving the type and installed capacity of the current project, the system converts "project type is wind power generation" and "project installed capacity is 50MW" into the corresponding known fact predicates, and inputs them together with the first-order logic predicates corresponding to methodology A and methodology B into the satisfiability module theory solver.
[0051] Since 50MW simultaneously satisfies both the upper limit of installed capacity specified in Methodology A and the lower limit of installed capacity specified in Methodology B, the corresponding constraints can be jointly established, and the satisfiability modular theory solver returns a satisfiable result. If the methodology further specifies that a parameter used for subsequent calculations should be within a specified value range, the system can form corresponding variable value constraints based on this logical rule and pass these constraints to the subsequent PDD document generation process. For example, to further illustrate the determination process of variable value constraints, suppose a parameter constraint clause in Methodology A explicitly states that "emission factor EF is not less than 0.7 and not greater than 0.9". Step S101 identifies the parameter object EF and the conditional relationships such as "not less than", "not greater than", and "and", and converts "not less than 0.7" to EF≥0.7 and "not greater than 0.9" to EF≤0.9 respectively. The two numerical comparison relationships are combined through a conjunction relation to form the corresponding first-order logical predicate. When Methodology A is in the selected state, this first-order logical predicate is used as a valid constraint in the current constraint set and input into the satisfiability modular theory solver. Since EF is simultaneously bounded by a lower bound of 0.7 and an upper bound of 0.9, the result parsing unit determines that the common interval satisfying the two inequalities is [0.7, 0.9], and uses this interval as the variable value constraint corresponding to EF. If the actual value of EF recorded in the project parameter instance data is 0.8, then this actual value is within the allowed value interval and can be used for subsequent PDD document generation.
[0052] For example, if the current project's installed capacity becomes 80MW, but the proposed methodology A requires that the installed capacity not exceed 50MW, then the current project conditions and the applicability conditions of methodology A cannot be simultaneously met. The satisfiability model solver will return an unsatisfiable result. Based on this, the system determines that the applicability conditions related to the project's installed capacity constitute the source of conflict and outputs corresponding conflict information, indicating that the current project conditions do not meet the applicability requirements of methodology A.
[0053] Through the above processing, contradictions between the applicable conditions of the methodology and the actual situation of the project can be found before the large language model is formally called to generate PDD documents. In cases where there is no logical conflict, the variable value conditions formed by the methodology rules can be passed to subsequent generation steps, thus forming a processing link in which the document generation is jointly constrained by the project facts and the methodology logic.
[0054] Step S103: When the determination result is satisfactory, determine the content element requirements of the current chapter to be generated according to the standard PDD template, determine the clause nodes, formula nodes and parameter nodes associated with the current chapter to be generated from the basic association knowledge graph, and construct a structured prompt word input large language model based on the determined node data, the project parameter instance data and the variable value constraints to generate the initial document text containing the custom markup format.
[0055] Specifically, this step, after the methodological applicability and logical consistency judgments are passed, constrains the document generation process of the large language model based on the chapter requirements of the PDD file and the structured methodological knowledge already present in the basic related knowledge graph. This ensures that the generated content simultaneously meets the PDD template requirements, methodological basis, and the actual data situation of the current project. Specifically, when the satisfiability judgment result of step S102 is satisfiable, it indicates that the current project characteristics and the logical rules corresponding to the proposed methodology can both be established, at which point the PDD document content generation process begins.
[0056] First, the required chapters and their corresponding content element requirements are determined based on the standard PDD template corresponding to the current project. The standard PDD template specifies the chapter structure, chapter order, and content types for each chapter. For example, different chapters may require descriptions of basic project information, baseline scenarios, emission reduction calculations, parameter sources, or monitoring plans. During the generation process, chapters are processed sequentially according to the order specified in the PDD template. In one implementation, standard PDD templates can be pre-stored in a PDD template library, with each template at least associated with a corresponding template version, applicable project type, applicable methodology scope, and chapter structure information. The system can determine the corresponding standard PDD template from the PDD template library based on the current project type, the set of methodologies to be referenced, and the corresponding template version information. For each chapter in the template, corresponding content element types can be pre-configured, enabling the system to determine the type of knowledge object to be retrieved based on the content element requirements of the current chapter, and to obtain the corresponding clause nodes, formula nodes, and parameter nodes from the basic related knowledge graph in conjunction with the set of methodologies to be referenced. For example, when the chapter to be generated involves emission reduction calculations, the methodological clauses, calculation formulas, and parameters used in the formulas related to emission reduction calculations can be determined; when the chapter to be generated involves monitoring plans, the corresponding monitoring requirements clauses and parameters that need to be monitored can be determined. In this way, a correspondence is established between the current chapter generation task and the specific knowledge objects in the basic knowledge graph.
[0057] After identifying the relevant graph nodes, the content information carried by each node is further obtained. Simultaneously, the project parameter instance data corresponding to the current project and the variable value constraints formed in step S102 are acquired. Specifically, the graph node data primarily provides the methodological basis for rules, formulas, and parameter definitions; the project parameter instance data provides the actual parameter values used in the current project and their corresponding data sources; and the variable value constraints limit the value conditions that relevant parameters or data should meet during document generation. This creates a mutually supportive relationship between the information sources required for document generation: the graph node data determines "what rules and formulas are used for generation," the project parameter instance data determines "what data is actually used in the current project," and the variable value constraints limit "what conditions the relevant data should meet."
[0058] Subsequently, the generation task of the current chapter, the graph node data related to the current chapter, the project parameter instance data, and variable value constraints are combined according to a preset data organization method to form structured prompts, which are then input into the large language model. These structured prompts differ from ordinary prompts that only contain descriptions of the natural language task; they enable the large language model to distinguish the generation requirements, methodological basis, actual project data, and constraints of the current chapter, thus allowing the model to generate the content of the current chapter based on the defined input information.
[0059] The large language model generates the initial document text corresponding to the current chapter based on the above information. During the generation process, preset custom tags are attached to content related to methodological clauses, formulas, or parameters, enabling the relevant content in the generated text to establish a correspondence with the corresponding nodes in the basic knowledge graph. Custom tags can be understood as machine-recognizable information attached to the generated content, used to indicate the graph node corresponding to a certain data, formula, or textual statement. For content using actual project parameter values, a correspondence can also be established between the corresponding content and project parameter instances.
[0060] It should be noted that the initial document text obtained in this step mainly serves as the intermediate document result for subsequent processing. Custom tags are not only used to identify the basis for generating content, but also provide a recognition foundation for subsequent steps such as parsing document content, creating document instance nodes, and establishing anchoring relationships between document instances and knowledge graph nodes.
[0061] Therefore, this step is not simply about calling a large language model to freely generate PDD text, but rather about using a standard PDD template to limit the scope of generated content, using a basic association knowledge graph to provide methodological basis, using project parameter instance data to provide actual data for the current project, and using variable value constraints to further restrict the conditions for data use, thus forming a document generation process that is constrained by multiple types of structured information.
[0062] For example, suppose we need to generate a section related to emission reduction calculations in a PDD file for a wind power project. According to the standard PDD template, this section should at least include the basis for the emission reduction calculations, the calculation formulas used, and explanations of relevant parameters.
[0063] Based on the above content element requirements, the system identifies the methodological clause nodes, emission reduction calculation formula nodes, and parameter nodes such as power generation and emission factors related to the current chapter in the basic association knowledge graph, thereby obtaining the methodological basis and calculation relationships required for the generation of the current chapter. Assume the actual emission factor value corresponding to the current project is 0.736. This value has been saved as a project parameter instance data, and its corresponding parameter node and data source have been recorded. Simultaneously, following the processing procedure in step S102, the parameter constraint clause regarding emission factor EF in methodology A has been converted into a numerical constraint of EF≥0.7 and EF≤0.9. The system determines the allowable value range of EF as [0.7, 0.9] based on the common satisfaction range of the two inequalities. The actual emission factor value of 0.736 corresponding to the current project falls within this allowable value range, and therefore can be used as a project parameter instance data in the generation of the current chapter. At this point, the system organizes the content requirements of the current chapter, relevant methodological clauses, emission reduction calculation formulas, emission factor and other parameter information, the actual value of the project (0.736), and the variable value constraints from 0.7 to 0.9 into structured prompts for the current chapter, and inputs them into the large language model.
[0064] The large language model generates the initial text for the emission reduction calculation section based on this. In the generated result, custom tags corresponding to the relevant parameter nodes and parameter instances are added to the actual values of the emission factors used; custom tags corresponding to the formula nodes are added to the referenced calculation formulas; and custom tags corresponding to the relevant clause nodes are added to the methodological basis that needs to be explained. This generated initial document text includes both the PDD (Product Data Description) section content for the compilers and the corresponding information between key content, methodological basis, and actual project data. Subsequent steps can then parse these custom tags to identify which graph node the data, formulas, and related arguments in the document originate from, and further establish relationships between document instance nodes and knowledge graph nodes.
[0065] In this way, the generation process of the current chapter is based on the PDD template to determine the content scope, the basic association knowledge graph to determine the methodology, the project parameter instance data to provide actual project data, and the variable value constraints to limit the data usage conditions, thus providing a foundation for the subsequent formation of traceable and verifiable PDD document content.
[0066] Step S104: Parse the custom markup format, create instance nodes for document paragraphs and data cells in the initial document text in the document object model, and establish bidirectional searchable anchoring relationships between the instance nodes and the clause nodes, formula nodes or parameter nodes they reference. Connect the instance nodes as PDD document chapter layers to the basic association knowledge graph to form a five-layer association knowledge graph.
[0067] Specifically, this step is used to further convert the initial document text generated in step S103 into structured document data that can participate in knowledge graph association and subsequent logical verification, so that the specific content in the PDD document can establish a clear correspondence with the methodological clauses, calculation formulas and parameters it references.
[0068] Specifically, the initial document text generated in step S103 includes not only natural language content for user reading but also custom tags used to identify relevant knowledge sources. After receiving the initial document text, the system parses these custom tags to determine the clause nodes, formula nodes, or parameter nodes associated with the corresponding content in the document. For example, if a text contains a methodological basis, the corresponding clause node can be identified through the corresponding tag; if the text contains a calculation formula, the corresponding formula node can be identified; if the text uses project parameters or monitoring parameters, the corresponding parameter node can be identified. Thus, a correspondence is established between the natural language content in the document and the knowledge objects in the basic association knowledge graph formed in step S101.
[0069] After tagging and parsing, document paragraphs and data cells in the initial document text are instantiated, and instance nodes are created for the corresponding content in the Document Object Model (DOM). These instance nodes represent the actual document content generated in the current PDD file, and are distinct from the methodology nodes, clause nodes, formula nodes, and parameter nodes in the basic knowledge graph. It should be noted that the PDD document chapter layer in this embodiment is used collectively to refer to the document content instance layer on the PDD file side, and its node granularity is not limited to complete chapters. Depending on the document structure, chapter instance nodes, paragraph instance nodes, data cell instance nodes, or other location nodes that can uniquely represent specific document content can be set in this layer. This embodiment mainly uses the instance nodes corresponding to document paragraphs and data cells for explanation.
[0070] In the basic knowledge graph, nodes primarily express general methodological knowledge, while document instance nodes represent actual content such as paragraphs and data cells already formed in a specific project's PDD file. This distinction allows the same methodological clause, formula, or parameter to be referenced by multiple PDD document instances, while each document instance node retains information such as its project and document location, thus achieving a hierarchical organization between methodological knowledge and specific project documents.
[0071] Subsequently, based on the parsing results of the custom tags, anchoring relationships are established between document instance nodes and their corresponding clause nodes, formula nodes, or parameter nodes. These anchoring relationships indicate "the methodology upon which a specific document content is generated or used." For example, a description of emission reduction calculations can be associated with its corresponding calculation clauses and formula nodes, and a data cell can be associated with its parameter nodes. This association is bidirectionally searchable. On one hand, one can start from a paragraph or data cell in a PDD document to query the source of its corresponding methodology clause, formula, or parameter; on the other hand, one can start from a methodology clause, formula, or parameter to find the document content in the current PDD file that references that knowledge object. Therefore, "bidirectional searchability" here mainly refers to the ability to trace back and query the document content and its knowledge basis in both forward and reverse directions, and is not limited to a specific data storage method.
[0072] After establishing instance nodes and constructing anchor relationships, these document instance nodes are integrated into the existing basic knowledge graph as PDD document chapter layers. The basic knowledge graph formed in step S101 includes a methodology layer, a clause layer, a formula layer, and a parameter layer, mainly representing structured knowledge on the methodology side. This step further adds a PDD document chapter layer, connecting the actual generated PDD document content with clause, formula, and parameter nodes through anchor relationships, thus forming a five-layer knowledge graph including the methodology layer, clause layer, formula layer, parameter layer, and PDD document chapter layer.
[0073] After forming a five-layered knowledge graph, PDD documents are no longer independent text files separate from methodological knowledge, but become part of the basic knowledge graph. The specific content in the document can be traced back to its methodological basis along the association path, and the nodes on the methodological side can also reversely determine the corresponding document instances, providing a structured data foundation for subsequent document logic verification and the positioning of the impact of methodological version changes.
[0074] For example, suppose that in step S103, the large language model has already generated the emission reduction calculation section in the PDD file of a wind power project. This section includes a textual explanation of the basis for the emission reduction calculation, an emission reduction calculation formula, and several data cells for filling in emission factors and power generation. Simultaneously, when generating this content, the corresponding methodological clauses, formulas, and parameter information have been recorded according to preset custom tags.
[0075] After parsing the initial document text, the system can determine: the emission reduction calculation is based on a specific calculation clause in Methodology A; the emission reduction calculation expression corresponds to the emission reduction formula node in the basic knowledge graph; and specific data such as emission factors and power generation correspond to their respective parameter nodes. Subsequently, in the document object model, instance nodes are created for the relevant paragraphs and data cells in the current chapter. For example, a paragraph instance node can be created for the actually generated document paragraph "The emission reduction of this project is determined according to the calculation relationship specified in Methodology A," and this instance node can be anchored to the corresponding calculation clause node in Methodology A.
[0076] For emission reduction calculation formulas in a document, an anchoring relationship can be established between document instance nodes containing the formula and the corresponding formula node. For data cells containing actual emission factor values, an anchoring relationship can be established between the corresponding data cell instance node and the emission factor parameter node. After completing the above processing, starting from the emission factor data cell in the PDD document, the corresponding parameter definition and related methodological basis can be queried; conversely, starting from the emission factor parameter node in the basic association knowledge graph, it is also possible to find which content in the current PDD document references the parameter. Finally, these document paragraph instance nodes and data cell instance nodes are uniformly integrated as PDD document chapter layers into the original four-layer basic association knowledge graph.
[0077] Therefore, the original "methodology—clause—formula—parameter" knowledge structure is further expanded into a five-layered relational structure of "methodology—clause—formula—parameter—PDD document chapter," ensuring that the content of a specific PDD document maintains a clear and searchable relationship with its corresponding methodological knowledge. For example, if it is necessary to check whether a calculation formula is correctly referenced later, the location can be directly determined based on the relationship between the document instance node and the formula node; if a methodological formula changes in a later version, the PDD document content referencing the formula can also be searched based on this relationship, providing a foundation for subsequent verification and version impact analysis.
[0078] Step S105: Perform parallel logic verification on the generated document content based on the five-layer association knowledge graph. The parallel logic verification includes at least a dimensional consistency test based on the variable dependency graph and a coverage completeness test based on Boolean satisfiability solution.
[0079] Specifically, this step is mainly used to further verify the logical consistency of the generated results after the PDD document content is generated and anchored to the methodological knowledge. It judges whether the generated document content meets the corresponding methodological requirements from two different dimensions: calculation relationships and monitoring requirements. After step S104, a five-layered knowledge graph containing the methodology layer, clause layer, formula layer, parameter layer, and PDD document chapter layer has been formed. Instance nodes such as paragraphs and data cells in the document have been associated with their corresponding clause nodes, formula nodes, and parameter nodes. Therefore, during logical verification, the corresponding methodological basis can be directly obtained from the document instance nodes, or the specific document content using the knowledge object can be located by reverse-engineering the formula or parameter node.
[0080] Based on the aforementioned association structure, multiple independent logical verification processes are initiated on the generated PDD document. In this embodiment, at least dimensional consistency verification and coverage completeness verification are included. The dimensional consistency verification primarily processes the calculation formulas and related parameters in the PDD document to determine whether the physical dimensional relationships between variables during formula calculation are reasonable. Specifically, based on the calculation formulas used in the document and the parameters involved, corresponding formula nodes and parameter nodes can be obtained from the five-layer association knowledge graph, and a variable dependency graph can be formed based on the computational dependencies between variables. By analyzing this dependency relationship, it can be determined whether the physical dimensions of each variable can remain consistent when intermediate variables and the final result are obtained from the basic input parameters through related computational relationships.
[0081] Therefore, the dimensional consistency test does not only determine whether the final calculated value in the document is correct, but also further verifies the calculation process itself. For example, even if a calculation result is within a reasonable range, if variables without corresponding dimensional relationships are used in the calculation process, or if the necessary transformation relationships are missing at the points where dimensional transformation is required, the dimensional consistency test can still detect the corresponding anomalies.
[0082] Completeness verification primarily determines whether the monitoring plan formed in the PDD file fully reflects the monitoring requirements proposed by the methodology to be referenced. Specifically, the monitoring parameter requirements that the current project should meet can be determined based on the methodology nodes, clause nodes, and parameter nodes in the five-layer association knowledge graph. Simultaneously, the actual monitoring content set in the document can be determined based on the instance nodes in the PDD document chapter layer. By comparing the correspondence between the methodology requirements and the actual monitoring design in the document, coverage conditions that can be used for Boolean satisfiability judgment are formed. Boolean satisfiability is then used to determine whether all necessary monitoring requirements can be satisfied by the corresponding monitoring content in the document. When the solution results show that all necessary monitoring requirements have corresponding actual monitoring content, the current monitoring plan can be considered to meet the completeness requirement. When there are necessary monitoring requirements that cannot be satisfied by the actual monitoring content, the corresponding missing content can be identified, and the source methodology, corresponding clause, and related parameters can be located based on the association relationships in the knowledge graph.
[0083] Here, "parallel logical verification" means that dimensional consistency verification and coverage completeness verification are performed separately for the same generated document. Each retrieves the corresponding verification object and methodological basis based on the five-layer relational knowledge graph, without requiring the completion result of the former verification as a necessary input for the latter. Therefore, verification results of different dimensions can be generated separately, and finally summarized to evaluate the logical consistency of the current PDD document.
[0084] Since both types of verification are based on a five-layer relational knowledge graph, when an anomaly is detected, not only can the anomaly result be provided, but the anchored relationships within the graph can also be used to further determine the document location and methodological basis corresponding to the anomaly, thus providing a clear basis for locating and tracing the verification results. Therefore, this step transforms the generated PDD document from a simple text review object into a structured object capable of logical verification based on formula dependencies, parameter attributes, and methodological requirements, providing a foundation for discovering computational logic anomalies and monitoring omissions.
[0085] For example, suppose steps S103 and S104 have completed the generation of the emission reduction calculation section and the monitoring plan section in the PDD file of a wind power project, and established anchoring relationships between the relevant document content and the formula nodes, parameter nodes, and monitoring requirement clauses in the basic association knowledge graph. For the emission reduction calculation section, the document contains the emission reduction calculation formula and references multiple parameters such as power generation and emission factors.
[0086] During the dimensional consistency check, the computational dependencies between variables can be obtained from the formula nodes corresponding to the emission reduction formula, and the physical dimensions of each basic parameter can be obtained from the relevant parameter nodes. The system determines whether the dimensions of the final emission reduction result can be correctly derived from each input parameter by following the computational relationships between variables. If the dimensional relationships in the entire calculation chain are mutually matched, the dimensional verification passes; if the parameters used in a certain intermediate calculation link do not match the corresponding calculation relationship in terms of physical dimensions, it can be determined that there is a dimensional anomaly in the calculation chain, and the corresponding calculation content in the PDD file can be located further based on the association between the formula node and the document instance node. At the same time, the coverage completeness verification of the monitoring plan section is performed.
[0087] Suppose methodology A requires the current project to monitor power generation, emission factors, and several other parameters related to emission reduction calculations. The system can determine the parameters to be monitored based on the monitoring requirement clauses and parameter nodes corresponding to methodology A, and then identify the actual monitoring items already set from the instance nodes corresponding to the monitoring plan section of the PDD document. If the PDD document has already set corresponding monitoring content for all necessary parameters, the coverage completeness verification will yield a result that meets the requirements. Conversely, if methodology A requires monitoring a certain parameter, but the current PDD monitoring plan does not have corresponding monitoring content that meets this requirement, the coverage completeness verification will determine that the requirement is not covered, and further locate the corresponding methodology clauses and parameter nodes based on the five-layer association knowledge graph, while also determining that there is a lack of monitoring content in the PDD document.
[0088] The aforementioned dimensional consistency and coverage completeness verification can be performed separately for the same PDD document. For example, a document may have no issues with the dimensional relationships in its calculation formulas, but the monitoring plan may still have missing parameters; conversely, the monitoring plan may have fully covered the methodological requirements, but a certain calculation link may have dimensional anomalies. Therefore, by checking from different logical dimensions through multiple verification processes, a more complete logical consistency verification result can be formed for the generated PDD document.
[0089] This step utilizes the aforementioned five-layered knowledge graph to unify and link the "actual content in the document," the "methodological requirements," and the "calculation relationships between formulas and parameters," enabling the generated PDD file to undergo further logical verification based on structured knowledge relationships and providing a basis for subsequent anomaly localization and document correction.
[0090] Step S106: In response to the version update of the methodology document, perform a difference analysis on the subgraphs of the methodology knowledge graph before and after the update, determine the changed nodes, and perform a multi-hop search along the five-layer association knowledge graph according to the preset influence propagation direction to locate the document instance nodes affected by the changed nodes and output a structured influence report.
[0091] Specifically, this step is primarily used to automatically analyze the impact of version changes on existing PDD documents when the methodology document is updated, and to locate the specific document content that needs to be re-verified or modified based on the aforementioned five-layered knowledge graph. In practical applications, the methodology document may be released in new versions due to rule adjustments, parameter revisions, changes in calculation formulas, or updates to monitoring requirements. Since the generated PDD documents may reference clauses, formulas, or parameters from older versions of the methodology, it is necessary to determine which existing document contents are affected when the methodology version changes.
[0092] Specifically, when a new version of a methodology document is detected, both the pre-update and post-update subgraphs of the methodology knowledge graph are retrieved. These subgraphs can be understood as data sets extracted from the basic relational knowledge graph, encompassing the methodology that has undergone version changes. These subgraphs include clause nodes, formula nodes, parameter nodes, and related relationships. By comparing the two subgraphs, it's possible to determine which knowledge objects within the methodology have changed.
[0093] The objects of difference analysis can include the nodes themselves and the relationships between nodes. For example, a modification to a clause, a change in a calculation formula, an adjustment to a parameter definition, or the addition or deletion of existing nodes or relationships can all be considered differences resulting from version changes. Based on the difference analysis results, the nodes that have changed are identified as the starting point for subsequent impact analysis. Here, changed nodes are used to represent clauses, formulas, parameters, or other related knowledge objects that have undergone substantial changes between the old and new versions.
[0094] Subsequently, starting from the changed node, influence propagation is performed based on the established relationships between different knowledge objects in the five-layered knowledge graph. Since clear relationship paths have been formed between methodologies, clauses, formulas, parameters, and PDD document instances, other nodes that depend on or reference the changed node can be searched level by level along these paths. This multi-hop search indicates that influence analysis is not limited to objects directly connected to the changed node; it can also propagate further based on the relationships between nodes. For example, if a formula changes, the parameters related to that formula or the document content referencing that formula may be affected; if a clause changes, the formula, parameters, and PDD document content referencing that clause may also need to be re-verified. Influence propagation proceeds in a preset direction, ensuring that the search process gradually reaches the PDD document instance nodes that actually reference the relevant content, starting from the knowledge objects that have changed on the methodology side.
[0095] Once the multi-hop search reaches the PDD document chapter level, the document instance nodes affected by this methodology version update can be identified. Document instance nodes can correspond to specific paragraphs, formulas, or data cells within the PDD file; therefore, these instance nodes allow for further identification of the actual document locations requiring inspection or modification. Based on the difference analysis results, the changed nodes, and the relationships between affected document instance nodes, a structured impact report is generated. This report demonstrates the impact of the methodology version update on existing PDD files and can include version change information, changed methodology knowledge objects, affected PDD document content, and the reasons for the impact. This allows users to quickly identify content requiring further verification or adjustment based on the report.
[0096] Therefore, this step utilizes the established relationship between methodological knowledge and PDD document content in the aforementioned five-layer relational knowledge graph to further map methodological version changes from "file-level changes" to "specific document content-level impacts," thereby avoiding the need for manual item-by-item comparison of the complete PDD file after a methodological update.
[0097] For example, suppose a wind power project has already generated a PDD file based on an older version of Methodology A, and in step S104, an anchoring relationship was established between the clauses, formulas, parameters of Methodology A and the PDD document instance nodes. Subsequently, a new version of Methodology A is released, in which a certain formula related to emission reduction calculation is modified.
[0098] After detecting an update to methodology version A, the system retrieves the corresponding subgraphs of the methodology knowledge graph for both the old and new versions, and performs a difference analysis on the two subgraphs. By comparison, it can be determined that the formula node corresponding to the emission reduction calculation formula has changed, and this formula node is identified as the change node.
[0099] Subsequently, starting from this changed node, a multi-hop search is performed within the five-layer relational knowledge graph. Since this formula node is associated with related parameter nodes and the emission reduction calculation content in the PDD document, the system can progressively identify the document instance nodes affected by the formula change along these relationships. For example, Section 4.2 of the current PDD document contains an emission reduction calculation table generated based on this formula, where the corresponding calculation content has already established an anchor relationship with the original formula node. Through influence propagation, the document instance node corresponding to this calculation table can be located, thus determining that Section 4.2 belongs to the affected content of this methodology update.
[0100] The system further generates a structured impact report based on methodology version changes, formula node changes, and the relationships between corresponding document instances. The report can indicate that methodology A has been updated from the old version to the new version, that the emission reduction calculation formula has changed, and that the relevant calculation content in Section 4.2 of the current PDD document needs to be re-verified.
[0101] For example, if this version update only involves a change in a certain monitoring requirement clause, the corresponding clause node can be used as the change node, and the search can be performed along the relationship between the clause, parameter nodes, and PDD monitoring plan content to determine whether the corresponding monitoring plan paragraph or data item in the current PDD file has been affected.
[0102] Through the above processing, version changes in the methodology document can be automatically linked to the specific PDD document content. This allows the compilers to identify the key areas that need to be verified or adjusted based on the structured impact report without having to reread the entire methodology document and PDD document line by line, thus providing a basis for subsequent document maintenance.
[0103] In some embodiments of this application, to further define the structured parsing of the original methodology documents, the logical processing of conditional clauses, and the construction of the basic relational knowledge graph, clauses, formulas, and parameter elements are extracted from the original methodology document set, conditional clauses are converted into first-order logical predicates, and the basic relational knowledge graph is constructed, including: The pre-set rule parser is invoked to identify the chapter hierarchy, text flow, table structure and mathematical formulas in the original methodology document set, and a large language model is invoked for auxiliary parsing when the confidence of the parsing result is lower than the pre-set confidence threshold. The identified clauses are classified according to the clause type keyword library to determine the corresponding clause type. The clause type includes at least the applicable conditions clause, monitoring requirement clause, calculation formula clause, and baseline setting clause. For the conditional clauses, based on the pre-set mapping relationship between conditional keywords and logical symbols, the conjunction, disjunction, negation, implication, and numerical comparison relationships in the natural language conditions are mapped into corresponding logical expressions to form the first-order logical predicates; Globally unique node identifiers are generated for methodology, clause, formula, and parameter, respectively. Directed association edges are established based on the attribution relationship between methodology and clause, the formula association relationship between clause and formula, the variable reference relationship between formula and parameter, and the monitoring requirement relationship between clause and parameter, to form the basic association knowledge graph.
[0104] As described above, the pre-built rule parser is first invoked to perform structured parsing on the original methodology document set. Based on features such as chapter numbers, clause numbers, heading formats, text paragraph structures, and table boundaries, the rule parser identifies the chapter hierarchy, main text, and table content in the methodology documents. For mathematical formulas in the documents, it identifies the position of the formulas in the document and their corresponding expressions, enabling the formulas to be processed as independent data objects in subsequent processing.
[0105] During the parsing process, a corresponding parsing confidence level can be determined for each parsing result. When the rule parser can complete the recognition based on a clear number, format, or preset rule, the corresponding parsing result is directly adopted. When the parsing confidence level of a paragraph, table, or formula is lower than the preset confidence threshold due to abnormal formatting, non-standard expression, etc., the corresponding content and its context information are provided to the large language model for auxiliary parsing to determine its content boundaries, semantic type, or relationship with the context. Thus, while ensuring that content with a clear structure is processed primarily using deterministic rules, the ability to recognize non-standardized content is improved. In one implementation, the parsing confidence level can be determined based on at least one of the following during the rule parsing process: chapter number matching result, title format matching result, text boundary recognition completeness, table structure recognition completeness, or formula recognition completeness. For example, corresponding scores can be configured for different structural features, and the parsing confidence level of the current parsing object can be formed based on the matching results of each structural feature. The preset confidence threshold can be pre-configured according to the parsing accuracy requirements of the methodology document.
[0106] Furthermore, each structural feature participating in the evaluation of the current parsing object can be converted into a feature score between 0 and 1, and the parsing confidence of the current parsing object can be determined based on the scores of each structural feature. For example, when each structural feature uses the same weight, the arithmetic mean of the scores of each effective structural feature can be calculated as the parsing confidence; when the importance of different structural features differs, corresponding weights can be configured separately, and a weighted calculation can be performed based on each feature score and its corresponding weight. When the obtained parsing confidence is lower than a preset confidence threshold, the current parsing object and its context information are provided to the large language model for auxiliary parsing; when the parsing confidence is greater than or equal to the preset confidence threshold, the parsing result obtained by the preset rule parser is used.
[0107] After content parsing is completed, the identified clauses are categorized according to a pre-defined clause type keyword library. This library stores typical semantic features corresponding to different clause types. For example, clauses containing phrases like "applicable," "meet the following conditions," or "not exceeding" can be identified as applicable condition clauses; clauses containing phrases like "monitoring," "measurement," "recording," or "frequency" can be identified as monitoring requirement clauses; clauses containing phrases like "calculation" or "formula" can be identified as calculation formula clauses; and clauses containing phrases like "baseline" or "baseline scenario" can be identified as baseline setting clauses. The above clause types are only used to illustrate the main clause categories in this embodiment; other clause types can be set according to the content of specific methodological documents. Clause classification clarifies the function and processing methods of different clauses in the subsequent knowledge graph.
[0108] For clauses containing conditional judgments, the natural language conditions are converted into corresponding first-order logical predicates based on predefined mappings between conditional keywords and logical symbols. During this conversion, the conditional objects, logical connections, and numerical constraints within the clauses are identified and mapped to their corresponding logical expressions. For example, expressions like "and" and "simultaneously" in natural language correspond to conjunctions where multiple conditions are satisfied simultaneously; expressions like "or" and "or" correspond to disjunctions where any one condition is satisfied; conditions with exclusionary meanings can be converted into negations; conditional relations such as "if...then..." or "only if" can be converted into corresponding implication relations; and expressions like "not exceeding," "at least," "greater than," "less than," and numerical ranges are converted into corresponding numerical comparison relations. After this conversion, conditional clauses that originally relied on manual semantic understanding can be transformed into structured logical rules that can be invoked in subsequent logical problem-solving processes.
[0109] After extracting the elements of clauses, formulas, and parameters, corresponding graph nodes are created for each methodology, clause, formula, and parameter, and a globally unique node identifier is generated for each node to facilitate unique location and referencing later. Subsequently, directed association edges are established based on the actual relationships between data objects in the methodology file. Specifically, the attribution relationship between methodology nodes and clause nodes is established based on the methodology to which the clause belongs; formula association relationships are established between clause nodes and corresponding formula nodes based on the calculation formulas defined, referenced, or pointed to in the clauses; variable reference relationships are established between formula nodes and parameter nodes based on the variables contained in the formulas; and monitoring requirement relationships are established between clause nodes and parameter nodes based on the monitoring objects specified in the monitoring requirement clauses.
[0110] By establishing the aforementioned nodes and directed edges, the methodologies, clauses, formulas, and parameters in the original methodology document are organized into a basic knowledge graph with a clear hierarchy and associated paths. In subsequent processing, the methodological rules, calculation formulas, or parameter information related to any node can be obtained along the corresponding associated path, thus avoiding the need to repeatedly parse the complete methodology document. This provides a unified data foundation for subsequent methodological conflict determination, PDD document generation, and logical verification based on the knowledge graph.
[0111] For example, regarding the clause "This methodology applies to wind power projects with an installed capacity not exceeding 50MW" in Methodology A, the rule parser first identifies this content as an independent clause and classifies it as an applicable condition clause based on characteristics such as "applies to" and "not exceeding". Subsequently, it identifies "project type is wind power" and "installed capacity not exceeding 50MW" as conditions, and converts the relationship between the two into a conjunction relation, thereby forming a logical rule representing "project type is wind power and project installed capacity is less than or equal to 50MW".
[0112] Simultaneously, a methodology node is established for methodology A, and a clause node is established for the applicable conditions, with a hierarchical relationship between the two. If another clause of this methodology specifies a formula for calculating emission reductions, a corresponding formula node is further established; for variables such as power generation and emission factors included in the formula, parameter nodes are established respectively, and variable reference relationships are established between the formula node and the corresponding parameter node. In this way, a structured knowledge path is formed that progressively links from methodology nodes to clauses, formulas, and parameters.
[0113] In some embodiments of this application, to further define the process of determining the satisfiability of the proposed methodology and the determination of variable value constraints, the determination of satisfiability and the determination of variable value constraints include: The selection state of each methodology in the proposed methodology set is encoded as a Boolean variable. The methodology participating in the satisfiability determination is determined according to the value of each Boolean variable. The first-order logic predicate corresponding to the methodology in the selected state and the known fact predicate together form a constraint set and are input into the satisfiability modular theory solver. When the satisfiability modular theory solver returns an unsatisfiable result, a subset of core rules that cause the unsatisfiability is extracted, the conflict type is determined based on the subset of core rules, and the conflict characteristics are matched with the triggering conditions in the preset resolution strategy library to generate candidate resolution schemes. When the satisfiability modular theory solver returns a satisfiability result, it determines the specific value constraint for the deterministic equality in the constraint set, determines the corresponding allowed value interval for the inequality in the constraint set, and determines the specific value constraint and / or allowed value interval as the variable value constraint.
[0114] As described above, for each methodology in the set of proposed methodologies, a Boolean variable is set to represent its selection state. The Boolean variable has two states: selected and unselected. When a user selects a methodology as the reference methodology for the current PDD file, the corresponding selection state is determined to be selected, and the applicable conditions, parameter constraints, and other logical rules corresponding to that methodology participate in the satisfaction judgment of the current project.
[0115] Subsequently, the first-order logical predicates corresponding to each proposed methodology are obtained from the basic relational knowledge graph, and together with the known fact predicates formed based on the current project's characteristic parameters, they constitute a constraint set. For example, when a methodology stipulates that the project's installed capacity does not exceed 50MW, and the current project's installed capacity is 80MW, the constraint set simultaneously includes information such as the methodology being selected, the methodology requiring an installed capacity not exceeding 50MW, and the project's actual installed capacity being 80MW. The satisfiability module theory solver determines whether these constraints can be simultaneously satisfied by uniformly solving them.
[0116] When the solver returns an unsatisfiable result, it indicates that there are rules in the current constraint set that cannot be simultaneously satisfied. In this case, a subset of core rules is extracted from the constraints leading to the unsatisfiability, and the corresponding conflict type is determined based on the conditions involved in the core rules. Conflicts can manifest as the actual project conditions not meeting the applicability requirements of a single methodology, or as contradictions existing between multiple proposed methodologies regarding applicability conditions, parameter value rules, or project boundaries.
[0117] After determining the conflict type, feature information characterizing the nature of the conflict is extracted from a subset of core rules and matched against trigger conditions in a pre-defined resolution strategy library. The resolution strategy library can pre-store candidate handling methods corresponding to different conflict types, such as changing to other applicable methodologies, adjusting project boundaries, or redefining relevant parameter handling methods. The matched handling methods are output as candidate resolution solutions, which are then confirmed by the user based on the actual project situation, rather than the system automatically changing the already selected methodology or project conditions.
[0118] In one implementation, each strategy record in the conflict resolution strategy library includes at least a conflict type, a triggering condition, and candidate handling methods. The system determines the current conflict characteristics based on the rule types, conflict variables, and conflict relationships involved in the core rule subset, and compares them with the triggering conditions in each strategy record. For example, when the core rule subset indicates that the applicability conditions of a selected methodology cannot be simultaneously met with the known facts of the current project, the conflict type is determined to be a methodology applicability conflict. The corresponding triggering condition can be set as "the methodology applicability conditions and the known facts of the project cannot be simultaneously satisfied," and its candidate handling methods include canceling the current methodology selection, selecting other methodologies that meet the project conditions, or re-verifying the corresponding project characteristic parameters. As another example, when two selected methodologies specify a lower bound and an upper bound for the same variable, and the lower bound is greater than the upper bound, the conflict type is determined to be a parameter value constraint conflict. The corresponding triggering condition can be set as "the allowed value intervals corresponding to the same variable do not intersect," and its candidate handling methods include adjusting the set of methodologies to be referenced or re-verifying the relevant project parameters and project boundaries. The system matches strategy records that meet the triggering conditions based on the current conflict characteristics and outputs the corresponding candidate handling methods.
[0119] When the satisfiability modular theory solver returns a satisfiability result, it indicates that the current project facts and the constraint rules corresponding to the proposed methodology can both hold. At this point, further analysis of the variable constraints in the constraint set that are relevant to subsequent document generation is needed.
[0120] For deterministic equations where the methodology explicitly specifies a unique value, the corresponding numerical value can be defined as a specific value constraint. For example, when the methodology explicitly specifies a fixed value for a transformation coefficient, this fixed value can be used as a parameter condition that must be met when generating related content. For inequality constraints where the methodology specifies upper and lower limits or allowable ranges for numerical values, the allowable value range is determined based on the corresponding restrictions. For example, when a parameter is limited to between 0.7 and 0.9, this range is defined as the allowable value range for that parameter, and the actual project parameter values used when generating PDD documents should fall within this range.
[0121] It should be noted that a satisfaction assignment generated during the satisfaction determination process does not necessarily become the actual parameter value for the current project. For parameters with interval constraints, the solution result is mainly used to determine the allowable value range; the specific value can still be provided by the corresponding project parameter instance data. Only when the methodology explicitly specifies a unique value will this determined value be directly used as the specific value constraint. For parameters for which the methodology does not explicitly limit the value, no additional variable value constraints need to be formed, and the value can be determined by the actual project data.
[0122] Finally, the specific value constraints and / or allowed value ranges obtained are passed as variable value constraints to the subsequent PDD document generation process. This ensures that the large language model is subject to the conditions determined through logical solution when generating data content involving relevant parameters. For example, if the current project is a 50MW wind power project, and the user selects both methodology A and methodology B, and if methodology A requires an installed capacity of no more than 50MW, while methodology B requires an installed capacity of no less than 30MW, then the current project can simultaneously meet the applicable conditions of both methodologies, and the satisfiability model solver returns a satisfiability result. If the methodology further limits the allowed range of a certain emission factor to 0.7 to 0.9, then this range forms a variable value constraint, used to limit the value of this parameter in the subsequent PDD document generation process.
[0123] Conversely, if a project has an installed capacity of 80MW but still selects methodology A, which requires an installed capacity not exceeding 50MW, then the corresponding project facts and the methodology's applicability conditions cannot be simultaneously met, and the solver returns an unsatisfactory result. The system determines the source of the conflict based on relevant core rules: the project size does not meet the methodology's applicability conditions. It then matches a corresponding candidate processing method from the resolution strategy library, prompting the user to adjust the methodology selection before proceeding to the subsequent document generation process.
[0124] In some embodiments of this application, to further define the organization of structured prompt words, the structured constraints of the output results of the large language model, and the independent verification process of the generated results, the structured prompt words are input into the large language model to generate the initial document text, including: The structured prompts are divided into a background instruction area, a mandatory constraint area, a graph data area, and an output format area. The variable value constraints are filled into the mandatory constraint area using dynamic placeholders. The node data of the clause nodes, formula nodes, and parameter nodes associated with the chapter to be generated are filled into the graph data area. The output format area limits the output of the large language model according to a preset structured format. Receive the structured intermediate results generated by the large language model for the current chapter to be generated. The structured intermediate results are used to form the initial document text. The content corresponding to the project data includes parameter node identifiers and corresponding parameter instance information. The content corresponding to the methodological conclusions includes clause node identifiers. The content corresponding to the formulas includes formula node identifiers. The structured intermediate results are subjected to node identifier existence verification, numerical constraint compliance verification, and formula reference compliance verification. If any verification fails, the current generated result is rejected and regeneration is triggered. If the verification passes, the standardized formula expression and its source reference information are written into the corresponding content according to the corresponding formula node to obtain the initial document text.
[0125] As described above, structured prompts are constructed based on the content requirements of the chapter to be generated, and these prompts are divided into a background instruction area, a mandatory constraint area, a graph data area, and an output format area. The background instruction area describes the current document generation task, including the PDD chapter to be generated, the generation objective, and the main content to be completed, enabling the large language model to determine the current processing object. The mandatory constraint area stores the variable value constraints determined in step S102. For specific parameters involved in different chapters, dynamic placeholders can be used to fill the corresponding constraint content of the current item into the appropriate positions. For example, taking the variable value constraint [0.7, 0.9] obtained based on EF≥0.7 and EF≤0.9 as an example, when generating chapters involving this parameter, this value range is added to the mandatory constraint area, so that the model is limited by this range when generating relevant data content. The graph data area provides the methodological basis for the current chapter. The system fills this area with relevant clause content, formula information, and parameter definitions based on the identified association nodes in the basic association knowledge graph. Therefore, the large language model can generate documents based on specified methodological knowledge, rather than choosing or speculating on methodological basis. The output format area specifies the data organization method of the model's output results, so that the generated results not only include document content for user reading, but also simultaneously output knowledge graph node identification information corresponding to the relevant content. This provides a machine-recognizable data foundation for subsequent node verification and document anchoring. Combining the above areas forms a complete structured prompt word, which is then input into the large language model to generate the content of the current chapter.
[0126] The large language model generates structured intermediate results corresponding to the current chapter based on structured prompts. These intermediate results are intermediate data in the initial document text formation process and are not directly used as the content of the PDD document after verification. The system first independently verifies the methodological basis, project data, and formula references involved. After passing the verification, it completes formula standardization and writes source information, resulting in the initial document text for subsequent document anchoring processing. For content involving actual project data, the structured intermediate results include both corresponding parameter node identifiers and parameter instance information; for explanations or judgments formed based on methodological clauses, they include corresponding clause node identifiers; and for content involving calculation formulas, the corresponding formula node identifiers are output. In this way, the key data, arguments, and formulas generated by the model all carry source information corresponding to the underlying knowledge graph, providing a basis for subsequent judgments on whether the generated content has valid evidence.
[0127] After obtaining the structured intermediate results, verification is performed using a validation procedure independent of the large language model. Validation includes at least node identifier existence verification, numerical constraint compliance verification, and formula reference compliance verification. Node identifier existence verification determines whether the clause nodes, formula nodes, or parameter node identifiers output by the model can be found in the basic relational knowledge graph. If a node identifier does not exist, it indicates that the generated content cannot establish a valid correspondence with existing methodological knowledge. Numerical constraint compliance verification determines whether the model output or the used item parameter values meet the variable value constraints determined in step S102. For example, taking the aforementioned variable value constraint [0.7, 0.9] obtained based on EF≥0.7 and EF≤0.9 as an example, if the parameter values used in the generated result exceed this range, the current generated result is determined to be non-compliant. Formula reference compliance verification determines whether the formulas involved in the generated content reference formula nodes that already exist in the basic relational knowledge graph. The large language model mainly outputs the corresponding formula node identifier information, while the standardized formula expressions actually written into the PDD document are obtained from the corresponding formula nodes, thereby reducing the possibility of errors in calculation relationships caused by the model generating or modifying formulas on its own.
[0128] If any of the above checks fails, the current structured intermediate result is rejected, and regeneration is triggered based on the check failure information, causing the large language model to reconstruct the current chapter content based on the corresponding constraints. In one implementation, a maximum number of regenerations can be set. If multiple regenerations still fail to pass the check, the current task is transferred to manual processing. Once the node identifier, parameter values, and formula references all pass the check, the corresponding standardized formula expression is obtained from the basic association knowledge graph based on the formula node identifier in the structured intermediate result. The formula expression and its methodological source information are written into the corresponding document location, while retaining the identification information corresponding to the parameters, clauses, and formulas, ultimately forming the initial document text for subsequent processing steps.
[0129] For example, when generating the emission reduction calculation section in a wind power project's PDD file, the background instruction area limits the current task to generating emission reduction calculation content; the mandatory constraint area allows the allowable range of emission factors to be written; the graph data area provides relevant methodological clauses, emission reduction calculation formulas, and parameter information such as emission factors and power generation; the output format area requires the model to provide corresponding node identification information for the generated parameter values, methodological basis, and formulas. Assuming the model generation process uses the actual value of the project's emission factor, 0.736, and outputs the parameter nodes and parameter instance information corresponding to this value, while also providing the formula node identifier corresponding to the emission reduction formula, the independent verification program first confirms that the corresponding node actually exists in the basic association knowledge graph, then determines that 0.736 is within the allowable range, and confirms that the referenced formula node belongs to a valid formula corresponding to the current methodology. After all verifications pass, the standardized formula expression and source information are obtained from the formula node and written into the initial document.
[0130] Through the above processing, the large language model mainly undertakes the task of organizing PDD document content based on given knowledge and constraints. The existence of methodological basis, whether the parameter values meet the constraints, and whether the formulas are correctly referenced are further confirmed by an independent verification process. This improves the consistency between the generated content and the methodological rules and the actual project data, and provides a foundation for establishing the anchoring relationship between document content and knowledge graph nodes.
[0131] In some embodiments of this application, to further define the data association between parameter nodes and project parameter instances, the setting method of custom tags, and the anchoring relationship between document instance nodes and knowledge graph nodes, the method further includes: The parameter node records the name, definition, data type, unit, monitoring frequency and physical dimension of the corresponding parameter, and generates a parameter instance identifier for the project parameter instance data. It also records the actual value, unit, data source and evidence information of the corresponding parameter in the current project, and establishes the association between the parameter instance identifier and the corresponding parameter node. When generating the initial document text, according to the custom markup format, the content involving parameters, formulas and clauses is written into parameter markup, formula markup and clause markup respectively. The parameter markup carries the corresponding parameter node identifier and parameter instance identifier, the formula markup carries the corresponding formula node identifier and the clause markup carries the corresponding clause node identifier. The parameter markers, formula markers, and clause markers are parsed to extract the target graph node identifiers corresponding to each marker. When parsing the parameter markers, the corresponding parameter instance identifiers are further extracted. The source instance node identifiers, target graph node identifiers, original text fragments, and location paths are recorded in the document object model. For the anchoring relationships corresponding to the parameter markers, the parameter instance identifiers are further recorded to establish the bidirectional searchable anchoring relationships. In response to changes in instance node positions caused by document editing, the position path in the anchoring relationship is updated, while the relationship between the source instance node and the target graph node remains unchanged.
[0132] As described above, the parameter nodes in the basic knowledge graph record attributes such as the name, definition, data type, unit, monitoring frequency, and physical dimensions of the corresponding parameter, representing the general definition of the parameter made by the methodology. For the parameter data actually used in the current project, corresponding project parameter instance data is formed, and a parameter instance identifier that can uniquely identify the instance data is generated. The project parameter instance data can record the actual value of the parameter, unit, data source, and evidence information. The evidence information is used to support the tracing of the source of the corresponding actual value and can include at least one of the following: source file identifier, data location in the source file, data acquisition time, recording time, or corresponding original data record identifier. Through the association between the two, the specific value in the PDD document can be traced back to both the parameter definition and the actual data source.
[0133] When generating the initial document text, parameters, formulas, and methodological clauses are marked with corresponding tags according to a preset custom tag format. Parameter tags indicate the parameter nodes and parameter instances corresponding to the current data content; formula tags indicate the formula nodes corresponding to the current calculation content; and clause tags indicate the clause nodes corresponding to the current text description or judgment basis. Custom tags are mainly used to provide node location basis for subsequent machine parsing and can be attached to the intermediate representation of the corresponding document content, without requiring the same display format to be retained when finally displayed to the user. Through these tags, the system can clearly identify which knowledge object in the basic related knowledge graph corresponds to a certain document content. Subsequently, the parameter tags, formula tags, and clause tags in the initial document text are parsed to obtain the corresponding target graph node identifiers; for parameter content involving actual project data, the corresponding parameter instance identifiers are also obtained.
[0134] In the Document Object Model (DOM), source instance nodes are created for actual content such as document paragraphs and data cells, and the correspondence between source instance node identifiers and target graph node identifiers is recorded. For parameter content, the corresponding parameter instance identifier is further recorded. Simultaneously, the original text fragment corresponding to the formation of this association and its position path within the document can be recorded, thus forming an anchored association that allows querying methodological basis from document instances and reverse querying the referenced document content from methodological nodes. For example, when the content "The baseline emission factor is 0.736" is generated in a PDD document, the corresponding parameter tag can be simultaneously associated with the "emission factor" parameter node and the parameter instance with a value of 0.736 in the current project. Thus, starting from this document content, the definition, unit, and methodological source of the emission factor can be queried, and further, the data source and evidence information corresponding to the actual value of 0.736 can be queried.
[0135] For the emission reduction calculation formulas in the document, the corresponding document instance node can be linked to the formula node in the basic knowledge graph through formula tags; for explanatory content such as "calculated according to the corresponding clause of Methodology A", the clause tag can be linked to the corresponding clause node. Thus, the data, formulas and key conclusions in the document all have corresponding knowledge sources.
[0136] Furthermore, when a user edits a PDD document, changing the position of a paragraph or data cell within the document, the core association between that paragraph and the knowledge graph node is not re-established. Instead, the position path in the anchor record is updated based on the new document location. Since the association primarily relies on the source instance node identifier and the target graph node identifier, simple paragraph moves or chapter adjustments do not disrupt the original traceability relationships. For example, if an emission factor description paragraph originally located in Section 4.2 of the PDD document is moved to Section 4.3 after editing, only the position path corresponding to that instance node needs to be updated to the new chapter location, while its association with the emission factor parameter node and its corresponding parameter instance remains unchanged. This approach reflects the document's current actual location while maintaining a stable traceability relationship between the document content and the methodology and actual project data.
[0137] Through the above processing, a link between "parameter definition - actual project value - document instance content" can be further established in the five-layer association knowledge graph. The correspondence between document content and clauses, formulas and parameters can be maintained through stable node identifiers, providing a reliable data association foundation for subsequent logical verification and impact positioning after methodological version changes.
[0138] In some embodiments of this application, to further define the variable dependencies and physical dimension propagation process of the calculation formulas in the document, a dimensional consistency check based on the variable dependency graph is included, including: Extract the variable dependencies of each calculation formula in the document, expand backward from the target output variable along the direction of the input variable, and construct a directed acyclic graph representing the variable calculation dependencies; The physical dimensions of the basic input parameters are read from the parameter nodes, and the physical dimensions of the intermediate and output variables are derived along the directed acyclic graph according to the rules that the dimensions of the operations are consistent for addition and subtraction, multiplication is performed by multiplying the dimensions, division is performed by dividing the dimensions, and exponentiation is performed by exponentiation. When variables with the same dimensions but different units are detected, they are converted to a unified unit according to a preset unit conversion relationship. The system checks whether the physical dimensions on both sides of each calculation formula are consistent, and whether the calculation link involving the conversion between different physical dimensions contains the corresponding conversion factor. When the dimensions are inconsistent or the conversion factor is missing, the system outputs the abnormal location information.
[0139] As mentioned above, the computational dependencies between variables are first extracted based on the calculation formulas and input-output relationships between formula variables referenced in the PDD document. Starting with the target output variable to be verified, the process expands backward according to which intermediate variables are calculated from this variable, and which basic input parameters are calculated from these intermediate variables, until the basic input parameters that no longer depend on other calculation results are reached, thus forming a variable dependency graph.
[0140] Nodes in a variable dependency graph represent basic input parameters, intermediate variables, or target output variables, and the directed relationships between nodes represent the computational dependencies between the corresponding variables. For formulas that can form a normal computational chain, the variable dependencies are organized into a directed acyclic graph, allowing for step-by-step dimensional derivation according to the dependency order. In one implementation, if the parsed formulas have mutual circular dependencies and cannot form a directed acyclic graph, an abnormal formula dependency message can be output, prompting a check of the corresponding formula definition.
[0141] Subsequently, the physical dimensions corresponding to the basic input parameters are read from the parameter nodes in the five-layer interconnected knowledge graph. Using the basic input parameters as the starting point for dimension propagation, the physical dimensions of intermediate variables and target output variables are derived step by step along the directed acyclic graph. The physical dimensions of the parameters can be represented using a unified combination of basic dimensions to ensure that different formulas and parameters can be compared in a unified manner.
[0142] Dimensional derivation follows the actual operational relationships in the formulas. For addition or subtraction, the variables involved in the operation should have the same physical dimension, and the result should retain the corresponding dimension. For multiplication, the dimensions of the variables involved in the operation are combined. For division, the dimensions of the dividend variable and the divisor variable are combined according to the division relationship. For exponentiation, the basic dimensions are raised to the power of the corresponding exponent. Following these rules, the theoretical dimensions of intermediate and final output variables can be gradually obtained from the known dimensions of the basic parameters.
[0143] During the dimensional propagation process, the units of measurement for the parameters are also checked. When two variables have the same physical dimensions but use different units of measurement, they are converted to a unified unit according to a preset unit conversion relationship before subsequent calculations and comparisons are performed. For example, if two mass parameters are expressed in tons and kilograms respectively, the unit can be unified after confirming that their dimensions are consistent, avoiding misjudgment of dimensional anomalies due to different measurement scales.
[0144] After deriving the dimensions of each variable, a dimensional consistency check is performed on the calculation formulas in the document. Firstly, the physical dimensions obtained on both sides of each equation are compared to see if they are consistent. If the dimensions on the left and right sides are different, the formula is determined to have a dimensional inconsistency problem, and the formula or parameter causing the anomaly is located based on the variable dependencies.
[0145] On the other hand, for calculation relationships involving conversions between different physical dimensions, it is necessary to further examine whether the corresponding calculation link contains the parameters or conversion factors required to complete the dimension conversion. For example, when calculating the corresponding emissions based on power generation, power generation can be expressed in MWh, while the emission factor can be expressed in tCO2 / MWh. Multiplying the two together yields the emissions expressed in tCO2. If the calculation link lacks an emission factor that performs the corresponding dimension conversion, it will be impossible to obtain physical dimensions consistent with the target output variable.
[0146] When inconsistencies in dimensions, inability to convert units according to preset relationships, or missing necessary conversion factors are detected, the formulas and variables corresponding to the anomalies and their positions in the PDD document are determined based on the variable dependency graph and the anchoring relationships between document instance nodes, formula nodes, and parameter nodes. Anomaly location information is then output for subsequent verification or modification.
[0147] For example, the emission reduction result in a PDD document is calculated from baseline emissions and project emissions. The system obtains the variable dependencies from the corresponding formula node and reads the physical dimensions of each basic parameter from the parameter node. If both baseline emissions and project emissions are expressed in CO2 equivalent mass, the emission reduction obtained after subtracting them should maintain the same physical dimensions. When the dimensions on both sides of the equation are consistent, this part of the check passes. As another example, an emission calculation formula uses project power generation and emission factor as basic input parameters. The unit of power generation is MWh, and the unit of the emission factor is tCO2 / MWh. According to the multiplication dimension propagation rule, the output unit after multiplying them is tCO2, consistent with the physical dimensions of the target emission. If the corresponding calculation link directly uses power generation as the emission without the emission factor, the output dimension derived from the variable dependency graph will be inconsistent with the target emission. The system will then locate the corresponding formula or parameter and output an error message.
[0148] Through the above processing, the formula dependencies and parameter physical dimensions stored in the knowledge graph can be used to perform chain-like dimensional verification of the calculation process in the PDD document from the basic input parameters to the final output result, thereby improving the ability to identify anomalies in the calculation logic and providing deterministic calculation verification results for the parallel logic verification in step S105.
[0149] In some embodiments of this application, to further define the method for determining the coverage relationship between methodological monitoring requirements and the actual monitoring content of PDD documents, coverage completeness verification based on Boolean satisfiability solution includes: The necessary monitoring parameters required by the proposed methodology set are extracted from the five-layer association knowledge graph to form a set of necessary monitoring parameters, and the actual monitoring parameters are extracted from the document instance nodes corresponding to the PDD document chapter layer to form a set of actual monitoring parameters. For each necessary monitoring parameter and each actual monitoring parameter, the coverage relationship is determined based on the parameter node identifier matching result, the preset synonymous parameter equivalence mapping relationship, the unit convertibility and the monitoring frequency comparison result, and a Boolean coverage matrix is generated. Encode the coverage condition that all required monitoring parameters are satisfied by at least one actual monitoring parameter into a Boolean satisfiability problem and input it into the Boolean satisfiability solver; When the Boolean satisfiability solver returns an unsatisfiable result, the subset of necessary monitoring parameters that are not covered is extracted, and the corresponding parameter definitions and source clauses are obtained from the five-layer association knowledge graph to generate a monitoring missing prompt message.
[0150] As described above, firstly, based on the methodology set to be referenced in the current project, the monitoring requirement clauses and parameter nodes associated with the corresponding methodologies are located from the five-layer relational knowledge graph. The parameters explicitly required to be monitored by each methodology are then extracted to form a set of necessary monitoring parameters. For each necessary monitoring parameter in the set, its corresponding parameter node and source clause information can be retained for subsequent traceability of verification results. Simultaneously, the document instance nodes corresponding to the monitoring plan are determined from the PDD document chapter level, and the actual monitoring parameters that have been set are extracted from the relevant instance nodes to form a set of actual monitoring parameters. Thus, the set of necessary monitoring parameters represents the "content that should be monitored" on the methodology side, while the set of actual monitoring parameters represents the "monitoring content that has been set" in the current PDD file. Subsequently, a determination is made as to whether an effective coverage relationship exists between each necessary monitoring parameter and each actual monitoring parameter.
[0151] In one implementation, when the actual monitoring parameters have already established an anchoring relationship with the corresponding methodology parameter nodes, and the parameter node identifiers are consistent, it can be directly determined that there is an overlay relationship between the two. For parameters with different names but actually representing the same monitoring object, the equivalence relationship between the two can be determined based on the preset synonym parameter equivalence mapping relationship. For example, when the same monitoring object uses Chinese names, English abbreviations, or other equivalent names in different files, their correspondence can be determined through the pre-established equivalence mapping.
[0152] After determining the correspondence between the parameter objects, it is further necessary to determine whether the units and monitoring frequencies of the two meet the methodological requirements. For parameters with the same physical quantity but expressed in different units, check whether the units of the actual monitored parameters can be converted to the units corresponding to the required monitored parameters; if the conversion can be performed according to the preset unit conversion relationship, then the unit condition is met. For the monitoring frequency, convert the monitoring frequency specified by the methodology and the monitoring frequency actually set in the PDD file into a unified comparison form; when expressed as the number of monitoring times per unit time, if the actual number of monitoring times is not less than the methodological requirements, or when expressed as the monitoring period, if the actual monitoring period is not longer than the maximum monitoring period specified by the methodology, then the monitoring frequency condition is determined to be met.
[0153] Based on the above judgment results, a corresponding Boolean coverage value is formed for each required monitoring parameter and each actual monitoring parameter. When an actual monitoring parameter meets the requirements of the corresponding required monitoring parameter in terms of parameter object, unit, and monitoring frequency, the corresponding coverage value is determined to be true; otherwise, the corresponding coverage value is determined to be false. The coverage values between all required monitoring parameters and actual monitoring parameters are organized according to the correspondence relationship to form a Boolean coverage matrix.
[0154] Specifically, suppose the set of required monitoring parameters contains n required monitoring parameters, and the set of actual monitoring parameters contains m actual monitoring parameters. Let Cij be the element in the Boolean coverage matrix, where Cij represents whether the j-th actual monitoring parameter effectively covers the i-th required monitoring parameter. Cij is set to true when the j-th actual monitoring parameter meets the requirements of the i-th required monitoring parameter in terms of parameter object, unit, and monitoring frequency; otherwise, it is set to false.
[0155] For any required monitoring parameter, its corresponding Boolean coverage values from the 1st to the mth are logically dissected to indicate that the required monitoring parameter is effectively covered by at least one actual monitoring parameter. Then, the dissected results corresponding to all n required monitoring parameters are logically conjuncted to form a Boolean expression for coverage completeness. This Boolean expression is satisfied only when at least one Boolean coverage value corresponding to each required monitoring parameter is true.
[0156] When the Boolean satisfiability solver returns a satisfiable result, it means that at least one actual monitoring parameter of all required monitoring parameters meets the requirements; when it returns an unsatisfiable result, it further checks the corresponding Boolean coverage matrix, determines the required monitoring parameters whose corresponding coverage values are all false as uncovered parameters, and forms a monitoring missing prompt by combining their parameter nodes and source clauses.
[0157] The aforementioned Boolean expression for coverage completeness is input into the Boolean satisfiability solver as a Boolean satisfiability problem. When the solution is satisfiable, it indicates that all necessary monitoring parameters can be found in the current PDD monitoring plan, and the current monitoring plan can be considered to meet the requirements of the proposed methodology in terms of parameter coverage. When the solution is unsatisfiable, it indicates that at least one necessary monitoring parameter lacks corresponding actual monitoring content, or that although a corresponding monitoring parameter is set, conditions such as unit and monitoring frequency do not meet the methodological requirements. In this case, the subset of uncovered necessary monitoring parameters is determined based on the Boolean coverage matrix and the solution results.
[0158] For identified missing parameters, the system can query the parameter definition and corresponding monitoring requirement clauses along the five-layer association knowledge graph based on the parameter node, and generate a monitoring missing information message. The message can include the missing parameter name, parameter definition, methodology source, and corresponding clauses, enabling users to identify the areas in the PDD monitoring plan that need to be supplemented or adjusted. For example, a methodology requires monitoring three parameters: power generation, emission factor, and methane concentration, while the current PDD monitoring plan only includes power generation and emission factor. After establishing the coverage relationship between the three required monitoring parameters and the actual monitoring parameters, the system can determine that the first two parameters have effective coverage, while there is no actual monitoring parameter for methane concentration that meets the requirements. The Boolean satisfiability solution result is therefore unsatisfiable. The system further retrieves the definition of the methane concentration parameter and its source monitoring clauses from the knowledge graph and generates a corresponding monitoring missing information message.
[0159] Through the above processing, the integrity verification of the monitoring plan can be transformed from manual item-by-item comparison to coverage verification based on parameter correlation and deterministic rules. It can also directly link to the corresponding methodological requirements after monitoring omissions are found, providing a clear basis for subsequent supplementation and modification of the PDD document.
[0160] In some embodiments of this application, to further define the verification process of calculation results of multiple methodologies for the same target index, parallel logic verification also includes cross-computation verification, which includes: When there are at least two methodologies in the set of proposed methodologies used to calculate the same target index, the target index is calculated independently using the same set of basic input data along the formula dependency path corresponding to each methodology. Determine the deviation between the calculation results corresponding to different methodologies, and compare the deviation with a preset deviation threshold; When the deviation exceeds the preset deviation threshold, a difference analysis is performed on the formula structure, parameter values and project boundary definitions corresponding to different methodologies to determine the difference items that cause the deviation, and a difference analysis report containing the difference items and their source nodes is output.
[0161] As described above, the first step is to determine whether there are at least two methodologies in the current set of proposed methodologies used to calculate the same target indicator. The target indicator can be emission reduction or other project indicators that need to be calculated based on the methodological formula. When only one methodology can calculate the corresponding indicator, the cross-validation in this embodiment can be omitted; when multiple methodologies can calculate the same indicator, the calculation formulas corresponding to each methodology and the dependencies between the formulas are obtained from the five-layer relational knowledge graph.
[0162] For each methodology participating in cross-validation, the basic input parameters, intermediate variables, and computational relationships required to calculate the target index are determined along its corresponding formula dependency path, forming independent computational paths. During calculation, all methodologies use the same set of common basic input data to avoid additional biases caused by differences in basic project data, ensuring that differences in calculation results primarily reflect the formula structure, parameter processing rules, or project boundary requirements of different methodologies.
[0163] After completing the independent calculations for each methodology, the calculation results for the corresponding target indicators are obtained, and the deviations between different calculation results are determined. The deviations can be determined using absolute differences, relative differences, or other methods that can represent the degree of difference in results, depending on the actual application needs. The obtained deviations are then compared with a preset deviation threshold. The preset deviation threshold is used to determine whether the differences between the calculation results of different methodologies are within the allowable range. This threshold can be determined based on the allowable deviations specified in the project configuration, the corresponding methodology, or the mechanism specifications; if not explicitly specified, a default threshold preset by the system can also be used.
[0164] When the deviation between the calculation results corresponding to different methodologies does not exceed a preset deviation threshold, the results obtained by different calculation paths can be considered consistent within the current allowable range. When the deviation exceeds the preset deviation threshold, a difference analysis is further conducted on the calculation process of each methodology based on a five-layer relational knowledge graph. The difference analysis can include at least aspects such as formula structure, parameter values, and project boundary definitions. Among them, differences in formula structure are used to determine whether different methodologies use different calculation relationships when calculating the same target indicator, such as whether a certain calculation item is added or omitted; differences in parameter values are used to determine whether different methodologies specify different data sources or value methods for the same parameter; differences in project boundary definitions are used to determine whether different methodologies make different provisions for emission sources, activity ranges, or other boundary objects included in the calculation scope.
[0165] Through the above comparison, one or more discrepancies that may lead to deviations in the calculation results are identified, and their source nodes are obtained based on the association between each discrepancy and a knowledge graph node. Subsequently, a discrepancy analysis report is generated, which records at least the calculation results of different methodologies, the discrepancies, the identified discrepancies, and the sources of the corresponding methodological clauses, formulas, or parameters for subsequent verification. For example, a project uses both Methodology A and Methodology B, both of which can calculate the project's emission reductions. Using the calculation result of Methodology A as the benchmark, Methodology A yields an emission reduction of 1000 tons of CO2 equivalent, while Methodology B yields an emission reduction of 920 tons of CO2 equivalent. The relative deviation between the two is |1000-920| / 1000 = 8%. When the preset deviation threshold is 5%, the current calculation result discrepancy is determined to exceed the allowable range.
[0166] The system further compares the formulas, parameters, and project boundaries of the two methodologies. Assuming the main structure of the calculation formulas is essentially the same, but Methodology A specifies an emission factor using a regional average of 0.8, while Methodology B uses a measured project value of 0.736, it can be determined that the emission factor value selection rule is the main difference causing the result deviation. The system further obtains relevant evidence based on parameter nodes and related clause nodes, and records the two calculation results, the deviation, and the difference in emission factor values and its source in the difference analysis report for further confirmation by the compilers.
[0167] Through the above processing, in addition to dimensional consistency testing and coverage completeness verification, the PDD document can be further verified from the perspective of consistency of independent calculation results from multiple methodologies. When obvious deviations occur, the differences in results can be further traced back to specific formulas, parameters or boundary rules, thereby improving the ability to locate and interpret calculation result anomalies.
[0168] In some embodiments of this application, to further define the process of identifying differences in the knowledge graph after the methodology version update, determining the level of impact, propagating the impact, and re-verifying the modified version, a difference analysis is performed on the subgraphs of the methodology knowledge graph before and after the update, and a multi-hop search is executed, including: Extract the old version knowledge graph subgraphs before the update and the new version knowledge graph subgraphs after the update. Prioritize node alignment based on methodology number and clause number or formula number. For nodes that have not completed deterministic alignment, perform node matching based on the similarity of the main text or the similarity of the formula structure and parameter set. Configure editing weights for modifying node attributes, inserting or deleting nodes, and inserting or deleting associated edges. Determine the graph editing distance based on the graph editing operations that occur and their corresponding editing weights, and determine the impact level of each changed node in conjunction with the changed node type. Starting from the changed node, the associations between methodology and clause, clause and formula, formula and parameter, and clause and parameter are propagated in the direction from the reference node to the affected node. The reference anchoring relationship between PDD document instance node and clause node, formula node or parameter node is reversed in the direction from the target graph node to the document instance node until the affected document instance node is reached. The structured impact report is generated based on the located document instance nodes and their impact levels; In response to modifications to the PDD document based on the structured impact report, the satisfiability determination and the parallel logic verification are re-executed.
[0169] As described above, when a version update of a methodology document is detected, the old version knowledge graph subgraph corresponding to the methodology before the update and the new version knowledge graph subgraph corresponding to the methodology after the update are extracted respectively. Both subgraphs include at least the clause nodes, formula nodes, parameter nodes, and the relationships between nodes under the corresponding methodology. For the updated methodology document, following the structured parsing method of the original methodology document in step S101, the clause, formula, and parameter elements in the new version methodology document are extracted, and a knowledge graph subgraph corresponding to the new version methodology is constructed based on the relationships between these elements; simultaneously, the knowledge graph subgraph corresponding to the corresponding methodology before the update is retained as the old version knowledge graph subgraph for subsequent version difference analysis.
[0170] To determine corresponding nodes in the old and new versions, node alignment is first performed based on relatively definitive identification information. For example, when the methodology number and clause number or formula number remain unchanged, corresponding nodes in the old and new versions can be determined accordingly. For nodes whose numbers have changed due to version updates and cannot be directly aligned, matching is then performed based on node content. Specifically, clause nodes can be judged to belong to the same logical object based on the similarity of their text; formula nodes can be compared based on the formula's operational structure and the set of parameters involved to identify formulas whose numbers have changed but whose computational meanings are essentially the same. In one implementation, for clause nodes that cannot be definitively aligned using numbering information, the text of the old and new versions of the clauses can be converted into text feature vectors, and the similarity between the text feature vectors can be used to determine whether the two clause nodes correspond; when the similarity reaches a preset node matching threshold, the two clause nodes are identified as candidate corresponding nodes. For formula nodes, the operator structure, variable composition, and parameter node set in the formula can be extracted, and the similarity between the formula structure and parameter set can be determined based on the consistency of the operational structure and the overlap of the parameter set to complete the matching between the old and new formula nodes.
[0171] In one implementation, the text similarity between the clause texts can be represented by the cosine similarity between the feature vectors of the old and new clause texts. The text similarity value ranges from 0 to 1, with a higher value indicating a higher degree of semantic similarity between the two clause texts. A preset node matching threshold can be set based on the confirmed clause node samples from historical methodologies, allowing nodes reaching this threshold to be considered as candidate corresponding nodes for subsequent difference analysis. For nodes that do not reach the node matching threshold, a direct correspondence between the old and new nodes is not established, and further processing can be performed according to node insertion or deletion. For formula nodes, the correspondence between operators and their order of operations can be determined, and the degree of parameter overlap can be calculated based on the parameter node sets involved in the old and new formulas. When the formula operation structure meets the preset correspondence conditions and the degree of parameter set overlap reaches the preset requirements, the corresponding formula node is determined as a candidate corresponding node.
[0172] After node alignment is completed, changes occurring between the old and new knowledge graph subgraphs are identified. These changes include graph editing operations such as node attribute modification, node insertion or deletion, and edge insertion or deletion. In one specific implementation, the editing weight corresponding to node attribute modification is set to 1, the editing weight corresponding to node insertion or deletion is set to 3, and the editing weight corresponding to edge insertion or deletion is set to 2. If there are Na node attribute modifications, Nn node insertions or deletions, and Ne edge insertions or deletions between the old and new versions of the subgraph, the graph editing distance D is determined according to D = Na + 3Nn + 2Ne.
[0173] For format changes that only involve spaces, fonts, layout, or do not affect the semantics of nodes, normalization can be performed before calculating the graph edit distance, and these changes will not be counted as actual graph editing operations in the graph edit distance calculation.
[0174] To determine the impact level of each change node, node type coefficients can be configured for different node types. In one implementation, the node type coefficient for methodology nodes is set to 1, for clause and parameter nodes to 2, and for formula nodes to 3. For any change node, the editing weights corresponding to the editing operations of each diagram directly related to that node are accumulated and multiplied by the node type coefficient of that node to obtain the node impact score.
[0175] When a node's impact score is less than 2, the corresponding changed node is classified as low-impact; when the node's impact score is greater than or equal to 2 and less than 3, it is classified as medium-impact; and when the node's impact score is greater than or equal to 3, it is classified as high-impact. For example, when the calculation coefficient in a formula node is modified, the corresponding node attribute modification editing weight is 1, and the formula node type coefficient is 3. Therefore, the node's impact score is 3, and this formula node is classified as high-impact. When a clause node undergoes one attribute modification, the node's impact score is 2, which can be classified as medium-impact. When only non-critical explanatory attributes in a methodology node undergo one modification, the node's impact score is 1, which can be classified as low-impact.
[0176] After identifying the change nodes and their impact levels, each change node serves as the starting point for impact propagation, performing a multi-hop search along the five-layered knowledge graph. The propagation direction is determined based on the actual semantics of different relationships, rather than applying a uniform direction to all relationships. For relationships between methodology and clauses, clauses and formulas, formulas and parameters, and clauses and parameters, propagation occurs from the node serving as the basis or upstream rule to potentially affected downstream nodes. For example, if a methodology changes, it can be further determined whether its associated clauses are affected; if a clause changes, propagation can continue to the relevant formulas or parameters. For the reference anchoring relationship between PDD document instance nodes and clauses, formulas, or parameters, a reverse retrieval is performed according to the direction from the knowledge graph node pointing to the document instance node referencing that node. Thus, it is possible to gradually locate the PDD document content that actually uses the corresponding clauses, formulas, or parameters from the changed methodology knowledge object.
[0177] During the search process, the algorithm can propagate step-by-step in a multi-hop manner until it reaches the affected document instance node. This identifies the specific chapters, paragraphs, formulas, or data cells affected by the version change, and a structured impact report is generated based on the impact level of the corresponding change node. The impact report records information about the methodology version change, the changed objects, the location of the affected documents, the impact level, and the associated paths that caused the impact, enabling users to identify the content that needs to be verified or modified based on the report. For example, if methodology A is updated from an old version to a new version, and the coefficient of a certain emission reduction calculation formula is adjusted from 0.5 to 0.6, the system compares the subgraphs of the old and new versions and identifies the formula node as the change node where the numerical attribute has been modified. Subsequently, the impact propagation is performed along the relationship between the formula node and related parameters and document instances, locating the emission reduction calculation table that references the formula in the current PDD file, and indicating in the impact report that the corresponding calculation content needs to be re-verified or recalculated.
[0178] After the user modifies the PDD document based on the structured impact report, the aforementioned satisfiability determination and parallel logic verification are executed again. The satisfiability determination confirms that the modified project conditions, methodological rules, and related variable constraints maintain logical consistency. The parallel logic verification re-checks whether the modified calculation relationships and monitoring content meet requirements such as dimensional consistency and complete coverage. If the re-verification passes, it can be determined that the modified PDD document meets the logical requirements corresponding to the updated methodology. If conflicts or verification anomalies still exist, the corresponding issues are further highlighted based on the verification results for further modification. This forms a closed-loop maintenance process of "methodology version update—difference identification—impact propagation—document modification—re-verification".
[0179] Through the above processing, the changes generated by the methodology version update can be automatically propagated to specific PDD document instances using a five-layer relational knowledge graph. This reduces the workload of manually checking each item in the complete historical documents and reduces the possibility of introducing new logical inconsistencies through re-verification of the modifications.
[0180] Based on the same inventive concept as the methods described above, this application also proposes a PDD file intelligent compilation and verification system based on a large model, such as... Figure 2 The diagram shown is a structural schematic of a PDD (Programmable Docs) intelligent compilation and verification system based on a large model. The system includes: The basic knowledge graph construction module is used to obtain the original methodology document set, extract the clauses, formulas and parameter elements, convert conditional clauses into first-order logical predicates, and construct a basic association knowledge graph containing a methodology layer, a clause layer, a formula layer and a parameter layer based on the relationship between the clauses, formulas and parameter elements. The conflict pre-detection module is used to receive project feature parameters, the set of methodologies to be referenced, and project parameter instance data corresponding to the parameter nodes in the parameter layer. It converts the project feature parameters into known fact predicates, and encodes the first-order logic predicates corresponding to the set of methodologies to be referenced with the known fact predicates and inputs them into the satisfiability modular theory solver for satisfiability determination. When the determination result is unsatisfiable, it determines the rules that cause the conflict and outputs the conflict information. When the determination result is satisfiable, it determines the variable value constraints used to constrain document generation based on the solution result. The constrained document generation module is used to determine the content element requirements of the current chapter to be generated based on the standard PDD template when the determination result is satisfactory, determine the clause nodes, formula nodes and parameter nodes associated with the current chapter to be generated from the basic association knowledge graph, and construct a structured prompt word input large language model based on the determined node data, the project parameter instance data and the variable value constraints to generate initial document text containing custom markup format; The document anchoring module is used to parse the custom markup format, create instance nodes for document paragraphs and data cells in the initial document text in the document object model, establish bidirectional searchable anchoring relationships between the instance nodes and the referenced clause nodes, formula nodes or parameter nodes, and connect the instance nodes as PDD document chapter layers to the basic association knowledge graph to form a five-layer association knowledge graph. The logic verification module is used to perform parallel logic verification on the generated document content based on the five-layer association knowledge graph. The parallel logic verification includes at least a dimensional consistency test based on the variable dependency graph and a coverage completeness test based on Boolean satisfiability solution. The version impact analysis module is used to respond to version updates of methodology documents, perform difference analysis on the subgraphs of the methodology knowledge graph before and after the update, identify change nodes, and perform multi-hop search along the five-layer association knowledge graph according to the preset impact propagation direction to locate the document instance nodes affected by the change nodes and output a structured impact report.
[0181] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0182] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0183] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.
[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for intelligent compilation and verification of PDD files based on a large model, characterized in that, include: Obtain the original methodology document set, extract the clauses, formulas and parameter elements from the original methodology document set, transform the conditional clauses into first-order logical predicates, and construct a basic relational knowledge graph containing a methodology layer, a clause layer, a formula layer and a parameter layer based on the relationship between the clauses, formulas and parameter elements. The system receives project feature parameters, a set of methodologies to be referenced, and project parameter instance data corresponding to parameter nodes in the parameter layer. It converts the project feature parameters into known fact predicates, and encodes the first-order logic predicates corresponding to the set of methodologies to be referenced with the known fact predicates. The encoded predicates are then input into a satisfiability modular theory solver for satisfiability determination. When the determination result is unsatisfiable, the system determines the rules that cause the conflict and outputs the conflict information. When the determination result is satisfactory, the variable value constraints used to constrain document generation are determined based on the solution result. When the determination result is satisfactory, the content element requirements of the current chapter to be generated are determined according to the standard PDD template. The clause nodes, formula nodes and parameter nodes associated with the current chapter to be generated are determined from the basic association knowledge graph. The structured prompt word input large language model is constructed according to the determined node data, the project parameter instance data and the variable value constraints to generate the initial document text containing the custom markup format. The custom markup format is parsed, and instance nodes are created for document paragraphs and data cells in the initial document text in the document object model. A bidirectional searchable anchoring relationship is established between the instance nodes and the clause nodes, formula nodes or parameter nodes they reference. The instance nodes are then connected to the basic association knowledge graph as PDD document chapter layers to form a five-layer association knowledge graph. Parallel logical verification is performed on the generated document content based on the five-layer association knowledge graph. The parallel logical verification includes at least a dimensional consistency test based on the variable dependency graph and a coverage completeness test based on Boolean satisfiability solution. In response to the version update of the methodology document, a difference analysis is performed on the subgraphs of the methodology knowledge graph before and after the update to identify the changed nodes. Then, a multi-hop search is performed along the five-layer association knowledge graph according to the preset influence propagation direction to locate the document instance nodes affected by the changed nodes and output a structured influence report.
2. The method according to claim 1, characterized in that, Extract the clauses, formulas, and parameter elements from the original methodology document set, transform conditional clauses into first-order logical predicates, and construct the basic relational knowledge graph, including: The pre-set rule parser is invoked to identify the chapter hierarchy, text flow, table structure and mathematical formulas in the original methodology document set, and a large language model is invoked for auxiliary parsing when the confidence of the parsing result is lower than the pre-set confidence threshold. The identified clauses are classified according to the clause type keyword library to determine the corresponding clause type. The clause type includes at least the applicable conditions clause, monitoring requirement clause, calculation formula clause, and baseline setting clause. For the conditional clauses, according to the pre-set mapping relationship between conditional keywords and logical symbols, the conjunction, disjunction, negation, implication, and numerical comparison relationships in the natural language conditions are mapped into corresponding logical expressions to form the first-order logical predicates; Globally unique node identifiers are generated for methodology, clause, formula, and parameter, respectively. Directed association edges are established based on the attribution relationship between methodology and clause, the formula association relationship between clause and formula, the variable reference relationship between formula and parameter, and the monitoring requirement relationship between clause and parameter, to form the basic association knowledge graph.
3. The method according to claim 1, characterized in that, The determination of satisfiability and the determination of variable value constraints include: The selection state of each methodology in the proposed methodology set is encoded as a Boolean variable. The methodology participating in the satisfiability determination is determined according to the value of each Boolean variable. The first-order logic predicate corresponding to the methodology in the selected state and the known fact predicate together form a constraint set and are input into the satisfiability modular theory solver. When the satisfiability modular theory solver returns an unsatisfiable result, a subset of core rules that cause the unsatisfiability is extracted, the conflict type is determined based on the subset of core rules, and the conflict characteristics are matched with the triggering conditions in the preset resolution strategy library to generate candidate resolution schemes. When the satisfiability modular theory solver returns a satisfiability result, it determines the specific value constraint for the deterministic equality in the constraint set, determines the corresponding allowed value interval for the inequality in the constraint set, and determines the specific value constraint and / or allowed value interval as the variable value constraint.
4. The method according to claim 1, characterized in that, The process of constructing a structured cue word input large language model and generating the initial document text includes: The structured prompts are divided into a background instruction area, a mandatory constraint area, a graph data area, and an output format area. The variable value constraints are filled into the mandatory constraint area using dynamic placeholders. The node data of the clause nodes, formula nodes, and parameter nodes associated with the chapter to be generated are filled into the graph data area. The output format area limits the output of the large language model according to a preset structured format. Receive the structured intermediate results generated by the large language model for the current chapter to be generated. The structured intermediate results are used to form the initial document text. The content corresponding to the project data includes parameter node identifiers and corresponding parameter instance information. The content corresponding to the methodological conclusions includes clause node identifiers. The content corresponding to the formulas includes formula node identifiers. The structured intermediate results are subjected to node identifier existence verification, numerical constraint compliance verification, and formula reference compliance verification. If any verification fails, the current generated result is rejected and regeneration is triggered. If the verification passes, the standardized formula expression and its source reference information are written into the corresponding content according to the corresponding formula node to obtain the initial document text.
5. The method according to claim 1, characterized in that, The method further includes: The parameter node records the name, definition, data type, unit, monitoring frequency and physical dimension of the corresponding parameter, and generates a parameter instance identifier for the project parameter instance data. It also records the actual value, unit, data source and evidence information of the corresponding parameter in the current project, and establishes the association between the parameter instance identifier and the corresponding parameter node. When generating the initial document text, according to the custom markup format, the content involving parameters, formulas and clauses is written into parameter markup, formula markup and clause markup respectively. The parameter markup carries the corresponding parameter node identifier and parameter instance identifier, the formula markup carries the corresponding formula node identifier and the clause markup carries the corresponding clause node identifier. The parameter markers, formula markers, and clause markers are parsed to extract the target graph node identifiers corresponding to each marker. When parsing the parameter markers, the corresponding parameter instance identifiers are further extracted. The source instance node identifiers, target graph node identifiers, original text fragments, and location paths are recorded in the document object model. For the anchoring relationships corresponding to the parameter markers, the parameter instance identifiers are further recorded to establish the bidirectional searchable anchoring relationships. In response to changes in instance node positions caused by document editing, the position path in the anchoring relationship is updated, while the relationship between the source instance node and the target graph node remains unchanged.
6. The method according to claim 1, characterized in that, The dimensional consistency test based on the variable dependency graph includes: Extract the variable dependencies of each calculation formula in the document, expand backward from the target output variable along the direction of the input variable, and construct a directed acyclic graph representing the variable calculation dependencies; The physical dimensions of the basic input parameters are read from the parameter nodes, and the physical dimensions of the intermediate and output variables are derived along the directed acyclic graph according to the rules that the dimensions of the operations are consistent for addition and subtraction, multiplication is performed by multiplying the dimensions, division is performed by dividing the dimensions, and exponentiation is performed by exponentiation. When variables with the same dimensions but different units are detected, they are converted to a unified unit according to a preset unit conversion relationship. The system checks whether the physical dimensions on both sides of each calculation formula are consistent, and whether the calculation link involving the conversion between different physical dimensions contains the corresponding conversion factor. When the dimensions are inconsistent or the conversion factor is missing, the system outputs the abnormal location information.
7. The method according to claim 1, characterized in that, The coverage completeness verification based on Boolean satisfiability includes: The necessary monitoring parameters required by the proposed methodology set are extracted from the five-layer association knowledge graph to form a set of necessary monitoring parameters, and the actual monitoring parameters are extracted from the document instance nodes corresponding to the PDD document chapter layer to form a set of actual monitoring parameters. For each necessary monitoring parameter and each actual monitoring parameter, the coverage relationship is determined based on the parameter node identifier matching result, the preset synonymous parameter equivalence mapping relationship, the unit convertibility and the monitoring frequency comparison result, and a Boolean coverage matrix is generated. Encode the coverage condition that all required monitoring parameters are satisfied by at least one actual monitoring parameter into a Boolean satisfiability problem and input it into the Boolean satisfiability solver; When the Boolean satisfiability solver returns an unsatisfiable result, the subset of necessary monitoring parameters that are not covered is extracted, and the corresponding parameter definitions and source clauses are obtained from the five-layer association knowledge graph to generate a monitoring missing prompt message.
8. The method according to claim 1, characterized in that, The parallel logic verification also includes cross-computation verification, which includes: When there are at least two methodologies in the set of proposed methodologies used to calculate the same target index, the target index is calculated independently using the same set of basic input data along the formula dependency path corresponding to each methodology. Determine the deviation between the calculation results corresponding to different methodologies, and compare the deviation with a preset deviation threshold; When the deviation exceeds the preset deviation threshold, a difference analysis is performed on the formula structure, parameter values and project boundary definitions corresponding to different methodologies to determine the difference items that cause the deviation, and a difference analysis report containing the difference items and their source nodes is output.
9. The method according to claim 1, characterized in that, The step of performing difference analysis on the subgraphs of the methodological knowledge graph before and after the update and performing multi-hop search includes: Extract the old version knowledge graph subgraphs before the update and the new version knowledge graph subgraphs after the update. Prioritize node alignment based on methodology number and clause number or formula number. For nodes that have not completed deterministic alignment, perform node matching based on the similarity of the main text or the similarity of the formula structure and parameter set. Configure editing weights for modifying node attributes, inserting or deleting nodes, and inserting or deleting associated edges. Determine the graph editing distance based on the graph editing operations that occur and their corresponding editing weights, and determine the impact level of each changed node in conjunction with the changed node type. Starting from the changed node, the associations between methodology and clause, clause and formula, formula and parameter, and clause and parameter are propagated in the direction from the reference node to the affected node. The reference anchoring relationship between PDD document instance node and clause node, formula node or parameter node is reversed in the direction from the target graph node to the document instance node until the affected document instance node is reached. The structured impact report is generated based on the located document instance nodes and their impact levels; In response to modifications to the PDD document based on the structured impact report, the satisfiability determination and the parallel logic verification are re-executed.
10. A PDD document intelligent compilation and verification system based on a large model, characterized in that, include: The basic knowledge graph construction module is used to obtain the original methodology document set, extract the clauses, formulas and parameter elements, convert conditional clauses into first-order logical predicates, and construct a basic knowledge graph containing a methodology layer, a clause layer, a formula layer and a parameter layer based on the relationship between the clauses, formulas and parameter elements. The conflict pre-detection module is used to receive project feature parameters, the set of methodologies to be referenced, and project parameter instance data corresponding to the parameter nodes in the parameter layer. It converts the project feature parameters into known fact predicates, and encodes the first-order logic predicates corresponding to the set of methodologies to be referenced with the known fact predicates and inputs them into the satisfiability modular theory solver for satisfiability determination. When the determination result is unsatisfiable, it determines the rules that cause the conflict and outputs the conflict information. When the determination result is satisfiable, it determines the variable value constraints used to constrain document generation based on the solution result. The constrained document generation module is used to determine the content element requirements of the current chapter to be generated based on the standard PDD template when the determination result is satisfactory, determine the clause nodes, formula nodes and parameter nodes associated with the current chapter to be generated from the basic association knowledge graph, and construct a structured prompt word input large language model based on the determined node data, the project parameter instance data and the variable value constraints to generate initial document text containing custom markup format; The document anchoring module is used to parse the custom markup format, create instance nodes for document paragraphs and data cells in the initial document text in the document object model, establish bidirectional searchable anchoring relationships between the instance nodes and the referenced clause nodes, formula nodes or parameter nodes, and connect the instance nodes as PDD document chapter layers to the basic association knowledge graph to form a five-layer association knowledge graph. The logic verification module is used to perform parallel logic verification on the generated document content based on the five-layer association knowledge graph. The parallel logic verification includes at least a dimensional consistency test based on the variable dependency graph and a coverage completeness test based on Boolean satisfiability solution. The version impact analysis module is used to respond to version updates of methodology documents, perform difference analysis on the subgraphs of the methodology knowledge graph before and after the update, identify change nodes, and perform multi-hop search along the five-layer association knowledge graph according to the preset impact propagation direction to locate the document instance nodes affected by the change nodes and output a structured impact report.
Citation Information
Patent Citations
Inventory abnormity diagnosis method driven by supply chain knowledge graph
CN122286695A
Large language model verification
US20250200392A1
