Regulation text-oriented hierarchical perception segmentation and version alignment method

By employing a multi-signal fusion and global optimization framework, the accuracy issues of clause boundary identification and version alignment in regulatory texts have been resolved. Stable clause segmentation and cross-version alignment have been achieved, improving the accuracy and interpretability of compliance retrieval and risk assessment.

CN121543545APending Publication Date: 2026-02-17GUANGZHOU CITY UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511712486.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing technologies suffer from issues such as clause boundary drift, hierarchical misalignment, inaccurate cross-version alignment, and lack of time dimension processing when processing regulatory texts. This results in insufficient accuracy and interpretability of compliance retrieval, automated question answering, and risk assessment.

Method used

Employing a multi-signal fusion and global optimization framework, this approach extracts layout features and numbering clues from line blocks through layout analysis. Combined with semantic prompt scores, it generates a set of candidate titles and boundary positions. The optimal boundary chain is solved using a global optimization algorithm. Explicit citations are identified, and a clause-anchor bipartite graph is constructed. Intra-version identifiers and cross-version global identifiers are generated. Composite similarity is calculated, and a bipartite graph maximum weight matching algorithm is used to determine evolutionary relationships. The effective time interval is maintained to achieve accurate clause segmentation and version alignment.

Benefits of technology

It improves the accuracy and robustness of clause segmentation, enhances stable tracking capabilities across versions, accurately determines the relationship between clause continuation, revision, replacement, repeal, and addition, enables the effective trimming of any point in time or time interval, and improves the accuracy and interpretability of compliance retrieval and risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543545A_ABST
    Figure CN121543545A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing and document engineering, and provides a hierarchical perceptual segmentation and version alignment method for regulation texts, which comprises the following steps of: analyzing a document to extract row block layout features, and generating candidate boundaries in combination with a regular mode and semantic prompt; and calculating a comprehensive score and introducing length prior and cross-page constraint optimization to output a term segment with a hierarchical path. And identifying anchor points which are explicitly cited and standardized as clause paths, appendix numbers and chart identifiers to form a clause-anchor point bipartite graph. In-version identification based on hierarchical paths, version information, and normalized text, cross-version global identification based on text fingerprints and a subset of key anchors are generated. And calculating the composite similarity, and judging continued use, revision, substitution, revocation and new evolution relationships. And returning a query time point effective clause subset based on a visibility rule in combination with a substitution and revocation relationship, and outputting a tuple containing double identifiers, a hierarchical path, a text, an effective interval, an anchor point set and a leatherwise chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of natural language processing and document engineering technology, and in particular to a method for hierarchical-aware segmentation and version alignment of regulatory texts. Background Technology

[0002] In existing technologies, the clause-level structuring and version alignment of regulatory texts mainly rely on rule-based paragraph segmentation and numbering addressing methods. These methods typically divide clause levels using numerical patterns of chapter numbers and layout signals (such as font size and indentation), and perform rough matching between different versions using full-text similarity or large-section similarity. However, existing technologies have several problems: First, when faced with complex layouts (such as cross-page headers and mixed footnotes) and unusual numbering (such as underlined composite numbering and mixed Arabic numerals and Chinese character serial numbers), clause boundaries are prone to drift, and hierarchical relationships can become misaligned, leading to inaccurate segmentation. Second, the clause identifiers in existing technologies are strongly coupled with visible numbering. Once a version update causes adjustments to the chapter order or changes in the numbering system, the original identifiers become invalid, making it difficult to achieve stable tracking across versions. Furthermore, existing methods lack multi-factor constraints during version alignment, easily resulting in one-to-many or many-to-one mismatches, and failing to accurately mark fine-grained relationships such as the continuation, revision, replacement, and repeal of clauses. Finally, existing technologies generally lack the ability to handle the time dimension, failing to accurately tailor the set of clauses that are truly valid at a specific point in time according to their effective and ineffective periods and their replacement and repeal relationships. This severely impacts the accuracy and interpretability of compliance retrieval, automated question answering, and risk assessment. These issues indicate that existing technologies have systemic shortcomings in terms of the robustness of structural reconstruction, the traceability of cross-version addressing, the granularity of clause alignment, and the guarantee of timeliness consistency, making it difficult to meet the synchronous requirements of accuracy, traceability, and real-time performance in scenarios such as power dispatch project evaluation. Summary of the Invention

[0003] To address the aforementioned shortcomings, the present invention aims to propose a hierarchical awareness segmentation and version alignment method for regulatory texts. This method utilizes a multi-signal fusion and global optimization framework to achieve stable segmentation at the clause level, accurate cross-version alignment, and time-based validity trimming.

[0004] To achieve this objective, the present invention adopts the following technical solution: A method for hierarchical-aware segmentation and version alignment of regulatory texts includes the following steps: S1: Parse the layout of the input document to obtain multiple line blocks, extract the layout features of each line block, identify numbering clues based on predefined regular patterns, calculate semantic prompt scores, and generate a set of candidate titles and candidate boundary positions. S2: For each candidate boundary position in the candidate boundary position set, integrate layout strength, number hit rate, semantic hint score and reference density to calculate a comprehensive score, introduce length prior and cross-page continuity constraints, solve the optimal boundary chain through a global optimization algorithm, and output the clause segment with hierarchical path; S3: Identify explicit references from each of the clause segments, normalize the explicit references into structured anchors including clause paths, appendix numbers, and diagram identifiers, and construct a clause-anchor bipartite diagram based on the structured anchors; S4: Generate an intra-version identifier and a cross-version global identifier for each clause segment, wherein the intra-version identifier is generated based on the hierarchical path, version information, and normalized text of the clause segment, and the cross-version global identifier is generated based on text fingerprints and a subset of key anchor points; S5: For two versions of clause segments, calculate the composite similarity between clause pairs based on structural path similarity, anchor point overlap, edit distance similarity, word similarity, and semantic vector cosine similarity. Establish clause mapping through bipartite graph maximum weight matching algorithm, and determine the evolution relationship based on the composite similarity and predefined threshold. The evolution relationship includes continued use, revision, replacement, repeal, and addition. S6: Maintain an effective time interval for each clause segment, and combine the substitution and repeal relationships in the evolution relationship to return a subset of valid clauses for a given query time based on the visibility determination rule; S7: Output a tuple for each clause segment, the tuple including the version identifier, the cross-version global identifier, the hierarchical path, the main text, the effective time interval, the set of structured anchor points, and the evolution chain.

[0005] Preferably, step S1 includes: The input document is parsed into a sequence of pages and line blocks. Each row block Includes the original text and its layout geometry; Extract the layout features of each line block, including font size, font weight, indentation, and line spacing; The detection of numbering and title clues is based on predefined regular expression patterns, including chapter numbering patterns and appendix numbering patterns. Calculate the number hit rate for each row block. and semantic hint score ,in: ; ; in, Indicates an indicator function, Represents line block text Does it match the predefined set of chapter number regular expression patterns? , Indicates line block The semantic vector obtained by mapping text through an embedding model This represents a pre-constructed title prototype vector. It is composed of the embedding mean or cluster centers of high-frequency title words. Represents the cosine similarity function; A set of candidate titles and candidate boundary positions is generated based on the number hit rate and semantic hint score.

[0006] Preferably, the calculation of the comprehensive score satisfies the following relationship: ; in, Indicates candidate boundary position The overall boundary score, This represents learnable or preset non-negative weight coefficients. Indicates position The probability that the corresponding line block belongs to the title. Indicates the hit rate of the number. Indicates the semantic prompt score, Indicates the cross-clause citation density score. This indicates a penalty for unreasonable length. Satisfying the relation: ; in, This indicates the distance from the previous selected boundary position to the current position. The total number of characters covered Indicates the expected length of the terms; Satisfying the relation: ; in, Indicates line block eigenvectors, This includes layout features, text length, and positional context information. This represents the parameter vector of the classifier. This represents the sigmoid activation function.

[0007] Preferably, the output clause segment with hierarchical path includes: For each line block identified as a header, predict its hierarchical label. Sequence labeling is performed using linear chain conditional random fields or Viterbi decoding, with the optimization objective being: ; in, This represents the optimal hierarchical label sequence. Indicates line block The emission feature vector, Including numbering structure, semantic vectors, and layout features. This indicates the emission parameters for the corresponding level label. Represents the transfer constraint function. Used to encode legal hierarchical jump rules and to impose negative penalties for page breaks or hierarchical inversions; The global optimal boundary sequence is solved using dynamic programming, satisfying the following relation: ; in, Indicated by position The score is accumulated for the optimal splitting path at the end. Indicates the position of the previous candidate boundary. This represents the overlap penalty coefficient. Indicates position and Measurement of text or page overlap; By backtracking Find the optimal path and output the clause segment with hierarchical path.

[0008] Preferably, step S3 includes: Identify explicit references in each of the aforementioned clauses, including references to other clauses, references to appendices, and references to tables or figures; The identified explicit references are normalized into structured anchors, and the normalized set of anchors satisfies the following relation: ; in, Terms and Conditions The set of normalized anchor points Indicates the hierarchical path of the cited clause. Indicates the standardization number of the cited appendix. A unique identifier for the referenced table or chart; Based on the aforementioned structured anchor point construction clause - anchor point bipartite diagram ,in Represents the set of clause nodes. Represents the set of anchor nodes. This represents the set of edges with reference relationships.

[0009] Preferably, step S4 includes: The identifiers within the specified version satisfy the following relation: ; in, Terms and Conditions Version identifier, Terms and Conditions Hierarchical path, Indicates the current document version number. This represents a text normalization function. Terms and Conditions The original text, Represents a cryptographic hash function, symbol This represents a string concatenation operation; The cross-version global identifier satisfies the following relation: ; in, Terms and Conditions Cross-version global identifier, Terms and Conditions Text fingerprint, Indicates from the terms The subset of key anchor points extracted from the normalized set of anchor points.

[0010] Preferably, in step S5, for the two versions of the clause segment set, the composite similarity between the clause pairs is calculated based on structural path similarity, anchor point overlap, edit distance similarity, literal similarity, and semantic vector cosine similarity, including: Terms and conditions Composite similarity The following relation is satisfied: ; in, Terms and Conditions With Terms The composite similarity score between them Indicates non-negative weight coefficients. Indicates an indicator function, and Each represents a clause and Cross-version global identifier; Terms and conditions The sub-item similarity includes: Literal similarity : ; in, and Each represents a clause and The original text, Indicates to performing text processing The set obtained after shingle partitioning; Normalized edit distance similarity : ; in, Indicates the Levenshtein edit distance. and Each represents a clause and The length of the text characters; Reference Anchor Point Coincidence : ; in, and Each represents a clause and The set of normalized anchor points; Hierarchical path similarity : ; in, and Each represents a clause and Hierarchical path, Indicates the length of the longest common subsequence. Indicates the number of path levels; Semantic vector cosine similarity : ; in, and Each represents a clause and Dense vectors generated from text using a semantic embedding model. This represents the cosine similarity function.

[0011] Preferably, in step S5, establishing the clause mapping using the bipartite graph maximum weight matching algorithm and determining the evolutionary relationship based on the composite similarity and a predefined threshold includes: Construct a bipartite graph ,in This represents the set of clause nodes for the first version. This represents the set of clause nodes for the second version. Represents the set of edges and their weights. Satisfying the relation: ; Solving the maximum weight matching problem using the bipartite graph maximum weight matching algorithm. This allows for the acquisition of a one-to-one correspondence at the clause level. Based on the matching results and similarity thresholds, evolutionary relationship determination is performed, where: The following conditions must be met to determine if the relationship is still valid: ; The conditions for determining the revision relationship are met: ; The substitution relationship is determined when: there is an explicit semantic marker or multiple old clauses match the same new clause and the subject matter is consistent; The conditions for determining whether a repeal relationship is satisfied are as follows: No match found; The conditions for determining whether a new relationship is established are met: No match found; in, This indicates that the similarity threshold will be used. This indicates the need to revise the similarity threshold. This represents the threshold for length variation.

[0012] Preferably, step S6 includes: Maintain an effective time range for each clause segment, and construct visibility determination rules by combining substitution and repeal relationships; For a given query time point Terms and Conditions The visibility satisfies the following relation: ; in, Terms and Conditions At the time of query The visibility determination result Terms and Conditions The effective time interval, Describes the set of substitution relation edges. Terms and Conditions Clause Substitution relationship Indicating alternative terms Effective date This represents the set of edges with obliterated relations. Terms and Conditions The event was abolished The relationship has ended. Indicates the repeal of the event Effective time, symbol Represents the logical AND operation, symbol Indicates the absence of a quantifier; Based on the visibility determination rules, a subset of valid clauses is filtered for a given query time point.

[0013] Preferably, step S7 includes: Output a structured tuple for each clause segment, where the tuple satisfies the following relation: ; in, Terms and Conditions Version identifier, Terms and Conditions Cross-version global identifier, Terms and Conditions Hierarchical path, Terms and Conditions The main text, Terms and Conditions The effective time interval, Terms and Conditions The set of normalized reference anchors, Terms and Conditions Historical evolution chain; Generate a resolvable persistent address for clause navigation; During the answer generation stage, results are cropped and sorted according to user query criteria, and precise evidence is attached to support review and auditing.

[0014] One of the above technical solutions has the following advantages or beneficial effects: This invention extracts layout features from line blocks through layout analysis and combines regular expression pattern recognition of numbering clues and semantic cues scores to generate a set of candidate titles and boundary positions. This effectively identifies clause boundaries under complex layouts and abnormal numbering, providing accurate candidate positions for subsequent segmentation. It integrates multi-source signals such as layout strength, numbering hit rate, semantic cues strength, and citation density, and introduces length priors and cross-page continuity constraints. A global optimization algorithm solves for the optimal boundary chain, outputting clause segments with hierarchical paths. This not only improves the accuracy of clause segmentation but also enhances robustness to complex layouts. By identifying explicit citations and standardizing them into structured anchor points, a clause-anchor bipartite graph is constructed, providing richer semantic constraints for version alignment. Simultaneously, it generates intra-version identifiers and cross-version global identifiers, enabling stable tracking of clauses across different versions and effectively solving the problem of clause untraceability due to version updates in existing technologies. In the version alignment stage, by calculating composite similarity and employing a bipartite graph maximum weight matching algorithm, it accurately determines the continuation, revision, replacement, repeal, and addition relationships of clauses, overcoming the insufficient alignment accuracy in existing technologies. Finally, by maintaining the effective time interval and combining the evolution relationship to construct visibility determination rules, the validity of any point in time or time interval can be pruned, filling the gap in the processing of the time dimension in the existing technology. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0016] Figure 1 This is a flowchart of a method for hierarchical awareness segmentation and version alignment of regulatory texts provided in an embodiment of the present invention. Detailed Implementation

[0017] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0018] In this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0019] A method for hierarchical-aware segmentation and version alignment of regulatory texts, such as... Figure 1 As shown, it includes the following steps: S1: Parse the layout of the input document to obtain multiple line blocks, extract the layout features of each line block, identify numbering clues based on predefined regular patterns, calculate semantic prompt scores, and generate a set of candidate titles and candidate boundary positions. It should be noted that layout parsing refers to the process of converting unstructured document images or electronic documents into a structured representation with geometric and reading order information. Its core lies in identifying the smallest typesetting unit in the document. A line block is the basic unit output by layout parsing, referring to a visually continuous one or more lines of text area in the document. Each line block contains the original text content and its coordinates, width, height, font attributes, and other layout geometric information on the page. Layout features are a set of quantified typesetting attributes extracted from line blocks, including but not limited to font size (a measure of character height), font weight (a numerical representation of font thickness), indentation (the pixel distance or character multiple of the left boundary of the line block relative to the page margin), and line spacing (the vertical distance between the baselines of adjacent line blocks). Regular expression patterns are a set of string matching rules defined using formal syntax, used to identify numbering structures with fixed formats in text. For example, the common chapter numbering pattern in power dispatching regulations includes the Chinese character sequence pattern "Chapter

[123] ". Number hierarchy patterns, "Appendix [AZ]" appendix identifier patterns, etc. Numbering hit rate is a binary or continuous quantitative indicator that measures the degree of matching between line block text and predefined numbering patterns. An indicator function converts the matching results into a numerical signal that can be used in calculations. Semantic cue score is a continuous score calculated based on distributed semantic representation technology, representing the similarity between line block text and typical title semantics. A pre-trained language model maps the text to a high-dimensional dense vector, and then cosine similarity is calculated to capture title semantic features that cannot be matched using regular expressions. The candidate title and candidate boundary position set refers to the set of line block indices that, after joint screening using the above multiple signals, are initially determined to be possible clause start positions or title positions, forming the search space for subsequent precise segmentation.

[0020] Understandably, existing technologies rely solely on single-number regular expression matching, which is prone to failure in complex documents such as power dispatching regulations. For example, when encountering cross-page tables that separate numbered rows from the main text, or when compound numbers like "3.4.2-1" appear, the single pattern cannot robustly identify them. This invention establishes a row block sequence through layout parsing and simultaneously extracts three types of heterogeneous evidence: layout features, numbering clues, and semantic cues. This forms a set of candidate positions in a multi-dimensional feature space, fundamentally solving the problem of a single signal source in traditional methods. Specifically, layout features capture differences in typesetting hierarchy, numbering clues provide structural priors, and semantic cues bridge the semantic gap in scenarios with abnormal or missing numbers. These three complement each other to form redundant evidence, significantly improving the recall and accuracy of candidate boundaries and providing a high-quality input foundation for subsequent global optimization.

[0021] S2: For each candidate boundary position in the candidate boundary position set, integrate layout strength, number hit rate, semantic hint score and reference density to calculate a comprehensive score, introduce length prior and cross-page continuity constraints, solve the optimal boundary chain through a global optimization algorithm, and output the clause segment with hierarchical path; It should be noted that layout strength is a quantitative value characterizing the salience of a line block as a heading. It is a probability value output by a lightweight classifier (such as logistic regression or a single-layer neural network) after weighted fusion of layout features such as font size, font weight, and indentation, reflecting the degree of visual emphasis on the heading level in the layout design. Citation density refers to the ratio of the number of explicit citation expressions detected in the window adjacent to the current candidate boundary position (such as the first 5 line blocks and the next 5 line blocks) to the total number of words in the window. It is used to capture the semantic density features of citations of other clauses within a clause. High citation density usually indicates that the area is in the body of the clause rather than the boundary position. Length prior is the knowledge of the clause length distribution obtained from the statistical analysis of training data. By expecting the clause length, it penalizes candidate paragraphs of abnormally short lengths to prevent single sentences from being mistakenly cut into independent clauses or multiple clauses from being merged. Page continuity constraints are logical rules designed to address physical breaks caused by document pagination. When a candidate boundary spans two pages, the system checks the font size, indentation continuity, and presence of "(continued)" in the last line of the previous page and the first line of the next page to determine if it's a continuation of the same clause, avoiding incorrect segmentation in the middle of tables or paragraphs across pages. Global optimization algorithms refer to a framework that uses dynamic programming or integer linear programming to solve for the boundary sequence that satisfies the constraints and maximizes the overall score on a directed acyclic graph formed by the candidate boundary positions. This ensures that the combination of the start and end points of each clause segment achieves global optimality at the entire document level, rather than local greedy optimality. Hierarchical paths are the unique positional codes of clauses in the document tree structure, represented by hierarchical numerical strings such as "chapter index / section index / article index," for example, "3 / 4 / 2" represents Chapter 3, Section 4, Article 2, providing standardized identifiers for precise addressing and structural navigation.

[0022] Understandably, by constructing a comprehensive scoring function, four heterogeneous signals—layout strength, numbering accuracy, semantic hints, and citation density—are linearly weighted, and length prior penalties and page continuity constraints are introduced, transforming the segmentation problem into a constrained global optimization problem. The dynamic programming solution mechanism ensures that the segmentation decision for each clause segment is no longer isolated but considers its connection to preceding and following clauses. For example, if a candidate position has a high comprehensive score but would cause an abnormal shortening of the preceding paragraph, the algorithm may abandon that boundary and seek a suboptimal solution to maintain global structural stability. The global perspective effectively suppresses local noise interference, significantly improving the robustness and accuracy of clause boundary recognition under complex layouts. Simultaneously, the hierarchical path output provides structural prior knowledge for subsequent version alignment, solving the technical challenge of mapping clause entities across different versions due to reordering.

[0023] S3: Identify explicit references from each of the clause segments, normalize the explicit references into structured anchors including clause paths, appendix numbers, and diagram identifiers, and construct a clause-anchor bipartite diagram based on the structured anchors; It should be noted that explicit citations refer to text fragments within the clause text that explicitly point to other knowledge units within the document using specific language patterns. Typical patterns include "see Article XXX," "see Appendix X," and "as shown in Table X," etc. These citations constitute a semantic network of connections within the document. Structured anchors are standardized, machine-resolvable identifiers of citation targets, converting citations described in natural language into locators under a unified coding system. For example, the clause path "3 / 4 / 2" represents Article 2 of Section 4 in Chapter 3, the appendix number "A-3" represents Section 3 of Appendix A, and the table identifier "Table_5" represents the fifth table. The clause-anchor bipartite graph is a binary network structure with or without authority. One set of nodes represents all clause segments, and the other set represents all referenced anchor objects. Edges represent citation relationships. This graph structure provides semantic topological constraints beyond the text surface for version alignment. Citation recognition is implemented based on predefined regular patterns. This pattern library needs to cover common citation expressions in power dispatching regulations, such as... 、 , The system employs various patterns and extracts hierarchical numbers or identifiers through named capture groups. Normalization processes include eliminating ambiguity and omissions in citations. For example, for vague citations like "the preceding provision," syntactic dependency analysis is used to determine the preceding clause and complete the hierarchical path. For indeterminate citations like "see relevant appendices," disambiguation is performed by combining the semantic similarity between the chapter theme of the clause and the appendix title, selecting the most relevant appendix as the anchor target.

[0024] Understandably, existing technologies often overlook reference relationships, relying solely on literal similarity for cross-version matching. This leads to a decrease in matching accuracy when clause content is restructured but the reference network remains relatively stable. In power dispatching regulations, the dependencies between clauses are highly stable. For example, references like "data acquisition accuracy should meet the requirements of Clause 3.2.1" persist across multiple versions. Even if the cited clause text is revised, the reference relationship itself still constitutes a strong alignment signal. By normalizing references into structured anchor points and constructing a bipartite graph, this invention achieves a computational representation of reference semantics. This allows for the evaluation of whether two clauses reference the same or semantically equivalent set of anchor points during version alignment. This identifies the evolutionary relationship of clauses where content has been significantly rewritten but functional roles remain unchanged. The alignment constraints based on reference topology effectively compensate for the shortcomings of pure text similarity in identifying logical reconstruction scenarios, improving the depth and accuracy of evolutionary relationship determination.

[0025] S4: Generate an intra-version identifier and a cross-version global identifier for each clause segment, wherein the intra-version identifier is generated based on the hierarchical path, version information, and normalized text of the clause segment, and the cross-version global identifier is generated based on text fingerprints and a subset of key anchor points; It's important to note that a Version-Inclusive Identifier (VID) is a deterministic locator that enables precise addressing of clauses within a single document version. Its design goal is to provide stable, unique, and resolvable identification capabilities within a version. Even if the clause text undergoes minor revisions, the VID should remain unchanged as long as its core semantics and location remain the same. A Global Identifier (GID) is a robust identifier that tracks the same semantic entity across multiple document versions. Its core challenge lies in resisting disturbances caused by legitimate editing, such as full-text revisions, word choice optimizations, and parameter adjustments. The GID must remain stable under moderate textual changes and only change when the semantic entity undergoes fundamental alterations. Text fingerprinting is a document summarization technique based on local feature hashing. The SimHash algorithm divides the text into k-shingles (such as 5-gram character sequences), maps each shingle to a 64-bit signature using a hash function, weights and accumulates them, and finally aggregates them bit by bit to generate a fixed-length fingerprint, exhibiting robustness to minor modifications. MinHash estimates Jaccard similarity using the minimum hash signature set, suitable for approximate deduplication scenarios. The key anchor subset is a selection of stable semantic anchors from clause reference relationships. Priority is given to anchors with low change frequency, such as term definitions, equipment numbers, and core clause references. Examples include the "dispatching agency" definition clause and the standard voltage level "500kV" in power dispatching regulations. These anchors constitute the immutable core features of semantic entities. The normalized text function performs operations such as full-width / half-width character conversion, number format standardization (Chinese numerals to Arabic numerals), page number / footnote removal, and unit standardization (e.g., unifying "kV" to "V") to eliminate the impact of non-semantic differences on identifier generation.

[0026] Understandably, VID enables precise addressing within a version, while GID enables semantic alignment across versions. This separation ensures that clause reordering only changes the VID without affecting the GID, thus maintaining the continuity of evolutionary tracing. The combination of text fingerprints and key anchors gives GID tolerance for legitimate edits. When clauses undergo textual polishing but do not change the core citation relationships, the SimHash fingerprint may change at the bit level, but the subset of key anchors remains unchanged, and the GID hash result remains stable. This ensures that same-origin clauses can still be identified during version alignment. The dual-identifier mechanism fills the fundamental gap in existing technologies where version addressing and entity tracking are not decoupled, providing a computable basis for subsequent evolutionary relationship determination and time trimming.

[0027] S5: For two versions of clause segments, calculate the composite similarity between clause pairs based on structural path similarity, anchor point overlap, edit distance similarity, word similarity, and semantic vector cosine similarity. Establish clause mapping through bipartite graph maximum weight matching algorithm, and determine the evolution relationship based on the composite similarity and predefined threshold. The evolution relationship includes continued use, revision, replacement, repeal, and addition. It's important to note that structural path similarity measures the consistency of two clauses' positions within their respective document hierarchical trees. It's quantified by calculating the ratio of the longest common subsequence length to the maximum path length, reflecting the relative stability of a clause's position within the overall structure. Even with changes in chapter numbers, similar path structure patterns still yield high scores. Citation anchor overlap is a similarity calculated using the Jaccard index based on set theory. It measures the ratio of the intersection to the union of the normalized anchor sets cited by two clauses, capturing the functional role similarity of clauses within the document's semantic network. High overlap indicates that the two clauses rely on the same knowledge units, suggesting an evolutionary relationship more likely as revision than independent addition. Edit distance similarity uses Levenshtein distance to measure character-level differences in text, converted to similarity after maximum length normalization. It's sensitive to local additions, deletions, and modifications, making it suitable for identifying minor text adjustments. Literal similarity is based on the Jaccard similarity of k-shingle (k-gram character fragments). Compared to edit distance, it focuses more on local co-occurrence features, is robust to word order changes, and is suitable for measuring content overlap. Semantic vector cosine similarity utilizes dense vectors generated by pre-trained language models (such as BERT) to calculate deep semantic consistency, capturing revision scenarios involving synonymous rewriting and semantically preserved revisions with significant literal differences. The bipartite graph maximum weight matching algorithm treats two versions of the clause set as two parts of a bipartite graph, using composite similarity as edge weights to solve for the globally optimal one-to-one match. The KM algorithm can efficiently handle clauses with a scale of thousands. Evolutionary relationship determination is a classification process based on matching results and threshold strategies. "Continue" refers to content and structure remaining largely unchanged; "Revision" refers to content adjustments but functional continuity; "Replacement" refers to new clauses explicitly replacing old clauses (usually a many-to-one mapping); "Repeal" refers to clauses from the old version being deleted in the new version; and "Addition" refers to clauses unique to the new version. These five types of relationships constitute a complete clause lifecycle state machine.

[0028] Understandably, by fusing five-dimensional similarity signals to construct a composite similarity function, where structural path similarity and anchor point overlap introduce the relative position and functional role information of two clauses within the macro-structure of the document, it compensates for the local perspective limitations of pure text similarity. The bipartite graph maximum weight matching algorithm enforces a one-to-one mapping constraint, fundamentally eliminating one-to-many and many-to-one mismatches, ensuring that each clause has exactly one best match or an unmatched state in its corresponding version. Based on this, combined with threshold hierarchical judgment and explicit semantic tag recognition (such as "replaces clause X"), it finely distinguishes five evolutionary relationships, achieving a leapfrog improvement in alignment accuracy from paragraph level to clause level, and from binary matching to multi-relationship judgment, meeting the stringent requirements of power dispatching project assessment for accurate traceability of change impacts.

[0029] S6: Maintain an effective time interval for each clause segment, and combine the substitution and repeal relationships in the evolution relationship to return a subset of valid clauses for a given query time based on the visibility determination rule; It should be noted that the effective period is the time range within which a clause is legally valid during its lifecycle. It can be obtained by parsing document metadata (such as publication date and implementation date) or an effective statement in the clause text (such as "effective from January 1, 2023"), and is represented as a closed interval. ,in Effective date The expiration time (∞ if none). Substitution refers to the evolutionary relationship where a new clause explicitly replaces an old clause; this is represented as a directed edge in a clause evolution diagram. The edge attribute is marked as "replace", indicating a clause. exist It automatically expires after taking effect. A repeal relationship refers to the evolutionary relationship where a clause is explicitly declared terminated, represented as a boundary. ,in For the event node of revocation, record the time and basis of the revocation decision. The visibility determination rule is a logical expression used to determine visibility at a given query point in time. Whether a clause should be retrieved or displayed because it is within its effective period and has not been effectively replaced or repealed is determined by a rule that incorporates the time dimension into the knowledge representation, upgrading the static clause database to a temporal knowledge database. Time interval queries not only support single time points... It also supports time ranges. The system determines relationships such as inclusion, intersection, start, and end, supporting historical version retrospectives and compliance audits. Uncertainty annotation applies a confidence score (e.g., 0.7) to time boundaries obtained through textual inference (e.g., where the expiration time is not explicitly marked), alerting the user that the time boundary may be ambiguous.

[0030] Understandably, by maintaining an effective time range for each clause and transforming substitution and repeal relationships into time-sensitive visibility rules, the validity of clauses at any historical point in time can be accurately calculated. Specifically, when querying a specific time... Falling into the terms When the effective period is within the specified range, it is also necessary to check whether there are any alternative clauses. exist Events that have been activated or deactivated exist The moment has already occurred, if it exists. Invisible. This temporal logic-based computational model enables the system to simulate the changes in the effective status of clauses over time, accurately reconstruct snapshots of historically valid clauses, greatly improving the accuracy and interpretability of compliance retrieval and risk assessment, and meeting the rigid requirements of power dispatch project assessment for timeliness of evidence chains.

[0031] S7: Output a tuple for each clause segment, the tuple including the version identifier, the cross-version global identifier, the hierarchical path, the main text, the effective time interval, the set of structured anchor points, and the evolution chain.

[0032] It should be noted that a tuple is a fixed-length structured data record format used to encapsulate the complete metadata of a clause, ensuring that the identification information, content, time, association, and historical evolution information of each clause are uniformly encoded, supporting standardized input for downstream retrieval, auditing, and question-and-answer systems. The evolution chain is a linked list structure that records the complete evolution trajectory of a clause from its initial version to the current version. Each node stores the version number, the VID within that version, the evolution relationship type (revision / replacement, etc.), and the effective time interval. Nodes are connected by pointers, forming a traceable chain of evidence, meeting the requirements for the integrity of the historical evidence chain in power dispatch project evaluation. A resolvable persistent address is a location string generated using Uniform Resource Locator (URN) syntax, allowing precise navigation within the original document, formatted as follows: Here, line-15 indicates the starting line number of the clause, allowing auditors to trace back to the specific location in the source document from the output, ensuring the verifiability of evidence. Precise evidence location involves not only returning the clause content when generating the answer but also attaching the page number, line number, and even character offset of that content in the source document. This provides verifiable physical evidence for compliance audits, avoiding the risk of untraceable answer sources. Online quality monitoring is a continuous evaluation mechanism deployed in the production environment. It collects key indicators (such as boundary stability rate, matching accuracy, substitution recognition recall rate, and time-point pruning consistency) through event tracking. When an indicator falls below a threshold, an alarm is triggered, and abnormal samples are fed back to the annotation platform for incremental model training and threshold fine-tuning, forming a data-driven continuous optimization system.

[0033] Understandably, the seven-tuple structured output assigns each clause a dual identifier (VID and GID), ensuring stable addressing and semantic tracking across any version. Hierarchical paths and body text provide content and structural information; effective time intervals and structured anchor points support temporal queries and correlation analysis; and the evolution chain fully records the historical evolution path, transforming clauses from static text into temporal knowledge entities. The online quality monitoring mechanism ensures the method's continued effectiveness in the production environment. Through a feedback loop, it dynamically adapts to changes in the format and numbering system of new regulations, avoiding the rigidity and mismatch inherent in traditional rule base methods, and achieving adaptive optimization of system performance.

[0034] Preferably, step S1 includes: The input document is parsed into a sequence of pages and line blocks. Each row block Includes the original text and its layout geometry; Extract the layout features of each line block, including font size, font weight, indentation, and line spacing; The detection of numbering and title clues is based on predefined regular expression patterns, including chapter numbering patterns and appendix numbering patterns. Calculate the number hit rate for each row block. and semantic hint score ,in: ; ; in, Indicates an indicator function, Represents line block text Does it match the predefined set of chapter number regular expression patterns? , Indicates line block The semantic vector obtained by mapping text through an embedding model This represents a pre-constructed title prototype vector. It is composed of the embedding mean or cluster centers of high-frequency title words. Represents the cosine similarity function; A set of candidate titles and candidate boundary positions is generated based on the number hit rate and semantic hint score.

[0035] It should be noted that the line block sequence refers to the sequence of text units obtained by dividing the input document by page and line block. Each line block contains the original text and its layout geometric information (such as position, font size, indentation, etc.). The layout feature refers to the visual attributes of the line block, including font size, font weight, indentation, and line spacing. These features are used to determine whether the typesetting style of the text conforms to the typical features of the title. The regular expression pattern refers to the predefined string matching rules used to identify chapter numbers and appendix numbers. For example, "\d+th chapter" is used to match chapter numbers, and "Appendix [A-Z]" is used to match appendix numbers. The number hit rate is a binary indicator function used to determine whether the line block text matches the predefined number pattern. The semantic hint score is obtained by calculating the cosine similarity between the semantic vector of the line block text and the title prototype vector, and is used to measure whether the text has the semantic features of the title. The title prototype vector is a vector composed of the embedding mean or clustering center of high-frequency title words, and is used to represent the typical title semantics.

[0036] It can be understood that traditional methods rely only on number patterns for segmentation and are prone to failure under complex layouts (such as cross-page tables and mixed footnotes) and abnormal numbers (such as compound numbers with horizontal lines). Therefore, the present invention identifies the visual features of the title by extracting the layout features (such as font size, font weight, indentation) of the line block, and at the same time uses regular expression patterns to detect number clues to ensure that structured numbers can be accurately identified. In addition, by calculating the semantic hint score, the system can identify text blocks that have the semantics of the title even without explicit numbers, thus providing supplementary evidence in the case of missing or abnormal numbers. This multi-dimensional feature extraction mechanism makes the identification of candidate titles no longer rely on a single signal, enhancing the robustness and accuracy of clause boundary recognition.

[0037] Preferably, the calculated comprehensive score satisfies the relationship: ; Where, represents the comprehensive boundary score of the candidate boundary position , represents a non-negative weight coefficient that can be learned or preset, represents the position corresponding to the probability that the line block belongs to the title, represents the number hit rate, represents the semantic hint score, represents the cross-clause citation density score, represents the unreasonable length penalty term; satisfies the relationship: ; Where, represents the total number of characters covered from the previous selected boundary position to the current position ​ Indicates the expected length of the terms; Satisfying the relation: ; in, Indicates line block eigenvectors, This includes layout features, text length, and positional context information. This represents the parameter vector of the classifier. This represents the sigmoid activation function.

[0038] It should be noted that the comprehensive boundary score It is a candidate position in the quantitative evaluation document. As a unified scalar indicator of the credibility of clause boundaries, this indicator integrates four types of positive evidence (format strength, numbering accuracy, semantic cues, and citation density) using a linear weighting method, while deducting length penalties. A higher score indicates that the location is more suitable as a clause segmentation point. Weighting coefficients It is a non-negative real number that regulates the contribution ratio of each evidence component. It can be learned on a labeled dataset through an end-to-end backpropagation algorithm, or it can be preset by domain experts based on experience. Essentially, it is a parameterized expression of the model for the credibility of different signals. (Title probability) It is a line block The posterior probability of being classified as a title, output by a lightweight binary classification model, is used to capture the joint discriminative power of visual cues such as font size, font weight, and indentation in layout features. Cross-clause citation density score. This score measures the frequency of explicit citations near candidate boundaries. It is obtained by counting and normalizing the number of matches for citation patterns such as "the XXXth citation" within the nearest window. Its technical purpose is to distinguish between header lines and body text lines, as the citation density is typically lower near headers and higher in the body text. (Unreasonable length penalty item) It is a regularization term that determines whether the length of the constraint clause paragraph conforms to the prior distribution, using the absolute relative deviation form, when the candidate paragraph length Deviation from expected length The penalty increases linearly with time, forcing the algorithm to avoid cutting out abnormally short or long segments. Expected clause length. This is prior knowledge derived through statistical analysis of large-scale labeled corpora, typically set as the median or mean length of power regulations clauses. Its technical function is to embed domain knowledge to improve the rationality of segmentation. Feature vector It is a line block The vectorized representation integrates multi-source heterogeneous features, including continuous and discrete features such as font size, weight level, indentation pixel value, line spacing multiple, whether it is the first line of the page, and distance from the preceding title. These features are then one-hot encoded or normalized to form a fixed-length vector, which serves as the input to the classifier. (Classifier parameter vector) These are trainable weights for logistic regression or neural networks. Each dimension corresponds to the weight of a feature in the feature vector, and their values ​​are learned by maximizing the log-likelihood loss function, representing the contribution of each feature to title discrimination. (Sigmoid activation function) linear combination Mapped to Probability intervals provide interpretable probability outputs.

[0039] Understandable, The synergistic effect of four types of evidence—format, numbering, semantics, and citation—is explicitly modeled through a weighted summation mechanism, with weighting coefficients... to The introduction of this feature enables the model to adapt to different document styles, such as in documents with clear numbering. It can automatically increase to enhance the weight of the numbering signal in manuals with disordered numbering. This can improve the reliance on semantic clues. Title probability The introduction of this feature transforms layout features from hard rules to soft probabilities, avoiding misjudgments of complex layouts by fixed thresholds. (Citation density score) The innovation lies in using semantic association signals inversely for boundary detection, leveraging the dense citations in the body text and sparse citations in the title region to provide additional discriminative power. (Length penalty term) The design embodies the concept of global constraints, and a single When a high score leads to an abnormal paragraph length, the penalty term inhibits the selection of this boundary, forcing the algorithm to find a more reasonable segmentation scheme with a reasonable length distribution across the entire document. This fundamentally overcomes the local optimum problem caused by the greedy segmentation of traditional methods. The use of the sigmoid classifier realizes the leap from manual rules to data-driven approaches, with parameters... The model can be trained to capture implicit layout patterns in header lines of electrical regulations, such as special indentation or line spacing that some enterprise standards may use. The model can learn these patterns automatically rather than relying on manual enumeration.

[0040] Preferably, the output clause segment with hierarchical path includes: For each line block identified as a header, predict its hierarchical label. Sequence labeling is performed using linear chain conditional random fields or Viterbi decoding, with the optimization objective being: ; in, This represents the optimal hierarchical label sequence. Indicates line block The emission feature vector, Including numbering structure, semantic vectors, and layout features. This indicates the emission parameters for the corresponding level label. Represents the transfer constraint function. Used to encode legal hierarchical jump rules and to impose negative penalties for page breaks or hierarchical inversions; The global optimal boundary sequence is solved using dynamic programming, satisfying the following relation: ; in, Indicated by position The score is accumulated for the optimal splitting path at the end. Indicates the position of the previous candidate boundary. This represents the overlap penalty coefficient. Indicates position and Measurement of text or page overlap; By backtracking Find the optimal path and output the clause segment with hierarchical path.

[0041] It should be noted that hierarchical tags This refers to the row block. The predicted hierarchy category, with values ​​ranging from the discrete set {"chapter", "section", "item", "clause", "item"}, represents the hierarchy depth of the line block within the document's tree structure. For example, "chapter" corresponds to the highest level, and "item" corresponds to the finest-grained level. Linear-chain conditional random fields (CRFs) are probabilistic graphical models for sequence labeling. By modeling the dependencies between adjacent labels, they ensure that the output label sequence satisfies legality constraints. Viterbi decoding is a commonly used dynamic programming algorithm for CRF model inference, used to efficiently solve for the optimal sequence in an exponentially large label sequence space. Sequence labeling refers to the task of assigning labels to each element in a sequence; here, it's used to assign hierarchy labels to header line blocks in a document. Emit feature vectors. It describes the line block The high-dimensional vector of observed features, including numbering structure (e.g., digit sequence depth), semantic vectors, and layout features (e.g., font size, font weight), serves to provide evidence for hierarchical classification. Emission parameters. It is related to hierarchical tags The corresponding weight vector, learned from the training data, is used to map emission features to label scores. (Transition constraint function) This function encodes the legal transition rules between adjacent level tags. For example, "Chapter → Section → Article → Clause → Item" is a legal forward transition, while backward transitions such as "Article → Chapter" or "Item → Section" are penalized negatively. Furthermore, cross-page breaks (such as an "Article" at the end of a page and an "Article" at the beginning of the next page) are also handled in this function. Dynamic programming is an algorithmic paradigm that decomposes a problem into overlapping subproblems and caches intermediate results to find the global optimum; here, it is used to solve for the optimal boundary sequence. Optimal Boundary Sequence This represents the cumulative maximum score ending at document position j, where B is the set of candidate boundary positions. (Overlap penalty coefficient) It is a hyperparameter that controls the strength of cross-page continuity constraints. The larger the value, the heavier the penalty for overlapping areas. The function measures the degree of text or page overlap between positions i and j. For example, it returns a high overlap value when a table spans multiple pages, prompting the system to avoid splitting the table within itself.

[0042] Understandably, linear chain CRF or Viterbi decoding, based on header line recognition, further predicts hierarchical labels, expanding the binary judgment of "whether it is a header" to a multi-level classification of "which level it belongs to," and enforces the legality of the hierarchical order through transition constraint functions. For example, when the algorithm incorrectly labels the block after "5.3.1" as "chapter," the transition potential will impose a huge negative penalty for violating the "article → chapter" transition rule, causing this labeling path to be eliminated in the global optimization, thus ensuring the grammatical correctness of the hierarchical path. Dynamic programming to solve the boundary sequence achieves the global optimum of paragraph segmentation, complementing the sequence labeling of CRF: CRF solves the label allocation at the block level, while dynamic programming solves the selection of the start and end points at the paragraph level. An overlap penalty term is introduced into the state transition equation. The model directly addresses the physical breakage issues caused by complex layouts such as cross-page headers and mixed footnotes, when candidate boundary conditions are met. With the previous boundary Overlapping on the page (e.g.) Located inside the table and (For the table header), the overlap metric function returns a positive value, significantly reducing the total score of this transition path. This forces the algorithm to skip the table area and search for the true paragraph boundary, explicitly modeling the layout overlap mechanism. This makes the segmentation decision no longer solely dependent on text content but linked to the physical layout structure, greatly improving the robustness of segmentation under complex layouts. Finally, through backtracking... The clause segments obtained by the optimal path not only have accurate boundaries, but each clause segment also carries a valid hierarchical path code, providing a structured positional prior for subsequent version alignment.

[0043] It is understandable that hierarchical label prediction is modeled as a sequence decision process using sequence labeling models (CRF or Viterbi), with the transfer constraint function... The rules for legal transitions between levels are explicitly encoded to ensure that the output tag sequence conforms to the hierarchical logic of "chapter → section → clause → item," and penalties are imposed on abnormal patterns such as page breaks and hierarchical inversions, thereby guaranteeing the continuity and legality of the hierarchical structure. Meanwhile, when dynamically programming to solve for the optimal boundary sequence, the overall score is considered. It integrates signals from multiple sources, including layout, numbering, semantics, and citations, and uses an overlap penalty term. This mechanism suppresses erroneous segmentation caused by cross-page tables, footnotes, and other areas. The synergistic effect of boundary optimization and hierarchical annotation is reflected in the fact that the boundary position determines which row blocks enter the input sequence of the sequence annotation, while the legality constraints of the hierarchical annotation, in turn, affect the choice of boundaries. For example, during dynamic programming backtracking, if a boundary causes subsequent sequences to fail to meet transition constraints or incur excessive penalties, that boundary will be replaced by a better path. This two-way constraint mechanism ensures that the final output clauses simultaneously meet the triple requirements of accurate boundaries, legal hierarchy, and stable structure, providing high-quality input data for subsequent version alignment.

[0044] Preferably, step S3 includes: Identify explicit references in each of the aforementioned clauses, including references to other clauses, references to appendices, and references to tables or figures; The identified explicit references are normalized into structured anchors, and the normalized set of anchors satisfies the following relation: ; in, Terms and Conditions The set of normalized anchor points Indicates the hierarchical path of the cited clause. Indicates the standardization number of the cited appendix. A unique identifier for the referenced table or chart; Based on the aforementioned structured anchor point construction clause - anchor point bipartite diagram ,in Represents the set of clause nodes. Represents the set of anchor nodes. This represents the set of edges with reference relationships.

[0045] It should be noted that explicit reference refers to language expressions in the text of a clause that use clear identifiers to point to other content units within the document. Typical forms include three categories: references to other clauses (such as "see Clause 3.4.2" or "pursuant to Article 5, paragraph 3"), references to appendices (such as "see Appendix A" or "see Appendix B.1"), and references to tables or figures (such as "see Table 2" or "see..."). Figure 1 As shown in the image. This refers to an encoded string that identifies the position of the cited clause in the document hierarchy tree. It is represented by a number hierarchy structure, such as "3 / 4 / 2" which represents the second clause in Section 4 of Chapter 3. Its purpose is to provide precise target location for citation relationships. It refers to the standardized identifier in the appendix section of a regulatory document, usually a sequence of uppercase letters (such as "A", "B-1"), used to uniquely identify appendix entries. This refers to a unique identifier for a table or figure, such as "Table_2" or "Fig_1," generated through caption parsing and position correction, used to accurately locate the text and image content. Structured anchors refer to the transformation of original cited text (such as "see above" or "relevant regulations") into a standardized, machine-computable format, containing... Structured data objects with fields such as "clause" and "anchor". A clause-anchor bipartite graph is an undirected bipartite graph consisting of two independent vertex sets, C (clause node set) and A (anchor node set), and an edge set E (reference relationships). Here, edge e∈E indicates that clause c∈C references anchor point a∈A. This graph structure is used for the calculation of reference consistency constraints in the subsequent alignment stage. Inverse completion refers to the process of reasoning and restoring incomplete and ambiguous references (such as "see above") using the hierarchical path of the clause, the semantics of the adjacent context, and the caption information on the same page.

[0046] Understandably, in power dispatching regulations, the citation relationships between clauses are a crucial basis for measuring the strength of their semantic connections. For example, the statement "data acquisition accuracy should meet the requirements of clause 3.4.2" clearly establishes a dependency relationship between the current clause and the cited clause. Through explicit citation identification, the system can capture the semantic network structure between clauses, linking disparate text paragraphs into an organic whole. Standardized anchor point construction transforms natural language citations into structured data, eliminating ambiguity caused by vague expressions such as "this clause" and "the aforementioned provisions," making cross-version citation comparison possible. The construction of a clause-anchor point bipartite graph formalizes this citation relationship into a graph structure. During version alignment, graph algorithms can be used to calculate the overlap of citation anchor points, i.e., comparing whether two clauses cite the same clause path or appendix, thus providing structural similarity evidence independent of the literal text. This citation-based semantic constraint can effectively distinguish clauses with similar content but different functions (such as general description clauses and implementing rules clauses), improving the precision of alignment. Meanwhile, the anti-completion mechanism for fuzzy references ensures the integrity of the reference chain through hierarchical path reasoning ("previous clause" refers to the clause at the same level preceding the current clause) and contextual semantic matching, thus avoiding reference breaks that could affect alignment quality.

[0047] Preferably, step S4 includes: The identifiers within the specified version satisfy the following relation: ; in, Terms and Conditions Version identifier, Terms and Conditions Hierarchical path, Indicates the current document version number. This represents a text normalization function. Terms and Conditions The original text, Represents a cryptographic hash function, symbol This represents a string concatenation operation; The cross-version global identifier satisfies the following relation: ; in, Terms and Conditions Cross-version global identifier, Terms and Conditions Text fingerprint, Indicates from the terms The subset of key anchor points extracted from the normalized set of anchor points.

[0048] Preferably, in step S5, for the two versions of the clause segment set, the composite similarity between the clause pairs is calculated based on structural path similarity, anchor point overlap, edit distance similarity, literal similarity, and semantic vector cosine similarity, including: Terms and conditions Composite similarity The following relation is satisfied: ; in, Terms and Conditions With Terms The composite similarity score between them Indicates non-negative weight coefficients. Indicates an indicator function, and Each represents a clause and Cross-version global identifier; Terms and conditions The sub-item similarity includes: Literal similarity : ; in, and Each represents a clause and The original text, Indicates to performing text processing The set obtained after shingle partitioning; Normalized edit distance similarity : ; in, Indicates the Levenshtein edit distance. and Each represents a clause and The length of the text characters; Reference anchor point overlap : ; in, and Each represents a clause and The set of normalized anchor points; Hierarchical path similarity : ; in, and Each represents a clause and Hierarchical path, Indicates the length of the longest common subsequence. Indicates the number of path levels; Semantic vector cosine similarity : ; in, and Each represents a clause and Dense vectors generated from text using a semantic embedding model. This represents the cosine similarity function.

[0049] It should be noted that composite similarity is a weighted linear combination of six sub-similar similarities, used to comprehensively evaluate the similarity between two clauses across multiple dimensions, including lexical, structural, semantic, and citation networks. Structural path similarity... The Longest Common Subsequence (LCS) algorithm is used to calculate the proportion of shared prefixes between two hierarchical paths, reflecting the consistency of the terms' positions in the document outline. For example, the LCS of paths "3 / 4 / 2" and "3 / 5 / 2" is "3". This indicates that they both belong to Chapter 3 but are in different sections. (Anchor point overlap) The overlap of two clauses' normalized anchor sets is calculated based on the Jaccard coefficient. If both clauses reference the same clause path or appendix, then... A value close to 1 indicates functional relevance. Normalized edit distance similarity. Measure the character-level differences of texts through the Levenshtein algorithm and normalize them to the interval [0, 1]. It is sensitive to local modifications (such as changing "should" to "must", "not less than" to "should be greater than or equal to"), but the impact on the overall similarity is controllable. Lexical similarity Use k-shingle (usually k = 5) to segment the text into a set of character or word sequences, and calculate the ratio of the intersection to the union of the sets. It is robust to word order changes and local additions and deletions. Semantic vector cosine similarity Use a pre-trained language model (such as BERT or Sentence-BERT) to generate 768-dimensional dense vectors, and calculate the angle between the vectors through the cosine function to capture deep semantic consistency. Even if the text expressions are different but the meanings are similar, high scores can be obtained. GID strong constraint term It means that when the cross-version global identifiers of two clauses are the same, the value of the indicator function is 1 and a large weight is applied , ensuring that core semantic entities obtain priority alignment in matching. Weight coefficient Are all non-negative values, determined by tuning through the validation set or end-to-end learning, and are used to regulate the contribution ratio of each item in the composite similarity.

[0050] It can be understood that by constructing a six-dimensional composite similarity function, multi-source evidence such as lexical, structural, semantic, and citation network is integrated: Lexical similarity and edit distance similarity capture the degree of literal changes in the text from the character and substring levels; Structural path similarity uses the LCS ratio of the hierarchical path to reflect the position offset of the clause in the document outline, avoiding mismatches caused by renumbering; Citation anchor coincidence is based on the previously constructed semantic network to measure the functional consistency of clauses in the citation relationship, effectively distinguishing clauses with different functional positions; Semantic vector cosine similarity deeply understands professional semantics such as metric caliber and conditional constraints in the power dispatching scenario through a pre-trained language model, and can still maintain high scores even when the expressions change but the semantics are consistent; The GID strong constraint term uses the stability of the cross-version global identifier to apply a priority matching weight to the core semantic entity, fundamentally eliminating one-to-many or many-to-one mismatches. This multi-factor joint modeling mechanism upgrades the version alignment from a comparison of surface similarities of texts to an intelligent matching that integrates multiple dimensions of structure, semantics, function, and identification, and can accurately identify the evolutionary relationships of homologous clauses, providing a refined similarity basis for subsequent evolutionary relationship determination.

[0051] Preferably, in step S5, establishing clause mapping through the maximum weight matching algorithm of the bipartite graph and determining the evolutionary relationship based on the composite similarity and a predefined threshold includes: Construct a bipartite graph , where represents the set of clause nodes in the first version, represents the set of clause nodes in the second version, Represents the set of edges and their weights. Satisfying the relation: ; Solving the maximum weight matching problem using the bipartite graph maximum weight matching algorithm. This allows for the acquisition of a one-to-one correspondence at the clause level. Based on the matching results and similarity thresholds, an evolutionary relationship determination is performed, where: The following conditions must be met to determine if the relationship is still valid: ; The conditions for determining the revision relationship are met: ; The substitution relationship is determined when: there is an explicit semantic marker or multiple old clauses match the same new clause and the subject matter is consistent; The conditions for determining whether a repeal relationship is satisfied are as follows: No match found; The conditions for determining whether a new relationship is established are met: No match found; in, This indicates that the similarity threshold will be used. This indicates the need to revise the similarity threshold. This represents the threshold for length variation.

[0052] It should be noted that bipartite graph This refers to an undirected graph formed by treating the two sets of terms as the left and right vertex sets, respectively, where each vertex represents a term and the edges... Connect the left vertex and right vertex This indicates that there is a possibility of a match between the two clauses; the graph structure inherently restricts matching to only between different versions. Edge weights It is a measure clause and The numerical value of similarity is directly adopted here using composite similarity. As weights, terms with higher similarity are given higher priority in matching. The maximum weight matching algorithm for bipartite graphs specifically refers to the Hungarian algorithm (Kuhn-Munkres algorithm), which is a method... A polynomial algorithm for finding the maximum weight perfect matching in a bipartite graph with time complexity. Its core idea is to progressively expand the matching using a labeling function and equal subgraphs, ensuring that the final matching M is the globally optimal solution with the maximum sum of edge weights. (Maximum weight matching) It is the set of edges output by the algorithm, satisfying each clause in The clause appears at most once, ensuring a one-to-one constraint for matching and fundamentally eliminating one-to-many mismatches that are prone to occur in traditional methods. Evolutionary relationship determination is based on the matching results and preset thresholds, classifying clause pairs into logical rules of continuation, revision, replacement, repeal, or addition. (Continuation threshold...) This is a high similarity threshold used to identify clause pairs whose text has remained virtually unchanged. Revision threshold. This is a medium similarity threshold used to distinguish between revisions and replacements / repeal. (Length variation threshold) This is used to measure relative changes in text length, preventing misjudgments caused by significant additions or deletions. Additionally, the final output is a clause evolution diagram. , where nodes For all versions of the terms, edge Label relation type It supports version evolution tracking and compliance auditing.

[0053] Understandably, version alignment is modeled as a global optimization problem by constructing a bipartite graph: each clause pair serves as a candidate matching edge, with edge weights reflecting multi-dimensional similarity. The Hungarian algorithm solves for the match with the maximum weight sum globally, ensuring that each clause obtains a unique optimal counterpart, fundamentally eliminating structural mismatches. After matching, a refined judgment is made based on composite similarity values ​​and preset thresholds: high similarity with minimal length changes indicates continued use, signifying stable clause content; medium similarity or detected unit / threshold changes indicate revision, reflecting technical indicator adjustments but continued clause function; explicit marking "replaces Article X" or multiple old clauses matching the same new clause with consistent themes indicate replacement, reflecting functional merging or restructuring; unmatched source version clauses are deemed obsolete, and unmatched target version clauses are deemed new, accurately depicting the complete lifecycle of version evolution. This mechanism, combining global optimal matching with threshold-based judgment, elevates version alignment from local similarity comparison to structured, interpretable evolutionary relationship identification, meeting the requirements of power dispatching regulation audits for precise labeling of change types.

[0054] Preferably, it should be noted that the effective time interval This refers to the closed interval within which the clause has legal effect. ,in The effective date (usually obtained from parsing "effective from YYYY year MM month DD" in the clause text or from document metadata). This is the expiration time (+∞ if not explicitly repealed), and this interval serves as the time basis for determining whether a clause is valid at a specific point in time. Set of substitution relationship edges. This refers to the directed edge where an old clause is replaced by a new clause during version evolution. A set representing terms The functions are provided by Succession, usually accompanied by a transition in the effective date. Its function is to provide a "substitution equals invalidation" constraint for visibility determination. Deprecated relation edge set. This refers to a directed edge where the clause is explicitly repealed. The set of, where For events involving the cancellation of rights, record the effective date of the cancellation. Its function is to provide a "repealed means invalid" constraint for visibility determination. Visibility Determination Rules It is a Boolean function This rule explicitly encodes the three necessary conditions for the validity of a clause through logical expressions: time inclusion, non-coverage by substitution, and non-coverage by repeal, ensuring that clause c at query time T satisfies that T falls within its effective period, has not been substituted prematurely, and has not been repealed prematurely. Query time T refers to a specific time point (e.g., "2023-07-15 10:30:00") or time interval specified by the user. (e.g., "Q3 2023") is an input parameter for visibility determination. The valid subset of clauses refers to the set of all clauses that satisfy the visibility determination rules at the time of query or within the specified period, and is a direct answer for compliance retrieval and risk assessment.

[0055] Understandably, this can be achieved by maintaining an effective time interval for each clause and constructing alternative relationship edges based on the S5 determination. And the relationship with repeal This forms a computable time evolution graph. The visibility determination rules explicitly encode the three necessary conditions for clause validity through logical expressions: time inclusion, substitution coverage, and repeal coverage. When querying at time point T, the system iterates through all clauses and filters those that meet the requirements. A subset of the time interval ensures that the returned results accurately reflect the true regulatory status at that point in time. For time interval queries, the system extends the judgment logic to: the existence of at least one sub-interval that makes the clauses continuously visible, and supports fine-grained judgment of interval relationships (such as complete inclusion or partial overlap). This design, which incorporates the time dimension into the core data structure, enables the system to support validity pruning by point in time or interval, filling the gap in existing technology regarding timeliness consistency assurance, and providing verifiable and accurate time answers for regulatory Q&A and project evaluation.

[0056] Preferably, step S7 includes: Output a structured tuple for each clause segment, where the tuple satisfies the following relation: ; in, Terms and Conditions Version identifier, Terms and Conditions Cross-version global identifier, Terms and Conditions Hierarchical path, Terms and Conditions The main text, Terms and Conditions The effective time interval, Terms and Conditions The set of normalized reference anchors, Terms and Conditions Historical evolution chain; Generate a resolvable persistent address for clause navigation; During the answer generation stage, results are cropped and sorted according to user query criteria, and precise evidence is attached to support review and auditing.

[0057] It should be noted that structured tuples refer to encapsulating the multi-dimensional information of a clause into standardized data records. ,in and It is the double identifier generated in step S4. It is the code of the clause in the document tree (such as "3 / 5 / 1"). The original text of the terms and conditions. The effective time interval maintained in step S6 The normalized anchor point set constructed in step S3, The historical timeline string generated in step S5 serves as the system's final knowledge representation of the terms, supporting downstream compliance retrieval and auditing applications. The resolvable persistent address is based on... The constructed Uniform Resource Name (URN) has the following format: This can be parsed by the document browser and redirected to the precise location of the clause. Query conditions refer to the search constraints entered by the user, including time points, keywords, clause numbers, etc. The system filters and sorts the tuple set based on these conditions during the answer generation stage. Evidence location refers to the verifiable information provided by each field in the tuple, including the text source page number and line number, citation anchor, effective period, historical evolution chain, etc., ensuring that every output can be traced back to the original text. The historical evolution chain `lineage(c)` records the evolution trajectory of the clause across multiple versions in string form, for example... .

[0058] Understandably, the seven-tuple structure encapsulates the current state (VID, GID, path, text), spatiotemporal attributes (effective period), semantic relationships (anchor set), and historical evolution (evolutionary chain) of a clause, forming a complete knowledge representation of the clause. In particular, the dual-identifier design of VID and GID enables the system to support both precise intra-version jumps (generating URNs via VID) and cross-version tracking (associating multiple version instances via GID). The resolvable persistent address mechanism allows external systems (such as compliance question-and-answer engines) to directly locate the original clause text, while evidence location information provides a traceable source for each output, ensuring the interpretability and verifiability of the answers. This structured output design meets the stringent requirements of accuracy, traceability, and the completeness of the evidence chain in power dispatch project evaluation.

[0059] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

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

Claims

1. A method for hierarchical-aware segmentation and version alignment of regulatory texts, characterized in that, Includes the following steps: S1: Parse the layout of the input document to obtain multiple line blocks, extract the layout features of each line block, identify numbering clues based on predefined regular patterns, calculate semantic prompt scores, and generate a set of candidate titles and candidate boundary positions. S2: For each candidate boundary position in the candidate boundary position set, integrate layout strength, number hit rate, semantic hint score and reference density to calculate a comprehensive score, introduce length prior and cross-page continuity constraints, solve the optimal boundary chain through a global optimization algorithm, and output the clause segment with hierarchical path; S3: Identify explicit references from each of the clause segments, normalize the explicit references into structured anchors including clause paths, appendix numbers, and diagram identifiers, and construct a clause-anchor bipartite diagram based on the structured anchors; S4: Generate an intra-version identifier and a cross-version global identifier for each clause segment, wherein the intra-version identifier is generated based on the hierarchical path, version information, and normalized text of the clause segment, and the cross-version global identifier is generated based on text fingerprints and a subset of key anchor points; S5: For two versions of clause segments, calculate the composite similarity between clause pairs based on structural path similarity, anchor point overlap, edit distance similarity, word similarity, and semantic vector cosine similarity. Establish clause mapping through bipartite graph maximum weight matching algorithm, and determine the evolution relationship based on the composite similarity and predefined threshold. The evolution relationship includes continued use, revision, replacement, repeal, and addition. S6: Maintain an effective time interval for each clause segment, and combine the substitution and repeal relationships in the evolution relationship to return a subset of valid clauses for a given query time based on the visibility determination rule; S7: Output a tuple for each clause segment, the tuple including the version identifier, the cross-version global identifier, the hierarchical path, the main text, the effective time interval, the set of structured anchor points, and the evolution chain.

2. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 1, characterized in that, Step S1 includes: The input document is parsed into a sequence of pages and line blocks. Each row block Includes the original text and its layout geometry; Extract the layout features of each line block, including font size, font weight, indentation, and line spacing; The detection of numbering and title clues is based on predefined regular expression patterns, including chapter numbering patterns and appendix numbering patterns. Calculate the number hit rate for each row block. and semantic hint score ,in: ; ; in, Indicates an indicator function, Represents line block text Does it match the predefined set of chapter number regular expression patterns? , Indicates line block The semantic vector obtained by mapping text through an embedding model This represents a pre-constructed title prototype vector. It is composed of the embedding mean or cluster centers of high-frequency title words. Represents the cosine similarity function; A set of candidate titles and candidate boundary positions is generated based on the number hit rate and semantic hint score.

3. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 1, characterized in that, The overall score is calculated according to the following relationship: ; in, Indicates candidate boundary position The overall boundary score, This represents learnable or preset non-negative weight coefficients. Indicates position The probability that the corresponding line block belongs to the title. Indicates the hit rate of the number. Indicates the semantic prompt score, Indicates the cross-clause citation density score. This indicates a penalty for unreasonable length. Satisfying the relation: ; in, This indicates the distance from the previous selected boundary position to the current position. The total number of characters covered Indicates the expected length of the terms; Satisfying the relation: ; in, Indicates line block eigenvectors, This includes layout features, text length, and positional context information. This represents the parameter vector of the classifier. This represents the sigmoid activation function.

4. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 3, characterized in that, The output clause segment with hierarchical path includes: For each line block identified as a header, predict its hierarchical label. Sequence labeling is performed using linear chain conditional random fields or Viterbi decoding, with the optimization objective being: ; in, This represents the optimal hierarchical label sequence. Indicates line block The emission feature vector, Including numbering structure, semantic vectors, and layout features. This indicates the emission parameters for the corresponding level label. Represents the transfer constraint function. Used to encode legal hierarchical jump rules and to impose negative penalties for page breaks or hierarchical inversions; The global optimal boundary sequence is solved using dynamic programming, satisfying the following relation: ; in, Indicated by position The score is accumulated for the optimal splitting path at the end. Indicates the position of the previous candidate boundary. This represents the overlap penalty coefficient. Indicates position and Measurement of text or page overlap; By backtracking Find the optimal path and output the clause segment with hierarchical path.

5. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 1, characterized in that, Step S3 includes: Identify explicit references in each of the aforementioned clauses, including references to other clauses, references to appendices, and references to tables or figures; The identified explicit references are normalized into structured anchors, and the normalized set of anchors satisfies the following relation: ; in, Terms and Conditions The set of normalized anchor points Indicates the hierarchical path of the cited clause. Indicates the standardization number of the cited appendix. A unique identifier for the referenced table or chart; Based on the aforementioned structured anchor point construction clause - anchor point bipartite diagram ,in Represents the set of clause nodes. Represents the set of anchor nodes. This represents the set of edges with reference relationships.

6. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 1, characterized in that, Step S4 includes: The identifiers within the specified version satisfy the following relation: ; in, Terms and Conditions Version identifier, Terms and Conditions Hierarchical path, Indicates the current document version number. This represents a text normalization function. Terms and Conditions The original text, Represents a cryptographic hash function, symbol This represents a string concatenation operation; The cross-version global identifier satisfies the following relation: ; in, Terms and Conditions Cross-version global identifier, Terms and Conditions Text fingerprint, Indicates from the terms The subset of key anchor points extracted from the normalized set of anchor points.

7. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 1, characterized in that, In step S5, for the two versions of the clause segment set, the composite similarity between the clause pairs is calculated based on structural path similarity, anchor point overlap, edit distance similarity, literal similarity, and semantic vector cosine similarity, including: Terms and conditions Composite similarity The following relation is satisfied: ; in, Terms and Conditions With Terms The composite similarity score between them Indicates non-negative weight coefficients. Indicates an indicator function, and Each represents a clause and Cross-version global identifier; Terms and conditions The sub-item similarity includes: Literal similarity : ; in, and Each represents a clause and The original text, Indicates to performing text processing The set obtained after shingle partitioning; Normalized edit distance similarity : ; in, Indicates the Levenshtein edit distance. and Each represents a clause and The length of the text characters; Reference anchor point overlap : ; in, and Each represents a clause and The set of normalized anchor points; Hierarchical path similarity : ; in, and Each represents a clause and Hierarchical path, Indicates the length of the longest common subsequence. Indicates the number of path levels; Semantic vector cosine similarity : ; in, and Each represents a clause and Dense vectors generated from text using a semantic embedding model. This represents the cosine similarity function.

8. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 7, characterized in that, In step S5, the clause mapping is established using the bipartite graph maximum weight matching algorithm, and the evolutionary relationship is determined based on the composite similarity and a predefined threshold, including: Construct a bipartite graph ,in This represents the set of clause nodes for the first version. This represents the set of clause nodes for the second version. Represents the set of edges and their weights. Satisfying the relation: ; Solving the maximum weight matching problem using the bipartite graph maximum weight matching algorithm. This allows for the acquisition of a one-to-one correspondence at the clause level. Based on the matching results and similarity thresholds, an evolutionary relationship determination is performed, where: The following conditions must be met to determine if the relationship is still valid: ; The conditions for determining the revision relationship are met: ; The substitution relationship is determined when: there is an explicit semantic marker or multiple old clauses match the same new clause and the subject matter is consistent; The conditions for determining whether a repeal relationship is satisfied are as follows: No match found; The conditions for determining whether a new relationship is established are met: No match found; in, This indicates that the similarity threshold will be used. This indicates the need to revise the similarity threshold. This represents the threshold for length variation.

9. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 1, characterized in that, Step S6 includes: Maintain an effective time range for each clause segment, and construct visibility determination rules by combining substitution and repeal relationships; For a given query time point Terms and Conditions The visibility satisfies the following relation: ; in, Terms and Conditions At the time of query The visibility determination result Terms and Conditions The effective time interval, Describes the set of substitution relation edges. Terms and Conditions Clause Substitution relationship Indicating alternative terms Effective date This represents the set of edges with obliterated relations. Terms and Conditions The event was abolished The relationship has ended. Indicates the repeal of the event Effective time, symbol Represents the logical AND operation, symbol Indicates the absence of a quantifier; Based on the visibility determination rules, a subset of valid clauses is selected for a given query time point.

10. The method for hierarchical-aware segmentation and version alignment of regulatory texts according to claim 1, characterized in that, Step S7 includes: Output a structured tuple for each clause segment, where the tuple satisfies the following relation: ; in, Terms and Conditions Version identifier, Terms and Conditions Cross-version global identifier, Terms and Conditions Hierarchical path, Terms and Conditions The main text, Terms and Conditions The effective time interval, Terms and Conditions The set of normalized reference anchors, Terms and Conditions Historical evolution chain; Generate a resolvable persistent address for clause navigation; During the answer generation stage, results are cropped and sorted according to user query criteria, and precise evidence is attached to support review and auditing.

Citation Information

Cited By

  • Railway safety production regulation compliance evaluation method and system based on large model

    CN122390939A