Form detection in electronic forms

文档序号:1599147 发布日期:2020-01-07 浏览:28次 中文

阅读说明:本技术 电子表单中的表格检测 (Form detection in electronic forms ) 是由 董浩宇 韩石 傅周宇 张冬梅 于 2018-06-29 设计创作,主要内容包括:本公开涉及电子表单中的表格检测。根据本公开的实现,提出了一种用于确定电子表单中的表格的方案。在该方案中,可以提取电子表单中包括的多个单元格各自的多个属性。继而,可以基于提取的多个属性,确定多个单元格各自的特征。基于特征,可以将多个单元格划分为至少一个候选区域。基于至少一个候选区域,可以确定电子表单中的至少一个候选表格。通过该方案,可以基于电子表单中包括的多个单元格各自的属性来确定各个单元格的特征,进而可以基于针对各个单元格的特征来确定其中可能存在表格的候选区域。(The present disclosure relates to form detection in electronic forms. In accordance with implementations of the present disclosure, a scheme for determining a form in an electronic form is presented. In this scheme, a plurality of attributes of each of a plurality of cells included in the electronic form can be extracted. Then, based on the extracted plurality of attributes, respective features of the plurality of cells may be determined. Based on the features, the plurality of cells may be divided into at least one candidate region. Based on the at least one candidate region, at least one candidate form in the electronic form may be determined. With this scheme, the feature of each cell can be determined based on the respective attributes of the plurality of cells included in the electronic form, and then the candidate area in which the table may exist can be determined based on the feature for each cell.)

1. A computer-implemented method, comprising:

extracting a plurality of attributes of each of a plurality of cells included in the electronic form;

determining features of each of the plurality of cells based on the extracted plurality of attributes;

dividing the plurality of cells into at least one candidate region based on the features; and

determining at least one candidate form in the electronic form based on the at least one candidate area.

2. The method of claim 1, wherein extracting the plurality of attributes for each of the plurality of cells included in the electronic form comprises: for a given cell of the plurality of cells, extracting a plurality of attributes of the given cell based on at least any one of:

characters of data in the given cell, a format of the data in the given cell, and a style of the given cell.

3. The method of claim 1, wherein dividing the plurality of cells into at least one candidate region comprises:

obtaining a mapping relationship between a table in an electronic form and features of a plurality of cells included in the table, the mapping relationship being trained based on the features of the plurality of cells included in a set of sample electronic forms and the plurality of tables included in the set of sample electronic forms; and

determining the at least one candidate region based on the mapping relationship and the respective features of the respective cells of the plurality of cells.

4. The method of claim 3, wherein determining the at least one candidate region further comprises:

for a given candidate region of the at least one candidate region,

adjusting the boundary of the given candidate region to update the given candidate region based on the degree of matching of the given candidate region with the mapping relation.

5. The method of claim 3, further comprising:

determining whether a potential error exists in a given candidate region of the at least one candidate region;

responsive to determining that there is a potential error in the given candidate region, retrieving at least one real form in the electronic form; and

updating the mapping relationship based on the at least one real form and the characteristics of the plurality of cells in the electronic form.

6. The method of claim 5, further comprising: obtaining information describing a probability that a table is included in a candidate region of at least one candidate region obtained according to the mapping relationship, and wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises:

determining a probability of including a table in the given candidate region based on the information; and

determining that a potential error exists in the given candidate region in response to the probability being below a predetermined threshold probability.

7. The method of claim 5, further comprising: obtaining information describing a probability that a cell in the electronic form is within the table, and determining whether a potential error exists in a given candidate area of the at least one candidate area comprises:

determining a probability that a cell in the given region is within a table based on the information; and

determining that a potential error exists in the given candidate region in response to the probability being below a predetermined threshold probability.

8. The method of claim 5, wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises:

determining that a potential error exists in the given candidate region in response to an overlap between the given candidate region and another candidate region of the at least one candidate region.

9. The method of claim 5, wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises:

determining that a potential error exists in the given candidate region in response to an edge of the given candidate region including at least any one of a blank row and a blank column.

10. The method of claim 5, wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises:

determining whether a potential error exists in a given candidate region of the at least one candidate region based on a positional relationship between non-empty cells of the plurality of cells and the given candidate region.

11. An apparatus, comprising:

a processing unit; and

a memory coupled to the processing unit and containing instructions stored thereon that, when executed by the processing unit, cause the apparatus to:

extracting a plurality of attributes of each of a plurality of cells included in the electronic form;

determining features of each of the plurality of cells based on the extracted plurality of attributes;

dividing the plurality of cells into at least one candidate region based on the features; and

determining at least one candidate form in the electronic form based on the at least one candidate area.

12. The apparatus of claim 11, wherein extracting the plurality of attributes for each of the plurality of cells included in the electronic form comprises: for a given cell of the plurality of cells, extracting a plurality of attributes of the given cell based on at least any one of:

characters of data in the given cell, a format of the data in the given cell, and a style of the given cell.

13. The apparatus of claim 11, wherein dividing the plurality of cells into at least one candidate region comprises:

obtaining a mapping relationship between a table in an electronic form and features of a plurality of cells included in the table, the mapping relationship being trained based on the features of the plurality of cells included in a set of sample electronic forms and the plurality of tables included in the set of sample electronic forms; and

determining the at least one candidate region based on the mapping relationship and the respective features of the respective cells of the plurality of cells.

14. The apparatus of claim 13, wherein determining the at least one candidate region further comprises:

for a given candidate region of the at least one candidate region,

adjusting the boundary of the given candidate region to update the given candidate region based on the degree of matching of the given candidate region with the mapping relation.

15. The apparatus of claim 13, further comprising:

determining whether a potential error exists in a given candidate region of the at least one candidate region;

responsive to determining that there is a potential error in the given candidate region, retrieving at least one real form in the electronic form; and

updating the mapping relationship based on the at least one real form and the characteristics of the plurality of cells in the electronic form.

16. The apparatus of claim 15, further comprising: obtaining information describing a probability that a table is included in a candidate region of at least one candidate region obtained according to the mapping relationship, and wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises:

determining a probability of including a table in the given candidate region based on the information; and

determining that a potential error exists in the given candidate region in response to the probability being below a predetermined threshold probability.

17. The apparatus of claim 15, further comprising: obtaining information describing a probability that a cell in the electronic form is within the table, and determining whether a potential error exists in a given candidate area of the at least one candidate area comprises:

determining a probability that a cell in the given region is within a table based on the information; and

determining that a potential error exists in the given candidate region in response to the probability being below a predetermined threshold probability.

18. The apparatus of claim 15, wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises:

determining that a potential error exists in the given candidate region in response to an overlap between the given candidate region and another candidate region of the at least one candidate region.

19. The apparatus of claim 15, wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises:

determining that a potential error exists in the given candidate region in response to an edge of the given candidate region including at least any one of a blank row and a blank column.

20. The apparatus of claim 15, wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises:

determining whether a potential error exists in a given candidate region of the at least one candidate region based on a positional relationship between non-empty cells of the plurality of cells and the given candidate region.

21. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-10.

Background

With the advent of various electronic form (spreadsheet) editing tools, electronic forms have become an important data storage format in people's daily life. In particular, electronic forms have become the primary carrier of a wide variety of data in everyday workflows in industries such as banking, accounting, statistics, and the like. The electronic form editing tool provides a flexible workspace for the user, and the user of the editing tool can add one or more tables (tables) in the electronic form as desired.

However, since different users may have their own preferences in generating electronic forms, for example, some users may insert one form into an electronic form, while some users may insert multiple forms into an electronic form and deploy the multiple forms in the electronic form in a manner desired by themselves. Each table may have a different size and location, and there may be one or more blank cells in the respective tables. At this time, how to detect the area occupied by each form in the electronic form becomes a research hotspot. Further, since the subsequent processing for the electronic form depends to a large extent on accurately detecting the respective tables in the electronic form, it is expected that the detection processing can be performed with higher accuracy.

Disclosure of Invention

In accordance with implementations of the present disclosure, a scheme is provided for determining a form in an electronic form. In this scheme, a plurality of attributes of each of a plurality of cells included in the electronic form can be extracted. Then, based on the extracted plurality of attributes, respective features of the plurality of cells may be determined. Based on the features, the plurality of cells may be divided into at least one candidate region. Based on the at least one candidate region, at least one candidate form in the electronic form may be determined.

This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

Drawings

FIG. 1 schematically illustrates a block diagram of a computing environment in which implementations of the present disclosure can be implemented;

FIG. 2 schematically illustrates a block schematic diagram of a scheme for detecting forms in an electronic form, according to one implementation of the present disclosure;

FIG. 3 schematically illustrates a flow diagram of a method for detecting forms in an electronic form, according to one implementation of the present disclosure;

FIG. 4 schematically illustrates a block diagram of a scheme for obtaining a mapping relationship, according to one implementation of the present disclosure;

FIG. 5 schematically illustrates a block diagram for adjusting a location of a boundary in a given candidate region, according to one implementation of the present disclosure;

FIG. 6 schematically illustrates a block diagram of a method for updating a mapping relationship based on a detected error in a candidate region, according to one implementation of the present disclosure;

FIG. 7 schematically illustrates a block diagram for determining whether an error exists in a candidate region based on probabilities of whether individual cells in a spreadsheet are within a table according to one implementation of the present disclosure;

FIG. 8 schematically illustrates a block diagram for determining whether an error exists in a given candidate region based on whether the given candidate region overlaps with other candidate regions, according to one implementation of the present disclosure;

FIG. 9 schematically illustrates a block diagram for determining whether an error exists in a candidate region based on whether empty columns/rows are included in the candidate region, according to one implementation of the present disclosure;

FIG. 10A schematically illustrates a block diagram for determining whether an error exists in a candidate region based on blank cells included in the candidate region according to one implementation of the present disclosure; and

fig. 10B schematically illustrates a block diagram for determining whether an error exists in a candidate region based on non-blank cells outside of the candidate region according to one implementation of the present disclosure.

In the drawings, the same or similar reference characters are used to designate the same or similar elements.

Detailed Description

The present disclosure will now be discussed with reference to several example implementations. It should be understood that these implementations are discussed only to enable those of ordinary skill in the art to better understand and thus implement the present disclosure, and are not intended to imply any limitation on the scope of the present subject matter.

As used herein, the term "include" and its variants are to be read as open-ended terms meaning "including, but not limited to. The term "based on" is to be read as "based, at least in part, on". The terms "one implementation" and "an implementation" are to be read as "at least one implementation". The term "another implementation" is to be read as "at least one other implementation". The terms "first," "second," and the like may refer to different or the same object. Other explicit and implicit definitions are also possible below.

Currently, several companies have developed tools for editing electronic forms. For example, in Microsoft corporationIn this regard, the user may add one or more forms to the spreadsheet. Because different users may have different preferences, users may add multiple forms to a page and distribute the multiple forms at different locations in the spreadsheet according to the user's own preferences. At this time, how to detect the position of each form in the spreadsheet becomes a research hotspot.

According to one aspect, techniques have been developed to detect forms based on the locations of blank cells and non-blank cells in an electronic form. However, since blank cells are allowed to exist in a spreadsheet in actual applications, there will be a large number of blank cells in the form, especially when the form has not been filled with data. Therefore, the above technical solution is not highly accurate in detecting the table. According to another technical solution, a scheme of detecting a table based on identifying a header, and a data part of the table is also proposed. However, since there may be a complicated structure in the form drawn by the user, for example, a title may be omitted or a sub-form may also exist in the form header, which results in that the technical solution cannot accurately detect the form from the electronic form.

Accordingly, it is desirable to provide a solution for detecting forms from electronic forms in a convenient and efficient manner. Furthermore, the technical scheme is expected to be compatible with the existing electronic form editing tool, and more convenient, quicker and more accurate form detection is realized under the condition of not changing the existing data storage mode of the existing electronic form as much as possible.

Example Environment

The basic principles and several example implementations of the present disclosure are explained below with reference to the drawings. FIG. 1 illustrates a block diagram of a computing device 100 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the computing device 100 shown in FIG. 1 is merely exemplary and should not be construed as limiting in any way the functionality and scope of the embodiments described in this disclosure.

As shown in FIG. 1, computing device 100 comprises device 100 in the form of a general purpose computing device. Components of computing device 100 may include, but are not limited to, one or more processors or processing units 110, memory 120, storage 130, one or more input devices 140, one or more output devices 150, and one or more communication units 160.

In some embodiments, the computing device 100 may be implemented as various user terminals or service terminals. The service terminals may be servers, mainframe computing devices, etc. provided by various service providers. A user terminal such as any type of mobile terminal, fixed terminal or portable terminal, including a mobile handset, multimedia computer, multimedia tablet, internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, Personal Communication System (PCS) device, personal navigation device, Personal Digital Assistant (PDA), audio/video player, digital camera/camcorder, positioning device, television receiver, radio broadcast receiver, electronic book device, game device or any combination thereof, including accessories and peripherals of these devices or any combination thereof. It is also contemplated that computing device 100 can support any type of interface to the user (such as "wearable" circuitry, etc.).

The processing unit 110 may be a real or virtual processor and may be capable of performing various processes according to applications stored in the memory 120. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capabilities of the apparatus 100. The processing unit 110 may also be referred to as a Central Processing Unit (CPU), microprocessor, controller, microcontroller.

Computing device 100 typically includes a number of computer storage media. Such media may be any available media that is accessible by device 100 and includes, but is not limited to, volatile and non-volatile media, removable and non-removable media. Memory 120 may be volatile memory (e.g., registers, cache, Random Access Memory (RAM)), non-volatile memory (e.g., Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory), or some combination thereof.

Memory 120 may include an information providing module 125 configured to perform the functions of the various embodiments described herein. Note that in the present disclosure, the terms "information providing method" and "information providing module" are used interchangeably. The information providing module 125 may be accessed and executed by the processing unit 110 to implement the corresponding functionality.

Storage device 130 may be a removable or non-removable medium and may include a machine-readable medium, such as a flash drive, a magnetic disk, or any other medium that can be used to store information and/or data and that can be accessed within computing device 100.

The input device 140 may be one or more input devices such as a mouse, keyboard, touch screen, trackball, voice input device, and the like. Output device 150 may be one or more output devices such as a display, speakers, printer, or the like.

The communication unit 160 enables communication with another computing device over a communication medium. Additionally, the functionality of the components of the apparatus 100 may be implemented in a single computing cluster or multiple computing machines, which are capable of communicating over a communications connection. Thus, the computing device 100 may operate in a networked environment using logical connections to one or more other servers, Personal Computers (PCs), or another general network node. Computing device 100 may also communicate with one or more external devices (not shown), such as storage devices, display devices, etc., communicating with one or more devices that enable a user to interact with computing device 100, or communicating with any devices (e.g., network cards, modems, etc.) that enable computing device 100 to communicate with one or more other computing devices, as desired, via communication unit 160. Such communication may be performed via input/output (I/O) interfaces (not shown).

The computing device 100 may receive a pending electronic form 170 by way of the communication unit 160, which electronic form 170 may include one or more forms 172 and 174 therein. Alternatively, computing device 100 may also receive electronic form 170 via input device 140. The electronic form 170 is passed to the form detection module 125 for processing. According to an embodiment of the present disclosure, the form detection module 125 determines one or more candidate areas 182 and 184 in which a form may exist from the electronic form 170. As shown in the processed electronic form 180 of fig. 1, the form may be detected from the determined candidate areas 182 and 184.

It will be appreciated that communication between the form detection module 125 and the input device 140 and the output device 150 may be accomplished by means of an interface provided by an Operating System (OS) on the computing device 100. Examples of such interfaces include, but are not limited to, various Application Programming Interfaces (APIs).

Principle of operation

Hereinafter, the operation principle of the scheme of the present disclosure will be described in detail with reference to the accompanying drawings. In accordance with implementations of the present disclosure, a scheme is provided for detecting forms in an electronic form. Hereinafter, description will be made with reference to fig. 2. Referring to fig. 2, fig. 2 schematically illustrates a schematic block diagram of a scheme for detecting forms in an electronic form according to one implementation of the present disclosure. As shown in fig. 2, the blank spreadsheet 210 may include a plurality of cells (cells), wherein the cell 212 schematically illustrates one cell in the blank spreadsheet 210. Although the cells are shown in fig. 2 as having the same size, the cells may have different sizes according to one exemplary implementation of the present disclosure. It will be appreciated that the user may add one or more forms to the blank electronic form 210.

For example, a user may edit individual cells in a blank spreadsheet 210 and add a plurality of tables to the blank spreadsheet 210 to form the spreadsheet 170. For clarity, the blank cells included in the electronic form 170 are not shown here, but only the cells included in the two tables 172 and 174 are schematically shown. It will be appreciated that the user may add forms by editing the various cells in the electronic form 170. For example, a user may add data content such as characters, numbers, etc. to a cell, and the user may also modify the background color, size, etc. of the cell. At this point, the spreadsheet 170 is the spreadsheet to be processed to detect the forms therein.

As shown in fig. 2, a plurality of attributes may be extracted from a given cell of a plurality of cells included in the electronic form 170. This attribute may include, for example, any of the following aspects: the characters of the data in a given cell, the format of the data in a given cell, and the style of a given cell. Then, based on the extracted plurality of attributes, a respective feature of a given cell of the plurality of cells may be determined. For example, the extracted features of each cell may be stored in vector form. As shown in fig. 2, the feature vectors for each cell may be combined together to form a feature vector matrix as shown in the processed electronic form 180.

The plurality of cells may be divided into one or more candidate regions (e.g., 182 and 184) based on respective features of the cells of the plurality of cells. In this implementation, one or more candidate regions 182 and 184 may be obtained by clustering feature vectors of a plurality of cells. At this time, the obtained feature vectors of the cells in the candidate areas 182 and 184 have a higher association relationship, and thus one or more candidate tables in the electronic form may be determined based on the one or more candidate areas 182 and 184.

It will be appreciated that multiple cells within a table may have some similarity. For example, in general, data in multiple cells within a table may have the same font, character size, and the same background color, among other attributes. With the above exemplary implementation, by extracting features of the respective cells and clustering the obtained features, one or more candidate regions in which a table may exist can be determined in a simple and efficient manner. Further, a table may be determined based on the determined one or more candidate regions.

Example procedure

Hereinafter, a detailed operation flow of the method of the present disclosure will be described in detail with reference to fig. 3. FIG. 3 schematically illustrates a flow diagram of a method 300 for detecting forms in an electronic form 170, according to one implementation of the present disclosure. At block 310, a plurality of attributes for each of a plurality of cells included in the electronic form 170 may be extracted. According to one exemplary implementation of the present disclosure, the electronic form 170 may have a predetermined size (e.g., a predetermined length and width), at which time attributes may be extracted from a plurality of cells within the predetermined size. According to an exemplary implementation of the present disclosure, the electronic form 170 may also have a non-fixed size, and the area where the non-empty cell in the electronic form is located may be used as the size of the electronic form.

It will be understood that the electronic form 170 described in the context of the present disclosure may include one or more pages (e.g., one or more pagination tabs in an Excel file). For simplicity of description, a specific implementation of identifying a form from one page in the electronic form 170 will be described below, with similar operations for other pages in the electronic form 170. In this implementation, the attributes of a cell may include aspects such as the characters of the data in the cell, the format of the data in the cell, and the style of the cell. The attributes may be extracted from at least any of the above aspects.

At block 320, based on the extracted plurality of attributes, a characteristic of each of the plurality of cells may be determined. The features corresponding to each cell may be stored in the form of a feature vector. At this time, each of the extracted attributes may be regarded as one dimension in the feature vector. According to one exemplary implementation of the present disclosure, assuming that 10 attributes are extracted, the dimension of the feature vector may be 10 at this time. For another example, when other numbers of attributes are extracted, then the dimensions of the feature vector may be set to other values.

At block 330, the plurality of cells may be divided into at least one candidate region 182 and 184 based on the features. Typically, multiple cells within a table will have some similarity, e.g., a user will typically set each cell within one table to the same ground color and each cell within another table to another ground color. In the case where the extracted attributes include the ground color of the cells and whether the character strings in the cells are empty, by clustering the respective cells according to the "ground color", different candidate regions of the cells including different ground colors in the electronic form 170 can be obtained. It will be appreciated that although only a simple example of clustering cells by "undertones" is schematically illustrated in this operation, according to one exemplary implementation of the present disclosure, the feature vector may include more dimensions and the cells may also be divided into candidate regions 182 and 184 according to more complex rules.

Then, at block 340, at least one candidate form in the electronic form 170 may be determined based on the at least one candidate areas 182 and 184. Having determined one or more candidate areas 182 and 184 included in the electronic form 170, a candidate table may be determined from each of the candidate areas. The steps of the method according to one exemplary implementation of the present disclosure have been generally described above, and more details of each step will be described in detail below.

Extracting attributes of cells

According to one exemplary implementation of the present disclosure, the attributes may include various aspects, and the plurality of attributes of the respective cells may be extracted based on at least any one of: characters of data in the corresponding cell, a format of the data in the corresponding cell, and a style of the corresponding cell. With the above exemplary implementation, aspects of the features of cells in an electronic form may be extracted. In this way, the accuracy of detecting forms in the electronic form 170 may be improved.

According to one exemplary implementation of the present disclosure, attributes of a cell may be extracted based on characters of data in the cell. As shown in table 1 below, the first column in table 1 represents the serial number of the attribute associated with the character string, the second column represents a detailed description of the attribute, and the third column represents the data type of the attribute. Taking the record in line 1 in table 1 as an example, the record is the first attribute, and the attribute indicates whether the character string of the data in the cell is empty. In the example of table 1, if a string within a cell is empty (i.e., does not include any content), the corresponding attribute may be set to "0" at this time; if the string within a cell is not empty (i.e., includes characters), then the corresponding attribute may be set to "1" at this time. Similarly, the 2 nd row in this table 1 represents the length of a character string in a cell, and the length of a character string may be represented in an integer. In lines 3-4 of Table 1, the percentage of digits/letters in the string may be represented by a numerical value between [0,1 ]. In lines 5-6 of table 1, whether or not the character string includes "%" and "-", may be represented in boolean form.

TABLE 1 string-related attributes

Serial number Description of the invention Type of value
1 Whether a string is empty Boolean type
2 Length of character string Shaping machine
3 Percentage of digits in a string [0,1]
4 Percentage of letters in a character string [0,1]
5 Whether a string includes a percentile "%". Boolean type
6 Whether the string includes a decimal point. Boolean type

It will be appreciated that examples of attributes are shown only schematically in table 1 above, and that character-related attributes may include more, less, or different content according to one exemplary implementation of the present disclosure.

In the following, examples of attributes associated with the data format in a cell are schematically shown in table 2. As shown in table 2 below, the first column in this table 2 represents the order number of the attribute associated with the data format, the second column represents a detailed description of the attribute, and the third column represents the data type of the attribute. Taking the record in line 1 in table 2 as an example, the record is the first attribute, and the attribute indicates whether the data format in the cell matches a predetermined template.

The templates herein may include multiple types, for example, fractional type templates may be denoted as ". x.", percent type templates may be denoted as ". x%", and so on. If the data format in the cell belongs to a certain type of template, the corresponding attribute may be set to "1" at this time; otherwise the corresponding attribute may be set to "0". Similarly, rows 2 and 3 in this table 2 indicate whether the data format in the cell matches the date template, the time template, respectively, row 4 indicates the length of the template to which the data in the cell matches, and row 5 identifies whether the data in the cell includes a formula.

TABLE 2 data Format related Attribute

Figure BDA0001713809700000101

It will be appreciated that examples of attributes are shown only schematically in table 2 above, and that data format-related attributes may include more, less or different content according to one exemplary implementation of the present disclosure.

Hereinafter, an example of attributes associated with the style of a cell is schematically shown in table 3. As shown in table 3 below, the first column in this table 3 represents the order number of the attribute associated with the data format, the second column represents a detailed description of the attribute, and the third column represents the data type of the attribute. Taking the record in line 1 in table 3 as an example, the record is the first attribute, and the attribute represents the background color of the cell. In this implementation, the color value may be quantized to a level between values 0 and 100, where 0 represents pure white and 100 represents pure black. In this case, for example, white may be represented by 4. In another implementation, the color values may be represented in RGB format, e.g., a pure white background may be represented as (255, 255, 255). The specific meaning of each attribute will be understood by those skilled in the art based on the description in the second column in table 3, and will not be described herein.

TABLE 3 Style-related attributes

Serial number Description of the invention Type of value
1 Background colour of cells, e.g. white Colour values
2 The colour of the string in the cell, e.g. black Colour values
3 Whether the character string is bold Boolean type
4 Whether a string is italicized or not Boolean type
5 Whether a character string is underlined Boolean type
6 Whether or not there is a blank at the left boundary Boolean type
7 Whether or not there is a blank at the right boundary Boolean type
8 Whether or not there is a blank at the upper boundary Boolean type
9 Whether or not there is a blank at the lower boundary Boolean type
10 Whether or not to fuse with horizontally adjacent cells Boolean type
11 Whether or not to merge with vertically adjacent cells Boolean type

Determining characteristics of cells

Specific examples of how to extract attributes for a given cell have been described above with reference to tables 1 to 3. Hereinafter, how to determine the features of the cells based on the extracted attributes will be described in detail.

The string-related attributes of the cells may be determined based on the descriptions in table 1. For example, assuming that the string "hello" is included within a given cell, the string-related property in that cell may be represented as vector 1: (1,5,0,1,0,0). The attribute indicates that the character string included in a given cell is not empty, the character string has a length of 5, no number is included in the character string, all characters in the character string are letters, the character string does not include a percentile, and no decimal point.

The data format-related attributes of the cells may be determined based on the descriptions in table 2. For example, continuing the example above for the string "hello", the data format related attribute for that cell may be represented as vector 2: (0,0,0,0,0). The attribute indicates that the data included within a given cell does not match any type of template, the length of the matched template is 0, and no formula is included.

The style-related attributes of the cells may be determined based on the description in table 3. Suppose that the background color of the string "hello" is white, the string color is black, a regular font, there is no blank space with each boundary, and there is no fusion of cells with other cells. At this time, the style-associated attribute of the cell may be represented as vector 3: (4, 96,0,0,0,0,0,0,0,0,0).

According to one exemplary implementation of the present disclosure, the above vectors 1-3 may be combined to obtain a feature vector of a cell. For example, the vectors 1-3 can be connected, and for example, weights can be set for each dimension in the vectors. For simplicity of description, in the following, the feature vector of a cell is determined only based on the following three attributes: whether the character string is empty, whether the data format matches the digital template, the background color of the cell. The feature vector for the given cell at this time may be represented as (1, 0, 4). It will be appreciated that although the above is merely an example of determining a feature vector based on attributes included in tables 1-3, according to one exemplary implementation of the present disclosure, a feature vector may also be determined based on other attributes not included in tables 1-3.

Determining candidate regions

According to an exemplary implementation of the present disclosure, the one or more candidate regions 182 and 184 may be determined in a variety of ways. For example, a mapping relationship between a table in an electronic form and features of a plurality of cells included in the table may be first obtained. It will be appreciated that the mapping herein may be defined based on historical empirical values. For example, historical experience finds that cells within a table may have the same background color, and a mapping relationship may be established between cells having the same background color and the table at this time. According to the mapping relationship, cells with the same background color can be divided into the same candidate region. For another example, a mapping relationship may be established between cells with the same font color and the table, and in this case, the cells with the same font color may be divided into the same candidate region. As another example, the mapping relationship may also be established based on a fusion relationship between cells. Assuming that one cell is merged with another cell, the two merged cells may be divided into the same candidate region.

According to one example implementation of the present disclosure, the mapping relationship may be trained based on features of a plurality of cells included in a set of sample electronic forms and a plurality of tables included in a set of sample electronic forms. Hereinafter, how to obtain the mapping relationship will be described with reference to fig. 4. Fig. 4 schematically illustrates a block diagram 400 of a scheme for obtaining a mapping 420 according to one implementation of the present disclosure. As shown in fig. 4, a set of sample electronic forms 410 may be pre-selected, and the characteristics 412 of the individual cells in the set of sample electronic forms 410 determined. One or more tables 414 included in the set of sample electronic forms 410 may also be marked. It will be understood that the table 414 herein refers to the table that actually exists in the set of prototype electronic forms 410. For example, the form 414 in the sample electronic form 410 may be labeled manually, or alternatively or additionally, the machine-recognized form may be corrected manually to obtain the form 414. The set of sample spreadsheets 410 and the labeled table 414 can then be used as input data to train on the mapping 420.

It will be understood that the specific type of mapping relationships 420 is not limited in the context of this disclosure, and that a variety of knowledge learning techniques, either currently known or to be developed in the future, may be employed to define the mapping relationships 420. According to an example implementation of the present disclosure, mapping 420 may be obtained based on a neural network model. With the above-described exemplary implementation, the obtained mapping relationship 420 may include information about the tables 414 actually included in the set of sample spreadsheets 410, and this information may be used to predict candidate areas that may include candidate tables in other spreadsheets. In this way, candidate regions in the electronic form may be determined in a more accurate manner based on historical experience.

According to an exemplary implementation of the present disclosure, the mapping relationship 420 may be included in a knowledge model. Further, the knowledge model may include other aspects of knowledge. For example, the knowledge model may also include probability information describing a probability that a table is included in a candidate region of the one or more candidate regions obtained according to the mapping in mapping 420, and template (mask) information describing whether a cell in electronic form 170 is located within the table. More information on how to update the mapping relationships based on this knowledge will be described below.

Having obtained mapping 420, one or more candidate regions may be determined based on the mapping in mapping 420 and the respective features of the respective cells in the plurality of cells. In this implementation, the features of the multiple cells in the electronic form 170 to be processed may be used as input, and the multiple cells in the electronic form 170 may be divided into one or more candidate regions based on the features of the multiple cell inputs by applying the mapping relationship 420. It will be understood that the area herein refers to an area where the cells in each group are located after dividing the plurality of cells into different groups. In general, the candidate regions may be bounding boxes of cells in respective groupings.

According to one exemplary implementation of the present disclosure, for a given candidate region of the one or more candidate regions, the boundaries of the candidate region may be adjusted based on mapping relationship 420 to update the given candidate region. The candidate area 510 may include four boundaries, upper, lower, left, and right. In this implementation, any of the four boundaries described above may be adjusted individually to more accurately define the candidate region 510.

According to one exemplary implementation of the present disclosure, where candidate regions have been determined, adjustments may also be made for respective boundaries of the candidate regions. How to adjust the upper boundary of the candidate region will be described hereinafter with reference to fig. 5. Fig. 5 schematically illustrates a block diagram 500 for adjusting the position of a boundary in a given candidate region 510 according to one implementation of the present disclosure. As shown in fig. 5, assuming that a candidate area 510 (a box as indicated by a dotted line) has been determined, 4 boundaries of the candidate area 510 define an area in which a table may exist, and thus it is desirable to determine the range of the boundaries of the candidate area 510 as accurately as possible. At this time, the adjustment may be made for any boundary in the candidate region 510, which is only described in fig. 5 by taking the boundary 512 as an example.

As shown in fig. 5, an adjustment range 520 (a block shown by a dotted line) may be provided around the upper boundary 512, the width of the adjustment range 520 may be the same as the width of the candidate area 510, and the height of the adjustment range 520 may be set to a predetermined value. According to an exemplary implementation of the present disclosure, the predetermined value may be set to a fixed value, for example, a value of 8 or other values. The predetermined value may also be set to 1/4 or other ratios of the height of the candidate region 510 according to an exemplary implementation of the present disclosure.

In this implementation, the height of the adjustment range 520 may be set to a height of 6 cells. The upper boundary 512 may be set within the adjustment range 520 described above, for example, the upper boundary 512 may be adjusted downward by 1 to 3 lines, or the upper boundary 512 may also be adjusted upward by 1 to 3 lines, so as to obtain an adjusted region. Then, a degree to which the adjusted region matches mapping 420 may be determined, and if the adjusted region more closely matches mapping 420, the upper boundary 512 of the candidate region may be updated based on the adjusted region.

It will be appreciated that although only schematically shown above how the upper boundary of the candidate region 510 is adjusted. According to an exemplary implementation of the present disclosure, the lower boundary, the left boundary, and the right boundary of the candidate region 510 may also be adjusted respectively based on a similar manner. With the above exemplary implementation, the range of the candidate region 510 may be adjusted more precisely.

Updating of mapping relationships

How to determine the candidate region based on the mapping relation 420 has been described in detail above. There may also be situations where some inaccuracy factor may exist in mapping 420, resulting in potential errors in partitioning the resulting candidate regions based on the obtained mapping 420. Thus, upon discovering a potential error, mapping 420 may need to be further updated. According to an example implementation of the present disclosure, if it is determined that a potential error exists in a given candidate area of the one or more candidate areas, one or more real tables in the electronic form may be obtained and the mapping relationship 420 may be updated based on characteristics of the one or more real tables and a plurality of cells in the electronic form.

In particular, fig. 6 schematically illustrates a block diagram of a method 600 for updating mapping relationships 420 based on errors in candidate regions that have been detected according to one implementation of the present disclosure. As shown in fig. 6, it may first be determined at block 610 whether a potential error exists in a given candidate region. A potential error here is one where the state of a given candidate region does not match the historical empirical values. For example, assuming that the edge locations of a given candidate region include empty rows or columns, it may be determined that a potential error exists in the given candidate region. As another example, given that a large number of blank cells are included in a given candidate region, it may be determined that a potential error exists in the candidate region. According to an exemplary implementation of the present disclosure, there may be other rules to determine whether there is a potential error, as will be described below with reference to fig. 7-10.

When a potential error is found in a given candidate region, then operational flow proceeds to block 620 to obtain one or more real forms in the electronic form 170. In this process, the electronic form 170 in which the current candidate area is located may be submitted to manual processing, and the electronic form 170 may be accurately analyzed and one or more real forms in the electronic form 170 may be marked manually. Then, at block 630, the mapping relationship 420 can be updated based on the manually labeled real form or forms and the characteristics of the cells in the electronic form.

It will be appreciated that the form used as the training input at this time is a manually accurately labeled real form and may reflect the reality of the form within the spreadsheet. By updating mapping 420 with such a manually labeled real table, errors in mapping 420, particularly errors that result in association with potential errors in a given candidate region, may be corrected.

Detecting potential errors in candidate regions

In the context of the present disclosure, potential errors in a candidate region may be determined based on a variety of factors. According to one exemplary implementation of the present disclosure, whether a potential error exists may be determined based on probability information included in the knowledge model. In this implementation, the probability information describes a probability that a table is included in a candidate region of the one or more candidate regions obtained according to the mapping in mapping 420. Further, the probability of including a table in a given candidate region determined according to the method described above may be determined based on the probability information. If the probability is below a predetermined threshold probability, it is determined that a potential error exists in the given candidate region.

In this implementation, the probability information is obtained based on training of the sample spreadsheet, and the probability information may predict the probability that a table exists in a candidate region in the spreadsheet 170 to be processed based on experience associated with the sample spreadsheet. If the associated probability for a given candidate region 182 resulting from the partitioning is below a predetermined threshold, then the probability information may be considered to need to be updated based on the electronic form 210 at that time. With the above exemplary implementation, errors in mapping 420 may be effectively corrected.

Specifically, the probability information may include setting a table score (table score) for the given candidate region 182 resulting from the division, and the table score represents a probability that a real table is included in the given candidate region 182. The probability information may be trained based on manually labeled forms in the sample spreadsheet. According to one exemplary implementation of the present disclosure, the magnitude of the probability may be represented by a value between 0 and 1, which indicates that no table is likely included in a given candidate region, assuming that the probability for the candidate region is 0.1. If the probability for a given candidate region is 0.95, it indicates that the table is likely to be included in the candidate region.

When the features of the plurality of cells of the electronic form 170 are taken as input, based on the probability information, the probability that a table exists in the divided candidate regions 182 can be determined. For example, assuming that the determined probability is 0.85 and that the probability is below a predetermined probability threshold of 0.9, then it may be assumed that there is a potential error in a given candidate region 182. At this point, the real form in the given electronic form 170 may be manually annotated and the mapping 420 updated based on the characteristics of the real form and the plurality of cells of the given electronic form 170.

According to an exemplary implementation of the present disclosure, template information included in the knowledge model describing whether a cell in the electronic form 170 is located within a table may be further obtained. Fig. 7 schematically illustrates a block diagram 700 for determining whether an error exists in a candidate region 720 based on a probability of whether individual cells in a spreadsheet 710 are within a table, according to one implementation of the present disclosure. As shown in FIG. 7, for each cell in a given spreadsheet 710, a probability of whether each cell is inside or outside the table may be indicated. According to one exemplary implementation of the present disclosure, the template information may be represented using an M × N matrix, where M represents the width of the electronic form 710, N represents the height of the electronic form 710, and each element in the matrix may be represented using a numerical value between 0 and 1. For example, a cell may be represented by a 0 outside of the table and a 1 inside of the table.

In this implementation, the probability that a cell in a given region is located within a table may be determined based on the template information. If the probability is below a predetermined threshold probability, it is determined that a potential error exists in the given candidate region. As shown in fig. 7, for a candidate region 720, the probability values for each cell within the candidate region 720 may be averaged to determine whether there are potential errors in the candidate region 720. At this time, for the candidate region 720, the average value is (0.85+0.85+ … … +0.95)/12 is 0.941, and the average value is smaller than the predetermined threshold probability 0.95. At this point, it may be assumed that there is an error in the candidate region 720. In this manner, whether there is a potential error in the candidate region 720 may be determined in a more accurate manner.

According to one exemplary implementation of the present disclosure, a potential error is determined to exist in a given candidate region if there is an overlap between the given candidate region and another candidate region of the one or more candidate regions. It will be appreciated that conventional experience shows that there is no overlap between two forms in an electronic form. If there is an overlap between two candidate regions divided in the electronic form, it is reasonable to assume that there may be an error in the mapping 420 based on which the electronic form is processed.

With the above-described exemplary implementation, by manually labeling a real table in the electronic form 710 that results in an average value less than a predetermined threshold probability, and updating the mapping relationship 420 using the labeled real table and the characteristics of the plurality of cells in the electronic form 710, an error in the mapping relationship 420 that results in an average value less than a predetermined threshold probability can be effectively corrected.

Fig. 8 schematically illustrates a block diagram 800 for determining whether an error exists in a candidate region based on whether one candidate region overlaps with other candidate regions according to one implementation of the disclosure. As shown in fig. 8, electronic form 810 may be processed as described above, and candidate regions 820 and 830 may be obtained. As shown in fig. 8, there is an overlap area between the two candidate areas 820 and 830, so at this point it can be assumed that there is an error in the mapping 420 on which the electronic form 810 is processed and needs to be corrected.

With the above-described exemplary implementation, by manually labeling a real table in the electronic form 810 that causes overlapping candidate areas and updating the mapping relationship 420 using the labeled real table and the features of the plurality of cells in the electronic form 810, an error in the mapping relationship 420 that causes overlapping candidate areas can be effectively corrected.

According to one exemplary implementation of the present disclosure, it is determined that a potential error exists in a given candidate region if a boundary (edge) portion of the given candidate region includes at least any one of a blank row and a blank column. It will be appreciated that conventional experience has shown that the border portions of a table typically do not have blank rows or columns. If there is a blank line/blank column in the boundary portion of the candidate area obtained by the division, it is reasonable to consider that there may be an error in the mapping relation 420 on which the electronic form is based for processing.

Fig. 9 schematically illustrates a block diagram 900 for determining whether an error exists in a candidate region 920 based on whether a boundary portion of the candidate region 920 includes empty columns/rows according to one implementation of the present disclosure. As shown in fig. 9, the electronic form 910 may be processed as described above and candidate regions 920 may be obtained. As shown in fig. 9, there is a blank column to the right of the candidate area 920, so at this time it can be considered that there is an error in the mapping 420 on which the electronic form 810 is processed, and needs to be corrected.

With the above-described exemplary implementation, by manually labeling a real table in the electronic form 910 associated with a blank row/column and updating the mapping relationship 420 with the labeled real table and the characteristics of the plurality of cells in the electronic form 910, an error in the mapping relationship 420 that causes the blank row/column to occur at the boundary portion of the candidate area can be effectively corrected.

According to an exemplary implementation of the present disclosure, it may also be determined whether a potential error exists in a given candidate region of the one or more candidate regions based on a positional relationship between a non-empty/blank cell of the plurality of cells and the given candidate region. In this implementation, the discussion may be based on both the non-empty cells within the candidate region and the non-empty cells outside the candidate region, respectively.

According to one exemplary implementation of the present disclosure, a proportion of non-empty cells within a given candidate region is below a predetermined threshold, then it may be determined that a potential error exists. In other words, it is determined that a potential error exists in a given candidate region if the ratio of the number of blank cells within the given candidate region to the number of cells within the given candidate region is above a predetermined threshold ratio.

Fig. 10A schematically illustrates a block diagram 1000A for determining whether an error exists in a candidate region 1020A based on blank cells included in the candidate region 1020A according to one implementation of the present disclosure. As shown in fig. 10A, where the blank legend indicates blank cells and the shaded legend indicates non-blank cells. The electronic form 1010A may be processed as described above, and a candidate area 1020A may be obtained. As shown in fig. 10, the candidate area 1020 includes a large number of blank cells therein. Typically, only a small number of blank cells may be included in the table, e.g., less than a predetermined percentage (e.g., 20%, or other value) of the total number of cells. If the ratio of the number of blank cells to the total number of cells in the candidate area 1020A is above a predetermined threshold, then at this point it may be assumed that there is an error in the mapping 420 on which the spreadsheet 1010A is processed and needs to be corrected.

With the above-described exemplary implementation, by manually labeling a real table in the electronic form 1010A and updating the mapping relationship 420 with the labeled real table and the characteristics of the cells in the electronic form, an error in the mapping relationship 420 that causes a large number of blank cells to occur in a candidate area can be effectively corrected.

According to one exemplary implementation of the present disclosure, it is determined that a potential error exists in a given candidate region if a number of non-empty cells located outside of one or more candidate regions reaches a predetermined threshold.

Fig. 10B schematically illustrates a block diagram 1000B for determining whether an error exists in a candidate region based on non-blank cells outside of the candidate region according to one implementation of the present disclosure. As shown in fig. 10B, where the blank legend indicates blank cells and the shaded legend indicates non-blank cells. The electronic form 1010B may be processed as described above, and a candidate area 1020B may be obtained. As shown in fig. 10, one or more non-empty cells 1030B exist in addition to the candidate region 1020B. Generally, a non-empty cell in an electronic form should belong to a certain table. It can be seen that the situation shown in FIG. 10B may involve some non-empty cells being missed while processing electronic form 1010B, and thus at this point it may be assumed that there is an error in mapping 420 upon which electronic form 810 is processed and needs to be corrected.

With the above-described exemplary implementation, by manually labeling a real table in the electronic form 1010B and updating the mapping relationship 420 with the labeled real table and the characteristics of the cells in the electronic form, an error in the mapping relationship 420 that causes a non-empty cell to appear outside the candidate area can be effectively corrected.

Example implementation

Some example implementations of the present disclosure are listed below.

In one aspect, the present disclosure provides a computer-implemented method. The method comprises the following steps: extracting a plurality of attributes of each of a plurality of cells included in the electronic form; determining respective features of the plurality of cells based on the extracted plurality of attributes; dividing the plurality of cells into at least one candidate region based on the features; and determining at least one candidate form in the electronic form based on the at least one candidate area.

According to one exemplary implementation of the present disclosure, extracting a plurality of attributes of each of a plurality of cells included in an electronic form includes: for a given cell of the plurality of cells, extracting a plurality of attributes of the given cell based on at least any one of: the characters of the data in a given cell, the format of the data in a given cell, and the style of a given cell.

According to one exemplary implementation of the present disclosure, dividing the plurality of cells into at least one candidate region includes: obtaining a mapping relation between a table in the electronic form and features of a plurality of cells included in the table, wherein the mapping relation is obtained through training based on the features of the plurality of cells included in a group of sample electronic forms and the plurality of tables included in the group of sample electronic forms; and determining at least one candidate region based on the mapping relationship and the respective features of the respective cells of the plurality of cells.

According to an exemplary implementation of the present disclosure, determining at least one candidate region further comprises: for a given candidate region of the at least one candidate region, adjusting the boundary of the given candidate region to update the given candidate region based on the degree of matching of the given candidate region with the mapping relationship.

According to an exemplary implementation of the present disclosure, further comprising: determining whether a potential error exists in a given candidate region of the at least one candidate region; responsive to determining that there is a potential error in the given candidate region, obtaining at least one real form in the spreadsheet; and updating the mapping relation based on the at least one real table and the characteristics of the plurality of cells in the electronic form.

According to an exemplary implementation of the present disclosure, further comprising: obtaining information describing a probability that a table is included in a candidate region of the at least one candidate region obtained according to the mapping relationship, and wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises: determining a probability of including a table in a given candidate region based on the information; and determining that a potential error exists in the given candidate region in response to the probability being below a predetermined threshold probability.

According to an exemplary implementation of the present disclosure, further comprising: obtaining information describing a probability that a cell in the electronic form is within the table, and determining whether a potential error exists in a given candidate area of the at least one candidate area comprises: determining a probability that a cell in a given region is located within a table based on the information; and determining that a potential error exists in the given candidate region in response to the probability being below a predetermined threshold probability.

According to one exemplary implementation of the present disclosure, determining whether a potential error exists in a given candidate region of the at least one candidate region comprises: in response to there being an overlap between the given candidate region and another candidate region of the at least one candidate region, it is determined that a potential error exists in the given candidate region.

According to one exemplary implementation of the present disclosure, determining whether a potential error exists in a given candidate region of the at least one candidate region comprises: determining that a potential error exists in the given candidate region in response to the edge of the given candidate region including at least any one of a blank row and a blank column.

According to one exemplary implementation of the present disclosure, determining whether a potential error exists in a given candidate region of the at least one candidate region comprises: determining whether a potential error exists in a given candidate region of the at least one candidate region based on a positional relationship between non-empty cells of the plurality of cells and the given candidate region.

In yet another aspect, the present disclosure provides a computer-implemented device. The apparatus comprises: a processing unit; and a memory coupled to the processing unit and containing instructions stored thereon that, when executed by the processing unit, cause the apparatus to perform the following actions. The actions include: extracting a plurality of attributes of each of a plurality of cells included in the electronic form; determining respective features of the plurality of cells based on the extracted plurality of attributes; dividing the plurality of cells into at least one candidate region based on the features; and determining at least one candidate form in the electronic form based on the at least one candidate area.

According to one exemplary implementation of the present disclosure, extracting a plurality of attributes of each of a plurality of cells included in an electronic form includes: for a given cell of the plurality of cells, extracting a plurality of attributes of the given cell based on at least any one of: the characters of the data in a given cell, the format of the data in a given cell, and the style of a given cell.

According to one exemplary implementation of the present disclosure, dividing the plurality of cells into at least one candidate region includes: obtaining a mapping relation between a table in the electronic form and features of a plurality of cells included in the table, wherein the mapping relation is obtained through training based on the features of the plurality of cells included in a group of sample electronic forms and the plurality of tables included in the group of sample electronic forms; and determining at least one candidate region based on the mapping relationship and the respective features of the respective cells of the plurality of cells.

According to an exemplary implementation of the present disclosure, determining at least one candidate region further comprises: for a given candidate region of the at least one candidate region, adjusting the boundary of the given candidate region to update the given candidate region based on the degree of matching of the given candidate region with the mapping relationship.

According to an exemplary implementation of the present disclosure, further comprising: determining whether a potential error exists in a given candidate region of the at least one candidate region; responsive to determining that there is a potential error in the given candidate region, obtaining at least one real form in the spreadsheet; and updating the mapping relation based on the at least one real table and the characteristics of the plurality of cells in the electronic form.

According to an exemplary implementation of the present disclosure, further comprising: obtaining information describing a probability that a table is included in a candidate region of the at least one candidate region obtained according to the mapping relationship, and wherein determining whether a potential error exists in a given candidate region of the at least one candidate region comprises: determining a probability of including a table in a given candidate region based on the information; and determining that a potential error exists in the given candidate region in response to the probability being below a predetermined threshold probability.

According to an exemplary implementation of the present disclosure, further comprising: obtaining information describing a probability that a cell in the electronic form is within the table, and determining whether a potential error exists in a given candidate area of the at least one candidate area comprises: determining a probability that a cell in a given region is located within a table based on the information; and determining that a potential error exists in the given candidate region in response to the probability being below a predetermined threshold probability.

According to one exemplary implementation of the present disclosure, determining whether a potential error exists in a given candidate region of the at least one candidate region comprises: in response to there being an overlap between the given candidate region and another candidate region of the at least one candidate region, it is determined that a potential error exists in the given candidate region.

According to one exemplary implementation of the present disclosure, determining whether a potential error exists in a given candidate region of the at least one candidate region comprises: determining that a potential error exists in the given candidate region in response to the edge of the given candidate region including at least any one of a blank row and a blank column.

According to one exemplary implementation of the present disclosure, determining whether a potential error exists in a given candidate region of the at least one candidate region comprises: determining whether a potential error exists in a given candidate region of the at least one candidate region based on a positional relationship between non-empty cells of the plurality of cells and the given candidate region.

In yet another aspect, the present disclosure provides a non-transitory computer storage medium including machine executable instructions that, when executed by a device, cause the device to perform the method of any of the above aspects.

In yet another aspect, the present disclosure provides a computer program product tangibly stored in a non-transitory computer storage medium and comprising machine executable instructions that, when executed by a device, cause the device to perform the method of any of the above aspects.

The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.

Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate implementations can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.

Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种磁条卡读卡器抗干扰的解码方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!