Table detection method and device, computer device and readable storage medium

By employing a dual-layer screening mechanism and grid number filtering, the problem of high false positive rates in AI image detection methods is solved, achieving efficient and accurate table detection and reducing the risk of data leakage.

CN119007231BActive Publication Date: 2026-07-21PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2024-08-12
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, AI image detection methods have a high false positive rate when detecting business forms, which increases the risk of data leakage.

Method used

A two-layer screening mechanism is adopted. First, a table detection model is used for preliminary screening, and then a table structure parsing model is used for secondary screening. Pseudo-tables are filtered by the number of cells to reduce the false judgment rate.

Benefits of technology

It effectively improves the accuracy and efficiency of table detection, reduces the risk of data leakage, and enhances the level of data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119007231B_ABST
    Figure CN119007231B_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence, and can realize preliminary table form screening of a business image through a table form detection model based on a double-layer screening mechanism, secondary screening through a table form structure analysis model, and pseudo table form filtering through a grid number, so that the accuracy and efficiency of table form detection are effectively improved. The application relates to a table form detection method, device, equipment and medium. The method comprises the following steps: acquiring a first business image set; inputting each business image in the first business image set into a table form detection model for table form detection, to obtain a second business image set, wherein the second business image set comprises at least one business image containing a table form structure; inputting each business image in the second business image set into a table form structure analysis model for table form structure analysis, to obtain a grid number corresponding to each business image; and performing pseudo table form filtering on the second business image set according to the grid number corresponding to each business image, to obtain a third business image set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a table detection method, apparatus, computer device, and readable storage medium. Background Technology

[0002] In the financial industry (such as insurance and banking), customer service personnel play a crucial role, communicating with customers and handling various business issues. When processing customer inquiries, customer service personnel may need to access business forms containing sensitive information, such as personal identification numbers and contact details. However, improper actions or negligence could lead to the leakage of sensitive user data, causing serious losses to both users and the company. In practice, some customer service personnel inadvertently photograph internal business forms while processing transactions. To reduce the risk of data leakage, it is necessary to promptly detect whether these images contain business forms. Currently, AI (Artificial Intelligence) image detection methods are commonly used to detect the presence of business forms in images, but the false positive rate is too high.

[0003] Therefore, improving the accuracy of the test forms has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides a table detection method, apparatus, computer device, and readable storage medium, which can effectively improve the accuracy of table detection.

[0005] Firstly, this application provides a table detection method, the method comprising:

[0006] Obtain a first business image set, which includes multiple business images of the table to be identified;

[0007] Each of the business images in the first business image set is input into a preset table detection model for table detection to obtain a second business image set, the second business image set including at least one business image containing a table structure;

[0008] Each of the business images in the second business image set is input into the trained table structure parsing model to parse the table structure and obtain the number of cells corresponding to each business image;

[0009] The second business image set is filtered using a pseudo-table based on the number of grids corresponding to each business image to obtain a third business image set, which includes business images containing real tables.

[0010] Secondly, this application also provides a table detection device, the table detection device comprising:

[0011] A business image acquisition module is used to acquire a first business image set, which includes multiple business images of the table to be identified.

[0012] The table detection module is used to input each of the business images in the first business image set into a preset table detection model for table detection to obtain a second business image set, wherein the second business image set includes at least one business image containing a table structure.

[0013] The table structure parsing module is used to input each of the business images in the second business image set into the trained table structure parsing model to parse the table structure and obtain the number of cells corresponding to each business image.

[0014] The pseudo-table filtering module is used to perform pseudo-table filtering on the second business image set according to the number of cells corresponding to each business image to obtain a third business image set, wherein the third business image set includes business images containing real tables.

[0015] Thirdly, this application also provides a computer device, which includes a memory and a processor;

[0016] The memory is used to store computer programs;

[0017] The processor is configured to execute the computer program and, in executing the computer program, implement the table detection method as described above.

[0018] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the table detection method described above.

[0019] This application discloses a table detection method, apparatus, computer device, and readable storage medium. The method involves first inputting each business image from a first business image set into a preset table detection model for table detection to obtain a second business image set. Then, each business image from the second business image set is input into a trained table structure parsing model for table structure parsing to obtain the number of cells corresponding to each business image. Based on the number of cells corresponding to each business image, pseudo-tables are filtered from the second business image set to obtain business images containing real tables. This method achieves a two-layer filtering mechanism: first, the business images undergo preliminary table filtering through the table detection model; then, a secondary filtering is performed through the table structure parsing model; and finally, pseudo-tables are filtered out based on the number of cells. This significantly reduces the false positive rate and effectively improves the accuracy and efficiency of table detection. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application;

[0022] Figure 2 This is a schematic flowchart of a table detection method provided in an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of a service image in a first service image set provided in an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of a service image in a second service image set provided in an embodiment of this application;

[0025] Figure 5 This is a schematic flowchart illustrating the sub-steps of training a table structure parsing model according to an embodiment of this application;

[0026] Figure 6 This is a schematic block diagram of a table detection device provided in an embodiment of this application. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0028] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0029] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0030] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0031] In practice, some customer service staff inadvertently photograph internal company business spreadsheets while processing transactions. To reduce the risk of data leakage, it's crucial to promptly detect whether these images contain business spreadsheets. Currently, AI (Artificial Intelligence) image detection methods are commonly used to detect the presence of such spreadsheets. However, because application screenshots or text layouts often resemble real tables—for example, application homepage elements are typically neatly arranged—these screenshots are easily mistaken for tables, leading to a high false positive rate for AI image detection methods.

[0032] To address this, embodiments of this application provide a table detection method, apparatus, computer device, and readable storage medium. The table detection method, applicable to computer devices, employs a two-layer filtering mechanism: first, a table detection model performs initial table filtering on business images; then, a table structure parsing model performs secondary filtering, filtering for false tables based on the number of cells. This significantly reduces the false positive rate and effectively improves the accuracy and efficiency of table detection. Furthermore, by performing table detection on business images, images containing genuine tables can be detected promptly, allowing for rapid masking of such images. This prevents accidental leakage of enterprise or customer information, reduces the risk of data breaches, and enhances data security.

[0033] For example, a computer device can be a server or a terminal. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal can be an electronic device such as a smartphone, tablet, laptop, or desktop computer.

[0034] For example, business images can be photos or screenshots taken by customer service personnel while handling business, or images of chat interfaces between customer service personnel and customers during business communication, etc.

[0035] Please see Figure 1 , Figure 1This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may include a processor and a memory, wherein the processor and the memory can be connected via a bus, which can be any applicable bus such as an Inter-integrated Circuit (I2C) bus.

[0036] The memory may include a storage medium and internal memory. The storage medium may be a non-volatile storage medium or a volatile storage medium. The storage medium may store an operating system and computer programs, while the internal memory provides an environment for the execution of the computer programs stored in the storage medium. The computer programs include program instructions that, when executed, cause the processor to perform the table detection method described in any of the embodiments.

[0037] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0038] The processor can be a Central Processing Unit (CPU), but it can also be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor, or it can be any conventional processor.

[0039] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps:

[0040] A first business image set is obtained, which includes multiple business images of tables to be identified; each business image in the first business image set is input into a preset table detection model for table detection to obtain a second business image set, which includes at least one business image containing a table structure; each business image in the second business image set is input into a trained table structure parsing model for table structure parsing to obtain the number of cells corresponding to each business image; pseudo-table filtering is performed on the second business image set according to the number of cells corresponding to each business image to obtain a third business image set, which includes business images containing real tables.

[0041] In one embodiment, before the processor performs table structure parsing on the trained table structure parsing model inputting each service image from the second service image set to obtain the number of cells corresponding to each service image, it is also used to implement:

[0042] Obtain a preset number of business sample images, including a first business image containing a real table and a second business image containing a pseudo table; determine image training data based on the first and second business images; train the initial table structure parsing model to converge based on the image training data to obtain the trained table structure parsing model.

[0043] In one embodiment, the image training data includes business sample images and the true coordinates of each cell of the table in the business sample images; when the processor trains the initial table structure parsing model to convergence based on the image training data to obtain the trained table structure parsing model, it is used to implement:

[0044] The business sample images from the image training data are input into the initial table structure parsing model for grid detection training to obtain the predicted coordinates of the grids in the business sample images. The loss function value is calculated based on the predicted and ground truth coordinates of the grids in the business sample images to obtain the loss function value of the table structure parsing model for this round of training. If the loss function value is greater than the preset loss function threshold, the parameters of the table structure parsing model are adjusted and the next round of training is performed until the obtained loss function value is less than or equal to the loss function threshold, at which point the training ends and the trained table structure parsing model is obtained.

[0045] In one embodiment, when the processor determines image training data based on the first service image and the second service image, it is used to:

[0046] The table content in the first service image is filtered to obtain the third service image, and the table content in the second service image is filtered to obtain the fourth service image; the third service image is labeled with coordinates to obtain the third service image with coordinate labels, and the fourth service image is labeled with coordinates to obtain the fourth service image with coordinate labels; image training data is generated based on the third service image with coordinate labels and the fourth service image with coordinate labels.

[0047] In one embodiment, when the processor performs pseudo-table filtering on the second set of service images based on the number of grids corresponding to each service image to obtain the third set of service images, it is used to implement:

[0048] The business images in the second business image set with fewer than a preset number threshold are removed, and the business images with more or less than or equal to the number threshold are retained to obtain the third business image set; wherein, the business images with more or less than or equal to the number threshold are business images containing real tables.

[0049] The following detailed description, in conjunction with the accompanying drawings, outlines some embodiments of this application. Unless otherwise specified, the following embodiments and features described herein can be combined with each other. Please refer to... Figure 2 , Figure 2 This is a schematic flowchart illustrating a table detection method provided in an embodiment of this application. Figure 2 As shown, the table detection method may include steps S101 to S104.

[0050] Step S101: Obtain the first service image set, which includes multiple service images of the table to be identified.

[0051] For example, images of customer service personnel handling business within a preset time period can be collected as the first set of business images. These could include photos or screenshots taken by customer service personnel while handling business, or images of the chat interface between customer service personnel and customers during business communication, etc. The preset time period can be set according to actual circumstances, and the specific value is not limited here. For example, the preset time period could be the most recent half-month. Or, for example, the preset time period could be the most recent month.

[0052] For example, the first set of business images may include multiple business images of tables to be identified. It should be noted that the number of business images in the first set of business images may exceed one million. If each business image is manually checked to see if it contains a real table, it will consume a lot of manpower and time. Therefore, in order to improve the detection efficiency, it is necessary to use relevant table detection models for machine detection.

[0053] Step S102: Input each business image in the first business image set into a preset table detection model for table detection to obtain a second business image set. The second business image set includes at least one business image containing a table structure.

[0054] For example, after obtaining the first set of business images, each business image in the first set of business images can be input into a preset table detection model for table detection to obtain the second set of business images.

[0055] It should be noted that the table detection model is used to identify business images in the first business image set that contain a table structure. The table detection model can be a Table OCR table detection model, or other types of detection models; this application embodiment does not limit this. The specific process of table detection can be found in related technologies and will not be elaborated here.

[0056] Please see Figure 3 and Figure 4 , Figure 3 This is a schematic diagram of a service image in a first service image set provided in an embodiment of this application. Figure 4 This is a schematic diagram of service images in a second service image set provided in an embodiment of this application. For example, each service image in the first service image set (such as...) can be represented as a service image in the second service image set. Figure 3 As shown, the Table OCR model is used to detect tables, and the output is a business image containing a table structure (such as...). Figure 4 As shown in the figure, the table structure can be the bounding box of the table area in the business image.

[0057] It should be noted that the business images in the second business image set are images that retain the table structure but remove table content such as text, watermarks, and shadows.

[0058] In the above embodiments, by inputting each business image in the first business image set into a preset table detection model for table detection, the business images in the first business image set can be initially screened to obtain business images containing table structures. This can effectively reduce the number of business images that need to be parsed for table structures in the subsequent process, thereby improving the efficiency of table detection.

[0059] Step S103: Input each business image in the second business image set into the trained table structure parsing model to parse the table structure and obtain the number of cells corresponding to each business image.

[0060] For example, after obtaining the second set of business images, each business image in the second set of business images can be input into the trained table structure parsing model to parse the table structure and obtain the number of cells corresponding to each business image.

[0061] For example, a table structure parsing model is used to parse the table structure in a business image, detect cells in the image, and count and output the number of cells. This table structure parsing model is an encoder-decoder model; for example, it can be a trained YOLO (You Only Look Once) model, a Mask R-CNN (Faster R-CNN with added masking layers) model, an SSD (Single Shot MultiBox Detector) model, etc. A cell refers to a unit of a table in the business image.

[0062] For example, each business image in the second business image set can be input into the trained YOLO model to parse the table structure and obtain the number of cells corresponding to each business image.

[0063] In this embodiment, the table structure parsing model can be pre-trained to obtain a trained table structure parsing model. The training process of the table structure parsing model will be described in detail below.

[0064] Please see Figure 5 , Figure 5 This is a schematic flowchart illustrating the sub-steps of training a table structure parsing model according to an embodiment of this application. For example... Figure 5 As shown, it may include steps S201 to S203.

[0065] Step S201: Obtain a preset number of business sample images, including a first business image containing a real table and a second business image containing a pseudo table.

[0066] For example, when training a table structure parsing model, a preset number of business sample images can be obtained to train the model. The preset number can be set according to actual circumstances, and the specific value is not limited here.

[0067] The business sample images include a first business image containing a real table and a second business image containing a pseudo-table. It should be noted that a pseudo-table refers to a table with a table structure but not a real table; for example, a pseudo-table could be a screenshot of an application or a text layout.

[0068] Step S202: Determine image training data based on the first service image and the second service image.

[0069] For example, after obtaining a preset number of business sample images, image training data can be determined based on the first business image and the second business image in the business sample images.

[0070] In some embodiments, determining image training data based on a first service image and a second service image may include: filtering the table content in the first service image to obtain a third service image, and filtering the table content in the second service image to obtain a fourth service image; performing coordinate annotation on the third service image to obtain a third service image with coordinate labels, and performing coordinate annotation on the fourth service image to obtain a fourth service image with coordinate labels; and generating image training data based on the third service image with coordinate labels and the fourth service image with coordinate labels.

[0071] It should be noted that, in order to avoid interference from the table content in the business image on the table structure parsing, some table content in the business image that is unrelated to the table structure needs to be filtered out.

[0072] In some embodiments, the table content may include text, watermarks, borders, shadows, and of course, may also include some content unrelated to the table, such as signatures, QR codes, etc.

[0073] For example, the table content such as text, watermark, borders, and shadows in the first business image can be filtered to obtain the third business image, and the table content such as text, watermark, borders, and shadows in the second business image can be filtered to obtain the fourth business image. The specific process of filtering the table content can be found in related technologies and is not limited here.

[0074] By filtering the table content in the first business image and the table content in the second business image, interference from the table content with the recognition of the table structure can be avoided.

[0075] In this embodiment of the application, after obtaining the third service image and the fourth service image, it is necessary to perform coordinate annotation on the third service image and the fourth service image respectively, to obtain the third service image with coordinate labels and the fourth service image with coordinate labels. Here, coordinate annotation refers to annotating the coordinates of each cell in the table of the service image.

[0076] For example, coordinate labels can be manually applied to each cell of the table in the third and fourth service images. The coordinate labels carried in the third service image include the actual coordinates of each cell in the table within the third service image. Similarly, the coordinate labels carried in the fourth service image include the actual coordinates of each cell in the table within the fourth service image.

[0077] It should be noted that by annotating the coordinates of the third and fourth service images, the true coordinates of each cell in the table in the third and fourth service images can be obtained, which facilitates the calculation of the loss function value based on the true coordinates and predicted coordinates of each cell during the subsequent model training process.

[0078] For example, image training data can be generated based on a third service image carrying coordinate labels and a fourth service image carrying coordinate labels. The image training data includes service sample images and the true coordinates of each cell in the tables within the service sample images.

[0079] Step S203: Train the initial table structure parsing model until convergence based on the image training data to obtain the trained table structure parsing model.

[0080] For example, after determining the image training data based on the first business image and the second business image, the initial table structure parsing model can be trained to converge based on the image training data to obtain the trained table structure parsing model.

[0081] In some embodiments, training an initial table structure parsing model to convergence based on image training data to obtain a trained table structure parsing model may include: inputting business sample images from the image training data into the initial table structure parsing model for grid detection training to obtain the predicted coordinates corresponding to the grids of the table in the business sample images; calculating the loss function value based on the predicted coordinates and the true coordinates of the grids of the table in the business sample images to obtain the loss function value of the table structure parsing model in this round of training; if the loss function value is greater than a preset loss function threshold, adjusting the parameters of the table structure parsing model and performing the next round of training until the obtained loss function value is less than or equal to the loss function threshold, ending the training, and obtaining the trained table structure parsing model.

[0082] For example, business sample images from the image training data can be input into the initial table structure parsing model for grid detection training to obtain the predicted coordinates corresponding to the grid cells in the business sample images. The predicted coordinates can be the bounding box coordinates of the grid cells.

[0083] For example, the loss function value for this round of training of the table structure parsing model can be obtained by calculating the loss function value based on the predicted and true coordinates of the cells in the table in the business sample image, using a preset loss function. The loss function can include, but is not limited to, 0-1 loss function, absolute value loss function, logarithmic loss function, squared loss function, and exponential loss function, etc. For instance, the loss function value for this round of training of the table structure parsing model can be obtained by calculating the loss function value based on the predicted and true coordinates of the cells in the table in the business sample image, using the absolute value loss function. The specific process of calculating the loss function value can be found in relevant technologies and will not be elaborated here.

[0084] In this embodiment of the application, when the table structure parsing model is a YOLO model, the standard YOLO loss function can be used to calculate the loss function value based on the predicted coordinates and the true coordinates corresponding to the cells of the table in the business sample image, thereby obtaining the loss function value of the table structure parsing model in this round of training. The loss function value may include bounding box regression loss and classification loss.

[0085] For example, when the loss function value is greater than a preset loss function threshold, the parameters of the table structure parsing model can be adjusted, and the next round of training can be performed until the obtained loss function value is less than or equal to the loss function threshold, at which point the training ends, and the trained table structure parsing model is obtained. The preset loss function threshold can be set according to actual conditions, and its specific value is not limited here. Parameters may include the size of the convolution kernel, the convolution stride, the size of the pooling window, etc., in the table structure parsing model, and this application does not limit these parameters.

[0086] In the above embodiments, by generating specific image training data based on a first business image containing a real table and a second business image containing a pseudo table, and training the initial table structure parsing model to convergence based on the image training data, the trained table structure parsing model can have table structure parsing capabilities, thereby improving the accuracy of the table structure parsing model in counting the number of cells in the business image.

[0087] Step S104: Perform pseudo-table filtering on the second business image set according to the number of grids corresponding to each business image to obtain the third business image set. The third business image set includes business images containing real tables.

[0088] For example, after inputting each business image in the second business image set into the trained table structure parsing model to parse the table structure and obtain the number of cells corresponding to each business image, the second business image set can be filtered by pseudo-tables according to the number of cells corresponding to each business image to obtain a third business image set, which includes business images containing real tables.

[0089] In some embodiments, the second set of business images is filtered using a pseudo-table based on the number of grids corresponding to each business image to obtain a third set of business images. This may include: removing business images in the second set of business images whose grid data is less than a preset threshold, and retaining business images whose grid number is greater than or equal to the threshold to obtain a third set of business images; wherein, business images whose grid number is greater than or equal to the threshold are business images containing a real table.

[0090] For example, the preset quantity threshold can be set according to the actual situation, and the specific value is not limited here. For example, the quantity threshold can be 100. Business images with fewer than 100 grid data in the second business image set can be removed, and business images with more than or equal to 100 grid data can be retained to obtain the third business image set.

[0091] For example, after obtaining the third set of business images, business images containing real tables in the third set can be masked or anonymized. This can prevent accidental leakage of enterprise or customer information, reduce the risk of data leakage, and improve data security. The specific process of masking or anonymizing can be found in relevant technologies and will not be elaborated here.

[0092] It should be noted that, in this embodiment of the application, by setting a threshold for the number of grids, and based on the threshold, performing pseudo-table filtering on the second set of business images according to the number of grids corresponding to each business image, business images containing pseudo-tables can be effectively filtered out, reducing false identification, and thus effectively improving the overall accuracy and robustness of table detection.

[0093] The table detection method provided in the above embodiments can perform preliminary table screening of business images based on a two-layer filtering mechanism. First, a table detection model is used for initial table screening, followed by a secondary screening using a table structure parsing model. Pseudo-tables are filtered out based on the number of cells, which can significantly reduce the false positive rate and effectively improve the accuracy and efficiency of table detection. Furthermore, by performing table detection on business images, business images containing genuine tables can be detected in a timely manner. Subsequently, business images containing genuine tables can be quickly blocked, preventing accidental leakage of enterprise or customer information, reducing the risk of data leakage, and improving data security.

[0094] Please see Figure 6 , Figure 6 An embodiment of this application also provides a schematic block diagram of a table detection device 1000, which is used to perform the aforementioned table detection method. The table detection device 1000 can be configured in a computer device.

[0095] like Figure 6As shown, the table detection device 1000 includes: a business image acquisition module 1001, a table detection module 1002, a table structure parsing module 1003, and a pseudo-table filtering module 1004.

[0096] The business image acquisition module 1001 is used to acquire a first business image set, which includes multiple business images of the table to be identified.

[0097] The table detection module 1002 is used to input each business image in the first business image set into a preset table detection model for table detection to obtain a second business image set, the second business image set including at least one business image containing a table structure.

[0098] The table structure parsing module 1003 is used to input each business image in the second business image set into the trained table structure parsing model to parse the table structure and obtain the number of cells corresponding to each business image.

[0099] The pseudo-table filtering module 1004 is used to perform pseudo-table filtering on the second business image set according to the number of cells corresponding to each business image to obtain a third business image set, which includes business images containing real tables.

[0100] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the above-described apparatus and modules can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0101] The embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, and a processor executing the program instructions to implement any of the table detection methods provided in the embodiments of this application.

[0102] For example, when the program is loaded by the processor, it can perform the following steps:

[0103] A first business image set is obtained, which includes multiple business images of tables to be identified; each business image in the first business image set is input into a preset table detection model for table detection to obtain a second business image set, which includes at least one business image containing a table structure; each business image in the second business image set is input into a trained table structure parsing model for table structure parsing to obtain the number of cells corresponding to each business image; pseudo-table filtering is performed on the second business image set according to the number of cells corresponding to each business image to obtain a third business image set, which includes business images containing real tables.

[0104] The computer-readable storage medium can be an internal storage unit of the computer device described in the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, etc., provided on the computer device.

[0105] Furthermore, the computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of blockchain nodes, etc.

[0106] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0107] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A table detection method, characterized in that, include: Obtain a first business image set, which includes multiple business images of the table to be identified; Each of the business images in the first business image set is input into a preset table detection model for table detection to obtain a second business image set, the second business image set including at least one business image containing a table structure; Each of the business images in the second business image set is input into the trained table structure parsing model to parse the table structure and obtain the number of cells corresponding to each business image; The second business image set is filtered using a pseudo-table based on the number of grids corresponding to each business image to obtain a third business image set, which includes business images containing real tables. The step of performing pseudo-table filtering on the second business image set according to the number of grids corresponding to each business image to obtain a third business image set includes: removing business images in the second business image set whose number of grids is less than a preset threshold, and retaining business images whose number of grids is greater than or equal to the threshold, thereby obtaining the third business image set; wherein, business images whose number of grids is greater than or equal to the threshold are business images containing a real table.

2. The table detection method according to claim 1, characterized in that, Before inputting each of the service images in the second service image set into the trained table structure parsing model for table structure parsing to obtain the number of cells corresponding to each service image, the method further includes: Obtain a preset number of business sample images, the business sample images including a first business image containing a real table and a second business image containing a pseudo table; Based on the first service image and the second service image, determine the image training data; The initial table structure parsing model is trained until convergence based on the image training data to obtain the trained table structure parsing model.

3. The table detection method according to claim 2, characterized in that, The image training data includes the business sample image and the true coordinates of each cell in the table within the business sample image; The step of training the initial table structure parsing model based on the image training data until convergence to obtain the trained table structure parsing model includes: The business sample image in the image training data is input into the initial table structure parsing model for grid detection training to obtain the predicted coordinates corresponding to the grids of the table in the business sample image; The loss function value is calculated based on the predicted and true coordinates of the cells in the table in the business sample image to obtain the loss function value of the table structure parsing model for this round of training. If the loss function value is greater than the preset loss function threshold, the parameters of the table structure parsing model are adjusted, and the next round of training is performed until the obtained loss function value is less than or equal to the loss function threshold, then the training ends, and the trained table structure parsing model is obtained.

4. The table detection method according to claim 2, characterized in that, The step of determining image training data based on the first service image and the second service image includes: The table content in the first service image is filtered to obtain the third service image, and the table content in the second service image is filtered to obtain the fourth service image. The third service image is labeled with coordinates to obtain a third service image with coordinate labels, and the fourth service image is labeled with coordinates to obtain a fourth service image with coordinate labels. The image training data is generated based on the third service image carrying coordinate labels and the fourth service image carrying coordinate labels.

5. The table detection method according to claim 4, characterized in that, The table content includes text, watermark, border, and shadow.

6. The table detection method according to claim 4, characterized in that, The coordinate labels carried by the third service image include the actual coordinates of each cell in the table of the third service image.

7. A form detection device, characterized in that, For performing the table detection method according to any one of claims 1 to 6, the table detection apparatus comprises: A business image acquisition module is used to acquire a first business image set, which includes multiple business images of the table to be identified. The table detection module is used to input each of the business images in the first business image set into a preset table detection model for table detection to obtain a second business image set, wherein the second business image set includes at least one business image containing a table structure. The table structure parsing module is used to input each of the business images in the second business image set into the trained table structure parsing model to parse the table structure and obtain the number of cells corresponding to each business image. The pseudo-table filtering module is used to perform pseudo-table filtering on the second business image set according to the number of cells corresponding to each business image to obtain a third business image set, wherein the third business image set includes business images containing real tables.

8. A computer device, characterized in that, The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and, in executing the computer program, implement the table detection method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the table detection method as described in any one of claims 1 to 6.