A method for retrieving and intelligently matching regulatory texts based on semantic understanding
Patent Information
- Application Number
- CN202611376485.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-10-27
AI Technical Summary
仅根据文本相似度返回法规条款,无法判断检索基准日期对应的有效版本,也难以处理一般法规条款与特别法规条款、正文条款与附件条款以及不同效力层级法规条款之间的适用冲突
[0018]本发明的有益效果是:与现有技术相比,本发明按照法规文本层级和语义完整性对法规正文、章节、条款、款项及附件进行划分,并提取规范对象、规范行为、适用条件、限制阈值、例外条件和引用关系,构建关联法规层级路径、法规版本属性及原始法规位置的法规语义单元集合。该方式能够保留法规条款的上下文语义和层级限定关系,减少因固定长度切分、标题缺失或上下文分离造成的语义偏差,为法规检索与智能匹配提供结构清晰且语义完整的数据基础。
Smart Images

Figure CN122986014A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and intelligent information retrieval technology, specifically to a method for legal text retrieval and intelligent matching based on semantic understanding. Background Technology
[0002] As regulatory systems across industries continue to improve, the number of regulatory documents, including the main text of regulations, regulatory appendices, implementation notices, revision announcements, and industry technical specifications, continues to increase. These different documents also exhibit relationships of citation, supplementation, substitution, repeal, and version updates. During product development, compliance review, safety assessment, and document filing, companies need to sift through a large number of regulatory texts to find corresponding clauses and determine their applicability based on product category, raw material properties, usage methods, applicable regions, and the effective date of the regulations. Frequent regulatory updates, scattered R&D data, and cumbersome filing materials can easily make it difficult for companies to keep up with regulatory requirements in a timely manner, and increase the workload of regulatory risk identification and document verification.
[0003] Existing methods for retrieving regulatory texts typically use regulatory names, keywords, or object identifiers as search criteria, returning regulatory clauses containing the same words through character matching or full-text indexing. While this method can retrieve text containing target words, it struggles to accurately understand the semantic relationship between regulatory issues and clauses. When search requests use abbreviations, aliases, natural language descriptions, or implicit expressions, relevant clauses are easily missed; and when multiple regulatory clauses contain similar words but differ in applicable regions, product categories, usage methods, or application locations, a large number of results are easily returned that are not actually applicable.
[0004] Regulatory texts also exhibit a clear hierarchy and conditional constraints. The complete meaning of the same regulatory clause may depend simultaneously on the regulatory title, chapter title, superior clauses, appendix clauses, and cited clauses. Calculating semantic similarity only for individual text fragments may overlook the scope of application defined by superior clauses, leading to search results inconsistent with the original intent of the regulation. Furthermore, regulatory clauses often contain limiting thresholds such as concentration, dosage, content, purity, duration, and frequency of use, and contain exceptions such as "limited to," "not applicable," "except," and "conditionally permitted." Ordinary semantic retrieval models focus on the similarity of text content, making it difficult to unify units and compare relationships between actual limiting parameters and regulatory limiting thresholds, and also difficult to identify the impact of exceptions on initial matching results.
[0005] Meanwhile, the same regulation may have multiple historical versions, and regulations may be subject to revision, replacement, and repeal. Returning regulatory clauses solely based on textual similarity cannot determine the valid version corresponding to the search benchmark date, nor can it handle applicable conflicts between general and special regulatory clauses, main text clauses and appendix clauses, or clauses at different levels of legal force. Existing search results typically only provide the regulatory name or related text, lacking complete evidentiary connections from search object characteristics, candidate recall sources, applicable condition judgment, threshold comparison, to version correction processes, making it difficult for users to verify intelligent matching conclusions.
[0006] Therefore, how to provide a method for legal text retrieval and intelligent matching based on semantic understanding is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0007] One objective of this invention is to propose a method for legal text retrieval and intelligent matching based on semantic understanding. This invention standardizes and associates the main text, appendices, and amendment documents of regulations to construct a set of versioned legal texts carrying version attributes and validity periods. It generates a set of legal semantic units based on the hierarchical structure and semantic integrity of the legal text, including associated hierarchical paths, original locations, applicable conditions, restriction thresholds, and exception conditions. Semantic parsing of the legal retrieval request yields a feature set of the legal retrieval object, which is then used to form a set of candidate legal semantic units through object identifier recall, semantic recall, and scope of application filtering. An improved ColBERT legal semantic matching model is used to perform hierarchical lexical encoding, applicable condition gating, lexical-level similarity interaction, numerical constraint judgment, and exception condition correction to obtain an initial set of legal matching results. Further corrections are made based on the validity period of the regulations, version relationships, clause citation relationships, and regulatory conflict priorities to generate a set of legal matching results and a legal matching evidence chain, thereby achieving accurate matching between the legal retrieval object and applicable legal clauses and tracing the matching process.
[0008] A method for legal text retrieval and intelligent matching based on semantic understanding according to an embodiment of the present invention includes the following steps: S1. Collect the main text of the regulations, the attachments to the regulations, and the documents for changing the regulations. Standardize the format and extract the name of the regulations, the level of legal force, the date of publication, the date of effective date, the date of expiration, the version identifier, and the version relationship to obtain a set of versioned regulatory texts that carry the version attributes and the effective period of the regulations. S2. Divide the set of versioned regulatory texts according to the hierarchical structure and semantic integrity of the regulatory texts, extract the regulatory objects, regulatory behaviors, applicable conditions, restriction thresholds, exception conditions and reference relationships, and obtain a set of regulatory semantic units with associated regulatory hierarchical paths, regulatory version attributes and original regulatory locations. S3. Receive regulatory search requests, parse object attributes, target regulatory issues, applicable regions, search base dates and limiting parameters to obtain a set of regulatory search object features; S4. Based on the feature set of the regulatory retrieval object, perform object identification recall, semantic recall, and scope of application filtering on the set of regulatory semantic units to obtain a set of candidate regulatory semantic units carrying the recall source; S5. Input the feature set of the regulatory retrieval object and the set of candidate regulatory semantic units into the improved ColBERT regulatory semantic matching model, and perform hierarchical lexical encoding, applicable condition gating, lexical similarity interaction, numerical constraint judgment and exception condition correction to obtain the initial regulatory matching result set. S6. Determine the validity status of the regulatory version based on the search benchmark date, the validity period of the regulation and the version relationship, determine the priority of regulatory conflicts based on the clause citation relationship, correct the initial regulation matching results accordingly and record the basis for correction, and obtain the regulation matching result set. S7. Generate a legal matching evidence chain by associating the legal matching result set with the legal semantic unit, associated clauses, applicable conditions and correction basis, and update the applicable conditions, restriction thresholds and exception conditions attributes in the legal semantic unit according to user feedback.
[0009] Optionally, step S2 includes the following steps: S21. Identify the legal title, chapter titles, clauses, provisions, appendices, and table of contents entries to construct the hierarchical structure of the legal text; S22. Divide the legal text according to the hierarchical structure and semantic integrity of the legal text, and record the legal name, chapter number, clause number, paragraph number and character range to form the original location of the legal text; S23. Extract the standard object, standard behavior, applicable region, object category, product category, usage method, usage location, restriction threshold and exception conditions, and identify the reference direction, supplementary relationship, exclusion relationship and subordinate relationship; S24. Associate the extracted content, identification relationships, regulatory hierarchy paths, regulatory version attributes, regulatory validity periods, and original regulatory locations with the corresponding regulatory text fragments to obtain a set of regulatory semantic units.
[0010] Optionally, step S3 includes the following steps: S31. Receive regulatory search requests formed from natural language questions, product information, raw material information, formula information, or filing information; S32. Identify the object name, object alias, object identifier, object category, product category, usage method, and usage location to form object attributes; S33. Extract target regulatory issues, applicable regions, and retrieval reference dates; identify concentration, dosage, content, purity, duration, or frequency of use to form limiting parameters; S34. By structuring and associating object attributes, target regulatory issues, applicable regions, retrieval base dates, and limiting parameters, a feature set of regulatory retrieval objects is obtained.
[0011] Optionally, step S4 includes the following steps: S41. Based on the object name, object alias and object identifier, perform object identifier recall in the set of legal semantic units to obtain the first recall set; S42. Generate a retrieval semantic vector based on the target legal issue and object attributes, perform semantic recall in the legal semantic unit set, and obtain a second recall set; S43. Filter the first recall set and the second recall set according to the applicable region, retrieval reference date, object category, product category, usage method and usage location; S44. Merge the filtered first and second recall sets, remove duplicate regulatory semantic units and retain the recall source to obtain a candidate regulatory semantic unit set.
[0012] Optionally, step S5 includes the following steps: S51. Encode the feature set of the regulatory retrieval object by retrieval terminology, and encode the candidate regulatory semantic units by hierarchical terminology according to the regulatory hierarchy path to obtain the retrieval terminology feature sequence and hierarchical regulatory terminology features. S52. Compare applicable regions, object categories, product categories, usage methods, and usage locations, and determine whether the search reference date is within the effective period of the regulations, and generate a regulatory application condition gating matrix; S53. Using the gating matrix constraint of applicable regulations, retrieve the word-level similarity interaction between word feature sequences and hierarchical legal word features to obtain word interaction matching results; S54. Unify the units of measurement for limiting parameters and thresholds and compare their relationships to obtain the numerical constraint judgment results; identify whether the regulatory retrieval object triggers the exception conditions and obtain the exception condition triggering results; combine the word interaction matching results to determine the initial matching score, initial applicable status and initial matching ranking, and obtain the initial regulatory matching result set.
[0013] Optionally, step S52 includes the following steps: S521. Extract object condition items from the feature set of legal retrieval objects, and extract legal condition items from each candidate legal semantic unit; S522. According to the applicable region, object category, product category, usage method and usage location, the corresponding object conditions and regulatory conditions are compared, and the search reference date is compared with the effective period of the regulations; S523. Determine the consistency, conflict, or missing status of the comparison results between each corresponding condition item and date to obtain the condition status sequence. S524. Map the consistent state, conflicting state, and missing state to pass value, inhibit value, and value to be verified, respectively. Arrange the mapped values according to the conditional state sequence to generate the regulatory application condition gating matrix.
[0014] Optionally, step S6 includes the following steps: S61. Determine the validity status of the regulatory version based on the validity period of the regulations corresponding to the search benchmark date and the matching results of each initial regulation; S62. Identify the revision, replacement, and repeal relationships between different regulatory versions based on the regulatory version attributes, and update the validity status of the regulatory versions; S63. Determine the priority of regulatory conflicts based on the relationship between general regulatory provisions, special regulatory provisions, main text provisions, annexes provisions, superior regulatory provisions and referenced regulatory provisions; S64. Based on the effective status of the regulatory version and the priority of regulatory conflicts, correct the initial applicable status and the initial matching score to obtain the final applicable status and the final matching score, form the final matching ranking and record the basis for correction, and obtain the regulatory matching result set.
[0015] Optionally, S63 includes the following steps: S631. Identify the legal provisions that act on the same normative object and whose applicable conditions overlap, and obtain a set of legal provisions to be compared. S632. Construct a sequence of clause relationships based on the legal force level, applicable conditions, effective date, version relationship, and citation direction of the clauses to be compared; S633. Mark the priority relationship of special regulations, the priority relationship of later-effective regulations, the priority relationship of superior regulations, and the binding relationship of referenced regulations in the clause relationship sequence; S634. Determine the order of application of the regulatory provisions to be compared according to the marked priority and constraint relationships to obtain the regulatory conflict priority.
[0016] Optionally, step S7 includes the following steps: S71. Obtain the semantic units of the regulations associated with each regulation matching result, and read the corresponding regulation name, regulation version attribute and original regulation location; S72. Associate the legal semantic units with superior clauses, referenced clauses, applicable conditions, restriction thresholds, exception conditions, numerical constraint judgment results, exception condition triggering results, legal version validity status, legal conflict priority, and correction basis. S73. Generate a regulatory matching evidence chain based on the regulatory retrieval object feature set, recall source, regulatory semantic unit, condition judgment result and correction process; S74. Receive user confirmation, correction, deletion or supplementation operations on the regulatory matching results, generate user feedback data, and update the applicable conditions, restriction thresholds and exception conditions attributes in the regulatory semantic unit accordingly.
[0017] Optionally, S73 includes the following steps: S731. Construct search evidence nodes from the object attributes, applicable regions, search benchmark dates, and restriction parameters in the feature set of the legal search object; S732. Construct the recall source, legal semantic unit, superior clause, cited clause, applicable conditions, limitation threshold and exception conditions as legal evidence nodes; S733, construct the judgment evidence node by the numerical constraint judgment result, the exception condition triggering result, the legal version validity status, the legal conflict priority, the correction basis, the final applicable status, the final matching score and the final matching ranking. S734. Establish a directed association according to the generation order and input-output relationship of the data corresponding to the retrieval evidence node, legal evidence node, and judgment evidence node, and generate a legal matching evidence chain.
[0018] The beneficial effects of this invention are as follows: Compared with the prior art, this invention divides the main text, chapters, clauses, provisions, and appendices of regulations according to the hierarchical structure and semantic integrity of the regulatory text, and extracts the regulatory objects, regulatory behaviors, applicable conditions, restriction thresholds, exception conditions, and citation relationships to construct a set of regulatory semantic units that associate the hierarchical paths of regulations, regulatory version attributes, and the original location of regulations. This method can preserve the contextual semantics and hierarchical limitations of regulatory clauses, reduce semantic deviations caused by fixed-length segmentation, missing headings, or context separation, and provide a clearly structured and semantically complete data foundation for regulatory retrieval and intelligent matching.
[0019] This invention performs structured parsing of object names, object aliases, object identifiers, object categories, product categories, usage methods, usage locations, applicable regions, retrieval reference dates, and limiting parameters in regulatory retrieval requests. It also combines object identifier recall and semantic recall to obtain candidate regulatory semantic units. This not only accurately locates relevant regulatory content based on names and identifiers, but also identifies potential semantic connections between natural language issues and regulatory clauses, reducing the chance of missing clauses due to abbreviations, synonyms, or missing keywords.
[0020] This invention utilizes an improved ColBERT regulatory semantic matching model for hierarchical lexical encoding and lexical-level similarity interaction. It generates a regulatory applicability condition gating matrix based on applicable region, object category, product category, usage method, usage location, and regulatory validity period. This matrix suppresses candidate regulatory semantic units that are textually similar but have conflicting applicability conditions, thereby improving the accuracy and practical applicability of the regulatory matching results. Simultaneously, it standardizes the units of measurement and compares the relationships between limiting parameters and thresholds, and corrects the matching results by incorporating exception triggering results. This reduces erroneous judgments caused by numerical differences, negative expressions, or unrecognized additional conditions.
[0021] This invention also determines the validity status of a regulation version based on the retrieval reference date, the validity period of the regulation, and the relationship between regulation versions. Furthermore, it determines the priority of regulatory conflicts by considering the relationships between general regulatory clauses, special regulatory clauses, main text clauses, appendix clauses, superior regulatory clauses, and cited regulatory clauses, thereby reducing the interference of expired regulations, replaced regulations, and conflicting clauses on the matching results. By associating the regulatory matching results with the regulatory semantic units, the original regulatory location, applicable conditions, restriction thresholds, exception conditions, and correction basis, a regulatory matching evidence chain is generated. This allows users to trace the candidate recall, condition judgment, numerical comparison, and version correction process, improving the interpretability, verifiability, and efficiency of manual review of the regulatory retrieval results. Attached Figure Description
[0022] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a legal text retrieval and intelligent matching method based on semantic understanding proposed in this invention; Figure 2 The flowchart of the improved ColBERT regulatory semantic matching model proposed in this invention is shown below. Figure 3 This is a flowchart of the regulatory matching result correction and evidence chain generation proposed in this invention. Detailed Implementation
[0023] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0024] refer to Figures 1-3 A method for legal text retrieval and intelligent matching based on semantic understanding includes the following steps: S1. Collect the main text of the regulations, the attachments to the regulations, and the documents for changing the regulations. Standardize the format and extract the name of the regulations, the level of legal force, the date of publication, the date of effective date, the date of expiration, the version identifier, and the version relationship to obtain a set of versioned regulatory texts that carry the version attributes and the effective period of the regulations. S2. Divide the set of versioned regulatory texts according to the hierarchical structure and semantic integrity of the regulatory texts, extract the regulatory objects, regulatory behaviors, applicable conditions, restriction thresholds, exception conditions and reference relationships, and obtain a set of regulatory semantic units with associated regulatory hierarchical paths, regulatory version attributes and original regulatory locations. S3. Receive regulatory search requests, parse object attributes, target regulatory issues, applicable regions, search base dates and limiting parameters to obtain a set of regulatory search object features; S4. Based on the feature set of the regulatory retrieval object, perform object identification recall, semantic recall, and scope of application filtering on the set of regulatory semantic units to obtain a set of candidate regulatory semantic units carrying the recall source; S5. Input the feature set of the regulatory retrieval object and the set of candidate regulatory semantic units into the improved ColBERT regulatory semantic matching model, and perform hierarchical lexical encoding, applicable condition gating, lexical similarity interaction, numerical constraint judgment and exception condition correction to obtain the initial regulatory matching result set. S6. Determine the validity status of the regulatory version based on the search benchmark date, the validity period of the regulation and the version relationship, determine the priority of regulatory conflicts based on the clause citation relationship, correct the initial regulation matching results accordingly and record the basis for correction, and obtain the regulation matching result set. S7. Generate a legal matching evidence chain by associating the legal matching result set with the legal semantic unit, associated clauses, applicable conditions and correction basis, and update the applicable conditions, restriction thresholds and exception conditions attributes in the legal semantic unit according to user feedback.
[0025] In this embodiment, S1 includes: Collect the main text of regulations, regulatory appendices, and regulatory amendment documents. The main text of regulations can be sourced from the issuing agency, industry regulatory platform, public regulatory database, and internally reviewed regulatory materials of enterprises; regulatory appendices may include raw material catalogs, lists of prohibited substances, lists of restricted substances, lists of permitted substances, testing methods, limit tables, explanations of the scope of application, and product classification catalogs; regulatory amendment documents may include revision announcements, replacement announcements, repeal announcements, implementation notices, and extension of implementation documents.
[0026] For cosmetic application scenarios, we can collect cosmetic regulations, lists of used ingredients, lists of prohibited ingredients, lists of restricted ingredients, lists of permitted preservatives, lists of permitted sunscreens, lists of permitted colorants, and other regulatory information related to ingredient safety evaluation issued by different countries or regions. Different regulatory sources may be in different formats such as web page text, editable documents, PDF documents, spreadsheets, or scanned documents, so it is necessary to standardize the format of the collected content.
[0027] Format standardization includes unified character encoding, unified line breaks, removal of headers and footers, deletion of duplicate paragraphs, table of contents recognition, table restoration, unified numbering format, and reading order correction. For scanned documents, it identifies the character content and restores the original reading order based on page numbers, text positions, and table boundaries. For regulatory tables, it identifies table headers, row headings, column headings, and cells spanning multiple rows or columns, ensuring that each regulatory restriction is clearly associated with the corresponding regulated object, product category, restriction threshold, and remarks.
[0028] After standardizing the format, extract the following information from the regulatory text and corresponding metadata: regulatory name, regulatory number, issuing authority, regulatory level of effectiveness, applicable region, publication date, effective date, expiration date, and version identifier. The applicable region indicates the country, region, or regulatory area to which the regulatory document corresponds; the regulatory level of effectiveness indicates the order of effectiveness among different regulatory documents; and the version identifier is used to distinguish different versions of the same regulation.
[0029] The relationship between different versions of regulations is identified by their regulation number, regulation name, revision instructions, replacement instructions, and repeal instructions. These relationships include revision, replacement, and repeal. A revision relationship indicates that a subsequent document adjusts certain parts of the original regulation; a replacement relationship indicates that a subsequent version of the regulation replaces the current version from a specified date; and a repeal relationship indicates that the regulation is no longer valid as a legal basis from a specified date.
[0030] When establishing regulatory version relationships, the original publication date, original effective date, and original expiration date recorded in the source regulatory documents are retained. When a regulatory amendment document explicitly states that a subsequent version will replace the current version from a specific date, a replacement relationship between the current version and the subsequent version is established, and that specific date is recorded as the applicable expiration date of the current version. The applicable expiration date is a system record formed based on the regulatory amendment document and is not used to overwrite the original expiration date.
[0031] For example, if the original effective date of regulation version R-2023 was January 1, 2023, and the effective date of regulation version R-2025 was July 1, 2025, and the regulation amendment document explicitly stipulates that R-2025 replaces R-2023 from the effective date, then a replacement relationship between R-2025 and R-2023 is established, and July 1, 2025 is recorded as the applicable termination date of R-2023.
[0032] The standardized legal texts, version attributes, validity periods, and version relationships are stored together to form a set of versioned legal texts. Each legal text is assigned a unique legal text identifier, enabling subsequent semantic units of the law to be located at their corresponding legal source and version.
[0033] When the same regulatory document has multiple language versions, the official version confirmed by the issuing authority shall be the base version, and a correspondence shall be established between the different language versions. Different language versions are only used to assist in retrieval and do not directly change the validity period of the regulation or the relationship between the versions of the regulation.
[0034] In this embodiment, S2 includes: Identify the titles, sections, chapters, sections, articles, clauses, items, subheadings, appendices, and table of contents entries in the versioned collection of regulatory texts, and establish a hierarchical structure for the regulatory texts. For announcements or notices that do not adopt a complete section / chapter structure, establish corresponding levels based on titles, body paragraphs, table items, and attachment items.
[0035] When identifying hierarchical numbers, the numbering format, font size, indentation, paragraph position, and contextual order are used comprehensively. For example, "Chapter 1," "Article 12," "I," "(I)," and "1." correspond to different regulatory levels. A regulatory hierarchy path is formed based on the subordinate relationships between levels. A regulatory hierarchy path can be represented as "Regulatory Name—Chapter Name—Article Number—Annex Item."
[0036] Legal texts are divided according to their hierarchical structure and semantic integrity. The division of legal texts does not use a fixed character length, but rather ensures that each fragment of legal text can independently express at least one regulated object, regulated behavior, or applicable condition.
[0037] When the restricted content spans multiple consecutive paragraphs, the relevant paragraphs are merged into a single regulatory text fragment; when the same clause contains multiple independent regulatory objects or multiple sets of different restrictive conditions, it is split into multiple regulatory text fragments according to the correspondence between the regulatory objects and conditions.
[0038] For example, if the same regulatory table states that the maximum permissible mass fraction of ingredient A is 0.50% when used in leave-on products and 1.00% when used in rinse-off products, and its use is prohibited in eye products, then the two restriction thresholds and three product conditions cannot be stored interchangeably in the same regulatory semantic unit. The system should generate separate regulatory text fragments for leave-on products, rinse-off products, and eye products, ensuring that each restriction threshold is individually associated with its corresponding product category, usage method, application site, and exception conditions.
[0039] For each legal text fragment, record the legal name, chapter number, clause number, paragraph number, and character range to form the original legal position. The character range includes the starting and ending character positions of the legal text fragment within the standardized legal text, used for subsequent display of the original legal content.
[0040] The system performs object and condition identification on regulatory text fragments to extract the regulated object, regulated behavior, applicable region, object category, product category, usage method, usage location, restriction threshold, and exception conditions.
[0041] Regulated actions may include permitting use, prohibiting use, restricting use, requiring labeling, requiring testing, requiring registration, or requiring the provision of safety assessment data. Target categories may include preservatives, colorants, sunscreens, surfactants, and other regulatory categories. Product categories may include leave-on products, rinse-off products, children's products, eye care products, or special-purpose products.
[0042] Threshold limits must include at least the parameter type, threshold value, unit of measurement, and threshold relationship. Threshold relationships include less than, less than or equal to, greater than, greater than or equal to, equal to, or within a specified range. For regulatory limits with upper and lower limits, both the lower and upper limits should be recorded.
[0043] Exceptions are associated with the corresponding regulated object, product category, usage method, application site, and restriction threshold. For example, "excluding eye products" cannot be stored as isolated text, but should be associated with the specific regulatory clauses that restrict or exclude it.
[0044] Identify the citation direction, supplementary relationship, exclusionary relationship, and subordinate relationship between legal text fragments. The citation direction indicates that the current legal text fragment cites other legal provisions, or is cited by other legal provisions; the supplementary relationship indicates that one legal text fragment supplements another legal text fragment; the exclusionary relationship indicates that one legal text fragment excludes part of the scope of application of another legal text fragment; the subordinate relationship indicates the hierarchical relationship between the current legal text fragment and its superior provisions.
[0045] Establish name mappings based on the standard names, aliases, historical names, abbreviations, foreign language names, and object identifiers appearing in the regulatory text. These name mappings are stored along with the regulatory objects, enabling subsequent object identifier recall to identify different textual expressions of the same regulatory object. For CAS numbers, EC numbers, regulatory catalog numbers, or internal raw material codes, associations are established only when the mapping can be confirmed by the regulatory source or audited documents.
[0046] The content of the regulatory text, the object of regulation, the regulated behavior, the applicable conditions, the restriction threshold, the exception conditions, the identification relationship, the regulatory hierarchy path, the regulatory version attribute, the effective period of the regulation, and the location of the original regulation are structurally linked to form a regulatory semantic unit. Each regulatory semantic unit has a unique regulatory semantic unit identifier.
[0047] The restriction thresholds in the regulatory semantic units correspond one-to-one with the applicable conditions. When the same regulatory text fragment contains multiple sets of restriction thresholds, regulatory semantic units are generated separately according to different product categories, usage methods, usage locations, or exception conditions to avoid restriction threshold mismatches during subsequent numerical constraint judgment.
[0048] All legal semantic units constitute a legal semantic unit set. This set can be stored in a relational database or a document database. Legal semantic unit identifiers are used to connect text content, structured attributes, and relationships.
[0049] In this embodiment, S3 includes: We accept regulatory search requests consisting of natural language questions, product information, ingredient information, formulation information, or filing information. Regulatory search requests can contain only natural language questions, or they can include product formulations, ingredient information, and target sales regions.
[0050] Identify the object name, object alias, object identifier, object category, product category, usage method, and usage location in the regulatory retrieval request to form object attributes. The object identifier may include CAS number, EC number, regulatory catalog number, internal raw material code, or other identifiers that can distinguish the regulated object.
[0051] When a natural language query contains terms such as "the raw material," "the preservative," or "the aforementioned product," the corresponding object is determined based on the product information, raw material information, and formula information in the same regulatory search request. If a unique corresponding object cannot be determined, the corresponding object attribute is marked as missing, and no unfounded supplementation is performed.
[0052] Extract the target regulatory issues, applicable regions, and search baseline date. The target regulatory issues indicate the regulatory matters the user needs to determine, including whether use is permitted, whether limits are exceeded, whether it applies to the target product, whether labeling is required, whether testing is necessary, or which regulatory version should be adopted. The search baseline date determines whether the regulatory text is valid on the target date.
[0053] Identify concentration, dosage, content, purity, duration of use, or frequency of use in regulatory search requests to form limiting parameters. Each limiting parameter includes parameter type, parameter value, and unit of measurement, and is associated with a corresponding object.
[0054] When the formula information only records the raw material quality and the total formula quality, the mass fraction is calculated based on the raw material quality and the total formula quality, and the calculation result is associated with the corresponding raw material. When the regulatory search request includes multiple raw materials, a unique object record identifier is assigned to each raw material. Each object record identifier is associated with object attributes and restriction parameters to avoid numerical correspondence errors between multiple raw materials.
[0055] When a regulatory search request involves multiple applicable regions, separate regulatory search tasks are created for each region. Each regulatory search task retains the same object attributes and constraint parameters, but is associated with only one applicable region to avoid mixing of regulatory semantic units, regulatory versions, and constraint thresholds from different regions.
[0056] The object attributes, target regulatory issues, applicable regions, search base dates, and limiting parameters are structurally associated according to the object record identifier to obtain the regulatory retrieval object feature set. The object record identifier, applicable region, and target regulatory issue in the regulatory retrieval object feature set jointly limit the scope of subsequent candidate recall and regulatory matching.
[0057] In this embodiment, S4 includes: Based on the feature set of the regulatory retrieval objects, object identification recall, semantic recall, and scope of application filtering are performed on the set of regulatory semantic units.
[0058] Object identification recall retrieves regulatory semantic units based on object name, object alias, and object identifier. The object name and object alias are unified through the established name correspondence within the regulatory semantic units. When the regulatory object feature set contains a CAS number, EC number, or regulatory catalog number, precise recall is prioritized based on the object identifier; if the object identifier is missing, a combined recall is performed based on the standard name, object alias, and object category.
[0059] The object identifier recall process yields a first recall set, and for each regulatory semantic unit within it, the recall source is recorded as object identifier recall. Object identifier recall is primarily used to ensure that regulatory clauses directly related to the target regulatory object are included in the candidate scope.
[0060] Before semantic recall, a semantic encoder is used to encode the textual content, normative objects, normative behaviors, and applicable conditions of the legal semantic units, generating legal semantic vectors. These legal semantic vectors are associated with the corresponding legal semantic unit identifiers, and a legal semantic vector index is established. After a legal semantic unit is updated, the corresponding legal semantic vector is regenerated synchronously, and the index is updated.
[0061] The search text is constructed based on the target regulatory question and object attributes, and a search semantic vector is generated using the same semantic encoding method. The search semantic vector is then compared with the regulatory semantic vector to obtain a second recall set, and the source of the recall is recorded as semantic recall.
[0062] Semantic recall can identify content with different wording but related legal meaning. For example, although the phrase "can it be listed for sale" in a legal search request and "must not be placed on the market" in the legal text do not use the same keywords, they have related legal semantics and can be used to establish candidate relationships through semantic recall.
[0063] The first and second recall sets were filtered by applicable region, search reference date, object category, product category, usage method, and usage location.
[0064] The scope of application filtering adopts a lenient filtering approach. When there is a clear conflict between the candidate regulatory semantic unit and the regulatory search object in terms of applicable region, object category, or product category, it is excluded; when the candidate regulatory semantic unit lacks some conditions, it is not directly excluded, but is retained until the subsequent applicable condition gating stage.
[0065] When the retrieval base date is earlier than the effective date of the regulation or later than the clearly recorded expiration date, the corresponding regulatory semantic unit can be marked as a time condition conflict; when the expiration status of the regulation needs to be further judged in conjunction with the substitution relationship, the corresponding regulatory semantic unit is retained, and S6 performs the regulation version validity status correction.
[0066] The first and second recall sets after merging and filtering are then processed. For the same regulatory semantic unit obtained from both object identifier recall and semantic recall, only one candidate record is retained, and both recall sources are recorded simultaneously. After removing duplicate regulatory semantic units, a set of candidate regulatory semantic units carrying the recall source is obtained.
[0067] The candidate legal semantic unit set only includes legal semantic units obtained through recall and filtering, and does not include superior clauses, reference clauses, or exception clauses without basis in this step. Superior clauses, reference clauses, and other related content are read in the subsequent evidence chain generation process based on the reference relationships, supplementary relationships, exclusion relationships, and subordinate relationships established in S2.
[0068] When the feature set of the regulatory retrieval object contains multiple object record identifiers, object identifier recall, semantic recall, and scope of application filtering are performed for each object record identifier to form a set of candidate regulatory semantic units that correspond one-to-one with each object.
[0069] In this embodiment, S5 includes: The feature set of the regulatory retrieval object and the set of candidate regulatory semantic units are input into the improved ColBERT regulatory semantic matching model. The model sequentially performs hierarchical lexical encoding, applicability condition gating, lexical-level similarity interaction, numerical constraint judgment, and exception condition correction.
[0070] The object name, object category, product category, usage method, usage location, target regulatory issue, applicable region, and restriction parameters in the regulatory retrieval object feature set are converted into a retrieval text sequence, and corresponding type tags are added before each type of text.
[0071] For example, an object type marker is added before the object name, a region type marker before the applicable region, a product type marker before the product category, and a numeric type marker before the restriction parameter. The retrieval text sequence is encoded using a retrieval encoder to obtain a retrieval term feature sequence.
[0072] For each candidate legal semantic unit, the legal name, chapter title, clause text, and appendix items are read separately. For candidate legal semantic units without appendix items, the appendix items are set to empty, and no corresponding appendix lexical features are generated.
[0073] Corresponding level tags are added before the law name, chapter title, clause text, and appendix items, and respectively encoded using a law encoder to obtain the word features of the law name, chapter title, clause text, and appendix items.
[0074] To clarify the degree to which content at different levels supplements the main text of the clauses, the lexical features at each level are aggregated to obtain summary features for each level. The semantic relevance between the summary features of the regulation name, chapter title, and appendix items and the summary features of the main text of the clauses is calculated.
[0075] The semantic relevance of each level is converted into non-negative level weights, and all effective level weights are normalized. The main body of the clause serves as the direct legal basis, and a text-level weight no lower than a preset lower limit is assigned to it to prevent the legal title or chapter title from overshadowing the main semantics of the clause.
[0076] When content at a certain level is missing, the weight of that level is set to zero, and the remaining valid levels are re-normalized to ensure that the sum of the weights of all valid levels remains consistent.
[0077] By fusing the lexical features of each level according to the normalized hierarchical weights, the legal hierarchical context features are obtained. These legal hierarchical context features are then fused with the lexical features of each legal term in the main text of the clauses to obtain the hierarchical legal lexical features.
[0078] This processing allows clause text elements to retain the semantics of the local regulations while carrying information on the scope of application provided by the regulations name, chapter titles, and appendices, reducing the contextual loss caused by extracting clauses in isolation.
[0079] Object condition items are extracted from the feature set of the regulatory retrieval object, and regulatory condition items are extracted from each candidate regulatory semantic unit. Both object condition items and regulatory condition items are arranged according to applicable region, object category, product category, usage method, usage location, and time condition.
[0080] The time condition is determined by comparing the search reference date with the effective period of the regulation. When the search reference date is within the effective period of the regulation, the time condition is consistent; when the search reference date is clearly outside the effective period of the regulation, the time condition conflicts; when the effective period of the regulation is incomplete and cannot be directly determined, the time condition is missing.
[0081] Compare each object condition item with the regulatory condition item to determine whether it is consistent, conflicting, or missing. A consistent state indicates that the object condition meets the regulatory condition; a conflicting state indicates that the object condition and the regulatory condition are clearly incompatible; a missing state indicates that either the object condition or the regulatory condition lacks the content required for the judgment.
[0082] Consistent states are mapped to pass values, conflicting states to suppress values, and missing states to values to be verified. In this implementation, the pass value is set to 1, the suppress value is set to 0, and the value to be verified is set to 0.5. The pass value is greater than the value to be verified, and the value to be verified is greater than the suppress value.
[0083] Regulations that explicitly specify the applicable region, target category, and product category are considered necessary conditions; when regulations explicitly specify the method of use or application location, the corresponding method of use or application location is also considered a necessary condition. Conditions not explicitly specified in regulations are not considered necessary conditions.
[0084] The condition mapping values corresponding to each candidate legal semantic unit are arranged in candidate order to form a legal applicability condition gating matrix. The rows in the matrix correspond to candidate legal semantic units, and the columns correspond to different condition types.
[0085] For the same candidate regulatory semantic unit, when any necessary condition corresponds to a suppression value, the candidate gate value of the candidate regulatory semantic unit is set to 0; when there is no conflict of necessary conditions, the pass value and the value to be verified in the row are averaged to obtain the candidate gate value.
[0086] Therefore, when all conditions are consistent, the candidate gate value is 1; when there is no conflict but a condition is missing, the candidate gate value is between 0.5 and 1; when necessary conditions conflict, the candidate gate value is 0. The candidate gate value is directly generated from the condition mapping value in the regulatory application condition gate matrix, without using any additional parameters without a source.
[0087] Calculate the similarity between each search term in the search term feature sequence and each regulation term in the hierarchical regulation term feature sequence. For each search term, select the maximum similarity between it and all regulation terms as the local matching value.
[0088] Local matching values are aggregated according to the type of search terms in the feature set of the regulatory retrieval object. Search terms corresponding to object name, target regulatory issue, and product category participate in the main semantic matching; search terms corresponding to applicable region, usage method, and usage location are also subject to the constraints of the corresponding condition mapping values in the regulatory application condition gating matrix.
[0089] The local matching values of each search term are averaged to obtain the basic term interaction score. The basic term interaction score is then combined with the candidate gating value to obtain the gated term interaction score.
[0090] When a conflict of necessary conditions results in a candidate gating value of 0, the gating post-gating lexical interaction score of the corresponding candidate legal semantic unit is suppressed; when the condition is partially missing, the semantic matching result is retained according to the candidate gating value, and the corresponding candidate legal semantic unit is marked as pending verification.
[0091] By associating the candidate legal semantic unit identifier, the basic word interaction score, the candidate gating value, the gating word interaction score, and the status of each condition item, the word interaction matching result is obtained.
[0092] Restriction parameters are read from the feature set of the regulatory retrieval object, and restriction thresholds corresponding to the current product category, usage method and usage location are read from the candidate regulatory semantic units.
[0093] First, determine if the parameter types of the constraint parameter and the constraint threshold are consistent. For example, quality score can only be compared with the quality score limit, and usage frequency can only be compared with the usage frequency limit. When the parameter types are inconsistent, the numerical constraint determination result is that they are not comparable.
[0094] When parameter types are consistent, the units of measurement are unified according to the pre-configured and verified unit conversion relationships in the system. After unit unification is completed, the limiting parameters and limiting thresholds are compared according to the threshold relationships in the limiting thresholds.
[0095] For example, if the regulatory limit threshold is a maximum allowable quality score of 0.50%, and the quality score of the regulatory search object is 0.60%, then the numerical constraint judgment result is "not met," and the excess value is recorded as 0.10 percentage points. When the quality score of the regulatory search object is 0.40%, the numerical constraint judgment result is "met."
[0096] When limiting parameters are missing, the numerical constraint judgment result is "to be verified"; when the parameter type or unit of measurement cannot be matched, the numerical constraint judgment result is "not comparable". The numerical constraint judgment result is associated with the corresponding legal semantic unit, standard object, and limiting threshold.
[0097] Read the exception conditions in the candidate regulatory semantic units and parse them into product category, usage method, usage location, applicable population, or other additional conditions. Compare the parsing results with the feature set of the regulatory retrieval object item by item.
[0098] When the object of the legal search meets the exception conditions, the exception condition trigger result is "triggered"; when it is clearly not met, the exception condition trigger result is "not triggered"; when the required content for judgment is missing, the exception condition trigger result is "pending verification".
[0099] For example, regulations allow ingredient A to be used in leave-on products, but exceptions stipulate that it does not apply to eye products. If the current product is intended for use on the eyes, the exception is triggered; if the current product is explicitly stated to be a non-eye / facial product, the exception is not triggered; if the current product does not specify the application area, the exception is pending verification.
[0100] The initial matching score is determined by the gated lexical interaction score. The results of numerical constraint judgments and exception condition triggering are not used to reduce the semantic relevance of the legal provisions themselves, but rather to determine the initial applicability.
[0101] This approach avoids situations where highly relevant clauses are mistakenly relegated to lower rankings due to "not meeting the limit requirements." A clause highly relevant to a regulatory search request should retain a high initial match score, even if the search results indicate non-compliance.
[0102] The initial applicable status includes applicable, conditionally applicable, does not meet the restriction requirements, not applicable, and pending verification. When the numerical constraint judgment result is not met, the initial applicable status is set to not meet the restriction requirements; when the exception condition trigger result is triggered, it is set to not applicable, prohibited, or conditionally applicable according to the normative behavior corresponding to the exception condition; when there are missing key conditions, it is set to pending verification.
[0103] The initial matching scores are ranked from highest to lowest to form an initial matching order. When multiple candidate regulatory semantic units have the same initial matching score, the candidate regulatory semantic units with exact match object identifiers and complete applicable conditions are given priority.
[0104] The initial matching score, initial applicable status, and initial matching order are associated with the corresponding legal semantic units to obtain the initial legal matching result set.
[0105] In this embodiment, S6 includes: The validity status of a regulation version is determined based on the retrieval base date, the effective period of the regulation, and the relationship between regulation versions, and the priority of regulatory conflicts is determined based on the relationship between the regulatory clauses.
[0106] For each legal semantic unit in the initial legal matching result set, the corresponding legal version attribute and legal validity period are read. If the search reference date is within the legal validity period, the legal version is determined to be valid; if the search reference date is earlier than the effective date, it is determined to be not yet effective; if the search reference date is later than the explicitly stated expiration date or applicable termination date, it is determined to be invalid or replaced.
[0107] When the source document for a regulation does not specify an expiration date, the validity status of the regulation version is further updated based on the revision, substitution, and repeal relationships. If a subsequent version of the regulation explicitly replaces the current version, and the retrieval reference date is no earlier than the effective date of the subsequent version, the validity status of the current regulation version is updated to "substituted." If a repealed document explicitly repeals the current regulation version, the validity status of the regulation version is updated to "repealed."
[0108] Identify regulatory clauses that apply to the same regulatory object and whose applicable conditions overlap, thus obtaining a set of regulatory clauses to be compared. The overlap in applicable conditions indicates that multiple regulatory clauses share at least a common scope of application in terms of applicable region, object category, product category, usage method, or application location, and may lead to different judgments regarding the same regulatory object.
[0109] Based on the legal force level, applicable conditions, effective date, legal version relationship, and citation direction of the legal provisions to be compared, establish the order of relationships between the legal provisions.
[0110] When legal provisions have the same level of effectiveness, but one provision makes a more specific limitation on the regulated object or product category, that provision is marked as a special legal provision; when a legal amendment document clearly stipulates that a provision that takes effect after the amendment replaces or modifies a previous provision, a priority relationship is established between the provisions that take effect after the amendment; when legal provisions of different levels of effectiveness have a clear conflict, a priority relationship is established between the provisions of the superior legal provision; when a current legal provision clearly cites another legal provision as an applicable condition or a basis for restriction, a binding relationship is established between the cited legal provision and the current legal provision.
[0111] When dealing with the relationship between the main clauses and the appendix clauses, no fixed priority is assumed for either the main clauses or the appendix clauses. When the main clauses reference the appendix clauses, and the main clauses explicitly state that the appendix constitutes a limiting condition or technical requirement, the appendix clauses shall be used as the specific binding basis for the main clauses. When the main clauses and appendix clauses define different regulatory objects or different applicable conditions, the scope of application shall be determined according to their respective regulatory objects and applicable conditions.
[0112] When the legal force level, legal version relationship, or citation direction are insufficient to determine the order of application, a definitive priority conclusion is not automatically generated. Instead, the corresponding legal conflict priority is marked as pending manual review.
[0113] The priority of regulatory conflicts is determined based on the established priority relationships of special regulatory provisions, subsequent regulatory provisions, superior regulatory provisions, and the binding relationships of cited regulatory provisions.
[0114] The initial regulatory matching results are corrected based on the validity status of the regulatory version and the priority of regulatory conflicts. Regulatory semantic units with a valid version can be used as the current valid matching basis; regulatory semantic units with a valid version that has not yet taken effect can be retained as future regulatory information, but are not used to form the final applicable status under the retrieval base date; regulatory semantic units with a valid version that is invalid, replaced, or repealed are not used as the current valid matching basis.
[0115] When multiple valid regulatory semantic units conflict in application, the regulatory semantic unit used to form the final applicable state is determined according to the priority of the regulatory conflict. The regulatory semantic units with lower priority are retained as association descriptions so that the correction process can be shown in the regulatory matching evidence chain.
[0116] The corrected applicable status forms the final applicable status, and the corrected matching score forms the final matching score. When a regulatory version is invalid, the final matching ranking of the corresponding result is reduced, but its initial matching score and historical regulatory association information are retained.
[0117] The final matching ranking is determined based on the final matching score, the validity status of the regulatory version, and the priority of regulatory conflicts. The correction criteria include the search base date, the validity period of the regulation, the relationship between regulatory versions, the validity status of the regulatory versions, the level of regulatory validity, the intersection of applicable conditions, the direction of citation, and the priority relationship.
[0118] By associating the final applicable status, final matching score, final matching ranking, and correction basis with the corresponding legal semantic units, a set of legal matching results is obtained.
[0119] In this embodiment, S7 includes: Retrieve the semantic units of regulations associated with each regulation matching result in the regulation matching result set, and read the corresponding regulation name, regulation version attribute and original regulation location.
[0120] Based on the citation, supplementary, exclusionary, and subordinate relationships established in S2, the superior clauses, cited clauses, and other related legal semantic units associated with the regulatory matching results are read. These related clauses are only used to interpret the regulatory matching results and form a chain of evidence; they do not change the set of candidate regulatory semantic units generated in S4.
[0121] The object attributes, applicable regions, search base dates, and limiting parameters from the feature set of the regulatory search object are used to construct search evidence nodes. Search evidence nodes are used to characterize the actual attributes of the regulatory search object and the issues to be judged.
[0122] The recall source, legal semantic unit, superior clause, cited clause, applicable conditions, limitation threshold, and exception conditions are constructed as legal evidence nodes. Legal evidence nodes are used to represent the source of the legal text, the hierarchical structure of the law, and the specific constraints.
[0123] The numerical constraint judgment result, the exception condition trigger result, the validity status of the regulation version, the priority of regulation conflict, the correction basis, the final applicable status, the final matching score, and the final matching ranking are constructed as judgment evidence nodes.
[0124] A directed association is established based on the generation order and input-output relationship of the data corresponding to each evidence node. Object attributes and target regulatory issues point to the recall source, and the recall source points to the legal semantic unit; limiting parameters and limiting thresholds together point to the numerical constraint judgment result; regulatory retrieval object characteristics and exception conditions together point to the exception condition triggering result; the retrieval benchmark date, the legal validity period, and the relationship between the legal version together point to the legal version validity status; the relationship between legal clauses points to the priority of legal conflicts; and the above judgment results together point to the final applicable status.
[0125] After completing the construction and directed association of evidence nodes, a regulatory matching evidence chain is generated. The regulatory matching evidence chain can demonstrate why the regulatory retrieval object recalls the corresponding regulatory semantic unit, whether the applicable conditions are consistent, whether the limiting parameters meet the limiting threshold, whether the exception conditions are triggered, whether the regulatory version is valid, and how regulatory clause conflicts are corrected.
[0126] Users can locate the original regulation by matching the evidence chain. The system displays the corresponding regulation content based on the regulation name, chapter number, clause number, paragraph number, and character range, and simultaneously displays the superior clause, cited clause, restriction threshold, exception conditions, and correction basis.
[0127] It receives user confirmations, corrections, deletions, or additions to the regulatory matching results and generates user feedback data. User feedback data includes the user's identifier, feedback time, feedback type, feedback content, corresponding regulatory semantic unit identifier, and the location of the original regulation.
[0128] User feedback data does not directly modify the applicable conditions, limitation thresholds, and exception conditions attributes in the legal semantic units. Instead, it forms an update record pending review. This update record is then verified for consistency with the source legal documents.
[0129] The verification process includes checking whether the feedback content can be located in the source regulatory documents, whether the feedback values are consistent with the original regulatory text, whether the applicable conditions correspond to the correct regulatory objects, and whether the exception conditions have clear textual basis. If the verification passes, the applicable conditions, limitation thresholds, or exception conditions attributes in the regulatory semantic unit are updated; if the verification fails, the original regulatory semantic unit attributes are retained.
[0130] The update process retains the attributes before and after modification, the review time, the review result, and the feedback source. After the legal semantic unit attributes are updated, the corresponding legal semantic vector is regenerated and the legal semantic vector index is updated, so that subsequent legal retrieval uses the latest verified data.
[0131] Example 1: To verify the feasibility of this invention in practice, it was applied to a scenario of regulatory text retrieval and formula compliance matching in the cosmetic research and development process. This example uses independently constructed simulated regulatory texts and simulated product data for verification. The relevant regulatory numbers, object names, restriction thresholds, and processing data are only used to illustrate the technical processing of this invention and do not represent actual business data or current regulatory conclusions.
[0132] First, a total of 312 documents, including the main text of simulated regulations, regulatory appendices, and regulatory amendment documents, were collected. These included 128 basic regulatory texts, 86 appendix directories, 54 revision announcements, and 44 documents replacing or repealing existing regulations. The collected texts were standardized in format, and the following information was extracted: regulation name, legal force level, publication date, effective date, expiration date, version identifier, and version relationship, forming a versioned set of regulatory texts. The regulatory texts were then divided according to the hierarchical relationship of regulation title, chapter title, clause, clause, and appendix entries. Chapter numbers, clause numbers, paragraph numbers, and character ranges were recorded. Furthermore, the following information was extracted: regulated object, regulated behavior, applicable region, object category, product category, usage method, application location, restriction threshold, exception conditions, and citation direction, ultimately forming 18,640 semantic units of the regulations.
[0133] The regulatory search request received in this embodiment is as follows: A leave-on facial serum is planned to be sold in target region B on June 30, 2026. The formula mass fraction of preservative ingredient A in the product is 0.60%, and it is necessary to determine whether this ingredient meets the corresponding regulatory limit requirements. The system identifies the object name "preservative ingredient A", object alias "ingredient A", object identifier "A-017", object category "preservative ingredient", product category "leave-on facial serum", usage method "no rinsing after application", application area "face", applicable region "target region B", search base date "June 30, 2026", and limit parameter "mass fraction 0.60%" from the search request, thus obtaining the regulatory search object feature set.
[0134] Object identification recall was performed based on object name, object alias, and object identifier to obtain the first recall set, which contains 23 regulatory semantic units. Semantic vectors were generated based on the target regulatory issue and object attributes, and semantic recall was performed to obtain the second recall set, which contains 31 regulatory semantic units. After filtering, merging, and deduplicating the two recall sets according to applicable region, retrieval reference date, object category, product category, usage method, and usage location, 8 candidate regulatory semantic units were obtained, including 3 limitation clauses, 2 scope of application clauses, 1 exception clause, 1 version change clause, and 1 reference clause.
[0135] The improved ColBERT regulatory semantic matching model inputs a feature set of regulatory retrieval objects and eight candidate regulatory semantic units. The model generates a sequence of retrieval term features and hierarchical regulatory term features based on the regulatory hierarchy path, and compares applicable regions, object categories, product categories, usage methods, usage sites, and regulatory validity periods. For candidate regulatory semantic units consistent with target region B, stationary products, and facial usage conditions, a pass value is generated; for candidate regulatory semantic units conflicting with applicable regions or product categories, a suppression value is generated; and for candidate regulatory semantic units lacking usage site information, a verification value is generated. This forms a regulatory applicability condition gating matrix, which is then used to constrain term-level similarity interactions.
[0136] During the numerical constraint judgment process, the system compares the quality score of 0.60% in the search request with the maximum allowable quality score of 0.50% in the candidate regulatory semantic unit, unifying the units of measurement and the relationship, resulting in a numerical constraint judgment result of "exceeding the limit threshold by 0.10 percentage points". The system also identifies that the associated exception clause is limited to "not applicable to eye-use products", while the current product is used on the face and is not an eye-use product; therefore, the exception condition triggering result is not triggered. Combining the word interaction matching result, the numerical constraint judgment result, and the exception condition triggering result, the system determines the corresponding limit clause as the highest matching item, generating an initial matching score of 0.947, an initial applicable status of "not meeting the limit requirements", and an initial matching ranking of 1st.
[0137] Subsequently, the system determines the validity status of the regulatory version based on the search reference date and the effective period of the regulation. It identifies that version R-2025 took effect on January 1, 2026, replacing version R-2023. Therefore, the regulatory semantic unit corresponding to version R-2025 is retained, while historical results corresponding to version R-2023 are suppressed. For limitation clauses, annexe clauses, and referenced regulatory clauses, the system determines the priority of regulatory conflicts based on the regulatory validity level, applicable conditions, effective date, version relationship, and reference direction. Ultimately, the system obtains the regulatory matching result: "The maximum permissible mass fraction of preservative ingredient A in the leave-on facial serum in target region B is 0.50%, while the current formula mass fraction is 0.60%, which does not meet the limitation requirement."
[0138] Finally, the system constructs evidence nodes from the feature set of the regulatory retrieval object, the recall source, the semantic unit of the matching regulation, the superior clause, the cited clause, the restriction threshold, the numerical constraint judgment result, the validity status of the regulation version, the priority of regulatory conflicts, and the correction basis. It then establishes directed associations according to the data generation order and input-output relationships to generate a regulatory matching evidence chain. Users can locate the corresponding regulation name, version identifier, chapter number, clause number, and original regulation location along the evidence chain, and verify the applicable conditions, restriction thresholds, and version correction process, thereby completing the regulatory text retrieval and intelligent matching.
[0139] Table 1 Simulation verification results of different legal text retrieval methods
[0140] The simulation results in Table 1 show that keyword retrieval and BM25 retrieval mainly rely on character overlap and word frequency relationships. They can achieve a certain recall effect when the object name, applicable conditions, and legal clauses are relatively straightforward. However, their ability to handle synonyms, hierarchical limitations, numerical thresholds, and exception clauses is weak. Specifically, the clause recall rate of keyword retrieval is 71.6%, while the accuracy rate of exception clause identification is only 52.7%. This indicates that relying solely on word matching is prone to missing semantically related but differently worded legal content, and it is also easy to regard clauses with similar words but inconsistent applicable conditions as valid results.
[0141] After introducing semantic encoding, the recall rates of the BERT dual-tower model and the original ColBERT model increased to 85.7% and 89.6%, respectively, while the accuracy rates for judging applicable conditions reached 78.3% and 83.1%, respectively. This indicates that semantic representation and word-level interaction can improve the matching effect between natural language retrieval requests and regulatory clauses. However, the above methods do not establish specific constraints for the validity period of regulations, product categories, usage methods, usage locations, restriction thresholds, and exception conditions. Therefore, the accuracy rates for judging numerical constraints, version identification, and exception clause identification are still below 80%, making it difficult to stably handle scenarios with coexisting regulatory versions and conditional application.
[0142] The method of this invention achieves a clause recall rate of 94.8%, which is 5.2 percentage points higher than the original ColBERT model; the accuracy of applicability condition judgment reaches 92.6%, which is 9.5 percentage points higher than the original ColBERT model. These results demonstrate that by enhancing lexical features through a hierarchical regulatory path and utilizing a regulatory applicability condition gating matrix to constrain applicable regions, object categories, product categories, usage methods, usage locations, and regulatory validity periods, it is possible to effectively suppress candidate regulatory semantic units that are textually similar but actually inapplicable.
[0143] The accuracy rates of numerical constraint judgment, version identification, and exception clause identification of the method of this invention reach 94.1%, 91.8%, and 90.7%, respectively, which are significantly higher than other methods. This indicates that by unifying the units of measurement and comparing the relationships between the constraint parameters and the constraint thresholds, and by correcting the matching results in conjunction with the relationship between regulatory versions and the triggering results of exception conditions, it is possible to reduce erroneous judgments caused by numerical differences, invalid regulations, version substitution, or failure to identify negative conditions. The evidence chain completeness rate reaches 95.2%, indicating that this invention can continuously associate the characteristics of the search object, the recall source, the legal semantic units, the condition judgment results, and the correction basis, providing a complete basis for the location, interpretation, and manual review of the regulatory matching results.
[0144] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for legal text retrieval and intelligent matching based on semantic understanding, characterized in that, Includes the following steps: S1. Collect the main text of the regulations, the attachments to the regulations, and the documents for changing the regulations. Standardize the format and extract the name of the regulations, the level of legal force, the date of publication, the date of effective date, the date of expiration, the version identifier, and the version relationship to obtain a set of versioned regulatory texts that carry the version attributes and the effective period of the regulations. S2. Divide the set of versioned regulatory texts according to the hierarchical structure and semantic integrity of the regulatory texts, extract the regulatory objects, regulatory behaviors, applicable conditions, restriction thresholds, exception conditions and reference relationships, and obtain a set of regulatory semantic units with associated regulatory hierarchical paths, regulatory version attributes and original regulatory locations. S3. Receive regulatory search requests, parse object attributes, target regulatory issues, applicable regions, search base dates and limiting parameters to obtain a set of regulatory search object features; S4. Based on the feature set of the regulatory retrieval object, perform object identification recall, semantic recall, and scope of application filtering on the set of regulatory semantic units to obtain a set of candidate regulatory semantic units carrying the recall source; S5. Input the feature set of the regulatory retrieval object and the set of candidate regulatory semantic units into the improved ColBERT regulatory semantic matching model, and perform hierarchical lexical encoding, applicable condition gating, lexical similarity interaction, numerical constraint judgment and exception condition correction to obtain the initial regulatory matching result set. S6. Determine the validity status of the regulatory version based on the search benchmark date, the validity period of the regulation and the version relationship, determine the priority of regulatory conflicts based on the clause citation relationship, correct the initial regulation matching results accordingly and record the basis for correction, and obtain the regulation matching result set. S7. Generate a legal matching evidence chain by associating the legal matching result set with the legal semantic unit, associated clauses, applicable conditions and correction basis, and update the applicable conditions, restriction thresholds and exception conditions attributes in the legal semantic unit according to user feedback.
2. The method for legal text retrieval and intelligent matching based on semantic understanding according to claim 1, characterized in that, S2 includes the following steps: S21. Identify the legal title, chapter titles, clauses, provisions, appendices, and table of contents entries to construct the hierarchical structure of the legal text; S22. Divide the legal text according to the hierarchical structure and semantic integrity of the legal text, and record the legal name, chapter number, clause number, paragraph number and character range to form the original location of the legal text; S23. Extract the standard object, standard behavior, applicable region, object category, product category, usage method, usage location, restriction threshold and exception conditions, and identify the reference direction, supplementary relationship, exclusion relationship and subordinate relationship; S24. Associate the extracted content, identification relationships, regulatory hierarchy paths, regulatory version attributes, regulatory validity periods, and original regulatory locations with the corresponding regulatory text fragments to obtain a set of regulatory semantic units.
3. The method for legal text retrieval and intelligent matching based on semantic understanding according to claim 1, characterized in that, S3 includes the following steps: S31. Receive regulatory search requests formed from natural language questions, product information, raw material information, formula information, or filing information; S32. Identify the object name, object alias, object identifier, object category, product category, usage method, and usage location to form object attributes; S33. Extract target regulatory issues, applicable regions, and retrieval reference dates; identify concentration, dosage, content, purity, duration, or frequency of use to form limiting parameters; S34. By structuring and associating object attributes, target regulatory issues, applicable regions, retrieval base dates, and limiting parameters, a feature set of regulatory retrieval objects is obtained.
4. The method for legal text retrieval and intelligent matching based on semantic understanding according to claim 1, characterized in that, S4 includes the following steps: S41. Based on the object name, object alias and object identifier, perform object identifier recall in the set of legal semantic units to obtain the first recall set; S42. Generate a retrieval semantic vector based on the target legal issue and object attributes, perform semantic recall in the legal semantic unit set, and obtain a second recall set; S43. Filter the first recall set and the second recall set according to the applicable region, retrieval reference date, object category, product category, usage method and usage location; S44. Merge the filtered first and second recall sets, remove duplicate regulatory semantic units and retain the recall source to obtain a candidate regulatory semantic unit set.
5. The method for legal text retrieval and intelligent matching based on semantic understanding according to claim 1, characterized in that, S5 includes the following steps: S51. Encode the feature set of the regulatory retrieval object by retrieval terminology, and encode the candidate regulatory semantic units by hierarchical terminology according to the regulatory hierarchy path to obtain the retrieval terminology feature sequence and hierarchical regulatory terminology features. S52. Compare applicable regions, object categories, product categories, usage methods, and usage locations, and determine whether the search reference date is within the effective period of the regulations, and generate a regulatory application condition gating matrix; S53. Using the gating matrix constraint of applicable regulations, retrieve the word-level similarity interaction between word feature sequences and hierarchical legal word features to obtain word interaction matching results; S54. Unify the units of measurement for limiting parameters and thresholds and compare their relationships to obtain the numerical constraint judgment results; identify whether the regulatory retrieval object triggers the exception conditions and obtain the exception condition triggering results; combine the word interaction matching results to determine the initial matching score, initial applicable status and initial matching ranking, and obtain the initial regulatory matching result set.
6. The method for legal text retrieval and intelligent matching based on semantic understanding according to claim 5, characterized in that, S52 includes the following steps: S521. Extract object condition items from the feature set of legal retrieval objects, and extract legal condition items from each candidate legal semantic unit; S522. According to the applicable region, object category, product category, usage method and usage location, the corresponding object conditions and regulatory conditions are compared, and the search reference date is compared with the effective period of the regulations; S523. Determine the consistency, conflict, or missing status of the comparison results between each corresponding condition item and date to obtain the condition status sequence. S524. Map the consistent state, conflicting state, and missing state to pass value, inhibit value, and value to be verified, respectively. Arrange the mapped values according to the conditional state sequence to generate the regulatory application condition gating matrix.
7. The method for legal text retrieval and intelligent matching based on semantic understanding according to claim 1, characterized in that, S6 includes the following steps: S61. Determine the validity status of the regulatory version based on the validity period of the regulations corresponding to the search benchmark date and the matching results of each initial regulation; S62. Identify the revision, replacement, and repeal relationships between different regulatory versions based on the regulatory version attributes, and update the validity status of the regulatory versions; S63. Determine the priority of regulatory conflicts based on the relationship between general regulatory provisions, special regulatory provisions, main text provisions, annexes provisions, superior regulatory provisions and referenced regulatory provisions; S64. Based on the effective status of the regulatory version and the priority of regulatory conflicts, correct the initial applicable status and the initial matching score to obtain the final applicable status and the final matching score, form the final matching ranking and record the basis for correction, and obtain the regulatory matching result set.
8. The method for legal text retrieval and intelligent matching based on semantic understanding according to claim 7, characterized in that, S63 includes the following steps: S631. Identify the legal provisions that act on the same normative object and whose applicable conditions overlap, and obtain a set of legal provisions to be compared. S632. Construct a sequence of clause relationships based on the legal force level, applicable conditions, effective date, version relationship, and citation direction of the clauses to be compared; S633. Mark the priority relationship of special regulations, the priority relationship of later-effective regulations, the priority relationship of superior regulations, and the binding relationship of referenced regulations in the clause relationship sequence; S634. Determine the order of application of the regulatory provisions to be compared according to the marked priority and constraint relationships to obtain the regulatory conflict priority.
9. The method for legal text retrieval and intelligent matching based on semantic understanding according to claim 1, characterized in that, S7 includes the following steps: S71. Obtain the semantic units of the regulations associated with each regulation matching result, and read the corresponding regulation name, regulation version attribute and original regulation location; S72. Associate the legal semantic units with superior clauses, referenced clauses, applicable conditions, restriction thresholds, exception conditions, numerical constraint judgment results, exception condition triggering results, legal version validity status, legal conflict priority, and correction basis. S73. Generate a regulatory matching evidence chain based on the regulatory retrieval object feature set, recall source, regulatory semantic unit, condition judgment result and correction process; S74. Receive user confirmation, correction, deletion or supplementation operations on the regulatory matching results, generate user feedback data, and update the applicable conditions, restriction thresholds and exception conditions attributes in the regulatory semantic unit accordingly.
10. A method for legal text retrieval and intelligent matching based on semantic understanding according to claim 9, characterized in that, S73 includes the following steps: S731. Construct search evidence nodes from the object attributes, applicable regions, search benchmark dates, and restriction parameters in the feature set of the legal search object; S732. Construct the recall source, legal semantic unit, superior clause, cited clause, applicable conditions, limitation threshold and exception conditions as legal evidence nodes; S733, construct the judgment evidence node by the numerical constraint judgment result, the exception condition triggering result, the legal version validity status, the legal conflict priority, the correction basis, the final applicable status, the final matching score and the final matching ranking. S734. Establish a directed association according to the generation order and input-output relationship of the data corresponding to the retrieval evidence node, legal evidence node, and judgment evidence node, and generate a legal matching evidence chain.