Methods, devices, equipment, media, and programs for obtaining table information
By identifying and classifying spreadsheet cell text and updating it using the feature vectors of neighboring cells, the problem of identifying header and data cells in complex tables is solved, improving the accuracy and universality of table structure understanding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies lack the ability to understand cell types in complex tables, especially the recognition of header and data cells, resulting in low universality of table structure understanding and limiting the application scope of intelligent table processing systems.
By recognizing cell text in a spreadsheet, extracting feature vectors, updating and classifying the cells using feature vectors from neighboring cells, and identifying cell types, including header or data cells.
It improves the accuracy of cell type recognition, enabling better understanding of complex table structures and supporting the understanding of more types of table structures and upper-level intelligent processing systems.
Smart Images

Figure CN115983219B_ABST
Abstract
Description
Technical Field
[0001] This disclosure provides a method, apparatus, device, medium, and program product for obtaining tabular information, relating to the field of computer technology, specifically the fields of artificial intelligence, knowledge graphs, and deep learning. Background Technology
[0002] Table structure understanding aims to comprehend implicit table structures and identify the functional roles of cells, such as which cells are row headers describing the cells to their right and which cells contain regular data. To support the content retrieval capabilities of knowledge engines, table structure understanding has gained increasing attention in recent years.
[0003] Currently, table structure understanding only addresses specific table types, such as vertical or hierarchical tables, and lacks solutions for understanding the structure of complex tables, resulting in low universality. When dealing with complex tables, current table-related technologies exist for recognizing the physical structure between cells, such as their adjacency relationships and whether they are merged cells. However, they lack understanding of cell types in complex tables, such as whether a cell is a header or a data cell. Understanding cell types will help drive the development of related technologies, such as table question answering and table data extraction. Summary of the Invention
[0004] This disclosure provides a method, apparatus, device, medium, and program product for obtaining tabular information.
[0005] One aspect of this disclosure provides a method for obtaining tabular information, including:
[0006] Identify the text in each cell of a spreadsheet;
[0007] Feature extraction is performed on the text of each cell to obtain the feature vector of each cell;
[0008] Based on the feature vector of each cell and the feature vector of each cell's neighboring cells, the feature vector of each cell is updated to obtain the updated feature vector of each cell.
[0009] Based on the updated feature vector of each cell, each cell is classified to obtain the type of each cell.
[0010] Another aspect of this disclosure provides a form information acquisition device, comprising:
[0011] The recognition module is used to recognize the text in each cell of a spreadsheet.
[0012] The feature extraction module is used to extract features from the cell text of each cell to obtain the feature vector of each cell;
[0013] The update module is used to update the feature vector of each cell based on the feature vector of each cell and the feature vector of each cell's neighboring cells, so as to obtain the updated feature vector of each cell.
[0014] The classification module is used to classify each cell based on the updated feature vector of each cell to obtain the type of each cell, such as whether the cell is a header or a data cell.
[0015] In another aspect of this disclosure, an electronic device is also provided, comprising:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described above.
[0019] In another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the methods described above.
[0020] In another aspect of this disclosure, a computer program product is also provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method described above.
[0021] In some embodiments of this disclosure, the cell text of each cell in a spreadsheet is identified; features are extracted from the cell text of each cell to obtain the feature vector of each cell; the feature vector of each cell is updated based on the feature vector of each cell and the feature vectors of the neighboring cells of each cell to obtain the updated feature vector of each cell; each cell is classified based on the updated feature vector of each cell to obtain the type of each cell, thereby more reasonably aggregating the information of neighboring cells in the local area of a cell, improving the accuracy of cell type identification, and enabling table structure understanding for more types of tables.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0023] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0024] Figure 1 This is a flowchart illustrating a method for obtaining table information according to Embodiment 1 of this disclosure;
[0025] Figure 2 This is a schematic diagram of the structure of a cell identifier matrix provided in an embodiment of the present disclosure;
[0026] Figure 3 This is a flowchart illustrating another method for obtaining table information provided in Embodiment 2 of this disclosure;
[0027] Figure 4 A schematic diagram of the structure of a form information acquisition device provided for an exemplary embodiment of this disclosure;
[0028] Figure 5 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0029] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0030] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0031] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0032] Table structure understanding aims to comprehend implicit (unannotated) table structures and identify the functional roles of cells, such as which cells are used to describe the row headers of the cells to the right, and which cells contain ordinary data. To serve the content retrieval functions of knowledge engines, table structure understanding has gained increasing attention in recent years. Obtaining the correct table structure is a crucial foundation for a series of higher-level table intelligence tasks. For example, a correct table structure helps table-based question-answering systems locate relevant table cells or calculate corresponding answers based on user queries. Furthermore, a correct understanding of table structure can serve as a basis for knowledge extraction, transforming table data into triples, thereby aiding in the construction of knowledge graphs.
[0033] Currently, table structure understanding only applies to specific table types, such as vertical or hierarchical tables, assuming that header cells only exist on the left or top of the table, ignoring the complex tables commonly found in rich documents. Complex tables can have header cells located anywhere within the table, including the bottom right, resulting in more diverse and flexible table structures.
[0034] Table 1 below shows a complex table. As you can see, not only is there a table header in the first row, but there are also many other table header rows in the third column. The distribution of table headers is more flexible than in traditional tables. Complex tables pose new challenges to table structure understanding systems and also limit the application scope of upper-level intelligent table processing systems. For example, traditional content retrieval systems for vertical tables often cannot extract the information needed by users from complex tables. Therefore, it is necessary to research structural understanding technologies for complex tables, especially semantic-level "table structure," that is, understanding cell types, such as whether a cell is a header or a data cell. This will provide important support for upper-level intelligent table processing systems.
[0035]
[0036] Table 1
[0037] To address the aforementioned technical problems, in some embodiments of this disclosure, the cell text of each cell in a spreadsheet is identified; features are extracted from the cell text of each cell to obtain the feature vector of each cell; the feature vector of each cell is updated based on the feature vector of each cell and the feature vectors of its neighboring cells to obtain the updated feature vector of each cell; and each cell is classified based on the updated feature vector of each cell to obtain the type of each cell. This more reasonably aggregates the information of neighboring cells within a local area of a cell, improves the accuracy of cell type identification, and enables the understanding of the table structure of more types of tables.
[0038] The technical solutions provided by the embodiments of this disclosure are described in detail below with reference to the accompanying drawings.
[0039] Figure 1 This is a flowchart illustrating a method for obtaining table information according to Embodiment 1 of this disclosure. Figure 1 As shown, the method includes:
[0040] S101: Identify the cell text in each cell of a spreadsheet;
[0041] S102: Extract features from the text of each cell to obtain the feature vector of each cell;
[0042] S103: Update the feature vector of each cell based on the feature vector of each cell and the feature vector of each cell's neighboring cells to obtain the updated feature vector of each cell.
[0043] S104: Based on the updated feature vector of each cell, classify each cell to obtain the type of each cell.
[0044] In this embodiment, the entity executing the above method can be a terminal device or a server.
[0045] When the executing entity is a terminal device, the type of terminal device is not limited. Terminal devices include, but are not limited to, any of the following: personal computers, laptops, tablets, mobile phones, smart bracelets, smartwatches, and smart speakers.
[0046] When the executing entity is a server, the implementation form of the server is not limited. For example, a server can be a conventional server, a cloud server, a cloud host, a virtual data center, or other server devices. The main components of a server include a processor, hard drive, memory, system bus, and common computer architecture types.
[0047] In this embodiment, the cell text of each cell in the spreadsheet is identified; features are extracted from the cell text of each cell to obtain the feature vector of each cell; the feature vector of each cell is updated based on the feature vector of each cell and the feature vectors of its neighboring cells to obtain the updated feature vector of each cell; each cell is classified based on the updated feature vector of each cell to obtain the type of each cell, which more reasonably aggregates the information of neighboring cells in the local area of a cell, improves the accuracy of cell type identification, and enables table structure understanding for more types of tables.
[0048] In some embodiments of this disclosure, the cell text of each cell in a spreadsheet is identified. One possible approach is to perform text recognition on each cell to obtain its cell text; after recognizing the cell text, a cell identifier is assigned to each cell along the row direction, forming a cell identifier matrix; and the corresponding cell text is stored for each cell along the row direction based on the cell identifier. Based on the cell identifier, the cell text corresponding to the cell identifier can be quickly retrieved from the cell identifier matrix, improving the efficiency of cell text lookup.
[0049] For example, text recognition technology can be used to identify the text in each cell of a spreadsheet. A spreadsheet can be represented using a cell identifier matrix and a cell text list. Each cell is assigned a unique cell identifier along its rows, forming a cell identifier matrix. The text of each cell is stored along its rows, forming a cell text list. The cell identifier corresponds to the index of the cell list, allowing the retrieval of the cell text associated with that identifier.
[0050] In some embodiments of this disclosure, feature extraction is performed on the cell text of each cell to obtain the feature vector of each cell. One possible approach is to input the cell text of the target cell into a feature extraction model to obtain semantic features and cell parameter features, where the target cell is any cell among all cells; the semantic features and cell parameter features are then concatenated to obtain the feature vector of the target cell. It should be noted that the feature extraction model can be the BERT language model. Cell parameter features include, for example, cell text length and the number of neighboring cells.
[0051] For example, the BERT language model is used to extract 768-dimensional semantic features and 32-dimensional cell parameter features corresponding to the cell text of the target cell. The semantic features and cell parameter features are then concatenated to obtain an 800-dimensional feature vector of the target cell.
[0052] In some embodiments of this disclosure, the feature vector of each cell is updated based on the feature vector of each cell and the feature vectors of its neighboring cells to obtain the updated feature vector of each cell. One possible approach is to construct a heterogeneous graph structure for a target cell based on its feature vector and the feature vectors of its neighboring cells, where the target cell is any cell among all cells. The heterogeneous graph structure is then input into a graph neural network to update the feature vector of the target cell, resulting in the updated feature vector of the target cell. In this disclosure, each cell aggregates the feature vectors of its neighboring cells to update its own feature vector, improving the accuracy of understanding the table structure. It should be noted that the neighboring cells of the target cell are the individual cells above, below, to the left, and to the right of the target cell.
[0053] Figure 2 This is a schematic diagram of the structure of a cell identifier matrix provided in an embodiment of this disclosure. Figure 2 As shown, the neighboring cells of cell 7 are cells 4, 5, 8, and 9.
[0054] Optionally, a heterogeneous graph structure is constructed based on the feature vector of the target cell and the feature vectors of its neighboring cells. One possible approach is to use the target cell as the master node and its neighboring cells as slave nodes, adding directed edges from each slave node to the master node to obtain the heterogeneous graph structure. Here, the representation vector of the master node is the feature vector of the target cell, and the representation vector of each slave node is the feature vector of its neighboring cell. For all cells in the spreadsheet, a heterogeneous graph structure is constructed separately, and the feature vectors of each cell are updated using the heterogeneous graph structure of each cell, resulting in the updated feature vector for each cell.
[0055] In some embodiments of this disclosure, each cell is classified based on its updated feature vector to obtain the type of each cell. One possible approach is to input the updated feature vector corresponding to each cell into a fully connected neural network for cell classification to obtain the type of each cell, such as whether the cell belongs to the header or to the data cell. Note that the semantic-level table structure identified here, i.e., the type of each cell in the table, is distinct from the "table structure" in other technologies. In other technologies, table structure generally refers to the physical structure between the cells of a table, such as their vertical and horizontal adjacency relationships and whether they are merged cells. It should be noted that the updated feature vectors of the spreadsheet cells are fed into a fully connected neural network for classification to obtain the type of each cell. It should also be noted that the cell type includes, but is not limited to, row attributes, row indexes, column attributes, column indexes, and plain data. Among them, row attribute cells or column attribute cells are traditional table header cells, used to describe the cells to the right or below along the row or column direction, respectively; row index or column index cells are unique identifiers along the row or column direction, used to index the corresponding data, such as the data corresponding to the primary key column in a vertical table is the index of each row; pure data cells do not have the function of describing or indexing other cells, and their content needs to be understood in combination with the previous cell types.
[0056] Figure 3 This is a flowchart illustrating another method for obtaining table information provided in Embodiment 2 of this disclosure. Figure 3 As shown, the method includes:
[0057] S301: Identify the cell text in each cell of a spreadsheet;
[0058] S302: Extract features from the text of each cell to obtain the feature vector of each cell;
[0059] S303: For the target cell, construct a heterogeneous graph structure based on the feature vector of the target cell and the feature vectors of the neighboring cells of the target cell, where the target cell is any one of the cells;
[0060] S304: Input the heterogeneous graph structure into the graph neural network, update the feature vector of the target cell, and obtain the updated feature vector of the target cell;
[0061] S305: Based on the updated feature vector of each cell, classify each cell to obtain the type of each cell.
[0062] In this embodiment, the entity executing the above method can be a terminal device or a server.
[0063] When the executing entity is a terminal device, the type of terminal device is not limited. Terminal devices include, but are not limited to, any of the following: personal computers, laptops, tablets, mobile phones, smart bracelets, smartwatches, and smart speakers.
[0064] When the executing entity is a server, the implementation form of the server is not limited. For example, a server can be a conventional server, a cloud server, a cloud host, a virtual data center, or other server devices. The main components of a server include a processor, hard drive, memory, system bus, and common computer architecture types.
[0065] In this embodiment, the implementation of each step of the above method can be found in the description of the foregoing embodiments, and the corresponding technical effects can also be achieved, so they will not be repeated here.
[0066] Figure 4 This is a schematic diagram of the structure of a table information acquisition device 40 provided for an exemplary embodiment of the present disclosure. The table information acquisition device 40 includes an identification module 41, a feature extraction module 42, an update module 43, and a classification module 44.
[0067] Among them, the recognition module 41 is used to recognize the cell text of each cell in the spreadsheet;
[0068] The feature extraction module 42 is used to extract features from the cell text of each cell to obtain the feature vector of each cell;
[0069] The update module 43 is used to update the feature vector of each cell based on the feature vector of each cell and the feature vector of each cell's neighboring cells, so as to obtain the updated feature vector of each cell.
[0070] The classification module 44 is used to classify each cell based on the updated feature vector of each cell to obtain the type of each cell.
[0071] Optionally, when recognizing the cell text of each cell in the spreadsheet, the recognition module 41 is used to:
[0072] Perform text recognition on each cell to obtain the cell text;
[0073] After recognizing the cell text in each cell of a spreadsheet, the method also includes:
[0074] Assign a cell identifier to each cell along the row direction to form a cell identifier matrix;
[0075] Along the row direction of each cell, store the corresponding cell text for each cell according to the cell identifier.
[0076] Optionally, when the feature extraction module 42 extracts features from the cell text of each cell to obtain the feature vector of each cell, it is used for:
[0077] For the target cell, the cell text of the target cell is input into the feature extraction model to obtain semantic features and cell parameter features. The target cell is any cell among all cells.
[0078] The semantic features and cell parameter features are concatenated to obtain the feature vector of the target cell.
[0079] Optionally, when updating the feature vector of each cell based on the feature vector of each cell and the feature vectors of each cell's neighboring cells to obtain the updated feature vector of each cell, the update module 43 is used for:
[0080] For the target cell, a heterogeneous graph structure is constructed based on the feature vector of the target cell and the feature vectors of the neighboring cells of the target cell. The target cell can be any cell among the cells.
[0081] The heterogeneous graph structure is input into the graph neural network to update the feature vector of the target cell, thus obtaining the updated feature vector of the target cell.
[0082] Optionally, when constructing the heterogeneous graph structure based on the feature vector of the target cell and the feature vectors of the target cell's neighboring cells, the update module 43 is used for:
[0083] The target cell is designated as the master node, and its neighboring cells are designated as slave nodes. A directed edge is added from each slave node to the master node to obtain a heterogeneous graph structure. The representation vector of the master node is the feature vector of the target cell, and the representation vector of each slave node is the feature vector of each neighboring cell.
[0084] Optionally, when classifying each cell based on its updated feature vector to obtain the type of each cell, the classification module 44 is used for:
[0085] The updated feature vector corresponding to each cell is input into a fully connected neural network to classify the cells and obtain the type of each cell.
[0086] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here. Furthermore, the route planning apparatus of this disclosure can also achieve the same beneficial effects as the route planning method described above.
[0087] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0088] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0089] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0090] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0091] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as route planning methods. For example, in some embodiments, the route planning method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the route planning method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform route planning methods by any other suitable means (e.g., by means of firmware).
[0092] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0093] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0094] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0095] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0096] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0097] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0098] In the embodiments of the apparatus, device, storage device, and computer program products disclosed above, the cell text of each cell in a spreadsheet is identified; features are extracted from the cell text of each cell to obtain the feature vector of each cell; the feature vector of each cell is updated based on the feature vector of each cell and the feature vectors of the neighboring cells of each cell to obtain the updated feature vector of each cell; each cell is classified based on the updated feature vector of each cell to obtain the type of each cell, thereby more reasonably aggregating the information of neighboring cells in the local area of a cell, improving the accuracy of cell type identification, and enabling table structure understanding for more types of tables.
[0099] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0100] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for obtaining table information, comprising: Identify the text in each cell of a spreadsheet; The cell text of each cell is used to extract features to obtain the feature vector of each cell. This includes: for a target cell, inputting the cell text of the target cell into a feature extraction model to obtain semantic features and cell parameter features, wherein the target cell is any cell among the cells, and the cell parameter features include: cell text length and number of neighboring cells; concatenating the semantic features and the cell parameter features to obtain the feature vector of the target cell. Based on the feature vector of each cell and the feature vector of each cell's neighboring cells, the feature vector of each cell is updated to obtain the updated feature vector of each cell. This includes: for a target cell, the target cell is taken as the master node, the neighboring cells of the target cell are taken as slave nodes, and each slave node is added to the master node with a directed edge to obtain a heterogeneous graph structure. The heterogeneous graph structure is input into the graph neural network to update the feature vector of the target cell, thereby obtaining the updated feature vector of the target cell. Based on the updated feature vector of each cell, each cell is classified to obtain the type of each cell. The cell types include: row attributes, row index, column attributes, column index, and plain data.
2. The method according to claim 1, wherein, The identification of cell text in each cell of the spreadsheet includes: Perform text recognition on each cell to obtain the cell text for each cell; After identifying the cell text of each cell in the spreadsheet, the method further includes: Assign a cell identifier to each cell along the row direction to form a cell identifier matrix; Along the row direction of each cell, the corresponding cell text is stored for each cell according to the cell identifier.
3. The method according to claim 1, wherein, The step of classifying each cell based on its updated feature vector to obtain the type of each cell includes: The updated feature vector corresponding to each cell is input into a fully connected neural network to classify the cells and obtain the type of each cell.
4. A form information acquisition device, comprising: The recognition module is used to recognize the text in each cell of a spreadsheet. The feature extraction module is used to extract features from the cell text of each cell to obtain the feature vector of each cell; The update module is used to update the feature vector of each cell based on the feature vector of each cell and the feature vector of each cell's neighboring cells, so as to obtain the updated feature vector of each cell. The classification module is used to classify each cell according to the updated feature vector of each cell to obtain the type of each cell. The cell type includes: row attribute, row index, column attribute, column index, and plain data. The update module is used to take the target cell as the master node, the neighboring cells of the target cell as slave nodes, and add a directed edge to the master node for each slave node to obtain a heterogeneous graph structure. The heterogeneous graph structure is input into the graph neural network to update the feature vector of the target cell, thereby obtaining the updated feature vector of the target cell. When the feature extraction module extracts features from the cell text of each cell to obtain the feature vector of each cell, it is used for: For a target cell, the cell text of the target cell is input into a feature extraction model to obtain semantic features and cell parameter features. The target cell is any one of the cells. The cell parameter features include: cell text length and number of neighboring cells. The semantic features and the cell parameter features are concatenated to obtain the feature vector of the target cell.
5. The apparatus according to claim 4, wherein, When recognizing the text in each cell of a spreadsheet, the recognition module is used for: Perform text recognition on each cell to obtain the cell text for each cell; Following the identification of cell text in each cell of the spreadsheet, the following is also included: Assign a cell identifier to each cell along the row direction to form a cell identifier matrix; Along the row direction of each cell, the corresponding cell text is stored for each cell according to the cell identifier.
6. The apparatus according to claim 4, wherein, When the classification module classifies each cell based on its updated feature vector to obtain the type of each cell, it is used to: The updated feature vector corresponding to each cell is input into a fully connected neural network to classify the cells and obtain the type of each cell.
7. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
8. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-3.
9. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-3.
Citation Information
Patent Citations
Data processing method and device based on knowledge graph, electronic equipment and medium
CN113656592A
Table analysis method and device
CN114842489A