Hydraulic mechanical feasibility study report grading review method based on large language model
By using a hierarchical review method based on a large language model, a logical structure tree is generated and hierarchical gating and strategy scheduling are performed. This solves the problems of time-consuming and labor-intensive review and information loss in the review of feasibility study reports for hydraulic machinery, and realizes automated and accurate compliance review.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-17
AI Technical Summary
The traditional review process for feasibility study reports of hydraulic machinery is time-consuming and labor-intensive, and is prone to oversights or errors. Existing large language models have problems with the loss of contextual information relevance and the inability to guarantee information integrity in the review of long documents.
A hierarchical review method based on a large language model is adopted. By generating a logical structure tree, hierarchical gating and strategy scheduling are performed, and parallel block-based review with three constraints and adversarial compliance review are conducted to generate the final review conclusion. A standard template library is used for quantitative evaluation and missing item identification to achieve automated and accurate review of hydraulic machinery feasibility study reports.
This reduced the workload of reviewers, improved the accuracy and efficiency of the review, and ensured the compliance and completeness of the feasibility study report for hydraulic machinery.
Smart Images

Figure CN121257516B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of water conservancy engineering and artificial intelligence, and relates to a hierarchical review method for feasibility study reports of hydraulic machinery based on a large language model. Background Technology
[0002] Feasibility study reports are the basis for engineering demonstration. Report review ensures the accuracy of basic engineering data and economic rationality. The completeness, compliance, and accuracy of feasibility study reports are the focus of review. However, feasibility study reports are characterized by their length, broad scope of knowledge, and high level of specialization. Traditional review processes rely on a large number of relevant standards and specifications, often consuming a lot of time and human resources, and may result in omissions or deviations. Therefore, researching how to introduce advanced report review methods to improve the completeness, compliance, and accuracy of feasibility study reports is of great significance for ensuring engineering safety and improving management efficiency.
[0003] The emergence of large language models has brought new solutions to report review. Large language models have a massive number of parameters, which allows them to store a large amount of knowledge. In addition, large language models are trained on massive corpora, have strong generalization performance, and can easily understand text content. They can also output fluently when conversing with humans, which makes it possible for large language models to process text reports. At present, large language models are widely used in other fields, such as building construction, grouting construction, aerospace, document review, and power systems. These cases and practices demonstrate the broad prospects of large language models.
[0004] However, due to the wide range of content, complexity, and numerous related regulatory clauses in feasibility study reports, the input content for review often exceeds the context window limit of a single input to the large language model. Therefore, the excess portion needs to be truncated and discarded, which compromises the integrity of the document content. Consequently, the large language model's review results deviate from expectations. At the same time, the document review involves complex tasks, and using the method of truncating the original report and inputting it into the large model in stages can easily lead to the loss of contextual information. Furthermore, excessively long contexts can cause the model to easily ignore intermediate content, resulting in information loss during the review process.
[0005] Therefore, how to address the review of long document reports for hydraulic machinery has become a pressing technical challenge.
[0006] This invention proposes a hierarchical review method for feasibility study reports of hydraulic machinery based on a large language model, which solves the above-mentioned problems, reduces the workload of reviewers, and improves the accuracy of the review. Summary of the Invention
[0007] Purpose of the invention: To provide a hierarchical review method for feasibility study reports of hydraulic machinery based on a large language model, so as to solve the above-mentioned problems existing in the prior art.
[0008] Technical Solution: A hierarchical review method for feasibility study reports of hydraulic machinery based on a large language model, comprising the following steps:
[0009] Step S1: Collect and parse the original hydraulic machinery feasibility study report to generate a logical structure tree and structured text;
[0010] Step S2: Based on the logical structure tree, perform hierarchical gating and policy scheduling to generate gating scheduling data;
[0011] Step S3: Based on the review strategy parameters in the gating scheduling data, perform three-constraint parallel block division on the structured text to obtain a set of sub-documents;
[0012] Step S4: Using the gating scheduling data, perform an auditable adversarial compliance review on each sub-document of the sub-document set to form a preliminary review conclusion set;
[0013] Step S5: Aggregate the preliminary review conclusions set, perform cross-sub-document consistency adjudication and result summary, and generate the final review conclusions.
[0014] According to one aspect of this application, step S2 further comprises:
[0015] Step S21: Construct a standard template library based on the hydraulic machinery industry standards. Compare the standard template library with the completeness and standardization of the logical structure tree from multiple preset dimensions, synthesize the structure compliance score, and identify the list of missing items.
[0016] Step S22: Set the review threshold and determine whether the structural compliance score has reached the preset review threshold. If it has not been reached, terminate the subsequent process.
[0017] Step S23: Extract the logical structure tree that reaches the preset review threshold, and map the structure compliance score and missing item list corresponding to the extracted logical structure tree to the core parameters and resource budget of the downstream review task to generate the review strategy parameters.
[0018] According to one aspect of this application, step S21 further comprises:
[0019] Step S21a: Check the coverage rate of the logical structure tree to the required chapters in the standard template library and obtain the coverage score;
[0020] Step S21b: Examine the chapter hierarchy of the logical structure tree and determine the hierarchy correctness score based on the structural violations;
[0021] Step S21c: Measure the difference between the chapter order of the logical structure tree and the standard template library, and calculate the order consistency score;
[0022] Step S21d: Traverse the contents of key chapters in the logical structure tree, evaluate the completeness rate of their internal technical elements, and obtain the element completeness score.
[0023] Step S21e: The coverage score, hierarchical correctness score, sequence consistency score, and element completeness score are weighted and summed to generate the final structure conformity score. The required items that do not appear in the structure tree, key sub-items that are not effectively covered due to hierarchical misclassification, and missing elements that do not conform to industry standard descriptions are marked and summarized to form a missing item list.
[0024] According to one aspect of this application, step S22 further comprises:
[0025] Step S22a: Collect historical hydraulic machinery feasibility study reports and construct a sample set containing the structural compliance scores of historical hydraulic machinery feasibility study reports and their corresponding two types of manual annotation labels. The two types of manual annotation labels are binary qualitative judgment labels for whether the logical structure tree of the historical hydraulic machinery feasibility study reports meets the requirements of actual application.
[0026] Step S22b: Based on the sample set, generate a subject operating characteristic curve, which represents the relationship between sensitivity and specificity at different scoring thresholds;
[0027] Step S22c: Optimize the Youden index on the subject operating characteristic curve to maximize the index, and determine the score value corresponding to the maximum point of the index as the review threshold.
[0028] According to one aspect of this application, step S23 further comprises:
[0029] Step S23a: Based on the contents of the missing item list, adjust the penalty weight of the subsequent document segmentation step and the reordering weight of the standardized retrieval step;
[0030] Step S23b: Based on the score range of the structure conformity score, set the semantic similarity threshold in the document segmentation step, the retrieval depth in the standard retrieval step, and the budget allocation for the adversarial anti-retrieval step.
[0031] Step S23c: Based on the review priority of hydraulic machinery, assign priority weights according to the type of missing items and the scoring range, and verify and correct parameter conflicts to generate the review strategy parameters.
[0032] According to one aspect of this application, step S3 further comprises:
[0033] Step S31: Calculate the semantic similarity between adjacent sentences using the cosine similarity method. Based on the semantic similarity between adjacent sentences and the similarity threshold in the review strategy parameters, identify semantic breakpoints in the structured text.
[0034] Step S32: Filter chapter boundary points based on semantic breakpoints in the structured text, evaluate the credibility of chapter boundary points in the structured text, and filter out valid boundary points;
[0035] Step S33: Consider the semantic breakpoint, the effective boundary point, and the upper limit of the input length set by the review strategy parameters in parallel. When there is a constraint conflict among the three, execute the conflict resolution to determine the final split point.
[0036] Step S34: Apply the final segmentation point to the structured text to generate the sub-document set.
[0037] According to one aspect of this application, step S33 further comprises:
[0038] Step S33a: Follow the preset priority sequence. In this sequence, the priority of satisfying the valid boundary point constraint is the highest, the priority of satisfying the upper limit of input length constraint is the second highest, and the priority of satisfying the semantic breakpoint constraint is the lowest. Identify the special content of the table of contents and chart blocks of the structured text, and apply exception rules to the special content areas of the table of contents or chart blocks to preserve the overall structural integrity.
[0039] Step S33b: Construct an objective function to evaluate the segmentation quality. The objective function is to minimize the deviation between the segmentation result and the ideal structured text. The constraints include: numbering hierarchy logical constraints, chapter length valid constraints, segmentation point uniqueness constraints, professional terminology consistency constraints, format feature consistency constraints, and cross-document consistency constraints. The optimal final segmentation point is determined by minimizing the function value of the objective function through optimization.
[0040] According to one aspect of this application, step S4 further comprises:
[0041] Step S41: Collect hydraulic machinery technical documents, construct a specification vector library based on hydraulic machinery industry standards and hydraulic machinery technical documents, retrieve from the specification vector library and perform weighted sorting on the recall results according to the list of missing items in the gated scheduling data, and select a set of candidate clauses for the sub-document;
[0042] Step S42: Set field templates, extract compliance constraint information from the candidate clause set according to the field templates, and construct a structured specification extraction object;
[0043] Step S43: Compare the sub-document with the extracted specification object, determine the preliminary compliance conclusion, and encapsulate the evidence link containing the specification clause identifier;
[0044] Step S44: Based on the preliminary compliance conclusion, initiate a differentiated adversarial counter-search to search for counter-evidence clauses, generate a conflict report, and integrate the preliminary compliance conclusion, evidence links, and conflict report to form the preliminary review conclusion set.
[0045] According to one aspect of this application, step S42 further comprises:
[0046] Step S42a: Constructing a structured specification extraction object, including: limiting the specification extraction object to contain only preset structured fields, the structured fields including clause identifiers, mandatory levels, conditional predicates and quantitative constraints, and prohibiting the generation of subjective suggestions in the specification extraction object;
[0047] Step S42b: Encapsulate evidence links containing regulatory clause identifiers, including: for each compliance determination, generate an evidence triple containing a regulatory clause identifier, a sub-document fragment identifier, and a similarity score between the two, and establish a traceable association between the sub-document and the regulatory clause.
[0048] According to one aspect of this application, step S42b further comprises:
[0049] Step S42b1: Extract the clause identifier from the specification extraction object and use it as the first constituent element of the triple;
[0050] Step S42b2: Locate the content segment in the sub-document that corresponds to the clause identifier, and obtain the segment identifier of the content segment as the second constituent element of the triple;
[0051] Step S42b3: Calculate the semantic similarity between the content fragment and the clause identifier, and use the quantified score of the similarity as the third component of the triple to characterize the strength of the evidence association.
[0052] According to one aspect of this application, step S44 further comprises:
[0053] Step S44a: When the preliminary compliance conclusion is compliant, conduct a targeted search in the specification vector library for relevant exception clauses or mutually exclusive clauses as counter-evidence;
[0054] Step S44b: When the preliminary compliance conclusion is non-compliance, actively search the normative vector library for applicable remedies or exemptions as counter-evidence.
[0055] Step S44c: Based on the gating scheduling data, dynamically adjust the similarity threshold and synonym set in the reverse retrieval process, generate a conflict report, and integrate the preliminary compliance conclusion, evidence link, and conflict report to form the preliminary review conclusion set.
[0056] According to one aspect of this application, step S5 further comprises:
[0057] Step S51: In the aggregated set of preliminary review conclusions, identify and enumerate potential conflicts across conclusions in different sub-documents, including numerical conflicts, citation conflicts, and mandatory level conflicts.
[0058] Step S52: Set the adjudication rules and follow the priority sequence defined in the rules to resolve the potential conflict. The priority sequence includes that the conclusion of mandatory clauses takes precedence over the conclusion of recommended clauses, and that the conclusion of the latest version of the standard takes precedence over the conclusion of the old version of the standard, to obtain the final review conclusion.
[0059] According to one aspect of this application, step S3 may also be:
[0060] Read the structured text data and the logical structure tree data, call the pre-stored basic library data of standard clauses to perform topic identification and standard association analysis, and generate chapter standard association feature data;
[0061] The chapter-specification correlation feature data is integrated with the standard path risk weight data updated based on historical review statistics, and the weighted summaries of each paragraph are used to generate paragraph standardization risk score data.
[0062] Based on the paragraph standardization risk score data, a set of candidate segmentation schemes is constructed. The segmentation objective function, which includes a standardization path breakage penalty term, is used to evaluate and rank each candidate segmentation scheme. The scheme with the smallest objective function value is selected as the final segmentation scheme, generating sub-document set data and standardization risk summary data.
[0063] Optionally, the block segmentation objective function includes a semantic coherence loss term, an effective boundary interruption penalty term, a length overflow penalty term, and a canonical path breakage penalty term. The canonical path breakage penalty term is used to: read the paragraph canonical risk score data, identify paragraphs with risk scores higher than a preset value, and if the paragraphs are distributed in different sub-documents in the candidate block segmentation scheme with a distance exceeding a preset threshold, then apply additional penalty weights to the block segmentation objective function based on the risk scores to reduce the dispersion of engineering facts corresponding to high-risk canonical paths in the sub-document set data.
[0064] According to one aspect of this application, step S4 may also be:
[0065] The constraints, exceptions, and inheritance relationships of the clauses in the basic database of the standard clauses are analyzed, and a standard constraint graph data representing the hierarchical structure of the standard is constructed by combining nodes and edges.
[0066] Extract engineering fact information from the sub-document collection data and establish a source mapping with the original text to construct fact evidence graph data containing fact nodes and citation relationships;
[0067] A forward traversal is performed along the mandatory constraint edges in the normative constraint graph data, and associated fact nodes are matched in the fact evidence graph data to determine the constraint satisfaction status, generating a set of normative reasoning paths containing satisfying or non-satisfied conclusions, as well as local normative compliance conclusion data.
[0068] Optionally, for paths in the local compliance conclusion data that are determined to meet the conclusion, starting from the corresponding node in the normative constraint graph data, matching exception fact nodes are retrieved from the fact evidence graph data along exception condition edges or relaxed condition edges; for paths that are determined not to meet the conclusion, starting from the corresponding node in the normative constraint graph data, matching remedial fact nodes are retrieved from the fact evidence graph data along remedial condition edges or exemption condition edges, generating adversarial reasoning path set data; the local compliance conclusion data is corrected based on the adversarial reasoning path set data to generate final compliance review conclusion data, and the normative reasoning path set data and the adversarial reasoning path set data are combined to construct evidence path set data.
[0069] Optionally, after generating the paragraph specification risk score data, step S3 further includes:
[0070] From the archived data of historical review tasks, we screened out the normative paths that had failed to meet the conclusions or were revised in an adversarial manner, and clustered and summarized the sequence of normative clause nodes and the distribution pattern of fact nodes in them to construct a high-risk normative path template library data containing risk level labels.
[0071] Read the paragraph standardization risk score data and the sub-document set data, perform pattern matching between the current paragraph sequence and the high-risk standardization path template library data, correct and improve the standardization risk score of the corresponding paragraph for the matching area, and generate corrected paragraph standardization risk score data.
[0072] Optionally, step S3 further includes:
[0073] Based on the corrected paragraph standardization risk score data, areas with significantly increased standardization risk are identified. Based on the sub-document set data, merging or splitting operations are performed on the block boundaries between high-risk paragraphs to generate optimized sub-document set data.
[0074] Based on the optimized sub-document set data, the coverage of high-risk regulatory paths is calculated, updated regulatory risk summary data is generated, and the optimized sub-document set data and the updated regulatory risk summary data are used as inputs for subsequent steps.
[0075] Optionally, step S4 further includes:
[0076] High-risk normative reasoning patterns are extracted from historically archived evidence paths, and a historical evidence path database containing normative path patterns and fact distribution patterns is constructed.
[0077] Read the set of normative reasoning paths and match it with the templates in the historical evidence path database to identify high-risk normative path candidate sets.
[0078] Based on the risk level labels in the high-risk normative path candidate set data, an adversarial reasoning budget is allocated to the corresponding sub-document, which includes the number of extended exception clause layers and the relaxation of similarity thresholds.
[0079] Optionally, step S4 further includes:
[0080] Based on the adversarial reasoning budget, exception clause nodes and remedial clause node combinations that match the historical evidence path database data are preferentially expanded in the normative constraint diagram data, and targeted matching is performed in the fact evidence diagram data to generate enhanced adversarial reasoning path data.
[0081] The enhanced adversarial reasoning path data and the adversarial reasoning path set data are merged, and the normative compliance local conclusion data are revised based on the merged result to generate updated compliance review conclusion data and evidence path set data.
[0082] According to one aspect of this application, it is characterized by further comprising the following steps:
[0083] Throughout the entire execution process of the method, a traceable parameter log is recorded and archived synchronously;
[0084] The traceable parameter log contains at least:
[0085] The name and version fingerprint of the algorithm model used in each step;
[0086] All thresholds, weights, and budget parameters set in hierarchical gating, parallel block partitioning, and adversarial reverse retrieval;
[0087] And the version of rules and the trajectory of decisions based on conflict and consistency decisions.
[0088] Beneficial effects: A hierarchical review method for hydraulic machinery feasibility study reports based on a large language model is adopted. Through hierarchical review and automatic rule retrieval, compliance issues in long-form hydraulic machinery feasibility study reports can be identified completely and accurately, reducing the workload of reviewers and improving the accuracy of the review. Attached Figure Description
[0089] Figure 1 This is a flowchart of the present invention.
[0090] Figure 2 This is a flowchart of step S2 of the present invention.
[0091] Figure 3 This is a flowchart of step S3 of the present invention.
[0092] Figure 4 This is a flowchart of step S4 of the present invention.
[0093] Figure 5 This is a flowchart of step S5 of the present invention. Detailed Implementation
[0094] like Figure 1 As shown, the following technical solution is proposed. According to one aspect of this application, a method for hierarchical review of feasibility study reports for hydraulic machinery based on a large language model is provided, characterized by comprising the following steps:
[0095] Step S1: Collect and parse the original hydraulic machinery feasibility study report to generate a logical structure tree and structured text;
[0096] In this step, the logical structure tree is a data structure used to represent the hierarchical relationship between chapters in a feasibility study report. It maps the chapters, sections, clauses, and items of the report to nodes in a tree, accurately reflecting the organizational structure of the content rather than a simple stream of plain text. Structured text refers to text content that has been cleaned, formatted uniformly, and associated with nodes in the logical structure tree.
[0097] Specifically, the system receives an original hydraulic machinery feasibility study report, which can be in PDF, Word document or scanned form. First, the layout analysis module performs page segmentation, paragraph recognition and chart extraction on the document. If it is a scanned document, the optical character recognition (OCR) engine is called to convert the text. On this basis, the system uses regular expressions and pattern matching to extract chapter titles and numbers from the text and cross-validates them with the document's table of contents information to accurately locate chapter boundaries and fix the problem of title or content breaks caused by pagination. Finally, a structured text with complete content and format noise removed is formed. Correspondingly, based on the identified chapter title hierarchy, a logical structure tree that reflects the logical context of the whole text is constructed retrospectively.
[0098] The purpose of this step is to transform unstructured or semi-structured raw reports into standardized data objects that can be processed and calculated in subsequent steps, which is the basis for achieving automated review.
[0099] Step S2: Based on the logical structure tree, perform hierarchical gating and policy scheduling to generate gating scheduling data;
[0100] The gating scheduling data includes structural compliance scores, a list of missing items, and review strategy parameters.
[0101] Step S3: Based on the review strategy parameters in the gating scheduling data, perform three-constraint parallel block division on the structured text to obtain a set of sub-documents;
[0102] Step S4: Using the gating scheduling data, perform an auditable adversarial compliance review on each sub-document of the sub-document set to form a preliminary review conclusion set;
[0103] The auditable adversarial compliance review includes normative retrieval, controlled extraction, compliance determination and adversarial reverse retrieval, and the micro-review conclusion set includes sub-document compliance conclusions, evidence links and conflict reports;
[0104] Step S5: Aggregate the preliminary review conclusion set, perform cross-sub-document consistency adjudication and result summary, and generate the final review conclusion. The preliminary review conclusion set includes the micro-review conclusion set and the structural compliance score and missing item list in the gating scheduling data.
[0105] The method described in this invention can be implemented based on a computer system. An exemplary operating environment may include one or more servers. Specifically, the server may be configured with a high-performance central processing unit (CPU), such as a multi-core processor of the Intel Xeon series, for performing general computing tasks and process scheduling. In order to accelerate the computation of deep learning models, especially steps involving large-scale vector operations, the server is preferably configured with a graphics processing unit (GPU), such as a computing card based on the NVIDIA Tesla or Ampere architecture.
[0106] In terms of storage, the server can be configured with no less than 128GB of system memory (RAM) to support the processing of large-scale data in memory, and is equipped with high-speed solid-state drives (SSDs) or network storage for persistent storage of the original hydraulic machinery feasibility study report, processed intermediate data, model files, and final review conclusions.
[0107] The method can be implemented based on software programs. In this embodiment, the server's operating system can be a Linux distribution, such as Ubuntu Server 20.04 LTS or higher, with a programming language environment such as Python 3.8 or higher deployed on it. Furthermore, the algorithm model involved in the method can rely on multiple open-source frameworks and libraries. For example, PyTorch or TensorFlow frameworks can be used for training and inference of neural network models; the Transformers library can be used to load and use pre-trained large language models; vector retrieval libraries such as Faiss can be used to build and query canonical vector libraries; and the scikit-learn library can be used to perform classic machine learning tasks such as ROC curve generation and Youden metric calculation. It is understood that the above hardware and software configurations are only examples, and those skilled in the art can adjust the configurations according to the performance requirements, cost budgets, and other factors of actual application scenarios, without departing from the protection scope of this invention.
[0108] like Figure 2 As shown, according to one aspect of this application, step S2 is further characterized in that:
[0109] Step S21: Construct a standard template library based on the hydraulic machinery industry standards. Compare the standard template library with the completeness and standardization of the logical structure tree from multiple preset dimensions, synthesize the structure compliance score, and identify the list of missing items.
[0110] Step S22: Set the review threshold and determine whether the structural compliance score has reached the preset review threshold. If it has not been reached, terminate the subsequent process.
[0111] Step S23: Extract the logical structure tree that reaches the preset review threshold, and map the structure compliance score and missing item list corresponding to the extracted logical structure tree to the core parameters and resource budget of the downstream review task to generate the review strategy parameters.
[0112] Tiered gating here is a preliminary quality assessment mechanism that first quantitatively assesses the macro-structural integrity and standardization of the report before conducting a detailed content-level compliance review.
[0113] Specifically, the system compares the logical structure tree generated in the previous step with a preset standard template library. The standard template library defines the essential chapters, recommended chapters, and standard order of chapters that should be included in a hydraulic machinery feasibility study report. The comparison process will be carried out from multiple dimensions such as coverage, hierarchical relationship, chapter order, and completeness of key technical elements, and synthesize a final structural compliance score. Reports with scores below a preset threshold will be marked as unqualified and will be accompanied by a detailed list of missing items, prompting the user to supplement what content. For reports that pass the gate, the system will dynamically generate a set of review strategy parameters based on their structural compliance score and the specific content of the missing item list. For example, a report with a complete structure and a high score may be assigned stricter review parameters; while for a report that only lacks non-core chapters, the system may adjust the weight of the relevant modules in subsequent steps.
[0114] In this embodiment, the motivation for setting up hierarchical gating is to achieve effective use of resources. By filtering out reports with serious structural non-compliance at an early stage, the computational resources of subsequent complex and expensive micro-review steps are avoided. At the same time, through strategy scheduling, subsequent reviews are made more targeted, realizing an intelligent transformation from one-size-fits-all review to review tailored to specific cases.
[0115] According to one aspect of this application, step S21 is further characterized in that:
[0116] Step S21a: Check the coverage rate of the logical structure tree to the required chapters in the standard template library and obtain the coverage score;
[0117] Step S21b: Examine the chapter hierarchy of the logical structure tree and determine the hierarchy correctness score based on the structural violations;
[0118] Step S21c: Measure the difference between the chapter order of the logical structure tree and the standard template library, and calculate the order consistency score;
[0119] Step S21d: Traverse the contents of key chapters in the logical structure tree, evaluate the completeness rate of their internal technical elements, and obtain the element completeness score.
[0120] Step S21e: The coverage score, hierarchical correctness score, sequence consistency score, and element completeness score are weighted and summed to generate the final structure conformity score. The required items that do not appear in the structure tree, key sub-items that are not effectively covered due to hierarchical misclassification, and missing elements that do not conform to industry standard descriptions are marked and summarized to form a missing item list.
[0121] In this embodiment, in order to transform the vague qualitative judgment of the report structure as good or bad in traditional review into a calculable and comparable quantitative indicator, the system introduces a multi-dimensional scoring system. Specifically, this step calls a pre-set standard template library, Template_lib, to perform a refined evaluation of the logical structure tree_struct of the input report. Template_lib stores the standard directory structure, list of required chapters, and recommended order of chapters for feasibility study reports for different types of hydraulic machinery projects (such as pumped storage and conventional hydropower stations).
[0122] The quantitative assessment is specifically achieved through scoring across four dimensions and then weighted summing, as follows:
[0123] The system first checks whether the Tree_struct contains all the mandatory chapters defined in Template_lib (e.g., engineering geology, hydrology, engineering tasks and scale, etc.), and calculates the score based on the hit ratio. Optionally, the coverage of recommended chapters is also included with a lower weight. For example, if 9 out of 10 mandatory chapters are hit, the basic coverage score is 0.9.
[0124] The system will traverse the nodes of Tree_struct to check for structural violations. For example, if a section 1.1.1 appears directly under a Chapter 1 node, or if Section 2.1 is located under Chapter 1, resulting in a hierarchical error, a fixed penalty point p_h will be deducted from the full score of 1.0 (e.g., p_h=0.05).
[0125] The system extracts the main chapter sequence of Tree_struct and compares it with the standard sequence in Template_lib. Preferably, Kendall's Tau correlation coefficient is used to measure the degree of difference between the two sequences, and the result is normalized to the [0,1] interval to obtain the order consistency score.
[0126] This dimension involves a more in-depth content check. The system will use rules or lightweight models to check whether key technical elements are described in several core chapters (such as unit selection). For example, it will check whether the text fragments in the unit selection chapter mention key information such as rated head, single unit capacity, and number of units, and derive a score based on the completeness of the elements.
[0127] Finally, the final structure compliance score Score_struct is generated by weighted summation using the following formula: Score_struct = w_coverage * Score_coverage + w_hierarchy * Score_hierarchy + w_order * Score_order + w_elements * Score_elements;
[0128] Wherein, Score_struct represents the final structural compliance score; Score_coverage represents the coverage score obtained in step S21a; Score_hierarchy represents the hierarchical correctness score determined in step S21b; Score_order represents the order consistency score calculated in step S21c; Score_elements represents the element completeness score obtained in step S21d; w_coverage, w_hierarchy, w_order, and w_elements are the weight coefficients of each item, which can be adjusted according to the focus of the review. In a preferred embodiment, their default values can be set to 0.40, 0.25, 0.15, and 0.20, respectively. At the same time, all missing chapters or elements will be recorded to form a structured missing item list Missing_set.
[0129] According to one aspect of this application, step S22 is further characterized in that:
[0130] Step S22a: Collect historical hydraulic machinery feasibility study reports and construct a sample set containing the structural compliance scores of historical hydraulic machinery feasibility study reports and their corresponding two types of manual annotation labels. The two types of manual annotation labels are binary qualitative judgment labels for whether the logical structure tree of the historical hydraulic machinery feasibility study reports meets the requirements of actual application.
[0131] Step S22b: Based on the sample set, generate a subject operating characteristic curve, which represents the relationship between sensitivity and specificity at different scoring thresholds;
[0132] Step S22c: Optimize the Youden index on the subject operating characteristic curve to maximize the index, and determine the score value corresponding to the maximum point of the index as the review threshold.
[0133] The motivation for this step is to avoid wasting valuable computational resources on poorly structured and low-quality reports. However, a fixed review threshold T (e.g., 0.7) set by human experience often lacks universality and optimality.
[0134] To achieve both adaptive and scientific thresholding, this embodiment employs a calibration method driven by historical data. Specifically, the system maintains a sample set containing historical reports (Score_struct) and their corresponding manually annotated expert conclusions (binary labels: eligible for detailed review / rejection requiring correction). Based on this sample set, a Receiver Operating Characteristic (ROC) curve can be plotted. This curve visually demonstrates the trade-off between the model's sensitivity (the proportion of reports correctly identified that can proceed to detailed review) and specificity (the proportion of reports correctly identified that require correction and are rejected) at different scoring thresholds.
[0135] To find the optimal balance, the system calculates the Youden index for each threshold, defined as: Youden index = sensitivity + specificity - 1. The system selects the score that maximizes the Youden index as the final review threshold T. This method ensures that the selected threshold is the point that statistically distinguishes the two types of reports most effectively. Furthermore, to increase the robustness of the mechanism, when multiple points with the highest Youden index are found, this embodiment preferably adopts a preset adjudication mechanism, that is, it prioritizes the point with higher specificity (more strictly blocking non-compliant reports). If the specificity is still the same, the point with the higher threshold is selected.
[0136] According to one aspect of this application, step S23 is further characterized in that:
[0137] Step S23a: Based on the contents of the missing item list, adjust the penalty weight of the subsequent document segmentation step and the reordering weight of the standardized retrieval step;
[0138] Step S23b: Based on the score range of the structure conformity score, set the semantic similarity threshold in the document segmentation step, the retrieval depth in the standard retrieval step, and the budget allocation for the adversarial anti-retrieval step.
[0139] Step S23c: Based on the review priority of hydraulic machinery, assign priority weights according to the type of missing items and the scoring range, and verify and correct parameter conflicts to generate the review strategy parameters.
[0140] The gated reports, including their scores and lists of missing items, are not discarded but rather used as valuable prior knowledge to refine the strategy for subsequent review steps.
[0141] The system uses a pre-defined mapping module to convert Score_struct and Missing_set into specific execution parameters for downstream steps, specifically:
[0142] If Missing_set reports that a chapter is missing, the segmentation penalty weight for the context region of the missing chapter can be appropriately reduced in the subsequent S3 segmentation steps.
[0143] If Missing_set shows a lack of environmental protection-related content, the weight of environmental protection-related regulatory clauses will be dynamically increased in subsequent S4 regulatory search steps in order to proactively identify potential compliance issues.
[0144] For reports with a high Score_struct (e.g., >0.9), it indicates that the structure is clear and trustworthy. The system can set a higher semantic similarity threshold sim_threshold, which tends to segment at explicit chapter boundaries. Conversely, for reports with a low score (e.g., 0.75-0.8), sim_threshold can be appropriately reduced to allow for finer-grained semantic segmentation.
[0145] Reports with high scores can be assigned a smaller top_k search depth; reports with low scores may require a larger top_k and a stronger adversarial reverse search budget for more thorough verification.
[0146] As an optional implementation, the system can also dynamically allocate resource budgets based on the Score_struct. For example, the overall computing token quota and time quota can be allocated differently according to the score, ensuring that more review resources are invested in reports with complex structures and potentially more problems. When the budget is exhausted, unfinished review tasks can be sent to a manual review queue, Review_queue.
[0147] In this embodiment, the triggering logic of "general semantic similarity" is abandoned. Instead, "professional structural compliance + completeness of core elements" is used as the gating triggering basis. A special compliance benchmark library for hydraulic machinery is constructed, core standards are integrated, and three categories of rules are extracted: a list of required chapters, core parameter thresholds, and chapter logical relationships. A two-dimensional gating triggering index is designed, and three levels of gating thresholds are set. The two-dimensional gating triggering index includes structural compliance rate and core element completeness rate. The coverage rate between the actual chapters in the report and the "list of required chapters" is calculated. Combined with the correctness of the chapter hierarchy, a weighted average is used to obtain the structural compliance rate. The content corresponding to the "core parameter thresholds" in the report is scanned, and the proportion of missing parameters and abnormal parameters is statistically analyzed to obtain the core element completeness rate.
[0148] The specific three-level gating threshold is as follows:
[0149] High compliance (structural compliance rate ≥ 90% and element completeness rate ≥ 85%): Triggers "fast pass gate control", directly enters detailed review;
[0150] Compliance (structural compliance rate 70%-90% or element completeness rate 70%-85%): Triggers "conditional approval gate", marks missing / abnormal items, and focuses subsequent review;
[0151] Low compliance (structural compliance rate <70% or element completeness rate <70%): triggers "interception and return to gate", generates a correction list (such as "missing structural strength verification chapter" or "safety factor not met"), and terminates subsequent review.
[0152] like Figure 3 As shown, according to one aspect of this application, step S3 is further characterized in that:
[0153] Step S31: Calculate the semantic similarity between adjacent sentences using the cosine similarity method. Based on the semantic similarity between adjacent sentences and the similarity threshold in the review strategy parameters, identify semantic breakpoints in the structured text.
[0154] The system first segments the structured text Text_struct into sentences. Then, it calls a pre-trained sentence vector embedding model to convert each sentence into a high-dimensional semantic vector. In this embodiment, a Chinese sentence vector embedding model with performance comparable to the BGE (BAAI General Embedding) model is preferred. This type of model performs well in Chinese semantic similarity calculation tasks. After obtaining the sentence vector sequence, the system calculates the cosine similarity between adjacent sentence vectors one by one to obtain a similarity change curve. When the similarity score is lower than a dynamically set semantic similarity threshold sim_threshold (this threshold is derived from the review strategy parameters generated in Embodiment 3), the position is marked as a candidate semantic breakpoint Cohesion_breaks. Optionally, in order to avoid false breakpoints caused by noise in individual sentences, median filtering and other smoothing operations can be performed on the similarity sequence to enhance the robustness of breakpoint identification.
[0155] Step S32: Filter chapter boundary points based on semantic breakpoints in the structured text, evaluate the credibility of chapter boundary points in the structured text, and filter out valid boundary points;
[0156] The system does not treat all chapter boundaries in the Tree_struct as equally important dividing points. It integrates four types of evidence to give a comprehensive score to the credibility of each boundary point: score_bdry.
[0157] The standardization of title format and numbering;
[0158] The strength of mutual verification between the table of contents information and the main text information;
[0159] The positional characteristics of the boundary in the page layout (such as whether it is aligned to the left or whether it is a page break);
[0160] Thematic consistency of text before and after the boundary point;
[0161] Based on the comprehensive score, only those boundary points that are higher than the boundary threshold bdry_threshold are selected as valid boundary points (Valid_boundaries).
[0162] Step S33: Consider the semantic breakpoint, the effective boundary point, and the upper limit of the input length set by the review strategy parameters in parallel. When there is a constraint conflict among the three, execute the conflict resolution to determine the final split point.
[0163] Step S34: Apply the final segmentation point to the structured text to generate the sub-document set.
[0164] After determining all final segmentation points, the system applies them to the structured text to complete the segmentation operation, generating a series of sub-documents, forming a set of sub-documents (Subdocs), which are then passed to subsequent micro-review steps. At the same time, detailed segmentation logs (including the decision basis for each segmentation point, abandoned candidate points, etc.) are recorded for traceability.
[0165] This step aims to break down a complete, potentially long, structured report text into a series of moderately long, semantically cohesive sub-documents so that they can be input into a large language model for processing.
[0166] Specifically, the segmentation process is not simply performed at a fixed length, but rather considers three core constraints in parallel: A- Semantic cohesion, i.e., the semantic relevance between adjacent sentences; B- Completeness of chapter boundaries, i.e., segmentation should be performed at the natural end of a chapter as much as possible; C- Upper limit of input length, i.e., ensuring that the total length of the segmented sub-documents, including necessary prompts, does not exceed the upper limit that the large language model can handle. When these three constraints conflict, for example, if a semantic breakpoint happens to appear in the middle of a chapter, the system will make a decision according to a preset priority (such as chapter boundaries taking precedence). The review strategy parameters play a role in this step; for example, the structural conformity score obtained in the previous step will affect the sensitivity threshold of semantic segmentation.
[0167] This step effectively decomposes long texts into granularities suitable for model processing. At the same time, through a sophisticated adjudication mechanism, it preserves the structural information and semantic coherence of the original text to the greatest extent, ensuring the accuracy of subsequent micro-reviews.
[0168] According to one aspect of this application, step S33 is further characterized in that:
[0169] Step S33a: Follow the preset priority sequence. In this sequence, the priority of satisfying the valid boundary point constraint is the highest, the priority of satisfying the upper limit of input length constraint is the second highest, and the priority of satisfying the semantic breakpoint constraint is the lowest. Identify the special content of the table of contents and chart blocks of the structured text, and apply exception rules to the special content areas of the table of contents or chart blocks to preserve the overall structural integrity.
[0170] Step S33b: Construct an objective function to evaluate the segmentation quality. The objective function minimizes the deviation between the segmentation result and the ideal structured text. Constraints include: hierarchical numbering constraints, valid chapter length constraints, uniqueness constraints of segmentation points, consistency constraints of technical terms, consistency constraints of format features, and cross-document consistency constraints. The optimal final segmentation point is determined by optimizing the function value of the objective function to minimize its value. When determining the final segmentation point, the system faces three potentially conflicting constraints simultaneously:
[0171] Constraint A: The split point should be located on the semantic breakpoint Cohesion_breaks;
[0172] Constraint B: The split point should be located on the valid boundary points (Valid_boundaries);
[0173] Constraint C: The length of the sub-documents after segmentation, plus the reserved prompt word length, cannot exceed the upper limit of the model's input length, token_cap.
[0174] When these three constraints cannot be satisfied simultaneously, the system executes a priority-based conflict resolver. In this embodiment, the priority sequence is preset as: B (valid boundary point) > C (upper limit of input length) > A (semantic breakpoint). In other words, the system will prioritize segmentation at the natural structural boundaries of the document, as this maximizes the integrity of the context. If B cannot be satisfied, the system will prioritize satisfying the upper limit of the model's input length, C, because excessively long inputs will cause the model to be unable to process them. Finally, provided that B and C are satisfied, the system will try to select semantic breakpoint A for segmentation. For example, when a valid boundary point B is far from the boundary point A, the system will prioritize segmentation at the boundary point A. If the distance from the previous split point is too long, exceeding the length limit C, the system will abandon splitting at point B and instead search for a split point within this interval that satisfies C. In this case, semantic breakpoint A will be given priority. Furthermore, the adjudicator also includes exception rules. For example, for special content areas such as table of contents pages and chart blocks, an overall preservation strategy will be applied to avoid incorrectly splitting them. At the same time, in order to optimize the splitting effect, the system can also introduce a local backtracking correction mechanism. That is, after initially determining a split point, a limited backtracking search is performed within a small window range (such as the five sentences before and after) around it to find a better split point that can better satisfy the secondary constraints.
[0175] As an alternative or supplement to hard rule priority-based decision-making, determining the final split point can also be achieved through a local optimization process. Specifically, an objective function J is constructed to evaluate the split quality, and an optimization algorithm (such as a greedy search within a sliding window) is used to find the split point that minimizes J. The objective function J can be a weighted sum of the following three components:
[0176] J=alpha*Cohesion_loss+beta*Boundary_break_penalty+gamma*Token_overflow_penalty;
[0177] Among them, Cohesion_loss represents the loss of semantic cohesion within the sub-document. The smaller the value, the more semantically coherent the sub-document is after segmentation. Boundary_break_penalty represents the penalty for structural damage caused by segmentation at non-optimal boundary positions. Its value is negatively correlated with the boundary confidence score_bdry of the segmentation point. Token_overflow_penalty represents the penalty for the sub-document length exceeding the upper limit of the input length. The weight coefficients alpha, beta, and gamma are the weight coefficients of semantic coherence loss, boundary break penalty, and length overflow penalty, respectively. They can be obtained by calibration on the validation set. By minimizing J, the system can more flexibly balance the three constraints and find a comprehensive optimal segmentation scheme.
[0178] The three constraints are not equal; they follow a priority order of "professional structural integrity > model adaptability > semantic coherence."
[0179] The first priority is effective boundary point constraints, which prioritize ensuring the structural integrity of core chapters on hydraulic machinery (such as unit selection and hydraulic calculations). This is the basis for professional review and can prevent the disruption of the logical loop of chapters due to segmentation.
[0180] The second priority is the upper limit constraint of input length. When the valid boundary point constraint cannot be met (such as a core chapter being too long), the processing capacity of the model is used as the bottom line to ensure that the sub-document does not exceed the token limit and avoid review bias caused by content truncation.
[0181] The third priority is semantic breakpoint constraint. Under the premise of satisfying the first two constraints, semantic breakpoint segmentation should be selected as much as possible to reduce the fragmentation of professional semantics and take into account the accuracy of review.
[0182] When the three constraints conflict, for example, in a certain embodiment, the boundary point of a hydraulic calculation chapter is too far from all the split points, and the input length limit will be exceeded after splitting. → abandon the boundary point, find semantic breakpoints within the chapter to ensure that the sub-document length is compliant, while preserving the continuity of the calculation logic to the greatest extent.
[0183] In another embodiment, the semantic breakpoint coincides with the valid boundary point, but the length of the sub-document exceeds the upper limit after segmentation. If the token usage of non-core descriptive content (such as background introduction) is compressed first, and the requirement is still not met, the segmentation position is finely adjusted near the breakpoint to balance the length and semantic integrity.
[0184] Specialized areas (such as complete hydraulic formula derivation) may not have valid boundary points, but their semantic coherence is extremely strong → triggering the exception rule, the entire area is preserved, and the specialized logic chain is not split even if the sub-document length is close to the upper limit.
[0185] The three aspects are considered in parallel and dynamically coordinated to ultimately achieve "three guarantees": ensuring that the sub-documents are adapted to the processing capabilities of large language models (input length upper limit constraint), ensuring the integrity of professional structure and core chapters (effective boundary point constraint), and ensuring the coherence of professional semantics and logical chains (semantic breakpoint constraint), thus solving the pain point of traditional block segmentation that "either truncates professional content or destroys semantics".
[0186] In the three-constraint parallel block mechanism, the effective boundary point constraint is the core constraint to ensure the integrity of the professional structure of the hydraulic machinery feasibility study report. Its selection logic revolves around the "natural structural boundaries of documents in the hydraulic machinery field." Through multi-dimensional evidence verification and domain adaptation rules, boundary points that meet the requirements of professional review are accurately identified and retained. The specific process is as follows:
[0187] Verify whether the title numbering conforms to the specifications in the field of hydraulic machinery, identify the binding relationship between professional keywords (such as "unit rated parameters", "hydraulic efficiency calculation", "safety redundancy design") and title format, eliminate interference from non-professional titles (such as "report preparation instructions" and "references"), and directly reduce the boundary credibility score of titles that do not conform to the professional numbering specifications or lack core professional keywords (e.g., deduct from the full score of 1.0 to below 0.3).
[0188] Extract the titles, page numbers, and summaries of the core chapters on hydraulic machinery from the table of contents, and compare them with the corresponding content in the main text. If the main text content matches the professional keywords in the table of contents summary with ≥80%, and the page number deviation is ≤2 pages, then the boundary credibility score is increased. If there are titles in the table of contents but no corresponding professional content in the main text, or if the main text content is unrelated to the table of contents summary (e.g., the table of contents is labeled "Unit Parameters" while the main text is labeled "Project Background"), then it is marked as an "invalid boundary point" and the credibility score is 0.
[0189] Determine if the title is aligned to the left margin and if it is on the first line of a new page. If the title meets the criteria of being aligned to the left margin and on the first line of a new page, increase the boundary credibility score (e.g., add 0.15); if the title is in the middle of the page and has no white space, decrease the score (e.g., deduct 0.2).
[0190] For the 500-word text before and after the boundary point, extract hydraulic machinery-related keywords (such as "head", "flow rate", "compressive strength", "fatigue life"). If the overlap of the keywords is ≤30% (e.g., the first is "hydraulic parameters" and the second is "structural parameters"), the validity of the boundary point is confirmed, and the score is increased (e.g., add 0.25). If the overlap of the keywords is ≥60% (e.g., the first is "efficiency calculation steps" and the second is "efficiency calculation examples"), it is judged as a "false boundary of semantically cohesive content", and the score is reduced (e.g., deduct 0.3).
[0191] Valid boundary point constraints, as the first priority constraint among the "three constraints," directly affect the block logic through their selection results.
[0192] If the length of the sub-document corresponding to the valid boundary point does not exceed the "input length upper limit constraint" (e.g., if the sub-document contains the complete content of "3.2 hydraulic unit selection", the length is ≤ model token upper limit), then the boundary point is directly used as the split point, without referring to the "semantic breakpoint constraint";
[0193] If the length of the sub-document corresponding to the valid boundary point exceeds the "input length upper limit constraint" (such as the "4 Structural Strength Verification" section being too long), then the "semantic breakpoint constraint" is combined within that section (such as splitting at the semantic breakpoints of "4.1 Verification Parameters" and "4.2 Calculation Process") to balance the integrity of the professional structure and the model's adaptability.
[0194] If there are no valid boundary points (such as a segment that is a continuous hydraulic calculation process without a title), then "semantic breakpoint constraints" will be the primary approach to ensure that the professional logic is not broken.
[0195] The core value of a feasibility study report for hydraulic machinery lies in the "completeness of professional data" and the "coherence of technical logic". Traditional segmentation (such as fixed-length segmentation and general semantic segmentation) often leads to the fragmentation of professional content due to the neglect of industry characteristics. However, this mechanism achieves "lossless segmentation" of professional documents through domain-adaptive design.
[0196] Effective boundary point constraints prioritize the natural boundaries of the core chapters of hydraulic machinery as the basis for segmentation, combined with multi-dimensional verification of "title standardization + table of contents mutual verification + theme consistency" to avoid splitting the core chapters. For example, in a report, the "4.2 Hydropower Turbine Rated Parameter Demonstration" chapter contains complete parameter calculation logic and charts. Traditional fixed-length segmentation may split the "parameter derivation process" and "conclusion" into two sub-documents. However, this mechanism ensures that the entire chapter is preserved through effective boundary point identification, ensuring that the logic of parameter demonstration can be fully evaluated during review.
[0197] Semantic breakpoint constraints are based on a pre-trained model in the field of hydraulic machinery. They identify the strong logical associations between professional terms such as "rated head - flow calculation - efficiency verification" and mark breakpoints only at natural semantic breaks. For example, when segmenting the "hydraulic design" chapter, they avoid the continuous logical chain of "formula derivation - data substitution - result analysis" to avoid the problem of reviewers or models misjudging "data source and calculation logic mismatch" due to segmentation. This is especially suitable for the text structure of a large number of "calculation process + professional conclusion" binding in hydraulic machinery reports.
[0198] For the "hydraulic calculation charts", "unit parameter comparison tables", and "complete formula derivation segments" in hydraulic machinery reports, the mechanism forces overall segmentation through exception rules, avoiding the problem of traditional segmentation splitting "charts and explanatory text" and "formulas and derivation steps". For example, in a report, the "head-flow characteristic curve" and the "Note: The curve is calculated based on the GB / T15468-2013 standard" may be split into different sub-documents by traditional segmentation, while this mechanism will mark the two as a "special area boundary".
[0199] The core requirement for reviewing feasibility study reports for hydraulic machinery is to "identify compliance issues without omission." Traditional segmentation often leads to biased review results (such as missing parameter conflicts or misjudging standard references) due to "loss of context" and "break in professional connections." This mechanism, through constraint and collaboration, provides "high-quality sub-documents" for subsequent review stages, directly improving the accuracy of the review.
[0200] When dividing the document into blocks, the professional logic is preserved to form a complete closed loop of "parameter calculation - result reference - standard benchmarking" within the sub-document. For example, the "5.3 Structural bearing capacity calculation" section of a certain report contains continuous logic of "material strength parameters → load calculation → safety factor verification". This mechanism divides it into a sub-document, and subsequent compliance review can directly link "whether the material parameters comply with GB50204-2015 standard" and "whether the safety factor calculation matches the load conditions", avoiding misjudgments such as "unclear parameter source" and "broken calculation logic" caused by traditional block division.
[0201] The effective boundary point constraint, combined with the "mutual verification between the table of contents and the main text," can accurately locate key areas such as the "list of referenced standards," ensuring that sub-documents contain complete information on "standard number - clause content - reference scenario." For example, in a report, "6.1 Safety Protection Design" references Article 5.2 of the "Code for Safety Design of Hydraulic Machinery" (SL316-2022). Traditional block division may separate the "standard number" from the "referenced clause content," leading to a lapse in checking the "applicability of the clause" during review. However, this mechanism, through effective boundary point identification, divides the "standard reference + design content" as a whole, improving the completeness of the standard compliance review.
[0202] By reducing semantic redundancy and logical conflicts between sub-documents through "constraint coordination", subsequent cross-sub-document consistency adjudication only needs to focus on the "parameter consistency of different chapters" (such as whether "unit rated power" is consistent in the "selection chapter" and "energy consumption chapter"), without having to deal with "semantic ambiguity conflicts" caused by improper block division. For example, traditional block division may split "number of units" into two sub-documents with inconsistent expressions (one writes "4 units" and the other writes "four units"), while this mechanism unifies the professional terminology through semantic breakpoint constraints.
[0203] Hydraulic machinery feasibility study reports are usually long (mostly over 500 pages) and highly complex. Traditional block division either wastes computing resources due to "too many sub-documents" or exceeds the model's processing capacity due to "too long sub-documents". This mechanism, however, achieves optimal resource efficiency through dynamic constraint collaboration.
[0204] The upper limit constraint on input length strictly matches the context window of the large language model. Combined with "professional semantic compression" (prioritizing the preservation of core parameters and calculation processes, and appropriately simplifying non-professional descriptions), it ensures that the length of sub-documents does not exceed the model limit, nor does it cause a surge in the number of sub-documents due to excessive segmentation. For example, a 1000-page report on large hydraulic machinery may generate 50+ sub-documents through traditional fixed-length segmentation, while this mechanism generates only 20-25 sub-documents through the collaboration of effective boundary points and semantic breakpoints. The model inference time is reduced by 40%, while the memory usage is controlled within 64GB (adapting to mainstream GPU configurations).
[0205] The mechanism filters out invalid blocks in advance through "multi-constraint verification," reducing the cost of subsequent manual intervention. For example, traditional block segmentation may mix "non-core chapters (such as project background)" with "core chapters (such as hydraulic calculations)," requiring manual screening of valid content during review. However, this mechanism separates core and non-core chapters by "professional importance ranking" of valid boundary points. Non-core chapters can be reviewed using lightweight strategies (such as rapid compliance scanning), while core chapters undergo in-depth review. Manual reviewers only need to focus on the difficult issues in the core chapters, reducing labor costs by more than 30%.
[0206] Combining the "structural compliance score" output by the upstream "hierarchical gating and strategy scheduling", the mechanism dynamically adjusts the segmentation parameters: for reports with high structural integrity (score ≥ 0.9), the semantic similarity threshold is increased to reduce the number of sub-documents; for reports with incomplete structure (score 0.7-0.8) and containing complex hydraulic calculations, the threshold is lowered and the frequency of valid boundary point verification is increased to ensure segmentation accuracy. For example, a structurally complete conventional hydropower station report can be segmented according to chapter boundaries, resulting in fewer sub-documents and higher processing efficiency; a structurally incomplete pumped storage power station report (containing complex bidirectional water flow calculations) is segmented using fine-grained semantic breakpoints to ensure that the calculation process is not split.
[0207] Step S3 can also be:
[0208] Step S3a is used to perform adaptive segmentation based on normative path risk, so that the engineering facts related to high-risk normative constraints are concentrated in a small number of sub-documents, which facilitates subsequent reasoning processing on normative constraint diagrams and fact evidence diagrams. Specifically, it includes the following sub-steps.
[0209] Step S3a1: Read the structured text data, logical structure tree data, and gating strategy parameter data output from the previous steps, and simultaneously call the pre-stored specification clause base library data;
[0210] Based on the chapter hierarchy information in the logical structure tree data and the clause topics, applicable objects, and key terms in the basic library of normative clauses, the topic identification and normative association analysis are performed on each paragraph or sentence in the structured text data. Each paragraph is associated with one or more normative constraint topics to obtain chapter normative association feature data that represents the correspondence between chapters and normative constraints. Each entry in the chapter normative association feature data includes at least a paragraph identifier, the chapter identifier, and the normative constraint topic identifier related to the paragraph. This data is used to calculate the impact of normative path risk on the segmentation in subsequent steps.
[0211] Step S3a2: Based on the basic library of normative clauses and the pre-configured risk rule library, assign basic risk weights to each normative constraint topic according to the mandatory level of the normative clauses, the category of the constrained object, and the situation involving sensitive indicators such as safety and environmental protection, to form normative basic risk weight data for describing the importance of normative constraints;
[0212] Based on this, and combined with the historical review statistics accumulated in the aforementioned steps, the risk weight of normative constraint topics that frequently failed to meet the conclusions or were frequently revised by adversarial reasoning in past review tasks is appropriately increased to obtain updated normative path risk weight data. Subsequently, the chapter normative association feature data and normative path risk weight data are integrated. For each paragraph, a weighted summary is performed based on its associated normative constraint topics and corresponding risk weights to generate paragraph normative risk score data that reflects the importance of each paragraph in normative review. Each item in the paragraph normative risk score data includes at least a paragraph identifier and a paragraph normative risk score, which are used to apply differentiated constraints in the subsequent block objective function.
[0213] Step S3a3: Read structured text data, logical structure tree data, paragraph normative risk score data, and gating strategy parameter data. First, according to the natural chapter boundaries, title levels, and layout information in the logical structure tree data, combined with semantic similarity threshold and maximum input length constraint, construct a set of candidate block boundaries to obtain preliminary candidate block scheme set data. On this basis, for each candidate block scheme, according to the preset block objective function, calculate the semantic coherence loss, effective boundary breakage penalty, and length overflow penalty under the block scheme. At the same time, introduce a break penalty term based on normative path. That is, for paragraphs with high risk scores in the paragraph normative risk score data, if these paragraphs are distributed in multiple sub-documents and the distance between sub-documents exceeds the preset threshold, then add an extra penalty to the block scheme according to the normative risk score of the corresponding paragraph, thereby obtaining block objective function evaluation data used to measure the merits of each candidate block scheme.
[0214] In a preferred embodiment, the block objective function can be expressed as an objective function J_star in formula form, where the semantic coherence loss term, effective boundary interruption penalty term, length overflow penalty term, and canonical path breakage penalty term correspond to different weight coefficients. The weight coefficients are obtained by parameter calibration on the labeled dataset to ensure that the paragraphs corresponding to high-risk canonical paths have a greater influence in the objective function.
[0215] The specific form of the block objective function J_star is as follows:
[0216] J_star=λ1×L_cohesion+λ2×L_boundary+λ3×L_overflow+λ4×L_path;
[0217] Where: J_star represents the overall objective function value of the segmentation scheme, the smaller the value, the higher the segmentation quality; L_cohesion represents the semantic coherence loss term, calculated as the negative mean of the semantic similarity between adjacent sentences within a sub-document; L_boundary represents the effective boundary interruption penalty term, which takes a value of 1 if the segmentation point is not located on an effective boundary point, otherwise it is 0; L_overflow represents the length overflow penalty term, calculated as max(0, sub-document length - upper limit of input length) / upper limit of input length; L_path represents the normalized path breakage penalty term, calculated as the degree to which high-risk paragraphs are dispersed into different sub-documents; λ1, λ2, λ3, and λ4 are the weight coefficients of each penalty term, with default values of 0.3, 0.3, 0.2, and 0.2, respectively.
[0218] Step S3a4: Based on the candidate segmentation scheme set data and the corresponding segmentation objective function evaluation data, sort all candidate segmentation schemes according to the value of the objective function J_star, select the candidate segmentation scheme with the smallest objective function J_star value as the final segmentation scheme, and obtain the sub-document set data for subsequent specification review.
[0219] While selecting the final block segmentation scheme, based on the distribution of the normative risk score data of the next paragraph in each sub-document, the total normative risk score and the coverage of high-risk normative paths in each sub-document are calculated to form normative risk summary data to guide the subsequent adversarial reasoning depth and retrieval budget allocation. Subsequently, the sub-document set data is provided to the subsequent normative constraint graph reasoning step to construct the fact evidence graph. The normative risk summary data is then incorporated into the gate control strategy parameter data to update the new gate control strategy parameter data, enabling subsequent normative reasoning and adversarial retrieval to allocate resources based on more refined risk distribution information when reviewing high-risk normative paths.
[0220] In the alternative to step S3a above, the function of the parent step S3 is fully implemented through sub-steps S3a1 to S3a4. That is, starting from structured text data and logical structure tree data, combined with the basic library data of standard clauses and gating strategy parameter data, chapter standard association feature data, standard path risk weight data and paragraph standard risk score data are generated step by step. On this basis, candidate block scheme set data and block objective function evaluation data are constructed. Finally, the sub-document set data used for the subsequent step S4 and the standard risk summary data used to update the gating strategy are obtained. All intermediate data are used in the subsequent steps and there is no isolated data.
[0221] Step S3 can also be S3b, which is used to introduce patterned risk correction based on historical normative reasoning path templates on the basis of adaptive segmentation of normative path risks, so that the segmentation strategy can further improve the review sensitivity for normative paths that are prone to problems in the past.
[0222] Step S3b includes the following sub-steps:
[0223] Step S3b1: Based on the completion of steps S3a1 to S3a4, from the evidence path set data, compliance review conclusion data and corresponding gating strategy parameter data that have been archived in the historical review tasks, the normative paths that have repeatedly failed to meet the conclusion or have been significantly revised by adversarial reasoning are selected. The normative clause node sequence, fact node distribution pattern and corresponding sub-document distribution characteristics appearing in these normative paths are clustered and summarized to construct a high-risk normative path template library data for characterizing high-risk normative reasoning patterns.
[0224] Each template in the high-risk normative path template library includes a normative clause node sequence pattern, a common fact element combination pattern, a typical sub-document distribution range, and a corresponding risk level label, which are used to provide patterned risk warnings when dividing new reports into blocks.
[0225] Step S3b2: Read the paragraph normative risk score data, sub-document set data, and normative risk summary data obtained in step S3a in the current report, as well as the offline-constructed high-risk normative path template library data. Perform pattern matching on the paragraph sequence and sub-document segmentation results in the current report. For regions that can reach a preset similarity threshold with a certain template in the high-risk normative path template library data in terms of normative clause node sequence and fact distribution pattern, correct and improve the normative risk score of the corresponding paragraph and sub-document, and generate corrected paragraph normative risk score data and updated normative risk summary data.
[0226] Based on this, for areas where the corrected specification risk significantly increases, fine-tuning of local block boundaries is permitted on the basis of the original sub-document set data. This includes merging or splitting the boundaries between high-risk paragraphs, thereby forming optimized sub-document set data to replace the original block results. Subsequently, the optimized sub-document set data is used to replace the original sub-document set data and passed to the subsequent specification constraint graph inference step. The updated specification risk summary data is then written back to the gating strategy parameter data to guide the subsequent adversarial inference budget allocation for high-risk specification paths. Figure 4 As shown, according to one aspect of this application, step S4 is further characterized in that:
[0227] Step S41: Collect hydraulic machinery technical documents, construct a specification vector library based on hydraulic machinery industry standards and hydraulic machinery technical documents, retrieve from the specification vector library and perform weighted sorting on the recall results according to the list of missing items in the gated scheduling data, and select a set of candidate clauses for the sub-document;
[0228] The specification vector library is a pre-built knowledge base that contains a vast amount of national standards, industry specifications, and technical guidelines related to the field of hydraulic machinery. All provisions have been converted into high-dimensional semantic vectors, forming an index that can be efficiently retrieved.
[0229] The specific implementation method is as follows: a sub-document Subdoc from Example 4 is used as a query, and an Approximate Nearest Neighbor (ANN) retrieval is performed in the specification vector library to initially recall a batch of candidate specification clauses that are most semantically relevant. However, simple semantic relevance is not enough to cope with the complexity of the review. In order to make the retrieval more targeted, the system will introduce a reordering mechanism driven by the preceding steps. Specifically, the system will read the Missing_set list generated in Example 3. For example, if the Missing_set indicates that the report has structural deficiencies in the seismic design of the dam, the reordering module will dynamically increase the ranking weight of all clauses related to seismic resistance, seismic intensity, dynamic stability, etc. in the initial recall results.
[0230] In this way, the macro-structural insights from the review (gating from S2) are effectively transmitted to the micro-level clause review, enabling intelligent linkage across stages. This step ultimately generates an optimized and highly relevant set of candidate clauses, Candidate_norms, for each sub-document.
[0231] As an optional implementation, the reordering module can be a rule-based weighted function or a more complex learning-to-rank model, such as LambdaMART, which can integrate multiple features such as semantic relevance, missing item correlation, and clause timeliness for comprehensive ranking.
[0232] Step S42: Set field templates, extract compliance constraint information from the candidate clause set according to the field templates, and construct a structured specification extraction object;
[0233] The system uses a strict, pre-defined field template to construct the canonicalized object Compliance_basis, which is a structured data entity rather than natural language text. Preferably, the template requires and can only contain the following seven fields:
[0234] clause_id: A unique identifier for a specification clause;
[0235] mandatory_level: The level of mandatoryity, such as mandatory, recommended, or reference-based.
[0236] condition_predicates: The conditional predicates to which the terms apply, i.e., the if part of the if...then... rule;
[0237] quantity_constraints: Quantification constraints, which is a substructure containing (variable_name, unit, comparator, value / range);
[0238] Exceptions: Explanation of exceptions to the terms;
[0239] cross_refs: IDs of other clauses cross-referenced in the clauses;
[0240] source_span_id: The location identifier of this clause in the original specification document.
[0241] The system will construct specific prompts to guide the large language model to parse information from the text of Candidate_norms and populate these seven fields, just like filling out a form. Any subjective suggestions or interpretations outside the template will be prohibited from being generated.
[0242] Furthermore, to ensure the robustness of the system, this embodiment also designs a fault-tolerant rollback mechanism. If the model cannot successfully extract key fields (such as quantity_constraints) from a certain clause, the system will not report an error or interrupt it. Instead, it will directly store the original text fragment of the clause into Compliance_basis and attach a label to be verified. At the same time, the entry will be sent to the manual review queue Review_queue mentioned in Embodiment 3 and marked as EXTRACTION_FAIL as the reason for failure.
[0243] Step S43: Compare the sub-document with the extracted specification object, determine the preliminary compliance conclusion, and encapsulate the evidence link containing the specification clause identifier;
[0244] The system will compare the contents of the sub-document with the constraints in the Compliance_basis one by one. For example, it will check whether the working conditions described in the sub-document meet the condition_predicates in the Compliance_basis, and whether the technical parameter values reported in the sub-document meet the quantity_constraints in the Compliance_basis (for example, if the reported concrete compressive strength is 35MPa, and the specification constraint is comparator='>=', value=30MPa, then it is determined to meet the requirement).
[0245] To establish traceable connections, each decision generates an evidence triple and incorporates it into the Evidence_links library. This triple serves as a bridge connecting facts (from sub-documents) and rules (from specifications), and its specific structure is as follows:
[0246] The first component of the triple is: extracting the clause_id from the specification extraction object as the specification clause identifier; the second component of the triple is: locating the specific content segment in the sub-document related to the clause determination and obtaining the unique identifier span_id of the segment as the sub-document segment identifier.
[0247] The third component of the triple is to calculate the semantic similarity (e.g., cosine similarity) between the sentence vector of the content fragment and the sentence vector of the normative clause, and to use this quantified score (e.g., 0.92) as a confidence score characterizing the strength of the evidence association.
[0248] Step S44: Based on the preliminary compliance conclusion, initiate a differentiated adversarial counter-search to search for counter-evidence clauses, generate a conflict report, and integrate the preliminary compliance conclusion, evidence links, and conflict report to form the micro-review conclusion set.
[0249] Using the gating scheduling data, an auditable adversarial compliance review is performed on each sub-document of the sub-document set, producing a micro-review conclusion set. The auditable adversarial compliance review includes normative retrieval, controlled extraction, compliance determination, and adversarial reverse retrieval. The micro-review conclusion set includes sub-document compliance conclusions, evidence links, and conflict reports.
[0250] This is the core of the review process. Auditability means that every review conclusion must be supported by clear and traceable evidence. Adversarial means that the review process does not unilaterally seek supporting evidence, but actively and dialectically seeks potential counter-evidence.
[0251] For example, for a sub-document, the system first retrieves relevant clauses from a specification vector library containing a large number of design specifications and standards. Then, through a controlled extraction process, the model is forced to extract structured constraint information (such as a parameter must be greater than 10MPa) from the clauses, rather than generating subjective descriptions. Next, the system performs compliance judgment on the sub-document content against these structured constraints and draws a preliminary conclusion. The most crucial part is the adversarial reverse retrieval: if the preliminary conclusion is compliant, the system will conduct a targeted search for whether there are exemption or exception clauses; if the conclusion is non-compliant, it will actively search for whether there are remedies or exemption clauses under special circumstances. All judgment processes generate evidence links containing specification sources, original text fragments, and similarity scores.
[0252] This step effectively suppresses model illusions by constructing a fully traceable computational chain, while the unique adversarial review mechanism makes the review conclusions more reliable and worthy of scrutiny, significantly different from the traditional retrieval augmentation generation (RAG) method.
[0253] According to one aspect of this application, step S42 is further characterized in that:
[0254] Step S42a: Constructing a structured specification extraction object, including: limiting the specification extraction object to contain only preset structured fields, the structured fields including clause identifiers, mandatory levels, conditional predicates and quantitative constraints, and prohibiting the generation of subjective suggestions in the specification extraction object;
[0255] Step S42b: Encapsulate evidence links containing regulatory clause identifiers, including: for each compliance determination, generate an evidence triple containing a regulatory clause identifier, a sub-document fragment identifier, and a similarity score between the two, and establish a traceable association between the sub-document and the regulatory clause.
[0256] According to one aspect of this application, step S42b is further characterized in that:
[0257] Step S42b1: Extract the clause identifier from the specification extraction object and use it as the first constituent element of the triple;
[0258] Step S42b2: Locate the content segment in the sub-document that corresponds to the clause identifier, and obtain the segment identifier of the content segment as the second constituent element of the triple;
[0259] Step S42b3: Calculate the semantic similarity between the content fragment and the clause identifier, and use the quantified score of the similarity as the third component of the triple to characterize the strength of the evidence association.
[0260] According to one aspect of this application, step S44 is further characterized in that:
[0261] Step S44a: When the preliminary compliance conclusion is compliant, conduct a targeted search in the specification vector library for relevant exception clauses or mutually exclusive clauses as counter-evidence;
[0262] Step S44b: When the preliminary compliance conclusion is non-compliance, actively search the normative vector library for applicable remedies or exemptions as counter-evidence.
[0263] Step S44c: Based on the gating scheduling data, dynamically adjust the similarity threshold and synonym set in the reverse retrieval process, generate a conflict report, and integrate the preliminary compliance conclusion, evidence link, and conflict report to form the preliminary review conclusion set.
[0264] The system acts as the devil's advocate here, proactively and strategically challenging its initial conclusions.
[0265] The system initiates completely different adversarial anti-search strategies based on the type of preliminary compliance conclusion:
[0266] When the preliminary compliance conclusion is met, the system will consider that the current chain of evidence may be incomplete. At this time, it will search the normative vector library for exception clauses or mutually exclusive clauses related to the current clause as evidence against the contrary. For example, the design described in the sub-document meets the general safety norm, but the adversarial search finds a supplementary clause stating that in high seismic intensity areas, the general norm does not apply and a certain special seismic code must be followed. However, the report does not mention the compliance with the seismic code, which constitutes a conflict.
[0267] When the preliminary compliance conclusion is non-compliance, the system attempts to provide constructive assistance by proactively searching the specification vector library for potentially applicable remedial or exemption clauses as counter-evidence. For example, if a material indicator in the report fails to meet the standard, an adversarial search may find a specification that allows for appropriate relaxation of that indicator provided certain strengthening measures have been taken.
[0268] Furthermore, parameters such as the similarity threshold and synonym set in the adversarial reverse retrieval process will be dynamically adjusted based on the review strategy parameters generated in Example 3, achieving more refined control. All found counter-evidence clauses will be recorded in the conflict report. Finally, the review results of each sub-document will be integrated with preliminary conclusions, evidence links, and conflict reports to form a comprehensive set of micro-level review conclusions. Step S4 can also be:
[0269] Step S4a, used to generate traceable compliance review results based on the normative constraint diagram and the factual evidence diagram, specifically includes the following sub-steps:
[0270] Step S4a1: Read the sub-document set data, structured text data, logical structure tree data, and pre-stored normative clause base library data output from the previous steps. Based on the clause number, scope of application, constraints, exceptions, relaxations, and validity level information of each normative clause in the normative clause base library data, parse each normative clause, extract constraint nodes, exception nodes, relaxation nodes, and inheritance and mutual exclusion relationships between clauses. Through the combination of nodes and edges, construct normative constraint diagram data to represent the normative hierarchical structure and constraint relationships.
[0271] In this data, each constraint node in the specification constraint diagram is connected to one or more specification clause numbers, which is used to trace back to the corresponding specification clause text in subsequent steps.
[0272] Step S4a2: Based on the sub-document set data and structured text data, according to the chapter-level information in the logical structure tree data, perform sentence-level and paragraph-level semantic recognition and element extraction on the sub-document content to identify engineering fact information such as unit parameters, hydraulic parameters, material parameters, and operating condition parameters. Associate these engineering fact information with the corresponding sub-document identifiers to construct a set of fact element data containing fact nodes and text block nodes. On this basis, establish edge connections between each fact node and its source sub-document, cited source, and derivation source to form fact evidence graph data used to represent the supporting and citation relationships between facts.
[0273] In this data, each fact node in the fact evidence graph retains mapping information to the original text fragment, which is used to output a traceable evidence path in subsequent steps.
[0274] Step S4a3: Read the normative constraint diagram data, fact evidence diagram data, and the gating strategy parameter data obtained in the aforementioned gating steps. Based on the review depth requirements for different levels of normative clauses in the gating strategy parameter data, select the high-efficiency normative clause nodes that need to be reviewed as the starting nodes from the normative constraint diagram data. Perform a forward traversal along the mandatory constraint edges and inheritance relationship edges in the normative constraint diagram. For each path from the high-level clause to the specific constraint condition node, sequentially match the fact nodes related to the constraint condition in the fact evidence diagram data, determine whether the corresponding facts satisfy the normative constraints, and generate a set of normative reasoning paths to describe the positive satisfaction of each normative constraint chain. At the same time, mark the corresponding satisfaction conclusion, non-satisfaction conclusion, or missing conclusion on each normative reasoning path according to the matching results, and obtain normative compliance local conclusion data corresponding to each normative reasoning path.
[0275] Among them, each path in the set of normative reasoning paths is simultaneously associated with normative clause nodes and fact nodes involved in the judgment, and is used for adversarial reasoning and evidence output in subsequent steps;
[0276] Step S4a4: Based on the normative reasoning path set data, normative constraint graph data, factual evidence graph data, and gating strategy parameter data, for normative reasoning paths that are determined to satisfy the conclusion in the normative compliance local conclusion data, starting from the corresponding constraint node, extend outward along the edges representing exception conditions and relaxation conditions in the normative constraint graph, retrieve normative clause nodes associated with these exception conditions and relaxation conditions, and query fact nodes in the factual evidence graph data that match these exception conditions or relaxation conditions to identify exception facts or relaxation facts that may negate the original satisfying conclusion; for normative reasoning paths that are determined to not satisfy the conclusion, starting from the corresponding constraint node, extend along the edges representing remedial conditions or exemption conditions in the normative constraint graph, retrieve fact nodes in the factual evidence graph data that match these remedial conditions or exemption conditions to identify remedial facts or exemption facts that may eliminate the non-satisfied conclusion. Through the adversarial extension and fact matching performed on satisfying and non-satisfied conclusion paths respectively, an adversarial reasoning path set data is generated to record the challenged or corrected status of the positive conclusions of each normative path;
[0277] For each path in the adversarial reasoning path set data, its corresponding initial normative reasoning path identifier and the exception clause node or remedial clause node participating in the adversarial process are retained for comprehensive adjudication in subsequent steps.
[0278] Step S4a5: Based on the normative reasoning path set data, the adversarial reasoning path set data, and the normative compliance partial conclusion data, for each normative reasoning path, firstly, the normative clause nodes, fact nodes, and corresponding sub-document identifiers in the normative reasoning path are combined in sequence to form a sequence of positive evidence fragments describing the positive compliance judgment process. Then, the exception clause nodes, remedial clause nodes, and supporting fact nodes involved in the adversarial reasoning path set data associated with the normative reasoning path are added to the same evidence sequence to construct the evidence path set data for fully recording the entire process of positive reasoning and adversarial reasoning.
[0279] Based on this, the initial conclusions in the local conclusion data of normative compliance are revised according to whether valid exceptional facts or remedial facts are found in the adversarial reasoning, so as to obtain the final compliance conclusions for each normative path. The final conclusions of each normative path are aggregated according to the sub-document dimension to generate compliance review conclusion data for subsequent cross-sub-document consistency adjudication. The evidence path set data and the compliance review conclusion data are provided together to the subsequent steps.
[0280] Step S4 can also be:
[0281] Step S4b is used to introduce pattern-based search and risk adaptive control based on historical evidence paths on the basis of performing adversarial reasoning of normative constraint graphs, so as to further improve the review intensity of high-risk normative paths.
[0282] Step S4b includes the following sub-steps:
[0283] Step S4b1: Based on the completion of steps S4a1 to S4a5, extract high-risk normative paths from the evidence path set data and compliance review conclusion data that have been archived in the previous review tasks. These high-risk normative paths have either failed to meet the conclusions or had their conclusions significantly revised through adversarial reasoning. Summarize the normative clause node sequences, fact node patterns, and combinations of common exceptions or remedial facts involved in these normative paths to construct a historical evidence path database for characterizing high-risk normative reasoning patterns.
[0284] Each path template in the historical evidence path database contains a standardized path pattern, a fact distribution pattern, and a corresponding risk level label, which are used to guide the subsequent focused review of new reports.
[0285] Step S4b2: Read the normative constraint diagram data, factual evidence diagram data, historical evidence path library data, and gating strategy parameter data. For the normative reasoning path set data formed in the current report, match each normative reasoning path with the path template in the historical evidence path library data according to the normative clause node sequence and fact node distribution pattern in the path to obtain the high-risk normative path candidate set data in the current report.
[0286] For normative paths that match high-risk templates and have a high risk level, according to the configuration in the gating strategy parameter data, a higher adversarial reasoning budget is allocated to the sub-documents in the sub-document set data where the fact node corresponding to the normative path is located. This includes increasing the number of scalable exception clause layers, relaxing the similarity threshold for matching exception facts, and expanding the allowed set of synonyms in the search scope, so as to conduct more in-depth counter-evidence retrieval of these high-risk paths in subsequent adversarial reasoning processes.
[0287] Step S4b3: Based on the high-risk normative path candidate set data, normative constraint graph data, fact evidence graph data, and adjusted gating strategy parameter data, the adversarial reasoning process is performed again on the high-risk normative paths. For each high-risk normative path, the search is prioritized in the normative constraint graph according to the combination of exception clause nodes and remedial clause nodes recorded in the historical high-risk path template. The fact nodes corresponding to these clauses in the fact evidence graph are targeted for matching, thereby searching for adversarial paths that are prone to problems more centrally within the limited computational budget.
[0288] The path results obtained from the enhanced adversarial reasoning are merged with the initial adversarial reasoning path set data in step S4a4 to generate updated adversarial reasoning path set data. Based on the updated adversarial reasoning path set data, the local compliance conclusion data is revised to obtain a more stringent final compliance conclusion for high-risk regulatory paths. This updates the evidence path set data and compliance review conclusion data, which are then provided to subsequent cross-sub-document consistency adjudication steps and parameter logging steps. Figure 5 As shown, according to one aspect of this application, step S5 is further characterized in that:
[0289] Step S51: In the aggregated set of preliminary review conclusions, identify and enumerate potential conflicts across conclusions in different sub-documents, including numerical conflicts, citation conflicts, and mandatory level conflicts.
[0290] Before executing a conflict resolution, the system performs an important preliminary step: terminology standardization and dimensional alignment.
[0291] The constructed Glossary terminology is invoked, and all micro-examination conclusion sets are traversed. Synonyms (such as unit and generator) appearing in the set are unified into standard terms, and different units of measurement (such as MW and 10,000 kilowatts) are unified into international standard units.
[0292] Based on this, the system runs a conflict enumerator to identify the following types of potential conflicts in the conclusions of all sub-documents:
[0293] Numerical conflicts: For example, sub-document A mentions a total installed capacity of 500MW, while sub-document B mentions a single unit capacity of 150MW, with a total of 4 units installed (i.e., a total capacity of 600MW).
[0294] Reference conflict: For example, different sub-documents reference two different years' versions of the same national standard (such as GB50201-2012 and GB50201-2018) when performing calculations.
[0295] Conflict of mandatory levels: For example, one conclusion is deemed compliant based on the recommended clauses, but another conclusion is deemed non-compliant based on the mandatory clauses.
[0296] For the enumerated conflicts, the system loads a preset adjudication rule base for automatic resolution. This rule base defines a clear priority sequence, preferably including:
[0297] Rank of validity: The conclusions of mandatory clauses take precedence over those of recommended clauses, and recommended clauses take precedence over those of reference clauses.
[0298] Version validity: The conclusions of the latest version of the standard take precedence over the conclusions of the older version.
[0299] Standard hierarchy: The conclusions of higher-level standards (such as national standards) take precedence over lower-level standards (such as industry standards).
[0300] As an alternative, when the automatic adjudication rules are insufficient to uniquely determine the conclusion, the system can trigger a human-machine deliberation interface to push the conflict details, relevant evidence chains, and rule suggestions to domain experts, who will then make the final ruling and write back the ruling and its reasons to the system.
[0301] Step S52: Set the adjudication rules and follow the priority sequence defined in the rules to resolve the potential conflict. The priority sequence includes that the conclusion of mandatory clauses takes precedence over the conclusion of recommended clauses, and that the conclusion of the latest version of the standard takes precedence over the conclusion of the old version of the standard, to obtain the final review conclusion.
[0302] To achieve complete transparency and reproducibility of the review process, this invention designs a traceable parameter log, Param_log, that runs throughout the entire process. It is not a simple program execution log, but a structured digital archive that records information on all key decision points throughout the review process.
[0303] Specifically, Param_log contains at least the following:
[0304] Model and version fingerprint: The name and version hash of the algorithm model used to execute each step (e.g., sentence vector model: bge-large-zh-v1.5, git_hash: xxxxx).
[0305] Specifically, the system loads the pre-trained BGE-large-zh-v1.5 model, which takes Chinese sentence text as input and outputs a 1024-dimensional semantic vector. For each sentence, the following inference steps are performed:
[0306] The input sentence is segmented and tokenized.
[0307] Input the token sequence into the encoder of the BGE model;
[0308] Extract the hidden state at the [CLS] position of the last layer of the model as the semantic vector of the sentence;
[0309] Calculate the cosine similarity of the semantic vectors of adjacent sentences:
[0310] sim(s_i,s_{i+1})=(v_i · v_{i+1}) / (||v_i||×||v_{i+1}||);
[0311] Where v_i and v_{i+1} represent the semantic vectors of adjacent sentences s_i and s_{i+1}, respectively.
[0312] All threshold, weight, and budget parameters: Score_struct calculated in hierarchical gating, calibrated threshold T; sim_threshold and bdry_threshold used in parallel block partitioning; and dynamically adjusted threshold and budget allocation in adversarial reverse retrieval.
[0313] Rules and adjudication trajectory: the version of the rule base on which conflict and consistency decisions are based, and the specific adjudication process and rationale for each conflict.
[0314] This Param_log is archived together with the original report. Its significance lies in the fact that at any time, regulatory agencies, auditors, or users themselves can use this log to fully reproduce every detail of the review and understand why the system reached the final conclusion. This provides the strongest technical guarantee for the reliability, impartiality, and traceability of the review results.
[0315] Specifically, the system aggregates the micro-level review conclusions of all sub-documents and performs consistency checks on them. For example, it checks whether there are numerical conflicts in the descriptions of the same technical parameter in different sub-documents, or whether there are conflicts in the referenced standard versions. For any conflicts found, the system loads preset adjudication rules (such as mandatory clauses taking precedence over recommended clauses, and newer standards taking precedence over older standards) to automatically resolve them. Finally, the system summarizes the macro-level structural review conclusions (structural compliance score and missing item list) with the micro-level review conclusions that have undergone consistency adjudication, and binds all relevant evidence links to generate a final review report that is structurally clear, has clear conclusions, and is traceable in evidence.
[0316] This step ensures the overall consistency of the review findings and the integrity of the final report, organically integrating the review results from each stage into a cohesive whole.
[0317] According to one aspect of this application, it is characterized by further comprising the following steps:
[0318] Throughout the entire execution process of the method, a traceable parameter log is recorded and archived synchronously to ensure end-to-end reproducibility of the review process;
[0319] The traceable parameter log contains at least:
[0320] The name and version fingerprint of the algorithm model used in each step;
[0321] All thresholds, weights, and budget parameters set in hierarchical gating, parallel block partitioning, and adversarial reverse retrieval;
[0322] And the rule versions and adjudication trajectories used in conflict resolution and consistency resolution. The preferred embodiments of the present invention have been described in detail above; however, the present invention is not limited to the specific details of the above embodiments. Within the scope of the technical concept of the present invention, various equivalent modifications can be made to the technical solutions of the present invention, and all such equivalent modifications fall within the protection scope of the present invention.
Claims
1. A hydraulic mechanical research report grading review method based on a large language model, characterized in that, Comprising the following steps: Step S1, collecting and analyzing the original hydraulic machinery research report to generate a logical structure tree and a structured text; Step S2, based on the logical structure tree, performing hierarchical gating and strategy scheduling to generate gating scheduling data; Step S3, according to the review strategy parameters in the gating scheduling data, performing three-constraint parallel block on the structured text to obtain a sub-document set; Step S4, using the gating scheduling data, performing an auditable adversarial compliance review on each sub-document of the sub-document set to form a preliminary review conclusion set; Step S5, aggregating the preliminary review conclusion set, performing cross-sub-document consistency decision and result summarization to generate a final review conclusion; The step S2 further comprises: Step S21, based on the standard template library constructed according to the hydraulic machinery industry specifications, quantitatively evaluating the integrity and standardization of the logical structure tree from multiple preset dimensions by comparing the standard template library, synthesizing the structure compliance score, and identifying the missing item list; Step S22, setting a review threshold and determining whether the structure compliance score reaches the preset review threshold, if not, terminating the subsequent process; Step S23, extracting the logical structure tree that reaches the preset review threshold, and mapping the structure compliance score and the missing item list of the extracted logical structure tree to the core parameters and resource budget of the downstream review task to generate the review strategy parameters; The step S3 further comprises: Step S31, calculating the semantic similarity between adjacent sentences using the cosine similarity method, and based on the semantic similarity between adjacent sentences and the similarity threshold in the review strategy parameters, identifying the semantic breakpoints in the structured text; Step S32, filtering chapter boundary points based on the semantic breakpoints in the structured text, evaluating the reliability of the chapter boundary points in the structured text, and screening out effective boundary points; Step S33, considering the semantic breakpoints, the effective boundary points, and the input length upper limit set by the review strategy parameters in parallel, and when there is a conflict, performing conflict arbitration to determine the final split point; Step S34, applying the final split point to the structured text to generate the sub-document set.
2. The hydraulic machine research report grading review method based on a large language model according to claim 1, characterized in that, The step S21 further comprises: Step S21a, checking the coverage of the logical structure tree on the essential chapters in the standard template library to obtain a coverage score; Step S21b, reviewing the chapter hierarchy of the logical structure tree, and determining the hierarchy correctness score according to the structure violation; Step S21c, measuring the difference between the chapter order of the logical structure tree and the standard template library to calculate the order consistency score; Step S21d, traversing the content of the key chapters in the logical structure tree to evaluate the completeness of the internal technical elements to obtain an element completeness score; Step S21e, the coverage score, the hierarchical correctness score, the sequential consistency score and the element completeness score are weighted and summed to generate a final structure compliance score, and the missing items that do not appear in the structure tree, the key sub-items that are not effectively covered due to hierarchical attribution errors, and the missing elements that do not conform to the industry standard expression are marked, and a missing item list is formed by summarizing.
3. The hydraulic machine research report grading review method based on a large language model according to claim 1, characterized in that, The step S22 further comprises: Step S22a, collect historical hydraulic machinery feasibility study reports, construct a sample set containing the structure compliance scores of the historical hydraulic machinery feasibility study reports and the corresponding two-class artificial labeling labels, and the two-class artificial labeling labels are binary qualitative judgment labels of whether the logical structure tree of the historical hydraulic machinery feasibility study report meets the requirements of actual application; Step S22b, based on the sample set, a receiver operating characteristic curve is generated, and the curve represents the relationship between sensitivity and specificity at different score thresholds; Step S22c, the Youden index is optimized on the receiver operating characteristic curve to maximize the index, and the score value corresponding to the maximum point of the index is determined as the review threshold.
4. The hydraulic machine research report grading review method based on a large language model according to claim 1, characterized in that, The step S23 further comprises: Step S23a, according to the content of the missing item list, adjust the penalty weight of the subsequent document blocking step and the rearrangement weight of the specification retrieval step; Step S23b, according to the score interval where the structure compliance score is located, set the semantic similarity threshold in the document blocking step, the retrieval depth in the specification retrieval step, and the budget allocation of the adversarial counter-retrieval step; Step S23c, based on the hydraulic machinery review priority, assign priority weights and conflict correction parameters to the missing item types and score intervals to generate the review strategy parameters.
5. The hydraulic machine research report grading review method based on a large language model according to claim 1, characterized in that, The step S33 further comprises: Step S33a, follow a preset priority sequence, in which the priority of meeting the effective boundary point constraint is the highest, the priority of meeting the input length upper limit constraint is the second, and the priority of meeting the semantic breakpoint constraint is the lowest, identify the directory page and the special content of the chart block of the structured text, and apply exception rules to the directory page or the special content area of the chart block to overall retain the structural integrity thereof; Step S33b, construct a target function for evaluating the segmentation quality, the target function is to minimize the deviation of the segmentation result from the ideal structured text, and the constraint conditions include: numbered hierarchical logical constraint, chapter length effective constraint, segmentation point uniqueness constraint, professional term consistency constraint, format feature consistency constraint and cross-document consistency constraint, and the optimal final segmentation point is determined by optimizing the function value of the target function to minimize the function value.
6. The hydraulic machine research report grading review method based on a large language model according to claim 1, characterized in that, The step S4 further comprises: Step S41, collect hydraulic machinery technical documents, construct a specification vector library based on the hydraulic machinery industry standards and the hydraulic machinery technical documents, retrieve from the specification vector library and perform weighted rearrangement on the recall results according to the missing item list in the gate scheduling data, and select a candidate clause set for the sub-document; Step S42, set a field template, extract compliance constraint information from the candidate clause set according to the field template, and construct a structured specification extraction object; Step S43, comparing the sub-document with the specification extraction object, determining a preliminary compliance conclusion, and encapsulating evidence links containing specification clause identifiers; Step S44, initiating differential counter-retrieval for the preliminary compliance conclusion to search for counter-evidence clauses, generating a conflict report, and integrating the preliminary compliance conclusion, evidence links, and conflict report to form the preliminary review conclusion set.
7. The hydraulic machine research report grading review method based on a large language model according to claim 6, characterized in that, The step S42 further includes: Step S42a, constructing a structured specification extraction object, including: limiting the specification extraction object to contain only pre-set structured fields, the structured fields including clause identifiers, mandatory levels, conditional predicates, and quantitative constraints, and prohibiting the generation of subjective suggestions in the specification extraction object; Step S42b, encapsulating evidence links containing specification clause identifiers, including: for each compliance determination, generating an evidence triple containing specification clause identifiers, sub-document segment identifiers, and similarity scores between the two, establishing traceable associations between the sub-document and the specification clause.
8. The hydraulic machine research report grading review method based on a large language model according to claim 7, characterized in that, The step S42b further includes: Step S42b1, extracting the clause identifier in the specification extraction object as the first component of the triple; Step S42b2, locating the content segment corresponding to the clause identifier in the sub-document and obtaining the segment identifier of the content segment as the second component of the triple; Step S42b3, calculating the semantic similarity between the content segment and the clause identifier, and taking the quantitative score of the similarity as the third component of the triple to represent the strength of the evidence association.
9. The hydraulic machine research report grading review method based on a large language model according to claim 6, characterized in that, The step S44 further includes: Step S44a, when the preliminary compliance conclusion is in compliance, searching for relevant exception clauses or mutually exclusive clauses in the specification vector library as counter-evidence; Step S44b, when the preliminary compliance conclusion is not in compliance, actively retrieving possible remediation clauses or exemption clauses in the specification vector library as counter-evidence; Step S44c, and dynamically adjusting the similarity threshold and synonym set in the counter-retrieval process according to the gating scheduling data, generating a conflict report, and integrating the preliminary compliance conclusion, evidence links, and conflict report to form the preliminary review conclusion set.
10. The hydraulic machine research report grading review method based on a large language model according to claim 1, characterized in that, The step S5 further includes: Step S51, in the aggregated preliminary review conclusion set, identifying and enumerating potential conflicts across different sub-document conclusions, the potential conflicts including numerical conflicts, reference conflicts, and mandatory level conflicts; Step S52, setting a ruling rule and following the priority sequence defined in the rule to resolve the potential conflicts, the priority sequence including the conclusion of mandatory clauses taking precedence over the conclusion of recommended clauses, and the conclusion of the latest version standard taking precedence over the conclusion of the old version standard, to obtain the final review conclusion.
11. The hydraulic machine research report grading review method based on a large language model according to claim 1, characterized in that, Further including the following steps: Throughout the execution of the entire process of the method, a traceable parameter log is recorded and archived synchronously; The traceable parameter log at least includes: The name and version fingerprint of the algorithm model used to execute each step; All threshold values, weights, and budget parameters set in hierarchical gating, parallel partitioning, and counter-retrieval; and the rule versions and decision trajectories relied upon in conflict resolution and consensus resolution.
Citation Information
Patent Citations
Reservoir dam safety evaluation report multi-dimensional examination method based on large language model
CN120373316A
Material plan review system based on artificial intelligence
CN120563037A