A field-gated enterprise policy matching method and system

By using field gating and constraint heterogeneous graph construction, the problem of inconsistent field, object, and value types in the matching of enterprise policies and enterprise attributes is solved, and accurate matching calculation and result verification are achieved.

CN123158255APending Publication Date: 2026-11-24JIANGXI YIHE TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611406127.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies suffer from ineffective attention calculations due to inconsistencies in fields, objects, and value types when matching corporate policies with corporate attributes. Furthermore, the matching calculation results are difficult to verify based on the original text location and data source.

Method used

By using field gating methods, candidate indexes are generated and local semantic calculations are performed to construct a constraint heterogeneous graph. Hard constraint edges and soft constraint edges are used for message passing to ensure that the matching value participates in edge message calculation before graph representation, and the verification path is restored based on the actual message.

Benefits of technology

It effectively isolates attribute records that fail the field, object, and value type compatibility checks, improves the accuracy and efficiency of matching calculations, and ensures that the matching results can be verified according to the original text location and data source.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123158255A_ABST
    Figure CN123158255A_ABST
Patent Text Reader

Abstract

This invention discloses a field-gated enterprise policy matching method and system, involving data matching technology. To reduce invalid calculations of incompatible clause-to-attribute pairs and support matching verification, a candidate index is generated using a gating key composed of standard fields, constraint objects, and value types. For semantically compatible clauses, clause-to-attribute matching values ​​are calculated only in subsets of candidate attribute vectors. The same matching value is aggregated into a local semantic score S2 and written into soft constraint edges. Hard constraint edges are generated based on deterministic comparisons, and logical edges are generated according to the conjunction, disjunction, or conditional structure of the original text. The three types of edges use message transformation parameters differentiated by edge type, ensuring that edge attributes participate in message passing before the graph representation is formed. Pooling yields a policy graph representation Hp and an enterprise graph representation He, which are then fused with S2 to obtain a matching score. Verification paths for associated policy versions, original text locations, and data sources are generated based on message participation records. This invention is used for policy matching data processing and relationship verification calculations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer data matching, natural language processing, and relational graph data processing, and particularly to a method and system for matching enterprise policies based on field gating. Background Technology

[0002] Enterprise project policies are typically published in natural language text, and the policy side contains heterogeneous constraints such as region, industry, qualifications, numerical thresholds, time ranges, and multiple conditional logics. Enterprise data comes from records with different field structures, and field names, object granularity, value types, numerical units, and data points may be inconsistent. Computing each pair of policy clause vectors against each enterprise attribute vector generates a large number of invalid attention pairs that are incompatible across fields, objects, or value types. Existing matching schemes include keyword or rule matching, calculating policy condition matching degrees based on semantic models before traversing the knowledge graph, and initializing graph nodes using semantic encoding results before performing graph convolution. While these schemes can complete label comparison or graph relationship reasoning, if semantic computation is not constrained by fields, objects, and value types, local normalization may still absorb irrelevant attributes. If the clause-to-attribute matching values ​​are not written to the corresponding connecting edges before the graph representation is formed, or if the edges in the graph only represent general entity relationships, it is difficult to determine whether specific semantic values ​​actually participate in graph message transmission, and it is also difficult to reconstruct the verification relationships containing the original policy text location and enterprise data source from the computation process. The difference in this invention lies not in the isolated use of single processing methods such as "hard constraints," "soft constraints," "field mapping," "semantic encoding models," or "graph neural networks," but in that: comparison pattern identification pre-divides deterministic comparison and local semantic computation; candidate indices jointly limit the local attention input and soft constraint edge endpoints; the matching value of the same clause to the attribute enters the local semantic score aggregation and soft constraint edge attribute respectively; and this edge attribute participates in message passing distinguished by edge type before the graph representation is formed. The above continuous data processing relationships jointly limit the computation input, graph topology, edge attributes, and node updates. Therefore, a data processing method is needed that structurally limits the data range participating in local attention computation, allows clause-level semantic results to enter edge message computation before the graph representation is formed, and can recover the verification path based on the actual message participation record. Summary of the Invention

[0003] This invention aims to solve the technical problems of inconsistent field, object, and value types between policy clauses and enterprise attributes, including invalid data pairs in the full clause-to-attribute attention calculation, lack of prior and subsequent data dependencies in clause-level semantic results and graph reasoning, and difficulty in verifying matching calculation relationships according to the original text position and data source.

[0004] Technical solution To address the aforementioned technical problems, this invention provides a field-gated enterprise policy matching method. The method includes the following steps.

[0005] S110: Obtain the policy text with the policy version identifier and the enterprise attribute data of the enterprise to be matched; divide the policy text into atomic policy clauses and generate clause records; map the enterprise attribute data to enterprise standard attribute records; the clause records and enterprise standard attribute records respectively store the standard field identifier, object identifier and value type; the clause records also store the comparison mode identifier and store the original text location or data source information.

[0006] S120 uses the same semantic encoding model to obtain policy clause vectors and enterprise attribute vectors respectively, so that the two types of vectors are in the same representation space.

[0007] S130: Form a clause gating key using the standard constraint field identifier, constraint object identifier, and value type of each atomic policy clause, and generate a candidate index according to the gating key compatibility rules; For atomic policy clauses with a comparison pattern identifier that is semantically compatible, read the candidate enterprise attribute vector based on the candidate index, calculate the attention log value and clause-to-attribute matching value only for the candidate enterprise attribute vector, and obtain the local semantic score S2 by aggregating the non-missing clause-level matching values.

[0008] S140: After obtaining the clause-to-attribute matching values, construct a constraint heterogeneous graph; for clause records whose comparison mode is identified as deterministic comparison, generate hard constraint edges carrying satisfied, unsatisfied, or missing states based on normalized attribute values, comparison operators, and constraint values; generate soft constraint edges only for clause-to-attribute pairs that pass the gating and whose comparison mode is identified as semantically adapted, and write the corresponding clause-to-attribute matching values ​​into the soft constraint edge attributes; generate logical edges based on conjunction, disjunction, or conditional structures in the original policy text.

[0009] S150: After the three types of edges are generated and their attributes are written, the graph message passing is performed using message transformation parameters that correspond to and are distinct from hard-constrained edges, soft-constrained edges, and logical edges, respectively. The nodes, edges, edge attributes, and layer identifiers that actually enter the edge message aggregation are recorded, and the policy clause nodes and enterprise attribute nodes are pooled to obtain the policy graph representation Hp and the enterprise graph representation He.

[0010] S160, the local semantic score S2, policy graph representation Hp, and enterprise graph representation He are fused to obtain a matching score, and a candidate item ranking is generated. In a preferred embodiment, a global semantic score S1 can also be calculated and fused with S2, Hp, and He.

[0011] S170, based on the message participation record, connects the actual entering edge message aggregation policy clause node, connecting edge and enterprise attribute node to generate a verification path, so that the verification path is associated with the policy version identifier, the original policy clause location identifier, the enterprise standard attribute field, the data time point and the data source field.

[0012] Beneficial effects Field gating occurs before attention logarithmic value calculation and normalization. Let m_s be the number of atomic policy clauses identified as semantically compatible in a single matching task, and let i = 1, 2, ..., m_s. Let n be the number of enterprise standard attribute records, and let I_i be the candidate attribute index set corresponding to the i-th atomic policy clause. Without field gating, attention logarithmic values ​​need to be assigned to m_s × n clause-attribute data pairs. After field gating, this method stores each candidate index set I_i and its corresponding candidate vector as a sparse candidate structure, assigning attention logarithmic values ​​only to data pairs satisfying j ∈ I_i. The total number of effective attention logarithmic values ​​is N_gate = Σ_(i=1)^(m_s)|I_i|. ​​For enterprise standard attribute records j ∉ I_i, no corresponding attention logarithmic value tensor element is assigned, no clause-attribute matching value is generated, and no corresponding soft constraint edge is formed. When at least one |I_i| is less than n, N_gate is strictly less than m_s×n, thereby isolating attribute records that fail the field, object, and value type compatibility checks at the data structure level.

[0013] For the i-th comparison mode identifier of an atomic policy clause that is semantically adapted, its soft constraint edge set is determined by the gated candidate indices and the clause-attribute matching values ​​corresponding one-to-one with the candidate indices, which can be represented as E_S,i={(c_i, a_j, s_ij)|j∈I_i and compare_mode(c_i)=SEMANTIC_MATCH}. Therefore, the soft constraint edge set is not fixed in advance before local semantic computation: the candidate index set I_i determines the endpoints of the soft constraint edges that can be generated; the comparison mode identifier determines that the endpoints adopt soft constraint edges rather than hard constraint edges; s_ij obtained from the pre-semantic computation constitutes the necessary edge attributes of the corresponding soft constraint edge record. Before s_ij is obtained, the corresponding soft constraint edge record cannot complete attribute assignment, nor can it enter the graph message passing as a data record with complete edge attributes.

[0014] The same clause-to-attribute matching value sij has two constrained data destinations: on the one hand, it aggregates by clause to form a clause-level matching value and further forms a local semantic score S2; on the other hand, it writes the soft constraint edge corresponding to the clause-to-attribute pair and enters the message function distinguished by edge type before the policy graph representation Hp and the enterprise graph representation He are formed. The two data branches reuse the results of the semantic calculation within the same candidate set, and there is no need to calculate a second set of clause-to-attribute semantic relationship values ​​separately for the graph branch; therefore, semantic processing and graph processing do not generate independent results separately and then concatenate them at the end.

[0015] This method executes the following steps in sequence: generation of clause records and enterprise standard attribute records, gating key matching, attention calculation within candidate subsets, determination of soft constraint edge endpoints and writing of sij, three types of edge message passing, and multi-layer representation fusion. If soft constraint edges are constructed before field gating and local semantic calculation, the endpoints of soft constraint edges cannot be determined based on the candidate index set I_i, nor can the sij edge attributes entering the message function be obtained. If sij is only used to form S2 without being written to soft constraint edges, subsequent node updates will no longer receive local semantic relation values. Therefore, the above execution order and data reuse relationship jointly limit the input of graph topology, edge attributes, and node updates.

[0016] The verification path is obtained by connecting nodes with a true participation status in the message participation record and linking them with policy version, original text location, enterprise standard attribute fields, data time point, and data source fields. This verification path reflects the actual data relationships entering the edge message aggregation and is not generated from data that did not participate in the calculation, nor is it replaced by natural language descriptions generated separately after the calculation is completed. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the enterprise project policy matching method according to an embodiment of the present invention.

[0018] Figure 2 This is a schematic diagram of the constraint heterogeneous graph structure according to an embodiment of the present invention.

[0019] Figure 3 This is a schematic diagram of the multi-layer representation fusion process according to an embodiment of the present invention.

[0020] Figure 4 This is a schematic diagram of the enterprise project policy matching system according to an embodiment of the present invention. Detailed Implementation

[0021] The technical solution of the present invention will be further described below with reference to the accompanying drawings. The model name, vector dimension, number of network layers, training parameters, and example threshold all represent possible implementation configurations and do not indicate that the corresponding training has been completed or that unverified performance data has been obtained; the processing relationship of the candidate set, soft constraint edge attributes, and message participation records is a necessary data dependency for this embodiment.

[0022] Data Acquisition and Structuring Policy texts can originate from web pages, text files, or parsable documents provided by the policy release platform. The system retains source fields such as policy name, issuing entity, applicable region, release date, and application deadline, and divides the main text into a set of policy clauses C={c1, c2, ..., cm} according to heading level, numbering items, and syntactic boundaries. Each policy clause retains at least the original text location identifier for subsequent verification.

[0023] For each atomic policy clause ci, a clause record RCI={clause_id, parent_id, policy_version, source_span, field_id, object_id, value_type, operator, constraint_value, unit, logic_group_id, logic_type, compare_mode} is generated. Here, source_span records the start and end character positions of the original text; field_id represents the standard constraint field; object_id represents the constraint object; value_type represents numeric, date, enumeration, boolean, long text, or directory description types; compare_mode is a deterministic decision field stored in the clause record, including the deterministic comparison flag EXACT_MATCH and the semantic adaptation flag SEMANTIC_MATCH. When value_type is an enumeration, numeric, date, or boolean type and operator can directly apply to normalized attribute values, compare_mode is set to EXACT_MATCH; when value_type is long text, directory description, or the clause condition cannot be directly calculated by the deterministic comparison operator, compare_mode is set to SEMANTIC_MATCH. This identifier is written according to the aforementioned type and operator rules when the clause record is generated. Subsequent diagramming stages directly read this identifier without further subjective judgment. Constraint relationships can include equal to, belong to, not belong to, greater than, greater than or equal to, less than, less than or equal to, contain, and semantically related.

[0024] In a deterministic parsing method, each entry in the field dictionary stores a field_id, an object_id, an allowed value_type, and synonymous expressions. The system performs longest matching on the clause character sequence to obtain candidate fields and objects; an operator dictionary is used to map "no less than", "not lower than", and "at least" to greater than or equal to, and to map "no more than" and "at most" to less than or equal to; a numerical value and unit expression is used to extract a constraint_value and a unit, and the dimension is converted according to a unit_rule. If the same character interval corresponds to multiple fields that cannot be resolved according to the longest matching and the clause hierarchy, the system marks the clause as pending confirmation, and does not automatically generate a deterministic hard constraint edge.

[0025] In a logical parsing method, the system determines a parent clause scope according to a heading hierarchy and a numbering boundary, converts "and", "meanwhile", and "as well as" into conjunction operators, converts "or" and "any one" into disjunction operators, and converts "if", "when...", and "under the condition of..." into conditional operators; then, a logic_group_id, a logic_type, and a sequence_index are generated by using an operator priority table and stack-based expression parsing. A sub-expression defined by parentheses or a semicolon generates a logical group before an outer expression.

[0026] In a clause position determining method, the system first performs newline unification and full-width / half-width character normalization on imported text, and simultaneously stores an offset mapping from normalized text character positions to original text character positions. The system identifies article-level boundaries by using a regular expression "^第[零○〇一二三四五六七八九十百\d]+条", identifies paragraph-level boundaries by using Chinese parenthesized serial numbers, and identifies item-level boundaries by using Arabic numerals followed by a dot, an enumeration comma, or a parenthesized numeral; a source_span of each atomic policy clause is jointly formed by a policy version identifier, a hierarchy serial number, normalized text start and end character positions, and corresponding original text start and end character positions. Thus, even if text undergoes format normalization before parsing, a verification path can still be located to the imported original policy text.

[0027] When a numbered clause includes multiple atomic conditions connected by conjunctions, disjunctions, or conditional sentence patterns, the system further splits the numbered clause into multiple atomic policy clause nodes according to conjunction boundaries. Each atomic policy clause node stores a parent clause identifier, original text start and end character positions, and a logical group identifier; the system establishes a logical edge between corresponding atomic policy clause nodes according to the logical group identifier.

[0028] Enterprise attribute data can include enterprise registration, industry, size, intellectual property, financial, and R&D data. Each enterprise standard attribute record (RAj) must include at least `attr_id`, `standard_field_id`, `object_id`, `value_type`, `normalized_value`, `unit`, `observed_at`, `source_id`, `source_record_id`, and `missing_state`. Each mapping record in the field mapping table must include at least `source_field_id`, `standard_field_id`, `object_id`, `value_type`, `unit_rule`, and `mapping_version`. Numerical values, proportions, and dates are normalized according to `unit_rule`; attributes that are unavailable, expired, or whose source records are unreadable are set to `missing_state`, without a presumed value.

[0029] Enterprise attribute data should be read from legally obtained data sources appropriate for the matching purpose, and the scope of readable fields should be controlled according to access permissions. `source_id` and `source_record_id` are used to locate data records and do not replace verification of data access permissions; for unauthorized fields, their attribute values ​​should not be read and their unavailable status should be set.

[0030] Standard field mapping table and gate key For atomic policy clause c_i, the system uses K_i=(field_id_i, object_id_i, value_type_i) as the clause gating key; for enterprise standard attribute record RA_j, the system uses K'_j=(standard_field_id_j, object_id_j, value_type_j) as the attribute gating key. The system calls the compatibility function compatible(K_i, K'_j) according to the preset compatibility rules to generate a candidate index set I_i={j|compatible(K_i, K'_j)=1}.

[0031] The `compatible(K_i, K'_j)` value is 1 if and only if the following conditions are met simultaneously: `field_id_i` is the same as `standard_field_id_j`, or a valid mapping record corresponding to the `mapping_version` used in this matching task exists in the field mapping table; `object_id_i` is the same as `object_id_j`, or a pre-defined hierarchical compatibility relationship exists in the object compatibility table; `value_type_i` and `value_type_j` are allowed to perform the same deterministic comparison or semantic alignment operation. Similarity in plain text of field names does not directly constitute a gate pass condition.

[0032] When compare_mode is SEMANTIC_MATCH, only enterprise standard attribute records with available normalized attribute values ​​and whose missing_state is not ORIGINAL_NULL, CLEANED_EMPTY, or NOT_APPLICABLE are written to I_i to avoid generating semantic vectors and soft constraint edges for missing attributes. When compare_mode is EXACT_MATCH, compatible attribute records with missing states are allowed to be written to I_i to generate hard constraint edges carrying missing states in deterministic comparison branches. The above branching rules are jointly controlled by the deterministic values ​​of compare_mode and missing_state.

[0033] Field mapping tables and object compatibility tables are identified by version numbers. Within a single matching task, the policy version, field mapping version, and enterprise data snapshot identifier remain fixed and are associated with the inference task identifier, ensuring that the same inputs can be re-executed according to the same mapping rules.

[0034] The field mapping table is a versioned data structure maintained internally by this system and does not use the field names of external data services as the standard. Candidate mappings can be generated from field aliases, source data patterns, and field descriptions, but only valid mapping records are written after the source field type, target value type, unit conversion rules, and object identifier have all passed verification; the same combination of source system identifier, source field identifier, and mapping version corresponds to at most one valid standard field. When there are name conflicts, unit conflicts, or semantic uncertainties, the mapping status is set to CONFLICT or UNMAPPED, and the mapping is excluded from the automatic gating conditions. NULL, cleansing null flags, and business inapplicability flags in external data are converted to ORIGINAL_NULL, CLEANED_EMPTY, and NOT_APPLICABLE's missing_state, respectively, and the string "" is not converted to "" in the missing_state. <na>" or "N / A" are used as comparable normalized attribute values.

[0035] Semantic encoding and optional global semantic score The semantic encoding model receives a text sequence and outputs a fixed-dimensional vector. As one implementation, the semantic encoding model includes three sequentially connected processing parts: token embedding, self-attention encoding, and pooling. Policy clauses c_i are encoded to obtain a policy clause vector p_i; enterprise attributes a_j are constructed by concatenating standard field names and normalized attribute values ​​to form attribute description text, which is then processed by the same semantic encoding model to obtain an enterprise attribute vector e_j. Using the same semantic encoding model ensures that the two vector sets reside in the same representation space. In a preferred embodiment, the policy clause vectors are aggregated according to clause type weight α_i to obtain a global policy vector P, and the enterprise attribute vectors are aggregated according to attribute field weight β_j to obtain a global enterprise vector E: P = Σ_i(α_i·p_i) / Σ_iα_i; E = Σ_j(β_j·e_j) / Σ_jβ_j. When both Σ_iα_i and Σ_jβ_j are greater than 0, and the L2 norms of P and E are not less than a preset positive number ε, the global semantic score S1 is calculated using cosine similarity: S1=(P·E) / (‖P‖2·‖E‖2). When the sum of any weight is not greater than 0, or the L2 norm of P or E is less than ε, no division is performed, and S1 is set to a preset finite scalar missing code. The weights α_i and β_j can be preset according to the field type, or obtained by training on samples with policy-enterprise matching labels; the weights, ε, and scalar missing codes are all saved in association with the model version and remain unchanged in the same matching task. The same set of determined weights is used in the matching task.

[0036] Item-level attention alignment and local semantic scores limited by candidate indexes For atomic policy clause c_i with compare_mode set to SEMANTIC_MATCH, the system queries the field mapping table and object compatibility table with version identifiers according to the clause gating key K_i, generates a candidate index set I_i, and reads a candidate attribute subset A_i={e_j|j∈I_i} from the enterprise attribute vector set. The candidate index set I_i simultaneously restricts the clause-attribute data pairs participating in attention calculation and the clause-attribute endpoints capable of generating soft constraint edges: the system only assigns attention pair values ​​to data pairs satisfying j∈I_i, and only allows these data pairs as endpoints of soft constraint edges; for data pairs j∉I_i, no corresponding attention pair values ​​are assigned, and no soft constraint edges are generated. The system stores I_i and A_i as a sparse candidate structure; when batch calculations require a uniform tensor length, attention masking values ​​are only set for the padding positions in the sparse candidate tensors. For atomic policy clauses with compare_mode set to EXACT_MATCH, the system does not perform the attention calculation described in this paragraph, but instead enters the deterministic comparison branch based on the corresponding candidate index. For atomic policy clauses with compare_mode set to SEMANTIC_MATCH and I_i not empty, using the policy clause vector p_i as the query vector, and only using the enterprise attribute vector e_j in the candidate attribute subset A_i as the key vector and value vector, the attention log value e_ij, attention weight w_ij, clause-attribute matching value s_ij, and clause-level matching value s_i are calculated according to the following formulas: e_ij=(W_q·p_i)ᵀ(W_k·e_j) / √d_k; w_ij=exp(e_ij+M_ij) / Σ_(t∈I_i)exp(e_it+M_it); s_ij = w_ij·cos(W_p·p_i, W_e·e_j); s_i = Σ_(j∈I_i)s_ij. Where W_q and W_k are the query projection parameters and key projection parameters, respectively; d_k is the dimension of the query vector and key vector after projection; W_p and W_e are the vector transformation parameters used for cosine calculation. All these parameters can be determined through training or preset. M_ij for valid candidate positions is set to 0, and the padding positions in the batch candidate tensor use masking values ​​sufficient to make the corresponding weights zero after Softmax normalization. When the L2 norm of W_p·p_i or W_e·e_j participating in the cosine calculation is less than a preset positive number ε, the corresponding s_ij is set to a finite value of 0, and cosine division is not performed; ε is saved in association with the model version and remains unchanged within the same execution baseline. s_ij corresponds one-to-one with specific clause-attribute data pairs, and s_i is the sum of the candidate attribute matching values ​​corresponding to the same clause. If I_i is empty, Softmax normalization is not performed, s_i is set to the preset finite scalar missing code, the clause is excluded from S2 aggregation, and no soft constraint edge corresponding to the clause is generated.

[0037] Field-Gated Computation Volume Embodiment Assume that one matching task includes m_s atomic policy clauses whose compare_mode is SEMANTIC_MATCH and n enterprise standard attribute records, and the atomic policy clauses are sequentially numbered as i=1, 2, ..., m_s. Full pairwise computation requires allocating attention pair value elements for m_s×n clause-attribute data pairs. After adopting candidate index reading, it is only necessary to allocate and calculate attention pair values for N_gate valid candidate data pairs, where: N_gate=Σ_(i=1)^(m_s)|I_i|, and N_gate≤m_s×n. When at least one |I_i| is smaller than n, N_gate<m_s×n. The system may store m_s, n, the element quantity |I_i| of each candidate index set, and N_gate in the inference task record to review whether the candidate index actually changes the attention computation domain and its tensor element quantity.

[0038] Data Structure Implementation of Sparse Candidate Tensor In one sparse implementation, the candidate index sets I_i of m_s semantic matching clauses are sequentially concatenated according to clause numbers into an attribute index array with a length of N_gate, and a clause index array with a length of N_gate is synchronously formed, where N_gate=Σ_(i=1)^(m_s)|I_i|. According to the two index arrays, the system performs index reading from the policy clause vector matrix and the enterprise attribute vector matrix respectively to obtain N_gate pairs of query vectors and key vectors, and only calculates attention pair values for the N_gate pairs of vectors. The system additionally stores a segment offset array row_ptr with a length of m_s+1. Let row_ptr[0]=0, and row_ptr[i]=Σ_(q=1)^i|I_q|, where i=1, 2, ..., m_s; the candidate index interval corresponding to the i-th semantic matching clause is represented by a semi-open interval [row_ptr[i-1], row_ptr[i]), and Softmax normalization is performed respectively in each candidate index interval. Thus, this embodiment does not pre-establish a dense attention pair value matrix or a dense mask matrix of m_s×n. Other embodiments may also adopt a coordinate list, compressed row index, or functionally equivalent variable-length index structure to implement the above correspondence. If a specific implementation first establishes a dense tensor of m_s×n and then zeros non-candidate positions through a mask, this implementation does not belong to the sparse implementation described in this paragraph of "not allocating non-candidate tensor elements".

[0039] wherein, I_valid is an atomic policy clause index set that simultaneously satisfies the following conditions: compare_mode is SEMANTIC_MATCH; the candidate index set I_i is non-empty; the clause-level matching value s_i is not a scalar missing code.

[0040] For each clause in I_valid, a clause weight γ_i greater than 0 is pre-assigned, and the local semantic score S2 is calculated according to the following formula: S2=Σ_(i∈I_valid)(γ_i·s_i) / Σ_(i∈I_valid)γ_i. Since all γ_i are greater than 0, when I_valid is not empty, the denominator Σ_(i∈I_valid)γ_i is greater than 0. When I_valid is empty, the above division is not performed, and S2 is set to the pre-defined finite scalar missing code. The clause weight γ_i, scalar missing code, and their encoding rules are all saved in association with the model version and remain unchanged within the same execution baseline.

[0041] Construction of constrained heterogeneous graphs Construct a constrained heterogeneous graph G=(V, E, T). The node set V includes policy clause nodes Vp and enterprise attribute nodes Ve; the edge type set T includes at least hard constraint type H, soft constraint type S, and logical type L. The initial feature of policy clause nodes is the corresponding policy clause vector, and the initial feature of enterprise attribute nodes is the corresponding enterprise attribute vector. Each edge record includes at least edge_id, source_node_id, target_node_id, edge_type, edge_attribute, gate_key or logic_group_id, and the corresponding data generation step identifier.

[0042] When the compare_mode of an atomic policy clause is EXACT_MATCH, only gated clause-to-attribute pairs undergo a deterministic comparison of the corresponding type, and hard constraint edges are established. Numerical types are compared using a standardized numerical value and comparison operators; date types are judged based on a standardized date format to determine if they fall within a time interval; enumerated types are judged based on whether the standard enumeration code belongs to the constraint set; and boolean types are judged based on the standard boolean value. A satisfied state is written when a valid attribute value exists and the comparison is true, a dissatisfied state is written when the comparison is false, and a missing state is written when missing_state is true. The comparison state codes of hard constraint edges correspond one-to-one with the comparison states; for example, satisfied, dissatisfied, missing, and inapplicable can be encoded as SATISFIED, UNSATISFIED, MISSING, and NOT_APPLICABLE respectively, or functionally equivalent fixed enumeration values ​​can be used, but the encoding table remains unchanged within the same execution baseline.

[0043] When the compare_mode of an atomic policy clause is SEMANTIC_MATCH, soft constraint edges are only established for clause-to-attribute pairs that pass the clause gating key. The clause-to-attribute matching value sij, attention weight wij, clause gating key Ki, and comparison mode identifier corresponding to the clause-to-attribute pair are written into the soft constraint edge attributes. sij is obtained before the soft constraint edge is generated and is read by subsequent message functions. No soft constraint edges are established when compare_mode is not SEMANTIC_MATCH, the clause fails the gating, or the candidate set is empty.

[0044] For multiple atomic policy clauses within the same policy, logical groups are determined based on the parent clause identifier, the start and end positions of the original text, conjunctions, and conditional clauses. Directed logical edges are then established between policy clause nodes within the same logical group. Conjunctive and disjunctive edges connect nodes in the same group according to the original text order; conditional edges point from the condition's antecedent node to its consequent node. Logical edge attributes must at least store `logic_group_id`, `logic_type`, and `sequence_index`. When all atomic clauses in the same group have hard constraints, a logical grouping state is generated using a logical state table containing satisfied, unsatisfied, missing, and inapplicable states: in a conjunctive group, if any clause is unsatisfied, the group state is unsatisfied; if all clauses are satisfied, the group state is satisfied; if all clauses are unsatisfied, the group state is unsatisfied; otherwise, the group state is missing. In a disjunctive group, if any clause is satisfied, the group state is satisfied; if all clauses are unsatisfied, the group state is unsatisfied; otherwise, the group state is missing. The group states are also written into the logical edge attributes.

[0045] Data dependencies and execution time order The generation of clause records and enterprise standard attribute records precedes field gating. After field gating generates candidate indexes, the system reads `compare_mode` to perform deterministic splitting: for `EXACT_MATCH` clauses, it reads normalized attribute values ​​based on the candidate indexes and performs deterministic comparisons; for `SEMANTIC_MATCH` clauses, it reads candidate enterprise attribute vectors based on the candidate indexes and calculates clause-to-attribute matching values. After completing the corresponding comparisons or local semantic calculations, the system establishes hard constraint edges or writes soft constraint edges to `sij`; after the three types of constraint edges are constructed and assigned values, graph message passing by relation type is executed. Thus, the candidate indexes determine the available data pairs and edge endpoints, `compare_mode` determines whether to allocate attention pairs and the type of generated constraint edges, and the clause-to-attribute matching values ​​determine the soft constraint edge attributes, which then serve as input to the message function for node feature updates.

[0046] The matching value from the same clause to the attribute participates in the aggregation of clause-level matching values ​​and local semantic scores S2, and is also written into the soft constraint edges corresponding one-to-one with the clause-to-attribute pair. Therefore, the semantic processing results and the graph processing results are not generated independently before being combined at the end; before the graph representations Hp and He are formed, the local semantic calculation results have already participated in graph message passing through soft constraint edges.

[0047] Model Network and Parameter Configuration Examples The following provides a possible model network and parameter configuration to illustrate the implementation of the aforementioned data structure and processing relationships. It does not imply that this configuration has been used for training or to achieve specific performance. The semantic encoding model can use the Chinese RoBERTa-wwm-ext basic model. The policy clause text and the enterprise attribute text, composed of standard field names and normalized attribute values, can be truncated or padded to no more than 256 tags. In one optional implementation, the semantic encoding model outputs a 768-dimensional policy clause vector and an enterprise attribute vector; this dimension is used to determine the input dimension of subsequent projection parameters and initial features of graph nodes. When using other semantic encoding models with fixed output dimensions, the dimensions of the projection parameters and message transformation parameters can be adjusted accordingly. Field gating is performed based on standard field identifiers, constraint object identifiers, and value types; soft constraint edges are constructed based on the clause-attribute matching value s_{ij} calculated from the candidate index and semantic encoding results; verification paths are generated based on message participation records. Therefore, the above processing relationships are not necessarily limited by the name of a specific semantic encoding model or the exemplary 768-dimensional dimension.

[0048] In an optional configuration, the constrained heterogeneous graph can employ a two-layer relational graph convolutional network to perform message passing. When each edge is stored in two directions, independent parameters can be set for different directions, or parameters can be shared if the direction identifier is used as an edge attribute input. For each layer, hard-constrained edges, soft-constrained edges, and logical edges use three independent 768×768-dimensional weight matrices: W_H, W_S, and W_L, respectively. The comparison state of hard-constrained edges, the clause-to-attribute matching value and attention weight of soft-constrained edges, and the logical type and logical grouping state of logical edges are converted into edge attribute representations via attribute mapping matrices corresponding to the edge type.

[0049] For an edge u→v of relation type r, the edge message of layer l is calculated according to m_uv,r(l)=ReLU(W_r(l)·h_u(l)+U_r(l)·a_uv,r+b_r(l)), where a_uv,r is the corresponding edge attribute encoding, W_r(l) is the node transformation parameter corresponding to edge type r, U_r(l) is the edge attribute transformation parameter corresponding to edge type r, and b_r(l) is the bias parameter. The edge message pointing to node v is summed and aggregated. The aggregation result is added to the residual of the previous layer feature of node v and then normalized to obtain the next layer node feature. After the two layers of message transmission are completed, average pooling is applied to the policy clause node and the enterprise attribute node respectively to obtain 768-dimensional Hp and He. Other implementations can use heterogeneous graph attention networks, but the three types of edges should have parameters that distinguish them from each other and soft-constrained edge attributes should be included in the message calculation.

[0050] Numerical modulation relationship of soft-constrained edge attributes For soft-constrained edges, the edge attribute encoding a_uv,S can be set to at least contain the corresponding sij. The message function then reads this value before forming Hp and He. Keeping the source node features, relation type parameters, and biases unchanged, when sij is replaced from the first value to the second value, the difference between the two edge messages is determined by the transformation of the difference between the two edge attribute encodings by U_S and the activation function. When the parameter of U_S in the dimension corresponding to sij is non-zero and the two inputs are not mapped to the same output by the activation function, the edge message changes with sij. Taking the fixed message function TRACE_GATED_01 as an example, changing sij=0.995188 to 0 while keeping other inputs unchanged reduces the four components of the previous edge message by 0.099519 respectively. This numerical relationship is used to verify that sij has entered the message calculation and does not represent the accuracy, running speed, or memory saving ratio of the production model.

[0051] In a basic configuration, the scalar S2, the 768-dimensional Hp, and the 768-dimensional He can be sequentially concatenated to form a 1537-dimensional fusion input z0, and a first fully connected layer of 256×1537 dimensions and a second fully connected layer of 1×256 dimensions can be set. In a preferred configuration using a global semantic score S1, the scalar S1 can be appended to the fusion input to form a 1538-dimensional fusion input z1, and a first fully connected layer of 256×1538 dimensions can be set accordingly. The pre-trained semantic coding model can load publicly available pre-trained parameters; newly added graph network parameters and fusion parameters can be randomly initialized. The above dimensions and initialization methods are used to give an executable parameter shape and do not limit other configurations compatible with the input and output dimensions.

[0052] When using supervised training, a training sample can consist of a policy version and a snapshot of enterprise data at the same data point in time, saving the policy version identifier, enterprise data snapshot identifier, field mapping version, constraint status of each clause, and labels. Labels should indicate the fulfillment of policy eligibility requirements as verified by manual verification, rather than directly representing application success or failure; failures due to expired materials, incorrect document formats, quota limitations, or manual withdrawal should not be considered as disqualification labels. To reduce the risk of data leakage from the same enterprise to different datasets, training, validation, and test sets can be divided according to the enterprise entity.

[0053] In one optional training configuration, binary cross-entropy loss and the AdamW optimizer can be used, with a batch size of 16, a training epoch of 5, and a weight decay coefficient of 0.01; the initial learning rate of the semantic coding model can be set to 2 × 10⁻⁻⁶. 5 The initial learning rate for the newly added graph network and fusion layer can be set to 1×10⁻³. After training is complete and the validation results meet the deployment conditions, the parameters of the semantic coding model, graph network, and fusion layer can be frozen and deployed in the inference environment. This embodiment does not suggest that the above-mentioned optional values ​​have produced unverified accuracy or performance improvements.

[0054] Graph Message Passing by Relationship Type In the l-th graph message passing layer, for node v, messages are received from the neighboring node set Nr(v) for different edge types r. The node features hu(l), edge attributes auv,r, and relation type r of neighboring node u are input into the corresponding message function Mr(l) to obtain the edge messages. The edge messages are summed or weighted and then input into the update function U(l) together with the features of the previous layer of node v: mv(l) = Σr∈T Σu∈Nr(v) Mr(l)(hu(l), auv,r), hv(l+1)=U(l)(hv(l), mv(l)). Different edge types use mutually distinguishable transformation parameters to ensure that hard constraint comparison states, soft constraint semantic similarity, and logical relation types are not treated as the same relation. The number of graph message passing layers is pre-configured according to the size of the constraint heterogeneous graph and remains unchanged in a single matching calculation.

[0055] During graph message passing, message participation records are formed for the actual incoming edge message calculation and target node aggregation of the connecting edges. The message participation record includes at least the inference task identifier, source node identifier, target node identifier, edge identifier, edge type, edge attribute, message passing layer identifier, participation status, and message vector summary; data pairs that are gated out and for which no connecting edges are generated do not form message participation records with a participation status of true.

[0056] A participation status of true indicates that the corresponding edge has been read by the message function corresponding to its edge type in the message passing layer, the message function has formed an edge message based on the source node characteristics and edge attributes, and the edge message has been included in the aggregation operation of the target node. Edges that are only generated as records, only loaded into batches, or only have their attributes saved without being included in the target node aggregation are not set to a participation status of true.

[0057] The message vector digest can be the edge message vector itself, a preset component or norm of the edge message vector, or a verification digest calculated from the normalized serialized edge message record. In one optional normalization method, the system rounds finite floating-point numbers to six decimal places according to precision_mode, prohibiting NaN or infinite values ​​from participating in the digest; the record fields are arranged in ascending order according to the Unicode code points of the field names, and the array elements are arranged in ascending order according to edge_id and layer, using JSON format without meaningless spaces and encoded as a UTF-8 byte sequence, and then the digest is calculated using SHA-256. The message participation record simultaneously saves the serialization rule version and digest algorithm identifier, enabling the same edge message to be repeatedly calculated and verified; the digest is only used to prove that the corresponding edge attribute actually entered the message calculation of that layer, and does not replace the matching score.

[0058] After completing the message transmission of the predetermined number of layers, the update features of the policy clause nodes are pooled to obtain the policy graph representation Hp, and the update features of the enterprise attribute nodes are pooled to obtain the enterprise graph representation He. Pooling can be average pooling, max pooling, or attention pooling, but the policy clause nodes and enterprise attribute nodes are pooled separately.

[0059] Multi-layer representation fusion and verification output In the basic implementation, the local semantic score S2, the policy graph representation Hp, and the enterprise graph representation He are concatenated in a predetermined order to form the fusion input z0: z0 = concat(S2, Hp, He). In a preferred implementation, S1 can also be calculated according to the above-described global semantic score calculation method, and S1 is concatenated with S2, Hp, and He to form the fusion input z1: z1 = concat(S1, S2, Hp, He). The actual fusion input z0 or z1 is denoted as z*. The fusion input z* undergoes at least one fully connected transformation and output transformation to obtain the matching score y. For example: y = σ(W2·φ(W1·z*+b1)+b2), where φ is a nonlinear function, and σ is used to map the output to the score. The fusion parameters can be obtained by training with samples bearing matching labels, or by using predetermined fixed weights; under the fixed weight method, each input component adopts a consistent weight configuration in the same matching task.

[0060] When calculating matching scores for multiple policy items for the same enterprise, candidate items can be generated and sorted according to their matching scores. For each policy item, the verification module filters edge records with a true participation status from the message participation records, connects adjacent edge records according to the source node identifier and target node identifier, forming a candidate path containing at least one policy clause node, one connecting edge, and one enterprise attribute node; then, the verification path is determined according to preset path selection rules. Along the verification path, the logical structure type from hard constraint status and soft constraint edge clauses to attribute matching values ​​or logical edges is read, along with the policy version, original text location, enterprise standard attribute fields, data time point, and data source fields. The verification path is used to verify the actual data relationships entering message aggregation and is not presented as the sole causal explanation for the final matching score.

[0061] Reasoning process and verification output execution record In a single matching inference, the system executes the following sequence, associating records at each stage with the same inference task identifier. The first step is data acquisition and formatting. The system can acquire enterprise attribute input from authorized data interfaces, local business databases, or pre-constructed test data files, and convert it into standard JSON objects. Each attribute object includes at least the following fields: standard_field_id, object_id, value_type, normalized_value, unit, observed_at, source_id, source_record_id, and missing_state. The system also reads the policy text with a policy version identifier. This embodiment does not use interface call logs that have not yet occurred as implementation facts.

[0062] The second step involves candidate indexing and local computation. The system generates a candidate index array based on the clause gating key. For clauses with `compare_mode` set to `SEMANTIC_MATCH`, candidate vectors are read from the enterprise attribute vector set based on the candidate indexes and a sparse candidate structure is constructed. Attention pairs are generated only for valid candidate pairs. The valid positions `Mij` in the batch candidate tensor are set to 0, and the filling positions `Mij` are set to negative infinity or a negative number sufficient to make the normalized weights zero. The system calculates the `sij` of each valid candidate pair and aggregates them to obtain `si`. When the candidate set is empty, Softmax is skipped, `si` is written as a missing code and excluded from S2 aggregation, and no soft constraint edges are generated. For clauses with `compare_mode` set to `EXACT_MATCH`, the system enters the deterministic comparison branch based on the candidate indexes, but attention computation is not performed.

[0063] The third step is graph construction and message passing. The system instantiates policy clause nodes and enterprise attribute nodes in memory. For clause records with `compare_mode` set to `EXACT_MATCH`, hard constraint edges are generated based on the deterministic comparison results. For clause records with `compare_mode` set to `SEMANTIC_MATCH` and gated, the `sij` values ​​obtained in the second step are written to the corresponding clauses and attribute soft constraint edges. Logical edges are generated based on the original policy text's logical structure. During graph message passing, the system records each edge that actually enters edge message calculation and target node aggregation layer by layer. The message participation record includes inference task identifier, layer identifier, source node index, target node index, edge index, edge type, edge attribute, message vector summary, and participation status.

[0064] The fourth step is fusion and verification generation. When using training parameters, the system calculates the matching score using parameters frozen after meeting deployment conditions; when using preset fixed weights, the system calculates the matching score using fixed parameters in the same matching task. The verification module constructs candidate paths from message participation records with a true participation status, and sorts them according to at least one preset path selection metric among hard constraint priority, soft constraint edge weight, path length, or message vector norm, selecting a preset number of K_path verification paths; when the number of candidate paths is less than K_path, all candidate paths are output. K_path is a preset positive integer. The path selection metric is only used to select verification paths from the actual data relationships involved in the calculation and is not described as the sole causal contribution of each path to the final matching score.

[0065] Repeatable reference execution record. To verify the data control relationship of this invention, a reference calculation is performed once using the fixed test fixture TRACE_GATED_01. This record is not an external interface log, does not use a real company name, and does not claim to be the output of the training model; the four-dimensional vector is only used to make each intermediate value manually recalculated. The compare_mode of the test policy clause C_TEST_SOFT is SEMANTIC_MATCH, and the gate keys are TECH.FIELD_MATCH, TECH_SCOPE, and ENUM_TEXT; the standard fields of the enterprise attribute A_TEST are TECH.FIELD_DESC, the object is TECH_SCOPE, and the value type is ENUM_TEXT. The field mapping version FM_TRACE_01 maps the two to compatible fields. The fixed query vector is [0.8, 0.1, 0.4, 0.4], and the fixed candidate attribute vector is [0.75, 0.15, 0.35, 0.45].

[0066] This execution generates a candidate index set I_i that points only to the enterprise attribute record A_TEST, and assigns only one attention pair value to the data pair (C_TEST_SOFT, A_TEST). Since there is only one valid position in the candidate index set, the normalized attention weight is 1.000000. The cosine value of the two fixed vectors is actually calculated to be 0.995188, so the clause-attribute matching value s_ij = 0.995188. The local semantic score branch reads this value to form the clause-level matching value of this clause and further forms S2; the soft constraint edge branch writes the same value to the edge E_SOFT_01. When the soft constraint edge node in the test fixture is transformed into an identity mapping and the edge attribute is mapped to a vector with each dimension increased by 0.1×s_ij, the actual edge messages entering the first-level aggregation are [0.849519, 0.249519, 0.449519, 0.549519]. The normalized JSON used for digest calculation is: {"edge_id":"E_SOFT_01","layer":1,"message":["0.849519","0.249519","0.449519","0.549519"],"participated":true,"run_id":"TRACE_GATED_01","sij":"0.995188"}. After being encoded into a byte sequence using UTF-8, the SHA-256 digest of this JSON is: 9d3af244f2a8fb697c9785981f92a8391c938a7ab092cdd8f47b0e93d5622913. The message participation record saves run_id=TRACE_GATED_01, edge_id=E_SOFT_01, layer=1, s_ij=0.995188, participated=true, and the aforementioned summary.

[0067] The verification path generated from the message participation record is: PV_TRACE_01#C_TEST_SOFT and its original position identifier → E_SOFT_01 (sij=0.995188, layer=1) → TECH.FIELD_DESC → TEST_FIXTURE_01. After deleting the compatible mapping of FM_TRACE_01 during the comparison execution, the candidate index is empty, the number of assigned attention logs changes from 1 to 0, E_SOFT_01 is not generated, the edge does not exist in the message participation record, and the verification path does not contain A_TEST. This comparison result shows that the distinguishing feature changes the attention tensor allocation, graph topology, message input, and final verifiable output, rather than just changing the interface text.

[0068] Dual-candidate attention can be repeatedly referenced from execution records. To demonstrate attention allocation and S2 aggregation when the candidate attribute subset contains multiple records, reference calculations are performed using the fixed test fixture TRACE_GATED_02. The compare_mode of the test policy clause C_TEST_MULTI is fixed at SEMANTIC_MATCH; both enterprise attribute records A_TEST_1 and A_TEST_2 are gated by field, object, and value type, with a candidate index set of I_i={1, 2}, pointing to A_TEST_1 and A_TEST_2 respectively, hence |I_i|=2. This record is only used to recalculate control flow and intermediate values ​​and does not represent real enterprise data or production model output.

[0069] Let the fixed policy clause vector be pi = [1.0, 0.0, 0.0, 0.0], and the candidate attribute vectors be ej1 = [1.0, 0.0, 0.0, 0.0] and ej2 = [0.0, 1.0, 0.0, 0.0]. To align with the aforementioned attention formula, let the projection dimension dk = 1 for both the query and key, and let Wq = Wk = [1.0, 0.0, 0.0], thus Wq·pi = 1.0, Wk·ej1 = 1.0, Wk·ej2 = 0.0, and √dk = 1; let Wp and We be four-dimensional identity matrices. The mask values ​​for both valid candidate positions are 0.

[0070] The attention logarithms are ei1 = 1.000000 and ei2 = 0.000000. The denominator of the Softmax is exp(1) + exp(0) = 3.718281828, so wi1 = 0.731058579 and wi2 = 0.268941421. The cosine values ​​are cos(Wp·pi, We·ej1) = 1.000000 and cos(Wp·pi, We·ej2) = 0.000000, therefore si1 = wi1 × 1.000000 = 0.731058579 and si2 = wi2 × 0.000000 = 0.000000; the clause-level matching value of this clause is si = si1 + si2 = 0.731058579. When the test set contains only the non-missing clause and the clause weight is 1, S2 = 0.731058579.

[0071] The two endpoints of the candidate index generate soft constraint edges E_SOFT_01 and E_SOFT_02 respectively: E_SOFT_01 connects C_TEST_MULTI and A_TEST_1 and writes si1=0.731058579, E_SOFT_02 connects C_TEST_MULTI and A_TEST_2 and writes si2=0.000000. When a fixed message function is used, which transforms nodes into identity mappings and maps edge attributes to vector components with an additional 0.1×sij, the messages for the two edges entering the first-level aggregation are [1.073106, 0.073106, 0.073106, 0.073106] and [0.000000, 1.000000, 0.000000, 0.000000], respectively. The corresponding message participation records all save run_id=TRACE_GATED_02, layer=1, and participated=true, and save their respective sij and the aforementioned complete message vector as message digests.

[0072] This record indicates that in the case of multiple candidates, both data pairs in the candidate set enter the same Softmax denominator, resulting in mutually related attention weights; the two sijs are first aggregated according to the terms to form S2, and then written into two soft constraint edges one by one according to the candidate endpoints. The sij of E_SOFT_02 being 0 is not equivalent to the edge not existing: the edge still has message records with the participation state being true; the soft constraint edge and its message records are not generated only when the corresponding candidate endpoint is excluded by gating.

[0073] As a test data example, an output record can be represented as: [Policy Version PV_TEST_01; Original Text Location P12-C12-1] → [Hard Constraint Edge H_REG: Satisfied; Second-Level Participation] → [Enterprise Standard Field ENT.REG_DATE: 2018-05-01; Data Time Point T1] → [Test Data Record TEST_T1_REG_DATE]. This identifier indicates the data association between the anonymized test input objects, but does not indicate that a real external interface call has been completed. Business personnel can review and compare the process based on the policy version, original text location, and source record.

[0074] Symbolization Processing Example The following uses symbolic data relationships to illustrate the construction of a constraint heterogeneous graph and the generation of verification paths. Suppose a policy includes a geographical clause C1, an R&D investment threshold clause C2, and a technology direction clause C3; enterprise data includes a registered address attribute A1, an R&D investment ratio attribute A2, and a main technology direction attribute A3. Hard constraint edges are established between C1 and A1, and between C2 and A2, with edge attributes generated by corresponding enumeration comparisons and numerical comparisons; soft constraint edges are established between C3 and A3, with edge attributes generated by semantic alignment; if C1 and C2 are simultaneously satisfied in the original policy text, then a conjunctive logical edge is established between C1 and C2. The above nodes and edges participate in graph message passing, and the final verification path retains the correspondence between C1 and A1, C2 and A2, and C3 and A3.

[0075] Example of Enterprise Qualification Certification Application The following test input uses a de-identified policy text and a set of de-identified enterprise attributes to illustrate clause segmentation, field gating, deterministic comparison, and logical edge generation. This test data is intended to disclose the calculation steps and does not correspond to any specific real enterprise, does not indicate that external interfaces have been called, and does not represent the clause content as uniform legal conditions still valid on the application date. In actual operation, the original policy text and enterprise data snapshot imported and saved by the system will prevail.

[0076] The desensitized policy text is set as follows: Article 12 is the parent clause P12, and it contains clause-level segments (I) to (VIII); clause (V) further contains item-level segments 1 to 3. The system generates C12-1 to C12-8 according to the numbering boundaries of the clauses, clauses, and items, and generates C12-5-1, C12-5-2, C12-5-3, and C12-5-DOMESTIC under C12-5. The "must be satisfied simultaneously" condition in P12 causes C12-1 to C12-8 to be grouped into a conjunctive logical group; C12-5-1 to C12-5-3 respectively represent the conditional structure between the sales revenue range and the lower limit of the R&D expense ratio. Each node stores the policy version PV_TEST_01, the hierarchical number, and the start and end character positions of the original text. For example, the field in C12-1 is the year of registration, the operator is greater than or equal to, and the constraint value is 1 year; the field in C12-4 is the proportion of scientific and technological personnel, and the constraint value is 0.10; the antecedent of the condition in C12-5-1 is that the sales revenue in the most recent year is less than or equal to 50,000,000 yuan, and the consequent is that the proportion of R&D expenses in the most recent three fiscal years is greater than or equal to 0.05.

[0077] Suppose that the de-identified enterprise data snapshot T1 contains reg_date=2018 / 05 / 01, industry=manufacturing, revenue=32 million yuan, employee_count=85, rd_ratio=NULL, and is_high_tech=yes. Field mapping version FM_TEST_01 maps reg_date to ENT.REG_DATE and converts it to the date 2018-05-01; maps revenue to FIN.ANNUAL_REVENUE and converts it to 32,000,000 yuan (multiplied by 10,000); maps employee_count to HR.EMPLOYEE_COUNT; maps industry to ENT.INDUSTRY_CATEGORY and encodes it as C; and maps is_high_tech to ENT.HIGH_TECH_FLAG and encodes it as the boolean value true. For rd_ratio, the system generates the standard field FIN.RD_EXPENSE_RATIO_3Y, but normalized_value is not assigned a value, and missing_state is set to ORIGINAL_NULL. The company name, unified social credit code, and contact number are not fields corresponding to the gating keys of the above clauses and are not included in the candidate attribute subset of these clauses.

[0078] The eligibility benchmark date for the matching task is fixed at 2024-06-30. The system calculates the registration duration based on this benchmark date and 2018-05-01, generates a hard constraint edge H_REG between node C12-1 and ENT.REG_DATE, and writes the satisfied status. For C12-5-1, 32,000,000 yuan falls within the income range of less than or equal to 50,000,000 yuan, so the system generates a hard constraint edge indicating that the antecedent condition is satisfied. Since the missing_state of FIN.RD_EXPENSE_RATIO_3Y is ORIGINAL_NULL, the system generates a hard constraint edge for the consequent condition indicating a missing status, and establishes a conditional logic edge pointing from the antecedent node to the consequent node. The edge attributes enter the message function of their respective relation types and are written to the message participation record along with the original position, enterprise field, and TEST_T1 source record identifier.

[0079] Regarding the condition "the technology falls within the specified scope" in clause (iii), the anonymized data only provides ENT.INDUSTRY_CATEGORY, without providing the standard field corresponding to the technology field directory; there is no valid mapping record between the two in FM_TEST_01, therefore the field gating fails, the system does not assign attention logarithms to this clause and the industry attribute, nor does it generate corresponding soft constraint edges. For the original missing rd_ratio, the system retains the missing state instead of replacing it with 0; according to the logical state table, when the antecedent of condition C12-5-1 is satisfied but the consequent is missing, the condition grouping state is missing. This processing makes it distinguishable between unsatisfied conditions, missing original data, business inapplicability, and field incompatibility.

[0080] System and Equipment Examples The enterprise project policy matching system includes a data processing module 210, a semantic processing module 220, a heterogeneous graph processing module 230, and a fusion verification module 240. The data processing module 210 generates clause records and enterprise standard attribute records with standard fields, objects, value types, and compare_mode identifiers. The semantic processing module 220 generates candidate indexes according to the clause gating key, calculating attention and clause-to-attribute matching values ​​only for data pairs where compare_mode is SEMANTIC_MATCH and pointed to by the candidate indexes. The heterogeneous graph processing module 230 performs deterministic routing based on compare_mode, generating hard constraint edges for EXACT_MATCH clauses and writing the clause-to-attribute matching values ​​for SEMANTIC_MATCH clauses into the corresponding soft constraint edge attributes, and using mutually distinct message transformation parameters to perform message passing and form message participation records. The fusion verification module 240 merges S2, Hp, and He, and generates verification paths based on the message participation records, including associated policy versions, original text locations, standard attribute fields, data time points, and data source fields. In a preferred embodiment, the fusion verification module 240 can also calculate and fuse the global semantic score S1.

[0081] The aforementioned system can be deployed on a server or in a computing environment consisting of multiple computing nodes. The electronic device includes a processor, memory, and a communication interface; the computer program stored in the memory is executed by the processor to implement the aforementioned method. The computer program can also be stored in a non-transitory computer-readable storage medium.

[0082] Deterministic reasoning and reproducible control In one optional implementation, to improve the execution stability and result verifiability of the matching inference process, the system establishes an execution baseline record when performing the matching task. The execution baseline record includes at least the model version identifier (model_version), the field mapping table version identifier (mapping_version), the policy version identifier (policy_version), the enterprise data snapshot identifier (enterprise_snapshot_id), the numerical precision identifier (precision_mode), and the sorting rule version identifier (sort_rule_version); when it is necessary to distinguish the software operating environment, the runtime framework and operator library version identifier (runtime_version) can also be saved.

[0083] During forward matching inference, the system loads the fixed model parameters corresponding to `model_version` and sets the semantic encoding model, graph message passing network, and fusion network participating in this inference to the inference state. For random deactivation layers in the model, random deactivation is disabled in the inference state; for models with batch normalization layers, statistical parameters that are fixed together with the model version are read; for operators whose execution framework provides deterministic implementations, the corresponding deterministic implementations can be called.

[0084] The system sorts the candidate enterprise attribute records corresponding to each atomic policy clause according to a preset candidate sorting key. The candidate sorting key includes at least a clause identifier and an enterprise attribute record identifier. The soft constraint edge identifier is jointly determined by the policy version identifier, clause identifier, enterprise attribute record identifier, and edge type identifier, ensuring a stable correspondence between candidate records and soft constraint edges under the same execution baseline. When multiple candidate paths have the same path selection criteria, the system first sorts them according to the path selection criteria, and then according to the edge identifier or node identifier to determine the output order of parallel paths.

[0085] Under the condition that the policy version, enterprise data snapshot, model version, field mapping table version, numerical precision, and sorting rules are all the same, the system repeatedly generates the same candidate index and constraint heterogeneous graph topology, and obtains consistent matching scores and verification path selection results within a preset numerical tolerance range. The preset numerical tolerance is saved with precision_mode; the execution baseline record and message participation record are saved together for subsequent review. This implementation does not require that floating-point tensors be identical bit-by-bit between different hardware, drivers, or runtime frameworks.

[0086] Practicality and Repeatability Description The method described in this invention can be executed by a computer system equipped with memory and a processor. The system determines the input data and processing parameters used for a single matching inference by storing policy version identifiers, field mapping table version identifiers, model version identifiers, and enterprise data snapshot identifiers, enabling the repeated generation of corresponding candidate indices, constraint edge records, graph message participation records, and verification paths under the same execution baseline.

[0087] For atomic policy clauses with the comparison mode identifier SEMANTIC_MATCH, the candidate index simultaneously limits the clause-attribute data pairs participating in local attention computation and the set of endpoints capable of generating soft constraint edges. In the implementation using the above sparse candidate storage structure, let the number of semantically adapted atomic policy clauses be m_s, the number of enterprise standard attribute records be n, and the semantically adapted atomic policy clauses be sequentially numbered i=1, 2, ..., m_s. Then the actual number of effective attention pairs allocated and computed is N_gate=Σ_(i=1)^(m_s)|I_i|, and N_gate≤m_s×n. For clause-attribute data pairs outside the candidate index set, no corresponding attention pair tensor elements are allocated. This quantitative relationship represents the changes in the computation domain and tensor structure generated by the candidate index, and does not represent unverified running speed, memory saving ratio, or other performance test results.

[0088] The system generates a verification path based on the message participation records formed during the graph message transmission process, and associates policy clause nodes with the policy version and original text location identifier, and enterprise attribute nodes with the enterprise standard field, data time point, and data source field. Therefore, this method can be reused in the enterprise project policy matching data processing system, and makes the data relationships involved in the matching calculation verifiable.

[0089] The above embodiments are used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make adaptive adjustments or equivalent substitutions to the field types, vector encoding methods, candidate index storage methods, graph message aggregation methods, representation fusion methods, and software deployment methods without departing from the technical concept of the present invention. Whether such adjustments or substitutions fall within the scope of protection of the present invention shall be determined by the technical features defined in the claims and their equivalents.< / na>

Claims

1. A method for matching enterprise policies based on field gating, characterized in that, The process includes the following steps, executed by at least one processor: acquiring policy text with a policy version identifier and enterprise attribute data of the enterprises to be matched; segmenting the policy text into atomic policy clauses and generating clause records; and mapping the enterprise attribute data to enterprise standard attribute records. The clause records include at least an original text location identifier, a standard constraint field identifier, a constraint object identifier, a value type, a comparison mode identifier, a comparison operator, a constraint value, and a logical grouping identifier. The enterprise standard attribute records include at least a standard attribute field identifier, an attribute object identifier, a value type, a normalized attribute value, a missing status identifier, a data time point, and a data source field. The comparison mode identifier is based on the value type and the comparison operator. Whether an operator can be directly applied to normalized attribute values ​​is determined as a deterministic comparison identifier or a semantic adaptation identifier; semantic encoding is performed on the atomic policy clauses and enterprise standard attribute records to obtain policy clause vectors and enterprise attribute vectors; for each atomic policy clause, a clause gating key is formed by its standard constraint field identifier, constraint object identifier, and value type, and a candidate index is generated according to preset compatibility rules; for atomic policy clauses whose comparison mode identifier is semantically adapted, the corresponding policy clause vector is used as the query vector, and attention is calculated only in the subset of enterprise attribute vectors corresponding to the candidate index to obtain clause-to-attribute matching values, and the clause-to-attribute matching values ​​are aggregated into local semantic scores S2 by clause; wherein, the candidate The index simultaneously defines the clause-attribute data pairs participating in attention calculation and the clause-attribute endpoints capable of generating soft constraint edges. After generating the candidate index and obtaining the clause-attribute matching values ​​corresponding to the semantically adapted atomic policy clauses, a constraint heterogeneous graph is constructed using the atomic policy clauses and enterprise standard attribute records as policy clause nodes and enterprise attribute nodes, respectively. Specifically, for clause-attribute data pairs identified by the candidate index and whose comparison patterns are identified as deterministic comparisons, hard constraint edges carrying satisfied, unsatisfied, or missing states are generated based on normalized attribute values, comparison operators, and constraint values. For clause-attribute data pairs identified by the candidate index and whose comparison patterns are identified as semantically adapted... The clause-attribute data pairs generate soft-constraint edges, and the same clause-to-attribute matching value used to form the local semantic score S2 is written into the edge attribute of the corresponding soft-constraint edge; between policy clause nodes belonging to the same logical group, logical edges are generated according to the logical group identifier and the conjunction, disjunction, or conditional structure in the original policy text; after the hard-constraint edges, soft-constraint edges, and logical edges are generated and their edge attributes are written, message transformation parameters that distinguish each other are selected according to the edge type, the node features and corresponding edge attributes are transformed into edge messages, and the edge messages are aggregated to the target node to update the target node features; wherein, the clause-to-attribute matching value in the soft-constraint edge participates in the edge message calculation before the policy graph representation Hp and the enterprise graph representation He are formed;Simultaneously, the system records the node identifier, edge identifier, edge attribute, message passing layer identifier, and participation status of the nodes actually entering edge message computation and target node aggregation, forming a message participation record. It pools the updated policy clause node features and enterprise attribute node features to obtain the policy graph representation Hp and enterprise graph representation He, and fuses the local semantic score S2, policy graph representation Hp, and enterprise graph representation He to obtain a matching score. Based on the message participation record, it generates a verification path composed of policy clause nodes, connecting edges, and enterprise attribute nodes that actually participate in edge message aggregation, and associates the verification path with the policy version identifier, original text location identifier, standard attribute field identifier, data time point, and data source field.

2. The method according to claim 1, characterized in that, The preset compatibility rules include: the standard constraint field identifier in the clause gating key is the same as the standard attribute field identifier in the enterprise standard attribute record, or the two have a mapping record in the field mapping table with version identifier; the constraint object identifier in the clause gating key is the same as the attribute object identifier in the enterprise standard attribute record or has a preset hierarchical compatibility relationship; and the value types of the two belong to the compatible types that allow the same comparison or semantic alignment operation to be performed.

3. The method according to claim 1, characterized in that, The standardized attribute value is obtained through at least one of the following operations: converting the date to a unified date format, converting the value to a unified unit, converting the ratio to the same ratio expression, or converting the enumeration value to a standard enumeration code; when the enterprise attribute value does not exist, exceeds the preset validity period, or the data source record is unreadable, the missing status flag is set instead of being replaced by a zero value.

4. The method according to claim 1, characterized in that, The semantic encoding includes label embedding, self-attention encoding, and pooling processing. The policy clause vector and the enterprise attribute vector have the same vector dimension. After semantic encoding, the method further includes: calculating a global semantic score S1 based on a global policy vector obtained by aggregating multiple policy clause vectors and a global enterprise vector obtained by aggregating multiple enterprise attribute vectors; when fusing to obtain a matching score, the global semantic score S1 is fused with the local semantic score S2, the policy graph representation Hp, and the enterprise graph representation He to obtain the matching score.

5. The method according to claim 1, characterized in that, For atomic policy clauses whose comparison pattern is identified as semantically compatible, candidate enterprise attribute vectors are constructed into candidate tensors according to the corresponding candidate indices. When the candidate tensor contains padding positions set for uniform tensor length, the attention mask of the effective candidate positions is set to 0, and the padding positions are excluded from the summation domain of Softmax normalization, or the attention mask of the padding positions is set to a mask value used to make its normalization weight 0. When the candidate index of the atomic policy clause is empty, Softmax normalization is not performed on the atomic policy clause, its clause-level matching value is set to a preset finite scalar missing code, the clause-level matching value is excluded from the aggregation of local semantic scores S2, and no soft constraint edge is generated corresponding to the atomic policy clause.

6. The method according to claim 1, characterized in that: The hard constraint edge records the normalized attribute value, comparison operator, constraint value, and comparison status code; the soft constraint edge records the clause to attribute matching value, the corresponding clause gating key, and comparison mode identifier; the logical edge records the logical group identifier, logical structure type, and the relative order of atomic policy clauses in the logical structure; when atomic policy clauses in the same logical group have a hard constraint comparison status, a logical group status of satisfied, unsatisfied, missing, or inapplicable is generated according to the logical status table and written into the edge attribute of the corresponding logical edge; wherein, hard constraint edges, soft constraint edges, and logical edges have edge type identifiers that can be distinguished from each other.

7. The method according to claim 1, characterized in that, In the l-th graph messaging layer, the source node features and edge attributes of the connecting edge u→v are transformed into edge messages using the node transformation parameters and edge attribute transformation parameters corresponding to edge type r. The edge messages pointing to the target node v are aggregated and the target node features are updated. Different edge types use node transformation parameters and edge attribute transformation parameters that are distinct from each other. For soft-constrained edges, the edge attribute transformation parameters read the same clause-to-attribute matching value of the soft-constrained edge, which is calculated by the attention limited by the candidate index, and writes it into the calculation of the corresponding edge message. This allows the clause-to-attribute matching value to participate in the calculation of the corresponding edge message before the policy graph representation Hp and the enterprise graph representation He are formed.

8. The method according to claim 1, characterized in that, The edge records with a true participation status and a saved edge message digest are selected from the message participation records. The edge records are connected according to the source node identifier and the target node identifier to form a candidate path. The verification path is determined according to the preset path selection rules. The verification path includes policy clause nodes, connecting edges and enterprise attribute nodes, and is associated with the edge attributes, policy version identifier, original text location identifier, standard attribute field identifier, data time point and data source field of the corresponding connecting edge.

9. The method according to claim 1, characterized in that, The processor stores the candidate index and candidate enterprise attribute vector corresponding to the atomic policy clauses with semantically adapted comparison patterns as a sparse candidate structure, and does not assign attention to the numerical tensor elements of clause-attribute data pairs other than the candidate indexes. Let m_s be the number of atomic policy clauses in the semantic adaptation, n be the number of enterprise standard attribute records, and I_i be the candidate index set of the i-th semantically adapted atomic policy clause. Then the number of effective attention log values ​​allocated and calculated in a single match is: Ngate=i=1∑ms|Ii|, and N_gate≤m_s×n.

10. A field-gated enterprise policy matching system, characterized in that, The system includes a data processing module, a semantic processing module, a heterogeneous graph processing module, and a fusion verification module. Specifically: the data processing module acquires policy text with a policy version identifier and enterprise attribute data of the enterprises to be matched; it segments the policy text into atomic policy clauses and generates clause records; and it maps the enterprise attribute data to enterprise standard attribute records. The clause records store the policy version identifier, original text location identifier, comparison mode identifier, comparison operator, constraint value, logical grouping identifier, and a clause gating key composed of a standard constraint field identifier, a constraint object identifier, and a value type. The enterprise standard attribute records store the standard attribute field identifier, attribute object identifier, and value type corresponding to the clause gating key, as well as normalized attribute values. The system includes fields for missing status identifier, data time point, and data source; the comparison pattern identifier is determined as a deterministic comparison identifier or semantic adaptation identifier based on the value type and whether the comparison operator can directly operate on normalized attribute values; the semantic processing module is used to semantically encode the atomic policy clauses and enterprise standard attribute records to obtain policy clause vectors and enterprise attribute vectors, and generate candidate indexes according to the compatibility relationship of the clause gating keys; for atomic policy clauses with semantic adaptation as the comparison pattern identifier, the corresponding policy clause vector is used as the query vector, attention is calculated only in the subset of enterprise attribute vectors corresponding to the candidate index to obtain clause-to-attribute matching values, and the clause-to-attribute matching values ​​are aggregated into local semantic components by clause. Value S2; wherein, the candidate index simultaneously defines the clause-attribute data pairs participating in attention calculation and the clause-attribute endpoints capable of generating soft constraint edges; the heterogeneous graph processing module is used to construct a constraint heterogeneous graph after generating the candidate index and obtaining the clause-to-attribute matching value corresponding to the semantically adapted atomic policy clause, using the atomic policy clause and the enterprise standard attribute record as policy clause nodes and enterprise attribute nodes respectively; for the clause-attribute data pairs identified by the candidate index and whose comparison pattern is identified as deterministic comparison, hard constraint edges carrying satisfied, unsatisfied, or missing states are generated based on normalized attribute values, comparison operators, and constraint values; for the comparison pattern identified by the candidate index and the corresponding clause record... For semantically adapted clause-attribute data pairs, soft constraint edges are generated, and the same clause-to-attribute matching value used to form the local semantic score S2 is written into the edge attribute of the corresponding soft constraint edge; between policy clause nodes belonging to the same logical group, logical edges are generated according to the logical group identifier and the conjunction, disjunction, or conditional structure in the original policy text; after the hard constraint edges, soft constraint edges, and logical edges are generated and the edge attributes are written, the node features and corresponding edge attributes are transformed into edge messages according to the message transformation parameters corresponding to and distinguishing the three types of edges, and the edge messages are aggregated to the target node to update the target node features, so that the clause-to-attribute matching value in the soft constraint edge participates in the edge message calculation before the policy graph representation Hp and the enterprise graph representation He are formed;For the actual participating edge message calculation and target node aggregation, a message participation record is formed. The updated policy clause node features and enterprise attribute node features are pooled separately to obtain the policy graph representation Hp and the enterprise graph representation He. The fusion verification module is used to fuse the local semantic score S2, the policy graph representation Hp, and the enterprise graph representation He to obtain a matching score. Based on the message participation record, a verification path is generated consisting of the policy clause node, connecting edge, and enterprise attribute node of the actual participating edge message aggregation. This verification path is associated with the policy version identifier, original text location identifier, standard attribute field identifier, data time point, and data source field.

11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program that, when executed by the processor, causes the processor to perform the method according to any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 9.