Table text joint extraction method, device and equipment and storage medium
Patent Information
- Application Number
- CN202610780197.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-10-13
AI Technical Summary
但是若仅简单地将引用表格的文本段落提供给大语言模型,无法有效整合表格结构化信息与正文语义信息,难以覆盖全部相关证据,导致抽取的实验关系元组存在槽位缺失,完整性不足
[0016]本申请实施例提出的表格文本联合抽取方法、装置、设备和存储介质,通过从待处理科研文档中获取对应的文本内容和每一张表格的表格内容,对表格内容中每个单元格进行类型分类,得到对应的类型化单元格,根据类型化单元格得到类型化表格,将类型化表格输入大语言模型进行锚点关系抽取,得到实验分数相关的锚点关系元组,利用命名实体识别模型对文本内容进行提及识别,得到每个实体对应的至少一个提及,对提及进行共指消解构建紧凑实体池,当锚点关系元组中包括空值槽位时,根据空值槽位的类型在紧凑实体池中进行检索得到候选实体列表,将表格内容和候选实体列表输入大语言模型进行实体填充,得到实验关系元组。本申请实施例以表格中单元格类型分类为基础,抽取的锚点关系元组覆盖全部的实验分数,再通过文本的实体池对空值槽位进行补全,整合表格结构化信息与正文语义信息,确保实验关系元组要素齐全,解决抽取不完整的问题。同时基于命名实体识别和共指消解构建紧凑实体池,以此过滤冗余信息、聚焦实验相关实体,检索高相关的候选实体输入大语言模型,减少噪声输入,提升抽取准确性。
Smart Images

Figure CN122903610A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of document processing technology, and in particular to a method, apparatus, device, and storage medium for joint extraction of tabular text. Background Technology
[0002] Experimental information in research documents forms the foundation for tasks such as scientific knowledge graph construction, document understanding, and research information retrieval. Experimental information typically includes multiple entity elements such as tasks, datasets, methods, evaluation metrics, and experimental scores. These elements are often scattered throughout the document, not limited to a single sentence or paragraph. Therefore, extracting experimental information requires document-level relation extraction methods to identify complex relationships between multiple entities across sentences, paragraphs, and even the entire document.
[0003] Relation extraction methods based on large language models can leverage the general reasoning capabilities of these models to adapt to the complex and varied table structures in scientific documents. However, simply providing the large language model with text paragraphs referencing tables fails to effectively integrate the structured information of the tables with the semantic information of the main text, making it difficult to cover all relevant evidence. This results in missing slots and insufficient completeness in the extracted experimental relation tuples. On the other hand, inputting the entire text content of the document into the large language model leads to inaccurate extraction results due to excessive noise. Summary of the Invention
[0004] The main objective of this application is to propose a method, apparatus, device, and storage medium for joint extraction of tabular text, thereby improving the completeness and accuracy of the extraction results of tabular text in scientific documents.
[0005] To achieve the above objectives, a first aspect of this application proposes a method for joint extraction of tabular text, comprising: The text content and table content of each table are obtained from the research document to be processed. Each cell in the table content is classified by type to obtain the corresponding typed cell. A typed table is obtained based on the typed cell. The typed table is input into a large language model to extract anchor relations, resulting in at least one anchor relation tuple related to the experimental score. The text content is referenced using a named entity recognition model to obtain at least one reference corresponding to each entity. The references are then coreference resolved to construct a compact entity pool. When the anchor relation tuple includes null slots, a candidate entity list is obtained by searching the compact entity pool according to the type of the null slots. The table content and the candidate entity list are then input into the large language model for entity filling to obtain the experimental relation tuple.
[0006] In some embodiments, classifying each cell by type to obtain a corresponding typed cell includes: Extract the text features, context features, and structural features of each cell from the table content. The text features include the actual content of the cell. The context features include a preset number of sentences related to the cell retrieved from the text content. The structural features include the row and column position of the cell and the actual content of all other cells in the same row and column. The text features, context features, and structural features are input into a cell classification model for type labeling to obtain the cell type of each cell. The cell type is then added to the cell to obtain the typed cell.
[0007] In some embodiments, the cell type includes at least an experimental score type, and the step of inputting the typed table into a large language model for anchor relation extraction to obtain anchor relation tuples related to experimental scores includes: The typed table is serialized into a structured string, which includes a table title field, a type field for each cell, and a cell content field. The structured string is input into the large language model and relation extraction is performed according to the first prompting strategy. All cells labeled as experimental score type are traversed, and a corresponding anchor relation tuple is generated for each experimental score type cell. The anchor relation tuple includes multiple slots, and the slot type includes one or more of the following: task slot, dataset slot, method slot, evaluation metric slot, and experimental score slot.
[0008] In some embodiments, the first prompting strategy includes: The large language model uses the table title field as an auxiliary semantic context to understand the overall meaning of the table, and does not directly extract the entity string from the table title field to fill the corresponding slot; The large language model uses the type field of each cell as a priori hint, and verifies and corrects the cell type in combination with the corresponding table content; For each slot in the anchor relation tuple, the large language model only extracts entity strings that match the slot type from the content fields of each cell and fills them. If the associated content of the corresponding slot cannot be obtained from the content fields of each cell, the slot is filled with an empty value.
[0009] In some embodiments, the mention includes at least an entity type, a mention string, and a mention context, and the coreference resolution of the mention to construct a compact entity pool includes: Each mention is encoded using a mention encoder to obtain a corresponding mention embedding representation. The mention encoder is pre-trained using supervised contrastive learning. In the vector space, mention embedding representations belonging to the same entity are close to each other, while mention embedding representations belonging to different entities are far apart. Hierarchical clustering is performed on all the mention strings corresponding to the same entity type to obtain the entity cluster corresponding to each entity. For each entity cluster, the mention string with the highest frequency is selected as the normalized name of the entity. All mention contexts in the entity cluster are aggregated to obtain the aggregated context of the entity. The compact entity pool is formed based on each of the entities, each entity including the corresponding normalized name, entity type, and aggregation context.
[0010] In some embodiments, the step of retrieving a candidate entity list from the compact entity pool based on the type of the empty slot includes: For each anchor relation tuple containing empty slots, at least one query statement is constructed using the slot content already filled in the anchor relation tuple and the table title of the corresponding table, and the query statement corresponds to the slot type of the empty slot. For each query statement, the similarity between the query statement and the entity of the corresponding entity type in the compact entity pool is calculated, and multiple entities are selected based on the similarity to obtain the candidate entity list.
[0011] In some embodiments, selecting multiple entities based on the similarity to obtain the candidate entity list includes: Multiple entities are selected as initial entities based on the similarity; The search frequency and reciprocal ranking confidence of the initial entity in all search results in the table content are statistically analyzed. A frequency score is obtained based on the search frequency, and a ranking score is obtained based on the reciprocal ranking confidence. The frequency score and the ranking score are weighted to obtain a mixed correlation, and the initial entity containing the mixed correlation is selected as a candidate entity.
[0012] In some embodiments, the step of inputting the table content and the candidate entity list into the large language model for entity filling to obtain experimental relation tuples includes: For each empty slot in the anchor relation tuple, query completion input data is obtained based on the table content, the candidate entity, and the mixed relevance of the candidate entity; The query completion input data is input into the large language model, and the large language model is used to perform inference according to the second prompting strategy. The second prompting strategy includes: interpreting the semantics of the table based on the table title, identifying the correspondence between the candidate entities and the table content, and when the empty slot cannot be determined solely by the table content, selecting the entity with the highest type matching and mixed relevance from the candidate entity list to fill the empty slot, thereby obtaining the experimental relation tuple.
[0013] To achieve the above objectives, a second aspect of this application provides a tabular text joint extraction apparatus, comprising: Cell processing module: used to obtain the corresponding text content and table content of each table from the research document to be processed, classify the type of each cell in the table content, and obtain the corresponding typed cell; Anchor Relation Tuple Extraction Module: This module is used to input the typed cells into a large language model to extract anchor relations and obtain anchor relation tuples related to experimental scores. Entity pool construction module: used to use the named entity recognition model to identify mentions in the text content, obtain at least one mention corresponding to each entity, and perform coreference resolution on the mentions to construct a compact entity pool; Experimental relation tuple extraction module: When the anchor relation tuple includes null slots, it retrieves a candidate entity list from the compact entity pool according to the type of the null slots, inputs the table content and the candidate entity list into the large language model for entity filling, and obtains the experimental relation tuple.
[0014] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.
[0015] To achieve the above objectives, a fourth aspect of the present application provides a storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0016] The table text joint extraction method, apparatus, device, and storage medium proposed in this application obtain the corresponding text content and table content of each table from the research document to be processed. Each cell in the table content is classified by type to obtain corresponding typed cells. Typed tables are obtained based on the typed cells. The typed tables are input into a large language model for anchor relation extraction, resulting in anchor relation tuples related to experimental scores. A named entity recognition model is used to identify mentions in the text content, obtaining at least one mention corresponding to each entity. Coreference resolution is performed on the mentions to construct a compact entity pool. When the anchor relation tuple includes empty slots, a candidate entity list is obtained by searching the compact entity pool according to the type of the empty slot. The table content and the candidate entity list are input into the large language model for entity filling, resulting in experimental relation tuples. This application embodiment is based on the cell type classification in the table. The extracted anchor relation tuples cover all experimental scores. Empty slots are then filled through the text entity pool, integrating the table's structured information and the text's semantic information to ensure that the experimental relation tuples have complete elements, thus solving the problem of incomplete extraction. Meanwhile, a compact entity pool is constructed based on named entity recognition and coreference resolution to filter redundant information, focus on experimentally relevant entities, retrieve highly relevant candidate entities to input into the large language model, reduce noise input, and improve extraction accuracy. Attached Figure Description
[0017] Figure 1 This is a flowchart of the table text extraction method provided in the embodiments of this application.
[0018] Figure 2 This is a flowchart provided in this application embodiment for classifying each cell by type to obtain the corresponding typed cell.
[0019] Figure 3 This is a flowchart provided in an embodiment of the present application, in which a typed table is input into a large language model to extract anchor relationships and obtain anchor relationship tuples related to experimental scores.
[0020] Figure 4 This is a flowchart of constructing a compact entity pool by performing coreference resolution on mentions, as provided in an embodiment of this application.
[0021] Figure 5 This is a flowchart provided in an embodiment of the present application for obtaining a candidate entity list by retrieving from a compact entity pool based on the type of empty slots.
[0022] Figure 6 This is a flowchart of a process for selecting multiple entities based on similarity to obtain a candidate entity list, provided in an embodiment of this application.
[0023] Figure 7This is a flowchart provided in an embodiment of the present application, in which table content and a candidate entity list are input into a large language model for entity filling to obtain experimental relation tuples.
[0024] Figure 8 This is an overall schematic diagram of the table text extraction method provided in the embodiments of this application.
[0025] Figure 9 This is a schematic diagram of the first prompt strategy for the anchor point relationship extraction process provided in the embodiments of this application.
[0026] Figure 10 This is a schematic diagram of the second prompting strategy provided in the completion relation extraction process of this application embodiment.
[0027] Figure 11 This is a structural block diagram of a table text extraction device provided in another embodiment of this application.
[0028] Figure 12 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0030] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0032] In scientific research documents, experimental information is a crucial foundation for tasks such as scientific knowledge graph construction, document understanding, and scientific information retrieval. Experimental information typically includes multiple entity elements such as tasks, datasets, methods, evaluation metrics, and experimental scores, usually represented by N-gram relation tuples. These elements are often scattered throughout the document, not limited to a single sentence or paragraph. Therefore, extracting experimental information requires document-level relation extraction methods to identify complex relationships between multiple entities across sentences, paragraphs, and even the entire document. However, common document-level relation extraction methods rely heavily on textual evidence, making them difficult to apply to extracting experimental information from scientific documents. Firstly, the main body of a paper typically does not fully describe all experimental results, making it difficult to extract all experimental relationships without omission based solely on text. Secondly, when entity elements are scattered between tables and the main text, the lack of sufficient elements in the text makes it difficult to extract complete relation tuples.
[0033] Therefore, the technical solutions in related technologies can be divided into three categories: text-based relation extraction methods, table-based relation extraction methods, and large-model-based relation extraction methods. Text-based relation extraction methods are common in scientific document relation extraction. These methods mainly extract relationships between entities from the main text of the paper and can handle cross-sentence or cross-paragraph relationships to a certain extent. However, they are limited by their inability to process table content and cannot extract complete experimental relation tuples without omissions. Table-based relation extraction methods can utilize the row and column structure and cell content of tables for relation extraction. These methods mainly extract relation tuples from tables based on rules or fine-tuned pre-trained language models. However, this type of method usually has the following limitations: on the one hand, rule-based or fine-tuned pre-trained models are difficult to adapt to the complex and diverse table structures in scientific papers, resulting in inaccurate extraction results; on the other hand, most methods only process isolated tables, lacking effective utilization of information from the main text of the paper, resulting in incomplete extraction results. Relation extraction based on large language models utilizes the general reasoning capabilities of large models to adapt to the complex and varied table structures in scientific documents. However, simply providing the text paragraphs referencing the table to the large language model fails to effectively integrate the structured information of the table with the semantic information of the main text, making it difficult to cover all relevant evidence. This results in missing slots and insufficient completeness in the extracted experimental relation tuples. On the other hand, inputting the entire text content of the document into the large language model leads to inaccurate extraction results due to excessive noise.
[0034] Based on this, embodiments of this application provide a method, apparatus, device, and storage medium for joint extraction of tabular text. Based on the classification of cell types in the table, the extracted anchor relation tuples cover all experimental scores. Then, empty slots are filled using a text entity pool, integrating the structured information of the table with the semantic information of the main text to ensure that all experimental relation tuple elements are complete, thus solving the problem of incomplete extraction. Simultaneously, a compact entity pool is constructed based on named entity recognition and coreference resolution to filter redundant information, focus on experimentally relevant entities, retrieve highly relevant candidate entities, input them into a large language model, reduce noise input, and improve extraction accuracy.
[0035] This application provides a method, apparatus, device, and storage medium for joint extraction of table text, which are specifically described through the following embodiments. First, the method for joint extraction of table text in this application is described.
[0036] The table text extraction method provided in this application relates to the field of document processing technology. This method can be applied to a terminal, a server, or a computer program running on either the terminal or the server. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run, such as a client that supports table text extraction, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin. The terminal communicates with the server via a network. This table text extraction method can be executed by the terminal or the server, or by the terminal and the server working together.
[0037] In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, or smartwatch, etc. The server can be a standalone server, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms; it can also be a service node in a blockchain system, where the service nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). The terminal and server can connect via Bluetooth, Universal Serial Bus (USB), or a network, etc., and this embodiment does not impose any limitations.
[0038] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0039] The following describes the method for joint extraction of tabular text in the embodiments of this application.
[0040] Figure 1 This is an optional flowchart of the tabular text joint extraction method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps 110 to 140. It is also understood that this embodiment... Figure 1 The order of steps 110 to 140 is not specifically limited. The order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0041] Step 110: Obtain the corresponding text content and table content of each table from the research document to be processed, classify each cell in the table content by type to obtain the corresponding typed cell, and obtain the typed table based on the typed cell.
[0042] In one embodiment, a document parsing method is used to parse the research document D to be processed, thereby obtaining text content and the table content of at least one table, wherein the text content... This is the set of all text fragments in the research document D to be processed, while the table content... For all tables in research document D to be processed A set. For Each table in The set of its cells is denoted as , This indicates the first element in table T. Line number The cells in the column.
[0043] It is understood that each table needs to be extracted separately according to the table text extraction method in this embodiment. The following uses a table as an example. The following example illustrates the specific extraction process.
[0044] Given a research document to be processed In this case, the goal of the tabular text joint extraction method in this embodiment is to extract text from the research documents to be processed. Extract the complete set of 5-tuple relational tuples. Each relation tuple It contains five semantic entities: Task, Dataset, Method, Metric, and Score. Their meanings are as follows: Task represents the target problem to be solved; Dataset represents the evaluation dataset used; Method represents the algorithm or system employed; Metric represents the evaluation criterion used; and Score represents the experimental results presented in numerical form. The relation tuple set contains two constraints: the first constraint is the research document to be processed. All experimental results are in the relation tuple set Each element has a corresponding tuple, with no omissions. The second constraint is: the set of relational tuples. Each relation tuple All five components are correct and complete, with no missing slots.
[0045] In one embodiment, the cells are first categorized. (Refer to...) Figure 2 , Figure 2This application provides a flowchart for classifying each cell by type to obtain the corresponding typed cell, which specifically includes the following steps: Step 210: Extract the text features, context features, and structural features of each cell from the table content.
[0046] In one embodiment, for each cell in the corresponding table content, corresponding text features, context features, and structural features are extracted. Text features include the actual content of the cell, directly reflecting the basic semantic information contained within it. Context features include a preset number of sentences retrieved from the text content that are relevant to the cell, aiming to avoid ambiguity in the actual content of the cell and supplement missing contextual semantics. For example, the BM25 algorithm can be used to retrieve the sentences most relevant to the actual content of the cell from the text content; the preset number can be set to 3-5 sentences. Structural features include the cell's row and column position, and the actual content of all other cells in the same row and column, used to capture the structural positional relationship and semantic association of the cells in the table, helping to distinguish cells with different semantic roles. Therefore, this embodiment extracts these three types of features for each cell, thereby comprehensively describing the semantic and structural attributes of the cell from different dimensions, facilitating accurate subsequent classification of cell types.
[0047] Step 220: Input the text features, context features, and structural features into the cell classification model for type labeling to obtain the cell type of each cell. Add cell types to the cells to obtain typed cells.
[0048] In one embodiment, the cell classification model is a Transformer-based multi-classification model, consisting of an encoder comprised of a pre-trained language model and a multi-classifier, trained using the cross-entropy loss function. The encoder processes text features... Contextual features and structural features Encoded as a uniform dimension of cell embedding representation The cell embedding representation incorporates the cell's textual semantics, contextual information, and structural information. Then, a multi-classifier predicts the cell type based on the cell embedding representation.
[0049] The cell types here include Specifically, these are: task type, dataset type, method type, evaluation metric type, experiment score type, and other types. As you can understand, task type indicates that the cell is related to the target problem being solved; dataset type indicates that the cell is related to the evaluation dataset used; method type indicates that the cell is related to the algorithm or system used; evaluation metric type indicates that the cell is related to the evaluation criteria used; experiment score type indicates that the cell presents the experimental results in numerical form; and other types indicate that the actual content of the cell does not belong to the semantic entities related to the experiment, such as explanatory text or notes in a table.
[0050] Since almost all experimental scores in the paper are presented numerically in tables, this embodiment uses tables. Each numerical experimental score cell serves as an anchor point, accurately locating the position of all experimental results to ensure no experimental relation is missed, thus guaranteeing the first constraint in the relation tuple set. This is achieved by analyzing the text content... Information such as text features and context features related to the table is obtained to ensure the fulfillment of the second constraint. That is, in this embodiment, each table is used as an anchor point for the cell of the experiment score type Score to generate an experiment relation tuple corresponding to each cell of the experiment score type Score.
[0051] In one embodiment, since there may be merged cells across rows or columns in the table, this embodiment addresses this issue by splitting the merged cells into several smallest units. For the split cells, they share the same cell text features and context features, but because they have been split, they have different structural features.
[0052] Next, the predicted cell types are added to the corresponding cells to form typed cells. These typed cells contain the table title, the actual content of the cell, its row and column position, and its corresponding cell type. Then, a corresponding typed table is obtained based on the typed cells. The typed table is similar to the initial table, except that each cell is a typed cell containing its cell type.
[0053] This embodiment, through the above-described cell type classification process, can accurately identify the semantic role of each cell in the table, providing clear auxiliary information for the subsequent extraction of anchor relation tuples by the large language model, reducing the reasoning burden of the large language model, and improving the accuracy and efficiency of extraction.
[0054] Step 120: Input the typed table into the large language model to extract anchor relations, and obtain at least one anchor relation tuple related to the experimental score.
[0055] In one embodiment, reference is made to Figure 3 , Figure 3 This application provides a flowchart for extracting anchor relation tuples related to experimental scores by inputting a typed table into a large language model. The flowchart includes the following steps: Step 310: Serialize the typed table into a structured string.
[0056] In one embodiment, the typed table is serialized to obtain a structured string, wherein the structured string is implemented in JSON format, which can completely preserve the hierarchical structure and semantic information of the table, enabling the large language model to accurately parse the table content.
[0057] Specifically, the structured string includes a table title field, a type field for each cell, and a cell content field. The table title field stores the complete table title, aiding the large language model in understanding the overall theme of the table. The type field stores the semantic type label corresponding to the cell type obtained from cell classification, and the cell content field stores the actual content of the cell. These three types of fields constitute the input information for the large language model, used for relation extraction to obtain the corresponding structured information.
[0058] Step 320: Input the structured string into the large language model and extract relations according to the first prompting strategy. Traverse all cells labeled as experimental score type and generate corresponding anchor relation tuples for each experimental score type cell.
[0059] In one embodiment, the anchor relation tuple is a preliminary experimental relation representation constructed for cells of the experimental score type. It contains multiple slots, and the slot type corresponds to the cell type, including task slots, dataset slots, method slots, evaluation metric slots, and experimental score slots.
[0060] In one embodiment, during the relation extraction process, input prompts for the large language model are obtained according to a first prompting strategy. The first prompting strategy is a set of instructions designed for the experimental relation extraction task, which can constrain the relation reasoning process of the large language model from dimensions such as table understanding, type usage, and entity filling, thereby reducing the illusion generated by the large model.
[0061] The first hint strategy includes three constraints: (1) The big language model uses the table title field as an auxiliary semantic context to understand the overall meaning of the table and does not directly extract entity strings from the table title field to fill the corresponding slots; (2) The big language model uses the type field of each cell as a priori hint and verifies and corrects the cell type in combination with the corresponding table content; (3) For each slot of the anchor relation tuple, the big language model only extracts entity strings that match the slot type from the content field of each cell to fill the slot. If the content field of each cell cannot obtain the associated content of the corresponding slot, the slot is filled with an empty value.
[0062] Among them, constraint (1) is used to constrain the large language model to use the table title field as an auxiliary semantic context to understand the overall meaning of the table, but it cannot directly extract entity strings from the table title field to fill the corresponding slots, so as to avoid the introduction of incorrect entity boundaries and irrelevant entities by the free text in the title. Constraint (2) is used to constrain the large language model to use the type field of each cell as a priori hint, and to verify and correct the cell type in combination with the corresponding table content, so as to avoid inaccurate extraction results caused by type labeling errors that may occur in the cell classification model. Constraint (3) is used to constrain the large language model to extract entity strings that match the slot type from the content field of each cell only for each slot of the anchor relation tuple during the relation extraction process. The extracted entity strings must be strictly consistent with the cell content. If the associated content of the corresponding slot cannot be obtained from the content field of each cell, the slot will be filled with an empty value. The empty slot will be the target of the second stage relation completion.
[0063] Therefore, the large language model follows the rule that one cell for each experimental score type corresponds to one anchor relation tuple. It iterates through all cells labeled as experimental score types in the table and generates the corresponding anchor relation tuples accordingly. This ensures that all experimental results are covered, achieving complete extraction of experimental relations. Furthermore, through the constraint of the first-cue strategy, the large language model can fully utilize the structured information of the table while avoiding the generation of non-existent entities, incorrect entity boundaries, or inaccurate relation parameters, thus improving the accuracy of anchor relation tuple extraction. It is important to note that the anchor relation tuples here include task slots, dataset slots, method slots, evaluation metric slots, and experimental score slots. Except for the experimental score slot, which has a definite value, the other four slots may be empty slots.
[0064] Step 130: Use the named entity recognition model to identify mentions in the text content, obtain multiple mentions, and perform coreference resolution on the mentions to construct a compact entity pool.
[0065] In one embodiment, the purpose of constructing a compact entity pool is to extract from document text. A compact and de-redundant set of candidate entities is extracted from the data for subsequent candidate entity retrieval. (See reference...) Figure 4 , Figure 4 This is a flowchart of constructing a compact entity pool by coreference resolution of mentions provided in an embodiment of this application, specifically including the following steps: Step 410: Encode each mention using a mention encoder to obtain the corresponding mention embedding representation.
[0066] In one embodiment, the named entity recognition model PLMarker is used to process all text content and identify all mentions of semantic entities relevant to the experiment. A mention is a specific occurrence of an entity in the text, and each mention includes at least an entity type, a mention string, and mention context. The entity type is consistent with the cell type, including task type, dataset type, method type, evaluation metric type, and experiment score type. The mention string is the specific character sequence in the text in which the entity appears, and the mention context is the text content of the sentence containing the mention and the sentences before and after it.
[0067] Since the same entity may appear in multiple forms in text, such as "Visual QuestionAnswering" and "VQA", directly building an entity pool based on mentions would generate redundant information, increasing the input length of subsequent large language models and retrieval noise. Therefore, this embodiment merges mentions through coreference resolution. Coreference resolution here refers to the process of merging multiple mentions in the text content that point to the same entity.
[0068] In one embodiment, the mention encoder employs a Transformer-based encoder architecture, which is pre-trained using supervised contrastive learning. The core objective of supervised contrastive learning is to make mention embeddings belonging to the same entity closer together in the vector space, and mention embeddings belonging to different entities farther apart in the vector space.
[0069] During training, the objective function for supervised contrastive learning is as follows:
[0070] Where I represents the set of indices mentioned, and z i For the embedded representation of i, For the embedding representation of a positive sample p that belongs to the same co-referenced chain as i, For the embedding representation of negative sample a that does not belong to the same coreference chain as i. For the set of positive samples that belong to the same coreference chain as mentioned i, The set that excludes all mentions following mention i. Temperature is a hyperparameter used to control the concentration of the embedding representation in the vector space. It typically ranges from 0.07 to 0.2. The smaller the value, the more concentrated the embeddings of the same type are, and the more dispersed the embeddings of different types are.
[0071] Compared to the pairwise coreference resolution method, this embodiment reduces the inference cost from O(N²) to O(N) when constructing the entity similarity matrix using the aforementioned coreference resolution method, where N is the total number of mentions, thereby improving the running efficiency of coreference resolution.
[0072] Step 420: Perform hierarchical clustering on all mention strings corresponding to the same entity type to obtain entity clusters for each entity. For each entity cluster, select the most frequently occurring mention string as the normalized name of the entity, and aggregate all mention contexts in the entity cluster to obtain the aggregated context of the entity.
[0073] In one embodiment, based on the trained mention encoder, after encoding all entity mentions to obtain corresponding mention embeddings, hierarchical clustering is performed on all mentions corresponding to the same entity type. This hierarchical clustering is an unsupervised clustering method. Specifically, in this embodiment, by calculating the cosine similarity between mention embeddings, mentions with similarity higher than a preset threshold are grouped into the same entity cluster, with each entity cluster corresponding to a unique semantic entity. The preset similarity threshold can be set to 0.85 to 0.9, and can be adjusted according to the characteristics of research documents in different fields.
[0074] Next, for each entity cluster, the most frequently mentioned string in that cluster is selected as the canonical name of the entity, ensuring the universality and consistency of the entity name. At the same time, all mention contexts in the entity cluster are concatenated and deduplicated to form the entity's aggregate context, which reflects the semantic information and usage scenarios of the entity in the document.
[0075] Step 430: Construct a compact entity pool based on each entity.
[0076] In one embodiment, entities corresponding to all entity clusters are aggregated. Each entity then contains three elements: a normalized name, an entity type, and an aggregation context. These entities are used to form a compact entity pool. The resulting compact entity pool removes redundant mentions and irrelevant information from the text, retaining only unique entities relevant to the experiment. This provides a high-quality candidate set for subsequent candidate entity retrieval, reducing the search space for later searches.
[0077] Therefore, the embodiments of this application effectively solve the redundancy problem caused by multiple representations of the same entity through the above-described compact entity pool construction process, reducing noise interference in subsequent retrieval and large language model inference. Simultaneously, the coreference resolution method based on contrastive learning improves processing efficiency and reduces the overall extraction process runtime.
[0078] Step 140: When the anchor relation tuple includes null slots, retrieve the candidate entity list from the compact entity pool according to the type of the null slots. Input the table content and the candidate entity list into the large language model to fill the entities and obtain the experimental relation tuple.
[0079] In one embodiment, if the anchor relation tuple includes null slots, these slots need to be filled based on the compact entity pool. (See also...) Figure 5 , Figure 5 This is a flowchart provided in this application embodiment for obtaining a candidate entity list by retrieving from a compact entity pool based on the type of empty slots, specifically including the following steps: Step 510: For each anchor relation tuple containing empty slots, construct at least one query statement using the already filled slot content in the anchor relation tuple and the table title of the corresponding table.
[0080] In one embodiment, for anchor relation tuples containing empty slots (Using experimental score 'a' as the anchor point), a separate query statement is defined for each empty slot. The query statement is composed of all the slot contents that have been filled in the anchor point relation tuple and the complete title of the corresponding table. The filled slot contents provide contextual semantic information for the current anchor point relation, and the table title limits the overall topic scope of the query. This embodiment combines both to locate entities related to the empty slot. During retrieval, the search space is limited to a subset of entities in the compact entity pool corresponding to the slot type of the empty slot. Retrieval is only performed on entities of the same type to avoid interference from cross-type entities, thereby narrowing the search scope and improving search efficiency and accuracy.
[0081] Step 520: For each query statement, calculate the similarity between the query statement and entities of the corresponding entity type in the compact entity pool, and select multiple entities based on the similarity to obtain a candidate entity list.
[0082] In one embodiment, a dual-encoder architecture is used to encode the query statement and the selected entities separately. This dual-encoder architecture includes two independent encoders, which encode the query statement into a query vector and the normalized name and aggregation context of the entities into entity vectors of the same dimension. Then, the cosine similarity between the query vector and each entity vector is calculated as the similarity score. The cosine similarity score ranges from -1 to 1, with a higher value indicating a higher semantic relevance between the query and the entity.
[0083] In one embodiment, reference is made to Figure 6 , Figure 6 This is a flowchart of an embodiment of the present application providing a process for selecting multiple entities based on similarity to obtain a candidate entity list, specifically including the following steps: Step 610: Select multiple entities as initial entities based on similarity.
[0084] In one embodiment, the K entities with the highest cosine similarity are selected as the initial entities to form a Top-K list. Here, K is a preset positive integer, which can be 5 to 10. The specific value can be adjusted according to the characteristics of scientific research documents in different fields.
[0085] Step 620: Calculate the retrieval frequency and reciprocal confidence score of the initial entity in all search results in the table content. Obtain the frequency score based on the retrieval frequency and the ranking score based on the reciprocal confidence score.
[0086] In one embodiment, for the same table, the search results for the same type of missing slots in different anchor relation tuples may overlap, and each search score only reflects the expected relevance between a single query and the initial entity, rather than the overall relevance of the initial entity to the entire table. Therefore, this embodiment aggregates the initial entities corresponding to all query statements within the same table to form a unified candidate pool. The frequency of each initial entity's appearance in the Top-K list of all search results for the same table is counted, and then the search frequency is normalized to obtain a frequency score. A higher frequency score indicates a stronger overall relevance of the entity to the entire table. Simultaneously, the reciprocal rank confidence of each initial entity in each search result is calculated. The reciprocal rank confidence is 1 divided by the entity's rank in the corresponding search result. The average of the reciprocal rank confidences across all search results is used to obtain the ranking score. A higher ranking score indicates a higher ranking for the entity in each search and a more stable relevance.
[0087] Step 630: Perform a weighted calculation on the frequency score and the ranking score to obtain the mixed correlation, and select the initial entity containing the mixed correlation as the candidate entity.
[0088] In one embodiment, the frequency score and ranking score are weighted to obtain a mixed correlation, which is expressed as:
[0089] in, The initial entity c has a mixed correlation with table T. The frequency score corresponding to the initial entity c. This represents the ranking score corresponding to the initial entity c. To balance the frequency score and ranking score, the hyperparameters are set to a value between 0.3 and 0.7. For example, they can be set to 0.5 to give the frequency score and ranking score the same weight.
[0090] The following example illustrates the calculation process of mixed relevance. Suppose a table in a research document contains 3 anchor relation tuples, all of which are missing task slots. Therefore, 3 independent retrieval operations will be generated. The specific parameters are set as follows: retrieval parameter Top-K=5, balancing hyperparameter α=0.5, and the entities to be calculated include (entity A, entity B, entity C, entity D...).
[0091] The ranking order of the entities after the three searches is as follows: 1st search: Entity A, Entity B, Entity C, Entity E, Entity F; 2nd search: Entity A, Entity D, Entity B, Entity G, Entity H; 3rd search: Entity B, Entity A, Entity I, Entity J, Entity K.
[0092] Take the mixed relevance retrieval process of the first query as an example.
[0093] First, the search frequency is statistically analyzed and a frequency score is calculated. The frequency score is... The calculation rule is as follows: Count the total number of times an entity appears in the Top-5 results of all 3 searches, divide the total number of times by the total number of searches (3), and obtain the normalized frequency score. The frequency scores for some entities are as follows: | Entity A has a frequency score of 3 / 3 = 1.0, Entity B has a frequency score of 3 / 3 = 1.0, Entity C has a frequency score of 1 / 3 ≈ 0.333, Entity D has a frequency score of 1 / 3 ≈ 0.333, etc.
[0094] Next, we calculate the statistical ranking and the ranking score. Ranking Score The calculation rule is as follows: for each occurrence of an entity, calculate the penultimate ranking, and take the average of all penultimate rankings to obtain the ranking score. The ranking scores for some entities are as follows: Entity A's ranking score is (1.0 + 1.0 + 0.5) / 3 ≈ 0.833, Entity B's ranking score is (0.5 + 0.333 + 1.0) / 3 ≈ 0.611, Entity C's ranking score is 0.333, Entity D's ranking score is 0.5, and so on.
[0095] Then, the mixed correlations are calculated and sorted. The mixed correlations of some entities are as follows: Entity A has a mixed correlation of 0.917, Entity B has a mixed correlation of 0.806, Entity D has a mixed correlation of 0.417, Entity C has a mixed correlation of 0.333, etc.
[0096] Therefore, for the first query, entity A ranks first. Although entity A and entity B appear with the same frequency, entity A ranks higher in each search, resulting in a higher ranking score and ultimately the highest mixed relevance. Entity D is superior to entity C. Although they appear with the same frequency, entity D ranks higher, resulting in a higher ranking score and also a higher mixed relevance.
[0097] As can be seen, this embodiment, through this hybrid relevance calculation process, simultaneously considers the consistency of an entity being hit multiple times and the ranking quality in each search, which can effectively filter out entities that are both repeatedly searched and highly relevant, thus solving the problem of unstable single search results.
[0098] Ultimately, initial entities containing mixed relevance are selected as candidate entities. It's understandable that the mixed relevance scores in these candidate entities are merely to provide auxiliary information to the large language model. This is because the initial entities already possess a certain degree of semantic similarity and have been manually selected; therefore, all initial entities could potentially be candidate entities. Utilizing the mixed relevance scores simply allows the large language model to obtain more information, enabling more accurate selection during the completion process.
[0099] In one embodiment, after obtaining the set of candidate entities, it is input together with the tabular information into a large language model, which then performs the completion reasoning for relation tuples. (See also...) Figure 7 , Figure 7 This application provides a flowchart for inputting table content and a candidate entity list into a large language model for entity filling to obtain experimental relation tuples, specifically including the following steps: Step 710: For each empty slot in the anchor relation tuple, obtain query completion input data based on the table content, candidate entities, and the mixed relevance of candidate entities.
[0100] In one embodiment, the query completion input data for the large language model consists of two parts. The first part is a serialized typified table, which is completely consistent with the typified table used in the first stage of anchor point relationship extraction. It includes the table title, the actual content of the typified cells, the row and column positions, and the corresponding cell types, fully preserving the table's structured information and semantic annotations. The second part is a set of candidate entities. Each candidate entity includes a normalized name, entity type, aggregation context, and mixed relevance score. The normalized name is the most frequent standard expression of the entity in the text; the entity type is consistent with the cell type; the aggregation context is the text content after concatenating and deduplicating all contexts mentioned by the entity; and the mixed relevance score is the calculated overall relevance value between the entity and the entire table. These two parts together constitute the complete query completion input data, providing the large language model with complete yet non-redundant table information and candidate entity information.
[0101] Step 720: Input the query completion input data into the large language model, and use the large language model to perform inference according to the second prompting strategy. The second prompting strategy is an extension of the first prompting strategy and also includes: interpreting the semantics of the table based on the table title, identifying the correspondence between candidate entities and table content, and when the empty slot cannot be determined solely by the table content, selecting entities with the highest type matching and mixed relevance from the candidate entity list to fill the empty slot, thus obtaining experimental relation tuples.
[0102] In one embodiment, the second prompting strategy is an extension of the first prompting strategy and is applicable to the reasoning process in the relation completion stage. The second prompting strategy includes not only the first prompting strategy but also two new core instructions. The first is title semantic expansion, which constrains the large language model to use the table title as auxiliary semantic information. This is used not only to explain the overall theme and experimental background of the table but also to assist in identifying the semantic correspondence between candidate entities and table content, establishing the association between candidate entities and the table's experimental scenario. The second is external entity completion, which constrains the large language model to first check whether there is explicit supporting information for the corresponding empty slot in the table content. If so, the entity is directly extracted from the table content for filling; if not, an entity must be selected from the candidate entity list for filling. The selection must simultaneously meet two conditions: first, the entity type must completely match the type of the empty slot; second, the entity's mixed relevance score must be the highest among all candidate entities with matching types. It is understood that both the first and second prompting strategies can generate corresponding prompt words in natural language form.
[0103] At this point, the large language model performs inference under the constraint of the second prompting strategy, completing each anchor relation tuple containing empty slots. After completion, it outputs a complete experimental relation tuple containing the task, dataset, method, evaluation metric, and experimental score. After completing all anchor relation tuples, the complete set of experimental relation tuples corresponding to the document is obtained. This enables the complete and accurate extraction of all experimental relationships from research documents without any omissions.
[0104] The following is a specific example illustrating the method for joint extraction of tabular text.
[0105] Reference Figure 8 , Figure 8 This is an overall schematic diagram of the table text joint extraction method provided in the embodiments of this application. Figure 8 As can be seen, the table text joint extraction method in this embodiment adopts a two-stage joint extraction framework. The input consists of the text content and table content of the research document, and the output is a complete set of experimental relation tuples. Specifically, the text content consists of all text fragments in the research document except for the tables, and the table content consists of the set of all experimental result tables in the research document. Figure 8 The image shows three tables, each containing multiple rows and columns of cells.
[0106] The following explanation uses the table in the first figure as an example.
[0107] The first stage is the anchor point relationship extraction stage, which includes a cell type classification stage and an anchor point relationship extraction stage. The cell type classification stage receives table content and text content as input, and types each cell is labeled to obtain typed cells. A cell classification model is used to extract the text features, context features, and structural features of each cell, which are then encoded into cell embedding representations for classification. For example... Figure 8 As shown, cell00 is classified as Others type, and cell01 is classified as Dataset type.
[0108] Next, the anchor relation extraction stage receives typed cells as input, serializes them into structured strings, and inputs them into the large language model. Relation extraction is performed according to the first prompting strategy, outputting anchor relation tuples. The large language model iterates through all cells labeled as experimental score type, generating an independent anchor relation tuple for each experimental score type cell. The anchor relation tuple contains five slots: task, dataset, method, evaluation metric, and experimental score. If a slot does not have explicit supporting content in the table, it is filled with an empty value. As shown in the figure, the two generated anchor relation tuples are shown in Table 1 below:
[0109] Table 1. Examples of Anchor Relation Tuples Among them, the task slots and evaluation indicator slots are filled with empty values due to insufficient information in the table, and both are regarded as empty value slots.
[0110] In one embodiment, reference is made to Figure 9 , Figure 9 This is a schematic diagram of the first prompting strategy in the anchor point relationship extraction process provided in this application embodiment. The large language model extraction module receives the serialized table and the first prompting strategy as input and performs anchor point relationship extraction. The first prompting strategy includes three instructions, such as... Figure 9 As shown: The first requirement is to use the title only as auxiliary semantic context to understand the meaning of the table, and not to directly extract the content in the title as entity value; the second requirement is to use cell type labels as soft hints, allowing the large language model to verify and correct type labeling errors based on the table content and title context; the third requirement is that all extracted entity strings must strictly match the table cell content, and if there is no explicit supporting content for the corresponding slot in the table, then NULL is output. Following these instructions, the large language model iterates through all cells labeled as "Score" and generates an anchor relation tuple for each cell.
[0111] The second stage, relation completion and extraction, includes a compact entity pool construction phase, a candidate entity retrieval phase, and a relation completion phase. The compact entity pool construction module receives text content as input and uses a named entity recognition model to identify entity mentions within the text content, resulting in multiple experiment-related entity mentions. Each entity mention includes the entity type, mention string, and mention context. For example... Figure 8 As shown, the identified entity mentions include "SMen-VQA" (Method type), "Visual Question Answering" (Task type), and "VQA" (Task type). Then, a coreference resolution method based on contrastive learning is used to merge entity mentions, combining multiple mentions referring to the same entity into a single normalized entity. For example, "Visual Question Answering" and "VQA" are merged into the same entity, whose normalized name is "VQA". Finally, a compact entity pool is formed by all entities, their corresponding entity types, and aggregation contexts.
[0112] Then, in the candidate entity retrieval stage, anchor relation tuples and a compact entity pool are received as input. For each anchor relation tuple containing null value slots, a query statement is constructed using the filled slot content and table title. The query is then performed in the corresponding entity subset within the compact entity pool to obtain an initial candidate entity list. For example, for an anchor relation tuple with an experimental score of 12.73, two query statements will be generated, corresponding to null value slots of type Task and type Metric, respectively. The query statement is composed of the filled entity value (Dataset:"DAQUAR",Method:"Multi-Word",Score:"12.73") and the table title "Table1:AccuracyonVQAandGQAbenchmarks".
[0113] Then, initial entities are obtained through similarity statistics, and mixed relevance is used to filter the initial entities to obtain a candidate entity list. The relation completion module receives typed cells and the candidate entity list as input, combines them into query completion input data, and inputs it into the large language model. It performs inference according to the second hint strategy, fills empty slots, and obtains the complete experimental relation tuples shown in Table 2 below.
[0114]
[0115] Table 2 Examples of experimental relation tuples The missing task slots and evaluation index slots in the experimental relation tuples have been correctly filled.
[0116] In one embodiment, reference is made to Figure 10 , Figure 10 This is a schematic diagram of the second prompting strategy provided in the completion relation extraction process according to an embodiment of this application. Figure 10 It can be seen that the process receives a serialized table and a candidate entity list as input, inputs a large language model to perform inference according to the second prompting strategy, and outputs a complete experimental relation tuple.
[0117] Specifically, the second prompting strategy in relation completion reasoning using the large language model is an extension and supplement to the first prompting strategy. The extended instruction requires that the title not only explain the semantics of the table but also assist in identifying the correspondence between external entities and table content. The extended instruction allows entity strings to come from table cell content or the external entity list. For empty slots that cannot be determined from the table content, the entity with the highest type matching and mixed relevance score is selected from the candidate entity list for filling. Following these instructions, the large language model completes each anchor relation tuple containing empty slots, ultimately outputting a complete five-tuple experimental relation tuple.
[0118] As described above, this embodiment of the application extracts experimental relationships from research documents without omissions through joint modeling of tabular and textual modalities and a hybrid reasoning strategy combining lightweight models and large language models, while ensuring completeness, efficiency, and accuracy. The specific extraction process employs a two-stage framework: first, anchor relation tuples are extracted using experimental score type cells in the table as anchor points, ensuring that all experimental results in the document have corresponding tuples without omissions; then, a compact entity pool constructed from text is used to fill in empty slots in the anchor relation tuples, ensuring that all five elements of each experimental relation tuple are correct and complete. This overcomes the problem in related technologies where methods based solely on text or tables struggle to simultaneously achieve both complete and omission-free extraction. Furthermore, this embodiment uses a coreference resolution method based on contrastive learning to construct the compact entity pool, reducing the inference cost of coreference resolution, improving processing efficiency, and effectively removing redundant references in the text, reducing noise interference in subsequent retrieval and input to the large language model. Furthermore, by employing a hybrid relevance calculation method based on retrieval frequency and reciprocal ranking confidence, which simultaneously considers the consistency of candidate entities being hit in multiple retrievals and their ranking quality in each retrieval, the problem of unstable single retrieval results can be solved. This method can filter out candidate entities that are most relevant to the overall semantics of the table, thereby improving the accuracy of relation completion.
[0119] Furthermore, this embodiment designs a two-level prompting strategy for the experimental relation extraction task. The first prompting strategy constrains the table anchor point extraction process, while the second prompting strategy constrains the text completion process. This standardizes the reasoning behavior of the large language model from dimensions such as table understanding, type usage, and entity filling, suppressing the illusion problem of the large language model generating non-existent entities, incorrect entity boundaries, or inaccurate relation parameters, thereby enhancing the reliability of the extraction results. Finally, this embodiment uses a lightweight model to handle basic tasks such as cell type classification and entity mention recognition, reducing the number of input tokens and calls to the large language model, thus lowering deployment costs, electricity costs, and model call costs.
[0120] This application also provides a device for joint extraction of table text, which can implement the above-described method for joint extraction of table text. (Refer to...) Figure 11 The device includes: Cell processing module 1110: It is used to obtain the corresponding text content and the table content of each table from the research document to be processed, classify the type of each cell in the table content, obtain the corresponding typed cell, and obtain the typed table based on the typed cell.
[0121] Anchor Relation Tuple Extraction Module 1120: This module is used to extract anchor relations from a typed table input into a large language model, thereby obtaining at least one anchor relation tuple related to the experimental score.
[0122] Entity pool construction module 1130: Used to identify mentions in text content using a named entity recognition model, obtain at least one mention corresponding to each entity, and perform coreference resolution on the mentions to construct a compact entity pool.
[0123] Experimental relation tuple extraction module 1140: When the anchor relation tuple includes null slots, it retrieves a candidate entity list from the compact entity pool based on the type of the null slots, inputs the table content and the candidate entity list into the large language model for entity filling, and obtains the experimental relation tuple.
[0124] The specific implementation of the table text extraction device in this embodiment is basically the same as the specific implementation of the table text extraction method described above, and will not be repeated here.
[0125] This application also provides an electronic device, including: At least one memory; At least one processor; At least one program; The program is stored in a memory, and the processor executes the at least one program to implement the table text extraction method described above. The electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.
[0126] Please see Figure 12 , Figure 12 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 1201 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1202 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1202 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1202 and is called and executed by the processor 1201 using the table text extraction method of the embodiments of this application. The input / output interface 1203 is used to implement information input and output; The communication interface 1204 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1205 transmits information between various components of the device (e.g., processor 1201, memory 1202, input / output interface 1203, and communication interface 1204); The processor 1201, memory 1202, input / output interface 1203 and communication interface 1204 are connected to each other within the device via bus 1205.
[0127] This application embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method for joint extraction of tabular text.
[0128] Memory, as a non-transitory storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0129] The table text joint extraction method, apparatus, device, and storage medium proposed in this application obtain the corresponding text content and table content of each table from the research document to be processed. Each cell in the table content is classified by type to obtain corresponding typed cells. Typed tables are obtained based on the typed cells. The typed cells are input into a large language model for anchor relation extraction, resulting in anchor relation tuples related to experimental scores. A named entity recognition model is used to identify mentions in the text content, obtaining at least one mention corresponding to each entity. Coreference resolution is performed on the mentions to construct a compact entity pool. When the anchor relation tuple includes empty slots, a candidate entity list is obtained by searching the compact entity pool according to the type of the empty slot. The table content and the candidate entity list are input into the large language model for entity filling, resulting in experimental relation tuples. This application embodiment is based on the cell type classification in the table. The extracted anchor relation tuples cover all experimental scores. Empty slots are then filled through the text entity pool, integrating the table's structured information and the text's semantic information to ensure that the experimental relation tuples have complete elements, thus solving the problem of incomplete extraction. Meanwhile, a compact entity pool is constructed based on named entity recognition and coreference resolution to filter redundant information, focus on experimentally relevant entities, retrieve highly relevant candidate entities to input into the large language model, reduce noise input, and improve extraction accuracy.
[0130] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0131] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0132] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0133] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0134] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0135] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0136] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0137] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0138] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0139] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0140] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for joint extraction of tabular text, characterized in that, include: The text content and table content of each table are obtained from the research document to be processed. Each cell in the table content is classified by type to obtain the corresponding typed cell. A typed table is obtained based on the typed cell. The typed table is input into a large language model to extract anchor relations, resulting in at least one anchor relation tuple related to the experimental score. The text content is referenced using a named entity recognition model to obtain at least one reference corresponding to each entity. The references are then coreference resolved to construct a compact entity pool. When the anchor relation tuple includes empty slots, a candidate entity list is obtained by searching the compact entity pool according to the type of the empty slots. The table content and the candidate entity list are then input into the large language model for entity filling to obtain the experimental relation tuple.
2. The method for joint extraction of tabular text according to claim 1, characterized in that, The step of classifying each cell by type to obtain the corresponding typed cell includes: Extract the text features, context features, and structural features of each cell from the table content. The text features include the actual content of the cell. The context features include a preset number of sentences related to the cell retrieved from the text content. The structural features include the row and column position of the cell and the actual content of all other cells in the same row and column. The text features, context features, and structural features are input into a cell classification model for type labeling to obtain the cell type of each cell. The cell type is then added to the cell to obtain the typed cell.
3. The method for joint extraction of tabular text according to claim 2, characterized in that, The cell type includes at least the experimental score type. The step of inputting the typed table into a large language model for anchor point relation extraction yields anchor point relation tuples related to experimental scores, including: The typed table is serialized into a structured string, which includes a table title field, a type field for each cell, and a cell content field. The structured string is input into the large language model and relation extraction is performed according to the first prompting strategy. All cells labeled as experimental score type are traversed, and a corresponding anchor relation tuple is generated for each experimental score type cell. The anchor relation tuple includes multiple slots, and the slot type includes one or more of the following: task slot, dataset slot, method slot, evaluation metric slot, and experimental score slot.
4. The method for joint extraction of tabular text according to claim 3, characterized in that, The first prompting strategy includes: The large language model uses the table title field as an auxiliary semantic context to understand the overall meaning of the table, and does not directly extract the entity string from the table title field to fill the corresponding slot; The large language model uses the type field of each cell as a priori hint, and verifies and corrects the cell type in combination with the corresponding table content; For each slot in the anchor relation tuple, the large language model only extracts entity strings that match the slot type from the content fields of each cell and fills them. If the associated content of the corresponding slot cannot be obtained from the content fields of each cell, the slot is filled with an empty value.
5. The method for joint extraction of tabular text according to claim 1, characterized in that, The mention includes at least an entity type, a mention string, and a mention context. The process of constructing a compact entity pool by performing coreference resolution on the mentions includes: Each mention is encoded using a mention encoder to obtain a corresponding mention embedding representation. The mention encoder is pre-trained using supervised contrastive learning. In the vector space, mention embedding representations belonging to the same entity are close to each other, while mention embedding representations belonging to different entities are far apart. Hierarchical clustering is performed on all the mention strings corresponding to the same entity type to obtain the entity cluster corresponding to each entity. For each entity cluster, the mention string with the highest frequency is selected as the normalized name of the entity. All mention contexts in the entity cluster are aggregated to obtain the aggregated context of the entity. The compact entity pool is formed based on each of the entities, each entity including the corresponding normalized name, entity type, and aggregation context.
6. The method for joint extraction of tabular text according to claim 5, characterized in that, The step of retrieving a candidate entity list from the compact entity pool based on the type of the empty slot includes: For each anchor relation tuple containing empty slots, at least one query statement is constructed using the slot content already filled in the anchor relation tuple and the table title of the corresponding table, and the query statement corresponds to the slot type of the empty slot. For each query statement, the similarity between the query statement and the entity of the corresponding entity type in the compact entity pool is calculated, and multiple entities are selected based on the similarity to obtain the candidate entity list.
7. The method for joint extraction of tabular text according to claim 6, characterized in that, The step of selecting multiple entities based on the similarity to obtain the candidate entity list includes: Multiple entities are selected as initial entities based on the similarity; The search frequency and reciprocal ranking confidence of the initial entity in all search results in the table content are statistically analyzed. A frequency score is obtained based on the search frequency, and a ranking score is obtained based on the reciprocal ranking confidence. The frequency score and the ranking score are weighted to obtain a mixed correlation, and the initial entity containing the mixed correlation is selected as a candidate entity.
8. The method for joint extraction of tabular text according to claim 7, characterized in that, The step involves inputting the table content and the candidate entity list into the large language model for entity filling, resulting in experimental relation tuples, including: For each empty slot in the anchor relation tuple, query completion input data is obtained based on the table content, the candidate entity, and the mixed relevance of the candidate entity; The query completion input data is input into the large language model, and reasoning is performed using the large language model according to the second prompting strategy. The second prompting strategy is derived from the first prompting strategy and also includes: interpreting the semantics of the table based on the table title, identifying the correspondence between the candidate entities and the table content, and when the empty slot cannot be determined solely by the table content, selecting the entity with the highest type matching and mixed relevance from the candidate entity list to fill the empty slot, thereby obtaining the experimental relation tuple.
9. A tabular text extraction device, characterized in that, include: Cell processing module: used to obtain the corresponding text content and the table content of each table from the research document to be processed, classify each cell in the table content into types to obtain the corresponding typed cells, and obtain typed tables based on the typed cells; Anchor Relation Tuple Extraction Module: This module is used to input the typed table into a large language model to extract anchor relations and obtain at least one anchor relation tuple related to the experimental score. Entity pool construction module: used to use the named entity recognition model to identify mentions in the text content, obtain at least one mention corresponding to each entity, and perform coreference resolution on the mentions to construct a compact entity pool; Experimental relation tuple extraction module: When the anchor relation tuple includes null slots, it retrieves a candidate entity list from the compact entity pool according to the type of the null slots, inputs the table content and the candidate entity list into the large language model for entity filling, and obtains the experimental relation tuple.
10. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the tabular text extraction method according to any one of claims 1 to 8.
11. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the tabular text extraction method according to any one of claims 1 to 8.