Intelligent form processing method and system based on rule tree optimization and large model screening

By optimizing the rule tree and large model collaborative processing, the flexibility and accuracy issues of traditional form processing methods are solved, achieving efficient and accurate form data processing and improving the degree of automation.

CN121833698APending Publication Date: 2026-04-10BEIJING SHENGTENG INNOVATION ARTIFICIAL INTELLIGENCE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING SHENGTENG INNOVATION ARTIFICIAL INTELLIGENCE CO LTD
Filing Date
2025-12-04
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional form processing methods lack flexibility and accuracy, have rigid rule systems that cannot adapt to business changes, and lack the ability to effectively process complex data, resulting in low processing efficiency and difficulty in guaranteeing accuracy.

Method used

By parsing hierarchical rule combinations to generate standardized rule logic combinations, constructing and optimizing rule trees, and combining them with large models for semantic judgment, we can achieve collaborative processing of preliminary rule tree screening and semantic adjudication by large models.

Benefits of technology

It improves the adaptability and processing speed of rule configuration, enhances the accuracy and automation level of form data filtering, and realizes integrated processing of the entire process from data input to result generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833698A_ABST
    Figure CN121833698A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent form processing method and system based on rule tree optimization and large model screening, and relates to the technical field of artificial intelligence and data automation. The problems that the processing efficiency is low due to static solidification of a rule system, redundancy of execution paths and dispersion of homogeneous rules in a traditional form processing method, and the screening accuracy is low and the labor cost is high due to the lack of effective judgment capability for complex, fuzzy or implicit condition data of semantic understanding are solved. By constructing and optimizing the rule tree structure and combining with the semantic comprehension ability of the large language model, automatic grading processing and intelligent screening of the form are realized. Firstly, deterministic rule matching and filtering are completed by a rule tree, then semantic judgment is carried out in a logic context by utilizing a large model for uncertainty data, and finally, a screening result is fused and output. According to the method, the efficiency, the accuracy and the automation level of form processing in a complex business scene are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of artificial intelligence and data automation, and specifically relates to a form intelligent processing method and system based on rule tree optimization and large model screening. BACKGROUND

[0002] In the current enterprise information environment, various business systems need to process massive form data every day. The traditional form processing method mainly relies on pre-set fixed rules for screening and judgment, and this mode faces two prominent problems: first, the rule system is usually rigid and difficult to flexibly adapt to rapidly changing business needs, resulting in high maintenance costs; second, the existing method lacks effective processing capability for complex data that requires context-based semantic understanding, either filtering valuable information due to overly rigid rules or relying on manual review, resulting in low processing efficiency and difficulty in ensuring accuracy. With the development of artificial intelligence technology, especially the strong ability of large language models in semantic understanding, it provides a new possibility to solve the above problems. How to organically combine the efficiency of the rule engine with the intelligent judgment capability of the large model to form a solution that can guarantee processing speed and improve accuracy has become a technical difficulty that needs to be broken through in this field.

[0003] The existing technology has the following problems: The traditional form processing method lacks the ability to analyze and logically bind hierarchical rule combinations when receiving rules, resulting in a static and rigid rule system that cannot flexibly adapt to business changes. The initial rule tree constructed by rule logic combinations has a structure that is not optimized, resulting in high execution path costs and the problem of dispersed homogeneous condition matching rule nodes, which leads to low rule execution efficiency. When processing form data, the rule tree can only complete condition matching and logical operations, and lacks effective automated judgment means for complex data that triggers semantic judgment rules and requires context-based deep understanding, resulting in low screening accuracy and reliance on manual intervention for this part of data. In the existing processing flow, the links of rule receiving, rule tree construction and optimization, rule execution, and large model semantic decision are disconnected, and lack effective coordination mechanisms, resulting in insufficient automation of the overall processing flow. SUMMARY

[0004] The present application aims to solve at least one of the technical problems existing in the prior art; for this purpose, the present application proposes a form intelligent processing method and system based on rule tree optimization and large model screening to solve the above technical problems.

[0005] The first aspect of the present application provides a form intelligent processing method based on rule tree optimization and large model screening, comprising the following steps: S1: receive original form data and hierarchical rule combination, and generate rule logic combination by parsing the hierarchical rule combination; S2: based on the rule logic combination, build an initial rule tree, and perform structural optimization to obtain an optimized rule tree; S3: after preprocessing the original form data, input the optimized rule tree to perform logical judgment, and obtain a preliminary screening result set; S4: determine an uncertainty data subset from the preliminary screening result set, call a large model to perform semantic judgment on the subset, and perform secondary screening on the preliminary screening result set according to the semantic judgment result to generate a final form screening result.

[0006] Preferably, the S1 comprises the following steps: receive original form data through a data source interface; receive a hierarchical rule combination including rule schema and rule item set input by a user through a rule configuration interface; wherein the rule schema includes a preset rule set and a business defined rule set connected by a logical operator, and the rule item set includes a condition matching rule and a semantic judgment rule; The rule schema and the rule item set are parsed, and the business defined rule set and the rule item set are bound by rule logic to generate a standardized rule logic combination.

[0007] Preferably, the S2 comprises the following steps: The rule logic combination is constructed into a tree data structure to obtain an initial rule tree; wherein the leaf nodes are composed of the condition matching rule and the semantic judgment rule in the rule item set, and the non-leaf nodes are composed of the logical operator; The initial rule tree is structurally optimized to obtain an optimized rule tree, including execution path optimization and homogeneous rule merging optimization.

[0008] Preferably, the execution path optimization comprises the following steps: A cost comparison model based on rule type is constructed, which presets the benchmark cost of the semantic judgment rule node to be higher than the benchmark cost of the condition matching rule node; Traverse the rule tree to determine the benchmark cost of each leaf node according to the cost comparison model; for each non-leaf node in the rule tree, calculate the sub-tree cost of the non-leaf node by accumulating the benchmark costs of all its descendant leaf nodes; Under the premise of keeping the logical semantics unchanged, compare the sub-tree costs of the brother non-leaf nodes, and when it is detected that the sub-tree cost of the left sub-tree is higher than that of the right sub-tree, exchange the left and right positions of the pair of brother non-leaf nodes; The execution path optimization is performed recursively until no sibling non-leaf node in the whole rule tree has a left sub-tree cost higher than a right sub-tree cost.

[0009] Preferably, the homogeneous rule merging optimization comprises the following steps: Identifying multiple condition matching rule nodes in the rule tree that meet a merging condition, the merging condition being having the same target data field and decision type, and having a lowest common ancestor node being a logical AND operator; aggregating the condition parameters in the identified nodes into a condition parameter set; Creating a new condition matching rule node in the rule tree as a merging node, the merging node having the same target data field and decision type, and setting its condition parameter as the condition parameter set; replacing the originally scattered multiple condition matching rule nodes with the merging node.

[0010] Preferably, the S3 comprises the following steps: According to a preset rule set in the rule schema, sequentially performing pre-processing including semantic deduplication and basic filtering on the original form data to generate a set of to-be-processed forms; Inputting the set of to-be-processed forms into the optimized rule tree, traversing the rule tree to perform logical decision in a depth-first and left-to-right order, and performing difference operation according to the node type; wherein, for a condition matching rule node, performing matching operation and returning the result in the form of a Boolean value; for a semantic decision rule node, recording the corresponding triggered form data and suspending semantic judgment, and returning a tentative value True; for a logical operator node, performing logical operation by using a short-circuit evaluation mechanism, when the final result of the logical operation can be determined according to the output result of the left child node, skipping the calculation of the right child node and directly returning the result, otherwise, after obtaining the output result of the right child node, combining the results of the left and right child nodes and returning; Generating a preliminary screening result set according to the execution result of the logical decision of the rule tree; the form data in the result set all pass all condition matching and logical operation.

[0011] Preferably, the S4 comprises the following steps: Based on the preliminary screening result set, determining an uncertainty data subset, the subset being composed of all form data that pass the preliminary screening of the rule tree and trigger at least one semantic decision rule node and are recorded in the rule tree execution process; at the same time, forming a rule decision form set from the form data in the preliminary screening result set that do not trigger any semantic decision rule node; For the uncertainty data subset, using a generative pre-training large language model based on a Transformer architecture to perform semantic judgment; For each piece of form data in the uncertain data subset, trace its execution path in the rule tree; and construct prompt words based on the semantic judgment rule content it triggers and the logical context provided by the condition matching rule on that path. The prompt words are input into the large language model to obtain the semantic judgment results and initial confidence scores returned by it; the semantic consistency of the results is measured through logical context to generate a comprehensive confidence score assessment. From the uncertain data subset, form data that meets the conditions according to semantic judgment and whose comprehensive confidence assessment is higher than the preset threshold is selected to form a semantic judgment form set; Merge the rule-based decision form set and the semantic decision form set to generate the final form filtering results.

[0012] A second aspect of the present invention provides an intelligent form processing system based on rule tree optimization and large model filtering, comprising the following modules: Data and rule receiving module: Receives raw form data and hierarchical rule combinations, and generates rule logic combinations by parsing the hierarchical rule combinations; Rule tree construction and optimization module: Based on the rule logic combination, an initial rule tree is constructed and structurally optimized to obtain an optimized rule tree; Rule tree execution module: After preprocessing the original form data, the optimized rule tree execution logic is input for judgment to obtain a preliminary filtering result set; The large model semantic adjudication module: It determines an uncertain data subset from the initial screening result set, calls the large model to perform semantic judgment on the subset, and performs secondary screening on the initial screening result set based on the semantic judgment result to generate the final form screening result.

[0013] Compared with the prior art, the beneficial effects of the present invention are: By parsing the hierarchical rule combination and generating standardized rule logic combinations, the structured definition and flexible binding of business rules are realized, improving the adaptability and maintainability of rule configuration. By optimizing the execution path and merging homogeneous rules in the initial rule tree, the overall execution cost of the rule tree is reduced, redundant calculations are eliminated, and the processing speed of form data is significantly improved. By constructing a collaborative processing method of "preliminary screening by rule tree + semantic adjudication by large model", the method uses a large language model to make accurate semantic judgments on uncertain data subsets that cannot be directly determined by rule tree, and combines confidence assessment to screen the results, thereby significantly improving the accuracy of the final screening results while ensuring automated processing. By integrating rule parsing, rule tree construction and optimization, rule execution and intelligent semantic adjudication into a coherent automated process, the entire process from data and rule input to final result generation is integrated, significantly improving the overall automation level and efficiency of form processing. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0015] Figure 2 This is a schematic diagram of the module flow of the present invention. Detailed Implementation

[0016] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0017] Please see Figure 1 This invention is an intelligent form processing method based on rule tree optimization and large model filtering, comprising the following steps: S1: Receives raw form data and hierarchical rule combinations, and generates rule logic combinations by parsing the hierarchical rule combinations; S2: Based on the logical combination of the rules, an initial rule tree is constructed, and its structure is optimized to obtain an optimized rule tree; S3: After preprocessing the original form data, input the optimized rule tree to perform logical judgment and obtain a preliminary filtering result set; S4: Determine an uncertain data subset from the initial screening result set, call the large model to perform semantic judgment on the subset, and perform secondary screening on the initial screening result set based on the semantic judgment result to generate the final form screening result.

[0018] Specifically, the system receives raw form data through a data source interface and obtains hierarchical rule combinations input by the user through a rule configuration interface. It then parses the rule paradigm and rule item set, and logically binds the business-defined rule set with the rule item set to generate standardized rule logic combinations. Based on this, it enters the rule tree construction and optimization stage, constructing an initial tree-shaped rule tree where leaf nodes consist of conditional matching rules and semantic judgment rules, and non-leaf nodes consist of logical operators. The initial rule tree is then structurally optimized to obtain an optimized rule tree, including cost model-based execution path optimization and homogeneous rule merging optimization to improve rule execution efficiency. Next, it enters the rule execution and preliminary filtering stage. The raw form data undergoes preprocessing including semantic deduplication and basic filtering. The set of forms to be processed is then input into the optimized rule tree. The rule tree is traversed in a depth-first, left-to-right order, and logical judgments are executed, recording the form data that triggers the semantic judgment rule nodes. Finally, a preliminary filtering result set is generated. Finally, in the large model semantic adjudication and result generation stage, an uncertain data subset is determined from the preliminary result set, the execution path of each data in the rule tree is traced back, prompt words are constructed based on the semantic rule content and logical context, the large language model is called to perform semantic judgment and evaluate confidence, the rule judgment results and semantic judgment results are finally merged, the preliminary screening result set is screened a second time, and the final form screening result is output.

[0019] In one embodiment of the present invention, step S1 includes the following steps: The system receives raw form data through the data source interface; it also receives hierarchical rule combinations containing rule paradigms and rule item sets from user input through the rule configuration interface; wherein, the rule paradigm includes a set of preset rules and a set of business-defined rules connected by logical operators, and the set of rule items includes condition matching rules and semantic judgment rules. The rule paradigm and rule item set are parsed, and the business definition rule set and rule item set are logically bound together to generate a standardized rule logic combination.

[0020] Specifically, raw form data is received through the data source interface. This raw form data is a structured collection of data records, each consisting of several data fields. The data source interface includes, but is not limited to, the following types: application programming interface (API) for receiving form data submitted in real time by the front-end application; database connection interface for batch reading of stored form data from a specified database table; message queue interface for listening to and receiving form data streams sent asynchronously from other business systems; and file system interface for parsing and extracting uploaded file format form data.

[0021] The hierarchical rule combination received by the user through the rule configuration interface consists of a two-level structure: rule paradigm and rule item set. The rule paradigm serves as the overall rule and includes a system-preset rule set and a business-defined rule set. The preset rule set consists of fixed rules built into the basic service that cannot be modified by the user, while the business-defined rule set consists of user-defined rule combinations.

[0022] The rule set, as a detailed set of rules, includes conditional matching rules and semantic judgment rules. Each rule is defined by a tuple, which includes at least the target data domain, rule identifier, judgment type, and condition parameters. Among them, the judgment types of conditional matching rules include, but are not limited to, exact matching types such as "equal to" and "contains in", and the condition parameters are explicit values ​​or sets. The judgment types of semantic judgment rules include, but are not limited to, fuzzy semantic types such as "semantic conformity" and "semantic exclusion", and the condition parameters are natural language descriptions.

[0023] The rule paradigm and rule entry set are parsed, and the business definition rule set and rule entry set are logically bound together to generate a standardized intermediate representation structure of rule logic combination. Its core includes an instantiated list of rule objects and a logical expression tree. Each object in the list encapsulates complete execution elements such as rule identifier, target data field, decision type and condition parameters, while the expression tree connects references to these rule objects through logical operator nodes.

[0024] The parsing process involves multi-level analysis and verification of the received rule paradigms and rule entry sets. This process sequentially performs syntax analysis, semantic analysis, and dependency analysis: syntax analysis verifies the structural integrity of the rule expression, including checking the matching of parentheses and whether the use of logical operators conforms to preset specifications; semantic analysis further verifies whether the target data field referenced by the rule exists in the form data structure, and whether the set condition values ​​are compatible with the data type of its target data field; finally, dependency analysis identifies the logical dependencies between different rules and detects possible circular dependencies or conflicting judgment conditions, thereby eliminating potential structural errors before constructing the rule tree.

[0025] After successful parsing and verification, the logical binding process is executed. This process first establishes a mapping relationship, that is, using a unique rule identifier to associate the logical combination description in the business definition rule set with the specific rule definition in the rule entry set. It then iterates through each rule definition in the rule entry set, transforming it into an instantiated rule object based on its type (conditional matching or semantic judgment). Each rule object encapsulates the complete execution elements of the rule, including the rule identifier, target data domain, judgment type, and condition parameters. Finally, all instantiated rule objects are organized into a list of rule objects, and a logical expression tree is constructed based on the logical combination description in the business definition rule set.

[0026] In one embodiment of the present invention, step S2 includes the following steps: The rules are logically combined to construct a tree-like data structure, resulting in an initial rule tree; where leaf nodes consist of condition matching rules and semantic judgment rules from the rule entry set, and non-leaf nodes consist of logical operators; The initial rule tree is structurally optimized to obtain an optimized rule tree, including execution path optimization and homogeneous rule merging optimization.

[0027] Specifically, the rule logic combination is constructed into a specific tree data structure to obtain the initial rule tree. This process is as follows: based on the logical expression tree structure in the rule logic combination, it is directly mapped into a rule binary tree. In this tree, all leaf nodes are composed of specific rules in the rule entry set, and each leaf node carries an instantiated rule object, including its rule identifier, target data field, decision type, and condition parameters. All non-leaf nodes are composed of logical operators, and each node represents a logical operation unit. The initial rule tree is structurally optimized to obtain an optimized rule tree, which includes two independent optimization processes: execution path optimization and homogeneous rule merging optimization.

[0028] In one embodiment of the present invention, the execution path optimization includes the following steps: Construct a cost comparison model based on rule type, which presets the baseline cost of semantic judgment rule nodes to be higher than the baseline cost of condition matching rule nodes; Traverse the rule tree and determine the baseline cost for each leaf node based on the cost comparison model; for each non-leaf node in the rule tree, calculate the subtree cost corresponding to the non-leaf node by accumulating the baseline costs of all its descendant leaf nodes. While keeping the logical semantics unchanged, compare the subtree costs corresponding to the sibling non-leaf nodes. When it is detected that the cost of the left subtree is higher than the cost of the right subtree, swap the left and right positions of the pair of sibling non-leaf nodes. This execution path optimization is performed recursively until no sibling non-leaf node in the entire rule tree has a left subtree cost higher than a right subtree cost.

[0029] Specifically, the cost comparison model is constructed using a quantitative analysis method based on historical execution data, achieving cost prediction through the establishment of a multi-factor cost quantification system. The model first analyzes three core cost factors: computational resource cost, quantified by monitoring the CPU usage and peak memory consumption of a rule node when executing its corresponding operation (e.g., a conditional matching rule performing a matching operation), and multiplying these by a preset unit resource cost coefficient; time cost, quantified by recording the end-to-end response time of the semantic judgment rule node calling the large language model API, comparing it with the response time of the conditional matching rule node executing database or memory matching operations, and multiplying each by a preset unit time cost coefficient; and economic cost, which comprehensively considers the actual billing standard of the large language model API calls, directly recording the actual cost incurred for each semantic judgment request.

[0030] The quantified cost values ​​above are then normalized to eliminate differences in numerical magnitude. This is achieved using the formula: ; Obtain the baseline cost value ,in, , , These represent the normalized computational resources, time, and economic costs; weighting coefficients. , , (satisfy + + =1) is predefined by the administrator during initialization based on business optimization goals (such as prioritizing speed or prioritizing control of economic expenditures).

[0031] The baseline cost is not fixed. It will periodically collect recent historical execution data and run the above cost analysis and calculation process again to recalibrate the typical value range of the baseline cost, so as to realize the dynamic adjustment of the baseline cost based on model complexity, system load and the latest performance data.

[0032] A depth-first search algorithm is used to traverse the rule tree from left to right, starting from the leaf nodes and recursively moving upwards to the root node. During the traversal, a baseline cost is first labeled for each leaf node. Then, for each logical operator node (non-leaf node), its subtree cost is calculated by recursively adding the costs of its left and right subtrees to obtain the total subtree cost. The specific formula is: Subtree cost = ∑(cost of all leaf nodes in the left subtree) + ∑(cost of all leaf nodes in the right subtree).

[0033] In the subtree swapping optimization process, it is essential to strictly maintain the premise of logical semantic equivalence. First, a cost comparison analysis is performed on the direct child nodes of each logical operator node. A binary tree sibling node comparison algorithm is used to check whether the cost of the left subtree is higher than the cost of the right subtree. When the swap condition is met (i.e., the cost of the left subtree is higher than the cost of the right subtree and the swap does not change the semantics of the logical operation), the positions of the left and right subtrees are swapped by modifying the node pointers. This allows the subtrees expected to cause short circuits (i.e., those with lower evaluated costs) to be traversed first, while simultaneously updating the child node references of the parent node.

[0034] The optimization process is accomplished through a systematic recursive execution strategy, employing a post-order traversal to adjust upwards from the leaf nodes. After optimizing each level of nodes, the cost of the affected subtrees is recalculated, and a maximum recursion depth (usually the height of the tree) is set to prevent infinite loops. Termination condition detection is achieved by performing a global scan throughout the entire rule tree. Optimization is considered complete when no node pair requiring swapping is found in two consecutive traversals. Simultaneously, the number of optimization iterations is recorded, and an upper limit is set to prevent over-optimization.

[0035] In one embodiment of the present invention, the homogeneous rule merging optimization includes the following steps: Identify multiple condition matching rule nodes in the rule tree that meet the merging condition, wherein the merging condition is that they have the same target data domain and judgment type, and their lowest common ancestor node is a logical "AND" operator; aggregate the condition parameters in the identified nodes into a condition parameter set; Create a new condition matching rule node in the rule tree as a merge node. The merge node has the same target data domain and decision type, and sets its condition parameters to the set of condition parameters. Replace the original multiple scattered condition matching rule nodes with the merge node.

[0036] Specifically, the identification phase of the homogeneous rule merging optimization employs a node discovery algorithm based on preorder traversal. Starting from the root node of the rule tree, it traverses the entire rule tree structure using a depth-first strategy to identify all condition-matching rule nodes that satisfy specific merging conditions. These merging conditions include three elements that must be satisfied simultaneously: multiple condition-matching rule nodes must have completely identical target data domains, meaning these rules apply to the same field or attribute of the form data; the decision types of these nodes must be completely consistent, such as exact matching types like "equal to" or "contains in"; and the lowest common ancestor node of these nodes in the rule tree structure must be a logical "AND" operator. This condition is verified by tracing the node paths upwards and calculating the lowest common ancestor algorithm. During the traversal, a temporary data structure based on a hash table is used to record the currently processed "AND" operator subtree, and all condition-matching rule nodes under this subtree are grouped and cached according to their target data domains and decision types.

[0037] Once a group of nodes that meets the merging conditions is identified, an aggregation operation will be performed on the condition parameters. This process first extracts the condition parameters from each identified condition matching rule node, and then adopts different aggregation strategies according to the characteristics of the judgment type: for the "equal to" judgment type, the discrete condition parameter values ​​of each node are aggregated into a unified set of values; for the "contains in" judgment type, multiple condition parameter sets are combined to eliminate duplicate elements.

[0038] During the merging node creation phase, a new condition matching rule node is generated based on the aggregation result as the merging node. This merging node inherits the target data domain and decision type attributes of the original node group; at the same time, its condition parameters are set to the aggregated set of condition parameters. From a technical implementation perspective, the merging node is created in memory as a new rule object, which contains complete rule execution elements and is marked as the merging node type for subsequent identification and processing.

[0039] The system locates the exact position of the merged node group within the rule tree. Then, by modifying the child node reference relationships of the parent node, it replaces the original scattered condition matching rule nodes with the newly created merged node. During the replacement operation, the integrity and consistency of the tree structure are ensured, and the pointers of affected nodes and subtree references are updated. After the merged node replaces the original node, the structural attributes such as the height and number of nodes of the affected subtree are updated, along with the relevant tree traversal information.

[0040] After node replacement is completed, the semantic equivalence of the rule trees before and after the merge is logically guaranteed because the merge operation strictly follows the merge conditions. As an optional hardening measure, logical consistency verification can be performed during the development and debugging phase or at the administrator's request. For example, a truth table testing method can be used to input the same test data set into the rule trees before and after the merge and compare the consistency of the output results. Simultaneously, a merge optimization report is generated, detailing the information of the original merged nodes, the merged node structure, and the performance improvements resulting from the optimization, including the expected reduction in query counts and the savings in computing resources.

[0041] In one embodiment of the present invention, step S3 includes the following steps: Based on the preset rule set in the rule paradigm, the original form data is sequentially preprocessed, including semantic deduplication and basic filtering, to generate a set of forms to be processed. The set of forms to be processed is input into the optimization rule tree. The rule tree is traversed in a depth-first, left-to-right order, and logical judgments are performed. Differentiation operations are performed based on the node type. Specifically, for condition matching rule nodes, a matching operation is performed, and the result is returned as a Boolean value. For semantic judgment rule nodes, the corresponding triggered form data is recorded and semantic judgment is temporarily suspended, and a provisional value True is returned. For logical operator nodes, a short-circuit evaluation mechanism is used to perform logical operations. If the final result of the logical operation can be determined based on the output result of the left child node, the calculation of the right child node is skipped and the result is returned directly. Otherwise, after obtaining the output result of the right child node, the results of the left and right child nodes are combined and returned. Based on the logical judgment results of the rule tree, a preliminary filtering result set is generated; all form data in this result set has passed all condition matching and logical operations.

[0042] Specifically, the original form data is preprocessed using a pre-defined rule set within the rule paradigm, including fine-grained semantic deduplication and basic filtering. The fine-grained semantic deduplication process involves grouping the original form data according to a grouping key defined by the rules. This grouping key, configured by the administrator in the pre-defined rule set, represents one or more specific data fields within the form data. For forms within the same group, the core content data fields specified by the pre-defined rules and requiring semantic comparison are extracted. A pre-defined or callable, pre-trained text embedding model is used to map the core content text of each form into a high-dimensional vector representation in a vector space; semantically similar texts also have similar vector representations. Subsequently, the overall semantic similarity of the group is calculated according to the similarity aggregation formula set by the pre-defined rules. , which is the arithmetic mean of the cosine similarity between all pairwise vectors in the group, is calculated as follows: ;in, , These represent vectors obtained after the core content of the i-th and j-th forms within the group is processed by the text embedding model; Representative vector and The cosine similarity between them. When When the values ​​exceed a preset threshold, they are determined to constitute a semantic duplicate set. The most complete or earliest form from this set is selected as a representative entry and retained in the set of forms to be processed. The threshold is set by the administrator according to the business requirements for the strictness of deduplication. For example, a higher threshold (such as above 0.95) is suitable for scenarios that require high accuracy and avoid false positives, while a lower threshold (such as above 0.7) is suitable for scenarios that require high recall and merge similar items as much as possible.

[0043] Based on the basic filtering rules defined in the pre-defined rule set (such as preliminary satisfaction screening based on keywords), a fast matching operation is performed on the deduplicated form data to filter out forms that obviously do not meet the basic conditions.

[0044] After preprocessing, a set of forms to be processed is obtained, which has eliminated a large amount of duplicate and obviously invalid data. This set of forms is then sent to the optimization rule tree for core logic judgment.

[0045] The rule tree is traversed in a depth-first, left-to-right order, and logical judgments are performed on the set of forms to be processed from the input rule tree; the execution engine performs differential operations based on the node type. For a conditional matching rule node, a matching operation is performed; this operation accesses the corresponding target data field in the form data, and performs a query and match in the database or memory based on the node's judgment type (e.g., equal to) and condition parameters; the node returns a boolean value (True or False) indicating whether the current form data meets the precise condition.

[0046] For semantic judgment rule nodes, the corresponding triggered form data is recorded and semantic judgment is temporarily suspended. Specifically, when the execution path reaches this node, the large model is not called immediately. Instead, the identifier of the form data, the rule identifier and rule content (target data domain, judgment type, condition parameters) of the triggered semantic judgment rule node are associated and recorded, and added to a temporary set. The execution of this node at this stage is considered "passed", and its logical output is temporarily set to True to ensure that the rule tree can continue to perform logical operations upwards to complete the initial screening.

[0047] For logical operator nodes, a short-circuit evaluation mechanism is used to perform logical operations. First, the output of its left child node is recursively obtained, and then a short-circuit check is performed. If it is an "AND" node and the result of its left child node is False, or an "OR" node and the result of its left child node is True, then the short-circuit condition is met, and the calculation of the right child node is skipped, and the result of the left child node is returned directly. If the short-circuit condition is not met, the result of the right child node is recursively obtained, and the results of the left and right child nodes are combined according to their logical operation type and then returned. That is, for an "AND" node, the node returns True only if both its left and right subtrees return True; for an "OR" node, the node returns True as long as either its left or right subtree returns True.

[0048] The rule tree is traversed in post-order traversal, and the above logical judgment process is executed independently for each form data in the form set to be processed. After the traversal is completed, all form data that make the root node output True are collected to form the preliminary filtering result set. In one embodiment of the present invention, step S4 includes the following steps: Based on the preliminary screening result set, an uncertain data subset is determined. This subset consists of all form data that passed the preliminary screening through the rule tree and triggered at least one semantic judgment rule node and was recorded during the execution of the rule tree. At the same time, the form data in the preliminary screening result set that did not trigger any semantic judgment rule node constitutes the rule judgment form set. For uncertain subsets of data, a generative pre-trained large language model based on the Transformer architecture is used to make semantic judgments on them. For each piece of form data in the uncertain data subset, trace its execution path in the rule tree; and construct prompt words based on the semantic judgment rule content it triggers and the logical context provided by the condition matching rule on that path. The prompt words are input into the large language model to obtain the semantic judgment results and initial confidence scores returned by it; the semantic consistency of the results is measured through logical context to generate a comprehensive confidence score assessment. From the uncertain data subset, form data that meets the conditions according to semantic judgment and whose comprehensive confidence assessment is higher than the preset threshold is selected to form a semantic judgment form set; Merge the rule-based decision form set and the semantic decision form set to generate the final form filtering results.

[0049] Specifically, during the rule tree execution logic judgment phase, a temporary set is established to dynamically record all form data that triggers one or more semantic judgment rule nodes. Each record in this set contains a unique identifier for the form data and detailed information about the triggered semantic judgment rule node, including the rule identifier, target data field, judgment type, and condition parameters.

[0050] Based on this temporary set, the preliminary screening result set is divided. By matching form identifiers, the complete form data recorded in the set is extracted to form an uncertain data subset. At the same time, the form data in the preliminary screening result set that is not recorded in this set, that is, the data that is judged only by condition matching rules and logical operations, constitutes the rule judgment form set.

[0051] For each form data entry in the uncertain data subset, the following in-depth processing is performed: First, based on the rule identifier, its complete execution path in the optimized rule tree is traced back. This path data comes from the rule tree execution log, which fully records the traversal trajectory of each form data entry in the tree structure. By analyzing this path, the logical context provided by all condition-matching rule nodes on the path is extracted. This context information comes directly from the definition of the corresponding node in the rule tree. For example, when the path contains the rule node (customer level, equal to, VIP), the fact that "customer level is VIP" is extracted as the logical context.

[0052] Subsequently, prompt words are constructed by integrating three key elements: semantic judgment rules obtained from a temporary set, logical context obtained from execution path analysis, and specific text content of the target data field read from the original form data. These three types of data are integrated using a predefined structured template to form the final prompt words. For example, based on the above data, the following prompt word might be generated: "Given that this customer's level is VIP. Please determine whether the following text: 'Customer service response is too slow, I waited for ages and no one responded,' reflects dissatisfaction with the service attitude?"

[0053] Among them, the predefined structured templates are derived from the initialization configuration. They are pre-set by the administrator based on the judgment logic characteristics of the business domain and stored in the configuration library. The core design goal of the templates is to ensure that the task instructions passed to the large language model are clear, unambiguous, and have a fixed output format.

[0054] After inputting the constructed prompt words into a generative pre-trained large language model based on the Transformer architecture, the model returns two direct outputs: semantic judgment results and initial confidence scores. .

[0055] The semantic judgment results are standardized into two programmable types: Boolean values ​​or category labels. Boolean values ​​directly correspond to yes / no judgments; for example, for a rule reflecting dissatisfaction, the model returns true or false. Category labels are used in multi-faceted scenarios; for example, for judging sentiment, the model selects one from a predefined set of labels (such as positive, negative, and neutral) as the result. According to preset business rules, true or a specific set of labels is considered to meet the conditions.

[0056] Initial confidence level The probability distribution is calculated by parsing the raw probability data returned by the Large Language Model Application Programming Interface (API), with values ​​ranging from [0,1]. Specifically, the corresponding parameters are configured when calling the API to obtain the complete probability distribution information of the model output. For any task requiring semantic judgment, a set of candidate answers is preset (e.g., {True, False} for a Boolean judgment task). The value is the maximum value of the normalized probability distribution of the model on the preset candidate answer set; for example, for a Boolean judgment task, its preset candidate answer set is {True, False}, if the model calculates that the normalized probability of True is 0.9 and the normalized probability of False is 0.1, then The value is 0.9. To improve decision reliability, semantic consistency is measured on the initial confidence level to generate a comprehensive confidence assessment. The weighted calculation formula is as follows: ; obtained, comprehensive confidence assessment ; in, The semantic consistency score is determined by comparing the semantic judgment result with the logical context extracted from the rule tree execution path to ensure business logic consistency. A default consistency mapping rule is used, for example: if the logical context contains "customer level = VIP" and the semantic judgment is a positive evaluation, the score is 1.0; if the semantic judgment is "serious complaint", the score is 0.2. The score typically ranges from [0,1], where 1 represents complete consistency and 0 represents complete conflict.

[0057] The weighting coefficients α and β are preset by the administrator according to the business strategy during initialization, and satisfy α + β = 1. For example, if the business relies more on the model's own judgment, α = 0.7 and β = 0.3 can be set; if the business rules are very strict and it is necessary to focus on preventing misjudgments that conflict with the known context, α = 0.3 and β = 0.7 can be set.

[0058] The threshold is set by the administrator based on the balance between precision and recall required by the business. For example, in scenarios with high precision requirements (such as security auditing), the threshold can be set to 0.85; in scenarios with high recall requirements (such as potential business opportunity mining), the threshold can be set to 0.65.

[0059] Subsequently, form data that simultaneously meets the following conditions is selected from the uncertain data subset: the semantic judgment result is compliant, and the overall confidence score (FCS) is higher than a preset threshold. Form data meeting these conditions constitute the semantic judgment form set.

[0060] Finally, the rule-based decision set and the semantic decision set are merged to generate a complete and unified final form filtering result.

[0061] Please see Figure 2 As shown, this invention is an intelligent form processing system based on rule tree optimization and large model filtering, comprising the following modules: Data and rule receiving module: Receives raw form data and hierarchical rule combinations, and generates rule logic combinations by parsing the hierarchical rule combinations; Rule tree construction and optimization module: Based on the rule logic combination, an initial rule tree is constructed and structurally optimized to obtain an optimized rule tree; Rule tree execution module: After preprocessing the original form data, the optimized rule tree execution logic is input for judgment to obtain a preliminary filtering result set; The large model semantic adjudication module: It determines an uncertain data subset from the initial screening result set, calls the large model to perform semantic judgment on the subset, and performs secondary screening on the initial screening result set based on the semantic judgment result to generate the final form screening result.

[0062] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A form intelligent processing method based on rule tree optimization and large model filtering, characterized in that, Includes the following steps: S1: Receives raw form data and hierarchical rule combinations, and generates rule logic combinations by parsing the hierarchical rule combinations; S2: Based on the logical combination of the rules, an initial rule tree is constructed, and its structure is optimized to obtain an optimized rule tree; S3: After preprocessing the original form data, input the optimized rule tree to perform logical judgment and obtain a preliminary filtering result set; S4: Determine an uncertain data subset from the initial screening result set, call the large model to perform semantic judgment on the subset, and perform secondary screening on the initial screening result set based on the semantic judgment result to generate the final form screening result.

2. The intelligent form processing method based on rule tree optimization and large model filtering according to claim 1, characterized in that, S1 includes the following steps: The system receives raw form data through the data source interface; it also receives hierarchical rule combinations containing rule paradigms and rule item sets from user input through the rule configuration interface; wherein, the rule paradigm includes a set of preset rules and a set of business-defined rules connected by logical operators, and the set of rule items includes condition matching rules and semantic judgment rules. The rule paradigm and rule item set are parsed, and the business definition rule set and rule item set are logically bound together to generate a standardized rule logic combination.

3. The intelligent form processing method based on rule tree optimization and large model filtering according to claim 1, characterized in that, S2 includes the following steps: The rules are logically combined to construct a tree-like data structure, resulting in an initial rule tree; where leaf nodes consist of condition matching rules and semantic judgment rules from the rule entry set, and non-leaf nodes consist of logical operators; The initial rule tree is structurally optimized to obtain an optimized rule tree, including execution path optimization and homogeneous rule merging optimization.

4. The intelligent form processing method based on rule tree optimization and large model filtering according to claim 3, characterized in that, The execution path optimization includes the following steps: Construct a cost comparison model based on rule type, which presets the baseline cost of semantic judgment rule nodes to be higher than the baseline cost of condition matching rule nodes; Traverse the rule tree and determine the baseline cost for each leaf node based on the cost comparison model; for each non-leaf node in the rule tree, calculate the subtree cost corresponding to the non-leaf node by accumulating the baseline costs of all its descendant leaf nodes. While keeping the logical semantics unchanged, compare the subtree costs corresponding to the sibling non-leaf nodes. When it is detected that the cost of the left subtree is higher than the cost of the right subtree, swap the left and right positions of the pair of sibling non-leaf nodes. This execution path optimization is performed recursively until no sibling non-leaf node in the entire rule tree has a left subtree cost higher than a right subtree cost.

5. The intelligent form processing method based on rule tree optimization and large model filtering according to claim 3, characterized in that, The optimization of merging homogeneous rules includes the following steps: Identify multiple condition matching rule nodes in the rule tree that meet the merging condition, wherein the merging condition is that they have the same target data domain and judgment type, and their lowest common ancestor node is the logical "AND" operator; aggregate the condition parameters in the identified nodes into a condition parameter set; Create a new condition matching rule node in the rule tree as a merge node. The merge node has the same target data domain and decision type, and sets its condition parameters to the set of condition parameters. Replace the original multiple scattered condition matching rule nodes with the merge node.

6. The intelligent form processing method based on rule tree optimization and large model filtering according to claim 1, characterized in that, S3 includes the following steps: Based on the preset rule set in the rule paradigm, the original form data is sequentially preprocessed, including semantic deduplication and basic filtering, to generate a set of forms to be processed. The set of forms to be processed is input into the optimization rule tree. The rule tree is traversed in a depth-first, left-to-right order, and logical judgments are performed. Differentiation operations are performed based on the node type. Specifically, for condition matching rule nodes, a matching operation is performed, and the result is returned as a Boolean value. For semantic judgment rule nodes, the corresponding triggered form data is recorded and semantic judgment is temporarily suspended, and a provisional value True is returned. For logical operator nodes, a short-circuit evaluation mechanism is used to perform logical operations. If the final result of the logical operation can be determined based on the output result of the left child node, the calculation of the right child node is skipped and the result is returned directly. Otherwise, after obtaining the output result of the right child node, the results of the left and right child nodes are combined and returned. Based on the logical judgment results of the rule tree, a preliminary filtering result set is generated; all form data in this result set has passed all condition matching and logical operations.

7. The intelligent form processing method based on rule tree optimization and large model filtering according to claim 1, characterized in that, S4 includes the following steps: Based on the preliminary screening result set, an uncertain data subset is determined. This subset consists of all form data that passed the preliminary screening through the rule tree and triggered at least one semantic judgment rule node and was recorded during the execution of the rule tree. At the same time, the form data in the preliminary screening result set that did not trigger any semantic judgment rule node constitutes the rule judgment form set. For uncertain subsets of data, a generative pre-trained large language model based on the Transformer architecture is used to make semantic judgments on them. For each piece of form data in the uncertain data subset, trace its execution path in the rule tree; and construct prompt words based on the semantic judgment rule content it triggers and the logical context provided by the condition matching rule on that path. The prompt words are input into the large language model to obtain the semantic judgment results and initial confidence scores returned by it; the semantic consistency of the results is measured through logical context to generate a comprehensive confidence score assessment. From the uncertain data subset, form data that meets the conditions according to semantic judgment and whose comprehensive confidence assessment is higher than the preset threshold is selected to form a semantic judgment form set; Merge the rule-based decision form set and the semantic decision form set to generate the final form filtering results.

8. A form intelligent processing system based on rule tree optimization and large model filtering, characterized in that: Includes the following modules: Data and rule receiving module: Receives raw form data and hierarchical rule combinations, and generates rule logic combinations by parsing the hierarchical rule combinations; Rule tree construction and optimization module: Based on the rule logic combination, an initial rule tree is constructed and structurally optimized to obtain an optimized rule tree; Rule tree execution module: After preprocessing the original form data, the optimized rule tree execution logic is input for judgment to obtain a preliminary filtering result set; The large model semantic adjudication module: It determines an uncertain data subset from the initial screening result set, calls the large model to perform semantic judgment on the subset, and performs secondary screening on the initial screening result set based on the semantic judgment result to generate the final form screening result.

Citation Information

Cited By

  • A method for processing of driver multi-modal physiological data

    CN122175024A