Method and system for automatically marking answer sheet
Through multiple rounds of confidence judgment and auxiliary reasoning mechanism, the problem of high OCR recognition error is solved, the efficient and accurate automatic marking of answer sheets is achieved, manual intervention is reduced, and the recognition effect of sloppy handwriting and areas with poor recognition but reasoning value is improved.
Patent Information
- Application Number
- CN202511136467.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-08-14
AI Technical Summary
In the existing automatic answer sheet grading technology, OCR recognition is easily affected by illegible handwriting, poor printing quality of the test paper and physical deformation, resulting in high recognition errors. In particular, the recognition accuracy of subjective questions and non-standard handwritten content is low, requiring a lot of manual intervention, affecting grading efficiency.
A multi-round confidence assessment and auxiliary reasoning mechanism is adopted. Through OCR recognition, handwritten text feature comparison and logical association correction, it distinguishes between "areas that can be inferred" and "areas with no reasoning value", and gives priority to low-confidence, high-score areas. QR code and image preprocessing are introduced to ensure accurate extraction of answer traces.
It significantly improves the accuracy of OCR recognition, reduces the need for manual intervention, and improves review efficiency, especially for areas with sloppy handwriting and poor recognition but with reasoning and correction value, improving the accuracy and efficiency of automatic review.
Smart Images

Figure CN120747985A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition, and in particular to a method and system for automatically marking answer sheets. Background Art
[0002] In the existing automatic answer sheet grading technology, OCR recognition is easily affected by factors such as illegible handwriting (such as blurred handwriting and typos), poor printing quality of the test paper (such as blur and stains), and physical deformation (such as wrinkles and tilt), resulting in high recognition errors, which in turn reduces the accuracy of automatic grading. This problem is particularly prominent in the recognition of subjective questions and non-standard handwritten content, requiring a large amount of manual intervention, affecting grading efficiency.
[0003] Another important point is that there are many areas in the answer sheet that are not well recognized by OCR but have value for inference correction (for example, candidates in some exams write sloppily, but the content of their writing is very close to the standard answer). Existing technologies cannot effectively recognize the answers in these areas and require a lot of manual intervention. This application can especially solve this type of problem. Summary of the Invention
[0004] The purpose of the present invention is to overcome the defects of the prior art and provide a method for automatically marking answer sheets, and at the same time provide an automatic marking system for answer sheets to solve the problems raised in the above background technology.
[0005] The automatic marking method for answer sheets of the present invention comprises the steps of: Enter the standard answers to the corresponding questions on the answer sheet, store their text features, logical associations, and the location information of the standard answers on the answer sheet; perform OCR recognition on the divided answer area and make a judgment based on the confidence level: if the confidence level is greater than or equal to the first threshold, it is marked as the "successful recognition area" and enters the comparison stage; otherwise, it is marked as the "area to be inferred"; perform OCR recognition on the answer area after the "area to be inferred" is divided and a second judgment is made based on the confidence level: if the confidence level is greater than or equal to the second threshold, it is marked as the "area that can be inferred", otherwise it is marked as the "area with no inference value" and pushed to the manual comparison stage; the second threshold is less than the first threshold; for the "area that can be inferred", by comparing the handwritten text features with the text features of the standard answer, and comparing the handwritten logical associations with the standard answer logical associations, corrections are made to obtain the "inference processing area" image; For the answer area after the image of the "inference processing area" is divided, OCR recognition is performed and the confidence level is judged three times: the area with a confidence level greater than or equal to the first threshold is marked as a "successfully identified area" and enters the comparison stage; otherwise, it is marked as a "area with no reasoning value" and pushed to the manual comparison stage; the "successfully identified area" that enters the comparison stage is automatically reviewed.
[0006] Furthermore, before performing OCR recognition on the divided answer area, the answer sheet is pre-processed, including: Scan the student's answer sheet and generate an image, and associate the student number and question number sequence information through the QR code; pre-process the image to retain valid answer traces.
[0007] Furthermore, before performing OCR recognition on the divided answer area, the answer sheet is pre-processed, including: Based on the position information recorded in the standard answer feature library, the answer area of each question is divided on the preprocessed answer sheet image; if there is a deviation in the area, the boundary is corrected by identifying the question number text on the answer sheet.
[0008] Furthermore, entering the standard answers to the test questions on the answer sheet and storing their text features, logical associations and position information of the standard answers on the answer sheet include: entering the standard answers to the test questions on the answer sheet, wherein for objective questions, the text content of each option, the stroke structure and morphological features of the characters, and the logical association of knowledge points between questions; for subjective questions, the core keywords, the semantic association of key sentences, the logical sequence of problem-solving steps, as well as the number of strokes of the characters and the position features of radicals, and at the same time, scanning the blank answer sheet to determine the position information of the area where the standard answers to each question are located, including the corner coordinates of the area and the character spacing, and storing these text features, logical associations and position information in a unified manner to form a standard answer feature library.
[0009] Furthermore, when performing OCR recognition on the divided answer area, the multi-dimensional feature matching degree is calculated simultaneously as the basis for confidence assessment; first, the contour features of the characters are extracted, and their normalized cross-correlation values with the standard character template are calculated; then, the stroke structure features are analyzed, and the matching degree of the number of strokes and intersection position features is counted; then, the contextual semantic relevance is evaluated, and the cosine similarity between the recognized text and the expected content is calculated based on the question type and the expected semantics of the standard answer; the final confidence is obtained by weighted fusion of these three indicators.
[0010] Furthermore, the answer area after the "area to be inferred" is re-divided is subjected to OCR recognition again, and the secondary confidence is calculated by multi-dimensional feature fusion; first, the local stroke detail features of the handwritten characters are extracted, and their feature matching rate with the corresponding characters in the standard answer text feature library is calculated; secondly, the position distribution characteristics of the characters in the area are analyzed and compared with the character layout of the standard answer area to obtain the layout matching degree; then, based on the type of question to which the area belongs, the question type adaptation coefficient is introduced, and the secondary confidence is calculated together with the feature matching rate and layout matching degree.
[0011] Furthermore, pushing to the manual comparison stage also includes calculating the manual processing priority of the "area with no reasoning value", so that the low-confidence, high-score area enters the manual processing queue first.
[0012] Furthermore, the second threshold is set to be smaller than the first threshold, and in terms of characterizing the answer sheet recognition quality, the second threshold is set to be smaller than the first threshold.
[0013] Furthermore, when comparing the handwritten text features with the standard answer text features, calculate the feature matching degree M of the handwritten characters and the standard answer characters, M=(number of matched stroke features + number of matched structural features) / (total number of stroke features + total number of structural features), where the matched stroke features include the length of the strokes, the tilt angle, and the degree of consistency of the start and end point coordinates, and the matched structural features include the overlap rate of the overall outline of the character and the relative position deviation rate of the radicals; when comparing the handwritten logical association with the standard answer logical association, the objective question calculates the logical consistency of the options L1=(matching the standard The semantic logic matching degree L2 of subjective questions is calculated as (mean value of keyword semantic similarity × keyword weight + step logic node matching degree × step weight), where keyword semantic similarity is calculated by cosine distance of word vectors, and step logic node matching degree is obtained by weighting the step sequence matching rate and causal correlation degree; the comprehensive correction index of the corrected image is determined by the comprehensive correction index kuy=α×M+β×L1 or kuy=α×M+β×L2.
[0014] Also disclosed is an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for automatically marking answer sheets.
[0015] Beneficial effects of the present invention: This application introduces an auxiliary reasoning mechanism for content with OCR recognition errors (low confidence), significantly improving OCR recognition accuracy in scenarios such as illegible handwriting and stained / wrinkled exam papers. This effectively addresses the low accuracy of automated grading due to high recognition errors in existing technologies. By performing multiple confidence checks on answer sheet regions, the system distinguishes between "reasonable" and "unreasonable" areas, routing only the latter to manual review, significantly reducing the need for manual intervention. Furthermore, by calculating manual processing priorities, low-confidence, high-scoring areas are prioritized, improving manual comparison efficiency. During the preprocessing step, QR code association information, image preprocessing, and region segmentation correction ensure accurate extraction and localization of valid answer traces. This application is particularly effective in addressing issues where OCR recognition of many areas on the answer sheet is poor but valuable for correction (for example, in some exams where candidates' handwriting is sloppy but the content is very close to the standard answer) by locating these poorly recognized areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention is a flowchart of the automatic marking method for answer sheets. DETAILED DESCRIPTION
[0017] This application discloses a method for automatically marking answer sheets. Figure 1, including the steps of: S100. Entering the standard answers to the corresponding questions on the answer sheet, storing their text features, logical associations and the position information of the standard answers on the answer sheet as the basis for recognition and reasoning; S1001. Preprocessing the answer sheet; S101. Performing OCR recognition on the divided answer area and judging by the confidence level: if the confidence level is greater than or equal to the first threshold, it is marked as "successful recognition area" and enters the comparison link; otherwise, it is marked as "area to be inferred"; S102. Performing OCR recognition on the answer area after the "area to be inferred" is divided and judged again by the confidence level; S103. If the confidence level is greater than or equal to the second threshold, it is marked as "area that can be inferred", otherwise it is marked as "unable to be inferred". "Area with reasoning value", pushed to the manual comparison link, the second threshold is less than the first threshold; S104. For the "area capable of reasoning", by comparing the handwritten text features with the standard answer text features, and comparing the handwritten logical association with the standard answer logical association, correction is performed to obtain the "inference processing area" image; S105. For the answer area after the "inference processing area" image is divided, OCR recognition is performed and three judgments are made according to the confidence level: the confidence level is greater than or equal to the first threshold, marked as "successful recognition area", and enters the comparison link; otherwise, it is marked as "no reasoning value area" and pushed to the manual comparison link; S106. The "successful recognition area" entering the comparison link is automatically reviewed. A method for automatic review of answer sheets in the present application can be implemented by a computer program, and the computer program for implementing the method of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0018] Regarding S100. Enter the standard answers to the corresponding test questions on the answer sheet, store their text features, logical associations, and the position information of the standard answers on the answer sheet as a benchmark for recognition and reasoning; in implementation, specifically, enter the standard answers to the corresponding test questions on the answer sheet. For objective questions, the text content of each option, the stroke structure and morphological features of the characters, and the logical association between knowledge points in the questions need to be entered; for subjective questions, the core keywords, the semantic association of key sentences, the logical sequence of the problem-solving steps, as well as the number of strokes of the characters and the position characteristics of the radicals need to be entered. At the same time, scan the blank answer sheet to determine the position information of the area where the standard answers to each question are located, including the corner coordinates of the area and the character spacing. These text features, logical associations, and position information are uniformly stored to form a standard answer feature library, which provides a reference standard for subsequent OCR recognition, error reasoning, and area division.
[0019] S101 performs OCR on the divided answer area and determines the confidence level: areas with a confidence level greater than or equal to a first threshold are marked as "successfully recognized areas" and enter the comparison phase; otherwise, they are marked as "areas to be inferred." Specifically, during OCR on the divided answer area, multi-dimensional feature matching is simultaneously calculated as a basis for confidence assessment. First, character contour features are extracted and their normalized cross-correlation with the standard character template is calculated, denoted as CF. Next, stroke structure features are analyzed, and the matching level of stroke count and intersection position features is calculated, denoted as SF. Finally, contextual semantic relevance is evaluated. Combining the question type and the expected semantics of the standard answer, the cosine similarity between the recognized text and the expected content is calculated, denoted as LF. The final confidence level, C, is derived by weighted fusion of these three metrics using the formula C = w1 × CF + w2 × SF + w3 × LF, where w1, w2, and w3 are weight coefficients, and w1 + w2 + w3 = 1. The specific value is dynamically adjusted based on the question type. For objective questions, the weight of SF is increased; for subjective questions, the weight of LF is increased. In this way, the accuracy of OCR recognition results can be quantitatively evaluated.
[0020] Regarding S102, OCR recognition is performed on the answer area after the "area to be inferred" is divided, and a secondary confidence assessment is performed. Specifically, the answer area after the "area to be inferred" is re-divided and OCR recognition is performed again. The secondary confidence is calculated using a multi-dimensional feature fusion method. First, the local stroke details of the handwritten characters are extracted, such as stroke width variation and endpoint shape. The feature matching rate with the corresponding characters in the standard answer text feature library is calculated, denoted as FM. Second, the positional distribution characteristics of the characters within the area are analyzed and compared with the character layout of the standard answer area to obtain the layout matching degree, denoted as PM. Then, based on the type of question (objective question / subjective question) to which the area belongs, a question type adaptation coefficient is introduced to weight the feature matching rate and layout matching degree. The secondary confidence C2 is calculated as C2 = ku1 × FM + ku2 × PM, where ku1 and ku2 are weight coefficients, and ku1 + ku2 = 1. In objective questions, ku1 is given a higher weight to highlight the characteristics of the characters themselves, while in subjective questions, ku2 is given a higher weight to consider the rationality of the writing layout.
[0021] Regarding S103, the answer area divided into "areas to be inferred" undergoes OCR recognition and undergoes a secondary confidence assessment. Areas with a confidence level greater than or equal to the second threshold are marked as "areas capable of inference." Otherwise, they are marked as "areas without inference value" and sent to the manual comparison stage. Specifically, when an area is marked as "areas without inference value," it is sent to the manual comparison stage along with detailed information about the area, including the original OCR recognition result, the corresponding question number, the standard answer features, the area image, and the basis for the "area without inference value" assessment. The manual comparison interface integrates this information for easy viewing by reviewers. The manual processing priority for the area is calculated using the formula P = m × (1-C_max) + n × s, where C_max is the highest confidence value (primary or secondary confidence level) for the area in all previous confidence assessments, s is the score contribution of the question in the test paper, and m and n are weighting coefficients, with m + n = 1. This formula prioritizes low-confidence, high-scoring areas for manual processing, improving the efficiency of manual comparison. Reviewers make their judgments based on the displayed information.
[0022] It should be noted that the second threshold is smaller than the first threshold.
[0023] Specifically, the first threshold is determined based on the confidence calculation result of the first OCR recognition. The calculation takes into account the normalized cross-correlation value CF between the character outline and the standard template, the stroke structure matching degree SF, and the contextual semantic relevance LF. The formula is C1=w1×CF+w2×SF+w3×LF, where w1, w2, and w3 are weights and their sum is 1. Objective questions focus on the SF weight, while subjective questions focus on the LF weight. The second threshold is determined based on the confidence calculation result of the second OCR recognition. The calculation takes into account the matching rate FM of the local stroke details of the handwritten character and the standard answer features, as well as the character layout matching degree PM. The formula is C2=ku1×FM+ku2×PM, where ku1 and ku2 are weights and their sum is 1. Objective questions emphasize the FM weight, while subjective questions take into account the PM weight. Since the initial recognition quality of the "area to be inferred" is low, the secondary confidence calculation focuses more on features that can be corrected through reasoning. Therefore, the second threshold is set to be smaller than the first threshold, and the second threshold is set to be smaller than the first threshold in characterizing the recognition quality of the answer sheet. For example, the second threshold is set to 85% and the first threshold is set to 90%. In characterizing the recognition quality of the answer sheet, more areas that are initially poorly recognized but have value for reasoning correction can be screened out, while avoiding the inclusion of areas that cannot be corrected through reasoning at all. Therefore, if there are many areas in the answer sheet that are poorly recognized by OCR but have value for reasoning correction (for example, candidates in some exams write sloppily, but the content of the writing is very close to the standard answer), this application can especially solve this type of problem and can find this area that is poorly recognized but has value for reasoning correction.
[0024] For S104. For the "area capable of inference", correction is performed by comparing the handwritten text features with the standard answer text features, and comparing the handwritten logical associations with the standard answer logical associations, to obtain the "inference processing area" image; specifically in implementation, when comparing the handwritten text features with the standard answer text features, the feature matching degree M of the handwritten characters and the standard answer characters is calculated, M=(number of matched stroke features+number of matched structural features) / (total number of stroke features+total number of structural features), wherein the matched stroke features include the length of the strokes, the tilt angle, and the degree of consistency of the start and end point coordinates, and the matched structural features include the overlap rate of the overall outline of the characters and the relative position deviation rate of the radicals. When comparing handwritten logical associations with standard answer logical associations, objective questions calculate the option logical fit L1 = (the number of features that conform to the distribution pattern of standard answer options + the number of cross-question option association matches) / (the total number of option features + the total number of cross-question associations), and subjective questions calculate the semantic logical matching L2 = (the mean of keyword semantic similarity × keyword weight + step logic node matching × step weight), where keyword semantic similarity is calculated by the cosine distance of word vectors, and step logic node matching is obtained by weighting the step sequence matching rate and causal correlation. The comprehensive correction index kuy = α × M + β × L1 or kuy = α × M + β × L2 (α = 0.7, β = 0.3 for objective questions; α = 0.4, β = 0.6 for subjective questions). When kuy ≥ 0.85, the character is directly replaced with the feature corresponding to the most closely matching standard answer. When 0.6 ≤ kuy < 0.85, the character is supplemented or corrected based on feature differences (e.g., missing strokes are completed or incorrect radicals are corrected). When kuy < 0.6, the original handwritten features are retained and the difference areas are annotated. The image formed after this correction is the "inference processing area" image.
[0025] S105. Perform OCR recognition on the answer area after the image of the "reasoning processing area" is divided and make three judgments based on the confidence level: Areas with a confidence level greater than or equal to the first threshold are marked as "successfully identified areas" and enter the comparison phase; otherwise, they are marked as "areas with no inference value" and pushed to the manual comparison phase. Specifically, in implementation, the OCR recognition of the answer area after the image is divided into the "inference processing area" is consistent with the confidence assessment of the first OCR recognition of the divided answer area, and the multi-dimensional feature matching degree is calculated simultaneously as the basis for the confidence assessment. First, the contour features of the characters are extracted and their normalized cross-correlation values with the standard character template are calculated. Then, the stroke structure features are analyzed and the matching degree of the number of strokes and intersection position features is counted. The contextual semantic relevance is then evaluated, and the cosine similarity between the recognized text and the expected content is calculated based on the question type and the expected semantics of the standard answer. The final confidence level is obtained by weighted fusion of these three indicators.
[0026] S106. Automatically review the “successfully identified areas” in the comparison phase. Specifically, when automatically reviewing the “successfully identified areas” in the comparison phase, first call the corresponding comparison rules in the standard answer feature library based on the question type: For objective questions (e.g., multiple-choice and true / false questions), the student's answer (e.g., option "A" or "√") is extracted from the region and directly matched against the standard answer (e.g., option "B" or "×"). If the answer is completely consistent, the answer is considered correct, a "√" mark is automatically generated next to the region, and the matching basis is recorded (e.g., "Matches standard answer option B"). If the answer is inconsistent, the answer is considered incorrect, an "×" mark is generated, and the result is recorded as "Does not match standard answer option B, recognition result is A."
[0027] For subjective questions (such as short-answer questions and calculation questions): For example: Analyze the core scoring points of the standard answers, including key words (such as "photosynthesis" and "Pythagorean theorem"), semantic associations (such as "cause → result" logic), and step logic (such as "simplify first and then substitute"). Extract the text content in the student's answer, compare the keyword matching degree (such as when "photosynthesis" and "photosynthesis" are partially matched due to a typo, calculate the character overlap rate), semantic similarity (calculate the correlation between the student's answer and the core semantics of the standard answer through the word vector model) and step completeness (such as whether the math problem contains the necessary steps of "formula substitution" and "result calculation"). If the student's answer covers more than 80% of the key scoring points and the semantics are consistent with the step logic, it is judged to be correct, and a "√" mark is generated, recording "contains the keyword 'photosynthesis' and the step logic is consistent"; if only some of the scoring points are covered, it is judged to be partially correct according to the proportion (such as assigning "3 / 5"); if key information is missing or the logic is contradictory, it is judged to be wrong, and an "×" mark is generated, recording "missing the core keyword 'mitochondria'".
[0028] All judgment results are linked to the corresponding questions and student numbers in real time, and the automatic marking track (including comparison process data) is stored. A preliminary marking report is generated in the system for subsequent manual review.
[0029] Before performing OCR recognition on the divided answer area, step S1001 is also included. Pre-processing the answer sheet includes: Scan the answer sheet of the students and generate an image. Use the QR code to associate the student number and question number sequence information, pre-process the image, and retain the valid answer traces. Specifically in the implementation, use a high-definition scanner to batch scan the answer sheets of the students to generate high-resolution digital images (resolution not less than 300dpi), and the image format is JPEG or PNG. During the scanning process, the system automatically recognizes the preset QR code on the answer sheet. The QR code contains the student's unique number, class information, examination subject, test paper number and question number sequence information (such as the order of arrangement of each question type in the test paper, and the score range corresponding to the question number). After the system parses the QR code information, it binds it with the scanned answer sheet image to establish a one-to-one index relationship to ensure that each image can be accurately associated with the corresponding student and test paper batch.
[0030] The generated image is preprocessed in multiple steps: first, image correction is performed by identifying the positioning lines on the edge of the answer sheet or the positioning points at the four corners to detect whether the image is tilted or wrinkled. If there is a tilt, the image is rotated to a horizontal state. If there are slight wrinkles, local flattening is performed through elastic deformation correction to ensure that the text lines remain horizontal; secondly, image enhancement is performed, and sharpening is used to enhance the stroke edges in the blurred area to make the handwriting clearer; then noise reduction is performed, and median filtering is used to remove random noise in the image (such as paper stains and scanning noise) while retaining the detailed features of the handwritten strokes; finally, edge trimming is performed, and according to the effective answer area range recorded in the standard answer feature library, irrelevant borders, header and footer areas in the image are cropped out, retaining only the core area containing the answer traces.
[0031] Before performing OCR recognition on the divided answer area, step S1001 is also included. Pre-processing the answer sheet includes: Based on the position information recorded in the standard answer feature library, the answer area for each question is divided on the pre-processed answer sheet image; if there is a deviation in the area, the boundary is corrected by identifying the question number text on the answer sheet. In implementation, based on the position information of the answer area for each question recorded in the standard answer feature library, including the coordinates of the upper left and lower right corners of each question answer area on the blank answer sheet, the area width and height, and the row and column spacing of the characters in the area, these parameters are applied as a template to the pre-processed student answer sheet image. Through coordinate mapping, the coordinate system of the student answer sheet image and the blank answer sheet template are aligned, and the answer area corresponding to each question is automatically framed according to the template parameters to achieve preliminary division.
[0032] If there is a regional deviation after division, such as due to printing offset or scanning deformation, the answer area on the student answer sheet does not match the template position, the question number text recognition correction is started. First, the text content around each preliminary divided area is extracted, and the question number text (such as "1.", "(2)", "the third question") is recognized through OCR. The character features of these question number texts (such as digital form, punctuation style, and text font) are extracted and compared with the pre-stored question number text features in the standard answer feature library to determine the actual question number corresponding to the currently recognized question number.
[0033] Based on the matching results, the system retrieves the standard position information corresponding to the question in the standard answer feature library and calculates the deviation between the position of the question number identified on the student's answer sheet and the standard position (including the horizontal x-axis offset and the vertical y-axis offset). Based on this deviation, the system adjusts the boundaries of the answer area corresponding to the question, translating and scaling the bounding box so that the answer area accurately covers the student's answer content, ensuring that the area division is consistent with the actual question position.
[0034] In addition, for the values of weight coefficients w1, w2, and w3, this application proposes a dynamic iterative optimization method for weight coefficients based on training data: by analyzing the "correlation between feature performance and recognition accuracy" in historical recognition samples, the weights of contour features (CF), stroke structure features (SF), and semantic relevance (LF) are adjusted in real time to make the confidence calculation more in line with the actual recognition rules of different scenarios (such as handwriting sloppiness and test paper cleanliness).
[0035] The dynamic calculation model of weight coefficient is: ; i=1,2,3, including: Basic weight (wᵢ0): The initial value is preset according to the question type (for example, objective questions: w 10 =0.2,w 20 =0.6,w 30 =0.2; Subjective question: w 10 =0.1,w 20 =0.3,w 30 =0.6), as the starting point of iteration; k and j are both feature index variables, used to distinguish different feature dimensions (i.e., contour feature CF, stroke structure feature SF, semantic relevance LF); when k=1 or j=1, it corresponds to contour feature (CF), when k=2 or j=2, it corresponds to stroke structure feature (SF), and when k=3 or j=3, it corresponds to semantic relevance (LF); Feature reliability (Rᵢ): used to quantify the contribution of a feature to recognition accuracy. The calculation formula is: ; To correctly identify the mean of feature i in the sample; is the mean of feature i in the misidentified samples; is the standard deviation of feature i in the correct sample. The larger the value, the stronger the ability of feature i to distinguish correct from incorrect. Feature redundancy coefficient γ kj : Used to measure the correlation between feature k and feature j (value 0~1), avoid repeated calculations, feature redundancy coefficient γ kj The calculation formula is ; (corr is the Pearson correlation coefficient, k and j refer to two different feature dimensions, for example: γ 12 In the example, k=1 represents the contour feature, j=2 represents the stroke structure feature, and γ 12 That is, the absolute value of the correlation coefficient between the two; γ 32 In the equation, k=3 represents semantic relevance, j=2 represents stroke structure features, and γ 32 That is, the absolute value of the correlation coefficient of these two features. If CF is highly correlated with SF, γ 12 approaches 1, which weakens the higher-weighted of the two).
[0036] Select several history answer sheet samples (covering different levels of scribbling, staining, and question types), mark them with "correct / incorrect" labels and corresponding CF, SF, and LF values; Substituting the above formula, we can get the first copyright weight (w1, w2, w3) based on the first batch of training data. After processing every 500 new answer sheets, Rᵢ and γ are automatically recalculated using the new samples. kj , update the weight coefficients to ensure that the model adapts to new scenarios (such as the difference in printing quality of different batches of test papers during the exam season).
[0037] This method associates the actual recognition accuracy with the “feature reliability Rᵢ”, for example: When the test paper is severely stained, the R1 of the contour feature CF will decrease (the contour is blurred due to the stains). At this time, w1 will automatically decrease to avoid interference from invalid features; when the subjective questions are semantically complex, the R3 of LF will increase (semantic association is more important), and w3 will increase accordingly, which is in line with the logic of manual marking.
[0038] By γ kj Solve the problem of feature overlap (for example, when the stroke structure SF and the contour CF are highly correlated, automatically reduce the weight of one of them), and avoid the defect of "repeated feature calculation leading to inflated confidence" in traditional models.
[0039] Interpretability: Weight values no longer rely on manual pre-setting, but are based on the objective law of "feature performance → recognition result" in the training data. Each round of weight adjustment can be traced back to the feature contribution of specific samples (for example, the average R2 of SF in a batch of samples is 0.8, which corresponds to the basis for the increase in w2).
[0040] Deeply binding "feature performance and actual recognition effect" not only solves the problem of the basis for weight selection, but also breaks through the scenario limitations of the existing fixed weight model. It has originality and engineering practice value.
[0041] It can be understood that the present application discloses an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for automatically marking answer sheets.
[0042] This application discloses an automatic marking system for answer sheets, comprising: The standard answer feature library module is used to store the text features, logical associations, and location information of the standard answers to the test questions as a benchmark for recognition and reasoning; Answer sheet preprocessing module, used to convert paper answer sheets into high-quality digital images and accurately divide the answer area; The OCR recognition and confidence assessment module is used to perform multiple rounds of OCR recognition on the answer area, calculate the confidence level based on multi-dimensional features, and determine the area type (successful recognition / pending inference / not worth inferring); The inference correction module is used to perform feature and logic comparison on the "inference-capable area" and correct OCR recognition errors; The automatic review module is used to automatically determine the correctness of the "successfully identified areas" and assign scores.
[0043] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0044] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. The automatic marking method for answer sheets is characterized by: Including steps: Enter the standard answers to the corresponding questions on the answer sheet, and store their text features, logical associations, and the location of the standard answers on the answer sheet. Perform OCR on the divided answer areas and determine the confidence level: areas with a confidence level greater than or equal to the first threshold are marked as "successfully identified areas" and enter the comparison phase; otherwise, they are marked as "areas to be inferred." Perform OCR recognition on the answer area after the "area to be inferred" is divided and a second judgment is made based on the confidence level: those with a confidence level greater than or equal to the second threshold are marked as "areas that can be inferred", otherwise they are marked as "areas with no inference value" and pushed to the manual comparison stage; The second threshold is smaller than the first threshold; for the "reasonable area", correction is performed by comparing the handwritten text features with the standard answer text features, and comparing the handwritten logical association with the standard answer logical association, to obtain the "reasoning processing area" image; For the answer area after the image is divided into the "inference processing area", OCR recognition is performed and the confidence level is judged three times: the area with a confidence level greater than or equal to the first threshold is marked as a "successfully identified area" and enters the comparison stage; otherwise, it is marked as a "area with no reasoning value" and pushed to the manual comparison stage; the "successfully identified area" that enters the comparison stage is automatically reviewed.
2. The automatic marking method for answer sheets according to claim 1, characterized in that: Before performing OCR recognition on the divided answer area, the answer sheet is pre-processed, including: Scan the student's answer sheet and generate an image, and associate the student number and question number sequence information through the QR code; pre-process the image to retain valid answer traces.
3. The automatic marking method for answer sheets according to claim 1, characterized in that: Before performing OCR recognition on the divided answer area, the answer sheet is pre-processed, including: Based on the position information recorded in the standard answer feature library, the answer area of each question is divided on the preprocessed answer sheet image; if there is a deviation in the area, the boundary is corrected by identifying the question number text on the answer sheet.
4. The automatic marking method for answer sheets according to claim 1, characterized in that: Entering the standard answers to the corresponding questions on the answer sheet, storing their text features, logical associations and the position information of the standard answers on the answer sheet includes: entering the standard answers to the corresponding questions on the answer sheet, wherein for objective questions, the text content of each option, the stroke structure and morphological features of the characters, and the logical association of knowledge points between questions; for subjective questions, entering the core keywords, the semantic association of key sentences, the logical sequence of problem-solving steps, as well as the number of strokes of the characters and the position features of radicals. At the same time, scanning the blank answer sheet to determine the position information of the area where the standard answers to each question are located, including the corner coordinates of the area and the character spacing, and storing these text features, logical associations and position information in a unified manner to form a standard answer feature library.
5. The automatic marking method for answer sheets according to claim 1, characterized in that: When performing OCR recognition on the divided answer area, the multi-dimensional feature matching degree is calculated simultaneously as the basis for confidence assessment; first, the outline features of the characters are extracted and the normalized cross-correlation value between them and the standard character template is calculated; Then the stroke structure features are analyzed and the matching degree of the stroke number and intersection position features are counted; The contextual semantic relevance is then evaluated, and the cosine similarity between the recognized text and the expected content is calculated based on the question type and the expected semantics of the standard answer; the final confidence level is obtained by weighted fusion of these three indicators.
6. The automatic marking method for answer sheets according to claim 1, characterized in that: The answer area after the "area to be inferred" is re-divided and OCR recognition is performed again. The secondary confidence level is calculated by multi-dimensional feature fusion. First, the local stroke detail features of the handwritten characters are extracted, and their feature matching rate with the corresponding characters in the standard answer text feature library is calculated. Secondly, the position distribution characteristics of the characters in the area are analyzed and compared with the character layout of the standard answer area to obtain the layout matching degree. Then, based on the type of question to which the area belongs, the question type adaptation coefficient is introduced and weighted together with the feature matching rate and layout matching degree to calculate the secondary confidence level.
7. The automatic marking method for answer sheets according to claim 1, characterized in that: Pushing to the manual comparison stage also includes calculating the manual processing priority of the "area with no reasoning value", so that the low-confidence, high-score area enters the manual processing queue first.
8. The automatic marking method for answer sheets according to claim 1, characterized in that: The second threshold is set to be smaller than the first threshold, and in terms of characterizing the answer sheet recognition quality, the second threshold is set to be smaller than the first threshold.
9. The automatic marking method for answer sheets according to claim 1, characterized in that: When comparing the handwritten text features with the standard answer text features, calculate the feature matching degree M, M between the handwritten characters and the standard answer characters. = (number of matched stroke features + number of matched structural features) / (total number of stroke features + total number of structural features), where matched stroke features include stroke length, inclination angle, and consistency of start and end point coordinates; matched structural features include the overlap rate of the overall character outline and the relative position deviation rate of radicals; when comparing the handwritten logical association with the standard answer logical association, the objective question option logical fit L1 = (number of features that conform to the standard answer option distribution pattern + number of cross-question option association matches) / (total number of option features + total number of cross-question associations); the subjective question semantic logic match L2 = (mean keyword semantic similarity × keyword weight + step logic node matching × step weight), where keyword semantic similarity is calculated using the cosine distance of word vectors, and step logic node matching is weighted by the step sequence matching rate and the causal correlation degree; The comprehensive correction index of the corrected image is determined by the comprehensive correction index kuy=α×M+β×L1 or kuy=α×M+β×L2.
10. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the automatic marking method for answer sheets described in claim 1.
Citation Information
Patent Citations
Homework correction method and device, storage medium and electronic equipment
CN114581649A
Text recognition method and related device
CN117237970A
Image processing apparatus, image processing method, program for performing the method, and recording medium
JP2008122788A