Method and system for correcting table questions and electronic equipment

By combining the pixel alignment model and the matching model, the matching and correction problems in the correction of unstructured table questions are solved, and accurate correction of table questions is achieved.

CN120656194APending Publication Date: 2025-09-16BEIJING XUEDIRUANJIAN DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510749647.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing automatic grading technologies have difficulty in accurately matching and grading unstructured table titles, especially irregular tables, resulting in inaccurate grading results.

Method used

By receiving user images and answer images, the pixel alignment model is used to align the images. Traditional methods and matching models are combined to match the cells in the user image with the cells in the answer image, and corrections are performed using one-to-one or merged cells.

Benefits of technology

The accuracy of table title grading has been improved, especially in dense and irregular tables. The accuracy of grading results is ensured through the complementary effect of traditional methods and model methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120656194A_ABST
    Figure CN120656194A_ABST
Patent Text Reader

Abstract

The invention provides a method and system for correcting table questions and electronic equipment, and relates to the technical field of artificial intelligence, the method comprises the steps that a user image is received, the user image is an image obtained after a user answers the table questions, and the user image is composed of a plurality of first cells; the user image and an answer image corresponding to the user image are aligned, the answer image comprises a correct answer of the table question, and the answer image is composed of a plurality of second cells; matching a corresponding second cell for each first cell in the user image from the answer image to obtain a group of cells to be corrected; for each group of cells to be corrected, comparing the answer in the first cell with the correct answer in the second cell; and obtaining a correction result according to the comparison result. According to the method, the table cells in the user image and the answer image are extracted and matched, and then the answers in the table cells are corrected, so that the accuracy of the correction result obtained when the table question is corrected is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, system, and electronic device for correcting table questions. Background Art

[0002] With the development of artificial intelligence and computer vision technology, automatic grading technology based on image recognition in the field of educational informatization has gradually replaced the traditional manual grading mode, showing significant efficiency advantages in structured question types such as multiple-choice questions and fill-in-the-blank questions.

[0003] However, unstructured table questions are extremely common, whether in daily assignments and tests in education or various professional qualification exams. Tables are used to present data comparisons, process steps, logical relationships, and knowledge application. They carry large amounts of information, are complex, and often appear densely packed on the page. This makes accurately locating the first cell and matching it to the second cell in automated grading of these unstructured table questions extremely challenging.

[0004] Irregular table questions are particularly problematic. Their structure doesn't conform to the traditional standard row and column arrangement; cells may merge or split across rows and columns, and the number and distribution of rows and columns are irregular. Existing grading methods make it difficult to accurately define the scope of the question and the first cell for irregular table questions. This can lead to errors or omissions in the first cell, resulting in inaccurate grading results. Summary of the Invention

[0005] To overcome the above technical problems, the present application provides a method, system, and electronic device for correcting table titles, which improves the accuracy of the correction results by extracting cells in the table titles and performing cell matching. The technical solution is as follows:

[0006] In a first aspect, a method for correcting table titles is provided, comprising:

[0007] receiving a user image, wherein the user image is an image obtained after the user answers a form question, and the user image is composed of a plurality of first cells;

[0008] aligning the user image and an answer image corresponding to the user image, wherein the answer image includes a correct answer to a form question and the answer image is composed of a plurality of second cells;

[0009] Matching a corresponding second cell to each first cell in the user image from the answer image to obtain a set of cells to be corrected;

[0010] For each group of cells to be corrected, comparing the answer in the first cell with the correct answer in the second cell;

[0011] A correction result is obtained according to the comparison result.

[0012] In a possible implementation, a method for matching the first cell with the corresponding second cell includes:

[0013] Determining whether the first cell meets a preset condition;

[0014] If yes, then calculating the overlapping area between the first cell and each second cell in the answer image, and taking the second cell with the largest overlapping area as the second cell corresponding to the first cell;

[0015] If not, the first cell is input into a matching model, and the matching model outputs a second cell corresponding to the first cell.

[0016] In one possible implementation, the method for calculating the overlapping area between the first cell and each second cell in the answer image includes:

[0017] reducing the area of ​​the first cell, and calculating the overlapping area of ​​the reduced first cell and each of the second cells; and / or

[0018] The areas of the first cell and each of the second cells are reduced simultaneously, and the overlapping area of ​​the first cell and the second cell after the reduced areas are calculated.

[0019] In one possible implementation, if after reducing the area of ​​the first cell and reducing the areas of the first cell and the second cell at the same time, the corresponding overlapping areas are calculated and the matching results obtained based on the corresponding overlapping areas are different, the matching model matches the first cell with the corresponding second cell.

[0020] In a possible implementation, the method further includes:

[0021] If the overlapping area between the first cell and each of the second cells is zero;

[0022] Then calculating the distance from the center point of the first cell to the center point of each of the second cells;

[0023] The second cell with the shortest distance is used as the second cell corresponding to the first cell.

[0024] In a possible implementation, when the first cell does not meet a preset condition, the method further includes:

[0025] Determine whether the first cell satisfies:

[0026] The first cell falls within one of the second cells; or

[0027] The first cell has an intersection with only one of the second cells; or

[0028] One of the second cells falls within the first cell; or

[0029] There is only one second cell that intersects the first cell;

[0030] If yes, taking the second cell as the second cell corresponding to the first cell;

[0031] If not, the first cell is input into a matching model, and the matching model outputs a second cell corresponding to the first cell.

[0032] In a possible implementation, after aligning the user image and the answer image corresponding to the user image, the method further includes:

[0033] Determining whether the user image and the answer image corresponding to the user image are successfully aligned;

[0034] If so, matching each first cell in the user image with a corresponding second cell in the answer image to obtain a group of cells to be corrected; for each group of cells to be corrected, comparing the correct answer in the first cell with the correct answer in the second cell; and obtaining a correction result based on the comparison result;

[0035] If not, each second cell in the answer image is mapped to the user image, and then a corresponding second cell is matched from the answer image to each first cell in the user image to obtain a group of cells to be corrected; for each group of cells to be corrected, the answer in the first cell and the correct answer in the second cell are compared; and the correction result is obtained based on the comparison result.

[0036] In a possible implementation, the method further includes:

[0037] intercepting a line text sub-image of the user image according to the coordinates of the printed text box in the answer image;

[0038] Identifying the line text content in the line text sub-image, and calculating the similarity between the line text content and the line text content in the answer image;

[0039] When the similarity is greater than the similarity threshold, it is determined that the user image and the answer image are successfully aligned;

[0040] When the similarity is less than or equal to the similarity threshold, it is determined that the alignment between the user image and the answer image fails.

[0041] In one possible implementation, if multiple text sub-images are captured, the average similarity corresponding to the multiple text sub-images is calculated, and when the average similarity is greater than the similarity threshold, it is determined that the user image and the answer image are successfully aligned.

[0042] In a possible implementation, the method further includes:

[0043] When the density of the plurality of first cells in the user image is greater than a preset density:

[0044] Merging a plurality of the first cells and a plurality of the second cells in a plurality of groups of cells to be corrected to obtain a question area and an answer area respectively;

[0045] Comparing the answer in the answer area with the correct answer in the answer area;

[0046] A correction result is obtained according to the comparison result.

[0047] In a possible implementation, when comparing the answer in the first cell and the correct answer in the second cell, and the answer in the answer area and the correct answer in the answer area, the following conditions are satisfied:

[0048] If the answer to the question is the same as the correct answer, the correction result is correct;

[0049] If the answer to the question is different from the correct answer, the correction result is wrong.

[0050] In a possible implementation, the method further includes:

[0051] When the answer and the correct answer are both formulas, and the correction result is wrong, the correct answer is annotated in the first cell or answer area where the answer is located.

[0052] In a second aspect, a system for correcting table questions is provided, comprising:

[0053] Image input module, used to input user image and answer image;

[0054] a pixel alignment module, configured to align the user image and the answer image;

[0055] an alignment verification module, configured to determine whether the user image and the answer image are successfully aligned;

[0056] an answer trace matching module, configured to, when the user image and the answer image are successfully aligned, match each first cell in the user image with a corresponding second cell in the answer image to obtain a set of cells to be corrected;

[0057] an answer area mapping module, configured to map each second cell in the answer image onto the user image when alignment between the user image and the answer image fails, and input the mapping result into the answer trace matching module;

[0058] The correction module is used to compare the answer in the first cell with the correct answer in the second cell for each group of cells to be corrected, and obtain a correction result according to the comparison result.

[0059] In a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned methods for correcting table questions.

[0060] In a fourth aspect, a storage medium is provided, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above-mentioned methods for correcting table titles when running.

[0061] The technical solutions provided in the embodiments of the present application can achieve the following technical effects:

[0062] (1) This application first extracts the first cell in the user image and the second cell in the answer image, and then matches each first cell with a corresponding second cell. During the matching process, the application combines the traditional matching method with the model matching method to improve the accuracy of the matching results through the complementary effect of the traditional method and the model method.

[0063] (2) Based on accurate matching results, this application supports a one-to-one grading method, and also supports merging multiple first cells to obtain the answer area, merging multiple second cells to obtain the answer area, and then grading the merged area. Therefore, in actual application, when the cell density of the table question is too high, the merged grading method can be used to ensure the accuracy of the grading results. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application. In the drawings:

[0065] Figure 1 This is a flow chart of a method for correcting table titles according to an embodiment of the present application;

[0066] Figure 2 This is an example diagram of matching results obtained by using multiple matching methods in an embodiment of the method of the present application;

[0067] Figure 3 This is a system block diagram for correcting table questions in an embodiment of the present application;

[0068] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] The following describes exemplary embodiments of the present application in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0070] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that such usage is interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "including" and its variations are to be interpreted as open-ended terms meaning "including but not limited to."

[0071] In order to solve the problem of difficult answer area matching and inaccurate grading results caused by dense tables and complex structures when grading table-type questions, this application provides a method for grading table-type questions, such as Figure 1 As shown, the method includes the following steps S1 to S5.

[0072] Step S1: receiving a user image. The user image is an image obtained after the user answers a form question. The user image is composed of a plurality of first cells.

[0073] Step S2: aligning the user image and the answer image corresponding to the user image, wherein the answer image includes the correct answer to the form question and the answer image is composed of a plurality of second cells.

[0074] Step S3: from the answer image, match a corresponding second cell to each first cell in the user image to obtain a group of cells to be corrected.

[0075] Step S4: for each group of cells to be corrected, compare the answer in the first cell with the correct answer in the second cell.

[0076] Step S5: obtaining a correction result according to the comparison result.

[0077] Specifically, first, a form question with traces of answers is obtained by taking a picture of the form question by a computer camera or other shooting device, and the picture is input into the computer to obtain a user image. The user image is composed of multiple cells, and the shape of the cells can be regular or irregular. In this embodiment, the cell in the user image is referred to as the first cell.

[0078] Based on the obtained user image, an image containing the correct answer to the form question is used as an answer image, and the answer image is used as the answer image corresponding to the user image. The answer image is also composed of multiple cells. In this embodiment, the cells in the answer image are called second cells.

[0079] Then, the user image and the answer image are aligned, specifically including: first pre-processing the user image and the answer image, such as scaling the user image and the answer image to a fixed size, and standardizing the user image and the answer image. Then, the pre-processed user image and the answer image are input into the pixel alignment model, and the pixel alignment model outputs the aligned user image and the answer image. The aligned user image and the answer image have the same size, and the pixels at each position correspond one to one, for example, a first cell has a corresponding second cell. It should be noted that the pixel alignment model is obtained by training in advance, and the pixel alignment model can adopt any one of the dense alignment Roma (Robust Dense Feature Matching) model, the multimodal (Contrastive Language-Image Pre-training, CLIP) model and the multimodal pre-training (UNiversal Image-TExt Representation, UNITER) model. This embodiment takes the pixel alignment model adopting the dense alignment Roma model as an example. When training the Dense Aligned Roma model, the model's input includes the OCR results corresponding to the answer traces and the correct answer in the answer image. The output layer also outputs the corrected result. This multi-task training improves the model's feature extraction capabilities and enhances its generalization capabilities. As a result, the trained Dense Aligned Roma model is capable of matching under various challenging real-world variations in scale, lighting, perspective, and texture, making it particularly suitable for dense table-based questions.

[0080] After aligning the user image and the answer image, the system matches each first cell in the user image with a corresponding second cell in the answer image, generating a set of cells to be graded. For each set of cells to be graded, the system then compares the answer in the first cell with the correct answer in the second cell. If the answer in the first cell is the same as the correct answer in the second cell, the grading result is correct; otherwise, if the answer in the first cell is different from the correct answer in the second cell, the grading result is incorrect. This process is repeated for each first cell in the user image, achieving the goal of automatically grading spreadsheet questions.

[0081] In a possible implementation, step S2 also includes the contents of steps S21 to S23.

[0082] Step S21, determining whether the user image and the answer image are aligned successfully;

[0083] Step S22: If yes, proceed to step S3;

[0084] Step S23: If not, map each second cell in the answer image to the user image, and then go to step S3.

[0085] Specifically, to determine whether the user image and the answer image are successfully aligned, the coordinates of the printed text box in the answer image are first determined for all first cells within the user image within the box. Within the box, one or more first cells in the same row are used as a row text sub-image. The row text sub-images of the user image are sequentially captured from top to bottom or bottom to top. Next, the row text content within each row text sub-image is identified. This content primarily consists of character strings of letters and numbers, such as the question number and the user's answer. If only one row text sub-image is captured, the similarity between the row text content of the user image and the row text content of the answer image is calculated based on the recognition results. The more identical character strings the two contain, the higher the similarity. Finally, the calculated similarity is compared with a similarity threshold. If the similarity is greater than the similarity threshold, the alignment of the user image and the answer image is determined to be successful. Otherwise, if the similarity is less than or equal to the similarity threshold, the alignment of the user image and the answer image is determined to be unsuccessful. If there are multiple captured line text sub-images, the similarity between the line text content of the user image and the line text content of the answer image is calculated based on the recognition results of each line text sub-image, and then the average similarity corresponding to the multiple line text sub-images is calculated, and then the average similarity is compared with the similarity threshold. If the average similarity is greater than the similarity threshold, the judgment result is that the user image and the answer image are successfully aligned; otherwise, when the average similarity is less than or equal to the similarity threshold, the judgment result is that the user image and the answer image are failed to be aligned.

[0086] For user images and answer images that fail to align, first extract the first cell in the user image and the second cell in the answer image, then perform preprocessing such as scaling and standardization on the extracted first and second cells, and then input the user image, answer image, and the preprocessed first and second cells into the pixel alignment model. The pixel alignment model outputs the coordinates of the second cell in the user image to achieve the purpose of establishing a mapping relationship between the first and second cells. It should be noted that the pixel alignment model here also uses the above-mentioned dense alignment Roma model, but the training process is different from the above-mentioned dense alignment Roma model. When training the dense alignment Roma model here, the main focus is on the coordinates of the second cell in the user image in the training sample data set.

[0087] Through the above mapping relationship, even if the user image and the answer image are not aligned successfully, the second cell corresponding to the first cell can be correctly matched due to this mapping relationship, thereby not affecting the subsequent correction results.

[0088] In a possible implementation, step S3 also includes the contents of steps S31 to S33.

[0089] Step S31, determining whether the first cell meets a preset condition;

[0090] Step S32: If yes, calculate the overlapping area between the first cell and each second cell in the answer image, and take the second cell with the largest overlapping area as the second cell corresponding to the first cell;

[0091] Step S33: If not, the first cell is input into the matching model, and the matching model outputs a second cell corresponding to the first cell.

[0092] Specifically, if the shape of the first cell is a regular shape, it means that the first cell meets the preset conditions. For example, if the first cell is a regular shape such as a rectangle or a circle, then when aligning the user image and the answer image, basically one first cell corresponds to one second cell, or after subsequent processing, the second cell corresponding to the first cell can be obtained; when the shape of the first cell is an irregular shape, one first cell may intersect with multiple second cells at the same time, making it impossible to correctly match the second cell corresponding to the first cell.

[0093] Therefore, when the first cell meets the preset conditions, in order to ensure the accuracy of the match, the first cell and / or the second cell are processed as follows:

[0094] 1) First, reduce the area of ​​the first cell, then calculate the area of ​​the first cell and each second cell after the reduction, and then use the second cell with the largest overlapping area as the second cell corresponding to the first cell. In this embodiment, take reducing the area of ​​1 / 2 of the first cell as an example: assuming that the width and height of the first cell are W and H respectively, then the area with (1 / 4*W, 1 / 4*H) as the upper left vertex and (3 / 4*W, 3 / 4*H) as the lower right vertex represents the first cell after the reduction, and then calculate the overlapping area of ​​the first cell and all the second cells, and use the second cell with the largest overlapping area as the second cell corresponding to the first cell. And so on, until the corresponding second cell is found for each second cell. In practical applications, the reduction multiple can be determined based on the area of ​​the first cell to prevent calculation errors caused by excessive reduction multiples.

[0095] 2) First, the area of ​​the first cell and each second cell is reduced simultaneously, and the overlapping area of ​​the first cell and the second cell after the reduction is calculated. Then, the second cell with the largest overlapping area is used as the second cell corresponding to the first cell. In this embodiment, taking the simultaneous reduction of the area of ​​the first cell and the second cell by 1 / 2 as an example: assuming that the width and height of the first cell are W and H respectively, the area with (1 / 4*W, 1 / 4*H) as the upper left vertex and (3 / 4*W, 3 / 4*H) as the lower right vertex represents the first cell after the reduction. The second cell is reduced using the same reduction method, and the overlapping area of ​​the first cell and the second cell after the reduction is calculated. The second cell with the largest overlapping area is used as the second cell corresponding to the first cell. And so on, until the corresponding second cell is found for each second cell. Similarly, in actual use, the reduction multiple can be determined based on the areas of the first cell and the second cell to prevent calculation errors caused by excessive reduction multiples.

[0096] It should be noted that if only one of the above methods is used, the matching result obtained by the selected method will be used as the final matching result. If both methods are used and the matching results of the two methods are consistent, the match is considered correct; otherwise, the matching result is considered incorrect and the matching model is used for matching.

[0097] It should also be noted that when using any of the above matching methods, if the calculated overlapping area between the first cell and each second cell is zero, that is, the first cell has no intersection with any second cell, then the distance from the center point of the first cell to the center point of each second cell is calculated, and the second cell with the shortest distance is used as the second cell corresponding to the first cell to obtain the matching result.

[0098] When the first cell does not meet the preset conditions, in order to ensure the accuracy of the matching results output by the matching model, it is necessary to first determine whether the first cell meets the following conditions:

[0099] The first cell falls within one of the second cells; or

[0100] The first cell intersects only one of the second cells; or

[0101] One of the second cells falls within the first cell; or

[0102] There is only one second cell that intersects the first cell;

[0103] If yes, directly use the second cell as the second cell corresponding to the first cell;

[0104] If not, the first cell is input into the matching model, and the matching model outputs a second cell corresponding to the first cell.

[0105] It should be noted that for the first and second cells in the input matching model, the distance between the first and second cells must be calculated. This distance can be the distance between the closest point or line, or the distance between their centers. A determination is then made as to whether the calculated distance is greater than a distance threshold. If so, the second cell, if greater than the distance threshold, is excluded from the candidate matches and, therefore, not entered into the matching model. This would increase the burden on the matching model and potentially cause matching errors.

[0106] In this embodiment, the matching model uses the MobileNetV3 network as the base model, and the matching model is pre-trained before use. The matching model can extract features from the user image and the answer image. For example, it extracts the first cell in the user image and its coordinates, shape, size, and other features. The extracted features are then spliced ​​together. The first cell and a second cell that meets the requirements are then input into the fully connected network of the matching model. After processing, the fully connected network outputs the first cell and at least one second cell corresponding to the first cell, as well as the corresponding matching score. If a first cell corresponds to only one second cell, the second cell is directly used as the second cell matching the first cell. If a first cell corresponds to multiple second cells, the second cell with the highest matching score is used as the second cell matching the first cell.

[0107] When using the matching model, in one matching process, multiple first cells can be matched with corresponding second cells at the same time, so multiple first cells and multiple second cells can be input. The number of first cells and the number of second cells can be the same or different, but the maximum number of first cells and second cells input does not exceed the preset number threshold, so as to avoid the input number exceeding the range that the matching model can bear. In addition, multiple first cells can be matched with corresponding second cells at one time.

[0108] In summary, if Figure 2 As shown in the figure, when two matching results are obtained using the above two scaling methods, the matching results are represented by matching result 1 and matching result 2 respectively. If matching result 1 and matching result 2 are the same, the same matching result is used as the final matching result; if matching result 1 and matching result 2 are different, the matching model is continued to be used to obtain a matching result, which is represented by matching result 3. If matching result 3 is the same as either matching result 1 or matching result 2, the same matching result is used as the final matching result; if matching result 3 is different from both matching result 1 and matching result 2, matching result 3 is used as the final matching result.

[0109] As can be seen, this embodiment uses a matching model to match the first and second cells for irregular table questions, while also incorporating constraints on the input matching model to reduce model matching errors. This is particularly true when processing dense, irregular tables, where neither traditional methods nor model matching methods alone can achieve ideal results. Therefore, this embodiment combines traditional matching methods with model matching methods to handle the matching process between the first and second cells, achieving a complementary effect between traditional and model matching methods.

[0110] In a possible implementation, step S4 also includes the contents of steps S41 to S43.

[0111] Step S41, determining whether the density of the plurality of first cells in the user image is less than or equal to a preset density;

[0112] Step S42: If yes, for each group of cells to be corrected, compare the answer in the first cell with the correct answer in the second cell, and obtain the correction result based on the comparison result;

[0113] Step S43: If not, merge multiple first cells and multiple second cells in multiple groups of cells to be corrected to obtain a question area and an answer area respectively; compare the answer in the question area with the correct answer in the answer area, and obtain a correction result based on the comparison result.

[0114] Specifically, for densely populated table questions, when performing OCR recognition on a single first cell, there may be inaccurate recognition results. For example, the border of the first cell may be treated as a character, so a one-to-one grading method may result in grading errors. Therefore, it is necessary to merge dense first cells. Specifically, the answers in the first cell are merged, and the second cells are also merged. That is, the correct answers in the second cells are merged. The merged answers are then compared with the correct answers to improve the accuracy of the grading results.

[0115] It should be noted that in a user image, the density of multiple first cells in a local image may be greater than the preset density, while the density of multiple first cells in the remaining image may be less than or equal to the preset density. Therefore, during a grading process, it is possible to compare the answer in the first cell with the correct answer in the second cell, and the answer in the answer area with the correct answer in the answer area. When grading:

[0116] If the answer in the first cell is the same as the correct answer in the second cell, the result of the correction is correct; otherwise, the result of the correction is wrong.

[0117] If the answer in the answer area is the same as the correct answer in the answer area, the grading result is correct; otherwise, the grading result is wrong.

[0118] It should be noted that, whether it is a one-to-one correction method or a combined correction method, when the answer and the correct answer are both formulas and the correction result is wrong, the correct answer will be annotated in the first cell of the answer or in the answer area to facilitate users to view the correct answer.

[0119] It should be noted that the order of execution of the steps in the above embodiments does not necessarily imply a specific order of execution. The order of execution of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In practical applications, all possible implementation methods described above can be combined in any manner to form possible embodiments of the present application, and will not be described in detail here.

[0120] Based on the methods for correcting table titles provided in the above embodiments, and based on the same inventive concept, an embodiment of the present application also provides a system for correcting table titles.

[0121] Figure 3 This is a structural diagram of the system for correcting table titles provided in the embodiment of the present application. Figure 3 As shown, the system can specifically include an image input module, a pixel alignment module, an answer trace matching module, an answer area mapping module and a correction module.

[0122] Image input module, used to input user image and answer image.

[0123] Pixel alignment module, used to align user images and answer images.

[0124] The alignment verification module is used to determine whether the user image and the answer image are aligned successfully.

[0125] The answer trace matching module is used to match a corresponding second cell for each first cell in the user image from the answer image when the user image and the answer image are successfully aligned, so as to obtain a group of cells to be corrected.

[0126] The answer area mapping module is used to map each second cell in the answer image to the user image when the user image and the answer image fail to be aligned, and input the mapping result into the answer trace matching module.

[0127] The correction module is used to compare the answer in the first cell with the correct answer in the second cell for each group of cells to be corrected, and obtain the correction result according to the comparison result.

[0128] The system for correcting table titles provided in this embodiment is used to execute the method for correcting table titles provided in the above embodiment. Its implementation method and principle are the same. For detailed implementation of each module, please refer to the relevant description of the above method embodiment, which will not be repeated here.

[0129] Based on the same inventive concept, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for correcting table titles of any of the above embodiments.

[0130] In an exemplary embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4 The electronic device 400 shown includes a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, for example, via a bus 402. Optionally, the electronic device 400 may further include a transceiver 404. It should be noted that in actual applications, the number of transceivers 404 is not limited to one, and the structure of the electronic device 400 does not constitute a limitation on the embodiments of the present application.

[0131] Processor 401 may be a CPU (Central Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0132] The bus 402 may include a path for transmitting information between the above components. The bus 402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0133] The memory 403 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0134] The memory 403 is used to store computer program codes for executing the solution of the present application, and the execution is controlled by the processor 401. The processor 401 is used to execute the computer program codes stored in the memory 403 to implement the contents shown in the above method embodiment.

[0135] Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0136] Based on the same inventive concept, an embodiment of the present application further provides a storage medium storing a computer program, wherein the computer program is configured to execute the method for correcting table titles of any of the above embodiments when running.

[0137] Those skilled in the art will clearly understand that the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they will not be further described here.

[0138] Those skilled in the art will appreciate that the technical solution of the present application, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of program instructions for causing an electronic device (e.g., a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application when the program instructions are executed. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0139] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware related to program instructions (such as electronic devices such as personal computers, servers, or network devices), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of an electronic device, the electronic device executes all or part of the steps of the methods described in the various embodiments of the present application.

[0140] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that, within the spirit and principles of the present application, they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate from the protection scope of the present application.

Claims

1. A method for correcting table questions, characterized in that: include: receiving a user image, wherein the user image is an image obtained after the user answers a form question, and the user image is composed of a plurality of first cells; aligning the user image and an answer image corresponding to the user image, wherein the answer image includes a correct answer to a form question and the answer image is composed of a plurality of second cells; Matching a corresponding second cell to each first cell in the user image from the answer image to obtain a set of cells to be corrected; For each group of cells to be corrected, comparing the answer in the first cell with the correct answer in the second cell; A correction result is obtained according to the comparison result.

2. The method according to claim 1, characterized in that The method of matching the first cell with the corresponding second cell includes: Determining whether the first cell meets a preset condition; If yes, then calculating the overlapping area between the first cell and each second cell in the answer image, and taking the second cell with the largest overlapping area as the second cell corresponding to the first cell; If not, the first cell is input into a matching model, and the matching model outputs a second cell corresponding to the first cell.

3. The method according to claim 2, characterized in that The method for calculating the overlapping area between the first cell and each second cell in the answer image includes: reducing the area of ​​the first cell, and calculating the overlapping area of ​​the reduced first cell and each of the second cells; and / or The areas of the first cell and each of the second cells are reduced simultaneously, and the overlapping area of ​​the first cell and the second cell after the reduced areas are calculated.

4. The method according to claim 3, characterized in that If after reducing the area of ​​the first cell and reducing the areas of the first cell and the second cell at the same time, the corresponding overlapping areas are calculated and the matching results obtained based on the corresponding overlapping areas are different, the matching model is used to match the first cell with the corresponding second cell.

5. The method according to claim 3, characterized in that The method further comprises: If the overlapping area between the first cell and each of the second cells is zero; Then calculating the distance from the center point of the first cell to the center point of each of the second cells; The second cell with the shortest distance is used as the second cell corresponding to the first cell.

6. The method according to claim 2, characterized in that When the first cell does not meet the preset condition, the method further includes: Determine whether the first cell satisfies: The first cell falls within one of the second cells; or The first cell has an intersection with only one of the second cells; or One of the second cells falls within the first cell; or There is only one second cell that intersects the first cell; If yes, taking the second cell as the second cell corresponding to the first cell; If not, the first cell is input into a matching model, and the matching model outputs a second cell corresponding to the first cell.

7. The method according to claim 1, characterized in that After aligning the user image and the answer image corresponding to the user image, the method further includes: Determining whether the user image and the answer image corresponding to the user image are successfully aligned; If so, matching each first cell in the user image with a corresponding second cell in the answer image to obtain a group of cells to be corrected; for each group of cells to be corrected, comparing the correct answer in the first cell with the correct answer in the second cell; and obtaining a correction result based on the comparison result; If not, each second cell in the answer image is mapped to the user image, and then a corresponding second cell is matched from the answer image to each first cell in the user image to obtain a group of cells to be corrected; for each group of cells to be corrected, the answer in the first cell and the correct answer in the second cell are compared; and the correction result is obtained based on the comparison result.

8. The method according to claim 7, characterized in that The method further comprises: intercepting a line text sub-image of the user image according to the coordinates of the printed text box in the answer image; Identifying the line text content in the line text sub-image, and calculating the similarity between the line text content and the line text content in the answer image; When the similarity is greater than the similarity threshold, it is determined that the user image and the answer image are successfully aligned; When the similarity is less than or equal to the similarity threshold, it is determined that the alignment between the user image and the answer image fails.

9. The method according to claim 8, characterized in that If a plurality of the line text sub-images are intercepted, an average similarity value corresponding to the plurality of the line text sub-images is calculated, and when the average similarity value is greater than the similarity threshold, it is determined that the user image and the answer image are successfully aligned.

10. The method according to claim 1, characterized in that The method further comprises: When the density of the plurality of first cells in the user image is greater than a preset density: Merging a plurality of the first cells and a plurality of the second cells in a plurality of groups of cells to be corrected to obtain a question area and an answer area respectively; Comparing the answer in the answer area with the correct answer in the answer area; A correction result is obtained according to the comparison result.

11. The method according to claim 10, characterized in that When comparing the answer in the first cell and the correct answer in the second cell, and the answer in the answer area and the correct answer in the answer area, the following conditions are satisfied: If the answer to the question is the same as the correct answer, the correction result is correct; If the answer to the question is different from the correct answer, the correction result is wrong.

12. The method according to claim 11, characterized in that The method further comprises: When the answer and the correct answer are both formulas, and the correction result is wrong, the correct answer is annotated in the first cell or answer area where the answer is located.

13. A system for correcting table questions, characterized in that: include: Image input module, used to input user image and answer image; a pixel alignment module, configured to align the user image and the answer image; an alignment verification module, configured to determine whether the user image and the answer image are successfully aligned; an answer trace matching module, configured to, when the user image and the answer image are successfully aligned, match each first cell in the user image with a corresponding second cell in the answer image to obtain a set of cells to be corrected; an answer area mapping module, configured to map each second cell in the answer image onto the user image when alignment between the user image and the answer image fails, and input the mapping result into the answer trace matching module; The correction module is used to compare the answer in the first cell with the correct answer in the second cell for each group of cells to be corrected, and obtain a correction result according to the comparison result.

14. An electronic device, characterized in that: The computer system comprises a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for correcting form questions according to any one of claims 1 to 12.