Document semantic understanding and intent recognition method and system based on large language model

CN122596071APending Publication Date: 2026-08-18STATE GRID SHANGHAI ELECTRIC POWER DESIGN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610437017.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-03
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,现有多数技术方案未对文档语义理解过程中的中间步骤进行形式化描述,也未提供与意图识别结果直接对应的可执行验证机制,限制了其在上述应用场景中的适用性

Benefits of technology

[0021]This application's document semantic understanding and intent recognition method based on a large language model performs semantic adaptive segmentation according to a preset semantic adaptive segmentation rule by using a reference relationship graph of text unit sets and semantic representation vectors. This maintains the integrity of the logical structure within the document to be identified and effectively reduces information fragmentation. It employs a local agent group to call the large language model to generate candidate intents and introduces a multi-agent arbitration mechanism for conflict nodes in case of conflict, enabling the same semantic content to generate candidate results from multiple inference paths, avoiding inconsistencies caused by a single inference path. By constructing an intent source evidence lattice, candidate intents from different semantic blocks are organized, merged, and conflict identified within a unified structure, avoiding unstable intent aggregation. By introducing microprograms and performing program-level symbolic verification on them during intent recognition, each candidate intent corresponds to an executable and verifiable intermediate representation, giving the document semantic understanding and intent recognition process a formal consistency verification capability based on document facts. Finally, it outputs a document, intent set, intent label, evidence set, microprogram, and trust weight, ensuring interpretability and traceability of the intent recognition results, thus improving the accuracy of intent recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122596071A_ABST
    Figure CN122596071A_ABST
Patent Text Reader

Abstract

The application provides a document semantic understanding and intent recognition method and system based on a large language model, which comprises the following steps: obtaining a to-be-recognized document and performing structural analysis to generate a text unit set; determining a citation relationship graph and a semantic representation vector according to the text unit set and performing semantic adaptive blocking processing; calling a preset large language model by using a local reasoning agent group to generate a candidate intent for each semantic block, and determining a candidate intent set; constructing an intent source evidence grid according to the candidate intent set, performing quality evaluation on the evidence set, performing program-level symbol verification on the microprogram, and initiating multi-agent arbitration on the conflict node to determine the final node of the intent source evidence grid; and outputting a document-level intent set and an intent label, an evidence set, a microprogram, and a trusted weight based on the final node of the intent source evidence grid. Through the application, the consistency of the intent recognition logic and the reliability of the evidence are ensured, and the accuracy, reliability and interpretability of the intent recognition result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to a method and system for document semantic understanding and intent recognition based on a large language model. Background Technology

[0002] With the development of information technology, documents, as an important form of information carrier, are widely found in contract texts, technical documents, policy documents, patent specifications, business reports, and various structured or semi-structured materials. Automating the processing of these documents to achieve semantic understanding, information extraction, and intent recognition has become one of the important research directions in the field of natural language processing.

[0003] Existing document semantic understanding technologies typically employ rule-based, statistical model-based, or deep learning model-based approaches. Rule-based methods rely on manually constructed grammatical rules or keyword templates, identifying semantic information or user intent by matching specific patterns in the text. While these methods offer determinism within the scope of the rules, they suffer from high costs in rule construction and maintenance when documents are complex, diverse in expression, or semantically implicit, and they struggle to adapt to the differences between various document types.

[0004] Processing methods based on statistical models or deep learning models typically train with a large number of samples to obtain semantic representations of the text, and then perform tasks such as classification, sequence labeling, or relation extraction based on these representations. While these methods are applicable to short texts or sentence-level tasks, they are susceptible to problems such as context fragmentation and semantic drift when dealing with longer documents containing multiple paragraphs, hierarchical structures, and cross-paragraph references, making it difficult to achieve consistent semantic understanding results across the entire document.

[0005] In recent years, large language models have been applied in natural language understanding and generation tasks. By pre-training on large-scale corpora, these models possess strong language modeling capabilities. In document processing scenarios, related technologies typically divide documents into several segments and input these segments into large language models for reasoning to obtain segment-level semantic analysis results or intent judgments. However, since large language models usually output results in natural language form, their reasoning process lacks explicit intermediate representations, the correspondence between the output results and the original document content is unclear, and it is difficult to verify or trace the reasoning results.

[0006] Furthermore, existing document processing solutions based on large language models often rely on fixed-length or simple rules for text segmentation, failing to adequately consider the structural or referential relationships within the document. This can easily lead to logically related content being split into different processing units, thus affecting the consistency of subsequent semantic analysis. When multiple fragment results need to be merged into a document-level conclusion, existing technologies typically employ similarity calculations, simple voting, or manual rules for integration. The lack of a unified data structure and deterministic merging rules can easily result in conflicting or inconsistent outcomes.

[0007] On the other hand, existing technologies often only output intent labels or textual conclusions during the intent recognition process, without systematically managing the evidence supporting the intent, resulting in a lack of clear evidence chains to support the intent recognition results. When the document content is ambiguous, conflicting, or has multiple interpretation paths, existing solutions struggle to effectively distinguish between different candidate intents and to automatically correct erroneous results.

[0008] Meanwhile, in application scenarios involving contract review, technical analysis, or compliance checks, document semantic understanding and intent recognition results typically need to be verifiable and traceable for subsequent manual review or system auditing. However, most existing technical solutions do not provide a formal description of the intermediate steps in the document semantic understanding process, nor do they provide an executable verification mechanism directly corresponding to the intent recognition results, thus limiting their applicability in the aforementioned application scenarios.

[0009] In summary, existing document semantic understanding and intent recognition technologies still have technical problems in handling long documents, complex structured documents, and scenarios requiring document-level consistency and verifiability of results. These problems include unreasonable semantic segmentation, lack of a unified mechanism for intent aggregation, unclear evidence management, and difficulty in verifying inference results. Further improvements are needed. Summary of the Invention

[0010] In view of the deficiencies in the prior art, the purpose of this application is to provide a document semantic understanding and intent recognition method and system based on a large language model.

[0011] The first aspect of this application provides a document semantic understanding and intent recognition method based on a large language model, including: The document to be identified is acquired and structured parsed to generate a set of text units; Based on the set of text units, a reference relationship graph and a semantic representation vector are determined, and semantic adaptive segmentation is performed according to a preset semantic adaptive segmentation rule to determine a set of semantic blocks; A local reasoning agent group is used to call a preset large language model to generate candidate intents for each semantic block in the semantic block set, and a candidate intent set is determined. Each candidate intent includes a candidate intent label, an evidence set, a microprogram, and an initial trust weight. Based on the candidate intent set, construct the intent source credential; On the intent source evidence frame, a quality assessment is performed on the evidence set, program-level symbol verification is performed on the microprogram, and multi-proxy arbitration is initiated for conflicting nodes to determine the final node of the intent source evidence frame; Based on the final node of the intent source evidence grid, output document-level intent set, intent tag, evidence set, microprogram, and trust weight.

[0012] Optionally, the step of acquiring the document to be identified and performing structured parsing to generate a set of text units includes: Obtain the document to be recognized; Extract the text and layout information of the document to be identified; The text information and layout information of the document to be identified are subjected to sequential page analysis and basic field extraction operations to generate the text unit set. Each text unit in the text unit set includes text content and structural attributes.

[0013] Optionally, the step of determining a reference relationship graph and semantic representation vector based on the text unit set, and performing semantic adaptive segmentation processing according to a preset semantic adaptive segmentation rule to determine a semantic block set includes: Perform reference chain tracing on the set of text units to construct the reference relationship graph; The text content in the text unit set is encoded using a preset text encoding function to generate the semantic representation vector; Based on the reference relationship graph and the semantic representation vector, semantic blocks are divided at the boundaries of adjacent text units in the text unit set where the semantic change degree of adjacent text units is no greater than a preset semantic change degree threshold and there is no overlap in reference relationships, thereby determining the semantic block set.

[0014] Optionally, the local reasoning agent group includes multiple agents running in parallel, with each semantic block being processed in parallel by multiple agents; A local inference agent group is used to invoke a preset large language model to generate candidate intents for each semantic block in the semantic block set, and a candidate intent set is determined, including: For each semantic block, the multiple parallel-running agents are used to input the preset large language model with the semantic block as the context to generate candidate intents corresponding to the semantic block.

[0015] Optionally, constructing the intent source credential based on the candidate intent set includes: Map each candidate intent in the candidate intent set to a source evidence node, and determine the source evidence node corresponding to each candidate intent. The source evidence node includes a candidate intent label, an evidence set, a microprogram, and an initial trust weight. Each candidate intent corresponds to a source evidence node that forms the intent source evidence grid. The source evidence nodes in the intent source evidence grid have a partial order relationship, and the intent source evidence grid supports the merging and cross-operation of the evidence set.

[0016] Optionally, the step of performing quality assessment on the evidence set, performing program-level symbol verification on the microprogram, and initiating multi-proxy arbitration on conflicting nodes to determine the final node of the intent source evidence stencil includes: On the intent source evidence grid, a preset evidence quality function is used to perform a quality assessment on each of the evidence sets to determine the evidence quality score corresponding to each of the evidence sets; The evidence quality score corresponding to each of the evidence sets and the initial credibility weight are weighted and summed to determine the credibility weight of each of the source evidence nodes. On the intent source certificate, for each of the microprogram callers, a program execution mapping is performed to determine the program execution result set; Perform consistency verification on the program execution result set and the document to be identified to determine the verification indication; According to the verification instructions, the evidence quality score corresponding to each evidence set is updated using a preset correction strategy, and the credibility weight of each source evidence node is updated to determine the updated credibility weight of the source evidence node. When any two source evidence nodes have different intent labels and their corresponding evidence sets have a non-empty intersection, the two source evidence nodes are determined to be conflicting nodes. Based on the semantic blocks, intent tags, evidence sets, microprograms, and trust weights of the conflicting nodes, as well as the preset prompt templates and model parameters of the preset large language model, multiple parallel arbitration agents are used to generate arbitration nodes for each conflicting node, which serve as the final nodes of the intent source evidence.

[0017] Optionally, the final node based on the intent source evidence grid outputs a document-level intent set and intent tags, evidence set, microprogram, and trust weight, including: Based on the credibility weight of the final node of the intent source credential and a preset retention threshold, determine the final node of the intent source credential if the credibility weight of the final node is lower than the preset retention threshold. The final nodes of intent source evidence with a credibility weight lower than the preset retention threshold, as well as the candidate intent tags, evidence sets, microprograms, and credibility weights corresponding to the final nodes of intent source evidence, are manually verified to determine the candidate intent tags, evidence sets, microprograms, and credibility weights of the final nodes of intent source evidence that have been manually verified. Based on the final node of all the intent source evidence, output the document-level intent set, intent tag, evidence set, microprogram, and trust weight.

[0018] A second aspect of this application provides a document semantic understanding and intent recognition system based on a large language model, comprising: The structured parsing module is used to acquire the document to be recognized and perform structured parsing to generate a set of text units; The semantic adaptive segmentation module is used to determine the reference relationship graph and semantic representation vector based on the set of text units, and to perform semantic adaptive segmentation processing according to the preset semantic adaptive segmentation rules to determine the set of semantic blocks; The candidate intent generation module is used to use a local reasoning agent group to call a preset large language model to generate a candidate intent group for each semantic block in the semantic block set, and to determine the candidate intent group set. Each candidate intent group includes a candidate intent, an evidence set, a microprogram, and an initial trust weight. The intent source credential construction module is used to construct an intent source credential based on the set of candidate intent groups; The verification module is used to perform quality assessment on the evidence set, perform program-level symbol verification on the microprogram, and initiate multi-proxy arbitration on conflict nodes on the intent source evidence frame to determine the final node of the intent source evidence frame. The intent output module is used to output a document-level intent set, intent tag, evidence set, microprogram, and trust weight based on the final node of the intent source evidence grid.

[0019] A third aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of any of the methods provided in the first aspect of this application.

[0020] A fourth aspect of this application provides an electronic device comprising: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of any of the methods provided in the first aspect of this application.

[0021] This application's document semantic understanding and intent recognition method based on a large language model performs semantic adaptive segmentation according to a preset semantic adaptive segmentation rule by using a reference relationship graph of text unit sets and semantic representation vectors. This maintains the integrity of the logical structure within the document to be identified and effectively reduces information fragmentation. It employs a local agent group to call the large language model to generate candidate intents and introduces a multi-agent arbitration mechanism for conflict nodes in case of conflict, enabling the same semantic content to generate candidate results from multiple inference paths, avoiding inconsistencies caused by a single inference path. By constructing an intent source evidence lattice, candidate intents from different semantic blocks are organized, merged, and conflict identified within a unified structure, avoiding unstable intent aggregation. By introducing microprograms and performing program-level symbolic verification on them during intent recognition, each candidate intent corresponds to an executable and verifiable intermediate representation, giving the document semantic understanding and intent recognition process a formal consistency verification capability based on document facts. Finally, it outputs a document, intent set, intent label, evidence set, microprogram, and trust weight, ensuring interpretability and traceability of the intent recognition results, thus improving the accuracy of intent recognition.

[0022] Other technical effects resulting from the additional features will be further illustrated in the corresponding embodiments. Attached Figure Description

[0023] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating a document semantic understanding and intent recognition method based on a large language model, according to an exemplary embodiment.

[0024] Figure 2 This is a schematic diagram illustrating a reference relationship diagram according to an exemplary embodiment.

[0025] Figure 3 This is a schematic diagram illustrating a semantically adaptive chunking method according to an exemplary embodiment.

[0026] Figure 4 This is a schematic diagram illustrating a method for generating candidate intents using a group of local reasoning agents, according to an exemplary embodiment.

[0027] Figure 5 This is a flowchart illustrating a document semantic understanding and intent recognition system based on a large language model, according to an exemplary embodiment. Detailed Implementation

[0028] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.

[0029] The terms "comprising" and "having," and any variations thereof, in the embodiments of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or devices.

[0030] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature.

[0031] In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0032] Existing document semantic understanding technologies include rule-based methods that rely on manually constructed grammatical rules or keywords, resulting in high rule construction and maintenance costs and difficulty in adapting to the differences between various document types; methods based on statistical models or deep learning modules require extensive sample training and suffer from context fragmentation and semantic drift; and methods based on large language models lack explicit intermediate representations in the reasoning process, making it difficult to verify or trace the reasoning results, and suffer from unreasonable semantic segmentation, a lack of unified mechanisms for intent aggregation, and unclear evidence management. To address these issues, this application provides a document semantic understanding and intent recognition method based on a large language model to resolve these problems.

[0033] For ease of expression, the following symbols and terms are used in this application, and their meanings remain unchanged throughout the document.

[0034] The document to be identified is denoted as The set of text units is denoted as ;No. Text unit The text content is recorded as Structural properties are denoted as Reference relationships are denoted as Semantic representation vector is denoted as Semantic block set is denoted as , No. Each semantic block is denoted as Local reasoning agent for semantic blocks The output candidate intent set is denoted as Candidate Intent Represented by quadruples in, Indicates candidate intent label, Represents a set of evidence. Indicates microprogram, The initial credibility weight is represented by ; the evidence unit is denoted as . The quality score of evidence is recorded as follows: .

[0035] An Intent Provenance Lattice (PL) consists of several provenance nodes, each denoted as . in, The intent tag representing the source certificate node identifier. Represents a set of evidence. Indicates microprogram, This represents the posterior confidence level of a node, i.e., the confidence weight. The final retention threshold is denoted as... The reduction factor used to verify the correction is denoted as... The retention threshold used for manual verification is denoted as... .

[0036] Figure 1 This is a flowchart illustrating a document semantic understanding and intent recognition method based on a large language model, according to an exemplary embodiment.

[0037] Reference Figure 1 As shown in one embodiment of this application, a document semantic understanding and intent recognition method based on a large language model is provided, including S11 to S16.

[0038] S11: Obtain the document to be recognized and perform structured parsing to generate a set of text units.

[0039] S12, based on the set of text units, determine the reference relationship graph and semantic representation vector, perform semantic adaptive segmentation processing according to the preset semantic adaptive segmentation rules, and determine the set of semantic blocks.

[0040] S13, using a local inference agent group to call a preset large language model to generate candidate intents for each semantic block in the semantic block set, and determine the candidate intent set.

[0041] Specifically, each candidate intent includes a candidate intent label, a set of evidence, a microprogram, and an initial credibility weight.

[0042] S14, construct the intent source credential based on the candidate intent set.

[0043] S15, on the intent source evidence tier, performs quality assessment on the evidence set, performs program-level symbol verification on the microprogram, and initiates multi-agent arbitration on conflicting nodes to determine the final node of the intent source evidence tier.

[0044] S16, based on the final node of the intent source evidence grid, outputs a document-level intent set, intent tag, evidence set, microprogram, and trust weight.

[0045] Semantic adaptive segmentation is performed using a reference graph of text unit sets and semantic representation vectors according to preset semantic adaptive segmentation rules, maintaining the integrity of the logical structure within the document to be identified and effectively reducing information fragmentation. A local agent group calls a large language model to generate candidate intents, and a multi-agent arbitration mechanism is introduced for conflict nodes in case of conflict, enabling the same semantic content to generate candidate results from multiple inference paths, avoiding inconsistencies caused by a single inference path. By constructing an intent source evidence lattice, candidate intents from different semantic blocks are organized, merged, and conflict identified in a unified structure, avoiding unstable intent aggregation. By introducing microprograms in the intent recognition process and performing program-level symbolic verification on the microprograms, each candidate intent corresponds to an executable and verifiable intermediate representation, giving the document semantic understanding and intent recognition process a formal consistency verification capability based on document facts. Finally, the document, intent set, intent label, evidence set, microprogram, and trust weight are output, ensuring the intent recognition results have interpretability and source traceability, improving the accuracy of intent recognition.

[0046] To achieve structured parsing of the document to be identified, in some specific embodiments of this application, for S11, obtaining the document to be identified and performing structured parsing to generate a set of text units, can be done using S111 to S113.

[0047] S111, Obtain the document to be recognized.

[0048] Specifically, the document to be identified may include electronic documents, as well as scanned or image documents.

[0049] S112, extract the text information and layout information of the document to be identified.

[0050] Specifically, if the document to be identified is an electronic document, the text stream is read directly as text information, and the layout metadata is read directly as layout information.

[0051] If the document to be identified is a scanned document or an image document, character recognition processing is first performed on the scanned document or image document to extract layout information. The layout information extracted by character recognition processing and the original layout information are used as the total layout information. The text stream of the scanned document or image document is read as the text information.

[0052] S113, perform layout analysis and basic field extraction operations sequentially on the text information and layout information of the document to be identified, and generate a set of text units.

[0053] Specifically, each text unit in the text unit set includes text content and structural attributes.

[0054] The document to be recognized is subjected to layout analysis, which divides the document into sets of text units based on visual and semantic units. Each text unit Structural properties It should include at least: page number, block type (text paragraph, title, table cell, footnote, figure caption), position information on the page and its relationship with adjacent text cells.

[0055] Basic field extraction operations are performed on the text units of the document to be identified in order to identify the row, column indexes and header rows of the table structure, and to provide the necessary table coordinate mapping information for subsequent extraction of reference relationships.

[0056] Based on the text information of the document to be identified, generate the text content of each text unit in the text unit set.

[0057] In this embodiment, the text unit identifier uses an integer number.

[0058] The embodiments described above in this application generate a set of text units rich in structure and semantics by fusing multimodal information of text and layout, thereby solving the problem of lost spatial context in traditional OCR and significantly improving the accuracy of key information extraction, the degree of structuring, and the adaptability to complex document layouts.

[0059] Figure 2 This is a schematic diagram illustrating a reference relationship diagram according to an exemplary embodiment. Figure 3 This is a schematic diagram illustrating a semantically adaptive chunking method according to an exemplary embodiment.

[0060] Reference Figure 2 , Figure 3 As shown, in order to achieve semantic adaptive segmentation, in some specific embodiments of this application, for S12, the reference relationship graph and semantic representation vector are determined according to the text unit set, and semantic adaptive segmentation is performed according to the preset semantic adaptive segmentation rules to determine the semantic block set. This can be done using S121 to S123.

[0061] S121, perform reference chain tracing on the set of text units and construct a reference relationship graph.

[0062] Specifically, based on the text unit set u and the structural properties of the text units. For any directed edge The process involves tracing and determining citation chains, including but not limited to: explicit text citations (such as numbered citations and terminological citations), page layout citation mapping (such as cross-page table citations), and phrase citations based on semantic matching, thereby constructing a citation relationship graph. .

[0063] Reference Figure 2 As shown, exemplarily, the reference chain tracing of text units one through four is performed, wherein text unit three jointly references text unit one and text unit two, and text unit four references text unit three, to construct as follows: Figure 2 The reference relationship diagram is shown.

[0064] S122, the text content in the text unit set is encoded using a preset text encoding function to generate a semantic representation vector.

[0065] Specifically, the preset text encoding function adopts The generated semantic representation vector is .

[0066] Preset text encoding function The implementation can employ a Transformer-based encoder or other vectorized encoders, with a fixed output dimension of d, to generate semantic representation vectors. At the same time, the encoding process combines the structural attributes of text units. By annotating, embedding, and concatenating the text content of text units, the encoder output can simultaneously reflect the semantic and structural attributes of the text.

[0067] S123, Based on the reference relationship graph and semantic representation vector, semantic blocks are divided at the boundaries of adjacent text units in the text unit set where the semantic change degree of adjacent text units is no greater than the preset semantic change degree threshold and there is no overlap in reference relationships, and a set of semantic blocks is determined.

[0068] Specifically, the preset semantic adaptive segmentation rule is as follows: semantic blocks are divided at the boundaries of adjacent text units in the text unit set where the semantic change degree of adjacent text units is no greater than the preset semantic change degree threshold and there is no overlapping reference relationship, thus determining the semantic block set.

[0069] Specifically, adjacent text units are determined based on the citation relationship graph, and the semantic variability of adjacent text units is calculated based on their semantic representation vectors. : in, Indicates the degree of semantic variation between adjacent text units. Indicates the first The semantic representation vector of each text unit. Indicates the first The semantic representation vector of each text unit. This represents the Euclidean norm.

[0070] Define semantic change determination function : in, This represents a semantic change determination function. This represents the preset semantic variability threshold. Indicates the first A set of reference relationships for each text unit. Indicates the first A set of reference relationships for each text unit.

[0071] Scan using the defined semantic change determination function. The value, in each satisfying The block boundaries are defined at the specified locations, thereby generating a set of semantic blocks. Each semantic block For a text unit to be recognized to be a continuous unit in the document, and to maintain the integrity of the reference chain during the segmentation process, that is, for any text unit that is divided into the same semantic block With text unit If it exists or This ensures that the two are located in the same or adjacent semantic blocks to maintain the semantic continuity of cross-unit references.

[0072] Reference Figure 3 As shown, for example, based on the above semantic adaptive segmentation rules, the semantic block is segmented into three text units, and the semantic block 2 includes two text units. Semantic block 1 and semantic block 2 are adjacent semantic blocks.

[0073] The embodiments described above in this application, by simultaneously considering the semantic change relationships and reference relationships between text units during the semantic adaptive segmentation process, avoid incorrectly classifying text units with direct reference relationships into different semantic blocks, thereby maintaining the integrity of the document's internal logical structure. This ensures that local reasoning based on semantic blocks is always carried out in a logically coherent context in subsequent processes, effectively reducing the information fragmentation problem caused by improper segmentation.

[0074] In some specific embodiments of this application, the local reasoning agent group includes multiple agents running in parallel, and each semantic block is processed in parallel by multiple agents.

[0075] Figure 4 This is a schematic diagram illustrating a method for generating candidate intents using a group of local reasoning agents, according to an exemplary embodiment.

[0076] Reference Figure 4 As shown, to achieve multi-path generation of candidate intents, in some specific embodiments of this application, for S13, a local inference agent group is used to call a preset large language model to generate candidate intents for each semantic block in the semantic block set, and the candidate intent set is determined, including: For each semantic block, multiple parallel-running agents are used to input a pre-defined large language model with the semantic block as the context, and generate candidate intents corresponding to the semantic block.

[0077] Specifically, refer to Figure 4 As shown, for each semantic block The system involves a group of local inference agents that concurrently invoke a pre-defined large language model to perform local inference. These agents communicate with each other using independent prompt templates or different pre-defined large language model parameter configurations to achieve diverse inference methods. The independent prompt templates represent multiple pre-defined templates used to guide the pre-defined large language model in generating candidate intents from different inference paths. The model parameters are the parameter configurations used when invoking the large language model for inference, such as sampling strategies or generation parameters.

[0078] The input to the local reasoning agent group is a semantic block. The system generates a set of text units and their corresponding structured information, which are then used by a proxy to call a large language model and request a return in a structured output constraint format. This structured information includes, but is not limited to, the structural attributes of the text units, reference graphs, and table coordinate mappings.

[0079] Specifically, the local reasoning agent group for each semantic block Output several candidate intents Each candidate intent The structure is a quadruple .

[0080] in, Intent labels representing natural language forms; This represents a set of evidence, containing several location information pointing to strings within text units, such as a triplet that locates the text unit number and the offsets of the start and end characters. This refers to a microprogram, which is defined using a microprogramming language. express; The initial confidence weight represents the candidate intent, which is used to characterize the agent's initial confidence in the candidate intent based on the local context.

[0081] Specifically, the collection of evidence Each element is a triplet ,in, Indicates the text cell number. Indicates the starting character offset. Indicates the offset of the end character.

[0082] Specifically, microprogramming language The design goal is to express a subset of executable instructions that extract structured fields from documents, perform conditional checks, and aggregate basic numeric / string data, while also satisfying the property of static analysis capability. Microprogramming language The syntax includes, but is not limited to: the extract instruction `extract((fieldspecifier))`, the assert (condition) instruction, the aggregate (operation, scope) instruction, and the simple control flow instruction `if-then-else`. Each microprogram... Binding to the evidence set at the text level Above. Define the program execution mapping function Ω: In this embodiment, a program execution mapping function Ω is defined to map the set of candidate microprograms to the corresponding set of execution results. The mapping function can be expressed as: Ω: P → Z Where P represents the set of candidate microprograms, p∈P represents a single microprogram; Z represents the set of program execution results, z∈Z represents the execution output of a microprogram.

[0083] For any microprogram p, its execution result z can be expressed as: z = Ω(p, E, S) Where E represents the evidence set and S represents the semantic block or contextual information.

[0084] Where z represents the program execution result set, which includes the extracted field values, Boolean validation results, and aggregated values.

[0085] The mapping function Ω processes the input evidence and outputs structured results by calling predefined parsing operators, logic operation modules, or external tools.

[0086] In some specific implementations, the mapping function Ω can be implemented by a rule engine, a script execution environment, or a neural network model.

[0087] Microprogram execution is handled by the microprogram execution engine, which consists of three parts: a parser, an extractor, and an executor. The parser is responsible for parsing the syntax and generating an execution plan; the extractor is used to locate and extract text fragments based on the evidence set; and the executor is used to execute the parsed instructions and output the program execution result set z.

[0088] The structured results output by the local inference agent group are saved in the system data format, and each set of evidence is stored. Map back to the original location for subsequent execution and verification.

[0089] The embodiments described above in this application employ a group of local reasoning agents to generate candidate intents in parallel, enabling the same semantic content to generate candidate results from multiple reasoning paths. This allows for stable output when faced with semantic ambiguity or multiple possible interpretations, avoiding inconsistencies caused by a single reasoning path.

[0090] In some specific embodiments of this application, in order to construct the intent source certificate, for S14, constructing the intent source certificate according to the candidate intent set can be done using S141 to S142.

[0091] S141, map each candidate intent in the candidate intent set to a source certificate node, and determine the source certificate node corresponding to each candidate intent.

[0092] Specifically, the source evidence node includes candidate intent labels, evidence sets, microprograms, and initial trust weights.

[0093] Specifically, insert the candidate intent into the intent source certificate grid and define the source certificate node: in, Indicates the source certificate node, The candidate intent label represents the source certificate node. The set of evidence representing the source node. The microprogram representing the source certificate node. This represents the initial trust weight of the source node.

[0094] Specifically, the preset mapping rules are as follows: and will Set as .

[0095] S142, the source certificate nodes corresponding to each candidate intent form an intent source certificate grid.

[0096] Specifically, there is a partial order relationship between the source certificate nodes in the intent source certificate lattice.

[0097] The intent source lattice defines a partial order relation ≤ for the set of source evidence nodes: in, This represents the a-th source certificate node. This represents the b-th source certificate node. Denotes the evidence set of the a-th source evidence node. Let represent the evidence set of the b-th source evidence node.

[0098] Specifically, the intent source lattice supports the merging and cross-operation of evidence sets.

[0099] For example, through a merge operation Generate the first new source certificate node : in, Indicates the first new source certificate node. This indicates the candidate intent label for the first new source certificate node. This represents the set of evidence for the first new source node. The microprogram representing the first new source certificate node. This represents the initial trust weight of the first new source certificate node.

[0100] Specifically, the candidate intent label of the first new source node generated by the merging operation is determined using a preset label parsing rule: when season when At that time, the tag splicing rules are determined according to lexicographical order. And generate a unique combined tag, specifically as follows: , is used to concatenate two tags in lexicographical order and use an underscore as a separator.

[0101] For example, through cross operation Generate a second new node: in, Indicates the second new source certificate node. This indicates the candidate intent label for the second new source node. This represents the set of evidence for the second new source node. The microprogram representing the second new source certificate node. This represents the initial trust weight of the second new source node.

[0102] Cross operations are used to identify the intersection of evidence sets and for conflict detection and constraint verification.

[0103] Both merge and cross operations are performed according to the above rules to ensure that the results of the operation on the intent source lattice can be reproduced.

[0104] The embodiments described above in this application construct an intent source lattice and define deterministic merging and cross operations on it, enabling candidate intents from different semantic blocks to be organized, merged, and conflict identified in a unified structure. This avoids the problem of unstable results in traditional intent aggregation methods based on simple similarity or voting mechanisms, and allows intents across paragraphs, pages, or even structural units to be systematically processed within the same logical framework.

[0105] In some specific embodiments of this application, for S15, regarding the intent source evidence credential, performing quality assessment on the evidence set, performing program-level symbol verification on the microprogram, and initiating multi-proxy arbitration on conflicting nodes to determine the final node of the intent source evidence credential can be achieved by: S151, on the intent source evidence lattice, a preset evidence quality function is used to perform a quality assessment on each evidence set to determine the evidence quality score corresponding to each evidence set.

[0106] Specifically, the preset evidence quality function is Q(e), which is used to measure the reliability of a single piece of evidence, and its expression can be represented as: Q(e) = w1·T(e) + w2·C(e) + w3·H(e) + w4·M(e) Where: T(e) represents the credibility score corresponding to the evidence source type identifier, C(e) represents the parsing confidence of the text extraction location, H(e) represents the microprogram execution history pass rate statistic, M(e) represents the model confidence of the source proxy, and w1, w2, w3, and w4 represent the first weight parameter, the second weight parameter, the third weight parameter, and the fourth weight parameter, respectively, satisfying w1+w2+w3+w4=1. In practical applications, the above T(e), C(e), C(e), and M(e) can be normalized and then weighted and summed to obtain the comprehensive quality score of the evidence unit.

[0107] Specifically, for each evidence unit in each evidence set of each source evidence node n The evidence source type identifier, the resolution confidence of the text extraction location, the pass rate statistics of the microprogram execution history, and the model confidence information of the source agent are input into the preset evidence quality function, and the evidence quality corresponding to the evidence unit is output.

[0108] Quality of evidence: .

[0109] The evidence quality score Q(E) for each evidence set can be aggregated based on the quality of individual pieces of evidence: Q(E) = (1 / n)·∑ Q(e i ) Where Q(E) represents the evidence quality score corresponding to the evidence set, Q(e i ) represents the evidence quality score of the i-th evidence unit.

[0110] Alternatively, a weighted summation method can be used: Q(E) = ∑ α i ·Q(e i ) Where, α i This represents the weight coefficient of the i-th evidence unit.

[0111] In a further implementation, the evidence quality score Q(E) corresponding to the evidence set can be normalized and used for subsequent node credibility weight calculation or candidate intent ranking.

[0112] S152, the evidence quality score corresponding to each evidence set and each initial credibility weight are weighted and summed to determine the credibility weight of each source evidence node.

[0113] Specifically, a weight normalization factor is defined based on the evidence quality score corresponding to each evidence set: in, This represents the weight normalization factor of the nth source node.

[0114] when When the value is greater than 0, a normalized weight is defined for each unit of evidence: in, This represents the normalized weight of each unit of evidence.

[0115] Initial credibility weights for candidate intentions on each unit of evidence. This value originates from the relevant candidate intent. Or, for the agent's subprobability of that evidence, define the logit function: Calculate the posterior logit of the node according to the weighted logit fusion rule: This allows us to obtain the trusted weight of each source node: ,in, .

[0116] when When, define It is equal to the arithmetic mean of the initial trust weights of candidate intentions within the node, to avoid division by zero.

[0117] The above steps S151 to S152 are executed in real time when the source evidence node of the intent source evidence lattice is inserted or the evidence is updated, and the credibility weight of each source evidence node is obtained. Write back the node source data.

[0118] Among them, the trusted weight of each source certificate node Stored as a floating-point number.

[0119] S153, on the intent source credential, for each microprogram call program execution mapping, determine the program execution result set.

[0120] Specifically, for each microprogram of each source node n in the intent source lattice. Call the program to perform mapping Get the execution result .

[0121] S154, Perform consistency verification on the program execution result set and the document to be identified, and determine the verification indication.

[0122] Specifically, the consistency verification rules include, but are not limited to: consistency checks of field values, such as matching the same amount in different positions; consistency checks of date ranges; and numerical boundary checks.

[0123] Define verification indicator function : S155, according to the verification instructions, the evidence quality score corresponding to each evidence set is updated using a preset correction strategy, and the credibility weight of each source evidence node is updated to determine the updated credibility weight of the source evidence node.

[0124] Specifically, the preset correction strategy is as follows: when At that time, for those belonging to the microprogram set And with microprograms Each unit of evidence in the associated set of evidence The quality of its evidence has been updated to: in, This indicates the evidence quality score of the updated evidence unit. This represents the factor that reduces the quality of evidence.

[0125] The reduced credibility weight of source evidence nodes due to the decrease in evidence quality It needs to be recalculated.

[0126] when At the same time, the evidence quality score remains unchanged, and the execution log of the microprogram is recorded for use in the trust count statistics of the microprogram library.

[0127] Based on the updated evidence quality score of the evidence unit, the credibility weight of each source evidence node is updated. For details, please refer to step S152 above, which will not be repeated here.

[0128] S156. When the intent labels of any two source evidence nodes are different and the corresponding evidence sets have a non-empty intersection, the two source evidence nodes are determined to be conflicting nodes.

[0129] Specifically, the rule for determining conflicting nodes in the intent source lattice is: when there are two source lattice nodes... satisfy and At that time, the judgment and This constitutes a conflict pair.

[0130] S157. Based on the semantic blocks, intent tags, evidence sets, microprograms, trust weights, preset prompt templates, and preset large language model parameters of the conflicting nodes, multiple parallel arbitration agents are used to generate arbitration nodes for each conflicting node, which serve as the final nodes of the intent source evidence.

[0131] Specifically, a multi-agent arbitration process is initiated for each conflict pair, generating multiple parallel arbitration agents. A represents the set of parallel arbitration agents. Indicates arbitration representation. Each arbitration representative... It receives the semantic block, intent tag, evidence set, and microprogram of each conflict node, and independently generates a set of candidate source evidence nodes based on different preset prompt templates or preset large language model parameter configurations. The set of all candidate source evidence nodes output by the arbitration agents will be merged into the provisional arbitration set. and the set of ad hoc arbitrations Each candidate source certificate node in the algorithm calculates its trust weight, as detailed in step S152 above, which will not be repeated here. The arbitrator selects the candidate source certificate node with the highest trust weight as the arbitration node. : The arbitrator writes the determined arbitration node back to the intent source frame and replaces the conflicting node in the intent source frame. The arbitrator records the selection criteria and forms an arbitration log entry.

[0132] The embodiments described above in this application introduce microprograms into the intent recognition process and perform program-level symbolic verification on the microprograms, enabling each candidate intent to correspond to an executable and verifiable intermediate representation. This allows the document semantic understanding and intent recognition process to no longer rely solely on natural language inference results, but instead possess formal consistency verification capabilities based on document facts. By unifying the evidence set, evidence quality, and the initial credibility weight of candidate intents into the node posterior calculation process, the formation process of each document-level intent is completed based on explicit evidence accumulation rules, ensuring traceability of the intent recognition results and a clear path of influence of each piece of evidence on the final intent. By introducing multi-agent arbitration in conflict situations, the same semantic content can generate candidate results from multiple inference paths and be selected under unified arbitration rules. This enables a deterministic output when facing semantic ambiguity or multiple possible interpretations, avoiding inconsistencies caused by a single inference path.

[0133] In order to obtain the intent and traceable evidence of the document to be identified, in some specific embodiments of this application, for S16, based on the final node of the intent source evidence grid, the output of the document-level intent set and intent tag, evidence set, microprogram, and trust weight can be adopted as S161 to S163.

[0134] S161, based on the credibility weight of the final node of the intent source credential and a preset retention threshold, determine the final node of the intent source credential whose credibility weight is lower than the preset retention threshold.

[0135] Specifically, the preset retention threshold is If, after multiple arbitrations, the credibility weight of the final node of the intent source evidence is still lower than the preset retention threshold, the process will proceed to manual confirmation.

[0136] S162, the final node of the intent source evidence frame whose credibility weight is lower than the preset retention threshold, as well as the candidate intent label, evidence set, microprogram, and credibility weight corresponding to the final node of the intent source evidence frame, are manually confirmed to determine the candidate intent label, evidence set, microprogram, and credibility weight of the final node of the intent source evidence frame that have been manually confirmed.

[0137] Specifically, on the confirmation interface, the user can view the evidence set of the final node whose credibility weight is lower than the preset retention threshold, the program execution result set of the microprogram, and the arbitration log, and then confirm or correct the final node.

[0138] The results of manual confirmation are represented by Boolean values. Storage, in This indicates that the application has been approved. This indicates that manual corrections are made and revised versions of the microprogram or evidence adjustment instructions are generated.

[0139] After manual confirmation, it will be based on the Boolean identifier. Update the trust count of the corresponding microprogram and write the confirmed microprogram and its hash value into the microprogram library, thereby updating the statistical information in the relevant evidence quality score and credibility weight.

[0140] The microprogram hash value calculation uses a standard hash algorithm to perform hash operations on the microprogram text and represents it as a hexadecimal string.

[0141] S163, based on the final node of all intent source evidence, outputs a document-level intent set, intent tag, evidence set, microprogram, and trust weight.

[0142] Specifically, the final retention threshold is The credibility weight of the source node n in the intent source lattice is not less than the final retention threshold. The source evidence nodes are summarized into a document-level intent set. The source nodes in the document-level intent set include document-level intent tags. List of evidence (Each piece of evidence contains location information) and a microprogram identifier associated with the node. List, credible weight And referencing arbitration or manual confirmation logs.

[0143] The output document-level intent set, intent tags, evidence set, microprograms, and trust weights are saved in a structured data format for easy access by other systems or manual review. At the same time, the document-level intent set is output in a hierarchical structure, which is constructed based on the inclusion relationship or merging path between source evidence nodes in the intent source evidence grid, so as to facilitate subsequent processing of the document-level intent.

[0144] The embodiments described above in this application, by associating and updating the manual confirmation results with the microprogram library and evidence quality mapping, can continuously accumulate verified microprograms and evidence patterns in practical applications and use them in subsequent document processing flows, possessing continuous evolution capabilities. Moreover, this evolution process is entirely based on executed and confirmed technical results and does not rely on uncertain empirical rules. By providing intent tags, evidence chains, and microprogram identifiers while outputting document-level intent sets, the output results not only include the intent judgment itself but also all the technical basis supporting the judgment. This output format facilitates subsequent system integration, manual review, and audit record retention, and is suitable for application scenarios with high requirements for the interpretability and traceability of results.

[0145] In some specific embodiments of this application, a document semantic understanding and intent recognition method based on a large language model further includes the management and distillation of a microprogram library. The microprogram library stores verified or manually confirmed microprogram items. Each entry in the library includes: microprogram code, microprogram hash identifier, microprogram creation time, related intent tags, execution pass rate statistics, and manual confirmation history. Microprograms in the library are ranked according to execution pass rate or number of manual confirmations, serving as prompts or candidate microprogram retrieval criteria during subsequent local inference agent calls. The semantic extraction rules and sample pairs corresponding to verified microprograms can also be saved to a knowledge structure K to support retrieval enhancement and serve as training samples for a lightweight classifier. The record format of the knowledge structure K includes: microprogram hash, related intent tags, a set of typical evidence indexes, and their evidence quality values. The knowledge structure K can be used for subsequent retrieval enhancement or for distillation training of a lightweight intent classifier.

[0146] This application provides a document semantic understanding and intent recognition method based on a large language model. During execution, the microprogram execution engine performs boundary checks on the input text location information. If the location information of the evidence set exceeds the length of the text unit, an execution exception is thrown, and the corresponding evidence quality is adjusted. Set to zero to avoid the impact of outlier data on posterior calculations.

[0147] The intention source certificate merging operation performs deduplication on the microprogram set after the union calculation is completed, and the deduplication is based on the consistency determination of the microprogram hash value.

[0148] All key operations in this application, including candidate intent insertion, microprogram execution results, arbitration selection, and manual confirmation, are logged and persistently stored to ensure subsequent traceability.

[0149] The preferred features in the above embodiments can be used individually in any embodiment, or in any combination thereof, provided they do not conflict with each other. Furthermore, parts not described in detail in the embodiments can be implemented using existing technologies.

[0150] The following examples and comparative examples will be used to further illustrate this application in order to better understand the above-mentioned technical solutions. It should be understood that the following are only some examples and are not intended to limit this application.

[0151] To verify the effectiveness of the method proposed in this application, a comparative experiment was conducted with existing rule-based extraction methods and single-round large model-based reasoning methods.

[0152] Table 1 shows the test results on the contract review task dataset.

[0153] The test results on the contract review task dataset are as follows: Table 1 Where F1 represents the harmonic mean of precision and recall: The value of F1 is between 0 and 100%, and the closer it is to 100%, the better.

[0154] As shown in Table 1, the experimental results demonstrate that this application, by introducing structured parsing, multi-hop reasoning, and evidence verification mechanisms, can significantly improve the accuracy and stability of complex document understanding tasks.

[0155] Taking the review of power engineering contracts as an example, the specific execution process of semantic understanding and intent recognition using the method of this application is as follows: (1) Input a contract document, perform structured parsing on the document, extract text units and their structural attributes, and generate a set of text units; (2) Based on the reference relationship graph and semantic representation vector corresponding to the text unit set, the text units are semantically adaptively segmented to form multiple semantic blocks; (3) Using a local reasoning agent group to call a pre-set large language model to generate candidate intents for each semantic block, such as "payment terms recognition" and "breach of contract liability analysis", a set of candidate intents is generated; (4) Construct an intent source lattice based on the candidate intent set; (5) On the intent source frame, generate the corresponding microprogram based on the candidate intent and call the mapping function Ω to execute it; (5) During the execution of the mapping function, extract the evidence set from the text and calculate the evidence quality score; (6) Verify and rank the candidate intents based on the evidence quality score, microprogram execution results, and credibility weight; (7) Output the final review results, including key clauses, risk warnings and the location of corresponding evidence.

[0156] Through the above process, the document semantic understanding and intent recognition method based on a large language model provided in this application is adopted to achieve structured understanding and highly reliable reasoning of complex contract documents, ensure the consistency of intent recognition logic and the reliability of evidence, and improve the accuracy, credibility and interpretability of intent recognition results.

[0157] Figure 5 This is a flowchart illustrating a document semantic understanding and intent recognition system based on a large language model, according to an exemplary embodiment.

[0158] Reference Figure 5As shown, another embodiment of this application provides a document semantic understanding and intent recognition system 100 based on a large language model, including: a structured parsing module 110, a semantic adaptive segmentation module 120, a candidate intent generation module 130, an intent source verification module 140, a verification module 150, and an intent output module 160.

[0159] The structured parsing module 110 is used to acquire the document to be recognized and perform structured parsing to generate a set of text units; The semantic adaptive segmentation module 120 is used to determine the reference relationship graph and semantic representation vector based on the text unit set, and to perform semantic adaptive segmentation processing according to the preset semantic adaptive segmentation rules to determine the semantic block set. The candidate intent generation module 130 is used to use a local reasoning agent group to call a preset large language model to generate a candidate intent group for each semantic block in the semantic block set, and to determine the candidate intent group set. Each candidate intent group includes a candidate intent, an evidence set, a microprogram, and an initial credibility weight. The intent source frame construction module 140 is used to construct the intent source frame based on the set of candidate intent groups; The verification module 150 is used to perform quality assessment on the evidence set, perform program-level symbol verification on the microprogram, and initiate multi-proxy arbitration on conflicting nodes on the intent source evidence frame to determine the final node of the intent source evidence frame. The intent output module 160 is used to output a document-level intent set, intent tag, evidence set, microprogram, and trust weight based on the final node of the intent source evidence grid.

[0160] The embodiments described above in this application perform semantic adaptive segmentation according to preset semantic adaptive segmentation rules by using a reference relationship graph of text unit sets and semantic representation vectors to maintain the integrity of the logical structure within the document to be identified, effectively reducing information fragmentation problems. A local agent group is used to call a large language model to generate candidate intents, and a multi-agent arbitration mechanism is introduced for conflict nodes in case of conflict, enabling the same semantic content to generate candidate results from multiple inference paths, avoiding inconsistencies caused by a single inference path. By constructing an intent source evidence lattice, candidate intents from different semantic blocks are organized, merged, and conflict identified in a unified structure, avoiding unstable intent aggregation. By introducing microprograms in the intent recognition process and performing program-level symbolic verification on the microprograms, each candidate intent corresponds to an executable and verifiable intermediate representation, giving the document semantic understanding and intent recognition process a formal consistency verification capability based on document facts. Finally, the document, intent set, intent label, evidence set, microprogram, and trust weight are output, ensuring that the intent recognition results have interpretability and source traceability, improving the accuracy of intent recognition.

[0161] This application provides a document semantic understanding and intent recognition system based on a large language model, which can be deployed on cloud services or local computing platforms. The structured parsing module, semantic adaptive segmentation module, candidate intent generation module, intent source verification module, verification module, and intent output module communicate through a data interface. The data interface adopts a structured data exchange format, and the interface messages include: text information of text units, structural attributes, serialization results of semantic representation vectors, structured output of candidate intents, etc.

[0162] Microprograms can be executed using a microprogram execution engine, which provides an interface to accept microprograms and corresponding evidence indexes and return an execution result set Z. The arbitrator and the human verification interface exchange arbitration candidate nodes and their evidence chains via an interface. A microprogram library and a knowledge structure exposure retrieval interface allow the local reasoning agent to retrieve similar or historically passed microprogram templates when generating microprograms.

[0163] Regarding the embodiments of the above system, the specific ways in which each module performs operations have been described in detail in the embodiments of the method, and will not be elaborated here.

[0164] Based on the same technical concept, in some specific embodiments of this application, a terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it can be used to execute a document semantic understanding and intent recognition method based on a large language model.

[0165] Based on the same technical concept, in some specific embodiments of this application, a computer-readable storage medium is provided on which a computer program is stored, which, when executed by a processor, can be used to perform a document semantic understanding and intent recognition method based on a large language model.

[0166] Optionally, the memory is used to store programs; the memory may include volatile memory, such as random-access memory (RAM), such as static random-access memory (SRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.; the memory may also include non-volatile memory, such as flash memory. The memory is used to store computer programs (such as application programs and functional modules that implement the above methods), computer instructions, etc., and the aforementioned computer programs and computer instructions can be partitioned and stored in one or more memories. Furthermore, the aforementioned computer programs, computer instructions, data, etc., can be accessed by the processor.

[0167] The aforementioned computer programs, computer instructions, etc., can be stored in partitions within one or more memory locations. Furthermore, the aforementioned computer programs, computer instructions, data, etc., can be accessed by a processor.

[0168] A processor is used to execute a computer program stored in memory to implement the various steps of the methods involved in the above embodiments. For details, please refer to the relevant descriptions in the preceding method embodiments.

[0169] The processor and memory can be separate structures or integrated structures. When the processor and memory are separate structures, they can be coupled together via a bus.

[0170] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0171] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0172] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0173] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0174] The foregoing has described some specific embodiments of this application. It should be understood that this application is not limited to the specific embodiments described above, and those skilled in the art can make various modifications or variations within the scope of the claims, which do not affect the substantive content of this application. The above-described preferred features can be used in any combination without conflict.

Claims

1. A document semantic understanding and intent recognition method based on a large language model, characterized in that, include: The document to be identified is acquired and structured parsed to generate a set of text units; Based on the set of text units, a reference relationship graph and a semantic representation vector are determined, and semantic adaptive segmentation is performed according to a preset semantic adaptive segmentation rule to determine a set of semantic blocks; A local reasoning agent group is used to call a preset large language model to generate candidate intents for each semantic block in the semantic block set, and a candidate intent set is determined. Each candidate intent includes a candidate intent label, an evidence set, a microprogram, and an initial trust weight. Based on the candidate intent set, construct the intent source credential; On the intent source evidence frame, a quality assessment is performed on the evidence set, program-level symbol verification is performed on the microprogram, and multi-proxy arbitration is initiated for conflicting nodes to determine the final node of the intent source evidence frame; Based on the final node of the intent source evidence grid, output document-level intent set, intent tag, evidence set, microprogram, and trust weight.

2. The document semantic understanding and intent recognition method based on a large language model according to claim 1, characterized in that, The process of acquiring the document to be identified and performing structured parsing to generate a set of text units includes: Obtain the document to be recognized; Extract the text and layout information of the document to be identified; The text information and layout information of the document to be identified are subjected to sequential page analysis and basic field extraction operations to generate the text unit set. Each text unit in the text unit set includes text content and structural attributes.

3. The document semantic understanding and intent recognition method based on a large language model according to claim 2, characterized in that, The step involves determining a reference relationship graph and semantic representation vector based on the text unit set, and performing semantic adaptive segmentation processing according to a preset semantic adaptive segmentation rule to determine a semantic block set, including: Perform reference chain tracing on the set of text units to construct the reference relationship graph; The text content in the text unit set is encoded using a preset text encoding function to generate the semantic representation vector; Based on the reference relationship graph and the semantic representation vector, semantic blocks are divided at the boundaries of adjacent text units in the text unit set where the semantic change degree of adjacent text units is no greater than a preset semantic change degree threshold and there is no overlap in reference relationships, thereby determining the semantic block set.

4. The document semantic understanding and intent recognition method based on a large language model according to claim 1, characterized in that, The local reasoning agent group includes multiple agents running in parallel, and each semantic block is processed in parallel by multiple agents. A local inference agent group is used to invoke a preset large language model to generate candidate intents for each semantic block in the semantic block set, and a candidate intent set is determined, including: For each semantic block, the multiple parallel-running agents are used to input the preset large language model with the semantic block as the context to generate candidate intents corresponding to the semantic block.

5. The document semantic understanding and intent recognition method based on a large language model according to claim 1, characterized in that, The step of constructing an intent source credential based on the candidate intent set includes: Map each candidate intent in the candidate intent set to a source evidence node, and determine the source evidence node corresponding to each candidate intent. The source evidence node includes a candidate intent label, an evidence set, a microprogram, and an initial trust weight. Each candidate intent corresponds to a source evidence node that forms the intent source evidence grid. The source evidence nodes in the intent source evidence grid have a partial order relationship, and the intent source evidence grid supports the merging and cross-operation of the evidence set.

6. The document semantic understanding and intent recognition method based on a large language model according to claim 1, characterized in that, The process of performing quality assessment on the evidence set, performing program-level symbol verification on the microprogram, and initiating multi-proxy arbitration on conflict nodes to determine the final node of the intent source evidence set includes: On the intent source evidence grid, a preset evidence quality function is used to perform a quality assessment on each of the evidence sets to determine the evidence quality score corresponding to each of the evidence sets; The evidence quality score corresponding to each of the evidence sets and the initial credibility weight are weighted and summed to determine the credibility weight of each of the source evidence nodes. On the intent source certificate, for each of the microprogram callers, a program execution mapping is performed to determine the program execution result set; Perform consistency verification on the program execution result set and the document to be identified to determine the verification indication; According to the verification instructions, the evidence quality score corresponding to each evidence set is updated using a preset correction strategy, and the credibility weight of each source evidence node is updated to determine the updated credibility weight of the source evidence node. When any two source evidence nodes have different intent labels and their corresponding evidence sets have a non-empty intersection, the two source evidence nodes are determined to be conflicting nodes. Based on the semantic blocks, intent tags, evidence sets, microprograms, and trust weights of the conflicting nodes, as well as the preset prompt templates and model parameters of the preset large language model, multiple parallel arbitration agents are used to generate arbitration nodes for each conflicting node, which serve as the final nodes of the intent source evidence.

7. The document semantic understanding and intent recognition method based on a large language model according to claim 1, characterized in that, The final node based on the intent source evidence grid outputs a document-level intent set and intent tags, evidence set, microprogram, and trust weight, including: Based on the credibility weight of the final node of the intent source credential and a preset retention threshold, determine the final node of the intent source credential if the credibility weight of the final node is lower than the preset retention threshold. The final nodes of intent source evidence with a credibility weight lower than the preset retention threshold, as well as the candidate intent tags, evidence sets, microprograms, and credibility weights corresponding to the final nodes of intent source evidence, are manually verified to determine the candidate intent tags, evidence sets, microprograms, and credibility weights of the final nodes of intent source evidence that have been manually verified. Based on the final node of all the intent source evidence, output the document-level intent set, intent tag, evidence set, microprogram, and trust weight.

8. A document semantic understanding and intent recognition system based on a large language model, characterized in that, include: The structured parsing module is used to acquire the document to be recognized and perform structured parsing to generate a set of text units; The semantic adaptive segmentation module is used to determine the reference relationship graph and semantic representation vector based on the set of text units, and to perform semantic adaptive segmentation processing according to the preset semantic adaptive segmentation rules to determine the set of semantic blocks; The candidate intent generation module is used to use a local reasoning agent group to call a preset large language model to generate a candidate intent group for each semantic block in the semantic block set, and to determine the candidate intent group set. Each candidate intent group includes a candidate intent, an evidence set, a microprogram, and an initial trust weight. The intent source credential construction module is used to construct an intent source credential based on the set of candidate intent groups; The verification module is used to perform quality assessment on the evidence set, perform program-level symbol verification on the microprogram, and initiate multi-proxy arbitration on conflict nodes on the intent source evidence frame to determine the final node of the intent source evidence frame. The intent output module is used to output a document-level intent set, intent tag, evidence set, microprogram, and trust weight based on the final node of the intent source evidence grid.

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

10. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-7.