A government affair material intelligent examination rule flow chart editing method and system
Patent Information
- Application Number
- CN202611307444.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-09-25
AI Technical Summary
[0005]基于上述问题,本发明实施例提供了一种政务材料智能审查规则流程图编辑方法和系统,以解决现有技术中政务材料审查技术中规则描述与流程描述相互割裂,导致同一审查逻辑需分别以流程图和规则脚本两种独立模型重复配置、维护困难且AI生成结果无法直接执行的技术问题
(1)通过规则语义流图统一表征规则语义与执行拓扑,从根本上消除了规则脚本与流程图分别建模所导致的语义割裂问题,避免了同一审查逻辑在多处重复配置,降低了规则维护的复杂度。
Smart Images

Figure CN122817488A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent government approval technology, and in particular to a method and system for editing a flowchart of intelligent review rules for government documents. Background Technology
[0002] Intelligent review of government documents is a crucial aspect of digital government construction. With the promotion of systems such as "One-Stop Government Service" and intelligent approval, a large number of approval items are beginning to rely on the automatic review of electronic documents. Currently, the construction and execution of government document review rules mainly rely on technical means such as rule engines (e.g., Drools, decision tables), business process engines (e.g., BPMN, Flowable, Camunda), and low-code workflow orchestration platforms. Business personnel design flowcharts by dragging and dropping nodes or configure review logic by writing rule scripts, and the execution engine completes document verification according to preset processes.
[0003] However, in existing technologies, rule descriptions and process descriptions are fragmented. Flowcharts describe the execution sequence, while rules are maintained independently in the form of scripts, decision tables, etc. These separate storage and modeling lead to repeated configuration of the same review logic, preventing rules from directly driving processes, and hindering processes from fully expressing the semantics of rules. Furthermore, the lack of a unified graph structure and semantic association between rules necessitates maintaining multiple copies when multiple items reference the same review conditions. The impact of rule modifications is difficult to track, easily resulting in inconsistencies and missed modifications. Moreover, AI-assisted generation methods based on large language models currently only output text descriptions or code snippets, still requiring manual conversion into executable rules. The lack of a unified compilation mechanism between AI generation and rule execution means that manual corrections and approval feedback generated during operation cannot be fed back into the rule model, resulting in a lack of self-learning and continuous optimization capabilities for the system as a whole.
[0004] In summary, existing intelligent review technologies for government documents employ independent data models and representation systems for rule modeling, process orchestration, AI generation, and execution scheduling. The lack of a unified rule description framework and semantic association mechanism among these stages leads to difficulties in rule reuse, complex maintenance, inability to directly execute AI-generated results, and challenges in achieving closed-loop operational feedback. How to uniformly express review rules, document dependencies, and execution topology under a single data model has become a pressing technical problem in the field of intelligent government approval. Summary of the Invention
[0005] To address the aforementioned issues, this invention provides a method and system for editing intelligent review rule flowcharts for government documents. This solves the technical problem in existing government document review technologies where rule descriptions and process descriptions are separated, leading to the need for repeated configuration of the same review logic using two independent models—flowcharts and rule scripts—resulting in maintenance difficulties and the inability to directly execute AI-generated results.
[0006] In a first aspect, embodiments of the present invention provide a method for editing a flowchart of intelligent review rules for government documents, the method comprising: Obtain unstructured text data as the basis for government approvals, extract review rule entities and the relationships between each review rule entity from the unstructured text data, and construct a rule knowledge graph based on the extraction results; Based on the prior dependencies between the review rule entities in the rule knowledge graph, directed edges are established between the review rule entities to generate a rule semantic flow graph. The rule semantic flow graph describes the government document review logic in the form of a directed graph. The nodes in the rule semantic flow graph represent review behaviors, and the edges in the rule semantic flow graph represent the dependencies and flow relationships between nodes. In response to the user's editing operation on the rule semantic flow graph, the edited rule semantic flow graph is subjected to circular dependency detection. If a circular dependency is detected, the save operation is locked and the node links forming the circular dependency are highlighted. If no circular dependency is detected, the rule semantic flow graph is topologically expanded and converted into an executable rule instruction sequence. In response to a review request for a target government matter, the system obtains the data of the materials to be reviewed for the target government matter, and instantiates an execution context based on the data of the materials to be reviewed. The execution context is used to record the running status and intermediate data of each node during the review process. Based on the rule instruction sequence and the execution context, each node in the rule semantic flow graph is scheduled to perform review operations on the material data to be reviewed, and the execution context is updated based on the execution results of each node.
[0007] Preferably, the review rule entity includes a government affairs entity, a dependent materials entity, a review basis entity, and a field constraint entity; The prerequisite dependencies are determined by calculating the context dependency probability between each review rule entity in the rule knowledge graph, and determining the dependencies between review rule entities whose context dependency probability is higher than a preset confidence threshold as prerequisite dependencies.
[0008] As a preferred approach, cyclic dependency detection is performed on the edited rule semantic flow graph, specifically including: The edited rule semantic flow graph is converted into an adjacency matrix, and the adjacency matrix is topologically sorted. If there are unsorted nodes in the topological sorting result, it is determined that there is a circular dependency in the rule semantic flow graph.
[0009] Preferably, the rule semantic flow graph is topologically expanded to convert it into an executable sequence of rule instructions, specifically including: Perform topological sorting on the rule semantic flow graph to expand the rule semantic flow graph into a one-dimensional linear dependency sequence; Translate the one-dimensional linear dependency sequence into a rule expression described using a domain-specific language (DSL); The rule expression is compiled into an intermediate representation instruction set for the execution engine, which serves as the executable rule instruction sequence.
[0010] Preferably, scheduling each node in the rule semantic flow graph to perform review operations on the material data to be reviewed specifically includes: Based on the topological dependencies of each node in the rule instruction sequence, the system drives multi-threaded concurrent scheduling of each node in the rule semantic flow graph to perform parallel review operations on multiple documents to be reviewed.
[0011] Preferably, scheduling each node in the rule semantic flow graph to perform review operations on the material data to be reviewed further includes: After each node performs the review operation, it outputs structured data and a confidence score for the structured data. The confidence score is compared with a preset security threshold; If the confidence score is greater than or equal to the preset security threshold, the flow continues according to the preset topology path of the rule instruction sequence; If the confidence score is less than the preset security threshold, the execution thread is suspended while the execution context is preserved, and the execution flow is routed to the manual review node. The execution thread is resumed after the manual review is completed.
[0012] As a preferred option, it also includes: Obtain data on corrections made to the review results during the manual review process; Extract the difference features between the corrected data and the structured data; Calculate the loss function based on the difference characteristics; Based on the calculation results of the loss function, the association weights between the review rule entities in the rule knowledge graph are updated in reverse.
[0013] As a preferred option, it also includes: Obtain the dependency relationships between material fields corresponding to each node in the rule semantic flow graph, and construct a semantic constraint graph based on the dependency relationships. The nodes in the semantic constraint graph represent material fields, and the edges represent the constraint relationships between fields. In response to a user's modification operation on a target field, the scope of influence of the modification operation on the target field is determined by a breadth-first search algorithm based on the semantic constraint graph, and an impact scope prompt is output.
[0014] Preferably, the unstructured text data includes at least one of the following: service guide text, legal regulations text, policy document text, and historical approval case text.
[0015] Secondly, embodiments of the present invention provide an intelligent review rule flowchart editing system for government documents, the system comprising: The knowledge modeling module is used to acquire unstructured text data of the basis for government approval, extract review rule entities and the relationships between the review rule entities from the unstructured text data, and construct a rule knowledge graph based on the extraction results; The rule graph generation module is used to establish directed edges between review rule entities based on the pre-dependencies between them in the rule knowledge graph, and generate a rule semantic flow graph. The rule semantic flow graph describes the review logic of government materials in the form of a directed graph. The nodes in the rule semantic flow graph represent review behaviors, and the edges in the rule semantic flow graph represent the dependencies and flow relationships between nodes. The rule processing module is used to respond to the user's editing operation on the rule semantic flow graph, perform circular dependency detection on the edited rule semantic flow graph, if a circular dependency is detected, lock the save operation and highlight the node links that form the circular dependency, if no circular dependency is detected, perform topology expansion on the rule semantic flow graph and convert the rule semantic flow graph into an executable rule instruction sequence. The context initialization module is used to respond to the review request of the target government affairs matter, obtain the material data to be reviewed for the target government affairs matter, and instantiate the execution context based on the material data to be reviewed. The execution context is used to record the running status and intermediate data of each node during the review process. The execution scheduling module is used to schedule each node in the rule semantic flow graph to perform review operations on the material data to be reviewed according to the rule instruction sequence and the execution context, and update the execution context according to the execution results of each node.
[0016] This invention discloses a method and system for editing intelligent review rule flowcharts for government documents. Using a rule semantic flow graph as a unified data model, it integrates the previously fragmented rule definitions, process arrangement, and execution scheduling within the same framework. First, it extracts review rule entities and their interrelationships from unstructured government approval documents, constructing a rule knowledge graph. Then, based on the pre-existing dependencies between entities, it automatically generates an initial rule semantic flow graph. This graph, in a directed graph form, simultaneously carries review behavior semantics (nodes) and execution dependencies (edges), achieving a heterogeneous fusion of rule logic and execution topology. On this basis, it performs circular dependency detection on the user-edited rule semantic flow graph to ensure the legality of the process topology. If a circular dependency is detected, saving is prevented and problematic links are highlighted; if the detection passes, topology expansion and compilation are automatically performed to generate an executable rule instruction sequence. During the execution phase, an execution context is instantiated for each review request, carrying the running status and intermediate data of each node during the review process. Based on the compiled instruction sequence, each node is scheduled to perform review operations, and the execution results are fed back to the execution context in real time to drive subsequent processes. Compared with existing technologies, the solution of this invention achieves the following technical effects: (1) By uniformly representing the semantics and execution topology of rules through the rule semantic flow graph, the semantic fragmentation caused by separate modeling of rule scripts and flowcharts is fundamentally eliminated, the same review logic is avoided in multiple places, and the complexity of rule maintenance is reduced.
[0017] (2) The circular dependency detection and automatic compilation mechanism are embedded in the rule editing process to ensure that the graphical rules can be converted into executable instruction sequences without loss, thus eliminating the manual conversion gap between AI-generated results and rule execution.
[0018] (3) By carrying the running state through the execution context, the review process no longer depends on static branches, providing a data foundation for subsequent flexible scheduling and self-learning feedback, and overcoming the defect that the existing system's running feedback cannot have a reverse effect on the rule model. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of the intelligent review rule flowchart editing method for government documents provided in this embodiment of the invention; Figure 2The complete process of the intelligent review rule flowchart editing method for government documents provided in this embodiment of the invention during the configuration and operation phases; Figure 3 An overall flowchart provided for embodiments of the present invention; Figure 4 The structural block diagram of the intelligent review rule flowchart editing system for government documents provided in this embodiment of the invention. Detailed Implementation
[0021] To make the features and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Figure 1 This is a flowchart of a method for editing intelligent review rules for government documents according to an embodiment of the present invention, with reference to... Figure 1 , Figure 2 The method includes: S1. Obtain unstructured text data as the basis for government approval, extract review rule entities and the relationships between each review rule entity from the unstructured text data, and construct a rule knowledge graph based on the extraction results.
[0023] Specifically, unstructured text data refers to government approval documents that exist in natural language and lack a fixed data model structure. These include service guides, laws and regulations, policy documents, and historical approval case texts. Review rule entities refer to semantically defined government concept units extracted from the aforementioned unstructured text. These include government matter entities (e.g., food business license applications), dependent material entities (e.g., ID cards, business licenses), review basis entities (e.g., legal provisions), and field constraint entities (e.g., applicant's name matches their ID card name). Relationships refer to the semantic connections between review rule entities, including the attribution relationship between matters and materials, the citation relationship between materials and basis, and the constraint relationship between fields.
[0024] In this step, a large language model is used to perform semantic parsing on the unstructured service guide text, extracting triples of (government affairs, dependent materials, review basis, field constraints) to transform the unstructured natural language text into a structured rule knowledge graph. The rule knowledge graph is a knowledge network formed by entity-modeling information such as government affairs, application materials, review basis, laws and regulations, historical cases, and field constraint relationships. Each rule node can be mapped to a corresponding review rule entity, thus forming semantic relationships between rules.
[0025] This step transforms scattered and unstructured approval criteria into a structured knowledge graph, enabling the semantic information of review rules to be stored, queried, and reasoned using a unified data model. This provides a structured data foundation for the automatic generation of subsequent rule semantic flow graphs, thereby eliminating the data format gap between AI-generated results and rule execution.
[0026] S2. Based on the prior dependencies between the review rule entities in the rule knowledge graph, establish directed edges between the review rule entities to generate a rule semantic flow graph. The rule semantic flow graph describes the government document review logic in the form of a directed graph. The nodes in the rule semantic flow graph represent review behaviors, and the edges in the rule semantic flow graph represent the dependencies and flow relationships between nodes.
[0027] Specifically, prerequisite dependencies refer to the sequential dependencies between review rule entities in terms of execution order, that is, determining the topological order of "who must execute first and who can execute later" in the review process. A RuleSemantic Flow Graph (RSFG) is a data structure that uniformly describes the logic of government document review in the form of a directed graph. Nodes in the graph represent specific review behaviors, including document verification, field extraction, AI (Artificial Intelligence) reasoning, rule judgment, OCR (Optical Character Recognition), interface calls, and manual review. Edges in the graph represent data dependencies, execution order relationships, and conditional flow relationships between nodes. Directed edges are directional connections from prerequisite entities to subsequent entities, indicating that the execution of a prerequisite entity is a prerequisite for the execution of a subsequent entity.
[0028] In this step, the AI calculates the contextual dependency probability between each review rule entity based on the context of the clause, identifies the dependency relationship between review rule entities that is higher than the preset confidence threshold as the pre-determined dependency relationship, and establishes directed edges accordingly, automatically emerges and renders the initial rule semantic flow graph.
[0029] This step directly transforms the rule dependencies inferred by AI from unstructured text into a graphical rule semantic flow graph that conforms to the Directed Acyclic Graph (DAG) specification. This achieves automatic mapping from unstructured text to a visual rule flow graph, eliminating the semantic gap between AI-generated results and rule execution, and enabling the AI reasoning process to be seamlessly integrated into the visual editing environment.
[0030] S3. In response to the user's editing operation on the rule semantic flow graph, perform circular dependency detection on the edited rule semantic flow graph. If a circular dependency is detected, lock the save operation and highlight the node links that form a circular dependency. If no circular dependency is detected, perform topology expansion on the rule semantic flow graph and convert the rule semantic flow graph into an executable rule instruction sequence.
[0031] Specifically, circular dependency detection refers to detecting whether there are directed cycles in the rule semantic flow graph, that is, whether there is a set of nodes forming an execution dependency loop that causes the process to get stuck in an infinite loop during execution. Locking and saving means that when a circular dependency is detected, the system front-end immediately disables the save button to prevent users from saving erroneous configurations containing circular dependencies to the system. Highlighting the nodes forming circular dependencies means visually marking all nodes and their connecting edges that constitute a circular dependency on the visual interface, guiding users to accurately locate the problematic link. Topology unpacking refers to performing topological sorting on the rule semantic flow graph that has passed circular dependency detection, unpacking it from a two-dimensional graph structure into a one-dimensional linear dependency sequence. Executable rule instruction sequence refers to the set of low-level instructions generated after compiling the rule semantic flow graph, which can be directly recognized and executed by the underlying execution engine.
[0032] In this step, after business users drag and drop to edit and connect the rule semantic flow graph on the front end, the system backend converts the graph into an adjacency matrix A and performs real-time acyclic topology verification using a topology sorting algorithm. If a circular loop condition is detected, i.e., a directed cycle exists in adjacency matrix A, the front end immediately locks the save button and highlights the node links forming the circular dependency. If no circular dependency is detected, the rule semantic flow graph is topologically sorted, losslessly expanded into a one-dimensional linear dependency sequence, then translated into a standard domain-specific language (DSL) expression, and further downgraded and compiled into an intermediate representation (IR) instruction set for the execution engine, serving as an executable rule instruction sequence.
[0033] This step immediately blocks the loop deadlock configuration during the editing stage and achieves a lossless WYSIWYG transformation through automatic compilation, fundamentally ensuring the legality of the rule topology and the seamless transformation of rules from graphs to execution, avoiding multiple manual conversions between flowcharts, rule scripts and execution code.
[0034] S4. In response to the review request of the target government matter, obtain the data of the materials to be reviewed for the target government matter, and instantiate an execution context based on the data of the materials to be reviewed. The execution context is used to record the running status and intermediate data of each node during the review process.
[0035] Specifically, the target government service item refers to the specific government approval business that needs to be reviewed, such as "food business license application." The data to be reviewed refers to all electronic application materials submitted by the applicant for this target government service item, including ID card, business license, application form, property ownership certificate, power of attorney, and contract agreement. The execution context is a data object that records the running status, variables, historical output, intermediate results, and inference chain of all nodes in a document review process; the entire process revolves around the execution context for data flow. Instantiation refers to dynamically creating and initializing an independent execution context object based on the specific document data of the current review request.
[0036] In this step, when the application submits materials, the engine responds to the review request of the target government matter, obtains all the material data to be reviewed for that matter, instantiates the execution context based on this material data, and initializes the dynamic state vector to carry the material OCR data, natural language processing comparison status and intermediate inference links of this approval process throughout the entire process.
[0037] This step establishes an independent execution context for each review, transforming the review process from static rule matching to dynamic reasoning based on context state. This provides a data carrier for flexible adaptive scheduling in the subsequent scheduling execution process, enabling the system to make intelligent decisions based on real-time operating status.
[0038] S5. Based on the rule instruction sequence and the execution context, schedule each node in the rule semantic flow graph to perform review operations on the material data to be reviewed, and update the execution context based on the execution results of each node.
[0039] Specifically, the rule instruction sequence refers to the intermediate representation IR instruction set generated by S3 compilation, which is a set of low-level instructions that the execution engine can directly recognize. Scheduling refers to the process by which the execution engine drives each node to execute review operations sequentially or concurrently according to the topological dependencies and execution order specified in the rule instruction sequence. Review operations refer to the specific review behaviors performed by each node, including material verification, field extraction, AI inference, rule judgment, OCR recognition, interface calls, and manual review. Execution results refer to the structured data output by each node after completing the review operations, including extracted field values, verification conclusions, and confidence scores.
[0040] In this step, the scheduling engine loads the intermediate representation IR instruction set and drives multi-threaded concurrent scheduling of the underlying extraction and comparison operators (such as parallel processing of ID cards and business licenses) based on topological dependencies. Each algorithm node outputs structured results and confidence scores (Conf). The scheduling engine compares the confidence scores (Conf) with preset safety thresholds in real time. β If Conf≥ β The process flows along a preset topology path, triggering automatic logical gateway verification; if Conf < β The engine automatically initiates a flexible routing mechanism, suspending the current coroutine in memory while preserving its execution context, and dynamically downgrading the current execution flow to a manually reviewed node. After the manual corrects ambiguous fields on the front end, the coroutine is woken up with a single click, and the process continues along the established topology. The execution results of each node are updated to the execution context in real time.
[0041] This step implements flexible adaptive scheduling based on confidence scores, enabling the system to automatically downgrade to manual review when the algorithm results are uncertain, thus ensuring the continuity and reliability of the review process. At the same time, the execution context carries the inference link throughout the process, making the review process traceable and interpretable, overcoming the black box problem of pure AI review.
[0042] Figure 2 This further illustrates the complete process of the intelligent review rule flowchart editing method for government documents in the configuration and operation phases of this embodiment of the invention. For example... Figure 2As shown, the method includes the following during the configuration phase: a rule knowledge modeling layer, which acquires unstructured text data (including service guides, laws and regulations, policy documents, and historical approval cases) of the basis for government approvals; uses a Large Language Model (LLM) to perform semantic parsing on the unstructured text, extracts triples (government matters, dependent materials, review basis, field constraints), and transforms the unstructured natural language text into a structured rule knowledge graph (KG). Based on this, the system calculates the context dependency probability between each review rule entity in the rule knowledge graph, identifies dependencies between review rule entities with context dependency probabilities higher than a pre-set confidence threshold as pre-determined dependencies, and establishes directed edges accordingly, automatically generating an initial rule semantic flow graph (RSFG). The rule flow graph editing layer responds to user editing operations on the rule semantic flow graph (such as dragging and dropping lines), converts the edited rule semantic flow graph into an adjacency matrix A, and performs topological sorting on the adjacency matrix. If unsorted nodes exist in the topology sorting result, a circular dependency is determined to exist in the rule semantic flow graph. If a circular dependency is detected, the operation is locked and saved, and the node links forming the circular dependency are highlighted. If no circular dependency is detected, the rule semantic flow graph is passed to the next layer for compilation. The rule compilation layer performs topology sorting on the rule semantic flow graph that passes the circular dependency detection, losslessly unfolding it from a two-dimensional graph structure into a one-dimensional linear dependency sequence. Then, the one-dimensional linear dependency sequence is translated into rule expressions described using a Domain-Specific Language (DSL). Finally, the rule expressions are compiled into an Intermediate Representation (IR) instruction set for the execution engine, serving as an executable sequence of rule instructions. The execution scheduling layer responds to the review request of the target government matter, obtains the data of the materials to be reviewed for the target government matter, and instantiates an execution context based on the data. The execution context is used to record the running status and intermediate data of each node during the review process; the entire process revolves around the execution context for data flow. Subsequently, based on the topological dependencies of each node in the rule instruction sequence, the scheduling engine drives multi-threaded concurrent scheduling of nodes in the rule semantic flow graph, performing parallel review operations on multiple documents to be reviewed. The scheduling engine drives multi-threaded concurrent scheduling operators based on the IR instruction set; algorithm nodes output structured results and confidence scores (Conf), and the engine compares the Conf with security thresholds in real time. β If Conf≥ β Then it flows along the preset topology path, if Conf < βThe coroutine is then suspended and routed to the manual review node; after manual correction, the coroutine is awakened and continues to flow. The feedback optimization layer captures the difference features before and after manual correction and calculates the loss function. Using the backpropagation mechanism, the error gradient is injected back into the knowledge modeling layer to dynamically adjust the entity association weights in the rule knowledge graph, thereby realizing the system's self-learning evolution.
[0043] Based on the above embodiments, as a preferred implementation, the review rule entity includes government affairs entity, dependent material entity, review basis entity, and field constraint entity. Specifically, in step S1, when performing semantic parsing of the unstructured service guide text using a large language model, each element in the extracted (government affairs, dependent materials, review basis, field constraints) triple is a type of review rule entity. By using the above four types of entities as specific types of review rule entities, the rule knowledge graph can fully cover all semantic elements involved in government affairs review business, providing a comprehensive source of entity nodes for the subsequent generation of rule semantic flow graphs.
[0044] The prerequisite dependencies are determined by calculating the context dependency probability between each review rule entity in the rule knowledge graph, and determining the dependencies between review rule entities whose context dependency probability is higher than a preset confidence threshold as prerequisite dependencies.
[0045] The context dependency probability refers to the probability value calculated after semantic analysis of unstructured government documents based on a large language model, indicating that there is an execution order dependency between two review rule entities. This probability value reflects the likelihood that, within a given approval process context, the review action of one entity can only begin after the review action of another entity has been completed. The pre-set confidence threshold is a configurable hyperparameter, denoted as... β This is used to control the strictness of automatic edge construction. Only dependencies between entities with a context dependency probability higher than this threshold are identified as prerequisite dependencies and directed edges are established. Dependencies below the threshold are considered noise or weak associations and are automatically pruned.
[0046] Taking food business license application as an example, the system calculates the context dependency probability between the "Business License Legal Representative Information Verification" entity and the "ID Card Information Verification" entity. Since the name of the legal representative on the business license must match the name on the ID card in the business logic, there is a high probability of dependency between these two entities. The system identifies this dependency as a prerequisite dependency and establishes a directed edge. That is, in the rule semantic flow graph, the ID Card Information Verification node and the Business License Legal Representative Information Verification node establish a directed connection based on the business dependency direction, indicating sequential execution. Similarly, the system calculates the context dependency probability between the "Application Address Verification" entity and the "Property Certificate Address Verification" entity. Since the application address must simultaneously satisfy the consistency constraints of the business license registration address, application address, property certificate address, and lease contract address, there is a high probability of context dependency between these entities, and the system identifies this as a prerequisite dependency. Through this method, the system automatically filters entity pairs with definite execution order dependencies from the knowledge graph, thereby generating a rule semantic flow graph topology that conforms to the business logic, avoiding the inefficiency and potential for omissions caused by manually configuring dependencies between nodes one by one.
[0047] Based on the above embodiments, as a preferred implementation, cyclic dependency detection is performed on the edited rule semantic flow graph, specifically including: The edited rule semantic flow graph is converted into an adjacency matrix, and the adjacency matrix is topologically sorted. If there are unsorted nodes in the topological sorting result, it is determined that there is a circular dependency in the rule semantic flow graph.
[0048] Specifically, after business personnel drag and drop to edit and connect nodes in the rule semantic flow graph, the system backend needs to perform real-time verification of the graph's structural validity. An adjacency matrix is a two-dimensional matrix data structure used to represent the dependencies between nodes in a rule semantic flow graph. If the rule semantic flow graph has n nodes, then the adjacency matrix A is an n×n square matrix, where the matrix elements A... ij The rule for determining the value of A is: if there is a directed edge between node i and node j (i.e., the execution of node j depends on the execution of node i), then A ij =1; if there is no directed edge, then A ij =0. By converting the graphical rule-based semantic flow graph into an adjacency matrix, the system transforms the structural relationships of the graph into a numerical representation that can be efficiently processed by a computer, providing a standardized input data format for subsequent topological sorting.
[0049] Topological sorting refers to performing a topological sorting algorithm on a directed graph represented by an adjacency matrix. Topological sorting is a classic algorithm in graph theory used to arrange all vertices of a directed acyclic graph (DAG) into a linear sequence. Its core principle is: in a directed graph, repeatedly find vertices with an in-degree of zero (i.e., vertices that do not depend on other vertices), remove these vertices from the graph and add them to the sorted sequence, while simultaneously removing all their outgoing edges. This process is repeated until all vertices have been removed. If a cycle exists in the graph, the in-degree of vertices in the cycle will never be zero, and these vertices will not be included in the sorted sequence when the algorithm terminates.
[0050] Unsorted nodes are those that, after topological sorting, are not included in the resulting sequence. According to the basic principle of topological sorting, a directed graph can be topologically sorted for all its vertices if and only if it is a directed acyclic graph (DAG). If a directed cycle exists in the graph, the vertices on the cycle are mutually dependent, and there are no vertices with an in-degree of zero, preventing the topological sorting algorithm from traversing all nodes. Therefore, if unsorted nodes exist in the topological sorting result, it can be determined that a circular dependency exists in the regular semantic flow graph.
[0051] Taking a food business license application scenario as an example, suppose the rule semantic flow graph contains node A ("ID card information verification"), node B ("Business license legal representative information verification"), and node C ("Application form information verification"). Node A points to node B (indicating that legal representative information verification can only proceed after ID card verification is completed), and node B points to node C. After converting this rule semantic flow graph into an adjacency matrix, the system performs a topological sort. Since there are no directed cycles in the graph, the topological sorting algorithm can sort all nodes, and there are no unsorted nodes in the sorted result. The system determines that the rule semantic flow graph passes the circular dependency detection. Conversely, if the user mistakenly points node C to node A (forming a circular dependency loop A→B→C→A), the topological sorting algorithm will not be able to sort all nodes, and nodes A, B, and C will not be included in the sorted result. Based on this, the system determines that a circular dependency exists and prevents saving.
[0052] Through the above methods, the system can perform real-time circular dependency detection on the rule semantic flow graph during the editing stage using adjacency matrices and topological sorting algorithms, instantly blocking circular deadlock configurations and fundamentally ensuring the legality of the rule topology. This detection mechanism avoids the inefficient method of relying on manual checks for circular dependencies in traditional flowcharts, and solves the problems of complex dependencies and difficulty in detecting and maintaining circular dependencies after the flowchart size expands in existing technologies, ensuring that only legal directed acyclic graph structures can enter the subsequent compilation and execution stages.
[0053] Based on the above embodiments, as a preferred implementation, the rule semantic flow graph is topologically expanded to convert it into an executable sequence of rule instructions, specifically including: Perform topological sorting on the rule semantic flow graph to expand it into a one-dimensional linear dependency sequence.
[0054] Specifically, topological sorting refers to performing a topological sorting algorithm on a regular semantic flow graph that has passed the circular dependency detection, unfolding it from a two-dimensional graph structure into a one-dimensional linear dependency sequence. A regular semantic flow graph is essentially a directed acyclic graph (DAG), where nodes express their execution order dependencies through directed edges; the execution of a node can only begin after several other nodes have completed. However, while the graph structure intuitively expresses the dependencies between nodes, it cannot be directly executed sequentially by the execution engine because the engine requires a clear, linear list of execution orders. The role of topological sorting is to transform the implicit partial order relations in the graph structure into total order relations: by performing a topological sort on the DAG, a linear sequence is generated in which the order in which each node appears satisfies the directional constraints of all directed edges in the graph. That is, if there is a directed edge from node A to node B in the graph (indicating that B depends on A), then A must appear before B in the linear sequence. Through topological sorting, the two-dimensional graph structure is losslessly unfolded into a one-dimensional linear dependency sequence, which preserves the execution order constraints of all nodes in the original graph, providing a structurally clear intermediate representation for subsequent compilation and transformation.
[0055] The one-dimensional linear dependency sequence is translated into a rule expression described using a Domain-Specific Language (DSL). A Domain-Specific Language is a computer language designed to solve problems in a specific domain. In this embodiment, DSL specifically refers to a structured rule description language used to describe rules for reviewing government documents. It is used to uniformly express the relationships between document nodes, logical judgment nodes, conditional nodes, loop nodes, external interface nodes, and manual review nodes, enabling the review process to be described, parsed, and executed using a unified data model. A rule expression is the rule text described using DSL, obtained by translating the one-dimensional linear dependency sequence according to its syntax rules. During this translation process, the system converts each node in the linear sequence and its corresponding review behavior, data dependency relationship, and conditional flow relationship into a corresponding syntactic structure according to the DSL syntax specifications. For example, an "ID card information verification" node is translated into the corresponding document verification statement in DSL, and a conditional branch node is translated into a conditional judgment statement in DSL. Through this translation step, the topology of the rule semantic flow graph is completely mapped to a DSL expression, achieving a lossless conversion from graphical rules to textual rule descriptions.
[0056] The rule expression is compiled into an intermediate representation instruction set for the execution engine, which serves as the executable rule instruction sequence.
[0057] The compilation process involves further downgrading the DSL expression into an intermediate representation (IR) instruction set for the execution engine. The IR instruction set is an intermediate representation between the high-level DSL expression and the underlying machine code. Its instruction format is specifically designed to be directly recognized and efficiently executed by the execution engine. In this compilation step, the compiler performs syntax analysis, semantic analysis, and code generation on the DSL expression: first, it parses the syntactic structure of the DSL expression; then, it generates corresponding IR instructions based on the semantics of each syntactic element; finally, it outputs a complete sequence of IR instructions as the executable rule instruction sequence. The design of the IR instruction set fully considers the needs of multi-branch concurrent execution and node-level dynamic scheduling, enabling the compiled instruction sequence to support flexible task scheduling by the execution engine at runtime.
[0058] Taking a food business license application as an example, assume the rule semantic flow graph contains a "ID card OCR recognition" node, a "business license OCR recognition" node, and a "name consistency verification" node, where each node depends on the execution results of the first two nodes. The system first performs a topological sort on the rule semantic flow graph, expanding the three nodes into a one-dimensional linear sequence: "ID card OCR recognition" first, followed by "business license OCR recognition" (the two are concurrent), and "name consistency verification" last. Then, the system translates this linear sequence into a DSL expression: "ID card OCR recognition" is translated into an OCR call statement in the DSL, "business license OCR recognition" into another parallel OCR call statement, and "name consistency verification" into a field comparison rule statement in the DSL. Finally, the compiler compiles the above DSL expression into an IR instruction set, including OCR call instructions, concurrent execution instructions, field reading instructions, comparison instructions, and conditional jump instructions, as an executable sequence of rule instructions for the execution engine to schedule and execute.
[0059] Through the three-stage transformation described above, this invention achieves a lossless, WYSIWYG conversion from a visual rule semantic flow diagram to an executable instruction sequence. This conversion process solves the technical problem in existing technologies where AI-generated results cannot directly form executable rules, and where repeated manual conversion between flowcharts and rule scripts is required. The Rule Compiler, acting as a lossless translator connecting the business graph and the underlying execution engine, ensures that the rule semantic flow diagram generated by business personnel through drag-and-drop editing can be automatically and completely converted into an executable instruction sequence, without the need for manual writing of any rule scripts or code, greatly reducing the configuration and maintenance costs of government document review rules.
[0060] Based on the above embodiments, as a preferred implementation, scheduling each node in the rule semantic flow graph to perform review operations on the material data to be reviewed specifically includes: Based on the topological dependencies of each node in the rule instruction sequence, the system drives multi-threaded concurrent scheduling of each node in the rule semantic flow graph to perform parallel review operations on multiple documents to be reviewed.
[0061] Specifically, after the rule instruction sequence is generated, the scheduling engine needs to drive each review node to perform specific review operations on the applicant's submitted materials data according to the execution order and dependencies specified in the instruction sequence. Topological dependencies refer to the execution order dependencies between nodes in the rule instruction sequence, determined by directed edges in the rule semantic flow graph. If node A precedes node B in the instruction sequence, it means that the execution of node B depends on the execution result of node A, and node A must complete before node B. Multi-threaded concurrent scheduling refers to the execution scheduling engine starting multiple execution threads within the same time window, driving different review nodes to execute review operations in parallel. In a computer system, a thread is the smallest unit of execution that the operating system can schedule. Multiple threads can execute concurrently within the same process, sharing process resources but executing instruction sequences independently. Concurrent scheduling means that the scheduling engine arranges multiple nodes that do not have dependencies on each other to execute simultaneously within the same time period, thereby fully utilizing the computing resources of multi-core processors. Review operations refer to the specific review behaviors performed by each node, including material verification, field extraction, AI inference, rule judgment, OCR recognition, interface calls, and manual review. The data to be reviewed refers to all electronic application materials submitted by the applicant for the target government matter, including ID card, business license, application form, real estate ownership certificate, power of attorney and contract agreement.
[0062] Through the above methods, this invention achieves multi-threaded concurrent scheduling based on topological dependencies, solving the technical problem of low review efficiency caused by the fact that most nodes in existing workflow orchestration tools are executed sequentially in a serial manner, failing to fully utilize the parallel computing capabilities of multi-core processors. The scheduling engine automatically identifies the set of nodes that can be executed in parallel based on the topological dependencies of each node in the rule instruction sequence, driving multi-threaded concurrent scheduling of each node to execute review operations in parallel, thereby maximizing review throughput while ensuring the correctness of the execution order.
[0063] Based on the above embodiments, as a preferred implementation method, such as Figure 3 As shown, scheduling each node in the rule semantic flow graph to perform review operations on the material data to be reviewed also includes: After each node performs the review operation, it outputs structured data and a confidence score for the structured data.
[0064] The confidence score is compared with a preset security threshold.
[0065] If the confidence score is greater than or equal to the preset security threshold, the flow continues according to the preset topology path of the rule instruction sequence.
[0066] If the confidence score is less than the preset security threshold, the execution thread is suspended while the execution context is preserved, and the execution flow is routed to the manual review node. The execution thread is resumed after the manual review is completed.
[0067] Specifically, during the process where the scheduling engine drives each node to perform review operations according to the rule instruction sequence, each algorithm node, after completing the review operation, not only outputs the structured extraction results but also simultaneously outputs the confidence score (Conf) of the structured data. Structured data refers to the extraction results with a clear data structure output by each node after completing the review operation, including field values extracted from the material (such as ID card number, name, business address, etc.), verification conclusions (such as consistency or inconsistency), and intermediate inference results. The confidence score is a probability value or score given by the algorithm node after quantitatively evaluating the reliability of its output results, used to measure the certainty and credibility of the output results. For example, after the OCR recognition node performs text recognition on an ID card photo, it not only outputs the recognized name and ID card number strings but also outputs the confidence score for each recognition result. If the ID card photo is clear and the font is standardized, the confidence score is high (e.g., 0.95); if the photo is blurry, has occlusions, or uneven lighting, the confidence score is low (e.g., 0.62). The preset security threshold is a configurable system parameter, denoted as... βThis threshold serves as a decision boundary for determining the reliability of automated processing results. Output results exceeding this threshold are considered reliable and can be automatically processed by the system; output results below this threshold are considered unreliable and require manual review. The preset topology path refers to the predefined standard execution flow path within the rule instruction sequence, i.e., the node execution order determined by the directed edges in the rule semantic flow graph.
[0068] During the scheduling process, the scheduling engine compares the confidence score (Conf) output by each algorithm node with the preset safety threshold in real time. β If Conf≥ β This indicates that the output of the algorithm node has sufficient credibility, and the process continues to flow along the preset topology path, triggering the automatic logic gateway to perform subsequent rule verification and judgment. For example, in a food business license application, if the confidence score of the name recognition result output by the ID card OCR recognition node is 0.96, which is higher than the preset security threshold of 0.85, the scheduling engine determines that the recognition result is credible, and the process continues to flow along the preset topology path to the name consistency verification node for automatic comparison.
[0069] If Conf< β This indicates that the output of the algorithm node lacks sufficient confidence. In this case, the scheduling engine automatically initiates a flexible routing mechanism: first, it suspends the currently executing thread in memory while fully preserving the current execution context. Suspending the execution thread means paused the currently executing review process thread, returning control of the thread to the scheduling engine. During the suspension, the thread does not occupy CPU computing resources but retains its entire runtime state. Preserving the execution context means that while suspending the thread, all running states, variables, historical outputs, intermediate results, and inference chains recorded in the execution context are persistently saved, including the execution state of the current node, the output results of completed nodes, the list of nodes to be executed, and the complete inference chain data. Subsequently, the scheduling engine dynamically downgrades the current execution flow to a human review node. The human review node is a special node type in the rule semantic flow graph, used to hand over the review task to human processing when the algorithm result is uncertain. After the human review node is activated, it presents the identification results with insufficient confidence, the original material image, and context information to the reviewer, who then manually corrects ambiguous fields at the front end. After manual correction and submission, a manual review completion signal is sent to the scheduling engine. The scheduling engine wakes up the suspended execution thread based on this signal, restores the full state of the execution context, and the process continues to flow along the predetermined topology path.
[0070] Through the above methods, this invention achieves flexible adaptive scheduling based on confidence scoring. This mechanism solves the technical problems in existing technologies where process nodes can only perform hard-coded branch judgments according to preset conditions, and cannot dynamically adjust the execution path based on recognition confidence when there are complex situations such as unclear materials, obstructions, or rule conflicts. Specifically, this mechanism enables the system to automatically degrade to manual review when the algorithm result is uncertain, ensuring the continuity and reliability of the review process; at the same time, the execution context carries the inference link throughout, making the review process traceable and interpretable, overcoming the black box problem of pure AI review; in addition, by suspending the execution thread and retaining the execution context, the process can be seamlessly resumed at the breakpoint after manual review, without re-executing completed nodes, avoiding waste of computing resources and extension of review time.
[0071] Based on the above embodiments, as a preferred implementation, S6 is further included: Obtain the correction data for the review results during the manual review process.
[0072] Extract the difference features between the corrected data and the structured data.
[0073] The loss function is calculated based on the difference features.
[0074] Based on the calculation results of the loss function, the association weights between the review rule entities in the rule knowledge graph are updated in reverse.
[0075] Specifically, after the scheduling engine routes execution flows with insufficient confidence to manual review nodes, and the manual reviewer completes the corrections and submits the changes, the feedback optimization layer starts running. The feedback optimization layer is the fifth layer in the five-layer architecture of this embodiment, used to build a closed-loop mechanism of execution-feedback-self-learning. Corrected data refers to the data generated after reviewers modify the original output results of the algorithm nodes during the manual review process. Structured data refers to the original structured results output by each node after completing the review operation, including field values extracted from the materials, verification conclusions, etc. The difference between corrected data and structured data reflects the errors or deviations generated by the algorithm nodes during the automatic review process and is the core signal source driving the system's self-learning optimization.
[0076] Differential features are vectors of differences extracted after comparing the corrected data with the original structured data field by field. Specifically, the system represents the corrected data and the original structured data numerically or symbolically on the same field, and then calculates the difference between them. For categorical fields (such as name or ID number), the difference is represented by a binary difference of "consistent" or "inconsistent"; for numerical fields (such as confidence scores), the difference is represented by the numerical difference between the two. Combining the difference values from all fields into a vector constitutes the differential feature. This differential feature quantifies the direction and magnitude of the manual correction's offset relative to the algorithm's original output, reflecting the specific error pattern of the algorithm in this review.
[0077] The loss function is a mathematical function used to quantify the difference between the original output of an algorithm and the correct result after manual correction. In this embodiment, the loss function takes the difference features as input and calculates a scalar loss value. The larger the value, the greater the deviation between the algorithm output and the manually corrected result, i.e., the lower the review accuracy of the algorithm. The specific form of the loss function can be configured according to the type of review task. For classification tasks (such as "consistency / inconsistency" judgment), cross-entropy loss can be used; for regression tasks (such as confidence score prediction), mean squared error loss can be used.
[0078] Backward update refers to the process of dynamically adjusting the association weights between review rule entities in the rule knowledge graph by backpropagating the error gradient into the knowledge modeling layer based on the calculated loss function results. Association weight refers to the strength of the association between two review rule entities in the rule knowledge graph; this weight determines the probability of establishing a directed edge between the two entities in subsequent rule generation. The specific process of backward update is as follows: First, calculate the gradient of the loss function with respect to the association weights between entities in the knowledge graph, i.e., the partial derivative of the loss value with respect to each association weight. This gradient reflects how the loss value changes if a certain association weight is slightly increased or decreased. Then, based on the calculated gradient direction, fine-tune the association weights. If the gradient is positive, decrease the weight according to a preset rule; if the gradient is negative, increase the weight according to a preset rule. Through this gradient descent-style weight adjustment, a rule topology structure that more closely resembles the result of manual correction can be generated in the next round of rule generation.
[0079] Through the above methods, this embodiment constructs a complete operation-feedback-self-learning closed-loop mechanism. This mechanism solves the technical problem in existing technologies that abnormal correction data generated during operation and manual review results cannot be reverse-engineered into rule assets and cannot drive iterative upgrades of the rule graph. Specifically, the feedback optimization layer dynamically captures the modification trajectory of human intervention on the AI initial review results at the review node, transforms the "correction behavior" into differential features and calculates the loss function, and uses the backpropagation mechanism to inject the error gradient back into the knowledge modeling layer, dynamically adjusting the entity association weights in the rule knowledge graph. This enables the system to learn from each manual review and continuously optimize subsequent rule emergence and initial review accuracy, achieving intelligent evolution of the system.
[0080] Based on the above embodiments, as a preferred implementation, S7 is further included: Obtain the dependency relationships between material fields corresponding to each node in the semantic flow graph of the rules, and construct a semantic constraint graph based on the dependency relationships. The nodes in the semantic constraint graph represent material fields, and the edges represent the constraint relationships between the fields.
[0081] In response to a user's modification operation on a target field, the scope of influence of the modification operation on the target field is determined by a breadth-first search algorithm based on the semantic constraint graph, and an impact scope prompt is output.
[0082] Specifically, during the process of editing the rule semantic flow graph by business personnel, in addition to checking for circular dependencies in the process topology, it is also necessary to manage and analyze the dependency relationships between the material fields operated on by each node in the rule semantic flow graph. Material fields refer to data units carrying specific information in government documents, such as "name" and "ID number" in an ID card, "legal representative" and "registered address" in a business license, and "applicant name" and "application address" on an application form. The dependency relationships between material fields refer to the consistency constraints that must be met between identical or related fields in different materials. For example, the applicant's name must be consistent with multiple materials such as the ID card, the legal representative's name on the business license, the power of attorney, and the application form; the business address must simultaneously meet the consistency constraints of the registered address on the business license, the application address, the property ownership certificate address, and the lease agreement address. A semantic constraint graph (SCG) is a graph model used to describe the field dependencies between materials. In a semantic constraint graph, nodes represent various material fields, and edges represent the constraint relationships between fields. All relationships form constraint edges. When any node changes, the graph model can automatically trigger a re-verification of the entire network of relationships.
[0083] In this step, the dependencies between material fields corresponding to each node in the rule semantic flow graph are first obtained. Each review behavior node in the rule semantic flow graph operates on one or more specific material fields. After identifying the material fields operated on by each node, the dependencies and constraints that these fields should satisfy in business logic are extracted. Based on these extracted field dependencies, a semantic constraint graph is constructed. In this semantic constraint graph, each material field is modeled as a node, and each constraint relationship between fields is modeled as an undirected edge connecting the two nodes.
[0084] After the semantic constraint graph is constructed, real-time monitoring is performed on user modifications to the material fields corresponding to each node in the rule semantic flow graph. The target field refers to the material field that the user is currently modifying. When a user modifies the target field (for example, the user modifies the verification rule of the "ID card name" field corresponding to the "ID card information verification" node in the rule semantic flow graph), it is necessary to determine which other fields will be affected by this modification. Breadth-First Search (BFS) is a classic algorithm for traversing or searching tree or graph data structures. Its core principle is: starting from a given starting node, first visit all directly adjacent nodes (i.e., nodes with a distance of 1), then visit all unvisited adjacent nodes (i.e., nodes with a distance of 2), and so on, expanding outwards layer by layer until all reachable nodes have been traversed. The scope of influence refers to the set of all nodes and their corresponding material fields that can be traversed by the breadth-first search algorithm starting from the target field node in the semantic constraint graph. In other words, the scope of impact includes all fields that are directly or indirectly constrained by the target field, and these fields may need to be adjusted synchronously due to the modification of the target field.
[0085] Through the above method, this embodiment achieves automatic analysis of the impact range of rule modifications based on semantic constraint graphs. This mechanism solves the technical problems in existing technologies, such as the lack of unified semantic association between rules, the difficulty in tracking the impact range of rule modifications when multiple items reference the same review conditions, and the high risk of rule inconsistencies and modification omissions. Specifically, by dynamically calculating the "explosion radius" of field modifications on the semantic constraint graph using a breadth-first search algorithm, it can accurately identify the range of all fields affected by the target field modification. This allows business personnel to clearly understand the entire impact range of modification operations when modifying rules, thereby avoiding the problem of global rule inconsistencies caused by local modifications.
[0086] Secondly, embodiments of the present invention provide an intelligent review rule flowchart editing system for government documents, based on the methods described in the above embodiments, such as... Figure 4 As shown, the system 400 includes: The knowledge modeling module 410 is used to obtain unstructured text data of the basis for government approval, extract review rule entities and the relationships between the review rule entities from the unstructured text data, and construct a rule knowledge graph based on the extraction results.
[0087] The rule graph generation module 420 is used to establish directed edges between review rule entities based on the pre-dependencies between them in the rule knowledge graph, and generate a rule semantic flow graph. The rule semantic flow graph describes the government document review logic in the form of a directed graph. The nodes in the rule semantic flow graph represent review behaviors, and the edges in the rule semantic flow graph represent the dependencies and flow relationships between nodes.
[0088] The rule processing module 430 is used to respond to the user's editing operation on the rule semantic flow graph, perform circular dependency detection on the edited rule semantic flow graph, if a circular dependency is detected, lock the save operation and highlight the node links that form the circular dependency, if no circular dependency is detected, perform topology expansion on the rule semantic flow graph and convert the rule semantic flow graph into an executable rule instruction sequence.
[0089] The context initialization module 440 is used to respond to the review request of the target government affairs matter, obtain the material data to be reviewed for the target government affairs matter, and instantiate an execution context based on the material data to be reviewed. The execution context is used to record the running status and intermediate data of each node during the review process.
[0090] The execution scheduling module 450 is used to schedule each node in the rule semantic flow graph to perform review operations on the material data to be reviewed according to the rule instruction sequence and the execution context, and update the execution context according to the execution results of each node.
[0091] Where there is no conflict, the technical features in this embodiment and implementation scheme can be combined arbitrarily.
[0092] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. It will be apparent to those skilled in the art that various modifications can be made to these embodiments, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for editing a flowchart of intelligent review rules for government documents, characterized in that, The method includes: Obtain unstructured text data as the basis for government approvals, extract review rule entities and the relationships between each review rule entity from the unstructured text data, and construct a rule knowledge graph based on the extraction results; Based on the prior dependencies between the review rule entities in the rule knowledge graph, directed edges are established between the review rule entities to generate a rule semantic flow graph. The rule semantic flow graph describes the government document review logic in the form of a directed graph. The nodes in the rule semantic flow graph represent review behaviors, and the edges in the rule semantic flow graph represent the dependencies and flow relationships between nodes. In response to the user's editing operation on the rule semantic flow graph, the edited rule semantic flow graph is subjected to circular dependency detection. If a circular dependency is detected, the save operation is locked and the node links forming the circular dependency are highlighted. If no circular dependency is detected, the rule semantic flow graph is topologically expanded and converted into an executable rule instruction sequence. In response to a review request for a target government matter, the system obtains the data of the materials to be reviewed for the target government matter, and instantiates an execution context based on the data of the materials to be reviewed. The execution context is used to record the running status and intermediate data of each node during the review process. Based on the rule instruction sequence and the execution context, each node in the rule semantic flow graph is scheduled to perform review operations on the material data to be reviewed, and the execution context is updated based on the execution results of each node.
2. The method for editing the flowchart of intelligent review rules for government documents according to claim 1, characterized in that, The review rules entity includes the government affairs entity, dependent materials entity, review basis entity, and field constraint entity; The prerequisite dependencies are determined by calculating the context dependency probability between each review rule entity in the rule knowledge graph, and determining the dependencies between review rule entities whose context dependency probability is higher than a preset confidence threshold as prerequisite dependencies.
3. The method for editing the flowchart of intelligent review rules for government documents according to claim 1, characterized in that, Perform circular dependency detection on the edited rule semantic flow graph, specifically including: The edited rule semantic flow graph is converted into an adjacency matrix, and the adjacency matrix is topologically sorted. If there are unsorted nodes in the topological sorting result, it is determined that there is a circular dependency in the rule semantic flow graph.
4. The method for editing the flowchart of intelligent review rules for government documents according to claim 1, characterized in that, The rule semantic flow graph is topologically expanded to convert it into an executable sequence of rule instructions, specifically including: Perform topological sorting on the rule semantic flow graph to expand the rule semantic flow graph into a one-dimensional linear dependency sequence; Translate the one-dimensional linear dependency sequence into a rule expression described using a domain-specific language (DSL); The rule expression is compiled into an intermediate representation instruction set for the execution engine, which serves as the executable rule instruction sequence.
5. The method for editing the flowchart of intelligent review rules for government documents according to claim 1, characterized in that, The process of scheduling each node in the rule semantic flow graph to perform review operations on the material data to be reviewed specifically includes: Based on the topological dependencies of each node in the rule instruction sequence, the system drives multi-threaded concurrent scheduling of each node in the rule semantic flow graph to perform parallel review operations on multiple documents to be reviewed.
6. The method for editing the flowchart of intelligent review rules for government documents according to claim 1, characterized in that, The method of scheduling each node in the rule semantic flow graph to perform review operations on the material data to be reviewed also includes: After each node performs the review operation, it outputs structured data and a confidence score for the structured data. The confidence score is compared with a preset security threshold; If the confidence score is greater than or equal to the preset security threshold, the flow continues according to the preset topology path of the rule instruction sequence; If the confidence score is less than the preset security threshold, the execution thread is suspended while the execution context is preserved, the execution flow is routed to the manual review node, and the execution thread is resumed after receiving the manual review completion signal.
7. The method for editing the flowchart of intelligent review rules for government documents according to claim 6, characterized in that, Also includes: Obtain data on corrections made to the review results during the manual review process; Extract the difference features between the corrected data and the structured data; Calculate the loss function based on the difference characteristics; Based on the calculation results of the loss function, the association weights between the review rule entities in the rule knowledge graph are updated in reverse.
8. The method for editing the flowchart of intelligent review rules for government documents according to claim 1, characterized in that, Also includes: Obtain the dependency relationships between material fields corresponding to each node in the rule semantic flow graph, and construct a semantic constraint graph based on the dependency relationships. The nodes in the semantic constraint graph represent material fields, and the edges represent the constraint relationships between fields. In response to a user's modification operation on a target field, the scope of influence of the modification operation on the target field is determined by a breadth-first search algorithm based on the semantic constraint graph, and an impact scope prompt is output.
9. The method for editing the flowchart of intelligent review rules for government documents according to claim 1, characterized in that, The unstructured text data includes at least one of the following: service guide text, legal regulations text, policy document text, and historical approval case text.
10. A flowchart editing system for intelligent review rules of government documents, characterized in that, The system includes: The knowledge modeling module is used to acquire unstructured text data of the basis for government approval, extract review rule entities and the relationships between the review rule entities from the unstructured text data, and construct a rule knowledge graph based on the extraction results; The rule graph generation module is used to establish directed edges between review rule entities based on the pre-dependencies between them in the rule knowledge graph, and generate a rule semantic flow graph. The rule semantic flow graph describes the review logic of government materials in the form of a directed graph. The nodes in the rule semantic flow graph represent review behaviors, and the edges in the rule semantic flow graph represent the dependencies and flow relationships between nodes. The rule processing module is used to respond to the user's editing operation on the rule semantic flow graph, perform circular dependency detection on the edited rule semantic flow graph, if a circular dependency is detected, lock the save operation and highlight the node links that form the circular dependency, if no circular dependency is detected, perform topology expansion on the rule semantic flow graph and convert the rule semantic flow graph into an executable rule instruction sequence. The context initialization module is used to respond to the review request of the target government affairs matter, obtain the material data to be reviewed for the target government affairs matter, and instantiate the execution context based on the material data to be reviewed. The execution context is used to record the running status and intermediate data of each node during the review process. The execution scheduling module is used to schedule each node in the rule semantic flow graph to perform review operations on the material data to be reviewed according to the rule instruction sequence and the execution context, and update the execution context according to the execution results of each node.