Table identification method and device, computer equipment, storage medium and computer program product

By preprocessing and model recognition of table images, the tables and text content with high confidence are screened out, and the problem of low table recognition accuracy in the prior art is solved, achieving higher recognition accuracy and reducing manual intervention.

CN119445604AInactive Publication Date: 2025-02-14SHENZHEN LANLING SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510028217.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, there is a problem of low accuracy in table recognition in table images, which is mainly due to the subjective factors in manual identification, which is prone to errors.

Method used

Provide a table recognition method, by receiving the preset format to be analyzed by the client, performing preprocessing, and inputting it into the training table detection model and text recognition model to filter out the candidate table images with high confidence and text content, and then determine the content of the table.

Benefits of technology

It improves the accuracy of table recognition, reduces manual intervention, avoids identification errors caused by subjective factors, and enhances the certainty of identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445604A_ABST
    Figure CN119445604A_ABST
Patent Text Reader

Abstract

The invention relates to a table recognition method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: receiving a to-be-analyzed table image in a preset format sent by a client; preprocessing the table image to be analyzed to obtain a preprocessed table image; inputting the preprocessed table image into the trained table detection model to obtain position information and confidence of each candidate table image corresponding to the preprocessed table image; screening out the candidate table image with the confidence greater than a confidence threshold value from each candidate table image, and taking the candidate table image as a target table image; inputting the target table image into a character recognition model to obtain target character content corresponding to the target table image; and according to the position information corresponding to the target table image and the target text content, determining table content corresponding to the to-be-analyzed table image, and taking the table content as a table recognition result corresponding to the to-be-analyzed table image. By adopting the method, the accuracy of table recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a table recognition method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] At present, in order to ensure the effective use of table information, it is crucial to accurately recognize the table in the table image.

[0003] In traditional technology, in the process of recognizing a table in a table image, a manual recognition method is generally used; however, this manual recognition method has subjective factors and is prone to errors, resulting in low accuracy in table recognition. Summary of the invention

[0004] Based on this, it is necessary to provide a table recognition method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of table recognition in order to address the above technical problems.

[0005] In a first aspect, the present application provides a table recognition method, which is applied to a server, comprising:

[0006] Receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table;

[0007] Preprocessing the table image to be analyzed to obtain a preprocessed table image;

[0008] Inputting the preprocessed table image into a trained table detection model to obtain a plurality of candidate table images corresponding to the preprocessed table image, as well as position information and confidence of each candidate table image;

[0009] From each candidate table image, select a candidate table image whose confidence is greater than a confidence threshold as a target table image;

[0010] Inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image;

[0011] According to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed.

[0012] In one embodiment, the preprocessing of the table image to be analyzed to obtain the preprocessed table image includes:

[0013] Obtaining the current image size corresponding to the table image to be analyzed;

[0014] In the case where the current image size is not equal to the preset image size, performing size conversion processing on the table image to be analyzed to obtain a converted table image that meets the preset image size;

[0015] Determining an image tilt angle of the converted table image according to the second-order central moment of the converted table image;

[0016] In the case where the image tilt angle does not satisfy the preset tilt angle range, the converted table image is straightened to obtain a straightened table image as the pre-processed document image.

[0017] In one embodiment, the trained table detection model is trained in the following manner:

[0018] Get a sample table image;

[0019] Preprocessing the sample table image to obtain a preprocessed sample table image;

[0020] Inputting the preprocessed sample table image into the table detection model to be trained, obtaining a plurality of candidate sample table images corresponding to the preprocessed sample table image, and predicted position information and predicted confidence of each candidate sample table image;

[0021] The actual position information and the actual confidence of each candidate sample table image are obtained, and according to the difference between the predicted position information and the actual position information, and according to the difference between the predicted confidence and the actual confidence, the table detection model to be trained is iteratively trained to obtain the trained table detection model.

[0022] In one embodiment, the iterative training of the table detection model to be trained according to the difference between the predicted position information and the actual position information, and according to the difference between the predicted confidence and the actual confidence, to obtain the trained table detection model includes:

[0023] Obtaining a first loss value according to a difference between the predicted position information and the actual position information, and obtaining a second loss value according to a difference between the predicted confidence and the actual confidence;

[0024] Obtaining a first weight corresponding to the first loss value and a second weight corresponding to the second loss value;

[0025] According to the first weight and the second weight, the first loss value and the second loss value are fused to obtain a target loss value;

[0026] According to the target loss value, the table detection model to be trained is iteratively trained to obtain the trained table detection model.

[0027] In one embodiment, inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image includes:

[0028] Performing feature extraction processing on the target table image to obtain image features corresponding to the target table image;

[0029] Inputting the image features into a trained text recognition model to obtain the predicted probability of the target table image under each preset text content;

[0030] From the preset text contents, the preset text content with the highest prediction probability is selected as the target text content.

[0031] In one embodiment, determining the table content corresponding to the table image to be analyzed according to the position information and target text content corresponding to the target table image includes:

[0032] Determining a target table structure corresponding to the target table image according to the position information;

[0033] According to the target table structure, query the correspondence between the table structure and the hypertext markup language template, obtain the hypertext markup language template corresponding to the target table structure as the target hypertext markup language template corresponding to the target table image;

[0034] According to the position information, the target text content and the target hypertext markup language template are combined and processed to obtain the table content corresponding to the table image to be analyzed.

[0035] In one embodiment, after determining the table content corresponding to the table image to be analyzed according to the position information and target text content corresponding to the target table image as the table recognition result corresponding to the table image to be analyzed, the method further includes:

[0036] Performing integrity check processing on the table recognition result to obtain an integrity check result corresponding to the table recognition result;

[0037] If the integrity check result is passed, generating an input instruction corresponding to the table recognition result;

[0038] The table recognition result and the input instruction are sent to the client, so that the client performs input processing on the table recognition result according to the input instruction.

[0039] In a second aspect, the present application further provides a table recognition device, which is applied to a server, comprising:

[0040] An image receiving module, used for receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table;

[0041] An image processing module, used for preprocessing the table image to be analyzed to obtain a preprocessed table image;

[0042] A table detection module, used for inputting the preprocessed table image into a trained table detection model to obtain a plurality of candidate table images corresponding to the preprocessed table image, as well as position information and confidence of each candidate table image;

[0043] An image screening module, used for screening out the candidate table image with the confidence greater than the confidence threshold from each candidate table image as the target table image;

[0044] A text recognition module, used for inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image;

[0045] The result determination module is used to determine the table content corresponding to the table image to be analyzed according to the position information and target text content corresponding to the target table image, as the table recognition result corresponding to the table image to be analyzed.

[0046] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0047] Receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table;

[0048] Preprocessing the table image to be analyzed to obtain a preprocessed table image;

[0049] Inputting the preprocessed table image into a trained table detection model to obtain a plurality of candidate table images corresponding to the preprocessed table image, as well as position information and confidence of each candidate table image;

[0050] From each candidate table image, select a candidate table image whose confidence is greater than a confidence threshold as a target table image;

[0051] Inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image;

[0052] According to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed.

[0053] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0054] Receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table;

[0055] Preprocessing the table image to be analyzed to obtain a preprocessed table image;

[0056] Inputting the preprocessed table image into a trained table detection model to obtain a plurality of candidate table images corresponding to the preprocessed table image, as well as position information and confidence of each candidate table image;

[0057] From each candidate table image, select a candidate table image whose confidence is greater than a confidence threshold as a target table image;

[0058] Inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image;

[0059] According to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed.

[0060] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0061] Receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table;

[0062] Preprocessing the table image to be analyzed to obtain a preprocessed table image;

[0063] Inputting the preprocessed table image into a trained table detection model to obtain a plurality of candidate table images corresponding to the preprocessed table image, as well as position information and confidence of each candidate table image;

[0064] From each candidate table image, select a candidate table image whose confidence is greater than a confidence threshold as a target table image;

[0065] Inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image;

[0066] According to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed.

[0067] The above-mentioned table recognition method, device, computer equipment, storage medium and computer program product first receive a table image to be analyzed in a preset format sent by a client, and preprocess the table image to be analyzed to obtain a preprocessed table image, and then input the preprocessed table image into a trained table detection model to obtain multiple candidate table images corresponding to the preprocessed table image, as well as the position information and confidence of each candidate table image. Then, from each candidate table image, the candidate table image with a confidence greater than the confidence threshold is screened out as the target table image. Then, the target table image is input into the trained text recognition model to obtain the target text content corresponding to the target table image. Finally, according to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed. In this way, in the process of recognizing the table in the table image, the pre-processed table image to be analyzed is subjected to table detection processing and text recognition processing through the table detection model and the text recognition model, and according to the position information and the target text content corresponding to the target table image obtained after the model processing, the table content corresponding to the table image to be analyzed can be accurately obtained, thereby improving the accuracy of determining the table recognition result corresponding to the table image to be analyzed, which is conducive to improving the accuracy of table recognition; moreover, the whole process does not require human intervention, thus avoiding the defect of low accuracy of table recognition caused by subjective factors and prone to errors in manual recognition, thereby improving the accuracy of table recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0069] Figure 1 A diagram of an application environment of a table recognition method in an embodiment;

[0070] Figure 2 A schematic diagram of a flow chart of a table recognition method in one embodiment;

[0071] Figure 3 is a flow chart of a table recognition method in another embodiment;

[0072] Figure 4 A flowchart of a method for detecting and recognizing handwritten tables and parsing them into structured data based on a convolutional neural network in one embodiment;

[0073] Figure 5 is a structural block diagram of a table recognition device in one embodiment;

[0074] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0076] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0077] The table recognition method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in FIG. 1 , the client 102 communicates with the server 104 via a network. Specifically, refer to Figure 1, the client 102 sends the table image to be analyzed in a preset format to the server 104; the table image to be analyzed is an image of a handwritten table; the server 104 preprocesses the table image to be analyzed to obtain a preprocessed table image; the preprocessed table image is input into the trained table detection model to obtain multiple candidate table images corresponding to the preprocessed table image, as well as the position information and confidence of each candidate table image; from each candidate table image, a candidate table image with a confidence greater than a confidence threshold is screened out as a target table image; the target table image is input into the trained text recognition model to obtain the target text content corresponding to the target table image; according to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed. Among them, the client 102 can be a terminal or a server; the server 104 can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, laptops, smart phones and tablet computers. The server can be implemented as an independent server or a server cluster composed of multiple servers.

[0078] In an exemplary embodiment, Figure 2 As shown, a table recognition method is provided, which is applied to Figure 1 Taking the server in the example as an example, in this embodiment, the method includes the following steps:

[0079] Step S201, receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table.

[0080] The client is responsible for uploading the image and converting it into base64 (a data encoding method) format data, calling the server interface, and obtaining the structured parsing results returned by the server. The server is used to receive the input base64 format image data from the client, call the algorithm module for calculation, and return the result to the client. The algorithm module is used to encapsulate the convolutional neural network model. In actual applications, the algorithm model is used to perform table format detection and text recognition.

[0081] The default format is base64.

[0082] The table image to be analyzed refers to the table image that needs to be recognized.

[0083] Among them, the handwritten form is used to represent the form of content filled in by handwriting.

[0084] Exemplarily, the server establishes a network path with the client, and receives the table image to be analyzed in base64 format sent by the client through the network path as the table image to be analyzed in a preset format. The client is used to convert the original handwritten table image into base64 format to obtain the table image to be analyzed in base64 format.

[0085] Step S202, preprocessing the table image to be analyzed to obtain a preprocessed table image.

[0086] Among them, preprocessing includes size conversion processing (also called size conversion processing) and straightening processing.

[0087] The preprocessed table image refers to the table image to be analyzed after preprocessing.

[0088] Exemplarily, the server performs size conversion and straightening processing on the table image to be analyzed to obtain a pre-processed table image.

[0089] Step S203, inputting the preprocessed table image into the trained table detection model to obtain multiple candidate table images corresponding to the preprocessed table image, as well as the position information and confidence of each candidate table image.

[0090] The table detection model refers to a network model that can use the preprocessed table image to obtain multiple candidate table images corresponding to the preprocessed table image, as well as the location information and confidence of each candidate table image. In actual scenarios, the table detection model is also called a table detection neural network.

[0091] The candidate table image is used to represent the sub-table image in the preprocessed table image.

[0092] The location information is used to represent the coordinate value.

[0093] The confidence level is used to indicate the possibility that the table detection model determines that there is text content in the candidate table image.

[0094] Exemplarily, the server performs feature extraction processing on the preprocessed table image to obtain image features of the preprocessed table image; then, the server inputs the image features of the preprocessed table image into a trained table detection model to obtain multiple candidate table images corresponding to the preprocessed table image, as well as location information and confidence of each candidate table image.

[0095] Step S204 , selecting a candidate table image with a confidence greater than a confidence threshold from each candidate table image as a target table image.

[0096] The confidence threshold refers to a preset confidence level, which is used to judge the confidence level of the candidate table image. It should be noted that the confidence threshold depends on the situation.

[0097] The target table image refers to a candidate table image whose confidence is greater than a confidence threshold.

[0098] Exemplarily, the server determines a confidence threshold based on the application scenario corresponding to the table image to be analyzed; then, the server selects candidate table images with confidence greater than the confidence threshold from each candidate table image, and uses these candidate table images as target table images.

[0099] Step S205 , inputting the target table image into the trained text recognition model to obtain the target text content corresponding to the target table image.

[0100] The text recognition model refers to a network model that can use the target table image to obtain the target text content corresponding to the target table image. It should be noted that the text recognition model is also called a text recognition neural network.

[0101] The target text content is used to represent the text information extracted from the target table image.

[0102] Exemplarily, the server performs feature extraction processing on the target table image to obtain image features corresponding to the target table image; then, the server inputs the image features corresponding to the target table image into a trained text recognition model to obtain target text content corresponding to the target table image.

[0103] Step S206, determining the table content corresponding to the table image to be analyzed according to the position information and the target text content corresponding to the target table image as the table recognition result corresponding to the table image to be analyzed.

[0104] The table content is used to represent the table information extracted from the table image to be analyzed.

[0105] The table recognition result is used to indicate the table recognition status corresponding to the table image to be analyzed.

[0106] Exemplarily, the server determines the table content corresponding to the position information and target text content of the target table image based on the position information and target text content corresponding to the target table image, as the table content corresponding to the table image to be analyzed; then, the server obtains the image identifier corresponding to the table image to be analyzed, and uses the table content and image identifier corresponding to the table image to be analyzed as the table recognition result corresponding to the table image to be analyzed.

[0107] In the above table recognition method, a table image to be analyzed in a preset format sent by the client is first received, and the table image to be analyzed is preprocessed to obtain a preprocessed table image, and then the preprocessed table image is input into the trained table detection model to obtain multiple candidate table images corresponding to the preprocessed table image, as well as the position information and confidence of each candidate table image. Then, from each candidate table image, the candidate table image with a confidence greater than the confidence threshold is screened out as the target table image, and then the target table image is input into the trained text recognition model to obtain the target text content corresponding to the target table image. Finally, according to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed. In this way, in the process of recognizing the table in the table image, the pre-processed table image to be analyzed is subjected to table detection processing and text recognition processing through the table detection model and the text recognition model, and according to the position information and the target text content corresponding to the target table image obtained after the model processing, the table content corresponding to the table image to be analyzed can be accurately obtained, thereby improving the accuracy of determining the table recognition result corresponding to the table image to be analyzed, which is conducive to improving the accuracy of table recognition; moreover, the whole process does not require human intervention, thus avoiding the defect of low accuracy of table recognition caused by subjective factors and prone to errors in manual recognition, thereby improving the accuracy of table recognition.

[0108] In an exemplary embodiment, the above step S202 pre-processes the table image to be analyzed to obtain a pre-processed table image, which specifically includes the following contents: obtaining the current image size corresponding to the table image to be analyzed; when the current image size is not equal to the preset image size, performing size conversion processing on the table image to be analyzed to obtain a converted table image that meets the preset image size; determining the image inclination angle of the converted table image based on the second-order central moment of the converted table image; when the image inclination angle does not meet the preset inclination angle range, straightening the converted table image to obtain a straightened table image as the pre-processed document image.

[0109] The current image size refers to the image size of the table image to be analyzed at the current time, such as 256*256.

[0110] The preset image size refers to a preset image size threshold, such as 128*128. It should be noted that the preset image size depends on the situation.

[0111] The converted table image refers to the table image to be analyzed after the size conversion process is performed.

[0112] Among them, the second-order central moment is used to represent the dispersion and directional characteristics of the center of gravity of the table image to be analyzed.

[0113] The image tilt angle refers to the angle at which the converted table image deviates from a reference direction (such as a vertical direction).

[0114] The preset tilt angle range refers to a preset tilt angle range, such as an image tilt angle within ±5°. It should be noted that the preset tilt angle range depends on the situation.

[0115] Exemplarily, the server obtains the current image attributes corresponding to the table image to be analyzed, and extracts the current image size corresponding to the table image to be analyzed from the current image attributes corresponding to the table image to be analyzed; then, the server uses the preset image size to determine the current image size; when the current image size is not equal to the preset image size, the table image to be analyzed is resized to obtain a converted table image that meets the preset image size; for example, the current image size corresponding to the table image to be analyzed is 256*256, and when it is determined that the current image size is not equal to the preset image size of 128*128, the table image to be analyzed is resized to obtain a converted table image that meets the preset image size. The converted table image is of a preset image size (128*128); then, the server inputs the converted table image into a second-order central moment prediction model to obtain the second-order central moment of the converted table image; then, the server queries the correspondence between the second-order central moment and the image tilt angle according to the second-order central moment of the converted table image to obtain the image tilt angle of the converted table image; then, the server uses the preset tilt angle range to judge the image tilt angle; when the image tilt angle does not meet the preset tilt angle range, the server straightens the converted table image to obtain the straightened table image, and uses the straightened table image as the preprocessed document image.

[0116] In this embodiment, by performing a series of pre-processing such as size conversion and straightening on the table image to be analyzed, the image quality of the table image to be analyzed can be improved, thereby saving a lot of time for subsequent model processing, which is beneficial to improving the efficiency of subsequent image processing.

[0117] In an exemplary embodiment, the table recognition method provided in the present application also includes a training step for a trained table detection model, which specifically includes the following contents: obtaining a sample table image; preprocessing the sample table image to obtain a preprocessed sample table image; inputting the preprocessed sample table image into the table detection model to be trained to obtain multiple candidate sample table images corresponding to the preprocessed sample table image, as well as predicted position information and predicted confidence of each candidate sample table image; obtaining the actual position information and actual confidence of each candidate sample table image, and iteratively training the table detection model to be trained based on the difference between the predicted position information and the actual position information, and based on the difference between the predicted confidence and the actual confidence, to obtain a trained table detection model.

[0118] The sample table image refers to a table image used to train the table detection model to be trained.

[0119] The preprocessed sample table image refers to the sample table image after preprocessing.

[0120] The candidate sample table image is used to represent the sub-table image in the preprocessed sample table image.

[0121] The predicted position information refers to the predicted value corresponding to the position information of the candidate sample table image.

[0122] The prediction confidence refers to the prediction value corresponding to the confidence of the candidate sample table image.

[0123] The actual position information refers to the actual value corresponding to the position information of the candidate sample table image.

[0124] The actual confidence refers to the actual value corresponding to the confidence of the candidate sample table image.

[0125] Exemplarily, the server obtains a sample table image from a database in response to a model training instruction for a table detection model to be trained; then, the server preprocesses the sample table image to obtain a preprocessed sample table image; then, the server inputs the preprocessed sample table image into the table detection model to be trained to obtain a plurality of candidate sample table images corresponding to the preprocessed sample table image, as well as predicted position information and predicted confidence of each candidate sample table image; then, the server obtains the actual position information and actual confidence of each candidate sample table image from the database, and iteratively trains the table detection model to be trained based on the difference between the predicted position information and the actual position information, and based on the difference between the predicted confidence and the actual confidence, to obtain a trained table detection model.

[0126] In this embodiment, by pre-training the table detection model, it is convenient to predict multiple candidate table images corresponding to the preprocessed table image, as well as the position information and confidence of each candidate table image after obtaining the preprocessed table image in actual applications; moreover, the table detection model receives new data in each round of iteration, and performs internal improvements and optimizations on the model, so as to be able to make predictions more effectively, which is beneficial to improving the prediction accuracy of the table detection model.

[0127] In an exemplary embodiment, the table detection model to be trained is iteratively trained according to the difference between the predicted position information and the actual position information, and according to the difference between the predicted confidence and the actual confidence, to obtain a trained table detection model, which specifically includes the following contents: obtaining a first loss value according to the difference between the predicted position information and the actual position information, and obtaining a second loss value according to the difference between the predicted confidence and the actual confidence; obtaining a first weight corresponding to the first loss value, and a second weight corresponding to the second loss value; fusing the first loss value and the second loss value according to the first weight and the second weight to obtain a target loss value; according to the target loss value, iteratively training the table detection model to be trained to obtain a trained table detection model.

[0128] The first loss value is used to represent the loss value obtained according to the difference between the predicted position information and the actual position information.

[0129] The second loss value is used to represent the loss value obtained according to the difference between the predicted confidence and the actual confidence.

[0130] Among them, the first weight refers to the weight corresponding to the first loss value.

[0131] Among them, the second weight refers to the weight corresponding to the second loss value.

[0132] The target loss value refers to the loss value obtained by fusing the first loss value and the second loss value according to the first weight and the second weight.

[0133] Exemplarily, the server obtains a first loss value based on the difference between the predicted location information and the actual location information, and obtains a second loss value based on the difference between the predicted confidence and the actual confidence; then, the server obtains the weight corresponding to the first loss value as the first weight, and the weight corresponding to the second loss value as the second weight; then, the server performs weighted summation processing on the first loss value and the second loss value according to the first weight and the second weight to obtain a target loss value; then, the server adjusts the model parameters of the table detection model to be trained according to the target loss value; then, the server re-trains the table detection model after the model parameters are adjusted until the target loss value obtained by the trained table detection model is less than the loss value threshold, then stops training, and uses the trained table detection model as the trained table detection model.

[0134] In this embodiment, by considering the difference between the predicted position information and the actual position information, as well as the difference between the predicted confidence and the actual confidence in model training, the data processing of the model is evaluated from two key dimensions, and then the parameters of the model can be adjusted accordingly, which is beneficial to improving the model training quality of the table detection model.

[0135] In an exemplary embodiment, the above step S205, inputting the target table image into a trained text recognition model to obtain the target text content corresponding to the target table image, specifically includes the following contents: performing feature extraction processing on the target table image to obtain image features corresponding to the target table image; inputting the image features into the trained text recognition model to obtain the predicted probability of the target table image under each preset text content; and screening out the preset text content with the largest predicted probability from each preset text content as the target text content.

[0136] Among them, image features are used to represent feature information in the target table image, such as structural features, texture features, etc.

[0137] The preset text content refers to the text content corresponding to the target table image predicted by the text recognition model.

[0138] The prediction probability is used to indicate the possibility that the text recognition model determines that the preset text content is correct.

[0139] Exemplarily, the server trains the text recognition model to be trained to obtain a trained text recognition model; then, the server inputs the target table image into the feature extraction model, and performs feature extraction processing on the target table image through the feature extraction model to obtain image features corresponding to the target table image; then, the server inputs the image features into the trained text recognition model to obtain the predicted probability of the target table image under each preset text content; then, the server screens out the preset text content with the largest predicted probability from each preset text content, and uses the preset text content as the target text content.

[0140] In this embodiment, by performing feature extraction processing on the target table image, the key features in the target table image can be captured; moreover, after obtaining the predicted probability under each preset text content, the content with the highest probability is screened out as the target text content. Compared with directly giving a single recognition result, it can intuitively reflect the degree of certainty of the model's own recognition results, thereby improving the accuracy of the target text content finally output.

[0141] In an exemplary embodiment, the above step S206 determines the table content corresponding to the table image to be analyzed based on the position information and target text content corresponding to the target table image, and specifically includes the following contents: determining the target table structure corresponding to the target table image based on the position information; querying the correspondence between the table structure and the hypertext markup language template based on the target table structure, and obtaining the hypertext markup language template corresponding to the target table structure as the target hypertext markup language template corresponding to the target table image; combining the target text content and the target hypertext markup language template based on the position information to obtain the table content corresponding to the table image to be analyzed.

[0142] The target table structure refers to the table structure corresponding to the target table image, such as 2*2, 2*3, etc.

[0143] The corresponding relationship between the query table structure and the hypertext markup language template is used to represent the association information between the table structure and the hypertext markup language template. For example, the table structure 2*2 corresponds to the hypertext markup language template a, and the table structure 2*3 corresponds to the hypertext markup language template b.

[0144] The Hypertext Markup Language template is also called an HTML (HyperText Markup Language) template.

[0145] The target hypertext markup language template refers to the hypertext markup language template corresponding to the target table image.

[0146] Exemplarily, the server determines the table structure corresponding to the position information according to the position information, as the target table structure corresponding to the target table image; then, the server queries the correspondence between the table structure and the hypertext markup language template according to the target table structure, obtains the hypertext markup language template corresponding to the target table structure, and uses the hypertext markup language template as the target hypertext markup language template corresponding to the target table image; then, the server combines the target text content and the target hypertext markup language template according to the position information to obtain the table content corresponding to the table image to be analyzed; for example, the position information where the text content a is located is the coordinate (1, 1), the position information where the text content b is located is the coordinate (1, 2), and the position information where the text content b is located is the coordinate (1, 3). There are three preset positions in the hypertext markup language template, where the preset positions are arranged in the order of appearance in the template, namely preset position A, preset position B, and preset position C. Then, each text content is filled into the corresponding preset position according to the position information, that is, the text content a is filled into the preset position A, the text content b is filled into the preset position B, and the text content c is filled into the preset position C.

[0147] In this embodiment, based on the position information, the target hypertext markup language template corresponding to the target table image can be quickly obtained through the correspondence relationship, so that the table content corresponding to the table image to be analyzed can be quickly obtained, thereby reducing the time consumed in generating the table content, which is conducive to improving the efficiency of generating the table content.

[0148] In an exemplary embodiment, the above-mentioned step S206, after determining the table content corresponding to the table image to be analyzed as the table recognition result corresponding to the table image to be analyzed based on the position information and target text content corresponding to the target table image, specifically includes the following contents: performing an integrity check on the table recognition result to obtain an integrity check result corresponding to the table recognition result; if the integrity check result is passed, generating an entry instruction corresponding to the table recognition result; sending the table recognition result and the entry instruction to the client, so that the client enters the table recognition result according to the entry instruction.

[0149] Among them, the integrity check result refers to the integrity check status corresponding to the table recognition result, such as structural integrity, content integrity and format integrity.

[0150] The input instruction refers to the instruction information corresponding to the input processing of the table recognition result.

[0151] Exemplarily, the server performs an integrity check on the table recognition result, and obtains the structural integrity, content integrity and format integrity corresponding to the table recognition result, all of which are used as the integrity check results corresponding to the table recognition result; then, the server judges the integrity check result; when the integrity check result is passed, the server generates an entry instruction corresponding to the table recognition result according to the entry rules corresponding to the table recognition result; then, the server sends the table recognition result and the entry instruction to the client; the client enters the table recognition result according to the entry instruction.

[0152] In this embodiment, by performing an integrity check on the table recognition results, various errors in the table recognition results can be discovered before entry, thereby ensuring that the data ultimately entered into the system is authentic and reliable, providing an accurate data basis for subsequent data analysis.

[0153] In an exemplary embodiment, Figure 3 As shown, another table recognition method is provided, which is described by taking the method applied to the server as an example, and includes the following steps:

[0154] Step S301, receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table.

[0155] Step S302, obtaining the current image size corresponding to the table image to be analyzed; when the current image size is not equal to the preset image size, performing size conversion processing on the table image to be analyzed to obtain a converted table image that meets the preset image size.

[0156] Step S303, determining the image tilt angle of the converted table image based on the second-order central moment of the converted table image; when the image tilt angle does not meet the preset tilt angle range, straightening the converted table image to obtain a straightened table image as the pre-processed document image.

[0157] Step S304, inputting the preprocessed table image into the trained table detection model to obtain multiple candidate table images corresponding to the preprocessed table image, as well as the position information and confidence of each candidate table image.

[0158] Step S305 , selecting a candidate table image with a confidence greater than a confidence threshold from each candidate table image as a target table image.

[0159] Step S306, performing feature extraction processing on the target table image to obtain image features corresponding to the target table image.

[0160] Step S307, inputting the image features into the trained text recognition model to obtain the predicted probability of the target table image under each preset text content.

[0161] Step S308 , selecting the preset text content with the highest prediction probability from the preset text contents as the target text content.

[0162] Step S309: determining the target table structure corresponding to the target table image according to the position information.

[0163] Step S310, according to the target table structure, query the correspondence between the table structure and the hypertext markup language template, obtain the hypertext markup language template corresponding to the target table structure as the target hypertext markup language template corresponding to the target table image.

[0164] Step S311, combining the target text content and the target hypertext markup language template according to the position information to obtain the table content corresponding to the table image to be analyzed as the table recognition result corresponding to the table image to be analyzed.

[0165] In the above-mentioned table recognition method, in the process of recognizing the table in the table image, the pre-processed table image to be analyzed is subjected to table detection processing and text recognition processing through the table detection model and the text recognition model, and according to the position information and the target text content corresponding to the target table image obtained after the model processing, the table content corresponding to the table image to be analyzed can be accurately obtained, thereby improving the accuracy of determining the table recognition result corresponding to the table image to be analyzed, which is conducive to improving the accuracy of table recognition; moreover, the whole process does not require human intervention, thus avoiding the defect of low accuracy of table recognition caused by subjective factors and prone to errors in manual recognition, thereby improving the accuracy of table recognition.

[0166] In an exemplary embodiment, in order to more clearly illustrate the table recognition method provided in the embodiment of the present application, the table recognition method is specifically described below with a specific embodiment. Figure 4As shown, the present application also provides a method for detecting and recognizing handwritten tables based on convolutional neural networks and parsing them into structured data. In the process of recognizing a table in a table image, the table image to be analyzed in a preset format sent by the client is first received, and the table image to be analyzed is preprocessed to obtain a preprocessed table image, and then the preprocessed table image is input into a trained table detection model to obtain a plurality of candidate table images corresponding to the preprocessed table image, as well as the position information and confidence of each candidate table image. Then, from each candidate table image, a candidate table image with a confidence greater than a confidence threshold is screened out as a target table image, and then the target table image is input into a trained text recognition model to obtain the target text content corresponding to the target table image. Finally, according to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed. Specifically including the following contents:

[0167] (1) Client input image:

[0168] The client converts the original image into base64 format, takes the image information in base64 format as input, and initiates a server request.

[0169] Data is transmitted using HTTP (HyperText Transfer Protocol), HTTPS (HyperText Transfer Protocol Secure), TCP (Transmission Control Protocol) or UDP (User Datagram Protocol).

[0170] (2) Server interface receives data:

[0171] The server parses the message transmitted by the client and passes the base64 data to the algorithm service.

[0172] (3) Algorithm service-data preprocessing:

[0173] Preprocess the image, for example, convert the image size to 128*128.

[0174] The image is straightened.

[0175] Perform binary conversion on the image.

[0176] Extract image contours as basic features.

[0177] Configure the vocabulary of the text in the image.

[0178] (4) Algorithm service-table detection:

[0179] The preprocessed binary data of the image is passed into the table detection neural network, which detects the areas containing text in the table and returns the location information and confidence of each area described by pixel coordinates.

[0180] (5) Algorithm service-table recognition:

[0181] According to the location information and confidence of each area described by pixel coordinates returned in the previous step, the areas exceeding the confidence threshold are divided into pictures and sent to the text recognition neural network to recognize the text in the pictures.

[0182] (6) Algorithm service-table structure analysis:

[0183] Based on the position information and confidence of each area described by pixel coordinates returned in step (4), and the text content of each area returned in step (5), the pixel coordinate position is combined with HTML tags to form structured table content.

[0184] (7) The server interface returns the result:

[0185] The server receives the result.

[0186] The server transmits data via HTTP, HTTPS, TCP or UDP protocol and returns the results to the client.

[0187] (8) The client receives the returned information:

[0188] The client receives the structured information containing HTML tags returned by the server and further processes it using other steps.

[0189] In the above-mentioned embodiment, in the process of recognizing the table in the table image, the pre-processed table image to be analyzed is subjected to table detection processing and text recognition processing through the table detection model and the text recognition model, and according to the position information and the target text content corresponding to the target table image obtained after the model processing, the table content corresponding to the table image to be analyzed can be accurately obtained, thereby improving the accuracy of determining the table recognition result corresponding to the table image to be analyzed, which is beneficial to improving the accuracy of table recognition; moreover, the whole process does not require human intervention, thus avoiding the defect of low accuracy of table recognition caused by subjective factors and prone to errors in manual recognition, thereby improving the accuracy of table recognition. At the same time, compared with the method of manually entering forms into the information system, the present embodiment can control the operation time within 10 seconds, and there is no need for users to predefine forms in advance; the traditional method based on manual entry is easily affected by people's emotions and physical conditions, and is prone to errors. The present embodiment uses a computer to complete the analysis, which can minimize the impact of errors; compared with traditional graphics algorithms, the use of convolutional neural networks can have a better resistance to changes, reduce the structural requirements of the input pictures, do not need to implement a large amount of manual matching work, and have better generalization capabilities; moreover, the present embodiment is based on deep learning, and the algorithm can be solidified into the model and encapsulated into the service for reuse, which is suitable for large-scale promotion.

[0190] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0191] Based on the same inventive concept, the embodiment of the present application also provides a table recognition device for implementing the table recognition method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more table recognition device embodiments provided below can refer to the limitations of the table recognition method above, and will not be repeated here.

[0192] In an exemplary embodiment, Figure 5As shown, a table recognition device is provided, comprising: an image receiving module 501, an image processing module 502, a table detection module 503, an image screening module 504, a text recognition module 505 and a result determination module 506, wherein:

[0193] The image receiving module 501 is used to receive a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table.

[0194] The image processing module 502 is used to pre-process the table image to be analyzed to obtain a pre-processed table image.

[0195] The table detection module 503 is used to input the preprocessed table image into the trained table detection model to obtain multiple candidate table images corresponding to the preprocessed table image, as well as the position information and confidence of each candidate table image.

[0196] The image screening module 504 is used to screen out the candidate table images with a confidence greater than a confidence threshold from each candidate table image as the target table image.

[0197] The text recognition module 505 is used to input the target table image into the trained text recognition model to obtain the target text content corresponding to the target table image.

[0198] The result determination module 506 is used to determine the table content corresponding to the table image to be analyzed according to the position information and target text content corresponding to the target table image, as the table recognition result corresponding to the table image to be analyzed.

[0199] In an exemplary embodiment, the image processing module 502 is also used to obtain the current image size corresponding to the table image to be analyzed; when the current image size is not equal to the preset image size, the table image to be analyzed is resized to obtain a converted table image that meets the preset image size; based on the second-order central moment of the converted table image, the image inclination angle of the converted table image is determined; when the image inclination angle does not meet the preset inclination angle range, the converted table image is straightened to obtain a straightened table image as the pre-processed document image.

[0200] In an exemplary embodiment, the table recognition device also includes a model training module, which is used to obtain a sample table image; preprocess the sample table image to obtain a preprocessed sample table image; input the preprocessed sample table image into a table detection model to be trained to obtain multiple candidate sample table images corresponding to the preprocessed sample table image, as well as predicted position information and predicted confidence of each candidate sample table image; obtain the actual position information and actual confidence of each candidate sample table image, and iteratively train the table detection model to be trained based on the difference between the predicted position information and the actual position information, and based on the difference between the predicted confidence and the actual confidence, to obtain a trained table detection model.

[0201] In an exemplary embodiment, the model training module is also used to obtain a first loss value based on the difference between the predicted position information and the actual position information, and to obtain a second loss value based on the difference between the predicted confidence and the actual confidence; obtain a first weight corresponding to the first loss value, and a second weight corresponding to the second loss value; fuse the first loss value and the second loss value according to the first weight and the second weight to obtain a target loss value; and iteratively train the table detection model to be trained according to the target loss value to obtain a trained table detection model.

[0202] In an exemplary embodiment, the text recognition module 505 is also used to perform feature extraction processing on the target table image to obtain image features corresponding to the target table image; input the image features into the trained text recognition model to obtain the predicted probability of the target table image under each preset text content; and select the preset text content with the largest predicted probability from each preset text content as the target text content.

[0203] In an exemplary embodiment, the result determination module 506 is also used to determine the target table structure corresponding to the target table image based on the position information; based on the target table structure, query the correspondence between the table structure and the hypertext markup language template to obtain the hypertext markup language template corresponding to the target table structure as the target hypertext markup language template corresponding to the target table image; based on the position information, combine the target text content and the target hypertext markup language template to obtain the table content corresponding to the table image to be analyzed.

[0204] In an exemplary embodiment, the table recognition device also includes an information sending module, which is used to perform integrity check processing on the table recognition result to obtain an integrity check result corresponding to the table recognition result; if the integrity check result is passed, generate an entry instruction corresponding to the table recognition result; send the table recognition result and the entry instruction to the client, so that the client enters the table recognition result according to the entry instruction.

[0205] Each module in the above table recognition device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0206] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as location information and confidence. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a table recognition method is implemented.

[0207] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0208] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0209] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0210] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0211] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0212] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0213] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A table recognition method, characterized in that: Applied to the server, the method includes: Receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table; Preprocessing the table image to be analyzed to obtain a preprocessed table image; Inputting the preprocessed table image into a trained table detection model to obtain a plurality of candidate table images corresponding to the preprocessed table image, as well as position information and confidence of each candidate table image; From each candidate table image, select a candidate table image whose confidence is greater than a confidence threshold as a target table image; Inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image; According to the position information and target text content corresponding to the target table image, the table content corresponding to the table image to be analyzed is determined as the table recognition result corresponding to the table image to be analyzed.

2. The method according to claim 1, characterized in that The preprocessing of the table image to be analyzed to obtain a preprocessed table image includes: Obtaining the current image size corresponding to the table image to be analyzed; In the case where the current image size is not equal to the preset image size, performing size conversion processing on the table image to be analyzed to obtain a converted table image that meets the preset image size; Determining an image tilt angle of the converted table image according to the second-order central moment of the converted table image; In the case where the image tilt angle does not satisfy the preset tilt angle range, the converted table image is straightened to obtain a straightened table image as the pre-processed document image.

3. The method according to claim 1, characterized in that The trained table detection model is trained in the following way: Get a sample table image; Preprocessing the sample table image to obtain a preprocessed sample table image; Inputting the preprocessed sample table image into the table detection model to be trained, obtaining a plurality of candidate sample table images corresponding to the preprocessed sample table image, and predicted position information and predicted confidence of each candidate sample table image; The actual position information and the actual confidence of each candidate sample table image are obtained, and according to the difference between the predicted position information and the actual position information, and according to the difference between the predicted confidence and the actual confidence, the table detection model to be trained is iteratively trained to obtain the trained table detection model.

4. The method according to claim 3, characterized in that: The iterative training of the table detection model to be trained according to the difference between the predicted position information and the actual position information, and according to the difference between the predicted confidence and the actual confidence, to obtain the trained table detection model, comprises: Obtaining a first loss value according to a difference between the predicted position information and the actual position information, and obtaining a second loss value according to a difference between the predicted confidence and the actual confidence; Obtaining a first weight corresponding to the first loss value and a second weight corresponding to the second loss value; According to the first weight and the second weight, the first loss value and the second loss value are fused to obtain a target loss value; According to the target loss value, the table detection model to be trained is iteratively trained to obtain the trained table detection model.

5. The method according to claim 1, characterized in that The step of inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image includes: Performing feature extraction processing on the target table image to obtain image features corresponding to the target table image; Inputting the image features into a trained text recognition model to obtain the predicted probability of the target table image under each preset text content; From the preset text contents, the preset text content with the highest prediction probability is selected as the target text content.

6. The method according to claim 1, characterized in that The step of determining the table content corresponding to the table image to be analyzed according to the position information and the target text content corresponding to the target table image includes: Determining a target table structure corresponding to the target table image according to the position information; According to the target table structure, query the correspondence between the table structure and the hypertext markup language template, obtain the hypertext markup language template corresponding to the target table structure as the target hypertext markup language template corresponding to the target table image; According to the position information, the target text content and the target hypertext markup language template are combined and processed to obtain the table content corresponding to the table image to be analyzed.

7. The method according to any one of claims 1 to 6, characterized in that: After determining the table content corresponding to the table image to be analyzed according to the position information and the target text content corresponding to the target table image as the table recognition result corresponding to the table image to be analyzed, the method further includes: Performing integrity check processing on the table recognition result to obtain an integrity check result corresponding to the table recognition result; If the integrity check result is passed, generating an input instruction corresponding to the table recognition result; The table recognition result and the input instruction are sent to the client, so that the client performs input processing on the table recognition result according to the input instruction.

8. A table recognition device, characterized in that: Applied to the server, the device comprises: An image receiving module, used for receiving a table image to be analyzed in a preset format sent by a client; the table image to be analyzed is an image of a handwritten table; An image processing module, used for preprocessing the table image to be analyzed to obtain a preprocessed table image; A table detection module, used for inputting the preprocessed table image into a trained table detection model to obtain a plurality of candidate table images corresponding to the preprocessed table image, as well as position information and confidence of each candidate table image; An image screening module, used for screening out the candidate table image with the confidence greater than the confidence threshold from each candidate table image as the target table image; A text recognition module, used for inputting the target table image into a trained text recognition model to obtain target text content corresponding to the target table image; The result determination module is used to determine the table content corresponding to the table image to be analyzed according to the position information and target text content corresponding to the target table image, as the table recognition result corresponding to the table image to be analyzed.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Table recognition method and device, computer device and storage medium

    CN110334585A

  • Target detection method and device for remote sensing image, equipment and storage medium

    CN113971653A