Construction compliance knowledge graph construction method based on artificial intelligence middleware

By using AI middleware for parsing and reverse generation, the stability issues of clause logical combinations and constraint scope in the construction compliance knowledge graph were resolved, thus achieving accuracy and consistency in the construction compliance knowledge graph.

CN123159481APending Publication Date: 2026-11-24NANCHANG SONGYUAN HUASHENG INCUBATOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611230912.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

The existing construction compliance knowledge graph lacks a closed-loop verification mechanism from the original clauses to the rule structure, which may lead to conditional requirements being expressed as general requirements, exceptions being deviated from their corresponding constraints, cross-clause inherited content being lost after text segmentation, and the rule paths in the graph failing to stably maintain the logical combination and constraint scope of the regulatory clauses.

Method used

Artificial intelligence middleware is used to parse construction regulations, technical standards and compliance documents, identify the semantic boundaries of compliance clauses, and parse them into semantic slots for applicable objects, applicable stages, triggering conditions, constraining behaviors, constraining parameters, exception conditions and evidence requirements, forming an intermediate representation of rules. This generates a rule subgraph containing condition nodes, obligation nodes, exception nodes and evidence nodes, and reverse-generates standardized clauses and compares them with the original clauses for slot consistency. After correcting inconsistent slots, the information is written into the knowledge graph.

Benefits of technology

By employing a closed-loop verification mechanism, the rule paths in the graph retain the conditional relationships and exception boundaries of the original clauses, reducing constraint semantic offsets and maintaining the integrity and logical combination of the graph structure, thus achieving the accuracy and consistency of the construction compliance knowledge graph.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123159481A_ABST
    Figure CN123159481A_ABST
Patent Text Reader

Abstract

This invention relates to the field of artificial intelligence knowledge representation and rule reasoning technology, specifically a method for constructing a construction compliance knowledge graph based on artificial intelligence middleware. The method acquires construction regulations, standards, and compliance documents, identifies document levels, clause numbers, and cross-section reference relationships, and determines the semantic boundaries of the clauses. The artificial intelligence middleware parses the clauses into semantic slots corresponding to applicable objects, applicable stages, triggering conditions, constraining behaviors, exception conditions, and evidentiary requirements, forming an intermediate representation of the rules. Based on the construction object ontology, process ontology, and compliance concept ontology, constrained normalization is performed to generate a rule subgraph. Normalized clauses are generated in reverse, and slot consistency is compared with the original clauses. Difference slots are backtracked and corrected before being written into the construction compliance knowledge graph. This maintains consistency between the graph rules and the original clauses in terms of scope of application, logical combination, and exception boundaries, reducing condition omissions and exception mismatches, and enabling continuous tracing of graph nodes back to the original clauses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence knowledge representation and rule reasoning technology, specifically a method for constructing a construction compliance knowledge graph based on artificial intelligence middleware. Background Technology

[0002] Existing construction compliance knowledge graphs typically use construction regulations, acceptance specifications, construction technical standards, and project compliance documents as knowledge sources. The processing flow includes document segmentation, entity identification, relation extraction, terminology normalization, and graph database writing. The system generally splits text according to chapter titles, clause numbers, and punctuation boundaries, then identifies construction objects, process names, quality indicators, restricted behaviors, applicable stages, and supporting documents, mapping the identification results to entity categories based on a pre-defined ontology. Relationships between entities are mostly determined by syntactic dependency relations, word co-occurrence positions, or pre-configured relation templates. Content involving other clauses is referenced by numbering, and terms with different names but similar meanings are merged using dictionary matching or semantic similarity. For clauses containing conditional, exception, or negative expressions, existing processing typically saves the relevant text as entity attributes or attaches it to the main relation. Then, based on extraction confidence, field completeness, or manual sampling results, some abnormal data is filtered out, and the remaining entities and relations are combined to form the construction compliance knowledge graph. This processing method can form a basic network of connections between legal content, but the graph generation process mainly verifies whether entities exist and whether relationships are connected, lacking a structured preservation of the complete binding semantics of clauses.

[0003] Construction compliance clauses are often defined by the applicable objects, construction stages, triggering conditions, constrained behaviors, parameter ranges, exceptions, and evidentiary requirements. Some of these limitations are also passed on to subsequent texts through higher-level clauses, consecutive clauses, or cross-references. Existing one-way extraction processes, after converting natural language into a graph structure, cannot reverse-check the condition combinations, constraint polarities, and exception scopes in the original clauses based on the generated results. When the extraction process directly connects local construction behaviors to regulatory requirements, or selects semantically similar but applicable concepts during terminology normalization, the resulting nodes and relationships may still satisfy formal integrity checks, but have already altered the application boundaries in the original text. The main technical problem arising from this is that the construction compliance knowledge graph lacks a closed-loop verification mechanism from the original clauses to the rule structure and then back to the original semantics. This leads to conditional requirements being expressed as general requirements, exceptions deviating from their corresponding constraints, and cross-clause inherited content being lost after text segmentation. Consequently, the rule paths in the graph cannot stably maintain the original logical combination and constraint scope of the regulatory clauses. Summary of the Invention

[0004] The purpose of this invention is to provide a method for constructing a construction compliance knowledge graph based on artificial intelligence middleware, which can solve the problems mentioned in the background technology.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] A method for constructing a construction compliance knowledge graph based on artificial intelligence middleware includes: acquiring construction regulations, technical standards and construction compliance documents, identifying document levels, clause numbers and cross-section reference relationships, and determining the semantic boundaries of compliance clauses;

[0007] The AI ​​middleware parses the compliance clauses into semantic slots corresponding to the applicable objects, applicable stages, triggering conditions, binding behaviors, binding parameters, exception conditions, and evidence requirements, forming an intermediate representation of the rules.

[0008] Based on the construction object ontology, process ontology, and compliance concept ontology, the semantic slots are subjected to constraint normalization, generating a rule subgraph containing condition nodes, obligation nodes, exception nodes, and evidence nodes.

[0009] Based on the rule subgraph, standardized clauses are generated in reverse and compared with the corresponding compliance clauses in terms of slot consistency. After backtracking and correcting any inconsistent slots, the rule subgraph is written into the construction compliance knowledge graph.

[0010] Preferably, determining the semantic boundaries of the compliance clauses includes: establishing a document structure tree according to the title level and clause number, and connecting consecutive clauses referring to the same construction object into a candidate clause chain;

[0011] Parse the reference markers, parallel markers, transition markers, and exception markers in the candidate clause chain to construct semantic connection edges between clauses;

[0012] The applicable objects and applicable stages are propagated along the semantic continuation edge, and the propagation is truncated when a new applicable subject, opposite constraint polarity, or independent exception scope is detected. The minimum set of closed clauses formed before the truncation is determined as a semantic boundary.

[0013] Preferably, forming the intermediate representation of the rule includes: establishing a slot record with original position identifier, constraint polarity and logical level for each semantic slot; combining the triggering condition and the applicable object into a rule antecedent; combining the constraint behavior, the constraint parameter and the evidence requirement into a rule consequent; and establishing the exception condition as a scope branch for the rule antecedent or the rule consequent.

[0014] The logical expression structure is formed according to the nested order of conditions in the original text, and slots that are not supported by the original text are kept in an unresolved state without being filled with presumed content.

[0015] Preferably, the slot consistency comparison includes: parsing the reverse-generated normalized clauses into back-translated semantic slots again, and establishing a correspondence between the original semantic slots and the back-translated semantic slots according to the original text position identifier;

[0016] The scope of the applicable objects, the logical combination of the triggering conditions, the polarity of the constraint behavior, the limiting relationship of the constraint parameters, and the scope of the exception conditions are compared respectively.

[0017] Generate a correction path that includes difference slots, associated nodes, and source terms, and backtrack along the correction path to the semantic boundary determination, rule intermediate representation formation, or constraint normalization steps.

[0018] Preferably, the semantic connection edges between the clauses are divided into explicit reference edges and implicit connection edges according to the source of the reference;

[0019] For the explicit reference edge, record the clause number and reference fragment of the referenced clause; for the implicit continuation edge, extract the continuation evidence corresponding to the omitted subject, pronoun, and shared condition.

[0020] A semantic environment stack is established in the candidate clause chain, which is passed from the superior clause to the subordinate clause. The applicable object, applicable stage and precondition are pushed into the semantic environment stack. When an exception marker, a negative transition or a new object definition appears, the terminated semantic environment is popped out according to the corresponding level.

[0021] Preferably, the constrained normalization includes: retrieving candidate concepts corresponding to the slot record from the construction object ontology, the process ontology, and the compliance concept ontology, and establishing a concept path for each candidate concept consisting of the original name, the superior concept, the applicable stage, and the associated process;

[0022] The conceptual path is jointly matched with the logical levels in the rule antecedent and rule consequent to exclude candidate concepts that conflict with the applicable stage or related process.

[0023] Write a unified concept identifier into the retained candidate concepts, and save the original name, source location and concept path at the same time.

[0024] Preferably, generating the rule subgraph includes: establishing each triggering condition in the rule antecedent as a condition node, and connecting them into antecedent paths according to conjunction, disjunction, and condition nesting relationships;

[0025] The constraint behaviors, constraint parameters, and evidence requirements in the rule consequents are respectively established as obligation nodes, parameter nodes, and evidence nodes, and connected as consequent paths through satisfaction relationships.

[0026] Based on the exception conditions, insert the exception node into the predecessor path or the successor path, and record the starting and ending nodes of the exception node;

[0027] Connect the original location identifier as the source edge to the corresponding node.

[0028] Preferably, the error correction path is connected to the corresponding processing position according to the difference type, wherein the difference in the scope of reference is connected to the concept path filtering record, the difference in logical combination is connected to the logical expression structure in the intermediate representation of the rule, the difference in constraint polarity is connected to the clause fragment containing the negation mark or the transition mark, and the difference in the scope of exception is connected to the starting and ending nodes of the exception node.

[0029] Perform local reconstruction at the minimum processing position indicated by the error correction path, and preserve nodes and relationships that are not affected by the differences.

[0030] Preferably, the artificial intelligence middleware generates an environment change record for each push and pop operation in the semantic environment stack, and establishes a bidirectional index between the environment change record and the condition nodes, obligation nodes and exception nodes in the rule subgraph;

[0031] When a node inherits from a cross-clause semantic context, the inheritance source, inheritance level, and termination position are written into the node properties;

[0032] The bidirectional index is used to reverse retrieve the clause fragments, conceptual paths, and environmental change records of the nodes, forming a continuous chain of evidence from the graph nodes to the original text.

[0033] Preferably, the local reconstruction includes: locking the set of nodes covered by the error correction path and the logical relationships directly connected to the set of nodes, re-extracting the corresponding slots based on the continuous evidence chain and updating the intermediate representation of the rules;

[0034] The node set is replaced with the updated rule intermediate representation, while maintaining the unified conceptual identifier of the externally connected nodes.

[0035] The normalized clause reverse generation and slot consistency comparison are performed again on the replaced rule subgraph. When a unique correspondence is established between the original semantic slot and the translated semantic slot and there are no unresolved slots, the replaced rule subgraph is submitted to the construction compliance knowledge graph.

[0036] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0037] 1. The AI ​​middleware parses construction compliance clauses into semantic slots corresponding to applicable objects, applicable stages, triggering conditions, constraining behaviors, constraining parameters, exception conditions, and evidentiary requirements. It then forms intermediate rule representations according to the conditional hierarchy between slots, ensuring that the premises, obligations, exceptions, and evidentiary requirements in the clauses have an interconnected structural expression before entering the knowledge graph. After generating condition nodes, obligation nodes, exception nodes, and evidentiary nodes based on the intermediate rule representations, it reverse-engineers the normalized clauses along the rule path, matching the semantic slots obtained from the back-translation with each item in the original clause. When there are differences in the scope of applicable objects, combinations of triggering conditions, polarity of constraining behaviors, or scope of exceptions, the error correction path can return to the semantic boundary identification, intermediate rule representation formation, or concept normalization position, performing local reconstruction of the nodes and relationships covered by the differences. Through the closed loop of forward compilation and reverse back-translation, the rule subgraph written into the construction compliance knowledge graph can simultaneously retain the conditional relationships, scope of application, and exception boundaries in the original clauses, reducing the situation where the graph structure is complete but the constraint semantics are offset.

[0038] 2. The document structure tree, semantic continuation edges, and semantic environment stack jointly store the applicable objects, applicable stages, and preconditions passed across clauses, ensuring that content with omitted subjects, references to higher-level clauses, or extensions along consecutive clauses can enter the same semantic boundary. When a new applicable subject, negative transition, or independent exception scope appears, the environment change record limits the termination position of the inherited content, preventing boundless propagation. Constrained normalization establishes candidate concept paths based on the construction object ontology, process ontology, and compliance concept ontology, and combines the applicable stage and related processes to exclude inconsistent mapping results, ensuring that the unified concept identifier corresponds to the original name, source location, and rule level. Local reconstruction only replaces the set of nodes covered by the error correction path, retaining nodes that have not changed and external connections, reducing relationship drift caused by repeated generation of the entire rule subgraph. Source edges, concept paths, and environment change records can also form a continuous chain of evidence returning from the graph nodes to the original clauses, enabling condition nodes, obligation nodes, and exception nodes to be located at the specific textual location and contextual inheritance process that forms their semantic content. Attached Figure Description

[0039] Figure 1 A flowchart of the overall process of construction compliance knowledge graph based on artificial intelligence middleware;

[0040] Figure 2 A sample sequence diagram of boundary cohesion;

[0041] Figure 3 This is a sequence diagram of semantic continuity credibility samples.

[0042] Figure 4 This is a sample sequence diagram of slot completeness.

[0043] Figure 5A sequence diagram of value samples for concept path matching;

[0044] Figure 6 This is a sample sequence diagram of subgraph structure consistency.

[0045] Figure 7 This is a sample sequence diagram of the difference in slot size.

[0046] Figure 8 This is a sequence diagram of traceable evidence values. Detailed Implementation

[0047] In one embodiment, please refer to Figure 1 A method for constructing a construction compliance knowledge graph based on artificial intelligence middleware includes: acquiring construction regulations, technical standards, and construction compliance documents; identifying document levels, clause numbers, and cross-section reference relationships; determining the semantic boundaries of compliance clauses; having the artificial intelligence middleware parse the compliance clauses into semantic slots corresponding to applicable objects, applicable stages, triggering conditions, constrained behaviors, constrained parameters, exception conditions, and evidence requirements, forming an intermediate representation of rules; performing constraint normalization on the semantic slots based on the construction object ontology, process ontology, and compliance concept ontology, generating a rule subgraph containing condition nodes, obligation nodes, exception nodes, and evidence nodes; generating standardized clauses from the rule subgraph and comparing them with the corresponding compliance clauses for slot consistency; backtracking and correcting inconsistent slots before writing the rule subgraph into the construction compliance knowledge graph. The artificial intelligence middleware uses source document identifiers, clause location identifiers, and processing batch identifiers throughout the text parsing, rule representation, graph generation, and reverse verification processes, ensuring that each structured knowledge object can be associated with the original text range that forms its semantic content.

[0048] In this embodiment, construction regulations, technical standards, and construction compliance documents are input into the AI ​​middleware as text objects containing document source, publication date, applicable region, and version information. The AI ​​middleware performs semantic differentiation on headers and footers, table of contents, appendix identifiers, table captions, and repeated paragraphs. Page content that does not participate in rule expression is marked as background fragments, while content containing normative verbs, prohibited expressions, permitted expressions, parameter limitations, or proof requirements is marked as candidate normative fragments. For character sequences converted from scanned text, line breaks and misalignments are repaired according to the continuity of clause numbers, punctuation closure, and adjacency of domain terms. Characters that cannot be identified from the context are not supplemented but saved as character ranges to be verified. After preprocessing, the AI ​​middleware generates a unique position index for each character range. The position index consists of document identifier, chapter path, clause number, paragraph order, and character start and end offset. Subsequent semantic slots, concept paths, graph nodes, and error correction records all reference the position index to avoid source position drift after multiple text segmentations.

[0049] Specifically, document hierarchy recognition uses chapter titles, clause numbers, and page indentation to determine parent-child levels. The AI ​​middleware converts chapters, sections, clauses, paragraphs, and items into hierarchy nodes and attaches text fragments below them. When a clause uses cross-paragraph expressions such as "except as provided in the preceding paragraph," "complies with item X of this clause," or "executed according to a certain clause," the citation parser extracts the cited number, citation direction, and citation scope, and connects the citation starting point to the cited hierarchy node. When a number is missing but "above," "previously," "this paragraph," or an omitted subject exists, the semantic continuation parser establishes candidate continuation relationships based on the most recently available object, stage, and constraint polarity. The document structure tree is not directly equivalent to the rule structure but serves as the basis for semantic boundary calculation, enabling the AI ​​middleware to identify complete constraint units spanning multiple paragraphs while maintaining the original chapter organization.

[0050] Preferably, the boundary cohesion of the candidate canonical fragment is calculated using the following formula:

[0051] ;

[0052] in, This indicates the cohesion of candidate segments being incorporated into the same semantic boundary. Indicates the sequence of clause numbers, Indicates the degree of explicit or implicit reference association. Indicates the degree of continuity of the applicable objects. Indicates the degree of continuity of the applicable stages. This indicates the degree of boundary separation caused by opposite constraint polarities or independent exceptions. to This indicates that each item has a weight and the sum is 1; for example, when two adjacent segments have consecutive numbers, common applicable objects, and the same construction stage, it can be set as follows: , , If the second paragraph introduces an independent exception using "but", then let The calculation results are used to determine whether to continue merging or split at the starting point of the exception, thereby enabling the continuity of the clause form and the completeness of the constraint semantics to jointly participate in the boundary determination.

[0053] Please refer to Figure 2 , Figure 2 The horizontal axis represents the sequential segment position of the candidate segment in the document parsing queue, covering the first segment, the preceding segment, the middle-previous segment, the middle segment, the middle-late segment, the late segment, and the last segment in sequence. The vertical axis represents the boundary cohesion index, with a value range of 0 to 1. Figure 2 Corresponding boundary cohesion The curve reflects the trend of the AI ​​middleware in determining whether to continue merging or segmenting candidate fragments under the combined influence of factors such as continuous clauses, citation relationships, object continuity, construction phase continuity, and separation of opposite polarities. The curve shape shows several downward peaks in the first to middle section, indicating that although some fragments are adjacent in number or object, their cohesion is below the first warning threshold due to independent exceptions, negative transitions, or phase switching, requiring re-examination at the boundary to determine whether truncation is appropriate. From the middle to later sections, the curve rises overall and repeatedly approaches or exceeds the second warning threshold, indicating that the candidate clause chain is more stable in terms of objects, phases, and citation evidence, making it suitable for merging into the same semantic boundary.

[0054] In one embodiment, determining the semantic boundary of compliance clauses includes: establishing a document structure tree according to the heading level and clause number, connecting consecutive clauses referring to the same construction object into a candidate clause chain; parsing the reference markers, parallel markers, transition markers, and exception markers in the candidate clause chain to construct semantic connection edges between clauses; propagating the applicable object and applicable stage along the semantic connection edges, and truncating the propagation when a new applicable subject, opposite constraint polarity, or independent exception scope is detected, and determining the minimum closed clause set formed before truncation as a semantic boundary. The minimum closed clause set contains at least text fragments that can determine the constraint subject, constraint condition, and constraint content, and allows the inclusion of non-adjacent but explicitly invoked content by the current clause through reference edges.

[0055] In this embodiment, consecutive clauses referring to the same construction object are identified through object reference clusters. The artificial intelligence middleware generates reference candidates based on entity names, pronouns, abbreviations, and superordinate concepts, and matches the candidate references with the nearest entities in the document structure tree. During matching, the process stage, attribute words, and constraint verbs are read simultaneously. If the current clause contains object names such as template, support, or concrete, while the previous clause uses the above components or omits the object name, the two are included in the same object reference cluster based on the consistency of object category and the continuity of stage. If the current clause uses the same name but is located in a different process stage, or its superordinate title limits another type of construction object, it is not directly merged along the name similarity. The candidate clause chain consists of clauses that belong to the same object reference cluster and are adjacent or reference-reachable in the structure tree. Each clause in the chain retains the evidence type for entering the chain for subsequent edge calculation and boundary backtracking.

[0056] Furthermore, the credibility of semantic connection edges between clauses is calculated using the following formula:

[0057] ;

[0058] in, This indicates the credibility of the connection between the preceding and following clauses. Indicates the evidence cited by the number. Evidence of coreference indicating pronouns or omitted elements. Indicates continuous evidence applicable to the subject. This indicates continuous evidence during the construction phase. Indicates negation, a shift in object, or an independent exception. to The evidence is weighted at a fixed rate and sums to 1; for example, when a later clause includes a stent from the preceding clause. and All values ​​are taken as 1. If the same construction phase continues simultaneously, then... Take 1, unless other structures are present. If we choose 1, the AI ​​middleware will establish the main constraint edge and the exception branch edge accordingly, instead of continuing to merge the exception text into the original constraint path.

[0059] Please refer to Figure 3 , Figure 3 The horizontal axis represents the Chinese segment position of the clause continuation relationship in the parsing sequence, and the vertical axis represents the continuation credibility index, ranging from 0 to 1. Figure 3 Credibility of semantic connection edges between corresponding clauses The curves primarily describe the combined impact of explicit numbered references, co-references of pronouns or omitted components, continuity of applicable objects, continuity of construction stages, and evidence of negation, transition, or object switching on the establishment of the receiving edge. From Figure 3 As can be seen, the curve exhibits numerous low-level fluctuations in the early and mid-early stages, indicating that while some candidate subsequent clauses maintain an adjacency relationship with the preceding text, they lack sufficient evidence of common reference or contain exception branch markers, thus remaining as weak acceptances or acceptances awaiting review. Entering the mid-to-late stages, the curve repeatedly crosses the primary acceptance threshold and approaches the strong acceptance threshold, demonstrating that the numbered citation and continuous evidence of the object jointly strengthen the primary acceptance edge, suitable for forming a primary acceptance edge that propagates the semantic environment from higher-level clauses to lower-level clauses.

[0060] In a preferred embodiment, semantic boundary truncation is performed by an event trigger, which continuously reads the object identifier, stage identifier, polarity identifier, and exception identifier in the candidate clause chain. A new applicable subject refers to an object that is explicitly introduced in the current clause and is incompatible with the object reference cluster above, and that object becomes the grammatical subject or logical subject in subsequent constraints. Opposite constraint polarity refers to the same behavior changing from permitted to prohibited, from ought to may, or from must be satisfied to not required. Independent exception scope refers to exception text having its own applicable object, conditions, and conclusions, and cannot be stored merely as an attribute of the previous relation. When any event is satisfied, the AI ​​middleware closes the current semantic environment, records the termination position, and checks whether the text before truncation already has a subject, premise, and conclusion. If an explicitly cited premise is missing, the cited fragment is added along the citation edge until the minimum closed clause set is formed.

[0061] In one embodiment, semantic connection edges between clauses are divided into explicit reference edges and implicit connection edges according to the source of the reference. For explicit reference edges, the clause number and reference fragment of the referenced clause are recorded. For implicit connection edges, the connection evidence corresponding to the omitted subject, pronoun, and shared condition is extracted. A semantic environment stack is established in the candidate clause chain, which is passed from the superior clause to the subordinate clause. The applicable object, applicable stage, and preconditions are pushed into the semantic environment stack. When an exception marker, negative transition, or new object definition appears, the terminated semantic environment is popped out according to the corresponding level. Each stack frame in the semantic environment stack saves the source position, inheritance level, propagable attribute, and termination trigger condition.

[0062] In this embodiment, explicit reference edges are obtained through clause number parsing. The parser converts the current clause, the preceding paragraph, clause number and item number, and appendix references into uniform reference addresses and verifies whether the referenced address exists in the document structure tree. If a reference points to both the complete clause and one of its items, the reference fragment is accurate to the character range of the target item. Implicit inheritance edges are generated by the omission restorer. The omission restorer does not directly rewrite the original text but saves the inherited object and condition in the semantic environment stack and attaches the inheritance source as structured evidence to the current clause. Shared conditions include the scope of application given by the superordinate heading, conditional clauses that have not yet been closed in the previous clause, and introductory phrases used by consecutive parallel items. Propagation is only allowed if there is no conflicting object, conflicting stage, or opposite polarity in the current clause.

[0063] Preferably, the semantic environment stack has a stack depth set according to document level. Chapter-level applicable scope enters the lower-level stack frame, clause-level applicable objects enter the middle-level stack frame, section-level preconditions enter the higher-level stack frame, and local exceptions of the current item enter the highest-level stack frame. When an exception flag appears, only the local stack frame overlapping with the exception scope is popped, and the chapter-level or clause-level scope that still applies to subsequent clauses is not deleted. When a new object definition appears, the nearest object stack frame is searched from the top of the stack and replaced, while the scope of the higher-level stage is preserved. When a negative transition occurs, the logical branch corresponding to the current behavior polarity is closed and a new branch stack frame with the opposite polarity is created. This hierarchical pop-up rule ensures that cross-clause semantic inheritance is propagated in a controlled manner according to the source level, avoiding the invalidation of the entire chapter scope by a local exception, and also preventing the higher-level applicable conditions from being copied without boundaries to new construction objects.

[0064] In one embodiment, forming an intermediate representation of a rule includes: establishing a slot record for each semantic slot with original text location identifier, constraint polarity, and logical hierarchy; combining triggering conditions and applicable objects into rule antecedents; combining constraint behaviors, constraint parameters, and evidence requirements into rule consequents; establishing exception conditions as scope branches for rule antecedents or rule consequents; forming a directed acyclic logical expression structure according to the nested order of conditions in the original text; and keeping slots without original text support in an unresolved state without adding presumed content. The intermediate representation of the rule uses a serializable structure to store slot type, slot value, source range, logical connector, and parent-child hierarchy.

[0065] In this embodiment, the AI ​​middleware uses a span classifier to label the applicable object, applicable stage, triggering condition, constraint behavior, constraint parameters, exception conditions, and evidence requirements within the semantic boundary. The span classifier takes the character position sequence as input and uses domain dictionary hit, syntactic dependency, normative verbs, and context vectors as joint features. When a text fragment may belong to both the triggering condition and the applicable stage, the parser determines the primary slot based on whether it limits the occurrence of the behavior, whether it contains time or process status, and whether it is guided by conditional connectors, and allows the retention of secondary slot interpretations by reference. Each slot record saves the start and end positions of the original text and the source of parsing confidence, and does not write the natural language interpretation output by the model into the rule intermediate representation. The rule antecedent takes the applicable object as the constraint subject and the triggering condition and applicable stage as the entry conditions, and the rule consequent takes the constraint behavior as the center, attaching the parameter range and evidence requirements to the corresponding behavior.

[0066] Furthermore, the completeness of the slots represented in the middle of the rule is calculated using the following formula:

[0067] ;

[0068] in, This indicates the completeness of the slots represented in the middle of a rule. Indicates whether the applicable object is supported by the original text. This indicates whether the triggering condition and the applicable stage form a resolvable logic. Indicate whether the constrained behavior and its polarity are clearly defined. The parameters and evidence required indicate whether an attribution relationship is established with the constrained behavior. Indicates the degree of occupancy of undecided slots. to They are respectively represented as , , , and Corresponding fixed weights; for example, when the object, condition, and behavior all have clear textual sources but the required evidence does not appear. , , Take 1, Only parameters that have appeared are included; missing evidence is not presumed to be supplemented; pending items are approved. It is retained in the structure and prevents the rule subgraph from entering the final write state.

[0069] Please refer to Figure 4 , Figure 4 The horizontal axis represents the rule, the middle part represents the segment of the sample in the processing queue, and the vertical axis represents the slot completeness index, ranging from 0 to 1. Figure 4 Corresponding slot completeness The curve measures the impact of the applicable objects, triggering conditions and applicable stages, constraint behaviors and polarities, parameter and evidence requirements, and the degree of occupancy of pending slots on the quality of intermediate representation of rules. Figure 4 The curve remains relatively high from the beginning, indicating that most samples are supported by the original text regarding the object, condition, and behavior. Brief dips occur at several points, typically corresponding to segments where evidence requirements are missing, parameter attribution is unclear, or the scope of conditional conjunctions is not closed. Will because Increase and decrease. When the curve crosses the write preparation threshold, it indicates that the basic conditions for generating a rule subgraph have been met; if it is only higher than the verification threshold but has not reached the write preparation threshold, the slot to be verified still needs to be reserved.

[0070] In a preferred embodiment, the nesting order of conditions is determined through connective scope analysis. The parser identifies connective expressions such as "if," "unless," "but," "and," and "or," and establishes logical nodes based on dependency relationships and punctuation ranges. Conjunctive conditions are represented as parallel sub-conditions under the same parent node, and disjunctive conditions are represented as branch conditions that can be satisfied independently. Conditions within conditions continue to build nesting levels downwards. If an exception condition changes whether a rule is true, it is attached to the rule's antecedent; if it only changes the parameter range, evidence requirements, or behavior, it is attached to the rule's consequent. The directed acyclic structure avoids the same condition from being both its premise and its result through topological checks. When a cycle is detected, the corresponding original text segment and connective relationship are returned for re-parsing, rather than forcibly forming an acyclic structure by deleting arbitrary edges.

[0071] In one embodiment, constrained normalization includes: retrieving candidate concepts corresponding to slot records from the construction object ontology, process ontology, and compliance concept ontology; establishing a concept path for each candidate concept consisting of the original name, superior concept, applicable stage, and associated process; jointly matching the concept path with the logical levels in the rule antecedent and rule consequent to exclude candidate concepts that conflict with the applicable stage or associated process; writing a unified concept identifier into the retained candidate concepts and simultaneously saving the original name, source location, and concept path; the candidate concept retrieval uses word form matching, synonym mapping, and contextual semantic similarity relationships, but the final selection result must pass the stage constraint and process constraint.

[0072] In this embodiment, the construction object ontology stores the object category, composition relationship, and allowed range of procedures; the procedure ontology stores the sequence of procedures, applicable objects, and stage status; and the compliance concept ontology stores the semantic relationships between obligations, prohibitions, permissions, parameter restrictions, and evidence types. The artificial intelligence middleware generates a set of candidate concepts for each slot and constructs a concept path along the ontology's superior relationship. If the original term is "support system," the candidate concepts may include formwork support system, scaffolding support system, and temporary structure support system. The parser reads the construction object, applicable stage, and associated procedures from the current rule's antecedent. If the clause is located in the formwork installation stage and the consequent involves formwork acceptance, the candidate concepts corresponding to the scaffolding erection procedure are excluded. The normalization result retains the unified concept identifier while preserving the original terminology to prevent the loss of the original regulatory expression during subsequent reverse generation.

[0073] Preferably, the matching value of the candidate concept path is calculated using the following formula:

[0074] ;

[0075] in, This indicates the matching value between the candidate concept path and the current slot. This indicates the degree of semantic similarity between the original name and the candidate concept name. It indicates the degree of consistency between the superordinate concept and the semantic boundary topic. Indicates the degree of consistency in the applicable stages. Indicates the degree of consistency between related processes. Indicates the degree of stage conflict or process conflict. to The degree of similarity is fixed with a weight; for example, if two candidate concepts are semantically similar, but one candidate concept corresponds to the pouring stage and the other to the acceptance stage, when the current clause explicitly defines acceptance, This allows the acceptance concept to achieve a high matching value. This eliminates the concept of casting and avoids relying solely on name similarity for normalization.

[0076] Please refer to Figure 5 , Figure 5 The horizontal axis represents the sample segment of the candidate concept path in the normalization process, and the vertical axis represents the path matching index, which ranges from 0 to 1. Figure 5 Corresponding candidate concept path matching value The curve comprehensively reflects the closeness between the original name and the candidate concept name, the consistency between the superordinate concept and the semantic boundary theme, the consistency of the applicable stage, the consistency of related processes, and the factors of conflict between stages or processes. From Figure 5 As can be seen, the curve gradually rises from the beginning to the middle, indicating that after the ontology candidates are filtered by stage constraints and process constraints, the matching results gradually shift from similar names to semantic and process consistency; a few troughs correspond to the situation where candidate names are similar but construction stages do not match. When the curve exceeds the candidate retention threshold, the candidate concept can continue to participate in the comparison; when it exceeds the normalization threshold, it indicates that the concept path can simultaneously retain the original name and unified concept identifier, and is suitable as the normalization basis for rule subgraph nodes.

[0077] In one embodiment, generating a rule subgraph includes: establishing each triggering condition in the rule antecedent as a condition node and connecting them into antecedent paths according to conjunction, disjunction, and condition nesting relationships; establishing the constraint behavior, constraint parameter, and evidence requirement in the rule consequent as obligation nodes, parameter nodes, and evidence nodes respectively, and connecting them into consequent paths through satisfaction relationships; inserting exception nodes into the antecedent or consequent path according to exception conditions, and recording the starting and ending action nodes of the exception nodes; connecting the original text position identifier as a source edge to the corresponding node. The rule subgraph also saves unified concept identifiers, original names, and logical levels to support reverse generation and local replacement.

[0078] In this embodiment, the antecedent path starts from the applicable object node, passes through the applicable stage node and the triggering condition node in sequence. When multiple conditions form a conjunction relationship, each condition node is connected to the same conjunction node and the conjunction node points to the obligation node. When multiple conditions form a disjunction relationship, each branch condition points to the same disjunction node. The consequent path is centered on the obligation node. The constraint parameter node is connected to the specific behavioral attribute through the limitation relationship, and the evidence node is connected to the behavior or state being proved through the proof relationship. The exception node is not attached as a normal attribute, but is connected to the starting action node and the ending action node by the scope edge. If the exception only changes the parameter range, the starting action node is the parameter node. If the exception makes the entire obligation invalid, the starting action node is the antecedent condition convergence point. The source edge points to the character range corresponding to the slot and retains the clause number and document version.

[0079] Furthermore, the structural consistency of the regular subgraph is calculated using the following formula:

[0080] ;

[0081] in, This indicates the structural consistency of the regular subgraph. Indicates whether the preceding path leads continuously from the applicable object to the obligation node. This indicates whether parameter nodes and evidence nodes have a unique affiliation. Indicates whether the exception node has a clearly defined start and end point. This indicates whether each node has a source edge. This indicates the degree of occupancy of nodes without a source, dangling relationships, or logical loops. to They are respectively represented as , , , and The corresponding fixed weights; for example, when an exception node has only a starting node but no ending node. If the value cannot be full, the AI ​​middleware will mark the subgraph as pending correction and return the exception scope resolution location, instead of writing the non-closed exception relation into the formal graph.

[0082] Please refer to Figure 6 , Figure 6 The horizontal axis represents the segment position of the generated sample in the processing sequence, and the vertical axis represents the structural consistency index, ranging from 0 to 1. Figure 6 Corresponding rule subgraph structure consistency It is used to evaluate whether the antecedent path continuously reaches the obligation node from the applicable object, whether the parameter node and evidence node have a unique affiliation, whether the exception node has a clear start and end point, whether each node retains the source edge, and whether there are nodes without a source, dangling relationships or logical loops. Figure 6 The overall curve shows a gradual upward trend, indicating that as slot records, concept paths, and source edges gradually stabilize, the rule subgraph transitions from the initial construction state to a structurally committable state. Local dips in the early and later stages typically correspond to situations such as unclosed exception scopes, non-unique parameter attributions, or missing source edges. If the submission threshold is lower than the structure submission threshold, the rule subgraph should be returned to the corresponding parsing position for correction.

[0083] In one embodiment, slot consistency comparison includes: parsing the reverse-generated normalized clauses back into translated semantic slots, establishing a correspondence between the original semantic slots and the translated semantic slots according to the original text position identifiers; comparing the scope of the applicable objects, the logical combination of triggering conditions, the polarity of the constraint behavior, the limiting relationship of the constraint parameters, and the scope of the exception conditions; generating an error correction path containing the difference slots, associated nodes, and source clauses, and backtracking along the error correction path to the steps of semantic boundary determination, rule intermediate representation formation, or constraint normalization, and reverse-generating nodes and relationships into normalized statements according to the topological order of the rule subgraph, without introducing conditions or objects that do not exist in the original graph.

[0084] In this embodiment, the reverse generator reads the unified concept identifier and original title from the applicable object node, the applicable stage, condition connector, and condition nesting level from the antecedent path, and the behavior polarity, parameter constraints, and evidence requirements from the consequent path. It also determines the insertion position of the exception statement based on the start and end scope of the exception node. The normalized clauses use fixed semantic templates and do not strive for consistency with the original sentence structure, but require each slot to have a unique parsable position in the output. After generation, the slots are re-extracted by the back-translation parser, which shares the slot definition with the forward parser but has independent parameters, to prevent the same parsing result from self-confirming without independent verification. The original slots and back-translated slots are aligned through source position, unified concept identifier, and logical level. If one original slot corresponds to multiple back-translated slots, it is recorded as a range split; if multiple original slots correspond to one back-translated slot, it is recorded as a range merge.

[0085] Preferably, the difference in slot positions is calculated using the following formula:

[0086] ;

[0087] in, This represents the overall difference between the original semantic slot and the back-translated semantic slot. This indicates a difference in the scope of the applicable objects. This indicates differences in the combination of triggering condition logic. This indicates a difference in the polarity of the constrained behavior. This indicates the difference in the constraint parameter limitation relationship. Indicates the difference in exception scope. to Fixed weights are assigned to the differences; for example, if the original clause states that a certain action cannot be performed during the acceptance phase and under certain conditions, and the back-translation results in the loss of the relationship, Even if the object and behavior are consistent, the AI ​​middleware will still send the rule subgraph into the error correction process if the value is non-zero, because the change in the combination of conditions has changed the scope of the rule.

[0088] Please refer to Figure 7, Figure 7 The horizontal axis represents the processing segment of the reverse-generated and back-translated comparison samples, and the vertical axis represents the slot difference index, ranging from 0 to 1. Figure 7 Corresponding slot difference Unlike the aforementioned quality indicators, A higher value indicates a stronger inconsistency between the original semantic slot and the back-translated semantic slot. Figure 7 As can be seen, most samples are close to the bottom low value range, indicating that the back-translation results basically correspond to the original slots in terms of applicable objects, trigger condition combinations, constraint behavior polarity, parameter limitation relationships, and exception scope. A few spikes cross the slight difference threshold or even approach the error correction trigger threshold, indicating that the condition conjunction relationship may be lost, the object reference range may be expanded, the behavior polarity may be changed, or the exception scope may not be correctly back-translated.

[0089] In a preferred embodiment, the error correction path is formed by tracing back from the difference slots. The applicable object difference is traced back to the concept path and object reference cluster, the trigger condition difference is traced back to the scope of the connective word and the semantic environment stack, the constraint behavior polarity difference is traced back to the negation word, normative verb and transition marker, the parameter limiting relationship difference is traced back to the parameter span and its belonging behavior, and the exception scope difference is traced back to the start and end edges of the exception node. Each processing position in the path stores the input object, output object and source position. The artificial intelligence middleware selects the processing position that can cover the difference and has the smallest range to perform a rollback. If the difference is caused by a text boundary error, the semantic boundary is redefined and its downstream structure is reconstructed. If the difference is only caused by a concept selection error, only the constrained normalization is re-executed and the corresponding concept identifier is replaced.

[0090] In one embodiment, the error correction path is connected to the corresponding processing position according to the difference type. Specifically, for reference range differences, the path is connected to the conceptual path filtering record; for logical combination differences, the path is connected to the logical expression structure in the intermediate representation of the rule; for constraint polarity differences, the path is connected to the clause fragment containing the negation mark or the transition mark; and for exception scope differences, the path is connected to the starting and ending action nodes of the exception node. Local reconstruction is performed according to the minimum processing position pointed to by the error correction path, and nodes and relationships that are not affected by the differences are preserved. The minimum processing position is jointly determined by the source of the difference and the downstream dependency range.

[0091] In this embodiment, an influence closure is established before local reconstruction. The influence closure starts from the node corresponding to the difference slot and searches for nodes that must be replaced synchronously along logical dependency edges, attribution edges, and source edges. It does not expand along ontology superior relations or other rule reference edges that are unrelated to the difference. For example, when the polarity of constraint behavior differs, the influence closure includes the obligation node, the parameter node connected to it, the evidence node, and the direct exception node, but does not include other rule subgraphs that share the same construction object. The artificial intelligence middleware establishes read-only anchors for boundary nodes outside the influence closure. New nodes generated by local reconstruction must continue to be connected to anchors with the same unified concept identifier. Old nodes remain in a recoverable state before the new subgraph passes the consistency comparison to avoid reconstruction interruption leading to a half-complete graph structure.

[0092] Furthermore, the difference handling adopts a source-first rule. If the same difference can be explained by multiple processing positions, the distance from each processing position to the original character range, the number of dependent nodes, and the number of pending slots are compared, and the path with the shorter source distance and smaller dependent range is selected. If the difference in the exception scope may come from both the clause boundary and the start and end edges of the graph, the AI ​​middleware first checks whether the exception marker in the original text is located within the current semantic boundary. If the boundary is complete but the start and end edges are missing, it is corrected in the rule sub-layer. If the exception marker is cut outside the boundary, it returns to the candidate clause chain to recalculate the boundary. After local correction, only the affected slots are reverse generated and back-translated for comparison. After the local result passes, the complete rule sub-graph is then subjected to a full consistency check.

[0093] In one embodiment, the AI ​​middleware generates environment change records for each push and pop operation in the semantic environment stack, and establishes a bidirectional index between the environment change records and the condition nodes, obligation nodes, and exception nodes in the rule subgraph. When a node inherits a cross-clause semantic environment, the inheritance source, inheritance level, and termination position are written into the node attributes. The clause fragments, concept paths, and environment change records that form the node are retrieved in reverse according to the bidirectional index, forming a continuous evidence chain from the graph node to the original text. The continuous evidence chain saves boundary formation, slot extraction, concept normalization, and graph writing records in the order of processing.

[0094] In this embodiment, the environment change record includes operation type, stack frame identifier, source location, propagation object, trigger marker, and stack state summary after the operation. Push operations correspond to new applicable scope, new object, or new preconditions, while pop operations correspond to scope termination, object switching, negation transition, or exception termination. One end of the bidirectional index points to the environment change record, and the other end points to the condition node, obligation node, or exception node formed by the environment. When the node content directly comes from the current clause, the inheritance level is recorded as the current level. When the node content comes from the superior clause, the inheritance level records the number of document layers crossed and the number of connecting edges. The termination position indicates the character position or clause position where the inherited content is no longer applicable, enabling the chain of evidence to distinguish the boundary between the start and end of knowledge application.

[0095] Preferably, the traceability value of a continuous chain of evidence is calculated using the following formula:

[0096] ;

[0097] in, This represents the traceable value from the graph node to the original text. Indicates whether the source location is continuously reachable. This indicates whether the environmental change record is complete. This indicates whether the conceptual path retains the original name and unified conceptual identifier. Indicates whether a node or relation has a generating record. Indicates the number of breaks in the chain of evidence. to They are respectively represented as , , , and The corresponding fixed weights; for example, when an obligation node has a direct source location, a complete conceptual path, and a graph write record, but lacks environmental change records of higher-level conditions, Cannot take the full value and The AI ​​middleware uses this information to look back at the semantic context stack, rather than relying solely on the current text of the obligation node to determine the completeness of the source.

[0098] Please refer to Figure 8 , Figure 8 The horizontal axis represents the segment of the evidence chain sample in the reverse retrieval sequence of nodes, and the vertical axis represents the traceability index of the evidence chain, with a value range of 0 to 1. Figure 8 Corresponding traceable value of continuous chain of evidence The curve reflects the combined impact of continuous accessibility of the source location, completeness of environmental change records, the degree to which the conceptual path preserves the original name and unified conceptual identifier, the completeness of node and relationship generation records, and the number of evidence chain breakpoints. Figure 8The curve rises overall from the beginning to the end, indicating that as environment stack records are pushed and popped, concept path records and graph writing records are gradually bound, nodes can more stably return to the original text range. Short-term dips indicate that some nodes, although possessing direct source locations, lack superior condition inheritance records or generation records, leading to... The process involves descending and requires a lookup of the semantic context stack.

[0099] In a preferred embodiment, the reverse retrieval starts from any graph node, selects the evidence chain entry point according to the node type, prioritizes searching for source conditions along the semantic environment index for conditional nodes, prioritizes searching for normative verbs and constraint behaviors along slot records for obligation nodes, and simultaneously searches for exception ranges along the start and end action edges and environment pop-up records for exception ranges. The retrieval results are rearranged according to the original document order to form a text set containing direct clauses, cited clauses, and inherited clauses. If the unified concept identifier originates from the normalized mapping, the evidence chain simultaneously returns the original terminology and concept path, enabling the reviewer to determine how the unified terminology in the graph is formed from the original legal terms. Any node that cannot reach the original character range enters the set to be verified and is suspended from participating in formal rule queries.

[0100] In one embodiment, partial reconstruction includes: locking the set of nodes covered by the error correction path and the logical relationships directly connected to the set of nodes; re-extracting the corresponding slots based on the continuous evidence chain and updating the intermediate rule representation; replacing the set of nodes with the updated intermediate rule representation while keeping the unified conceptual identifier of the externally connected nodes unchanged; performing normalized clause reverse generation and slot consistency comparison on the replaced rule subgraph again; when a unique correspondence is established between the original semantic slots and the back-translated semantic slots and there are no unresolved slots, submitting the replaced rule subgraph to the construction compliance knowledge graph; the submission process uses versioned writing to ensure that the old set of nodes is not deleted before the new set of nodes is verified.

[0101] In this embodiment, the locking operation is based on the rule subgraph identifier and the influence closure identifier. The AI ​​middleware marks the node to be replaced as being in a reconstruction state and prevents other processing batches from writing to the same set of nodes. When re-extracting slots based on the continuous chain of evidence, the parser reads the original clause, the referenced clause, the environment change record, and the concept path, without reading the natural language description of the old node as the sole basis. The updated rule middleware represents the generation of a new set of nodes. The new nodes inherit the unified concept identifier and source document version of the external connected nodes, but recalculate their own logical level, source edge, and exception scope. The replacement operation is implemented by switching the subgraph version pointer. Before the new subgraph completes the reverse generation and back-translation comparison, the query still points to the old version. After the verification is completed, the current pointer is then pointed to the new version.

[0102] Furthermore, the submission decision of the rule subgraph is expressed by the following formula:

[0103] ;

[0104] in, Indicates whether the replaced rule subgraph is writable. This indicates that the value is 1 if the condition is true and 0 if the condition is false. Using the difference in slot position, and These represent the minimum criteria for structural consistency and evidentiary continuity, respectively; for example, reverse translation shows no slot differences and no pending slots, but the chain of evidence still has a break, leading to... When the product result is 0, the subgraph remains in a state of pending verification; only when all four conditions are met simultaneously... And perform a version pointer switch.

[0105] In this embodiment, the unique correspondence between the original semantic slots and the translated semantic slots is achieved through bipartite matching. The left set represents the original slots, and the right set represents the translated slots. Candidate matching edges are determined by a unified concept identifier, overlapping source locations, logical hierarchy, and slot type. If one original slot corresponds to multiple translated slots, the parser checks whether it is caused by the splitting of conjunction or disjunction conditions. Only when the logical structure after splitting is consistent with the original text will they be merged into a composite correspondence; otherwise, the differences are retained. If there are unresolved slots, the AI ​​middleware returns the positions that lack original text support and does not fill them with default concepts, statistical high-frequency values, or other clause content. After submission, the new rule subgraph is bound to the document version, processing batch, and verification record. The old version retains a read-only reference so that the construction process can be reproduced based on the source version later.

[0106] In a preferred embodiment, after the construction compliance knowledge graph is written, consistency is maintained according to the rule subgraph as the minimum transaction scope. New clauses only generate corresponding new rule subgraphs, while clause revisions locate the affected old rule subgraphs based on the source location index and enter a partial reconstruction process. During the query process, the applicable object, applicable stage, and triggering condition together constitute the rule entry point. The graph judges whether the condition is met along the antecedent path, and then reads the obligation node, parameter node, evidence node, and exception node. The query result simultaneously returns a continuous chain of evidence. When the query condition lacks the applicable stage or triggering condition required by the rule antecedent, the system returns an incomplete condition state without outputting a positive or negative compliance conclusion. When there is an exception branch, the query process determines whether to shield the corresponding obligation or only adjust the parameter relationship based on the scope of the exception node, so that the logical boundary formed in the construction stage continues to be constrained in the reading stage.

[0107] Specifically, each processing object in the AI ​​middleware is managed using immutable source records and replaceable derived records. Original document fragments, location indexes, and version information belong to immutable source records, while semantic boundaries, slot records, concept paths, rule intermediate representations, and rule subgraphs belong to replaceable derived records. Each backtracking correction creates a new derived version and records the identifier of the previous version, without directly overwriting historical derived content. The processing log saves trigger differences, error correction paths, affected closures, re-parsing scope, and submission judgment results, enabling the same clause to be replayed under the same ontology version and the same parsing configuration to form a consistent structure. When the ontology is updated, the AI ​​middleware only re-evaluates the slots referencing the affected concept paths and completes the replacement along the existing error correction and local reconstruction mechanisms, without re-segmenting the document scope unrelated to the ontology change.

[0108] Preferably, manual review only applies to character ranges to be verified, unresolved slots, exception scopes that cannot be closed, or evidence chain breakpoints. The review input consists of the original text, candidate interpretations, and associated processing positions. The review result is recorded as a constraint with a source location and participates in the generation of subsequent rule intermediate representations. Manual review does not directly edit graph nodes to avoid the graph structure losing its mapping with the original clauses. When a candidate concept is confirmed by the review, the AI ​​middleware writes the confirmation result into the concept path record of the current document version and re-executes reverse generation and slot consistency comparison. When the review confirms that the text itself is ambiguous, the corresponding slot remains in an unresolved state and does not enter the formal rule subgraph, so that the knowledge graph only stores construction compliance knowledge that can be confirmed by the text source, logical structure, and back-translation results.

Claims

1. A construction compliance knowledge graph construction method based on artificial intelligence middleware, characterized in that, include: Obtain construction regulations, technical standards, and construction compliance documents; identify document levels, clause numbers, and cross-section references; and determine the semantic boundaries of compliance clauses. The AI ​​middleware parses the compliance clauses into semantic slots corresponding to the applicable objects, applicable stages, triggering conditions, binding behaviors, binding parameters, exception conditions, and evidence requirements, forming an intermediate representation of the rules. Based on the construction object ontology, process ontology, and compliance concept ontology, the semantic slots are subjected to constraint normalization, generating a rule subgraph containing condition nodes, obligation nodes, exception nodes, and evidence nodes. Based on the rule subgraph, standardized clauses are generated in reverse and compared with the corresponding compliance clauses in terms of slot consistency. After backtracking and correcting any inconsistent slots, the rule subgraph is written into the construction compliance knowledge graph.

2. The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 1, characterized in that, Determining the semantic boundaries of the compliance clauses includes: establishing a document structure tree based on the heading level and clause number, and connecting consecutive clauses referring to the same construction object into a candidate clause chain; Parse the reference markers, parallel markers, transition markers, and exception markers in the candidate clause chain to construct semantic connection edges between clauses; The applicable objects and applicable stages are propagated along the semantic continuation edge, and the propagation is truncated when a new applicable subject, opposite constraint polarity, or independent exception scope is detected. The minimum set of closed clauses formed before the truncation is determined as a semantic boundary.

3. The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 1, characterized in that, The intermediate representation of the rule includes: establishing a slot record with original position identifier, constraint polarity and logical level for each semantic slot; combining the triggering condition and the applicable object into a rule antecedent; combining the constraint behavior, the constraint parameter and the evidence requirement into a rule consequent; and establishing the exception condition as a scope branch for the rule antecedent or the rule consequent. The logical expression structure is formed according to the nested order of conditions in the original text, and slots that are not supported by the original text are kept in an unresolved state without being filled with presumed content.

4. The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 1, characterized in that, The slot consistency comparison includes: parsing the reverse-generated normalized clauses into back-translated semantic slots again, and establishing a correspondence between the original semantic slots and the back-translated semantic slots according to the original text position identifier; The scope of the applicable objects, the logical combination of the triggering conditions, the polarity of the constraint behavior, the limiting relationship of the constraint parameters, and the scope of the exception conditions are compared respectively. Generate a correction path that includes difference slots, associated nodes, and source terms, and backtrack along the correction path to the semantic boundary determination, rule intermediate representation formation, or constraint normalization steps.

5. The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 2, characterized in that, The semantic connection edges between the clauses are divided into explicit reference edges and implicit connection edges according to the source of the reference; For the explicit reference edge, record the clause number and reference fragment of the referenced clause; for the implicit continuation edge, extract the continuation evidence corresponding to the omitted subject, pronoun, and shared condition. A semantic environment stack is established in the candidate clause chain, which is passed from the superior clause to the subordinate clause. The applicable object, applicable stage and precondition are pushed into the semantic environment stack. When an exception marker, a negative transition or a new object definition appears, the terminated semantic environment is popped out according to the corresponding level.

6. The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 3, characterized in that, The constrained normalization includes: retrieving candidate concepts corresponding to the slot record from the construction object ontology, the process ontology, and the compliance concept ontology, and establishing a concept path for each candidate concept consisting of the original name, the superior concept, the applicable stage, and the associated process; The conceptual path is jointly matched with the logical hierarchy in the rule antecedent and rule consequent to exclude candidate concepts that conflict with the applicable stage or related process. Write a unified concept identifier into the retained candidate concepts, and save the original name, source location and concept path at the same time.

7. The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 4, characterized in that, Generating the rule subgraph includes: establishing each triggering condition in the rule antecedent as a condition node, and connecting them into antecedent paths according to conjunction, disjunction, and condition nesting relationships; The constraint behaviors, constraint parameters, and evidence requirements in the rule consequents are respectively established as obligation nodes, parameter nodes, and evidence nodes, and connected as consequent paths through satisfaction relationships. Based on the exception conditions, insert the exception node into the predecessor path or the successor path, and record the starting and ending nodes of the exception node; Connect the original location identifier as the source edge to the corresponding node.

8. The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 4, characterized in that, The error correction path is connected to the corresponding processing position according to the difference type. Specifically, the difference in the scope of reference is connected to the conceptual path filtering record, the difference in logical combination is connected to the logical expression structure in the intermediate representation of the rule, the difference in the polarity of constraint is connected to the clause fragment containing the negation mark or the transition mark, and the difference in the scope of exception is connected to the starting and ending action nodes of the exception node. Perform local reconstruction at the minimum processing position indicated by the error correction path, and preserve nodes and relationships that are not affected by the differences. 9.The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 5, characterized in that, The artificial intelligence middleware generates an environment change record for each push and pop operation in the semantic environment stack, and establishes a bidirectional index between the environment change record and the condition nodes, obligation nodes and exception nodes in the rule subgraph; When a node inherits from a cross-clause semantic context, the inheritance source, inheritance level, and termination position are written into the node properties; The bidirectional index is used to reverse retrieve the clause fragments, conceptual paths, and environmental change records of the nodes, forming a continuous chain of evidence from the graph nodes to the original text.

10. The construction compliance knowledge graph construction method based on artificial intelligence middleware according to claim 8, characterized in that, The local reconstruction includes: locking the set of nodes covered by the error correction path and the logical relationships directly connected to the set of nodes, re-extracting the corresponding slots based on the continuous evidence chain and updating the intermediate representation of the rules; The node set is replaced with the updated rule intermediate representation, while maintaining the unified conceptual identifier of the externally connected nodes. The normalized clause reverse generation and slot consistency comparison are performed again on the replaced rule subgraph. When a unique correspondence is established between the original semantic slot and the translated semantic slot and there are no unresolved slots, the replaced rule subgraph is submitted to the construction compliance knowledge graph.