A policy document element extraction method based on evidence chain driving
Patent Information
- Application Number
- CN202611080901.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]然而,现有技术中政策文档要素抽取存在以下不足:第一,政策文本格式多样,基于固定模板的抽取方法泛化能力差,容易出现漏提错提等问题,真实政策文档存在大量跨体裁、跨地区、跨层级的写法差异,导致预设的固定要素清单难以稳定对齐;
本申请提供了一种基于证据链驱动的政策文档要素抽取方法,对原始政策文档进行视觉感知,得到文档版面树以及各基础文本块的基础文本单元数组;采用解析智能体,根据预设一级槽位模板以及文档版面树,对所有基础文本块的基础文本单元数组进行政策要素抽取,得到多条一级政策要素的初始抽取数据,以及对应的一级证据链对象;采用评估智能体,对各条一级政策要素的初始抽取数据以及对应的一级证据链对象进行评估,得到各条一级政策要素的评估结果;若多条一级政策要素中存在目标一级政策要素的评估结果为未通过,采用解析智能体,根据目标一级政策要素的标识信息和初始抽取数据,生成目标一级政策要素的二级槽位模板;采用解析智能体,根据目标一级政策要素的二级槽位模板以及文档版面树,对所有基础文本块的基础文本单元数组进行政策要素抽取,得到目标一级政策要素的目标抽取数据,以及对应的二级证据链对象;根据目标一级政策要素的目标抽取数据、对应的二级证据链对象、其他一级政策要素的初始抽取数据以及对应的一级证据链对象,生成原始政策文档的政策要素抽取结果。
Smart Images

Figure CN122596030A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a method for extracting policy document elements based on evidence chain-driven approaches. Background Technology
[0002] Currently, information extraction from policy documents mainly relies on traditional natural language processing techniques or methods driven by large language models. Based on preset fixed field templates, corresponding field values are extracted from the document through named entity recognition, rule matching, or text generation, but there is a lack of in-depth analysis of its computational logic and constraints.
[0003] However, the existing technology for extracting policy document elements has the following shortcomings: First, policy texts have diverse formats, and extraction methods based on fixed templates have poor generalization ability and are prone to problems such as omissions and errors. Real policy documents have a large number of writing differences across genres, regions, and levels, making it difficult to stably align the preset fixed element list. Second, most existing methods only output the extraction results and lack evidence to support why the extraction was carried out in this way. They cannot provide a traceable and auditable analytical path and are difficult to meet the compliance and explainability requirements of government systems. Third, the time expressions in policy texts are complex and often intertwined with revisions, supplements, and replacements. Existing technologies only extract isolated time points and do not construct an effectiveness state machine and change event chain, making it impossible to dynamically calculate the effectiveness state of a policy at any given time. Fourth, quantitative indicators only extract isolated numbers or monetary text content, which cannot process complex indicators and are difficult to transform into a structured computable expression that includes numerical values, units, constraints, and calculation methods. Fifth, regarding the relationship between policies, existing technologies typically use retrieval and string matching to find related document numbers, which cannot effectively handle cross-document references, document number variations, aliases, and logical contradictions. The lack of a verification loop results in low recall rate and high mismatch rate of relationship elements. Summary of the Invention
[0004] The purpose of this application is to address the shortcomings of the prior art by providing a policy document element extraction method based on evidence chain drive, thereby improving the compliance and interpretability of policy document extraction.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, one embodiment of this application provides a method for extracting policy document elements based on a chain of evidence, the method comprising: Visual perception is performed on the original policy document to obtain the document layout tree and the basic text unit arrays of each basic text block; Using a parsing agent, based on a preset first-level slot template and the document layout tree, policy elements are extracted from the basic text unit arrays of all the basic text blocks to obtain initial extraction data of multiple first-level policy elements and corresponding first-level evidence chain objects. The preset first-level slot template includes: identification information of multiple first-level policy elements. An evaluation agent is used to evaluate the initial extracted data of each of the first-level policy elements and the corresponding first-level evidence chain objects, so as to obtain the evaluation results of each of the first-level policy elements. If the evaluation result of the target first-level policy element is not passed among multiple first-level policy elements, the parsing agent is used to generate a second-level slot template for the target first-level policy element based on the identification information of the target first-level policy element, the initial extracted data, and the evaluation result. Using the analytical agent, based on the secondary slot template of the target first-level policy element and the document layout tree, policy element extraction is performed on the basic text unit array of all the basic text blocks to obtain the target extraction data of the target first-level policy element and the corresponding secondary evidence chain object. Based on the target extraction data of the primary policy elements, the corresponding secondary evidence chain objects, the initial extraction data of other primary policy elements, and the corresponding primary evidence chain objects, the policy element extraction results of the original policy document are generated.
[0006] Optionally, the document layout tree carries: the physical coordinates of each basic text block, the logical hierarchy of the basic text block, and the semantic tags of each basic text block under the policy domain; The process of visually perceiving the original policy document yields a document layout tree and arrays of basic text units for each basic text block, including: The original policy document is subjected to text detection to obtain the original text stream corresponding to the original policy document; The original policy document is analyzed for layout to obtain the text layout blocks associated with the original text flow; The text layout block in the text layout block is segmented to obtain multiple basic text blocks corresponding to the text layout block, and the physical coordinates of each basic text block; Semantic entities in the policy domain are extracted from each of the basic text blocks to obtain semantic tags for each of the basic text blocks; The document layout tree is constructed based on the physical coordinates of each basic text block, the logical hierarchy of each basic text block, and the semantic tags of each basic text block; The basic text block is encapsulated to obtain the basic text unit array of the basic text block.
[0007] Optionally, the evaluation agent is used to evaluate the initial extracted data and corresponding first-level evidence chain objects of each of the first-level policy elements to obtain the evaluation results of each of the first-level policy elements, including: The evaluation agent is used to evaluate the alignment confidence of the initial extracted data of each primary policy element and the corresponding primary evidence chain object to obtain the alignment confidence of each primary policy element; the alignment confidence is used to quantify the slot semantic carrying capacity of the primary policy element. The evaluation agent is used to evaluate the completeness of the evidence chain for the initial extracted data of each primary policy element and the corresponding primary evidence chain object, so as to obtain the completeness of the evidence chain for each primary policy element. The completeness of the evidence chain is used to quantify whether the corresponding primary evidence chain object has a business logic closed loop. Using the aforementioned evaluation agent, the evaluation results for each of the primary policy elements are obtained based on the alignment confidence and the completeness of the evidence chain.
[0008] Optionally, the step of using the evaluation agent to evaluate the alignment confidence of the initial extracted data of each of the first-level policy elements and the corresponding first-level evidence chain objects to obtain the alignment confidence of each of the first-level policy elements includes: The evaluation agent is used to obtain the probability of certainty for the corresponding first-level chain of evidence object; Using the aforementioned evaluation agent, the semantic similarity between the initial extracted data and the identification information of the corresponding primary policy elements is obtained; The evaluation agent is used to obtain the number of semantic tag types of the basic text blocks in the document layout tree; The evaluation agent is used to calculate the alignment confidence based on the determined probability, the semantic similarity, and the number of semantic label types.
[0009] Optionally, the step of using the evaluation agent to evaluate the completeness of the evidence chain for the initial extracted data of each primary policy element and the corresponding primary evidence chain object, and obtaining the completeness of the evidence chain for each primary policy element, includes: Using the aforementioned evaluation agent and the corresponding first-level evidence chain object, semantic role labeling analysis is performed on the initial extracted data of the first-level policy elements to obtain the core argument missing detection results; Using the aforementioned evaluation agent, isolated element detection is performed on the initial extracted data of the first-level policy elements based on dependency syntax trees to obtain isolated element detection results; The completeness of the evidence chain is obtained by using the evaluation agent based on the core argument missing detection results and the isolated element detection results corresponding to each of the first-level policy elements.
[0010] Optionally, the evaluation agent, based on the alignment confidence and the completeness of the evidence chain, obtains the evaluation results for each of the primary policy elements, including: Using the aforementioned evaluation agent, a structured diagnostic vector is generated based on the alignment confidence, the completeness of the evidence chain, the number of semantic labels of different types in the alignment confidence, and the detection results of isolated elements in the completeness of the evidence chain. The evaluation agent is used to determine whether the structured diagnostic vector satisfies the preset alignment confidence condition and the preset completeness condition. The evaluation agent feeds back the structured diagnostic vector to the parsing agent when either the preset alignment confidence condition or the preset integrity condition is met.
[0011] Optionally, the parsing agent is used to generate a secondary slot template for the target primary policy element based on the identification information of the target primary policy element, the initial extracted data, and the evaluation results, including: The parsing agent is used to match the identification information of the target first-level policy element, the semantic tags of the target first-level policy element in the document layout tree, and the structured diagnostic vector in the evaluation result with the preset sub-slot template library. If a match is successful, the parsing agent is used to call the target sub-slot template matched in the preset sub-slot template library as the secondary slot template. If the matching fails, the parsing agent is used to call the preset slot generation rule knowledge base to obtain the second-level slot template based on the identification information of the target first-level policy element, the semantic tags of the target first-level policy element in the document layout tree, and the structured diagnostic vector in the evaluation result.
[0012] Optionally, the method further includes: Using the aforementioned evaluation agent, change events are extracted based on the extracted data of all the primary policy elements and the corresponding evidence chain objects, resulting in at least two change events; The evaluation agent is used to determine whether there are time-conflicting change events among the at least two change events; If there are conflicting target change events, the evaluation agent is used to make conflict resolution on the target change events among the at least two change events according to the preset rule matrix, so as to obtain a unique event chain. Using the aforementioned evaluation agent, a directed state transition graph is constructed based on the unique event chain. The directed state transition graph is used to represent a time-sequential policy state transition chain driven by change events.
[0013] Optionally, the method further includes: A knowledge graph agent is used to perform relation parsing on each of the first-level policy elements and the corresponding evidence chain objects to obtain relation candidate tuples. The relation candidate tuples include multiple candidate relations, and the candidate relations include relation subjects, relation objects and relation types. Using the knowledge graph agent, multiple candidate relations are normalized using a preset standardized naming rule to obtain the subject standardized name and object standardized name corresponding to the relation subject and the relation object; Using the knowledge graph agent, the subject specification name and the object specification name are mapped to a preset global policy knowledge graph library based on the relation type, thus obtaining the target global policy knowledge graph library.
[0014] Optionally, before using the knowledge graph agent to map the subject specification name and the object specification name to a preset global policy knowledge graph library based on relation type to obtain the target global policy knowledge graph library, the method further includes: Using the knowledge graph agent, the subject specification name and the object specification name are subjected to graph consistency reverse verification based on the relation type according to the preset verification rules, and the verification result is obtained; wherein, the preset verification rules include: time paradox verification rules, power level overreach verification rules, and cycle verification rules; If the verification result is passed and the relationship type is a blocking relationship, then the knowledge graph agent is used to send a forced state transition signal to the effectiveness state machine of the associated policy to trigger cross-document state linkage. If the verification result fails, the knowledge graph agent will write back the conflict report containing the reason for the violation to the conflict set of the evidence chain object, triggering automatic re-extraction or pushing to manual review.
[0015] Optionally, the method further includes: A compiled intelligent agent is used, and a preset digital operator mapping table is used to map the initial extracted data corresponding to each of the first-level policy elements to obtain multiple mathematical operators; Using the aforementioned compiler agent, mathematical operators for the initial extracted data corresponding to the first-level policy elements are assembled based on data logic according to a preset syntactic analysis tree to obtain an initial abstract syntax tree for the initial extracted data corresponding to each first-level policy element; wherein, the initial abstract syntax tree is used to represent the business logic level of the initial extracted data; Using the aforementioned compiler agent, a preset caliber is bound to the initial abstract syntax tree of the initial extracted data corresponding to each of the first-level policy elements to obtain the target abstract syntax tree. The preset caliber includes: measurement unit caliber, calculation cycle caliber, and recipient dimension caliber. The evidence chain tracing code is injected into the target abstract syntax tree to obtain an executable policy calculation expression, wherein the evidence chain tracing code is used to associate the policy calculation expression with the corresponding evidence chain object.
[0016] Secondly, another embodiment of this application provides a policy document element extraction apparatus, the apparatus comprising: The perception module is used to perform visual perception on the original policy document to obtain the document layout tree and the basic text unit array of each basic text block. The first parsing module is used to employ a parsing agent to extract policy elements from the basic text unit arrays of all the basic text blocks according to the preset first-level slot template and the document layout tree, thereby obtaining initial extraction data of multiple first-level policy elements and corresponding first-level evidence chain objects. The preset first-level slot template includes: identification information of multiple first-level policy elements. The evaluation module is used to evaluate the initial extracted data of each of the first-level policy elements and the corresponding first-level evidence chain objects using an evaluation intelligent agent, and to obtain the evaluation results of each of the first-level policy elements. The second parsing module is used to generate a secondary slot template for the target first-level policy element if the evaluation result of the target first-level policy element among multiple first-level policy elements is not passed, using the parsing agent to generate the secondary slot template of the target first-level policy element based on the identification information of the target first-level policy element, the initial extracted data and the evaluation result. The extraction module is used to extract policy elements from the basic text unit array of all the basic text blocks using the parsing agent, based on the secondary slot template of the target first-level policy element and the document layout tree, to obtain the target extraction data of the target first-level policy element and the corresponding secondary evidence chain object. The generation module is used to generate the policy element extraction results of the original policy document based on the target extraction data of the target first-level policy element, the corresponding second-level evidence chain object, the initial extraction data of other first-level policy elements, and the corresponding first-level evidence chain object.
[0017] Thirdly, another embodiment of this application provides a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the multi-agent collaborative policy document element extraction method as described in any of the first aspects above.
[0018] Fourthly, another embodiment of this application provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of the multi-agent collaborative policy document element extraction method as described in any of the first aspects above.
[0019] The beneficial effects of this application are: This application provides a policy document element extraction method based on evidence chain drive. The method involves visually perceiving the original policy document to obtain a document layout tree and arrays of basic text units for each basic text block. A parsing agent is used to extract policy elements from the basic text unit arrays of all basic text blocks based on a preset first-level slot template and the document layout tree, resulting in initial extraction data for multiple first-level policy elements and corresponding first-level evidence chain objects. An evaluation agent is then used to evaluate the initial extraction data and corresponding first-level evidence chain objects for each first-level policy element, yielding evaluation results for each first-level policy element. If a target first-level policy element exists among the multiple first-level policy elements... The evaluation result of the element was not passed. A parsing agent was used to generate a secondary slot template for the target first-level policy element based on the identification information and initial extraction data. The parsing agent was then used to extract policy elements from the basic text unit arrays of all basic text blocks based on the secondary slot templates of the target first-level policy element and the document layout tree, to obtain the target extraction data of the target first-level policy element and the corresponding secondary evidence chain object. Based on the target extraction data of the target first-level policy element, the corresponding secondary evidence chain object, the initial extraction data of other first-level policy elements, and the corresponding first-level evidence chain object, the policy element extraction result of the original policy document was generated.
[0020] This application achieves high-quality conversion from unstructured documents to machine-understandable data by parsing original policy documents and constructing a document layout tree and basic text unit array carrying physical coordinates, logical hierarchy, and semantic tags. Secondly, it employs a closed-loop mechanism of parsing, evaluation, feedback, and re-extraction. An evaluation agent independently assesses the first-level extraction results, triggering rule-based second-level slot template generation and refined re-extraction only for target elements that fail the evaluation. This avoids global duplication of processing and improves efficiency. The two-layer slot system enables adaptive parsing of complex and semantically dense clauses, balancing generalization ability and detail depth. A structured evidence chain runs throughout the entire process, ensuring the traceability and verifiability of the results. This improves the generalization and logicality of policy document extraction, making it suitable for diverse intelligent processing scenarios of government documents. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart illustrating a policy document element extraction method based on evidence chain drive, provided for embodiments of this application; Figure 2 A flowchart illustrating the process of determining basic text blocks in a policy document element extraction method based on a chain of evidence provided in this application embodiment; Figure 3 A flowchart illustrating the process of determining the evaluation result in a policy document element extraction method based on a chain of evidence provided in this application embodiment; Figure 4 A flowchart illustrating the process of determining alignment confidence in a policy document element extraction method based on evidence chain drive, provided for an embodiment of this application; Figure 5 A flowchart illustrating the process of determining the completeness of the evidence chain in a policy document element extraction method based on the evidence chain driven by an embodiment of this application; Figure 6 A flowchart illustrating the process of determining the evaluation result in another evidence chain-driven policy document element extraction method provided in this application embodiment; Figure 7 A flowchart illustrating the process of determining a secondary slot template in a policy document element extraction method based on a chain of evidence provided in this application embodiment; Figure 8A flowchart illustrating the process of determining the policy state transition chain in a policy document element extraction method based on evidence chain driven by this application embodiment; Figure 9 A flowchart illustrating the process of determining the target global policy knowledge graph base in a policy document element extraction method based on evidence chain driven by embodiments of this application; Figure 10 A flowchart illustrating the verification of the global policy knowledge graph database in a policy document element extraction method based on evidence chain driven by this application embodiment; Figure 11 A flowchart illustrating the process of determining the target abstract syntax tree in a policy document element extraction method based on evidence chain driven by this application embodiment; Figure 12 A schematic diagram of a policy document element extraction device provided in this application embodiment; Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0024] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0025] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0026] Currently, policy document element extraction schemes typically rely on pre-defined fixed element lists, directly extracting fields from the text using large language models or traditional natural language processing rules. However, existing schemes only output extraction results, lacking interpretable, traceable, and verifiable structured evidence. Furthermore, the pre-defined fixed element lists have poor generalization ability. Real policy documents exhibit numerous stylistic differences across genres, regions, and levels, making it difficult for pre-defined fixed element lists to maintain stable alignment, leading to overfitting, poor generalization, or even illusions.
[0027] To address this, this application provides a policy document element extraction method driven by an evidence chain. This method involves multiple intelligent agents collaborating to extract elements from the policy document. The scheme in this application ensures the traceability of the initially extracted data by generating evidence chains corresponding to the policy elements. Furthermore, by generating secondary slot templates, the slot templates are more closely matched to the original policy document, thereby improving the accuracy and interpretability of policy document element extraction. To clearly describe the method provided in the embodiments of this application, the following description is provided in conjunction with several accompanying drawings. Figure 1 A flowchart illustrating a policy document element extraction method based on evidence chain driving, as provided in this application embodiment, is shown below. Figure 1 As shown, the method includes: Step 101: Visually perceive the original policy document to obtain the document layout tree and the basic text unit array of each basic text block.
[0028] The original policy document is a document related to government affairs. It can be any format, including scanned long images, Portable Document Format (PDF), image PDFs, PDFs containing tables, and HyperText Markup Language (HTML) web pages. This application embodiment does not impose any restrictions on this. Visual perception is used to indicate the process of extracting visual layout, text content, and semantic information from the original policy document's pages.
[0029] The document layout tree, also known as the Document Object Model (DOM), represents the physical structure and logical hierarchy of a document. The document layout tree includes multiple nodes, each with physical coordinates, a type label, text content, and a reference path within the document. Nodes can be: root node, second-level, third-level, and fourth-level. The root node contains the original policy document's title information and full-text metadata. The second level can be page number nodes, each containing the page number, page size, and the full-text concatenation of that page. The third level can be layout nodes, each attached to a page number node. Each page number node can correspond to any of the following layout nodes: header node, title node, text node, table node, or image node. The fourth level can be basic text block nodes, each attached to a corresponding text node. Each basic text block node is associated with a basic text unit array. This basic text unit array includes the text identifier, text content, path information, physical coordinates, type label, and other content related to the basic text block. This embodiment does not impose any limitations on this. Text identifiers are used to distinguish basic text blocks; text content is used to represent the specific content of basic text blocks; path information is used to indicate the query path of basic text blocks in the document layout tree; physical coordinates are used to indicate the page number, bounding box, and character span of basic text blocks; type labels are used to indicate multiple entities in basic text blocks.
[0030] Optionally, visual perception is performed on the original policy document to obtain the page corresponding to each page number. The layout blocks within each page are then identified, and text block recognition is performed on the text layout within these layout blocks to obtain multiple basic text blocks and corresponding arrays of basic text units. A document layout tree is then constructed using the page numbers, page layout blocks, and basic text blocks.
[0031] Step 102: Using a parsing agent, based on the preset first-level slot template and document layout tree, policy elements are extracted from the basic text unit arrays of all basic text blocks to obtain initial extraction data of multiple first-level policy elements and corresponding first-level evidence chain objects.
[0032] The parsing agent is used to extract policy elements from structured text. A preset first-level slot template serves as a policy element classification framework, including identification information for multiple first-level policy elements. This identification information can include: policy identifier elements, policy content elements, policy relationship elements, and policy classification elements. Policy identifier elements can include document number, title, issuing authority, level of effectiveness, publication date, effective date, expiration date, relevant sector, contact person, and contact number. Policy content elements can include relevant information such as applicable subjects and application conditions, specific measures and quantitative indicators, implementing body, application process, and penalty standards for violations. Policy relationship elements can include information such as superior legal basis, repealed or replaced old policies, implementation rules, and related policies. Policy classification elements can include classification information such as relevant sector, applicable region, policy type, policy theme type, and policy objectives.
[0033] The initial extracted data refers to the specific data extracted from the basic text block for the primary policy elements. The primary evidence chain object can include: evidence fragments, physical anchors, mapping slots, inference type, model inference confidence, timestamps, and conflict sets. Evidence fragments indicate the original sentence / article / clause corresponding to the extraction result. Physical anchors indicate the coordinates, page number, paragraph, clause number, or character range of the initial extracted data. Mapping slots indicate the primary policy element corresponding to the initial extracted data. Inference types can be direct statements, cross-sentence merging, table normalization, reference parsing, and inference decisions. Direct statements mean the answer is directly contained in the original text; cross-sentence merging means the answer is scattered across multiple sentences and needs to be pieced together; table normalization means parsing data from a complex table layout; reference parsing means the answer is elsewhere and requires searching; inference decisions are derived based on common sense or rules. Conflict set records the reasons for conflicts between the initial extracted data and other sources or rules. Model confidence indicates the original inference confidence when the parsing agent outputs the evidence chain. Timestamps record the generation time of the evidence chain to ensure the results are reproducible.
[0034] Optionally, the parsing agent traverses each basic text block in the basic text unit array according to the preset first-level slot template and document layout tree. For each basic text block, it identifies whether the basic text block contains information corresponding to the first-level policy element through the preset language model and rule matching. If the identification is successful, an initial extracted data is generated. Based on the constructed first-level policy element and the corresponding initial extracted data, a first-level evidence chain object is generated, thereby obtaining the initial extracted data of multiple first-level policy elements and the corresponding first-level evidence chain object.
[0035] Step 103: Using an evaluation agent, evaluate the initial extracted data of each primary policy element and the corresponding primary evidence chain object to obtain the evaluation results of each primary policy element.
[0036] The evaluation agent independently audits the results of the parsing agent to determine the completeness and rationality of the extraction. A game-like collaborative closed loop is formed between the evaluation agent and the parsing agent, involving extraction, independent auditing, and re-extraction with diagnostic feedback. The diagnostic vector generated by the evaluation agent serves as an arbitration signal fed back to the parsing agent, guiding it to perform precise, targeted re-parsing.
[0037] Optionally, an evaluation agent is used to evaluate the initial extracted data of the first-level policy elements and the corresponding first-level evidence chain objects to obtain the evaluation results of each first-level policy element. The evaluation method can be evaluation through an evaluation model or evaluation through evaluation rules, etc., and this application embodiment does not limit the specific methods used.
[0038] Step 104: If the evaluation result of the target first-level policy element is not passed among multiple first-level policy elements, the parsing agent is used to generate the second-level slot template of the target first-level policy element based on the identification information of the target first-level policy element, the initial extracted data and the evaluation result.
[0039] The secondary slot template is a refinement and decomposition of the primary slot template, used to handle primary policy elements that fail to be extracted from the primary slot template. The secondary slot template includes multiple secondary policy elements.
[0040] Optionally, if the evaluation result of the target first-level policy element is not passed among multiple first-level policy elements, it indicates that the initial extraction data of the target first-level policy element is unreasonable. Based on the identification information of the target first-level policy element, the initial extraction data and the evaluation result, a second-level slot template of the target first-level policy element is generated.
[0041] Optionally, if the evaluation result of the target first-level policy element is passed among multiple first-level policy elements, then the policy element extraction result of the original policy document is generated based on the initial extraction data of the first-level policy elements and the corresponding first-level evidence chain objects.
[0042] Step 105: Using a parsing agent, based on the secondary slot template of the target first-level policy element and the document layout tree, extract policy elements from the basic text unit array of all basic text blocks to obtain the target extracted data of the target first-level policy element and the corresponding secondary evidence chain object.
[0043] Optionally, the parsing agent traverses each basic text block in the basic text unit array according to the preset secondary slot template and document layout tree. For each basic text block, it identifies whether the basic text block contains information corresponding to the secondary policy element through the preset language model and rule matching. If the identification is successful, it generates the secondary policy element target extraction data of the corresponding secondary slot template of the target primary policy element, and obtains the target extraction data of the target primary policy element and the corresponding secondary evidence chain object.
[0044] Step 106: Based on the target extraction data of the primary policy elements, the corresponding secondary evidence chain objects, the initial extraction data of other primary policy elements, and the corresponding primary evidence chain objects, generate the policy element extraction results of the original policy document.
[0045] Optionally, for other primary policy elements that pass the evaluation, the initial extracted data and the corresponding primary evidence chain objects are directly retained. For target primary policy elements that fail the evaluation, the target extracted data and secondary evidence chains are used to replace the target primary policy elements that fail the evaluation. The evidence chains are then merged based on the document layout tree to generate the policy element extraction results of the original policy document.
[0046] In this embodiment, the original policy document is visually perceived to obtain a document layout tree and arrays of basic text units for each basic text block. A parsing agent is used to extract policy elements from the arrays of basic text units for all basic text blocks based on a preset first-level slot template and the document layout tree, resulting in initial extracted data for multiple first-level policy elements and corresponding first-level evidence chain objects. An evaluation agent is used to evaluate the initial extracted data and corresponding first-level evidence chain objects for each first-level policy element, obtaining the evaluation result for each first-level policy element. If the evaluation result of the target first-level policy element among the multiple first-level policy elements is "not approved,"... The process involves using a parsing agent to generate secondary slot templates for the target first-level policy elements based on their identifiers and initial extracted data. Then, using the parsing agent, policy elements are extracted from the basic text unit arrays of all basic text blocks based on the secondary slot templates and the document layout tree, yielding the target extracted data for the target first-level policy elements and the corresponding secondary evidence chain objects. Finally, based on the target extracted data for the target first-level policy elements, the corresponding secondary evidence chain objects, the initial extracted data for other first-level policy elements, and their corresponding first-level evidence chain objects, the policy element extraction results of the original policy document are generated. This application achieves high-quality conversion from unstructured documents to machine-understandable data by parsing the original policy document and constructing a document layout tree and basic text unit array carrying physical coordinates, logical hierarchy, and semantic tags. Secondly, a closed-loop mechanism of parsing, evaluation, feedback, and re-extraction is adopted. An evaluation agent independently assesses the first-level extraction results, triggering rule-based second-level slot template generation and refined re-extraction only for target elements that fail the evaluation. This avoids global duplication of processing and improves efficiency. The two-layer slot system enables adaptive parsing of complex and semantically dense clauses, balancing generalization ability and detail depth. A structured evidence chain runs throughout the entire process, ensuring the traceability and verifiability of the results. This improves the generalization and logical consistency of policy document extraction, making it suitable for diverse intelligent processing scenarios of government documents.
[0047] Based on the above embodiments, the document layout tree carries: the physical coordinates of each basic text block, the logical hierarchy of the basic text blocks, and the semantic tags of each basic text block under the policy domain. This application also provides a process for determining basic text blocks in a policy document element extraction method based on an evidence chain. Figure 2 A flowchart illustrating the process of determining basic text blocks in a policy document element extraction method based on a chain of evidence provided in this application is shown below. Figure 2 As shown, in step 101 above, the original policy document is visually perceived to obtain the document layout tree and the basic text unit arrays of each basic text block, including: Step 201: Perform text detection on the original policy document to obtain the original text stream corresponding to the original policy document.
[0048] Text detection is used to locate all text regions in the original policy document and determine the bounding box of each text line. This involves recognizing and converting the text in the original policy document into an editable string. The original text stream refers to the structured, continuous text content extracted from the document after text detection.
[0049] Optionally, a pre-defined text detection model is used to perform pixel-level analysis on each page of the original policy document, locating the precise position of all text lines and outputting their bounding box coordinates (bbox). For existing text layers in the PDF, their character coordinate instructions are directly parsed. A pre-defined text recognition model is then used within each detected bbox area to call an Optical Character Recognition (OCR) model or directly read the PDF text, converting pixel regions or graphic instructions into editable text string sequences, thus obtaining the original text stream corresponding to the original policy document. The pre-defined text detection model can be a deep learning model based on segmentation or region proposal. The Optical Character Recognition (OCR) model can be a Convolutional Recurrent Neural Network (CRNN), Scene Text Recognition with a Single Visual Model (SVTR), or similar models.
[0050] Step 202: Perform layout analysis on the original policy document to obtain the text layout blocks associated with the original text flow.
[0051] The layout analysis determines the functional category of each text or area, such as title, body text, table, and footer. Therefore, text layout blocks can include: header area; footer area; main title and chapter title; body paragraphs; table areas; and graphic areas such as stamps and signatures.
[0052] Optionally, a layout analysis model based on object detection or graph neural networks can be used to simulate human visual habits when reading documents, and to perform component-level parsing of the page. The physical space of the page is divided into text layout blocks with different logical functions. The layout analysis model can be the detection branch of LayoutLMv3, a YOLO-based document layout model, etc., and this application embodiment does not impose any limitations on this.
[0053] Step 203: Perform text segmentation on the main text layout block in the text layout block to obtain multiple basic text blocks corresponding to the main text layout block, as well as the physical coordinates of each basic text block.
[0054] The body text layout block is a layout block that includes body text paragraphs. The basic text block is a further division of the body text layout block, dividing it into smaller semantic units.
[0055] Optionally, the main text layout block is dynamically segmented based on its layout features and semantic similarity. The main text layout block is divided into multiple basic text blocks. Each basic text block inherits the coordinate information of its corresponding main text layout block, and each main text layout block has an independent text block identifier. The layout features can include clause numbering patterns, line breaks, etc.
[0056] Step 204: Extract semantic entities from each basic text block in the policy domain to obtain semantic tags for each basic text block.
[0057] Semantic entity extraction is the process of identifying key information and semantically labeling it within the policy domain corresponding to the original policy document. Semantic labels can include entity number, entity type, original value, character position range, and confidence level. The entity number indicates different entities, and the entity type can be any of the following: document number, policy title, institution, date, subsidy amount, subsidy ratio, or time limit. The original value is the core numerical value or key information extracted directly from the entity content in its original form. The character position range is the precise start and end position of the entity in the original text. The confidence level is the reliability or certainty of the entity identification result.
[0058] Optionally, a pre-defined multimodal pre-trained model with document understanding capabilities is used as a foundation. Pages containing core policy entities are extracted from accumulated policy documents over the years, and entity annotations are performed on each basic text block. The entity type system of the annotations is aligned with the first-level slot system. The pre-defined multimodal pre-trained model with document understanding capabilities can simultaneously encode text, layout, and visual features. Specifically, the multimodal pre-trained model can be the VI-LayoutXLM model, whose multimodal Transformer architecture can simultaneously encode text, layout, and visual features. Its pre-training task is highly aligned with the document understanding task, making it suitable as a starting point for domain-specific fine-tuning.
[0059] Step 205: Construct a document layout tree based on the physical coordinates of each basic text block, the logical hierarchy of each basic text block, and the semantic tags of each basic text block.
[0060] Optionally, the original policy document is used as the root node, and page nodes and layout nodes are constructed in sequence. Basic text blocks are attached under the text layout blocks. Each node carries its physical coordinates and forms a tree structure through parent-child relationships. The extracted semantic entities are embedded as semantic tags into the corresponding basic text block nodes to obtain the document layout tree.
[0061] Step 206: Encapsulate the basic text block to obtain the basic text unit array of the basic text block.
[0062] Optionally, taking a basic text block as the core, its original text content, physical coordinates in the document, logical level, semantic tags, and path references in the overall document layout tree are encapsulated to obtain basic text units. These encapsulated basic text units are then formed into an array, resulting in a basic text unit array.
[0063] In this embodiment, text detection and layout analysis are used to restore the physical layout of the document, divide the text layout blocks into basic text blocks to avoid information fragmentation or loss of context, construct a document layout tree, realize dual modeling of content and structure, obtain an array of basic text units, and improve the accuracy, interpretability and robustness of policy element extraction.
[0064] Based on the above embodiments, this application also provides a process for determining the evaluation result in a policy document element extraction method based on evidence chain drive. Figure 3 This application provides a flowchart illustrating the process of determining the evaluation result in a policy document element extraction method based on a chain of evidence, as shown in the embodiments of this application. Figure 3 As shown, in step 103 above, an evaluation agent is used to evaluate the initial extracted data of each primary policy element and the corresponding primary evidence chain object, obtaining the evaluation results of each primary policy element, including: Step 301: Using an evaluation agent, the alignment confidence of the initial extracted data of each primary policy element and the corresponding primary evidence chain object is evaluated to obtain the alignment confidence of each primary policy element.
[0065] The alignment confidence score is used to quantify the slot semantic carrying capacity of primary policy elements. The alignment confidence score represents the degree of matching between primary policy elements and the initially extracted data.
[0066] Optionally, an evaluation agent receives and parses the first-level evidence chain object generated by the parsing agent, extracts the certain probability used during its extraction, the semantic similarity between the initial extracted data of the current basic text block and the identifier information of the mapped first-level policy elements, determines the number of semantic tag types within the current basic text block, and uses the evaluation agent to calculate the alignment confidence based on the certain probability, semantic similarity, and the number of semantic tag types.
[0067] Optionally, an evaluation agent is used to perform a structured comparison of the initial extracted data of each primary policy element and the corresponding primary evidence chain object. Scores are given from four dimensions: semantic consistency, information completeness, logical relevance, and source authority. A normalization method is used to merge the scores of each item into an alignment confidence level between 0 and 1.
[0068] Step 302: Using an evaluation agent, assess the completeness of the evidence chain for the initial extracted data of each primary policy element and the corresponding primary evidence chain object, and obtain the completeness of the evidence chain for each primary policy element.
[0069] The completeness of the evidence chain is used to quantify whether the corresponding primary evidence chain object has a closed business logic loop. In other words, does the primary evidence chain object form a closed business logic loop, and is it lacking key constraints or necessary arguments? The lower the completeness of the evidence chain, the more severe the logical break, requiring further data extraction.
[0070] Optionally, semantic role labeling and dependency parsing techniques are used to identify the semantic arguments necessary for core actions in policy texts. If key arguments are missing, the text is considered logically incomplete. Simultaneously, the extracted quantitative indicators are checked for isolation, i.e., whether they establish grammatical or semantic connections with other constraint elements. The evaluation agent calculates the evidence chain completeness score based on the number of missing arguments and the proportion of isolated elements, combined with preset weights.
[0071] Optionally, an evaluation agent is employed. Based on a preset evidence chain template, the actual extracted primary evidence chain objects are structurally aligned with the template to determine the proportion of missing links. A natural language reasoning model is used to evaluate whether there is a reasonable causal or temporal progression relationship between each evidence node, and whether each node is supported by a corresponding primary policy element. The completeness of the evidence chain is determined to see if it can form a complete loop from policy intent to implementation and effect tracking. The preset evidence chain template may include key links such as problem definition, policy basis, implementation path, responsible entity, resource guarantee, and supervision feedback.
[0072] Step 303: Using an evaluation agent, the evaluation results of each primary policy element are obtained based on the alignment confidence and the completeness of the evidence chain.
[0073] Optionally, an evaluation agent is used to perform weighted processing based on alignment confidence and evidence chain completeness and their corresponding weights to obtain a total score, and the evaluation result of each primary policy element is determined based on the total score.
[0074] Optionally, an evaluation agent is used to compare the alignment confidence and the completeness of the evidence chain to obtain the evaluation results of each primary policy element.
[0075] In this embodiment, by assessing alignment confidence, the system can identify insufficient slot capacity due to semantic congestion, avoiding mismatches of general templates. By assessing the completeness of the evidence chain, the system can detect whether key logical elements are missing, ensuring that the extraction results have business closure. This represents an evolution from coarse-grained extraction to fine-grained structuring, enhancing robustness and interpretability for complex and non-standard policy texts.
[0076] Based on the above embodiments, this application also provides a process for determining alignment confidence in a policy document element extraction method driven by evidence chain. Figure 4 A flowchart illustrating the process of determining alignment confidence in a policy document element extraction method based on a chain of evidence provided in this application is shown below. Figure 4 As shown, in step 301 above, an evaluation agent is used to evaluate the alignment confidence of the initial extracted data of each primary policy element and the corresponding primary evidence chain object, thereby obtaining the alignment confidence of each primary policy element, including: Step 401: Use an evaluation agent to obtain the probability of certainty for the corresponding first-level evidence chain object.
[0077] The probability of certainty is the average value of the original logic when the corresponding first-level evidence chain object is output. If the probability of certainty for the initial extracted data is not high, then the probability of certainty is low.
[0078] Optionally, after completing the extraction, the parsing agent retains the original confidence score output during its model inference process as a deterministic probability.
[0079] Step 402: Use an evaluation agent to obtain the semantic similarity between the initial extracted data and the identification information of the corresponding primary policy elements.
[0080] Semantic similarity is determined by vectorizing the initial extracted data and comparing the vectorized result with the identifier information of the primary policy elements. Semantic similarity reflects the degree of matching between the content and the primary policy elements.
[0081] Optionally, the text content of the initial extracted data is encoded into a vector using a sentence embedding model. Similarly, the identifier information of the corresponding first-level policy element of the initial extracted data is also encoded into a vector, and the cosine similarity between the two vectors is calculated as the semantic similarity between the initial extracted data and the identifier information of the corresponding first-level policy element.
[0082] Step 403: Use an evaluation agent to obtain the number of semantic tag types for basic text blocks in the document layout tree.
[0083] The number of semantic tag types refers to the entity types identified by extracting policy domain semantic entities from the basic text blocks. The basic text block is the basic text block corresponding to the initial extracted data of the first-level policy elements.
[0084] Optionally, an evaluation agent is used to obtain basic text blocks in the document layout tree, determine the type of semantic tags of the basic text blocks, and determine the number of semantic tag types of the basic text blocks based on the type of semantic tags of the basic text blocks.
[0085] Step 404: Using an evaluation agent, calculate the alignment confidence based on the determined probability, semantic similarity, and the number of semantic label types.
[0086] Optionally, the probability of determination, semantic similarity, and the number of semantic tag types are summed using a pre-set reliability formula, and the sum is used as the alignment confidence score. The pre-set reliability formula is: Alignment Confidence Score = w1 × Probability of Determination + w2 × Semantic Similarity - w3 × Number of Semantic Tag Types. w1 is the weight of the probability of determination, w2 is the weight of semantic similarity, and w3 is the weight of the number of semantic tag types. The weights of the probability of determination, semantic similarity, and the number of semantic tag types are determined based on domain prior knowledge, historical data statistics, and experimental verification and optimization; this embodiment does not impose any limitations on this.
[0087] In this embodiment, an evaluation agent comprehensively calculates alignment confidence from three dimensions: model confidence, semantic matching degree, and content complexity, overcoming the one-sidedness of traditional single-indicator evaluation. Introducing the number of semantic tag types as a negative penalty term enables accurate identification of semantically dense and information-mixed text blocks, providing early warning of the bottleneck in the capacity of general slot templates. This achieves an intelligent leap from passive response to proactive optimization, improving the accuracy and adaptability of parsing complex government documents.
[0088] Based on the above embodiments, this application also provides a process for determining the completeness of the evidence chain in a policy document element extraction method driven by the evidence chain. Figure 5 A flowchart illustrating the determination of the completeness of the evidence chain in a policy document element extraction method based on the evidence chain driven by embodiments of this application is provided, as follows: Figure 5 As shown, in step 302 above, an evaluation agent is used to evaluate the completeness of the evidence chain for the initial extracted data of each primary policy element and the corresponding primary evidence chain object, thereby obtaining the completeness of the evidence chain for each primary policy element, including: Step 501: Using an evaluation agent and the corresponding first-level evidence chain object, perform semantic role labeling analysis on the initial extracted data of the first-level policy elements to obtain the core argument missing detection results.
[0089] Semantic role labeling is used to identify predicates and their associated semantic roles in the initial extracted data. For example, in the sentence "The government gives a company a subsidy of 1 million yuan," "give" is the predicate, the government is the agent, the company is the recipient, and 1 million yuan is the quantity.
[0090] Optionally, the evaluation agent receives the first-level evidence chain object from the parsing agent, invokes a pre-trained semantic role labeling model to analyze the text fragment, and identifies the main predicates of the evidence chain and their corresponding semantic roles as the number of existing arguments. It then analyzes the initially extracted data to identify the extracted main predicates and their corresponding semantic roles as the number of required arguments. The core argument missing detection result is determined based on the number of existing arguments and the number of required arguments. Core argument missing detection result = (Number of required arguments - Number of existing arguments) / Number of required arguments.
[0091] Step 502: Using an evaluation agent, the initial extracted data of the first-level policy elements are used to perform isolated element detection based on dependency syntax trees to obtain isolated element detection results.
[0092] Among them, the isolated element detection results are obtained by analyzing the relationship between the elements extracted from the policy text and their contextual grammatical structure, and judging whether these elements exist in isolation or lack necessary semantic constraints.
[0093] Optionally, the agent invokes a dependency parser to generate the dependency syntax tree for the sentence, identifies the initial extracted data of the first-level policy elements, and obtains the core predicate nodes and key numerical nodes in the initial extracted data. Starting from the numerical nodes, the agent traces back to the root node based on the dependency syntax tree, checking whether there is a continuous grammatical path connecting it to the core predicate. If no valid path exists, or the path is interrupted, the numerical value is determined to be an isolated element. The isolated element detection result is determined based on the number of isolated elements and the total number of elements. Wherein, isolated element detection result = number of isolated elements / total number of elements.
[0094] Step 503: Using an evaluation agent, the completeness of the evidence chain is obtained based on the core argument missing detection results and isolated element detection results corresponding to each primary policy element.
[0095] Optionally, the completeness of the evidence chain = 1 - (number of arguments required - number of existing arguments) / number of arguments required × argument weight - number of isolated elements / total number of elements × isolated weight. The completeness of the evidence chain ranges from 0 to 1.
[0096] In this embodiment, semantic role labeling analysis is used to detect whether core arguments are missing, ensuring that the extraction results are semantically consistent. Dependency tree analysis is used to identify isolated numerical values or entities, preventing key constraint information from being detached from context and causing misunderstanding. By fusing these two detection results to calculate the completeness of the evidence chain, incomplete or semantically broken extracted content is automatically identified, triggering refined secondary analysis and enhancing the robustness and interpretability of the entire policy analysis system.
[0097] Based on the above embodiments, this application also provides a process for determining the evaluation result in another policy document element extraction method based on evidence chain drive. Figure 6 A flowchart illustrating the process of determining the evaluation result in another evidence chain-driven policy document element extraction method provided in this application embodiment is shown below. Figure 6 As shown, in step 303 above, an evaluation agent is used to obtain the evaluation results of each primary policy element based on the alignment confidence and the completeness of the evidence chain, including: Step 601: Using an evaluation agent, a structured diagnostic vector is generated based on the alignment confidence, the completeness of the evidence chain, the number of semantic labels of different types in the alignment confidence, and the detection results of isolated elements in the completeness of the evidence chain.
[0098] The structured diagnostic vector includes quantitative score alignment confidence, evidence chain completeness, and also includes the number of semantic label types in the explanatory cause alignment confidence and the isolated element detection results in the evidence chain completeness.
[0099] Optionally, an evaluation agent is employed to generate a structured diagnostic vector based on alignment confidence, evidence chain completeness, the number of semantic labels of different types in alignment confidence, and the detection results of isolated elements in evidence chain completeness.
[0100] Step 602: Use an evaluation agent to determine whether the structured diagnostic vectors meet the preset alignment confidence condition and the preset completeness condition.
[0101] The preset alignment confidence condition is determined by an alignment confidence threshold, which is a threshold determined through domain statistics and can be set to 0.6. The preset completeness condition is determined by an evidence chain completeness threshold, which can be set to 0.7.
[0102] Optionally, if the alignment confidence level is less than the alignment confidence level threshold, the preset alignment confidence level condition is met; if the evidence chain completeness is less than the evidence chain completeness threshold, the preset completeness condition is met.
[0103] Step 603: Using an evaluation agent, when either the preset alignment confidence condition or the preset integrity condition is met, the structured diagnostic vector is fed back to the parsing agent.
[0104] Optionally, an evaluation agent is employed. If either a preset alignment confidence condition or a preset completeness condition is met, it indicates that data extraction has failed, and a structured diagnostic vector is fed back to the parsing agent. This guides the parsing agent to focus on parsing high-density entity regions and missing logical arguments.
[0105] In this embodiment, semantic carrying capacity and logical integrity are comprehensively considered to accurately locate the root cause of the problem in a structured manner, guiding the parsing agent to perform targeted secondary parsing. By setting dual judgment conditions, the system's flexibility and robustness are enhanced, unnecessary re-extraction overhead is avoided, and the accuracy, interpretability, and adaptability of complex policy text parsing are improved.
[0106] Based on the above embodiments, this application also provides a process for determining secondary slot templates in a policy document element extraction method driven by evidence chain. Figure 7 This application provides a flowchart illustrating the process of determining a secondary slot template in a policy document element extraction method based on a chain of evidence. Figure 7 As shown, in step 104 above, a parsing agent is used to generate a secondary slot template for the target primary policy element based on the identification information of the target primary policy element, the initial extracted data, and the evaluation results. This template includes: Step 701: Using a parsing agent, the identification information of the target first-level policy elements, the semantic tags of the target first-level policy elements in the document layout tree, and the structured diagnostic vectors in the evaluation results are matched with the preset sub-slot template library.
[0107] The identification information of the target first-level policy element is used to represent the unique identifier of a specific element. Semantic tags are a set of tags obtained by extracting policy domain semantic entities from the basic text blocks. Semantic tags are used to reflect the actual policy semantic content contained in the basic text blocks. The preset sub-slot template library stores various refined second-level slot templates corresponding to first-level policy elements. For example, if the first-level policy element is a subsidy measure, the corresponding second-level slot template could be "Applicable Subject, Measure Content, Amount Limit, Subsidy Ratio, Calculation Period, Fund Allocation." The second-level slot templates are used for in-depth extraction of each basic text block.
[0108] Optionally, a parsing agent is employed to receive the structured diagnostic vector sent by the evaluation agent, and to parse the structured diagnostic vector to obtain the identification information of the target first-level policy element and the semantic tags of the target first-level policy element in the document layout tree. Using the identification information and semantic tags of the target first-level policy element in the document layout tree as the query targets, a query is performed in a preset sub-slot template library to determine whether a sub-slot template corresponding to the identification information and semantic tags of the target first-level policy element in the document layout tree exists in the preset sub-slot template library.
[0109] Step 702: If the match is successful, the parsing agent is used to call the target sub-slot template matched in the preset sub-slot template library as the secondary slot template.
[0110] The target sub-slot template is a secondary extraction template successfully matched from the preset sub-slot template library and applicable to the primary policy elements of the current target. The secondary slot template is a refined extraction framework for primary policy elements.
[0111] Optionally, if a match is successful, it indicates that the preset sub-slot template library contains a target sub-slot template corresponding to the identifier information of the target primary policy element and the semantic tag of the target primary policy element in the document layout tree. In this case, a parsing agent is used to call the matched target sub-slot template from the preset sub-slot template library as the secondary slot template.
[0112] Step 703: If the matching fails, the parsing agent is used to call the preset slot generation rule knowledge base to obtain the second-level slot template based on the identification information of the target first-level policy element, the semantic tags of the target first-level policy element in the document layout tree, and the structured diagnostic vector in the evaluation results.
[0113] The preset slot generation rule knowledge base consists of logically based generation rules. New secondary slot templates can be dynamically constructed using these rules. The knowledge base can include: 1) Identification information of target-level policy elements and semantic tags of target-level policy elements in the document layout tree that are quantitative indicator categories, containing terms related to proportions and specific numerical values, with a definite relationship between them; 2) Extracting the proportion field to store this proportion information; 3) Identification information of target-level policy elements and semantic tags of target-level policy elements in the document layout tree that are monetary entities, with fields indicating separate responsibilities, indicating that the money was contributed by multiple parties; 4) Generating content specifying the contributor and their proportion; 5) Identification information of target-level policy elements and semantic tags of target-level policy elements in the document layout tree that lack a recipient argument, but have a subject of a superior clause that identifies a matching object; 6) Inheriting from the superior clause to generate a sub-slot.
[0114] Optionally, if the matching fails, it means that no template matching the identification information, semantic label, and structured diagnostic vector of the target first-level policy element was found in the preset sub-slot template library. In this case, a parsing agent is used to call the preset slot generation rule knowledge base to obtain the second-level slot template based on the identification information of the target first-level policy element, the semantic label of the target first-level policy element in the document layout tree, and the structured diagnostic vector in the evaluation results.
[0115] Optionally, domain experts periodically review and call the preset slot generation rule knowledge base to obtain high-frequency templates in the secondary slot templates, standardize their naming and definition, and formally register them in the preset sub-slot template library. Simultaneously, using the labeled samples derived from the solidified templates, incremental fine-tuning is performed on the gating model in the evaluation agent and the semantic role labeling (SRL) / named entity recognition (NER) model in the parsing agent. This allows the system to directly hit the best template the next time it encounters similar text, without needing to dynamically generate it again, thus achieving a self-learning and evolutionary closed loop for templates.
[0116] Optionally, if the preset slot generation rule knowledge base cannot be used to obtain the secondary slot template, the parsing agent generates a slot tag to be defined, and pushes the identification information of the target primary policy element, the semantic tags of the target primary policy element in the document layout tree, and the structured diagnostic vector to the manual review interface. Domain experts can define the new slot online. This operation will simultaneously trigger rule mining and add the newly generated secondary slot template to the preset sub-slot template library.
[0117] In this embodiment, templates are directly matched from a preset sub-slot template library to ensure that standardized policy clauses can be accurately structured, improving processing efficiency and stability. When an existing template cannot be matched, a new secondary slot template is dynamically generated based on the contextual features of the current policy elements using a preset rule knowledge base. This ensures efficient reuse of known patterns and flexibly addresses newly emerging or non-standard policy expressions, enhancing the system's generalization ability and robustness.
[0118] Based on the above embodiments, this application also provides a process for determining the policy state transition chain in a policy document element extraction method driven by evidence chain. Figure 8 This application provides a schematic diagram of the process for determining the policy state transition chain in a policy document element extraction method based on a chain of evidence, as illustrated in the embodiments of this application. Figure 8 As shown, in steps 101-106 above, the method further includes: Step 801: Using an evaluation agent, extract change events based on the extracted data of all primary policy elements and the corresponding evidence chain objects to obtain at least two change events.
[0119] In this context, a change event refers to a key legal or administrative act that triggers a change in the policy's status during its lifecycle, such as issuance, implementation, repeal, extension, or replacement. Each change event includes the event type, time anchor, triggering conditions, and scope of impact.
[0120] Optionally, an evaluation agent scans the extracted data of all primary policy elements and their corresponding evidence chain objects to obtain multiple text fragments. Multiple change keywords are then identified based on these text fragments. A pre-set trigger sentence template library is used to parse the relative time expressions in the multiple change keywords, generating computer-understandable logical instructions. These logical instructions include event type, time expression, and context. The relative time is mapped to an absolute timestamp, resulting in at least two change events. The pre-set trigger sentence template library establishes a correspondence between text fragments and logical instructions.
[0121] Optionally, the predefined set of finite state machine nodes includes: state categories, state flags, examples of incoming edge triggering events, and examples of outgoing edge triggering events.
[0122] For example, the text fragment "This notice shall take effect from the date of issuance" yields the logical instruction {Event Type: Implementation, Time Reference: [Action: Get Publication Date, Source: This Document Itself]}. The text fragment "Valid until December 31, 2026" yields the logical instruction {Event Type: Natural Expiration, Time Anchor: "2026-12-31T23:59:59"}. The text fragment "Extended for one year from January 1, 2027 to December 31, 2027" yields the logical instruction {Event Type: Extension Period, Original Expiration Date: "2026-12-31", New Expiration Date: "2027-12-31"}. The text fragment "Document X is simultaneously repealed" yields the logical instruction {Event Type: Repeal, Target Document: [Unique Identifier of Document X], Time Reference: [Action: Get Publication Date, Source: This Document Itself]}.
[0123] Step 802: Use an evaluation agent to determine whether there are time-conflicting change events among at least two change events.
[0124] Among them, time-conflicting change events refer to multiple change events in the same policy that are contradictory in terms of time logic, such as: the implementation time is later than the expiration time, or the period is extended but the old expiration time is still used.
[0125] Optionally, all extracted change events are sorted by time anchor points. The time anchor points of the change events are traversed to determine if any time conflicts exist. If a time conflict exists, it is determined whether at least two change events conflict with each other. Conflicting event pairs are marked to form a candidate set of target change events.
[0126] Step 803: If there are conflicting target change events, an evaluation agent is used to adjudicate the conflict between the target change events in at least two change events according to a preset rule matrix, and a unique event chain is obtained.
[0127] The pre-defined rule matrix can include: special laws prevail over general laws, the principle of retroactive / extended coverage, the principle of forceful action interruption, and the constraint of the official release date. "Special laws prevail over general laws" means that the time specified in the appendix or specific effective / repealed clauses takes precedence over the periods described scattered throughout the main text. The principle of retroactive / extended coverage means that if an extension notice is issued, the latest extended period applies. The principle of forceful action interruption means that once a forceful action such as repeal or replacement occurs, the policy's validity is immediately terminated, regardless of the original validity period. The constraint of the official release date means that any implementation time cannot be earlier than the release time, unless specifically stated to be retroactive. The unique event chain is a sequence of change events arranged chronologically without logical contradictions.
[0128] Optionally, if there are conflicting target change events, an evaluation agent is used to adjudicate the conflict between at least two target change events according to a preset rule matrix. If an extension event is found, the original expiration time is overwritten; if a deprecation event exists, the process jumps directly to the deprecation state, ignoring subsequent times; if the time contradiction cannot be resolved by the rules, it is marked as requiring manual review. This results in a logically consistent and temporally ordered unique event chain.
[0129] Step 804: Using an evaluation agent, construct a directed state transition graph based on a unique event chain. The directed state transition graph is used to represent a policy state transition chain driven by change events along a time sequence.
[0130] The directed state transition graph (DEP) is a data-structured graph model that represents the state evolution path of a policy from drafting to expiration. Each node in the DEP represents a policy state, and each directed edge represents a state transition driven by a change event. By inputting any time point into the DEP, the validity of the original policy document can be determined.
[0131] Optionally, an evaluation agent is employed to input time events into a predefined set of finite state machine nodes based on a unique event chain, and to construct a directed state transition graph. The directed state transition graph is used to represent a policy state transition chain driven by change events along a time sequence.
[0132] For example, Table 1 is a schematic table of a predefined set of finite state machine nodes provided in an embodiment of this application. As shown in Table 1, the state category, state flag, examples of incoming edge triggering events, and examples of outgoing edge triggering events may include: Table 1. Schematic diagram of the predefined set of finite state machine nodes.
[0133] In this embodiment, by evaluating the intelligent agent to conduct in-depth analysis of policy elements, multiple change events can be automatically extracted, and time conflicts between events can be intelligently identified. Logical decisions are made based on a preset authoritative rule matrix to generate a directed state transition diagram, which truly restores the entire life cycle of the policy. This enables dynamic, accurate, and traceable calculation of the policy effectiveness status, and improves the automation and intelligence level of policy management.
[0134] Based on the above embodiments, this application also provides a process for determining the target global policy knowledge graph base in the evidence chain-driven policy document element extraction method. Figure 9 This application provides a flowchart illustrating the process of determining a target global policy knowledge graph base in a policy document element extraction method based on a chain of evidence. Figure 9 As shown, in steps 101-106 above, the method further includes: Step 901: Using a knowledge graph agent, perform relation parsing on each primary policy element and its corresponding evidence chain object to obtain candidate relation tuples.
[0135] The knowledge graph agent is an intelligent module used to construct and maintain the policy knowledge graph. It can identify the relationships between policies and store them in a structured manner. The candidate relationship tuple includes multiple candidate relationships, each consisting of a relationship subject, a relationship object, and a relationship type. The relationship subject is the current policy, and the relationship object is the policy being referenced. Relationship types can be dependency, continuation / supplementation, or blocking / coverage. Dependency relationships can include higher-level legal basis and reference documents. Typical trigger phrases for higher-level legal basis include "in accordance with the spirit of..." or "in accordance with the provisions of...", with the graph direction being: this document → higher-level law. Typical trigger phrases for reference documents include "refer to..." or "see...", with the graph direction being: this document → reference document. Continuation / supplementation relationships can include implementing rules and supporting policies. Implementing rules can be triggered by phrases such as "implementing rules of..." or "these rules are a supplement to...", with the graph direction being: this document → implementing rules. Supporting policies can be triggered by phrases such as "this notice is a supplement to...", with the graph direction being: this document → supporting document. The blocking / overriding relationship types can include replacement, repeal, and revision. The replacement trigger statement can be "...repealed at the same time" or "subject to this notice", and the direction in the graph is: this document → old document; the repeal trigger statement can be "...repealed at the same time", and the direction in the graph is: this document → repealed document; the revision trigger statement can be "...revised as follows", and the direction in the graph is: this document → revised document.
[0136] Optionally, the knowledge graph agent scans all primary policy elements and their corresponding evidence chain objects to identify text fragments related to policy. Natural language processing (NLP) techniques are used to extract relation triples, which include the relation subject, relation object, and relation type. The identified relation triples are stored as candidate relation data, and candidate relation tuples are obtained based on all candidate relation data. The NLP techniques can be dependency parsing, entity recognition, or other NLP-related technologies; this embodiment does not limit the specific techniques used.
[0137] Step 902: Using a knowledge graph agent, multiple candidate relations are normalized using preset standardized naming rules to obtain the subject-specific names and object-specific names corresponding to the relation subjects and objects.
[0138] The preset standardized naming rules are used to convert non-standard text such as policy document numbers and institution names into a unified format. These rules can be for document numbers and institutions. Document number naming rules use regular expressions for parsing and conversion to a standard format, for example, {Issuing Authority: "National", Document Type: "Issuance", Year: 2025, Serial Number: 1}, ultimately outputting "National Document
[2025] No. 1". Institution naming rules disambiguate abbreviations of institutions based on contextual information. The subject's standardized name is a unique identifier for the related subject after standardization. The object's standardized name is a unique identifier for the related object after standardization.
[0139] Optionally, a knowledge graph agent is used to regularize the document numbers of multiple candidate relations using document number naming rules, and then disambiguation is performed on the candidate relations after document number regularization using institutional naming rules to obtain the subject normative name and object normative name corresponding to the relation subject and the relation object.
[0140] Step 903: Using a knowledge graph intelligent agent, the subject specification name and object specification name are mapped to a preset global policy knowledge graph library based on the relation type to obtain the target global policy knowledge graph library.
[0141] Optionally, the standardized document number is used to search for the corresponding policy node in a pre-defined global policy knowledge graph. If found, the unique identifier of the policy is returned, and a directed edge is created in the pre-defined global policy knowledge graph by combining the standardized subject and object normative names with the relationship type, thus obtaining the target global policy knowledge graph. If the subject and object normative names are not found in the pre-defined global policy knowledge graph, they are marked as pending confirmation and enter the manual review process.
[0142] In this embodiment, candidate relation tuples containing relation subjects, objects, and types are extracted from primary policy elements and their evidence chains, enabling structured identification of complex relationships between policies. Standardization of subjects and objects through pre-defined, standardized naming rules resolves common issues in actual government documents, such as document number variations, agency abbreviations, and aliases, improving the accuracy of entity alignment. The standardized entities are mapped to a global policy knowledge graph based on their relation types, achieving precise anchoring of cross-document relationships and enhancing the systematic, consistent, and intelligent level of policy knowledge management.
[0143] Based on the above embodiments, this application also provides a process for verifying the target global policy knowledge graph base in a policy document element extraction method based on evidence chain drive. Figure 10 This application provides a flowchart illustrating the verification of the target global policy knowledge graph base in a policy document element extraction method based on a chain of evidence. Figure 10 As shown, before using a knowledge graph agent in step 903 above to map the subject's normative name and the object's normative name to a preset global policy knowledge graph library based on relation type, and before obtaining the target global policy knowledge graph library, the method further includes: Step 1001: Using a knowledge graph agent, perform reverse verification of the subject specification name and object specification name based on the relation type using preset verification rules to obtain the verification result.
[0144] Optionally, a knowledge graph agent is used to map the subject specification name and the object specification name to a preset global policy knowledge graph library based on the relation type. Before obtaining the target global policy knowledge graph library, the method further includes using preset verification rules to verify the subject specification name and the object specification name based on the relation type.
[0145] Pre-defined verification rules can include: time sequence paradox verification rules, power level overreach verification rules, and loop verification rules. The time sequence paradox verification rule is used to verify the logical rationality of two policy documents in terms of time, ensuring that the basis or citation relationship conforms to the basic principle that the superior document comes first, followed by the subordinate document. When the system identifies a document (e.g., released in 2026) attempting to cite another document (e.g., released in 2027) as a basis, reference, replacement, or repeal object, it will extract the release dates of both for comparison. If the cited document was released later than the current document, it violates the time sequence, is judged as a time sequence paradox, and a conflict report containing the violation type, specific time information, and explanation is generated. The power level overreach verification rule is used to verify the legality of the basis relationship of superior laws, preventing subordinate laws from incorrectly citing documents with lower power as basis. When a relationship is identified as a basis type, the system queries the administrative level of the issuing authority of the cited document from the global policy knowledge graph, and simultaneously obtains the issuing authority level of the current document itself. According to the principle of legal hierarchy, the legal force of a higher-level law must be greater than or equal to that of a lower-level law, and the level of the target document must not be lower than that of the source document. If the verification finds that the source document is at a higher level, it is judged as exceeding the authority of the legal force and the verification fails. The loop verification rule is used to prevent the formation of logical dead loops between policy documents. When there are substitution, repeal, or revision relationships, a path query is performed in the global policy knowledge graph to check if there are existing relationship chains pointing from the target document back to the current document. If a closed loop path exists, such as "Document A repeals Document B, and Document B repeals Document A," it violates the constraint rule of no loops in the local structure, is judged as a logical conflict, and the verification fails.
[0146] Step 1002: If the verification result is passed and the relationship type is a blocking relationship, then the knowledge graph agent is used to send a forced state transition signal to the effectiveness state machine of the associated policy to trigger cross-document state linkage.
[0147] Optionally, if the verification passes and the relationship type is a blocking relationship, a knowledge graph agent is used to map the subject specification name and object specification name to a preset global policy knowledge graph library based on the relationship type, obtaining the target global policy knowledge graph library. A forced state transition signal is then sent to the state machine of the replaced old policy, causing its validity state to be updated to the replaced state in real time, ensuring automatic synchronization of cross-document states. A blocking relationship is a strong constraint relationship where the effectiveness or execution of one policy prohibits, replaces, or terminates the validity of another policy.
[0148] Optionally, when verification fails, a conflict report containing detailed reasons for the violation is written back to the original evidence chain, triggering automatic re-extraction or pushing to manual review, thus forming a closed loop.
[0149] In this embodiment, an automated closed loop for policy association verification and effectiveness linkage is achieved through the collaboration of knowledge graph agents and state machine mechanisms. By performing reverse consistency verification on subjects, objects, and relation types using graph computation and preset rules, ambiguity in entity referencing and relation conflicts can be automatically eliminated at the semantic and topological levels. This elevates quality control from manual, discrete review to a globally structured constraint check, significantly enhancing the logical autonomy of the knowledge graph. An event-driven state transition mechanism is introduced. When a blocking relation verification passes, the agent automatically sends a mandatory signal to the state machine of the associated policy, triggering cross-document effectiveness linkage. This breaks the limitation of isolated policy state maintenance in traditional systems, achieving real-time mapping from static knowledge representation to dynamic rule execution.
[0150] Based on the above embodiments, this application also provides a process for determining the target abstract syntax tree in a policy document element extraction method based on evidence chain drive. Figure 11 A flowchart illustrating the process of determining the target abstract syntax tree in an evidence chain-driven policy document element extraction method provided in this application is shown below. Figure 11 As shown, in steps 101-106 above, the method further includes: Step 1101: Using a compiled intelligent agent, a preset digital operator mapping table is used to map the initial extracted data corresponding to each primary policy element to obtain multiple mathematical operators.
[0151] The compiler agent is used to convert quantitative indicators in natural language policy clauses into computable expressions, and performs semantic parsing and logical compilation of the text using rules and models. A pre-defined numerical operator mapping table is used to map keywords or phrases in the policy text to standard mathematical operators or functions.
[0152] For example, Table 2 is a preset digital operator mapping table provided in an embodiment of this application. The preset digital operator mapping table includes policy text semantic keywords / phrases, mapping mathematical operators, and descriptions. The preset digital operator mapping table is shown in Table 2.
[0153] Table 2 Preset Numeric Operator Mapping Table
[0154] Optionally, a compiler-based intelligent agent is used to scan the key semantic words in the initial extracted data corresponding to each primary policy element one by one, and a preset digital operator mapping table is used to match the mathematical operators corresponding to the key semantic words to obtain multiple structured mathematical operators.
[0155] Step 1102: Using a compiler agent, mathematical operators for the initial extracted data corresponding to the first-level policy elements are assembled based on data logic according to the preset syntax analysis tree to obtain the initial abstract syntax tree for the initial extracted data corresponding to each first-level policy element.
[0156] The initial abstract syntax tree (API) represents the business logic hierarchy of the initially extracted data. The pre-defined syntactic parsing tree (PST) is the tree structure formed after parsing the initial extracted data, used to identify subject-verb-object, modifier-adverb-complement, and other components to determine whether the conditions in the initial extracted data are parallel, progressive, or mutually exclusive. The API is the constructed logical structure tree. The data logic refers to the data logic relationships identified in the initial extracted data.
[0157] Optionally, a compiler agent is used to extract the logic of the initial extracted data corresponding to the first-level policy elements according to the preset syntax analysis tree, so as to obtain the data logic of the initial extracted data. The mathematical operators of the initial extracted data are assembled based on the data logic to obtain the initial abstract syntax tree of the initial extracted data corresponding to each first-level policy element.
[0158] For example, by using a pre-defined syntactic analysis tree and semantic role labeling, multiple atomic conditions and their inherent logical relationships in the initial extracted data are identified. When mutually exclusive keywords such as "choose the higher amount" or "do not enjoy repeatedly" are detected, an XOR judgment is added to the top level of the logical structure to ensure that only one of the multiple reward clauses can be executed. When words indicating superposition, such as "enjoy simultaneously," are identified, an AND logic is added to allow conditions to be met simultaneously. For tiered rewards, such as "enjoy a certain subsidy upon reaching a certain amount," this is transformed into an "if...then..." conditional judgment structure, forming a hierarchical execution path. When the initial extracted data contains external data such as based on paid-in capital or audit reports, variable reference nodes are automatically inserted, linking to the actual data in the enterprise database. For example, when faced with a clause that a single loan of up to ten million yuan has a 1% interest subsidy and a 2% interest subsidy for high-tech enterprises, with no overlap between the two, the system will construct a logic tree that first determines the enterprise type. If the condition is met, it enters the high-percentage interest subsidy branch; otherwise, it enters the ordinary interest subsidy branch, and mutual exclusion logic ensures that only one option can be selected, thus transforming the initial extracted data of natural language into automatically executable computational logic.
[0159] Step 1103: Using a compiler agent, the preset criteria are bound to the initial abstract syntax tree of the initial extracted data corresponding to each primary policy element, thus obtaining the target abstract syntax tree.
[0160] The preset definitions include: unit of measurement, calculation period, and recipient dimension. The unit of measurement standardizes the numerical values to a uniform unit, such as ten thousand yuan, yuan per square meter, or percentage. The calculation period specifies the calculation frequency, such as one-time, annual, or monthly cumulative. The recipient dimension defines the scope of beneficiaries, such as a single household, a single project, or per person.
[0161] Optionally, a compiler-based intelligent agent is employed. For each primary policy element, the initial abstract syntax tree (API) extracts the unit, period, and applicable subject from the initial extracted data. The measurement unit caliber, calculation period caliber, and recipient dimension caliber are then injected as attributes into the corresponding condition or operation nodes in the API, thereby obtaining the target API. The target API is then serialized into a standard, machine-readable and writable JSON structure.
[0162] Step 1104: Inject the evidence chain source code into the target abstract syntax tree to obtain an executable policy computation expression.
[0163] The evidence chain tracing code is used to associate policy calculation expressions with corresponding evidence chain objects. The executable policy calculation expressions, after compilation, generate runnable code strings or bytecode that can be directly input into the calculation engine for execution, outputting business decision results.
[0164] Optionally, a traceability code is generated for the evidence chain object and an index mapping is established. Then, the code is injected as a meta-attribute into the key node of the verified target abstract syntax tree. Finally, the code generator is driven to traverse the tree to generate executable expression text, and the traceability code is embedded in the expression as a comment or inline variable to obtain an executable policy calculation expression.
[0165] Step 1105: Perform a compilation integrity check on the target abstract syntax tree. If the check fails, the compilation error information is sent back to the evaluation agent.
[0166] Among them, compilation integrity verification is a check of syntax, semantics and structural integrity, ensuring that the generated expression has no errors such as missing nodes, undefined variables, or operator type mismatch.
[0167] Optionally, all nodes of the target abstract syntax tree are traversed, and structural closure checks, operand type consistency checks, variable and function reference existence checks, and business semantic rule compliance checks are performed sequentially. If an anomaly is detected, the compilation process is immediately terminated, and the location, type, and description information of all error nodes are collected. This information is then encapsulated into a structured JSON error report, which is synchronously sent back to the evaluation agent via a message queue. The evaluation agent decides, based on a preset strategy, whether to automatically repair, revert to natural language interpretation, or trigger manual review, thereby ensuring that only semantically complete and logically compliant abstract syntax trees can proceed to the subsequent executable expression generation stage.
[0168] In this embodiment, a pre-defined digital operator mapping table is used to deterministically transform ambiguous natural language descriptions in policies into standard mathematical operation logic, avoiding ambiguity from human interpretation. It identifies complex business logic such as superposition, mutual exclusion, and tiering in clauses, restoring the complete calculation rules of the policy, ensuring the accuracy and comparability of calculation results, and improving the efficiency and fairness of government services.
[0169] Based on the same inventive concept, this application also provides a policy document element extraction device corresponding to the multi-agent collaborative policy document element extraction method. Since the principle of the device in this application is similar to the multi-agent collaborative policy document element extraction method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0170] Figure 12 A schematic diagram of a policy document element extraction device provided in this application embodiment is shown below. Figure 12 As shown, the device includes: The perception module 1201 is used to perform visual perception on the original policy document to obtain the document layout tree and the basic text unit array of each basic text block; The first parsing module 1202 is used to use a parsing agent to extract policy elements from the basic text unit array of all basic text blocks according to the preset first-level slot template and the document layout tree, so as to obtain the initial extraction data of multiple first-level policy elements and the corresponding first-level evidence chain object. The preset first-level slot template includes: the identification information of multiple first-level policy elements. The evaluation module 1203 is used to evaluate the initial extracted data of each primary policy element and the corresponding primary evidence chain object using an evaluation intelligent agent, and to obtain the evaluation results of each primary policy element. The second parsing module 1204 is used to generate a secondary slot template for the target first-level policy element if the evaluation result of the target first-level policy element is not passed among multiple first-level policy elements. The parsing agent generates the second-level slot template of the target first-level policy element based on the identification information of the target first-level policy element, the initial extracted data and the evaluation result. The extraction module 1205 is used to extract policy elements from the basic text unit array of all basic text blocks by using a parsing agent based on the secondary slot template of the target first-level policy element and the document layout tree, so as to obtain the target extraction data of the target first-level policy element and the corresponding secondary evidence chain object. The generation module 1206 is used to generate the policy element extraction results of the original policy document based on the target extraction data of the target first-level policy elements, the corresponding second-level evidence chain objects, the initial extraction data of other first-level policy elements, and the corresponding first-level evidence chain objects.
[0171] In one possible implementation, the document layout tree carries: the physical coordinates of each basic text block, the logical hierarchy of the basic text blocks, and the semantic tags of each basic text block under the policy domain; the perception module 1201 is specifically used to: perform text detection on the original policy document to obtain the original text stream corresponding to the original policy document; Layout analysis of the original policy document yields the text layout blocks associated with the original text flow; The text layout block in the text layout block is segmented to obtain multiple basic text blocks corresponding to the text layout block, as well as the physical coordinates of each basic text block; Semantic entities in the policy domain are extracted from each basic text block to obtain semantic tags for each basic text block; Construct a document layout tree based on the physical coordinates of each basic text block, the logical hierarchy of each basic text block, and the semantic tags of each basic text block; The basic text block is encapsulated to obtain the basic text unit array of the basic text block.
[0172] In one possible implementation, the evaluation module 1203 is specifically used to: employ an evaluation agent to evaluate the alignment confidence of the initial extracted data of each primary policy element and the corresponding primary evidence chain object, thereby obtaining the alignment confidence of each primary policy element; the alignment confidence is used to quantify the slot semantic carrying capacity of the primary policy element. An evaluation agent is used to evaluate the completeness of the evidence chain for the initial extracted data of each primary policy element and the corresponding primary evidence chain object. The completeness of the evidence chain for each primary policy element is obtained, and the completeness of the evidence chain is used to quantify whether the corresponding primary evidence chain object has a closed loop of business logic. An evaluation agent is used to obtain the evaluation results of each primary policy element based on alignment confidence and evidence chain completeness.
[0173] In one possible implementation, the evaluation module 1203 is specifically used to: use an evaluation agent to obtain the probability of certainty of the corresponding first-level evidence chain object; An evaluation agent is used to obtain the semantic similarity between the initial extracted data and the identification information of the corresponding first-level policy elements; An evaluation agent is used to obtain the number of semantic tag types of basic text blocks in the document layout tree; An evaluation agent is used to calculate the alignment confidence based on the determined probability, semantic similarity, and the number of semantic label types.
[0174] In one possible implementation, the evaluation module 1203 is specifically used to: employ an evaluation agent and the corresponding first-level evidence chain object to perform semantic role labeling analysis on the initial extracted data of the first-level policy elements, and obtain the core argument missing detection result; An evaluation agent is used to perform isolated element detection on the initial extracted data of primary policy elements based on dependency syntax trees, and the isolated element detection results are obtained. An evaluation agent is used to obtain the completeness of the evidence chain based on the detection results of missing core arguments and isolated elements corresponding to each primary policy element.
[0175] In one possible implementation, the evaluation module 1203 is specifically used to: employ an evaluation agent to generate a structured diagnostic vector based on the alignment confidence, the completeness of the evidence chain, the number of semantic tags of different types in the alignment confidence, and the detection results of isolated elements in the completeness of the evidence chain; An evaluation agent is used to determine whether the structured diagnostic vectors meet the preset alignment confidence condition and the preset completeness condition; An evaluation agent is employed, which feeds back the structured diagnostic vector to the parsing agent when either a preset alignment confidence condition or a preset completeness condition is met.
[0176] In one possible implementation, the second parsing module 1204 is specifically used to: employ a parsing agent to match the identification information of the target first-level policy element, the semantic tags of the target first-level policy element in the document layout tree, and the structured diagnostic vector in the evaluation results with a preset sub-slot template library. If a match is successful, the parsing agent is used to call the target sub-slot template matched in the preset sub-slot template library as the secondary slot template; If the matching fails, a parsing agent is used to call the preset slot generation rule knowledge base to obtain the second-level slot template based on the identification information of the target first-level policy element, the semantic tags of the target first-level policy element in the document layout tree, and the structured diagnostic vector in the evaluation results.
[0177] In one possible implementation, the generation module 1206 is further configured to: employ an evaluation agent to extract change events based on the extracted data of all primary policy elements and the corresponding evidence chain objects, thereby obtaining at least two change events; An evaluation agent is used to determine whether there are time-conflicting change events among at least two change events; If there are conflicting target change events, an evaluation agent is used to adjudicate the conflict between the target change events in at least two change events according to a preset rule matrix, thus obtaining a unique event chain. An evaluation agent is used to construct a directed state transition graph based on a unique event chain. The directed state transition graph is used to represent the policy state transition chain driven by change events along the time sequence.
[0178] In one possible implementation, the generation module 1206 is further configured to: use a knowledge graph agent to perform relation parsing on each primary policy element and the corresponding evidence chain object to obtain a relation candidate tuple, wherein the relation candidate tuple includes: multiple candidate relations, and the candidate relations include: relation subject, relation object and relation type; Using a knowledge graph intelligent agent, multiple candidate relations are normalized using a preset standardized naming rule to obtain the subject standardized name and object standardized name corresponding to the relation subject and the relation object; Using a knowledge graph intelligent agent, the subject normative name and object normative name are mapped to a preset global policy knowledge graph library based on relation type, thus obtaining the target global policy knowledge graph library.
[0179] In one possible implementation, the generation module 1206 is further configured to: use the knowledge graph agent to perform graph consistency reverse verification on the subject specification name and the object specification name based on the relation type according to preset verification rules, and obtain the verification result; wherein, the preset verification rules include: time paradox verification rules, power level overreach verification rules, and ring formation verification rules; If the verification result is passed and the relationship type is a blocking relationship, then the knowledge graph agent is used to send a forced state transition signal to the effectiveness state machine of the associated policy to trigger cross-document state linkage.
[0180] In one possible implementation, the generation module 1206 is further configured to: employ a compiled intelligent agent to map the initial extracted data corresponding to each primary policy element using a preset digital operator mapping table, thereby obtaining multiple mathematical operators; A compiler-based intelligent agent is used to assemble mathematical operators for the initial extracted data corresponding to the first-level policy elements based on data logic according to a preset syntactic parsing tree, thereby obtaining an initial abstract syntax tree for the initial extracted data corresponding to each first-level policy element; wherein, the initial abstract syntax tree is used to represent the business logic level of the initial extracted data; A compiler-based intelligent agent is used to bind preset criteria to the initial abstract syntax tree of the initial extracted data corresponding to each primary policy element, thereby obtaining the target abstract syntax tree. The preset criteria include: unit of measurement criteria, calculation cycle criteria, and recipient dimension criteria. The evidence chain tracing code is injected into the target abstract syntax tree to obtain an executable policy calculation expression, wherein the evidence chain tracing code is used to associate the policy calculation expression with the corresponding evidence chain object; The target abstract syntax tree is subjected to compilation integrity verification. If the verification fails, the compilation error information is sent back to the evaluation agent.
[0181] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0182] This application also provides a computer device. Figure 13 This application provides a schematic diagram of the structure of a computer device, as shown in the embodiment of the present application. Figure 13As shown, the system includes a processor 1301 and a memory 1302, and optionally, a bus 1303. The memory 1302 stores machine-readable instructions executable by the processor 1301. When the computer device is running, the processor 1301 and the memory 1302 communicate via the bus 1303. When the machine-readable instructions are executed by the processor 1301, the steps of the aforementioned multi-agent collaborative policy document element extraction method are performed.
[0183] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described multi-agent collaborative policy document element extraction method.
[0184] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0185] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0186] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for extracting policy document elements based on a chain of evidence, characterized in that, The method includes: Visual perception is performed on the original policy document to obtain the document layout tree and the basic text unit arrays of each basic text block; Using a parsing agent, based on a preset first-level slot template and the document layout tree, policy elements are extracted from the basic text unit arrays of all the basic text blocks to obtain initial extraction data of multiple first-level policy elements and corresponding first-level evidence chain objects. The preset first-level slot template includes: identification information of multiple first-level policy elements. An evaluation agent is used to evaluate the initial extracted data of each of the first-level policy elements and the corresponding first-level evidence chain objects to obtain the evaluation results of each of the first-level policy elements. If the evaluation result of the target first-level policy element is not passed among multiple first-level policy elements, the parsing agent is used to generate a second-level slot template for the target first-level policy element based on the identification information of the target first-level policy element, the initial extracted data, and the evaluation result. Using the analytical agent, based on the secondary slot template of the target first-level policy element and the document layout tree, policy element extraction is performed on the basic text unit array of all the basic text blocks to obtain the target extraction data of the target first-level policy element and the corresponding secondary evidence chain object. Based on the target extraction data of the primary policy elements, the corresponding secondary evidence chain objects, the initial extraction data of other primary policy elements, and the corresponding primary evidence chain objects, the policy element extraction results of the original policy document are generated.
2. The method according to claim 1, characterized in that, The document layout tree carries: the physical coordinates of each basic text block, the logical hierarchy of each basic text block, and the semantic tags of each basic text block under the policy domain; The process of visually perceiving the original policy document yields a document layout tree and arrays of basic text units for each basic text block, including: The original policy document is subjected to text detection to obtain the original text stream corresponding to the original policy document; The original policy document is analyzed for layout to obtain the text layout blocks associated with the original text flow; The text layout block in the text layout block is segmented to obtain multiple basic text blocks corresponding to the text layout block, and the physical coordinates of each basic text block; Semantic entities in the policy domain are extracted from each of the basic text blocks to obtain semantic tags for each of the basic text blocks; The document layout tree is constructed based on the physical coordinates of each basic text block, the logical hierarchy of each basic text block, and the semantic tags of each basic text block; The basic text block is encapsulated to obtain the basic text unit array of the basic text block.
3. The method according to claim 1, characterized in that, The evaluation agent is used to evaluate the initial extracted data and corresponding first-level evidence chain objects of each of the aforementioned first-level policy elements, and to obtain the evaluation results of each of the aforementioned first-level policy elements, including: The evaluation agent is used to evaluate the alignment confidence of the initial extracted data of each primary policy element and the corresponding primary evidence chain object to obtain the alignment confidence of each primary policy element; the alignment confidence is used to quantify the slot semantic carrying capacity of the primary policy element. The evaluation agent is used to evaluate the completeness of the evidence chain for the initial extracted data of each primary policy element and the corresponding primary evidence chain object, so as to obtain the completeness of the evidence chain for each primary policy element. The completeness of the evidence chain is used to quantify whether the corresponding primary evidence chain object has a business logic closed loop. Using the aforementioned evaluation agent, the evaluation results for each of the primary policy elements are obtained based on the alignment confidence and the completeness of the evidence chain.
4. The method according to claim 3, characterized in that, The evaluation agent is used to assess the alignment confidence of the initial extracted data and corresponding first-level evidence chain objects for each of the first-level policy elements, thereby obtaining the alignment confidence of each of the first-level policy elements, including: The evaluation agent is used to obtain the probability of certainty for the corresponding first-level chain of evidence object; The evaluation agent is used to obtain the semantic similarity between the initial extracted data and the identification information of the corresponding first-level policy elements; The evaluation agent is used to obtain the number of semantic tag types of the basic text blocks in the document layout tree; The evaluation agent is used to calculate the alignment confidence based on the determined probability, the semantic similarity, and the number of semantic label types.
5. The method according to claim 3, characterized in that, The evaluation agent is used to evaluate the completeness of the evidence chain for each of the first-level policy elements, including the initial extracted data and the corresponding first-level evidence chain objects, to obtain the completeness of the evidence chain for each of the first-level policy elements. Using the aforementioned evaluation agent and the corresponding first-level evidence chain object, semantic role labeling analysis is performed on the initial extracted data of the first-level policy elements to obtain the core argument missing detection results; Using the aforementioned evaluation agent, isolated element detection is performed on the initial extracted data of the first-level policy elements based on dependency syntax trees to obtain isolated element detection results; Using the aforementioned evaluation agent, the completeness of the evidence chain is obtained based on the core argument missing detection results and the isolated element detection results corresponding to each of the first-level policy elements.
6. The method according to claim 3, characterized in that, The evaluation agent, based on the alignment confidence and the completeness of the evidence chain, obtains the evaluation results for each of the primary policy elements, including: Using the aforementioned evaluation agent, a structured diagnostic vector is generated based on the alignment confidence, the completeness of the evidence chain, the number of semantic labels of different types in the alignment confidence, and the detection results of isolated elements in the completeness of the evidence chain. The evaluation agent is used to determine whether the structured diagnostic vector satisfies the preset alignment confidence condition and the preset completeness condition. The evaluation agent feeds back the structured diagnostic vector to the parsing agent when either the preset alignment confidence condition or the preset integrity condition is met.
7. The method according to claim 6, characterized in that, The process employs the analytical agent to generate a secondary slot template for the target primary policy element based on the identification information, initial extracted data, and the evaluation results. This includes: The parsing agent is used to match the identification information of the target first-level policy element, the semantic tags of the target first-level policy element in the document layout tree, and the structured diagnostic vector in the evaluation result with the preset sub-slot template library. If a match is successful, the parsing agent is used to call the target sub-slot template matched in the preset sub-slot template library as the secondary slot template. If the matching fails, the parsing agent is used to call the preset slot generation rule knowledge base to obtain the second-level slot template based on the identification information of the target first-level policy element, the semantic tags of the target first-level policy element in the document layout tree, and the structured diagnostic vector in the evaluation result.
8. The method according to claim 1, characterized in that, The method further includes: Using the aforementioned evaluation agent, change events are extracted based on the extracted data of all the primary policy elements and the corresponding evidence chain objects, resulting in at least two change events; The evaluation agent is used to determine whether there are time-conflicting change events among the at least two change events; If there are conflicting target change events, the evaluation agent is used to make conflict resolution on the target change events among the at least two change events according to the preset rule matrix, so as to obtain a unique event chain. Using the aforementioned evaluation agent, a directed state transition graph is constructed based on the unique event chain. The directed state transition graph is used to represent a time-sequential policy state transition chain driven by change events.
9. The method according to claim 1, characterized in that, The method further includes: A knowledge graph agent is used to perform relation parsing on each of the first-level policy elements and the corresponding evidence chain objects to obtain relation candidate tuples. The relation candidate tuples include multiple candidate relations, and the candidate relations include relation subjects, relation objects and relation types. Using the knowledge graph agent, multiple candidate relations are normalized using a preset standardized naming rule to obtain the subject standardized name and object standardized name corresponding to the relation subject and the relation object; Using the knowledge graph agent, the subject specification name and the object specification name are mapped to a preset global policy knowledge graph library based on the relationship type, thereby obtaining the target global policy knowledge graph library.
10. The method according to claim 9, characterized in that, Before using the knowledge graph agent to map the subject specification name and the object specification name to a preset global policy knowledge graph library based on relation type, and obtaining the target global policy knowledge graph library, the method further includes: Using the knowledge graph agent, the subject specification name and the object specification name are subjected to graph consistency reverse verification based on the relation type according to the preset verification rules, and the verification result is obtained; wherein, the preset verification rules include: time paradox verification rules, power level overreach verification rules, and cycle verification rules; If the verification result is passed and the relationship type is a blocking relationship, then the knowledge graph agent is used to send a forced state transition signal to the effectiveness state machine of the associated policy to trigger cross-document state linkage.
11. The method according to claim 1, characterized in that, The method further includes: A compiled intelligent agent is used, and a preset digital operator mapping table is used to map the initial extracted data corresponding to each of the first-level policy elements to obtain multiple mathematical operators; Using the aforementioned compiler agent, mathematical operators for the initial extracted data corresponding to the first-level policy elements are assembled based on data logic according to a preset syntactic analysis tree to obtain an initial abstract syntax tree for the initial extracted data corresponding to each first-level policy element; wherein, the initial abstract syntax tree is used to represent the business logic level of the initial extracted data; Using the aforementioned compiler agent, a preset caliber is bound to the initial abstract syntax tree of the initial extracted data corresponding to each of the first-level policy elements to obtain the target abstract syntax tree. The preset caliber includes: measurement unit caliber, calculation cycle caliber, and recipient dimension caliber. The evidence chain tracing code is injected into the target abstract syntax tree to obtain an executable policy calculation expression, wherein the evidence chain tracing code is used to associate the policy calculation expression with the corresponding evidence chain object; The target abstract syntax tree is subjected to compilation integrity verification. If the verification fails, the compilation error information is sent back to the evaluation agent.