A table understanding method and system based on a large language model for the financial field
By employing a table comprehension method based on a large language model, the topological structure and logical relationships of financial tables are analyzed, and answers with reasoning processes and source annotations are generated. This overcomes the limitations of traditional table comprehension methods and enables deep understanding of complex financial tables and natural language question-and-answer interaction.
Patent Information
- Application Number
- CN202611105029.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-08-25
AI Technical Summary
Traditional table understanding methods struggle to parse the topological structure of complex financial tables, lack the ability to proactively verify interrelationships, and cannot support natural language question-and-answer interaction.
A method based on a large language model is adopted. The table content is recognized by OCR, the table topology and logical relationship are parsed by the first language model and stored in the hybrid index library, and the answer with reasoning process and source annotation is generated by the second language model, which supports natural language question answering.
It enables in-depth understanding and logical verification of complex financial tables, improving the accuracy of table understanding and the credibility of interaction, and supporting flexible Q&A for users.
Smart Images

Figure CN122633735A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and financial information technology, and in particular to a table understanding method and system based on a large language model for the financial field. Background Technology
[0002] With the deepening of digital transformation in financial services, financial statements, audit working papers, statistical reports, and other financial forms have become core data carriers for corporate business decisions and risk management. Traditional form understanding mainly relies on manual data entry and verification or rule-based template matching methods, which are insufficient for recognizing complex topological structures such as merged cells, multi-level headers, and cross-page tables, making it difficult to achieve deep semantic understanding and logical relationship discovery. In recent years, technologies based on large language models have been attempted to be applied to the automatic extraction of report content, but they are still limited to the structured transformation of surface data, lacking the ability to actively verify the internal cross-references of tables, and unable to support flexible question-and-answer interactions with users in a natural language manner. Summary of the Invention
[0003] In view of the above-mentioned shortcomings in the fields of natural language processing and financial information technology, this invention provides a table understanding method and system based on a large language model for the financial field. It can realize the topological structure parsing, cross-reference discovery and logical verification of complex financial tables, and support natural language question-and-answer interaction with reasoning process and source annotation.
[0004] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0005] A table comprehension method based on a large language model for the financial field includes:
[0006] Perform OCR recognition on financial spreadsheet documents to extract the text content of the tables;
[0007] The text content is input into the first language model to obtain the structured semantic representation of the table. The structured semantic representation includes the table topology, logical relationships between subjects, and verification results.
[0008] The structured semantic representation is stored in a hybrid index library, which supports semantic retrieval and structured querying;
[0009] Upon receiving user questions, relevant table content and logical relationships are retrieved based on the hybrid index library to form a context.
[0010] The context and the user question are input into a second language model to generate an answer with reasoning process and source annotation.
[0011] According to one aspect of the present invention, the extraction of text content from the table further includes: extracting the coordinate information of each cell in the table, and extracting the annotations and notes around the table.
[0012] According to one aspect of the present invention, the table topology includes: semantic boundaries for merged cells, a hierarchical tree structure for multi-level headers, and an associated index for cross-page tables.
[0013] According to one aspect of the present invention, the logical relationship between the subjects includes: a reconciliation relationship expressed in the form of a logical equation, wherein each reconciliation relationship is accompanied by the name of each subject participating in the equation and its position index in the table.
[0014] According to one aspect of the present invention, the verification result includes: the logical consistency verification status of each cross-reference relationship, and the numerical deviation and abnormal reason given for the cross-reference relationship that fails the verification.
[0015] According to one aspect of the present invention, storing the structured semantic representation in a hybrid index library specifically includes:
[0016] The structured semantic representation is segmented into subject nodes as the basic unit. The text fragment of each subject node includes the subject name, the hierarchical path, the corresponding value, the source metadata, and the verification result.
[0017] The text vectorization model is invoked to encode the text fragments of each subject node into semantic vectors, which are then stored in the vector database along with the original text fragments and source metadata.
[0018] The list of reconciliation relationships and the index of cross-page tables are stored separately in the form of structured data, and are associated with the vector database through the table name and subject node identifier.
[0019] According to one aspect of the present invention, the retrieval of relevant table content and logical relationships based on a hybrid index specifically includes:
[0020] The user's question text is encoded into a semantic vector, and an approximate nearest neighbor retrieval is performed in the vector database to recall several subject node text fragments that are most relevant to the question semantics.
[0021] Based on the source metadata of the recalled fragments, determine whether cross-table association reasoning or reconciliation verification is involved. If so, extract the relevant cross-table association indexes and reconciliation relationship list from the structured data storage.
[0022] The recalled subject node text fragments and the supplemented extracted structured information are organized together into a structured context.
[0023] According to one aspect of the present invention, the second language model generates an answer with reasoning process and source annotation, specifically including:
[0024] The semantics of user questions are understood, and the scenario type to which the question belongs is determined autonomously. The scenario types include single-table numerical query, single-table calculation reasoning, cross-table association reasoning, cross-relationship verification, and anomaly analysis and explanation.
[0025] Select the corresponding processing path based on the scenario type, and explicitly output the reasoning process in a step-by-step manner;
[0026] The final answer should include source information in the form of subject name, table name, and page number coordinates.
[0027] According to one aspect of the present invention, the first language model and the second language model are obtained through pre-training via the following steps:
[0028] Construct a dataset for structural analysis capabilities: Obtain financial table documents, extract table text and cell coordinate information after OCR recognition; generate an labeled dataset containing three types of tasks: table topology recognition, cross-reference discovery, and logical verification by combining manually labeled seed data with automatic labeling by auxiliary large language models.
[0029] A parameter-efficient fine-tuning method is adopted, using the first pre-trained language model as the base, and multi-task joint fine-tuning is performed using the structure parsing ability dataset to obtain the first language model;
[0030] Construct a question-answering interaction capability dataset: Based on the table-structured semantic representation output by the first language model, an annotated dataset covering five question-answering scenarios—single-table numerical query, single-table computational reasoning, cross-table association reasoning, cross-relationship verification, and anomaly analysis and explanation—is generated by combining artificial seed question-answer pairs with automatic generation by the large language model.
[0031] A parameter-efficient fine-tuning method is adopted, using the second pre-trained language model as a base, and fine-tuning is performed using the question-answering interaction capability dataset to obtain the second language model.
[0032] A table comprehension system based on a large language model for the financial field includes:
[0033] The extraction module performs OCR recognition on financial form documents to extract the text content of the forms;
[0034] The first language model module inputs the text content into the first language model to obtain the structured semantic representation of the table. The structured semantic representation includes the table topology, logical relationships between subjects, and verification results.
[0035] The database entry module stores the structured semantic representation into a hybrid index database, which supports semantic retrieval and structured querying.
[0036] The retrieval module receives user questions and retrieves relevant table content and logical relationships based on the hybrid index library to form a context.
[0037] The second language model module inputs the context and the user question into the second language model to generate an answer with reasoning process and source annotation.
[0038] The advantages of this invention are: it automatically parses complex topological structures such as merged cells, multi-level headers, and cross-page associations in financial tables, accurately discovers the interrelationships between accounts and completes logical consistency verification, and achieves the synergy of semantic retrieval and structured query based on a hybrid index library. Finally, it generates natural language answers with step-by-step reasoning processes and source annotations through a second language model, thereby significantly improving the depth and accuracy of understanding financial tables and realizing a reliable and traceable human-computer question-and-answer interaction. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a flowchart of a table comprehension method based on a large language model for the financial field, as described in this invention.
[0041] Figure 2 This is a flowchart illustrating the table understanding and interactive processing for the financial field as described in this invention;
[0042] Figure 3 This is a flowchart of a table comprehension system based on a large language model for the financial field, as described in this invention. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] Example 1
[0045] This embodiment provides a model building component in a table comprehension method based on a large language model for the financial field, used to construct a structural parsing model and a question-answering interaction model.
[0046] It should be noted that the "first language model" mentioned in this invention refers to the model obtained by fine-tuning a general open-source pre-trained language model based on a structural parsing capability dataset; the "second language model" refers to the model obtained by fine-tuning a general open-source pre-trained language model based on a question-answering interaction capability dataset. The fine-tuning process is detailed in steps P2 and P4 below.
[0047] The construction of the structural analysis model and the question-answering interaction model specifically includes: Step P1: Constructing the structural parsing capability dataset; The original corpus consists of various types of financial statement PDF documents, including financial statements, audit working papers, and statistical reports, covering table samples from different industries, with different formats and structural complexities. First, the original PDF documents are processed using OCR to obtain the text content and layout coordinates of each page. Then, based on the OCR results, table boundaries are located by detecting text blocks with row and column alignment features on the page, and the table's text content, cell coordinates, and page position information are extracted. In addition, the title text, footnotes, and notes surrounding the tables are extracted and retained as supplementary information for the table objects.
[0048] The construction of the labeled data is carried out in three steps. First, representative samples are extracted from the original corpus, and domain experts perform fine-grained annotations for three types of tasks (table topology recognition, cross-reference discovery, and logical verification) to form a seed dataset. Then, a large-parameter open-source Chinese language model is used as an auxiliary annotation tool, and the seed data is used as a few sample examples to automatically annotate the remaining large-scale corpus. For topology annotation, the table text and cell coordinate information are input into the auxiliary model, which outputs semantic boundary descriptions of merged cells, hierarchical relationships of multi-level table headers, and association indexes of cross-page tables. For tables distributed across pages, candidate cross-page pairs are first screened by rules such as column structure features and consistency of the number of numerical columns, and then the auxiliary model judges based on semantic continuity to merge the content scattered across multiple pages into a complete table object. For cross-reference annotation, the subject names and corresponding values in the table are input into the auxiliary model to identify and output the logical equation relationships between subjects. For logical verification and annotation, based on the generated cross-reference annotation results, the table values are perturbed programmatically to construct abnormal samples corresponding to normal samples, forming positive and negative sample pairs. Finally, the automatic annotation results are sampled and reviewed, focusing on correcting and supplementing boundary conditions such as inaccurate boundary definition of complex merged cells, omissions or errors in cross-reference relationships, to form the final annotated dataset.
[0049] Step P2: Training the structural analytical model; In this embodiment, the first pre-trained language model adopts the open-source Qwen-7B (Qwen-7B parameter version) base model. This model is a general-purpose pre-trained language model that can be obtained through public channels (such as open-source communities like ModelScope and HuggingFace), and has good semantic understanding and text generation capabilities, making it suitable as a base for financial table structure parsing tasks.
[0050] Those skilled in the art should understand that the selection of the Qwen-7B model described above is merely illustrative and does not constitute a limitation on the scope of protection of this invention. In actual implementation, it can be replaced with other open-source Chinese pre-trained language models with comparable parameter magnitudes (such as ChatGLM3-6B, Baichuan-7B, etc.) depending on resource conditions and task requirements. Such replacements do not affect the implementation of the core method of this invention and can still achieve the technical effects of this invention.
[0051] Using an open-source Chinese language model with 7B parameters as a base, the Low-Rank Adaptive Fine-Tuning (LoRA) method is employed to efficiently fine-tune the parameters of the base model. By introducing a low-rank decomposition matrix into the attention layer, only a small number of adaptation parameters are updated.
[0052] For the three types of tasks with different input and output characteristics, corresponding prompt word templates were designed. For the topology recognition task, the prompt words take table text and cell coordinates as input. The model is required to output merged cell boundaries, header hierarchy relationships, and cross-page indexes in a structured format, and provide typical examples of multi-level headers and merged cells. For the cross-reference discovery task, the prompt words take subject names and corresponding values as input. Common cross-reference relationships are listed as a reference. The model is required to output the quantitative relationships between subjects in the form of logical equations and provide the corresponding subject source location. For the logic verification task, the prompt words take table values and known cross-reference relationships as input. The model is required to verify the validity of each cross-reference relationship, and for invalid relationships, provide specific numerical deviations and possible reasons for the anomalies.
[0053] Each training sample contains two parts: the input part is constructed according to the prompt word template of the corresponding task, including task type identifiers, table text content, and cell coordinate information; the output part is standardized structured text containing the annotation results of the corresponding task. The training process employs a multi-task joint training strategy that mixes data from three types of tasks, explicitly distinguishing different task types through task identifiers in the prompt words. The training process uses a standard autoregressive language model as the training objective, measuring the difference between the model output and the annotation results using the cross-entropy loss function, and employing an early stopping strategy to monitor the total loss on the validation set to prevent overfitting. After training is complete, the first language model (structural analysis model) is obtained.
[0054] Step P3: Constructing the question-and-answer interaction capability dataset; The original corpus was further expanded based on the table extraction results of the first stage, supplemented by financial statement samples containing complex nested structures, cross-table relationships, and multi-period comparative data. Combining the topological structure information and correlation relationships output by the trained structural parsing model, a structured representation containing account hierarchy, numerical relationships, and cross-table indexes was constructed for each table.
[0055] The construction of labeled data follows a three-step process: manual seed data guidance, automatic generation by auxiliary models, and manual sampling review. In the manual seed data stage, domain experts designed representative question templates and corresponding answers for five question-answering scenarios (single-table numerical query, single-table computational reasoning, cross-table relational reasoning, cross-reference verification, and anomaly analysis and explanation). Each seed question-answer pair includes the question text, the standard answer text, and source annotations. In the automatic generation stage, a large-parameter open-source Chinese language model was used as the generation tool, with the seed dataset serving as a few-sample example. Diverse question-answer pairs were generated in batches for the structured representation of each table: the first step was question diversification generation, and the second step was answer generation and source annotation. For cross-table relational reasoning scenarios, structured representations of multiple related tables were provided simultaneously; for anomaly analysis and explanation scenarios, table data containing preset anomalies was provided based on the anomaly samples constructed in the first stage of logical verification annotation. In the manual review stage, the automatically generated results were systematically checked, unqualified samples were corrected or deleted, and manual supplementary annotations were performed for complex scenarios with insufficient coverage. The final dataset is divided into training, validation and test sets according to scene type, with the test set being completely manually labeled.
[0056] Step P4: Training the question-answering interaction model; The second pre-trained language model also uses the publicly available open-source Qwen-7B model as its base to maintain consistency with the structural parsing model in terms of base capabilities. This model shares the same source as the first pre-trained language model and can be obtained through public channels. It already has a good foundation in general semantic understanding capabilities and can be applied to financial form question-answering interaction tasks through subsequent domain fine-tuning.
[0057] After reading this specification, those skilled in the art will be able to perform the training process of this step based on the disclosed model weights and LoRA fine-tuning framework, combined with the training data and prompt word templates provided in this application.
[0058] Based on an open-source Chinese language model with 7B parameters, this study employs a low-rank adaptive fine-tuning method (LoRA) and appropriately increases the rank parameter of the low-rank decomposition matrix. In terms of prompt word template design, the input includes a structured tabular representation, an optional list of logical relationships, and the user's question text; the output comprises two levels: the reasoning process and the final answer. The reasoning process requires the model to present numerical location, calculation process, or logical verification chain in a progressively unfolding manner, while the final answer includes source annotations. The training data presents five types of scenario questions in mixed natural language, prompting the model to internalize scenario judgment capabilities into its semantic understanding. The training process uses a standard autoregressive language model as the training objective, drives model learning with a cross-entropy loss function, and employs an early stopping strategy to monitor validation set loss. After training, a second language model (question-answering interaction model) is obtained, serving as the core inference engine for the natural language question-answering interaction module.
[0059] Example 2
[0060] like Figure 1 As shown, this embodiment provides a table understanding and interaction part of a table understanding method based on a large language model for the financial field. This method uses the structural parsing model and question-answering interaction model trained in Embodiment 1 to perform end-to-end intelligent understanding and interaction processing on the financial statement document input by the user.
[0061] S1: Perform OCR recognition on financial spreadsheet documents to extract the text content of the spreadsheets;
[0062] The system preprocesses user-input financial statement PDF documents. First, it renders each page of the PDF document, converting each page into a high-resolution image. Then, it uses an OCR engine to recognize the page images, obtaining the text content of each text block and its coordinates within the page. Based on this, it locates table boundaries by detecting text block regions with row and column alignment features, extracts the text content and coordinates of each cell within the table, and records the page number and its position on the page, forming a collection of table objects on a page-by-page basis. For tables spanning multiple pages, candidate cross-page pairs are filtered based on column structure features and consistency of the number of numerical columns, and marked as cross-page table candidates to be associated. Furthermore, the title text, footnotes, and remarks surrounding each table are extracted and retained as additional semantic information for the table objects.
[0063] S2: Input the text content into the first language model to obtain the structured semantic representation of the table. The structured semantic representation includes the table topology, logical relationships between subjects, and verification results.
[0064] The system organizes the text content and cell coordinate information of each table according to the preset prompt word template and then inputs them into the structural parsing model (first language model).
[0065] First, the table topology structure is parsed: For merged cells, the model precisely defines the semantic boundaries of each merged cell and the data range it covers based on the spatial coverage of cell coordinates and the semantic belonging of the text content; for multi-level headers, the model establishes a hierarchical tree structure between headers at each level based on the indentation level, coordinate position, and semantic hierarchy of the header text, clarifying the subordinate relationship between parent and child headers; for cross-page tables, the system inputs the previously marked cross-page candidate pages into the structure parsing model. The model judges the table content of adjacent pages based on semantic continuity, and after confirming the cross-page relationship, merges the table content scattered across multiple pages into a complete table object and updates the cross-page association index. The results of the above three types of topology structure parsing are uniformly appended to the corresponding table object, forming a complete topology structure representation including merged cell boundaries, header hierarchy tree, and cross-page association index.
[0066] Then, semantic parsing and logical relationship discovery are performed: the system organizes the table's topological structure representation, subject names, and corresponding values according to a preset prompt word template and inputs them into the structural parsing model to perform the cross-reference relationship discovery task. The model identifies and analyzes the quantitative relationships between the subjects in the table and outputs a list of cross-reference relationships expressed in the form of logical equations. Each cross-reference relationship includes the names of the subjects participating in the equation and their position index in the table. Based on the cross-reference relationship discovery, the system further inputs the previously extracted table peripheral notes and remarks into the structural parsing model. The model determines the main subject of the table corresponding to each note, establishes a semantic association between the note information and the subject node, and incorporates the supplementary information into the attributes of the corresponding subject node.
[0067] Finally, logical verification and anomaly analysis are performed: The system organizes the table values and the list of reciprocal relationships according to a preset prompt word template and inputs them into the structural parsing model to perform logical verification tasks. The model verifies each reciprocal relationship to see if it holds true under the current table values, and marks the verification status (pass or fail) and the reason for the fail on each reciprocal relationship node, forming an internal logical verification annotation for a single table. Based on single-table verification, the system further performs cross-table cross-verification of values from different tables that reflect the same indicator, and also marks the verification status and the reason for the fail for cross-table reciprocal relationship nodes with data correlation contradictions and inconsistent amounts. In addition, the system performs anomaly detection on the values of each subject in the table, and marks the anomaly marker and the reason for the fail for subject nodes that deviate significantly from historical data or similar indicators. The above verification and detection results are attached to the corresponding table objects in the form of structured annotations and output together with the structured semantic representation of the table.
[0068] Thus, a structured semantic representation containing the table topology, logical relationships between subjects, and verification results is obtained.
[0069] S3: Store the structured semantic representation into a hybrid index library, which supports semantic retrieval and structured query;
[0070] During the knowledge storage phase, the system segments the structured semantic representation of each table according to subject nodes as the basic unit. Each subject node's text fragment consists of the subject name, its hierarchical path, corresponding value, table name and page number coordinates, semantically related notes, and logical verification annotations. The system calls a text vectorization model to encode each subject node's text fragment into a fixed-dimensional semantic vector, which, along with the original text fragment and source metadata (including table name, page number, subject hierarchical path, etc.), is stored in the vector database, forming a semantic knowledge index for the current document. The cross-reference list and cross-table association index, due to their high degree of structure and need to support exact matching, are stored separately as structured data. They are associated with the vector index through table names and subject node identifiers, forming a complete hybrid knowledge storage system together with the vector index.
[0071] S4: Receive user questions, retrieve relevant table content and logical relationships based on the hybrid index library, and form a context;
[0072] When a user initiates a natural language question-answering request, the system first encodes the user's question text into a semantic vector using the same text vectorization model. Then, it performs an approximate nearest neighbor search in the vector database, recalling several subject node text fragments most relevant to the question based on semantic similarity. Building upon the vector search, the system further determines whether the question involves cross-table association reasoning or cross-reference verification based on the source metadata of the recalled fragments. If so, it extracts relevant cross-table association indexes and cross-reference lists from structured storage, organizing them together with the recalled subject node text fragments into a structured context. Finally, the system organizes the structured context and the user's question text according to the prompt word template preset by the question-answering interaction module and inputs it into the natural language question-answering interaction module.
[0073] S5: Input the context and the user question into the second language model to generate an answer with reasoning process and source annotation;
[0074] The system organizes the structured context and user question text according to a preset prompt word template and inputs them into the question-and-answer interaction model (second language model). The model first understands the semantics of the user question, autonomously determines the scenario type to which the question belongs, and then selects the appropriate processing path based on the scenario type: for single-table numerical query questions, it locates the target subject node from the context and directly extracts the corresponding value; for single-table calculation and reasoning questions, it performs arithmetic calculations or ratio analysis based on the location of relevant subject nodes, gradually unfolding the calculation process; for cross-table association and reasoning questions, it performs association analysis and deduction based on the cross-table association index in the context, integrating the relevant subject values from multiple tables; for cross-reference verification questions, it gradually verifies whether the target cross-reference relationship is valid based on the cross-reference relationship list in the context, and provides a complete verification process and conclusion; for anomaly analysis and explanation questions, it identifies the anomaly markers of relevant subject nodes based on the logical verification labels in the context, analyzes the causes of the anomalies, and provides explanatory answers. The above reasoning process is explicitly output in a step-by-step manner, and the final answer is given as a concise and standardized text conclusion, with source annotations marked in the form of subject name, table name and page number coordinates, to ensure that each key value and conclusion of the answer has a clear location basis in the original report.
[0075] This completes the table comprehension and question-answering interaction based on a large language model for the financial sector.
[0076] Example 3
[0077] This embodiment uses a corporate financial report PDF document as an example to illustrate in detail the specific implementation process of the method of the present invention in the online application stage.
[0078] I. Document Preprocessing and Table Detection
[0079] The system receives a PDF document of a company's financial report as input. This document contains three reports: a balance sheet, an income statement, and a cash flow statement. The balance sheet, due to its large number of items, spans two pages. All reports have varying degrees of merged cells and multi-level header structures, and some items are accompanied by explanatory notes.
[0080] The system first renders the input PDF document page by page, converting each page into an image with a resolution of 300 DPI. Then, it uses an OCR engine to recognize the page images. Taking the first page of a balance sheet as an example, the OCR recognition result contains several text blocks. Each text block records the text content and its page coordinates, in the following format:
[0081] {"text": "Current Assets", "bbox": [42, 138, 112, 156]}
[0082] {"text": "Cash and Cash Equivalents", "bbox": [52, 162, 122, 178]}
[0083] {"text": "Ending Balance", "bbox": [280, 138, 368, 156]}
[0084] {"text": "Beginning Balance", "bbox": [420, 138, 508, 156]}
[0085] Based on the OCR recognition results, the system locates table boundaries by detecting text blocks with row and column alignment features on the page, extracts the text content and coordinate information of each cell within the table, and records the page number and position of the table on the page. In addition, the system extracts the title text (such as "Balance Sheet" and "Unit: RMB Yuan") and explanatory notes around each report, preserving them as additional semantic information of the table objects.
[0086] II. Table Topology Analysis
[0087] The system organizes the text content and cell coordinates of each table according to a preset prompt template and inputs them into the structural analysis model to perform a topological structure recognition task. Taking the balance sheet as an example, the organization of the prompt input is as follows:
[0088] Task type: Topology recognition
[0089] Table content and cell coordinates:
[0090] {"text": "Current Assets", "bbox": [42, 138, 112, 156]} ...
[0092] Please identify the semantic boundaries of merged cells, multi-level header hierarchy, and cross-page related indexes, and output them in a structured format.
[0093] For merged cells, the model outputs the semantic boundary of each merged cell and the data range it covers, based on the spatial coverage of the cell coordinates and the semantic attribution of the text content. Taking the "Current Assets" item in the balance sheet as an example, the semantic boundary description of the merged cell output by the model is as follows:
[0094] {
[0095] "merged_cell": "current assets",
[0096] "semantic_scope": ["Cash and cash equivalents", "Notes receivable and accounts receivable",
[0097] [Prepayments, Other Receivables, Inventory, Other Current Assets]
[0098] "bbox_range": [42, 138, 508, 320]
[0099] }
[0100] For multi-level headers, the model establishes a hierarchical tree structure between header levels based on the coordinate positions and semantic relationships of the header text, and outputs it in nested JSON format as follows:
[0101] {
[0102] "table_name": "Balance Sheet",
[0103] "header_tree": [
[0104] {
[0105] "label": "Assets",
[0106] "level": 1,
[0107] "children": [
[0108] {
[0109] "label": "Current Assets",
[0110] "level": 2,
[0111] "children": [
[0112] {"label": "Cash and Cash Equivalents", "level": 3, "children": []},
[0113] {"label": "Notes Receivable and Accounts Receivable", "level": 3, "children":[]} ]
[0115] },
[0116] {
[0117] "label": "Non-current assets",
[0118] "level": 2,
[0119] "children": [
[0120] {"label": "Long-term equity investment", "level": 3, "children": []} ]
[0122] } ]
[0124] } ]
[0126] }
[0127] For tables spanning multiple pages, the system inputs the candidate pages marked by the first module into the structure parsing model. The model then judges the table content of adjacent pages based on semantic continuity. For example, if the model confirms a cross-page relationship between page 2 and page 3 of the balance sheet, the output cross-page relationship index is as follows:
[0128] {
[0129] "table_name": "Balance Sheet",
[0130] "cross_page": true,
[0131] "page_sequence": [2, 3],
[0132] "split_position": "Non-current assets",
[0133] "continuation_marker": "Liabilities and Owner's Equity"
[0134] }
[0135] The system attaches the merged cell boundaries, header hierarchy tree, and cross-page association indexes to the corresponding table objects to form a complete topological structure representation, which is then output to the subsequent semantic parsing module.
[0136] III. Semantic parsing and discovery of logical relationships
[0137] The system organizes the table's topological structure, along with the subject names and corresponding values, according to a preset prompt word template before inputting it into the structural analysis model to perform the cross-reference discovery task. The organization of the prompt word input is as follows:
[0138] Task type: Discovery of correlation relationships
[0139] Table Name: Balance Sheet
[0140] List of subjects and their corresponding values:
[0141] {"subject": "Cash and Cash Equivalents", "Ending Balance": 1250.00, "Beginning Balance": 1020.00}
[0142] {"subject": "Notes Receivable and Accounts Receivable", "Ending Balance": 830.00, "Beginning Balance": 760.00}
[0143] {"subject": "Inventory", "Ending Balance": 540.00, "Beginning Balance": 490.00}
[0144] {"subject": "Total Current Assets", "Ending Balance": 3120.00, "Beginning Balance": 2710.00}
[0145] {"subject": "Total Assets", "Ending Balance": 5860.00, "Beginning Balance": 5230.00}
[0146] {"subject": "Total Liabilities", "Ending Balance": 3410.00, "Beginning Balance": 3080.00}
[0147] {"subject": "Total Owner's Equity", "Ending Balance": 2400.00, "Beginning Balance": 2150.00} ...
[0149] Please identify the interrelationships between subjects, output them as logical equations, and indicate the source location of each subject.
[0150] The model identifies and analyzes the quantitative relationships between the various items in the table, and outputs a list of cross-references as follows: [
[0152] {
[0153] "relation_id": 1,
[0154] "expression": "Total current assets = Cash and cash equivalents + Notes receivable and accounts receivable + Inventory + ...",
[0155] "relation_type": "summation",
[0156] "subjects": [
[0157] {"name": "Total Current Assets", "row_index": 8, "col_index": 1},
[0158] {"name": "Cash and Cash Equivalents", "row_index": 2, "col_index": 1},
[0159] {"name": "Notes Receivable and Accounts Receivable", "row_index": 3, "col_index": 1} ]
[0161] },
[0162] {
[0163] "relation_id": 2,
[0164] "expression": "Total Assets = Total Liabilities + Total Owner's Equity",
[0165] "relation_type": "identical equilibrium",
[0166] "subjects": [
[0167] {"name": "Total Assets", "row_index": 20, "col_index": 1},
[0168] {"name": "Total Liabilities", "row_index": 32, "col_index": 1},
[0169] {"name": "Total Owner's Equity", "row_index": 40, "col_index": 1} ]
[0171] } ]
[0173] Based on the discovery of reconciliation relationships, the system further inputs the notes extracted in the first module into the structural analysis model. The model then determines the corresponding main table account for each note, establishing a semantic relationship between the note information and the account node. Taking the "Notes Receivable and Accounts Receivable" account in the balance sheet as an example, the model outputs the following note association results:
[0174] {
[0175] "subject": "Notes receivable and accounts receivable",
[0176] "row_index": 3,
[0177] "note_reference": "Appendix 5 (III)",
[0178] "note_content": "For details on accounts receivable aging analysis and bad debt provision, please refer to Note 5 (III)."
[0179] }
[0180] The above list of reconciliation relationships and the associated notes are uniformly appended to the corresponding table objects to form a structured semantic knowledge representation, which is then output to the subsequent logic verification and anomaly analysis modules.
[0181] IV. Logic Verification and Anomaly Analysis
[0182] The system organizes the table values and the list of reconciliation relationships according to a preset prompt word template, then inputs them into the structural analysis model to perform a logic verification task. The organization of the prompt word input is as follows:
[0183] Task type: Logic verification
[0184] Table Name: Balance Sheet
[0185] List of reconciliation relationships:
[0186] Relationship 1: Total Current Assets = Cash and Cash Equivalents + Notes Receivable and Accounts Receivable + Inventory + ...
[0187] Relationship 2: Total Assets = Total Liabilities + Total Owner's Equity
[0188] Current table values:
[0189] {"subject": "Cash and Cash Equivalents", "Ending Balance": 1250.00}
[0190] {"subject": "Notes Receivable and Accounts Receivable", "Ending Balance": 830.00}
[0191] {"subject": "Inventory", "Ending Balance": 540.00}
[0192] {"subject": "Total Current Assets", "Ending Balance": 3120.00}
[0193] {"subject": "Total Assets", "Ending Balance": 5860.00}
[0194] {"subject": "Total Liabilities", "Ending Balance": 3410.00}
[0195] {"subject": "Total Owner's Equity", "Ending Balance": 2400.00}
[0196] Please verify the validity of each cross-reference relationship, and provide the numerical deviation and possible reasons for any invalid relationships.
[0197] The model outputs the following logic verification results: [
[0199] {
[0200] "relation_id": 1,
[0201] "expression": "Total current assets = Cash and cash equivalents + Notes receivable and accounts receivable + Inventory + ...",
[0202] "status": "Passed",
[0203] "deviation": 0.00
[0204] },
[0205] {
[0206] "relation_id": 2,
[0207] "expression": "Total Assets = Total Liabilities + Total Owner's Equity",
[0208] "status": "Abnormal",
[0209] "actual_left": 5860.00,
[0210] "actual_right": 5810.00,
[0211] "deviation": 50.00,
[0212] "anomaly_reason": "The sum of total liabilities and total equity is RMB 58.1 million, which differs from the total assets of RMB 58.6 million by RMB 500,000. This imbalance in the financial statements may be due to omissions in accounts or errors in data entry."
[0213] } ]
[0215] The above verification results are appended to the corresponding table objects in the form of structured annotations and output to the subsequent knowledge storage and semantic retrieval module.
[0216] V. Knowledge Storage and Semantic Retrieval
[0217] The system persistently stores the table-structured semantic representation output by the preceding modules, constructs a semantic knowledge index for the current document, and performs semantic retrieval when the user initiates a question-and-answer request, providing accurate contextual input for the question-and-answer interaction module.
[0218] During the knowledge storage phase, the system segments the structured semantic representation of each table according to the subject node as the basic unit. The text fragment of each subject node consists of the subject name, its hierarchical path, corresponding value, the table name and page number coordinates, semantically related notes, and logical validation annotations. Taking the "Notes Receivable and Accounts Receivable" subject node in the balance sheet as an example, its text fragment storage record is as follows:
[0219] {
[0220] "subject": "Notes receivable and accounts receivable",
[0221] "hierarchy_path": "Assets > Current Assets > Notes Receivable and Accounts Receivable",
[0222] "values": {
[0223] Ending balance: 830.00
[0224] Beginning Balance: 760.00
[0225] },
[0226] "source": {
[0227] "table_name": "Balance Sheet",
[0228] "page": 2,
[0229] "row_index": 3,
[0230] "bbox": [52, 180, 508, 196]
[0231] },
[0232] "note_reference": "Appendix 5 (III)",
[0233] "note_content": "For details on accounts receivable aging analysis and bad debt provision, please refer to Note 5 (III)".
[0234] "validation_status": "Passed"
[0235] }
[0236] The aforementioned storage structure ensures that each subject node text fragment can independently express complete semantic information even without the context of the complete table, supporting accurate retrieval in subsequent search stages. The system calls a text vectorization model to encode each subject node text fragment into a fixed-dimensional semantic vector, which, along with the original text fragment and source metadata, is stored in the vector database, forming a semantic knowledge index for the current document. The cross-reference list and cross-table association index, due to their high degree of structure and need to support exact matching, are stored separately as structured data. They are associated with the vector index through table names and subject node identifiers, forming a complete hybrid knowledge storage system together with the vector index.
[0237] During the semantic retrieval phase, when a user initiates a natural language question-and-answer request, the system first encodes the user's question text into a semantic vector using the same text vectorization model. It then performs an approximate nearest neighbor search in the vector database, recalling several subject node text fragments most relevant to the question based on semantic similarity. Building upon vector retrieval, the system further determines whether the question involves cross-table association reasoning or cross-reference verification based on the source metadata of the recalled fragments. If such scenarios are involved, the system supplements the relevant cross-table association indexes and cross-reference list from structured storage, organizing them together with the recalled subject node text fragments into a structured context. Finally, the system organizes the structured context and the user's question text according to the prompt word template preset by the question-and-answer interaction module, inputting it into the natural language question-and-answer interaction module to perform end-to-end reasoning, ensuring that the question-and-answer interaction module can obtain sufficient and accurate table semantic information when generating the answer.
[0238] VI. Natural Language Question Answering Interaction
[0239] The system takes the structured context organized by the semantic retrieval module and the user's question text, organizes them according to the preset prompt word template, and inputs them into the question-and-answer interaction model. It then performs end-to-end reasoning, generates a natural language answer with source annotations, and completes the question-and-answer interaction with the user.
[0240] For single-table numerical query questions: If the user's question is "What is the ending balance of cash and cash equivalents for this period?", the system will organize the relevant account node text fragments retrieved by the semantic retrieval module with the user's question text according to a preset prompt word template and then input it into the question-and-answer interaction model. The organization of the prompt words is as follows:
[0241] Table structured context:
[0242] [Account Node 1] Account: Cash and Cash Equivalents | Hierarchical Path: Assets > Current Assets > Cash and Cash Equivalents |
[0243] Ending balance: RMB 12,500,000 | Beginning balance: RMB 10,200,000 |
[0244] Source: Balance Sheet, Page 2, Line 2 | Verification Status: Passed
[0245] [Subject Node 2] ...
[0246] User question: What is the ending balance of cash and cash equivalents for this period?
[0247] Based on the information in the table above, please first develop the reasoning process step by step, and then give the conclusion.
[0248] The conclusion should include source information in the form of subject name, table name, and page number coordinates.
[0249] After receiving the above prompt words, the model outputs the following:
[0250] Reasoning process:
[0251] Step 1: Locate the Cash and Cash Equivalents item on page 2, line 2 of the balance sheet.
[0252] Step 2: Withdraw the current period (ending) balance: RMB 12,500,000.
[0253] Answer:
[0254] The ending balance of cash and cash equivalents for this period was RMB 12.5 million.
[0255] Source: Balance Sheet, Page 2, Account Path: Assets > Current Assets > Cash and Cash Equivalents (Line 2)
[0256] Single-table calculation and reasoning problem: The user question is "How much has the cash balance increased this period compared to the previous period, and what is the increase?" The prompt word organization is the same as the previous example, and the model output is as follows:
[0257] Reasoning process:
[0258] Step 1: Locate the Cash and Cash Equivalents item on page 2, line 2 of the balance sheet.
[0259] Step 2: Withdraw the current period (ending balance) of RMB 12,500,000 and the previous period (beginning balance) of RMB 10,200,000.
[0260] Step 3: Calculate the change amount = 1250.00 - 1020.00 = 230.00 million yuan
[0261] Step 4: Calculate the change range = 230.00 ÷ 1020.00 × 100% ≈ 22.55%
[0262] Answer:
[0263] The ending balance of cash and cash equivalents for this period was RMB 12.5 million, an increase of RMB 2.3 million compared to the beginning balance of RMB 10.2 million in the previous period.
[0264] The increase was approximately 22.55%.
[0265] Source: Balance Sheet, Page 2, Account Path: Assets > Current Assets > Cash and Cash Equivalents (Line 2)
[0266] Cross-table relational reasoning questions: The user's question is "What is the return on net assets for this period?" This question requires calculation based on data from both the balance sheet and the income statement. During the semantic retrieval phase, the system expands the recall scope and supplements the extraction of cross-table relational indexes. The organization of the prompt words is as follows:
[0267] Table structured context:
[0268] [Account Node 1] Account: Net Profit | Hierarchical Path: Profit and Loss Statement > Net Profit |
[0269] Amount for this period: 4,800,000 yuan |
[0270] Source: Profit and Loss Statement, Page 5, Line 18 | Validation Status: Passed
[0271] [Subject Node 2] Subject: Total Owner's Equity | Hierarchical Path: Owner's Equity > Total Owner's Equity |
[0272] Ending balance: RMB 24,000,000 | Beginning balance: RMB 21,500,000 |
[0273] Source: Balance Sheet, Page 3, Line 40 | Verification Status: Passed
[0274] Cross-table join indexes:
[0275] Income Statement. Net Profit → Balance Sheet. Total Equity (Relationship Type: Revenue and Equity)
[0276] [Subject Node 3] ...
[0277] User question: What is the return on net assets for this period?
[0278] Based on the information in the table above and the cross-table join indexes, please first proceed with the reasoning process step by step, and then give the conclusion.
[0279] The conclusion should include source information in the form of subject name, table name, and page number coordinates.
[0280] The model output is as follows:
[0281] Reasoning process:
[0282] Step 1: Locate the net profit for the current period on line 18 of page 5 of the profit statement: 4.8 million yuan.
[0283] Step 2: Locate the total equity balance at the end of the period on line 40 of page 3 of the balance sheet: RMB 24,000,000.
[0284] Beginning balance: RMB 21,500,000
[0285] Step 3: Calculate the average owner's equity = (2400.00 + 2150.00) ÷ 2 = 2275.00 million yuan
[0286] Step 4: Calculate Return on Equity = 480.00 ÷ 2275.00 × 100% ≈ 21.10%
[0287] Answer:
[0288] The return on net assets for the period was approximately 21.10%, with net profit of RMB 4.8 million and average shareholders' equity of RMB 22.75 million.
[0289] (Beginning balance: RMB 21.5 million; Ending balance: RMB 24 million).
[0290] Source: Profit and Loss Statement, Page 5, Net Profit (Line 18);
[0291] Balance Sheet, Page 3, Total Equity (Line 40)
[0292] For questions involving verification of reconciliation relationships: If the user's question is "Is the balance sheet balanced? If so, please explain why.", the system, during the semantic search phase, supplements the balance sheet with a list of reconciliation relationships from structured storage. The organization of the prompts is as follows:
[0293] Table structured context:
[0294] [Account Node 1] Account: Operating Revenue | Hierarchical Path: Profit and Loss Statement > Operating Revenue |
[0295] Current period amount: 32 million yuan | Previous period amount: 28.5 million yuan
[0296] Source: Profit and Loss Statement, Page 5, Line 2 | Validation Status: Passed
[0297] [Account Node 2] Account: Cost of Goods Sold | Hierarchical Path: Profit and Loss Statement > Cost of Goods Sold |
[0298] Current period amount: 21,000,000 yuan | Previous period amount: 18,800,000 yuan |
[0299] Source: Profit and Loss Statement, Page 5, Line 3 | Validation Status: Passed
[0300] [Account Node 3] Account: Taxes and Surcharges | Hierarchical Path: Profit and Loss Statement > Taxes and Surcharges |
[0301] Current period amount: 850,000 yuan | Previous period amount: 720,000 yuan |
[0302] Source: Profit and Loss Statement, Page 5, Line 4 | Validation Status: Passed
[0303] [Account Node 4] Account: Selling Expenses | Hierarchical Path: Profit and Loss Statement > Selling Expenses |
[0304] Current period amount: 2.1 million yuan | Previous period amount: 1.85 million yuan |
[0305] Source: Profit and Loss Statement, Page 5, Line 5 | Validation Status: Passed
[0306] [Subject Node 5] Subject: Administrative Expenses | Hierarchical Path: Profit and Loss Statement > Administrative Expenses |
[0307] Current period amount: 1,250,000 yuan | Previous period amount: 1,080,000 yuan |
[0308] Source: Profit and Loss Statement, Page 5, Line 6 | Validation Status: Passed
[0309] [Account Node 6] Account: Operating Profit | Hierarchical Path: Income Statement > Operating Profit |
[0310] Current period amount: 6.8 million yuan | Previous period amount: 6.05 million yuan |
[0311] Source: Profit and Loss Statement, Page 5, Line 7 | Validation Status: Passed
[0312] List of reconciliation relationships:
[0313] Relationship 3: Operating Profit = Operating Revenue - Operating Costs - Taxes and Surcharges - Selling Expenses - Administrative Expenses
[0314] (Type: Step-by-step derivation)
[0315] User question: Is the calculation of operating profit in the profit statement correct?
[0316] Based on the information and logical relationships in the table above, please first proceed with the reasoning process step by step, and then draw a conclusion.
[0317] The conclusion should include source information in the form of subject name, table name, and page number coordinates.
[0318] The model output is as follows:
[0319] Reasoning process:
[0320] Step 1: Identify the cross-reference relationships to be verified:
[0321] Operating Profit = Operating Revenue - Operating Costs - Taxes and Surcharges - Selling Expenses - Administrative Expenses
[0322] Step 2: Locate the current period revenue (RMB 32,000,000) on line 2 of page 5 of the profit statement.
[0323] Step 3: Locate the current period's operating costs (RMB 21,000,000) on line 3 of page 5 of the profit and loss statement.
[0324] Step 4: Locate the "Taxes and Surcharges" amount for the current period on line 4 of page 5 of the profit statement: RMB 850,000.
[0325] Step 5: Locate the current period amount of sales expenses in line 5 on page 5 of the profit and loss statement: RMB 2.1 million.
[0326] Step 6: Locate the current period amount of administrative expenses in line 6 of page 5 of the profit statement: RMB 1,250,000.
[0327] Step 7: Calculate the right side of the equation: 3200.00 - 2100.00 - 85.00 - 210.00 - 125.00 = 680.00 million yuan.
[0328] Step 8: Locate the operating profit for the current period (6.8 million yuan) on line 7 of page 5 of the profit statement.
[0329] Step 9: Compare both sides of the equation: 680.00 = 680.00, the correlation is valid.
[0330] Answer:
[0331] The operating profit in the profit statement is calculated correctly. Operating revenue (32 million yuan) minus operating costs (21 million yuan)
[0332] After deducting taxes and surcharges (RMB 850,000), selling expenses (RMB 2,100,000), and administrative expenses (RMB 1,250,000),
[0333] The calculated operating profit was 6.8 million yuan, which is consistent with the value shown in the financial statements, and the reconciliation relationship was verified.
[0334] Source: Profit and Loss Statement, Page 5; Revenue (Line 2), Cost of Goods Sold (Line 3)
[0335] Taxes and surcharges (line 4), selling expenses (line 5), administrative expenses (line 6), operating profit (line 7)
[0336] For anomaly analysis and explanation questions: If a user's question is "Are there any anomalies in the inventory data for this period?", the system will retrieve the text fragment of the item node and its semantically related annotations during the semantic retrieval phase. The organization of the prompt words is as follows:
[0337] Table structured context:
[0338] [Account Node 1] Account: Inventory |
[0339] Hierarchical path: Assets > Current Assets > Inventory |
[0340] Ending balance: RMB 5.4 million | Beginning balance: RMB 4.9 million |
[0341] Source: Balance Sheet, Page 2, Line 5 | Verification Status: Passed
[0342] [Account Node 2] Account: Total Current Assets |
[0343] Hierarchical path: Assets > Current Assets > Total Current Assets |
[0344] Ending balance: RMB 31.2 million | Beginning balance: RMB 27.1 million |
[0345] Source: Balance Sheet, Page 2, Line 8 | Verification Status: Passed
[0346] List of reconciliation relationships:
[0347] Relationship 1: Total Current Assets = Cash and Cash Equivalents + Notes Receivable and Accounts Receivable + Inventory + ...
[0348] (Type: Summation)
[0349] Logical verification annotation:
[0350] Inventory account reconciliation verification: Passed. Inventory values have been correctly included in the total sum of current assets.
[0351] User question: Are there any anomalies in the inventory data for this period?
[0352] Based on the information in the table above and the logical verification labels, please first proceed with the reasoning process step by step, and then give the conclusion.
[0353] The conclusion should include source information in the form of subject name, table name, and page number coordinates.
[0354] The model output is as follows:
[0355] Reasoning process:
[0356] Step 1: Locate the inventory item on line 5 of page 2 of the balance sheet.
[0357] The ending balance was RMB 5.4 million, the beginning balance was RMB 4.9 million, and the verification status was passed.
[0358] Step 2: Calculate the change in inventory over the period = 540.00 - 490.00 = 50.00 million yuan.
[0359] The fluctuation range = 50.00 ÷ 490.00 × 100% ≈ 10.20%, which is within the normal range.
[0360] Step 3: Verify the reconciliation results; the inventory value has been correctly included in the total calculation of current assets.
[0361] Verification of reconciliation relationship passed
[0362] Step 4: Based on the above verification results, no abnormalities were found in the inventory item values.
[0363] Answer:
[0364] No abnormalities were found in the inventory data this period. The ending balance was RMB 5.4 million, an increase of RMB 500,000 from the beginning balance of RMB 4.9 million.
[0365] The change was approximately 10.20%, which is normal.
[0366] The reconciliation verification has been passed, and the inventory value has been correctly included in the total calculation of current assets.
[0367] Source: Balance Sheet, Page 2, Account Path: Assets > Current Assets > Inventory (Line 5)
[0368] Example 4
[0369] like Figure 3 As shown, a table comprehension system based on a large language model for the financial field includes:
[0370] The extraction module M1 performs OCR recognition on financial form documents to extract the text content of the forms;
[0371] The first language model module M2 inputs the text content into the first language model to obtain the structured semantic representation of the table. The structured semantic representation includes the table topology, logical relationships between subjects, and verification results.
[0372] The storage module M3 stores the structured semantic representation into a hybrid index library, which supports semantic retrieval and structured querying.
[0373] The retrieval module M4 receives user questions and retrieves relevant table content and logical relationships based on the hybrid index library to form a context.
[0374] The second language model module M5 inputs the context and the user question into the second language model to generate an answer with reasoning process and source annotation.
[0375] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A table comprehension method based on a large language model for the financial field, characterized in that, include: Perform OCR recognition on financial spreadsheet documents to extract the text content of the tables; The text content is input into the first language model to obtain the structured semantic representation of the table. The structured semantic representation includes the table topology, logical relationships between subjects, and verification results. The structured semantic representation is stored in a hybrid index library, which supports semantic retrieval and structured querying; Upon receiving user questions, relevant table content and logical relationships are retrieved based on the hybrid index library to form a context. The context and the user question are input into a second language model to generate an answer with reasoning process and source annotation.
2. The table comprehension method based on a large language model for the financial field according to claim 1, characterized in that, The extraction of text content from the table also includes: extracting the coordinate information of each cell in the table, and extracting the annotations and notes around the table.
3. The table comprehension method based on a large language model for the financial field according to claim 1, characterized in that, The table topology includes: semantic boundaries for merged cells, a hierarchical tree structure for multi-level headers, and associated indexes for cross-page tables.
4. The table comprehension method based on a large language model for the financial field according to claim 1, characterized in that, The logical relationships between the subjects include: cross-correlation relationships expressed in the form of logical equations, with each cross-correlation relationship accompanied by the names of the subjects participating in the equation and their position index in the table.
5. The table comprehension method based on a large language model for the financial field according to claim 1, characterized in that, The verification results include: the logical consistency verification status of each cross-reference relationship, and the numerical deviation and abnormal reasons given for cross-reference relationships that fail verification.
6. The table comprehension method based on a large language model for the financial field according to claim 1, characterized in that, The process of storing structured semantic representations into a hybrid index library specifically includes: The structured semantic representation is segmented into subject nodes as the basic unit. The text fragment of each subject node includes the subject name, the hierarchical path, the corresponding value, the source metadata, and the verification result. The text vectorization model is invoked to encode the text fragments of each subject node into semantic vectors, which are then stored in the vector database along with the original text fragments and source metadata. The list of reconciliation relationships and the index of cross-page tables are stored separately in the form of structured data, and are associated with the vector database through the table name and subject node identifier.
7. The table comprehension method based on a large language model for the financial field according to claim 1, characterized in that, The specific details of recalling relevant table content and logical relationships based on the hybrid index database include: The user's question text is encoded into a semantic vector, and an approximate nearest neighbor retrieval is performed in the vector database to recall several subject node text fragments that are most relevant to the question semantics. Based on the source metadata of the recalled fragments, determine whether cross-table association reasoning or reconciliation verification is involved. If so, extract the relevant cross-table association indexes and reconciliation relationship list from the structured data storage. The recalled subject node text fragments and the supplemented extracted structured information are organized together into a structured context.
8. The table comprehension method based on a large language model for the financial field according to claim 1, characterized in that, The second language model generates answers with reasoning processes and source annotations, specifically including: The semantics of user questions are understood, and the scenario type to which the question belongs is determined autonomously. The scenario types include single-table numerical query, single-table calculation reasoning, cross-table association reasoning, cross-relationship verification, and anomaly analysis and explanation. Select the corresponding processing path based on the scenario type, and explicitly output the reasoning process in a step-by-step manner; The final answer should include source information in the form of subject name, table name, and page number coordinates.
9. The table comprehension method based on a large language model for the financial field according to claim 1, characterized in that, The first language model and the second language model are obtained through pre-training via the following steps: Construct a dataset for structural analysis capabilities: Obtain financial table documents, extract table text and cell coordinate information after OCR recognition; generate an labeled dataset containing three types of tasks: table topology recognition, cross-reference discovery, and logical verification by combining manually labeled seed data with automatic labeling by auxiliary large language models. A parameter-efficient fine-tuning method is adopted, using the first pre-trained language model as the base, and multi-task joint fine-tuning is performed using the structure parsing ability dataset to obtain the first language model; Construct a question-answering interaction capability dataset: Based on the table-structured semantic representation output by the first language model, an annotated dataset covering five question-answering scenarios—single-table numerical query, single-table computational reasoning, cross-table association reasoning, cross-relationship verification, and anomaly analysis and explanation—is generated by combining artificial seed question-answer pairs with automatic generation by the large language model. A parameter-efficient fine-tuning method is adopted, using the second pre-trained language model as a base, and fine-tuning is performed using the question-answering interaction capability dataset to obtain the second language model.
10. A table comprehension system based on a large language model for the financial field, characterized in that, The table comprehension method based on a large language model for the financial field, as described in any one of claims 1 to 9, includes: The extraction module performs OCR recognition on financial form documents to extract the text content of the forms; The first language model module inputs the text content into the first language model to obtain the structured semantic representation of the table. The structured semantic representation includes the table topology, logical relationships between subjects, and verification results. The database entry module stores the structured semantic representation into a hybrid index database, which supports semantic retrieval and structured querying. The retrieval module receives user questions and retrieves relevant table content and logical relationships based on the hybrid index library to form a context. The second language model module inputs the context and the user question into the second language model to generate an answer with reasoning process and source annotation.