A method for adaptive extraction of table-like pictures

By using optical character recognition and cell information processing, the problem of the ineffective use of tabular image information has been solved, enabling adaptive extraction of tables and accurate matching of data items, and supporting data utilization in paperless office environments.

CN115393858BActive Publication Date: 2026-04-10南京通达海软件有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
南京通达海软件有限公司
Filing Date
2022-08-24
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively utilize the information in tabular images in paperless offices, resulting in the inability to match feature items during data mining, and traditional OCR methods cannot correctly identify and restore the content of table cells.

Method used

By acquiring character and cell information through optical character recognition, calculating cell coordinates and filling in blank cells, a complete spreadsheet is constructed, and data item labels are defined. Data item values ​​are matched according to relative positions to achieve adaptive extraction of table-like images.

Benefits of technology

This technology enables the restoration of table structures in memory and the matching of data item values, laying the foundation for subsequent information utilization and improving the accuracy and consistency of data extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393858B_ABST
    Figure CN115393858B_ABST
Patent Text Reader

Abstract

The application discloses a kind of self-adapting extraction methods of table picture, steps include: the material containing table of paper quality is obtained by optical character recognition after each character's coordinate information and cell information;The cell information includes cross row or cross column, and lacks blank cell information;After reading the cell information, the coordinate position of all cells is accurately calculated, and the blank cell is filled, to construct a complete electronic table;Definition needs to extract data item, including form type table, list type, wherein form type table supports <tag, value, direction> pair, also supports the definition of <coordinate, value> pair;According to the table constructed and the defined data item, it is extracted again.The application obtains text and cell data by OCR, reconstructs table, and then accurately extracts data item according to the definition of data item, lays the foundation for developing paperless office.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer application, and particularly, to a self-adaptive extraction method of table picture. BACKGROUND

[0002] In the process of paperless office, a common scenario is that the paper materials submitted by the parties are in the form of a table. In the business system, the contents in the table need to be used.

[0003] The result of traditional OCR (Optical Character Recognition) can extract pure text, but the text in the image can only be copied according to the row, which will cause the text in different cells to be mixed together and the information obtained by image recognition cannot be effectively utilized. In the process of paperless office, some original paper text materials are in the form of a table, for example, a real estate right certificate. After scanning and recognition, the text mode is converted into a PDF electronic document, and then the text information is extracted. At this time, if there is a table and the content in a cell is multi-line, the same lines will be together in the extracted text information, causing the content in the original same cell to be scattered. This situation will cause the characteristic items to be not matched in the subsequent data mining.

[0004] CN202111134361.1 discloses a method for converting a table in an image into an electronic table. Step S1: according to the text lines and lines in the image, the image is corrected and rectified. Step S2: an anchor-free target detection method is used in the image to determine the position of the table in the image, also known as the table area of the image. Step S3: the table lines in the table area of the image are detected. Step S4: according to the text line information obtained by optical character recognition on the table area of the image, the false table lines are removed to obtain the real table lines. Step S5: according to the positional relationship between the table lines, all the table lines are classified into groups of rows and columns. Step S6: the cells are constructed according to the group classification of the table lines, and the optical character recognition results in each cell range are saved as the text information in the cell. Step S7: if there is a missing cell, the cell is filled in the corresponding position to obtain a complete structured electronic table. SUMMARY

[0005] In view of the problems in the prior art, the present application provides a self-adaptive extraction method of table picture, which can restore a table from an OCR result in the memory, match the corresponding cell according to the definition of various data item labels in the model library, and then obtain the value of the data item according to the relative position of the value and the label, thereby laying a good foundation for the information utilization in the subsequent link.

[0006] The object of the present application is achieved by the following technical solutions.

[0007] An adaptive extraction method of table type pictures, steps include:

[0008] 1) After the paper material containing table is recognized by optical character recognition, the coordinate information of each character and the cell information are obtained;

[0009] 2) The cell information includes cross row or cross column, and lacks blank cell information;

[0010] 3) After the cell information is read, the coordinate positions of all cells are accurately calculated, and the blank cells are filled to construct a complete electronic table;

[0011] 4) The data items to be extracted are defined, including form type table and list type, wherein the form type table supports <label, value, direction> pair and also supports <coordinate, value> pair definition;

[0012] 5) Then, the extraction is performed according to the constructed table and the defined data items.

[0013] The cell information includes cell serial number, row serial number, column serial number and value.

[0014] The step 5) includes list type table extraction and form type table extraction.

[0015] The list type table extraction groups the cell information list by row, and matches the table header of the defined table type data by row cycle, if the matching is successful, the subsequent row extracts the information item of the table. When extracting, the table header and the extracted cell are marked as extracted, and the extracted cell is ignored in the subsequent extraction step.

[0016] The form type table extraction cycles the unextracted cells from left to right and from top to bottom, if the title defined by the form type is hit, the corresponding value is taken according to the defined position, and the cycle is ended.

[0017] Compared with the prior art, the advantages of the present application are that the table type image can be restored into a table in the memory according to the results of OCR, the corresponding cells are matched according to the definition of various data item labels in the model library, and then the value of the data item is obtained according to the relative position of the value and the label, which fully lays a foundation for the information utilization of the subsequent link and lays a foundation for developing paperless office. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 It is the flow framework diagram of the present application.

[0019] Figure 2 It is the table schematic diagram of the embodiment of the present application. DETAILED DESCRIPTION

[0020] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0021] like Figure 1 As shown, an adaptive extraction method for table-type images includes the following steps:

[0022] 1) Obtain the coordinate information of each character and cell information from paper materials containing tables through optical character recognition;

[0023] 2) The cell information includes information spanning multiple rows or columns, and lacks blank cell information;

[0024] 3) After reading the cell information, accurately calculate the coordinates of all cells and fill in any blank cells to construct a complete spreadsheet;

[0025] 4) Define the data items to be extracted, including form type (table) and list type. The form type (table) supports <label, value, location> pairs and <coordinate, value> pairs.

[0026] 5) Then extract data based on the constructed table and defined data items.

[0027] The cell information includes cell number, row number, column number, and value.

[0028] Step 5) includes extracting list-type tables and form-type tables.

[0029] The table extraction process involves grouping the cell information list by row, looping through the rows, and matching the header of the defined table data. If a match is found, the information items of that table are extracted from the subsequent rows. During extraction, the header and cells that have already been extracted are marked as extracted, and these cells are ignored in subsequent extraction steps.

[0030] The form-type table extracts cells that have not been extracted from left to right and top to bottom. If the form type's header is matched, the corresponding value is retrieved according to the defined position until the loop ends. Example

[0031] Utilize Figure 2 The original image of the table shown is as follows: 1. Table Construction: The data recognized by OCR is parsed to identify a list of all cell information. Cell information includes cell number (increasing from left to right and top to bottom), row number, column number, and value. The original information of the first three cells is as follows:

[0032] {"tableCellId":0,"word":"Rights Registration Information","xsc":0,"xec":0,"ysc":0,"yec":3},

[0033] {"tableCellId":1,"word":"right holder","xsc":1,"xec":1,"ysc":0,"yec":0},

[0034] {"tableCellId":2,"word":"Jiangsu *** Machinery Group Co., Ltd. ","xsc":2,"xec":3,"ysc":0,"yec":0},

[0035] The constructed electronic form information is as follows:

[0036] Right registration information Right registration information = 0_0_0, Jiangsu *** Machinery Group Co., Ltd. = 0_0_2, right holder = 0_0_1. The three values after “= ” are table number, row number and column number respectively. The column number of cross-column needs to be deducted from the occupied column number. For example, the column number of “registration time” in the second row should be 1 instead of 0.

[0037] 2. List type table extraction: group the cell information list by row to obtain the following data:

[0038] 0_0_0 = right registration information right registration information,

[0039] 0_0_1 = right holder,

[0040] 0_0_2 = Jiangsu *** Machinery Group Co., Ltd.,

[0041] Cycle by row, match the table header that defines the table class data. If matched, extract the information items of the table in the subsequent rows. Mark the table header and the cells that have been extracted as extracted during extraction, and ignore the extracted cells in subsequent extraction steps. For example: traverse the table row by row, when scanning to the 5th row, find that the 5th row data is consistent with the defined table header data, consider the 5th row as the table header, and start extracting downward. Extract until the 8th row when judging that the table ends (end judgment: 1, the current row is the last row; 2, the number of columns in the current row and the number of columns in the row where the table header is located are inconsistent; 3, encounter the title in the definition). Record the three extracted data, and assemble them into XML later.

[0042] 3. Form class table extraction: from left to right, from top to bottom, cycle the cells that have not been extracted, if the title defined by the form type is hit, take the corresponding value according to the defined position, until the cycle ends. For example: traverse the remaining cells, the first cell is "right registration information", there is no definition, skip. The second cell is "right holder", it is found that it hits the definition "right holder-right", and the value "Jiangsu **..." of the cell to the right of the "right holder" cell is taken out, and is packaged into "right holder-Jiangsu **...". The third cell is "Jiangsu **...", there is no definition, skip. The fourth cell is "certificate number", it is found that it hits the definition "certificate number-right", and the value "Su (2016) Haian County..." of the cell to the right of the "certificate number" cell is taken out, and is packaged into "certificate number-(2016) Haian County...". Until the remaining cell cycle ends.

[0043] The object that can be achieved by the present application is:

[0044] Reconstruct the table in the memory, which can be multiple tables;

[0045] Traverse the table, match the data items in the model library;

[0046] Organize the return value.

[0047] The return result of the present example is as follows:

[0048] <?xml version="1.0" encoding="utf-8"?>

[0049] <eaj>

[0050] <bh>151< / bh>

[0051] <all>

[0052] <bdclist>

[0053] <bdcdyhdjh>320621110211 GB00046F 1< / bdcdyhdjh>

[0054] <zl>No. *** of Changjiang West Road, Hai'an Town< / zl>

[0055] <zh>6< / zh>

[0056] <zcs>1< / zcs>

[0057] <ghyt>Industrial< / ghyt>

[0058] <fwxz>>< / fwxz>

[0059] <jzmj>5642.3< / jzmj>

[0060] < / bdclist>

[0061] <bdclist>

[0062] <bdcdyhdjh>320621110211 GB00046F 1< / bdcdyhdjh>

[0063] <zl>No. *** of Changjiang West Road, Hai'an Town< / zl>

[0064] <zh>7< / zh>

[0065] <zcs>1< / zcs>

[0066] <ghyt>Industrial< / ghyt>

[0067] <fwxz>>< / fwxz>

[0068] <jzmj>3847.68< / jzmj>

[0069] < / bdclist>

[0070] <bdclist>

[0071] <bdcdyhdjh>320621110211 GB00046F 1< / bdcdyhdjh>

[0072] <zl>No. *** of Changjiang West Road, Hai'an Town< / zl>

[0073] <zh>8< / zh>

[0074] <zcs>>< / zcs>

[0075] <ghyt>Industrial< / ghyt>

[0076] <fwxz>>< / fwxz>

[0077] <jzmj>3326.07< / jzmj>

[0078] < / bdclist>

[0079] <qldjxx>

[0080] <qlr>Jiangsu *** Machinery Group Co., Ltd.< / qlr>

[0081] <zsh>No. 000**** of Real Estate Right of Hai'an County, Jiangsu (2016)< / zsh>

[0082] <djsj>2016-07-13< / djsj>

[0083] <gyqk>Single ownership< / gyqk>

[0084] <sfzx>No< / sfzx>

[0085] <zxsj>>< / zxsj>

[0086] <fj>6 buildings with a total construction area of 5642.30 m2, 7 buildings with a total construction area of 3847.68 m2, and 8 buildings with a total construction area of 3326.07 m2< / fj>

[0087] < / qldjxx>

[0088] < / all>

[0089] < / eaj> .

Claims

1. A method for adaptive extraction of table-like pictures, characterized by the steps of The method comprises the following steps: 1) obtaining the coordinate information of each character and the cell information by optical character recognition on paper materials containing tables; 2) the cell information includes cross rows or cross columns, and lacks blank cell information; 3) after reading the cell information, the coordinate positions of all cells are accurately calculated, and the blank cells are filled to construct a complete electronic table; 4) defining the data items to be extracted, including form type tables and list type tables, wherein the form type table supports <label, value, direction> pairs and <coordinate, value> pair definitions; 5) extracting according to the constructed table and the defined data items; the cell information includes cell serial number, row serial number, column serial number and value; the list type table extraction groups the cell information list by row, and matches the table header of the defined table type data in a row cycle; if the table header is matched, the information items of the table are extracted in the subsequent rows; the table header and the extracted cells are marked as extracted, and the extracted cells are ignored in the subsequent extraction steps; the form type table extraction cycles the unextracted cells from left to right and from top to bottom; if the title defined by the form type is hit, the corresponding value is taken according to the defined position until the cycle is completed.

2. The adaptive extraction method of table-like pictures according to claim 1, characterized in that The step 5) includes list type table extraction and form type table extraction.

Citation Information

Patent Citations

  • Method for converting table information extracted from PDF document into structured knowledge

    CN113326797A

  • Method and device for converting table in image into spreadsheet

    CN113688795A