A method and system for intelligent grading of fill-in-the-blank questions

CN122574871APending Publication Date: 2026-08-14读书郎教育科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]第一,填空位物理位置与题目逻辑顺序不一致导致的答案映射错误

Benefits of technology

[0052]本发明提供的一种填空题智能批改方法,首先对空白试卷进行OCR识别并定位填空位;然后通过空间邻近性、语义归属性及结构验证三重约束,建立题目与填空位的语义关联;接着构建包含物理坐标、语义权重等属性的拓扑图谱;当学生作答时,按物理顺序读取手写答案并映射至对应语义锚点,对低置信度结果触发跨题纠错重定向;最后与标准答案比对生成批改结果。本发明通过提取语义锚点、构建拓扑图谱、计算语义权重值、进行置信度分级处理与纠错重定向,有效解决了手写填空题中答案错位、跨题混淆等批改难题,实现了对填空题的智能识别、动态映射与无序批改,确保答案能够准确匹配至对应的题目,实现鲁棒、可解释、符合教学规律的智能批改。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122574871A_ABST
    Figure CN122574871A_ABST
Patent Text Reader

Abstract

A method and system for intelligent grading of fill-in-the-blank questions, relating to the field of computer technology, is disclosed. The method first uses OCR to identify and locate the fill-in-the-blank positions on a blank test paper. Then, through triple constraints of spatial proximity, semantic attribution, and structural verification, a semantic association between the questions and the fill-in-the-blank positions is established. Next, a topological graph containing attributes such as physical coordinates and semantic weights is constructed. When a student answers, the handwritten answers are read in physical order and mapped to corresponding semantic anchor points. Low-confidence results trigger cross-question error correction and redirection. Finally, the grading results are compared with the standard answers to generate the grading results. This invention effectively solves the grading problems of answer misalignment and cross-question confusion in handwritten fill-in-the-blank questions by extracting semantic anchor points, constructing a topological graph, calculating semantic weight values, and performing confidence level processing and error correction and redirection. It achieves intelligent identification, dynamic mapping, and disordered grading of fill-in-the-blank questions, ensuring that answers can be accurately matched to the corresponding questions, thus improving the robustness and accuracy of grading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an intelligent grading method and system for fill-in-the-blank questions. Background Technology

[0002] In current smart education projects, fill-in-the-blank questions are a common question type widely used in various exams and exercises. However, because fill-in-the-blank question images often contain multiple questions, and each question has multiple answer areas (i.e., "blank spaces"), traditional grading systems typically rely on a fixed order from left to right and top to bottom for answer matching, which cannot adapt to the complexity of actual test question layouts. Especially when the fill-in-the-blank spaces are irregularly distributed or students answer in a disordered order, problems such as misplaced answers and incorrect question number correspondences can easily occur.

[0003] Existing technologies are mostly based on coordinate localization or simple text recognition, lacking a deep understanding of semantic structure and question logic, making accurate grading difficult in unordered answer environments. Specifically, existing technologies have the following shortcomings:

[0004] First, incorrect answer mapping can result from the physical location of the blanks not matching the logical order of the questions. When the exam paper uses a non-linear layout (such as multi-column layout or mixed text and images), the matching mechanism based on a fixed order will inevitably fail.

[0005] Second, when multiple fill-in-the-blank positions belong to the same question but the order in which they are answered is arbitrary, they cannot be correctly grouped. Traditional systems treat each fill-in-the-blank position as an independent unit, ignoring the semantic community relationship between multiple fill-in-the-blank positions under the same question.

[0006] Third, the grading order does not correspond to the actual order of the questions, resulting in mismatched results. Students may write their answers in a different order than the question numbers due to writing habits or page layout limitations, and the existing system cannot effectively identify and correct such mismatches.

[0007] Therefore, there is an urgent need for an intelligent grading method and system that can understand the semantics of the questions, establish the logical connection between the fill-in-the-blank positions and the question stem, and support order-independent grading, so as to improve the robustness and accuracy of grading. Summary of the Invention

[0008] In response to the aforementioned technical problems in related technologies, this invention proposes an intelligent grading method and system for fill-in-the-blank questions.

[0009] In a first aspect, the present invention provides an intelligent grading method for fill-in-the-blank questions, comprising the following steps:

[0010] S1. Perform OCR recognition on the original test paper image containing multiple fill-in-the-blank questions that has not been answered, and obtain all text content and the bounding box coordinates of each fill-in-the-blank position; S2. Extract the question identifier phrase of each fill-in-the-blank question from all the text content as a semantic anchor point, and establish a semantic spatial association between the semantic anchor point and the corresponding fill-in-the-blank position based on spatial proximity constraints, semantic attribution constraints and structural verification constraints.

[0011] S3. Construct a topological graph based on the fill-in-the-blank positions and their spatial proximity and semantic attribution relationships, where nodes represent fill-in-the-blank positions and edges represent spatial proximity and semantic attribution relationships; each fill-in-the-blank position node stores its physical coordinates, the question number it belongs to, the candidate answer region, and the semantic weight value; the semantic weight value is generated by weighted fusion of spatial credibility, semantic attribution confidence, and structural consistency score.

[0012] S4. When the student's answer image is received, OCR recognition of handwritten content is performed based on the candidate answer area, and each answer is read according to the actual physical order of the fill-in-the-blank positions to generate an ordered answer sequence.

[0013] S5. Using the topological graph, each answer in the ordered answer sequence is mapped to the corresponding semantic anchor point to form a set of mapped answers, and confidence level processing is performed according to the semantic weight value: for fill-in-the-blank positions with semantic weight values ​​lower than a preset threshold, the error correction module is triggered to perform cross-question semantic similarity reassessment and attribution redirection;

[0014] S6. Compare the set of mapped answers corresponding to each semantic anchor with the pre-stored set of standard answers to generate the grading results.

[0015] Specifically, establishing semantic space associations in step S2 includes:

[0016] For each blank, calculate its central Euclidean distance to all semantic anchors, and take the one with the smallest distance as the preferred anchor. Verify whether the preferred anchor appears above or to the left of the blank without any stronger anchor in between. If the verification is successful, the semantic attribution is confirmed. If the semantic anchor ends with a colon, dash, or period and the blank is immediately after it, the semantic attribution weight is increased. If the semantic anchor contains a question number, all blanks belonging to that semantic anchor are marked as belonging to the same question group.

[0017] Specifically, the semantic weight value W in step S3 is calculated as follows: W = α×S + β×A + γ×C; where S is spatial credibility, calculated based on the geometric distance decay function between the fill-in-the-blank position and the anchor point; A is semantic attribution confidence, determined by the grammatical / structural adhesion strength between the anchor point and the fill-in-the-blank position; C is structural consistency score, verifying whether the fill-in-the-blank position conforms to the preset structural pattern of its question; α is spatial credibility weight, β is semantic attribution confidence weight, γ is structural consistency score weight, and α+β+γ=1.

[0018] Specifically, the candidate answer region mentioned in step S3 is generated in the following way:

[0019] An initial rectangular region is formed by expanding a fixed number of pixels outward from the boundary box of the empty space as the center.

[0020] Detect the text line where the blank is located, limit the initial rectangular area to the height of the text line and perform left and right boundary alignment correction;

[0021] The height and width of the candidate answer area are dynamically adjusted using statistical values ​​of the font size, line height, and character width of the surrounding text.

[0022] The candidate answer region is binarized and its contour is detected. If an ink block matching the letter features is detected, the center of the candidate answer region is finely adjusted to the centroid of the ink block.

[0023] Specifically, the confidence level grading process in step S5 includes:

[0024] When the semantic weight value W of the fill-in position is greater than or equal to the first preset threshold, it is determined to be a high confidence mapping, and proceed directly to step S6;

[0025] When 0.5≤W<first preset threshold, it is determined to be a mapping to be verified. First, semantic consistency pre-verification is performed. If the verification passes, proceed to step S6; otherwise, trigger the error correction module.

[0026] When W < 0.5, it is determined to be a low-confidence mapping, and the error correction module is directly triggered to perform a home reassessment.

[0027] Specifically, the triggering conditions for the error correction module include:

[0028] The average semantic consistency score of all answers under a certain semantic anchor point is lower than the second preset threshold;

[0029] Answers exceeding a predetermined proportion under a certain semantic anchor point collectively mismatch the key dimensions;

[0030] The semantic weight value of a certain fill-in-the-blank position is lower than the third preset threshold;

[0031] The number of mapped answers does not match the number of blanks required by the question.

[0032] Specifically, the error correction module includes:

[0033] The set of answers suspected of being misattributed is used as the query set, and the overall similarity between the answers and the semantic templates defined by each semantic anchor is calculated sequentially.

[0034] If the average similarity between the query set and another semantic anchor is significantly higher than the average similarity with the original semantic anchor, then the query set is unbound from the original semantic anchor and reattached to the other semantic anchor.

[0035] After the redirection is completed, semantic consistency is checked again. Only when the average matching score under the new assignment reaches the fourth preset threshold and no new abnormally low scores appear, the adjustment is confirmed and the corresponding question number and semantic weight value of the corresponding node in the topology graph are updated synchronously.

[0036] Specifically, the comparison in step S6 includes:

[0037] Both the student-mapped answer set and the standard answer set are considered as unordered sets.

[0038] Each element in the mapped answer set is semantically equivalent to an element in the standard answer set. The semantic equivalence determination includes exact matching, semantic equivalence matching, and partial matching.

[0039] The system counts the number of successfully matched elements and calculates the score, while for unmatched elements, it identifies specific error items and generates error type labels.

[0040] Specifically, the method also includes boundary case handling, specifically including:

[0041] For blanks where no valid ink was detected, mark them as "unanswered" and assign them a blank value;

[0042] When the number of mapped answers to a question exceeds the number of standard answers, the answers with higher semantic weight values ​​are retained first, and the extra answers are marked as redundant.

[0043] When the number of mapped answers to a question is less than the number of standard answers, the missing positions are marked as unanswered;

[0044] For questions that span multiple pages, the uniqueness of the question number is used to group the fill-in-the-blank questions across pages to the same semantic anchor point.

[0045] Secondly, the present invention provides an intelligent grading system for fill-in-the-blank questions, based on the intelligent grading method for fill-in-the-blank questions described in the first aspect above, comprising the following modules:

[0046] The fill-in-the-blank question information acquisition module is used to perform OCR recognition on the original test paper image containing multiple fill-in-the-blank questions that have not been answered, and to obtain all text content and the bounding box coordinates of each fill-in-the-blank position; the semantic association module is used to extract the question identifier phrase of each fill-in-the-blank question from the all text content as a semantic anchor point, and to establish a semantic spatial association between the semantic anchor point and the corresponding fill-in-the-blank position based on spatial proximity constraints, semantic attribution constraints and structural verification constraints.

[0047] The topology graph construction module is used to construct a topology graph based on the fill-in-the-blank positions and their spatial proximity and semantic attribution relationships. Nodes represent fill-in-the-blank positions, and edges represent spatial proximity and semantic attribution relationships. Each fill-in-the-blank position node stores its physical coordinates, the question number it belongs to, the candidate answer region, and a semantic weight value. The semantic weight value is generated by weighted fusion of spatial credibility, semantic attribution confidence, and structural consistency score.

[0048] The answer reading module is used to perform OCR recognition of handwritten content based on the candidate answer area when the student's answer image is received, and to read each answer according to the actual physical order of the blank positions to generate an ordered answer sequence.

[0049] The answer mapping module is used to map each answer in the ordered answer sequence to the corresponding semantic anchor point using the topological graph to form a set of mapped answers, and to perform confidence level processing according to the semantic weight value: for fill-in-the-blank positions with semantic weight values ​​lower than a preset threshold, the error correction module is triggered to perform cross-question semantic similarity reassessment and attribution redirection;

[0050] The answer comparison and grading module is used to compare the set of mapped answers corresponding to each semantic anchor with the pre-stored set of standard answers to generate grading results.

[0051] Thirdly, the present invention also provides an electronic device including a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps of the method described in the first aspect.

[0052] This invention provides an intelligent grading method for fill-in-the-blank questions. First, it uses OCR to identify and locate the fill-in-the-blank positions on a blank test paper. Then, it establishes a semantic association between the questions and the fill-in-the-blank positions through triple constraints of spatial proximity, semantic attribution, and structural verification. Next, it constructs a topological graph containing attributes such as physical coordinates and semantic weights. When students answer, the handwritten answers are read in physical order and mapped to corresponding semantic anchor points. Low-confidence results trigger cross-question error correction and redirection. Finally, the grading results are compared with the standard answers to generate the grading results. This invention effectively solves the grading problems of answer misalignment and cross-question confusion in handwritten fill-in-the-blank questions by extracting semantic anchor points, constructing a topological graph, calculating semantic weight values, and performing confidence level processing and error correction and redirection. It achieves intelligent identification, dynamic mapping, and disordered grading of fill-in-the-blank questions, ensuring that answers can be accurately matched to the corresponding questions, and realizing robust, interpretable, and teaching-compliant intelligent grading. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a schematic diagram of an intelligent grading method for fill-in-the-blank questions provided by an embodiment of the present invention;

[0055] Figure 2 A schematic diagram of an intelligent grading system for fill-in-the-blank questions provided in an embodiment of the present invention;

[0056] Figure 3 This is a schematic diagram of an intelligent grading device for fill-in-the-blank questions provided in an embodiment of the present invention. Detailed Implementation

[0057] The present invention will be explained in detail through the following embodiments. The purpose of this invention is to protect all technical improvements within its scope. In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0058] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0059] Example 1

[0060] refer to Figure 1 This embodiment provides an intelligent grading method for fill-in-the-blank questions, including the following steps:

[0061] S1. Perform OCR recognition on the image of the unanswered original test paper containing multiple fill-in-the-blank questions to obtain all text content and the bounding box coordinates of each fill-in-the-blank position;

[0062] This example demonstrates OCR recognition of an image of an unanswered original test paper containing multiple fill-in-the-blank questions. It employs an OCR engine with layout analysis capabilities (such as PaddleOCR or LayoutParser), and the recognition process includes:

[0063] (1) Text recognition: Recognize all text content in the test paper image, including question stem, question number, introductory text, etc., and output the bounding box coordinates Bbox_text = [x_min, y_min, x_max, y_max] and text content of each text.

[0064] (2) Fill-in-the-blank detection: Identify blank markings in the test paper, including underlines (such as “________”), parentheses (such as “()”), boxes (such as “□”), etc., and output the bounding box coordinates of each blank position Bbox_blank = [x_min, y_min, x_max, y_max].

[0065] The blank spaces are naturally "empty," indicating a state of waiting for answers, and are the starting point for the grading system.

[0066] S2. Extract the question identifier phrase of each fill-in-the-blank question from all the text content as a semantic anchor point, and establish a semantic spatial association between the semantic anchor point and the corresponding fill-in-the-blank position based on spatial proximity constraints, semantic attribution constraints and structural verification constraints.

[0067] S21. Extract semantic anchors: Identify the question identifier phrases for each fill-in-the-blank question from the text content as semantic anchors, and use the bounding box coordinates of the question identifier phrases as the bounding box coordinates of the semantic anchors; the question identifier phrases include question number, question stem keywords, structured prompt words, and special symbol patterns;

[0068] This invention employs a multi-dimensional heuristic decision-making strategy for fill-in-the-blank question recognition, including structural signals, semantic signals, spatial signals, elimination methods, and the construction of a fill-in-the-blank question recognition model.

[0069] Structural signals: There are obvious blank markers, underscores (___ / ______), brackets (()), boxes (□), and wavy lines (~~~); there are no line breaks or tight layout between the blank and the preceding text (e.g., windy: _______);

[0070] Semantic signals: The preceding text contains typical fill-in-the-blank instruction verbs, such as fill in, write out, fill in, find from the text, and complete; it contains question number + colon or comma structure (1., ①, Task 1:); it contains directional prompts such as "homophone", "same letter", and "according to the short passage";

[0071] Spatial signals: Multiple fill-in-the-blank spaces are densely distributed in a local area (such as three underlines in a row), and there is a uniform guiding text above or to the left; the font, size, or color of the fill-in-the-blank spaces is consistent with the surrounding text (excluding interference from headers and footers);

[0072] Elimination method: Eliminate typical patterns such as multiple choice questions (including options A / B / C / D), true / false questions (including T / F), and short answer questions (including "Answer:" or large blanks);

[0073] Construct a fill-in-the-blank question recognition model: Train a model to recognize fill-in-the-blank question types and answer areas by using a large amount of fill-in-the-blank question image data / exam paper images / homework images, and locate the answer areas.

[0074] Identify question identifier phrases with question identification function from the text content, including question number (e.g., 1., Task 1:), question stem keywords (e.g., windy:, shy:), structured prompt words (e.g., please fill in, find from the text), and special symbol patterns (colon:, dash —, underscore immediately after the text), as semantic anchors, and use the physical coordinate information of the question identifier phrases as the physical coordinate information of the semantic anchors;

[0075] S22. Locate the spatial position of the fill-in-the-blank position: Using the bounding box coordinates of each fill-in-the-blank position, combined with page layout analysis (such as reading order, relative position within a line, indentation, and alignment), determine the text block to which the fill-in-the-blank position belongs;

[0076] S23. Establish semantic-spatial association: Based on the coordinates of the fill-in position and its bounding box and the coordinates of the semantic anchor point and its bounding box, the spatial proximity and semantic attribution between the two are analyzed using dual constraint matching technology. Then, the association between the semantic anchor point and the fill-in position is established through structural verification, specifically including:

[0077] Calculate the Euclidean distance between the bounding box coordinates of the semantic anchor point and the bounding box coordinates of the fill position;

[0078] Based on the reading order constraint, only fill-in-the-blank positions located after a semantic anchor and not separated by the next semantic anchor are included in the association candidate; based on the punctuation adhesion judgment, if the semantic anchor ends with a colon, dash, or period and the fill-in-the-blank position is immediately after it, the association weight is increased; combined with the question number uniqueness constraint, all fill-in-the-blank positions under the same question number are grouped to the corresponding semantic anchor, thereby establishing semantic space association.

[0079] The establishment of the semantic space association adopts a dual constraint matching mechanism: spatial proximity constraint, that is, the Euclidean distance between the bounding box of the fill-in position and the bounding box of the semantic anchor point is minimized, or the two are located in the same row / column block; semantic attribution constraint, that is, the fill-in position is located after the semantic anchor point and is not separated by the next semantic anchor point; structural verification constraint, that is, verifying the consistency between the number of fill-in positions and the requirements of the question.

[0080] The spatial proximity refers to the minimum Euclidean distance between the physical coordinates of the fill-in position and the physical coordinates of a semantic anchor point, which determines whether the fill-in position and the semantic anchor point belong to the same row, the next row, or the same column block.

[0081] The semantic attribution indicates that the fill-in-the-blank position is located after the anchor point and is not "truncated" by the next anchor point (i.e., in the reading order, anchor point A → the fill-in-the-blank position → (may be multiple) → the next anchor point B);

[0082] The structural verification is used to enhance robustness. For example, if the anchor point contains "1.", the number of blanks that follow it should be consistent with the requirements of the question (e.g., "Write 3 words" → associated with 3 blanks).

[0083] The relevance between the question stem and the fill-in-the-blank question is the essence of semantic anchor construction, and the relevance is quantified and supported by the following factors:

[0084] Location proximity: The center distance between the text rectangle BBOX and the fill rectangle BBOX is less than a threshold (e.g., 50px); the smaller the distance, the higher the association weight (stored in the topology node);

[0085] Reading order consistency: Anchor points should appear before the fill-in-the-blank positions (according to natural reading flow: left → right, top → bottom); if the anchor point is below, the relevance drops to 0 (logical error).

[0086] Punctuation coherence: Anchor points end with :, —, or ., and the blank immediately follows (no line breaks / no other text);

[0087] Question number uniqueness: All blanks under the same question number (such as 1.) belong to the same question stem.

[0088] S3. Construct a topological map based on the fill-in positions and their spatial proximity and semantic attribution relationships;

[0089] A topological graph is constructed based on the fill-in positions and their spatial proximity and semantic attribution relationships, where nodes represent fill-in positions and edges represent spatial proximity and semantic attribution relationships;

[0090] The spatial proximity relationship is determined in the following way:

[0091] Based on the physical coordinates of each blank space obtained by OCR recognition, the Euclidean distance between the center points of any two blank space nodes is calculated; when the Euclidean distance is less than or equal to a preset spatial threshold, an undirected edge is added to the topology graph and a spatial proximity weight is assigned; wherein, the spatial proximity weight is negatively correlated with the Euclidean distance.

[0092] Coordinate acquisition: The OCR engine identifies the rectangular bounding box (Bbox = [x_min, y_min, x_max, y_max] for each blank and uses it as the coordinates;

[0093] Distance metric: For any two fill-in node A and B, calculate the Euclidean distance between their center points d(A, B)=√[(cx_A− cx_B)² + (cy_A − cy_B)²], where cx = (x_min + x_max) / 2, cy = (y_min + y_max) / 2;

[0094] Proximity determination: Set a preset spatial threshold τspatial (e.g., 80px). If d(A, B)≤τspatial, add an undirected edge A—B to the graph and assign a weight w = 1 / (d + ε). The closer the distance, the higher the weight. ε is a small constant to prevent division by zero overflow.

[0095] The spatial proximity relationship further distinguishes directional constraints:

[0096] When the vertical coordinate difference between two fill-in-the-blank nodes is less than the first preset threshold T1 and the horizontal coordinate difference is less than the second preset threshold T2, they are determined to be horizontally adjacent, indicating multiple fill-in-the-blank nodes under the same question.

[0097] When the difference in the horizontal coordinates of two fill-in-the-blank nodes is less than the third preset threshold T3 and the difference in the vertical coordinates is less than the fourth preset threshold T4, they are determined to be vertically adjacent, indicating the alignment of different questions above and below.

[0098] Wherein, the sum of the square of the first preset threshold T1 and the square of the second preset threshold T2 is not greater than the square of the preset spatial threshold, and the sum of the square of the third preset threshold and the square of the fourth preset threshold is not greater than the square of the preset spatial threshold.

[0099] In this embodiment, for a standard A4-sized test paper image with a resolution of 300 DPI, the value of τ_spatial is 80 pixels. The first preset threshold is set to 20 pixels (to determine the same text line), the second preset threshold is set to 75 pixels, the third preset threshold is set to 30 pixels (to determine the same column), and the fourth preset threshold is set to 70 pixels. The above four thresholds satisfy: T1² + T2² ≤ τ_spatial² and T3² + T4² ≤ τ_spatial², ensuring that directional proximity determination is a subset of spatial proximity determination, avoiding logical contradictions.

[0100] The semantic attribution relationship is determined in the following way:

[0101] For each blank, calculate its distance to the center of all semantic anchors, and take the one with the smallest distance as the preferred anchor.

[0102] Verify whether the preferred attribution anchor point appears above or to the left of the blank and without any stronger anchor point in the middle. If the verification passes, the semantic attribution is confirmed.

[0103] If the semantic anchor ends with a punctuation mark and the blank is immediately following it, the semantic attribution weight is increased.

[0104] If a semantic anchor contains a question number, then all blanks belonging to that semantic anchor will be marked as the same question group identifier.

[0105] The logic for generating semantic attribution relationships specifically includes:

[0106] Location-based: Prioritize the nearest anchor point. For the blank B, calculate the center distance d(B, Ai) from it to all semantic anchor points (A1, A2, …,Ak), and take the one with the smallest distance Ak as the preferred anchor point.

[0107] Sequence constraint: Reading flow consistency, anchor point Ai must appear above or to the left of fill-in position B (in natural reading order), and there must be no other stronger anchor points in between. If the verification passes, the semantic attribution is confirmed; otherwise, the attribution is rejected.

[0108] Punctuation binding: Syntactic binding strength. If the anchor point ends with a combination of colon, hyphen and dot, and the blank is immediately following it (horizontal distance <10px, no line break), the semantic belonging weight is greatly increased.

[0109] Question number uniqueness: Global grouping. If the anchor point contains question number n, then all blanks belonging to it are marked as groupid=n. If a new blank is found in the same group later, even if it is slightly far away, it will be accepted as belonging to the same group because of the consistency of question number.

[0110] Each fill-in-the-blank node simultaneously stores its physical coordinates (boundary box coordinates), the question number it belongs to, the candidate answer area, and its semantic weight value;

[0111] The semantic weight value is generated by weighted fusion of spatial credibility, semantic attribution confidence and structural consistency score;

[0112] The candidate answer region is obtained by expanding outward by a fixed number of pixels based on the physical coordinates of the blank position, and by dynamically adjusting it in combination with context line alignment correction, font feature guidance, and multimodal visual detection.

[0113] The semantic weight value is a normalized scalar (0–1) generated by fusing three factors: spatial credibility, semantic attribution confidence, and structural consistency score. Essentially, it is a comprehensive credibility score indicating that the blank belongs to a certain semantic anchor (e.g., windy:), directly serving subsequent "answer mapping" and "error correction." It consists of three elements:

[0114] 1) Calculation method of spatial credibility S: based on the geometric distance decay function between the fill position and the anchor point: S = exp(−d² / (2σ²)), where d is the Euclidean distance between the centers of the two boxes, and σ is the layout scale parameter (such as 5% of the page height) → The closer the distance, the closer S is to 1; if it exceeds 2σ, then S ≈ 0.

[0115] 2) Semantic attribution confidence A calculation method: determined by the strength of syntactic / structural adhesion between the anchor point and the fill-in-the-blank: if the anchor point ends with: —— and the fill-in-the-blank is immediately after it (horizontal offset < 15px, no line break) → A = 0.95; if it is only based on the question number (such as 1.) but there is a line break or blank line in between → A = 0.7; if the anchor point is a pure keyword (such as windy without punctuation) → A = 0.6 (requires stronger space support).

[0116] 3) Structural Consistency Score C Calculation Method: Verify whether the blank conforms to the preset structural pattern of its question: If the question requires "fill in 3 words", and the blank is the second blank under the same anchor point → C = 1.0 (position compliance); if it is the first blank, but is immediately adjacent to another blank of the same size on the right (horizontal adjacent edge exists) → C = 0.95 (strengthening intra-group consistency); if it exists in isolation and there are no other blanks above or below → C = 0.8 (may be a single blank question, but be wary of false positives);

[0117] Ultimately, the semantic weight value W = α × S + β × A + γ × C;

[0118] Where α is the spatial credibility weight, β is the semantic attribution confidence weight, and γ is the structural consistency score weight; α+β+γ=1;

[0119] For example: windy: The first empty space below the anchor point: d=8px → S=0.98, colons stick together → A=0.95, the second adjacent space horizontally → C=0.95 → W = 0.4×0.98 + 0.4×0.95 + 0.2×0.95 = 0.962;

[0120] The candidate answer area is not a text box directly recognized by OCR, but rather a pixel region (ROI) dynamically predicted by the system based on the physical coordinates of the blank, the page context, and font features. This ROI is the most likely to contain the student's handwritten / printed answer. This is a crucial preliminary step in solving real-world problems such as inaccurate OCR recognition, blurry handwriting, overlapping characters, and slant. The four-step generation method is as follows:

[0121] 1. Basic ROI: Expansion of the fill area itself. Centered on the fill area BBOX, expand outward by a fixed number of pixels (e.g., +15px top and bottom, +10px left and right) to form an initial rectangular area → covering possible stroke overflow, underline thickness variations, and slight writing offsets;

[0122] 2. Contextual Constraints: Row / Column Alignment Correction. Detect the text line containing the blank (the line-level BBOX returned by OCR): If the blank is within a text line (e.g., the underline in windy: _______), then limit the ROI to the height of that line, aligning the left and right boundaries with the line width; if the blank is on a separate line (e.g., () on a separate line), then take the nearest line of the question stem above it as a reference, maintaining left alignment.

[0123] 3. Font Feature Guidance: Predicting Answer Size. Utilizing the statistical values ​​of font size, line height, and character width of surrounding text already recognized by OCR, the ROI height and character spacing are dynamically adjusted: If the question stem font is 12pt, the ROI height is set to 1.8 × line height (to accommodate possible upward / downward extension of handwriting); if OCR detects dense lowercase letters (such as a, e, i) near the area, the ROI width is estimated based on the average character width × expected word length (such as 3–5 characters).

[0124] 4. Multimodal fusion: Introducing a lightweight visual model. The ROI region is binarized and contour detected to filter noise; if a continuous ink blob is detected and its area / width-to-length ratio matches the letter characteristics (e.g., w width > height, i height > width), the ROI center is finely adjusted to the centroid of the blob → solving interference such as student handwriting misalignment and incomplete underline erasure.

[0125] Final output: A refined rectangular region candidate_roi = [x, y, w, h], which is the region of candidate answers.

[0126] The “candidate answer area” is the eye, and the “semantic weight value” is the brain – both are indispensable.

[0127] S4. When the student's answer image is received, OCR recognition of handwritten content is performed based on the candidate answer area, and each answer is read according to the actual physical order of the fill-in-the-blank positions to generate an ordered answer sequence.

[0128] S41. Image Acquisition of Answers: Acquire images of the student's completed exam paper, register and align them with the original unanswered exam paper images, and eliminate differences in shooting angle, lighting, and deformation.

[0129] S42. Candidate answer region localization: Based on the candidate answer region (candidate_roi) generated in S3, locate the handwritten answer region corresponding to each blank in the answer image;

[0130] S43. Handwritten content OCR recognition: Perform dedicated handwritten OCR recognition on the handwritten content within the candidate answer area, and output the answer text and confidence score; if the recognition confidence score is lower than a preset threshold (e.g., 0.6), then combine contextual semantic prediction for auxiliary recognition;

[0131] S44. Blank Detection and Marking: If no valid ink mark is detected in the candidate answer area (determined by connected component analysis), the blank space is marked as "unanswered" and assigned a blank value;

[0132] S45. Response Sequence Generation: Generate an ordered response sequence A={a1, a2, ..., a...} based on the physical order of the blanks in the original unanswered test paper (i.e., the order of the blanks detected by OCR). n}, where aᵢ represents the answer or blank value for the i-th blank.

[0133] S5. Using the topological graph, each answer in the ordered answer sequence is mapped to a corresponding semantic anchor point to form a set of mapped answers, and confidence level processing is performed according to the semantic weight value;

[0134] S51. Initial Mapping: Based on the question number of each blank node in the topological graph, map each element aᵢ in the answer sequence A to the corresponding semantic anchor (question) to form an initial question group-answer mapping table.

[0135] S52, Confidence level grading:

[0136] For blanks with semantic weight values ​​W≥θ_high, they are determined to be high-confidence mappings, and their mapping relationships are directly entered into S6 for answer comparison.

[0137] For the blanks where 0.5≤W<θ_high, they are determined to be mappings to be verified and proceed to S53 for semantic consistency pre-verification;

[0138] For filler positions where W < 0.5, they are determined to be low-confidence mappings and directly enter the S54 error correction module;

[0139] Where θ_high is the first preset threshold, which is 0.75;

[0140] S53. Semantic Consistency Pre-verification: For mappings with medium confidence, call the semantic consistency analysis algorithm for quick verification; if the average matching score of all answers under this question is ≥0.6, then confirm the mapping and proceed to S6; otherwise, proceed to S54.

[0141] S54. Error correction module activation and attribution redirection:

[0142] (1) Triggering conditions: The error correction module is activated when any of the following conditions are met:

[0143] a) The average semantic consistency score of all answers to a certain question is less than θ_trigger;

[0144] In this embodiment, θ_trigger is a second preset threshold, set to 0.4. When the average matching score of all answers to a question after semantic consistency analysis is less than 0.4, the error correction module is activated.

[0145] For example, the average matching score of the three answers "sunny", "city" and "happy" under the question "shy" is only 0.32, which is lower than 0.4, triggering error correction.

[0146] b) More than a predetermined proportion of the answers to a certain question are collectively mismatched in key dimensions (target phonemes, core letters);

[0147] In this embodiment, the preset ratio is 50%. When more than 50% of the answers to a question are collectively mismatched in key dimensions (such as target phonemes and core letters), the error correction module is activated.

[0148] For example, the question "shy" requires the answer to contain the letter "y" and be pronounced / aɪ / . However, the three answers "sunny" (containing y but with the main vowel / ʌ / ), "city" (containing y but with the main vowel / ɪ / ), and "happy" (containing y but with the main vowel / æ / ) do not meet the / aɪ / phoneme requirement, resulting in a 100% mismatch and triggering error correction.

[0149] c) The semantic weight value W of a certain fill-in-the-blank position is less than θ_sem;

[0150] In this embodiment, θ_sem is the third preset threshold, which is set to 0.5. When the semantic weight value W of a certain filler position is less than 0.5, the error correction module is directly triggered.

[0151] (4) The number of mapped answers does not match the number of blanks required by the question:

[0152] When the number of mapped answers for a question is inconsistent with the number of blanks required by the question, the error correction module is activated.

[0153] For example, if the "windy" question requires three words to be filled in, but the mapped answer set only contains two answers, or it maps four answers, error correction will be triggered.

[0154] d) The number of answers does not match the number of blanks required by the question;

[0155] (2) Cross-question semantic similarity re-evaluation: The set of answers suspected of being misattributed is used as the query set, and the comprehensive similarity between it and the semantic template of each question stem anchor point is calculated in turn;

[0156] (3) Attribution Redirection Decision: If the average similarity between the answer group and another question stem is significantly higher than that of the original question stem (e.g., exceeding the mean by two standard deviations), then attribution redirection is performed, the question number of the corresponding fill-in-the-blank position in the topological graph is updated, and the semantic weight value is recalculated.

[0157] (4) Self-verification: After redirection, semantic consistency is checked again. Only when the average matching score under the new affiliation is ≥ θ_confirm is the final confirmation made; where θ_confirm is the fourth preset threshold, which is 0.7.

[0158] S55. Generation of Mapped Answer Set: For each question, collect all the answers to which it belongs to form a mapped answer set for that question.

[0159] When multiple fill-in-the-blank questions belong to the same question, the system uses a semantic consistency analysis algorithm to determine whether the answer conforms to the logical structure of the question and supports grading regardless of the order of the answers.

[0160] Semantic consistency analysis algorithm is a structured verification mechanism that takes the question stem as its source, has interpretable rules, is computationally lightweight, and has a clear educational purpose.

[0161] The algorithm's starting point: When a fill-in-the-blank question contains multiple blanks (e.g., "windy: ___ ___ ___"), students' answering order may be disordered (e.g., writing "fly" in the first blank when it should be in the second blank). Traditional hard matching based on positional order will inevitably fail. Therefore, the system does not bind answers to blanks one by one, but treats the entire question as a semantic community. Using the question stem itself as the "yardstick," it independently performs multi-dimensional compliance checks on each answer belonging to that question. This "de-sequentialization" verification paradigm is the fundamental guarantee for "supporting answer order-independent grading."

[0162] The implementation is divided into four stages:

[0163] The first stage is anchor-driven extraction of the question's logical structure. The system locates semantic anchors (such as "1. windy:" or "Task 1:") from the text recognized by OCR and automatically analyzes their implied teaching intentions. For example, when the anchor is "shy:", the system immediately extracts three core constraints: first, the target letter—in this case, "y", because all standard answers (by, fly, pretty) end in y; second, the target phoneme—through the built-in English image-to-phonetic conversion model (G2P), the main vowel of "shy" is found to be / aɪ / , thus establishing the pronunciation standard; and third, the part-of-speech tendency—based on the dictionary and context, "shy", "happy", and "pretty" are all adjectives, so the default requirement for the answer is an adjective. These constraints together constitute the "logical structure template" of the question, which is not a manually preset static rule base, but a semantic fingerprint dynamically generated from the question stem and embodied in the question itself.

[0164] The second stage is independent verification of each answer. For each student's answer belonging to the question (regardless of which blank it appears in), the system uses the same template for item-by-item comparison. Taking the answer "by" as an example: First, it checks if it contains the letter "y", which is satisfied; then, it is converted to the phonetic symbol / baɪ / by the G2P model, the main vowel is extracted and its phoneme similarity is calculated with / aɪ / , and the results are highly consistent; then, a lightweight part-of-speech tagger determines its part of speech. Although "by" is often used as a preposition, in this teaching context, the system combines its high-frequency co-occurrence in the same word group as "shy" (such as "shy, by, fly, try" are often grouped into the same phonetic training group in textbooks), and assigns it a tolerance weight. Each verification outputs a continuous score in the range [0,1], rather than a simple binary judgment of right / wrong. This design is crucial—it enables the algorithm to distinguish between “completely wrong” (such as filling in “cat”), “partially correct” (such as the y in “pretty” being pronounced / ɪ / instead of / aɪ / , but the sound is similar), and “completely correct” (such as “fly”), thus achieving fine-grained scoring.

[0165] The third stage is unordered aggregation and overall judgment. Since the score of each answer depends solely on its match to the question template, and is completely unrelated to its position on the answer sheet or the content of the answers preceding or following it, the aggregation process naturally eliminates order dependence. The system only needs to sum the scores of all answers belonging to that question and divide by the preset number of answers for that question (e.g., 3) to obtain the final score. If a student randomly fills in three blanks with the three correct answers "by," "fly," and "pretty," regardless of the order, the verification scores of all three will consistently fall within the high score range, resulting in a consistently high total score. Conversely, if "by" is mistakenly filled in as "bad," the phoneme and part-of-speech scores will plummet, and the total score will decrease accordingly. This "individual verification → global summation" paradigm mathematically eliminates order sensitivity, representing a rigid implementation of "answer order independence" at the algorithmic level.

[0166] The fourth stage is consistency feedback and dynamic error correction. When the verification scores of all answers are generally low, the algorithm does not directly assign a score of zero, but instead initiates a consistency diagnosis: it calculates the matching degree between these low-scoring answers and other question stem anchors (such as "windy"). If it finds that their phonemic similarity to the "windy" template is actually higher (e.g., "sunny", "city", "happy" do not satisfy the / aɪ / of "shy", but are closer to the / w / beginning and / i / sound of "windy"), the system determines that there is a misclassification, triggers the error correction module, and remaps these answers to a more matching question stem.

[0167] The error correction module is used to identify answer misalignment caused by disordered grading order and automatically adjust the answer attribution through a contextual semantic similarity model. This error correction module is an embedded, trigger-based, feedback-driven closed-loop verification mechanism in the entire intelligent grading process, used to solve the problem of "answer misalignment" caused by disordered student answering order and inconsistency between the physical arrangement of fill-in-the-blank positions and the logical attribution of questions. It does not rely on manual intervention, but uses semantic consistency analysis results as the diagnostic basis and contextual semantic similarity as the decision basis to achieve accurate and interpretable attribution adjustment.

[0168] First, after the topological map has completed the initial mapping, if the overall matching score of all answers under a certain question is significantly lower than the preset threshold (e.g., the average score is lower than 0.4), or if most answers collectively mismatch in key dimensions (such as target phonemes and core letters), the system determines that the current attribution relationship is highly suspicious and activates the error correction module.

[0169] After the error correction module is activated, the cross-question semantic similarity is re-evaluated. This module takes the set of answers that are currently suspected of being misattributed (for example, ["sunny", "city", "happy"] originally attached to the question "shy") as the query set, and calculates the overall similarity between the answers and the semantic templates defined by other question stem anchors in turn.

[0170] Based on the above reassessment, the error correction module performs affiliation redirection decision. If the average similarity of a certain group of answers with the original affiliated question stem is lower than the average similarity with another question stem, and the similarity advantage is statistically significant (e.g., exceeding the mean of the similarity of all other question stems by two standard deviations), then the entire group of answers is determined to be incorrectly affiliated, and it is completely unbound from the original question node and reattached to the question stem with high matching degree.

[0171] Finally, the error correction module performs self-verification and confidence feedback. After the redirection is completed, the error correction module calls the semantic consistency analysis algorithm again to verify the answers under the new attribution relationship. Only when the average matching score under the new relationship jumps to a reasonable range (e.g., ≥0.7) and no new abnormally low scores appear is the adjustment finally confirmed. At the same time, the system will generate a traceable log: "The answer group [sunny, city, happy] originally belonged to the shy question (similarity 0.32), and after re-evaluation, it has been migrated to the windy question (similarity 0.87), with a migration confidence of 96%".

[0172] This embodiment provides an example of the error correction module execution, as shown below:

[0173] Step 1: Re-evaluate cross-question semantic similarity.

[0174] The set of answers suspected of being misattributed is used as the query set, and the overall similarity between the answers and the semantic templates defined by each semantic anchor is calculated sequentially.

[0175] For example, taking ["sunny", "city", "happy"], originally attached to the "shy" question, as the query set, and calculating its comprehensive similarity with the semantic templates of each question stem anchor ("windy", "shy", "cloudy", etc.):

[0176] Similarity to the template “shy” (which requires the word to contain the letter 'y' and the sound / aɪ / ): sunny(0.2) + city(0.1) + happy(0.2) → average 0.17;

[0177] Similarity to the template "windy" (which requires weather-related information and contains either i or y): sunny(0.9) + city(0.85) + happy(0.9) → average 0.88;

[0178] Similarity to the template "cloudy" (which requires weather-related information and contains the letter 'y'): sunny(0.9) + city(0.3) + happy(0.85) → average 0.68.

[0179] Step 2: Attribution Redirection Decision.

[0180] If the average similarity between the query set and another semantic anchor is significantly higher than the average similarity with the original semantic anchor, then the query set is unbound from the original semantic anchor and reattached to the other semantic anchor.

[0181] In this embodiment, the average similarity of ["sunny", "city", "happy"] with "windy" (0.88) is significantly higher than that with "shy" (0.17), and exceeds the mean similarity of all other question stems by two standard deviations (σ≈0.15, 0.88−0.17=0.71>2×0.15=0.30). Therefore, attribution redirection is performed.

[0182] (1) Unbind ["sunny", "city", "happy"] from the "shy" question;

[0183] (2) Remount it under the "windy" topic;

[0184] (3) Update the question number of the corresponding blank in the topology map that is “windy”;

[0185] (4) Recalculate the semantic weight values ​​of the affected fill-in positions.

[0186] Step 3: Self-verification and graph update.

[0187] After the redirection is complete, semantic consistency is checked again. In this embodiment, the fourth preset threshold θ_confirm = 0.7.

[0188] The average matching score between ["sunny", "city", "happy"] and the template "windy" under the new assignment is 0.87 ≥ 0.7, and no new abnormally low scores have appeared, confirming that the adjustment is effective.

[0189] Simultaneously, the question number and semantic weight value of the corresponding node in the topology graph are updated synchronously, generating a traceable log:

[0190] "The answer group [sunny, city, happy] originally belonged to the shy question (similarity 0.17), and after re-evaluation, it was transferred to the windy question (similarity 0.88), with a transfer confidence of 96%."

[0191] The contextual semantic similarity model does not rely on large models or complex neural networks, but is a lightweight, interpretable, rule-guided matching mechanism designed for fill-in-the-blank questions. Its core idea is: to determine which question (e.g., "windy" or "shy") a student's answer (e.g., "sunny") is more likely to belong to, it's not based on the position of the word, but on which question's stem it is more consistent with in terms of word form, pronunciation, and usage context. The specific implementation involves three steps:

[0192] First, extract key linguistic features from the question stem anchor (such as "windy:")—including what letter it begins or ends with, what the main vowel is pronounced (such as / i / ), and what kind of context it often appears in (such as weather-related vocabulary); similarly, extract the exact same three types of features from the student's answer (such as "sunny");

[0193] Secondly, the matching degree of these two sets of features is calculated separately: whether they share key letters or spelling patterns in terms of glyphs; whether the main vowels are the same or similar in pronunciation; and whether they frequently co-occur with the same type of words in context (for example, "windy," "cloudy," and "rainy" co-occur frequently, while "shy," "fly," and "try" form another group). Each type of matching produces a quantitative score, based on deterministic rules and pre-built language resources (such as English phonetic symbols and basic co-occurrence statistics) rather than guesswork.

[0194] Finally, the three scores are weighted and combined according to their teaching importance—pronunciation matching has the highest weight (because the question explicitly tests pronunciation), followed by character shape, with context as a supplementary reference; the final result is a comprehensive similarity value between 0 and 1, which clearly reflects the logical fit between the answer and the question.

[0195] S6. Compare the set of mapped answers corresponding to each semantic anchor point with the pre-stored set of standard answers to generate the grading results;

[0196] The standard answers are pre-entered by teachers or retrieved from a standard answer database by question number index, and each semantic anchor point corresponds to a set of standard answers;

[0197] The comparison process includes:

[0198] S61. Set normalization: Treat both the student mapping answer set and the standard answer set as unordered sets, and remove duplicates and null values.

[0199] S62. Element-level semantic comparison: For each element in the mapped answer set, perform semantic equivalence determination with elements in the standard answer set, including:

[0200] Exact match: strings are exactly the same;

[0201] Semantic equivalence: Satisfies the preset semantic equivalence rules (such as case insensitivity, synonym substitution, word form change);

[0202] Partial matching: Similarity scores are calculated based on glyphs, pronunciation, parts of speech, and contextual co-occurrence.

[0203] S63. Question Group-Level Scoring: Count the number of successfully matched elements and calculate the score by combining it with the total score of the question; if there are unmatched elements, locate the specific error and generate error type labels (such as "missing answer", "redundant answer", "semantic mismatch").

[0204] This embodiment provides an example of the following comparison process:

[0205] The comparison process includes the following three steps:

[0206] Step 1: Set normalization:

[0207] Both the student mapping answer set and the standard answer set are treated as unordered sets, and duplicate and null values ​​are removed.

[0208] For example, the student's mapped answer set is {"happy", "sunny", "city", null, "happy"}, which becomes {"happy", "sunny", "city"} after normalization.

[0209] The standard answer set is {"sunny", "city", "happy"}, which remains {"sunny", "city", "happy"} after normalization.

[0210] Step 2: Element-level semantic comparison:

[0211] For each element in the mapped answer set, a semantic equivalence determination is performed between it and the elements in the standard answer set, including three matching patterns:

[0212] (1) Exact match: strings are exactly the same (case sensitive):

[0213] For example, “happy” and “happy” match exactly; “Happy” and “happy” do not match exactly, but enter semantic equivalence matching.

[0214] (2) Semantic equivalence matching: satisfies the preset semantic equivalence rules:

[0215] In this embodiment, the semantic equivalence rules include:

[0216] Case insensitive: "Happy" ≡ "happy";

[0217] British / American spelling: "colour" ≡ "color";

[0218] Synonym replacement: "big" ≡ "large" (must be in the preset thesaurus);

[0219] Word form changes: "run" ≡ "running" (verb base form and present participle, must be in the preset inflection rule library).

[0220] (3) Partial matching: Similarity scores are calculated by verifying glyphs, pronunciation, parts of speech, and co-occurrence with context.

[0221] For example, the student's answer "prety" (a misspelling) versus the standard answer "pretty":

[0222] Character similarity: with an edit distance of 1, the similarity is 1 − 1 / 6 = 0.83;

[0223] Phonetic similarity: Through G2P model conversion, "prety"→ / ˈprɪti / , "pretty"→ / ˈprɪti / , the phonemes are the same, similarity = 1.0;

[0224] The overall partial match score is calculated as 0.4 × 0.83 + 0.6 × 1.0 = 0.93. If the preset partial match threshold is 0.85, the result is considered partially correct.

[0225] Step 3: Question Group-Level Scoring and Error Location:

[0226] Count the number of successfully matched elements and calculate the score: In this example, the total score for the "windy" question is 3 points. There are 3 standard answers and 3 student answers. All of them are successfully matched, so 3 points are awarded.

[0227] If no matching element exists, locate the specific error item and generate an error type label:

[0228] (1) "Missing answer": Elements that exist in the standard answer set but not in the student answer set;

[0229] (2) "Redundant answers": Elements that exist in the student answer set but not in the standard answer set;

[0230] (3) "Semantic mismatch": elements in which the student's answer does not match the standard answer in terms of character form, pronunciation, part of speech, etc.

[0231] S64. Grading Results Output: Generate a structured grading report that includes the score for each question, error location, attribution analysis, and error correction log.

[0232] Driven by semantic anchors, all answers mapped to the corresponding fill-in-the-blank questions are treated as an unordered set;

[0233] Based on the implicit linguistic rules or logical constraints of the question, the semantic consistency of each answer is verified;

[0234] The verified set of answers is compared with the set of standard answers. If the elements are completely identical or meet the preset semantic equivalence rules, the answer is judged to be correct.

[0235] If an attribution error exists, meaning that the matching score of a certain group of answers with the current semantic anchor is significantly lower than the preset threshold, the error correction module is triggered to remap the group of answers to a more matching semantic anchor and re-compare them.

[0236] The specific method for comparing the mapped answer with the standard answer is to conduct a structured and conditional intelligent comparison under the guidance of semantic anchors and the logical constraints of the question. The process includes:

[0237] 1) Question group-level attribution comparison (prioritizing correct attribution):

[0238] The system first ensures that each answer has been accurately assigned to its corresponding question using semantic anchors (such as question number "2. shy:", keyword "windy", structured prompts, etc.) and topological mapping. Only after this logical grouping is complete does the comparison begin; if the assignment is incorrect (e.g., misassigning an answer belonging to the "shy" question to the "windy" question), it is directly judged as misplaced and will not proceed to subsequent content comparison. This fundamentally avoids the "answer mismatch" caused by traditional physical order-based grading.

[0239] 2) Semantic consistency verification (non-plain text matching):

[0240] The comparison not only checks whether the answer is literally the same as the standard answer, but also performs dynamic verification based on the linguistic rules or logical constraints implied in the question.

[0241] The semantic consistency verification includes at least one of the following:

[0242] Character feature verification checks whether the answer contains the target letter or spelling pattern.

[0243] Pronunciation feature verification involves converting the answer content into main vowel phonemes using a picture-to-sound conversion model and calculating the similarity between the answer and the standard pronunciation corresponding to the semantic anchor point.

[0244] Part-of-speech feature verification uses a part-of-speech tagger to determine whether the part of speech of the answer matches the part-of-speech tendency corresponding to the semantic anchor.

[0245] Context co-occurrence verification checks the co-occurrence frequency of the answer content and the set of standard answers corresponding to the semantic anchor in a preset corpus.

[0246] Given the question stem “windy: ___ ___ ___”, after the system identifies the semantic anchor “windy”, it infers that the question tests adjectives of the same kind that “contain the letter w and the i is pronounced / aɪ / ”; the standard answer is expected to be “sunny”, “city”, “happy”, etc., and the system then checks whether the student’s answer meets the dual conditions of “contains w” and “pronounced / aɪ / ”.

[0247] For “shy: ___ ___ ___”, verify whether all answers contain “y” and are pronounced / aɪ / (such as “by""fly""pretty”).

[0248] Character feature verification: Check if each answer contains the letter "i". "happy", "sunny", and "city" all meet the requirement.

[0249] Pronunciation feature verification: Through G2P model conversion, "happy" -> / ˈhæpi / (main vowel / æ / , not matching), "sunny" -> / ˈsʌni / (main vowel / ʌ / , not matching), "city" -> / ˈsɪti / (main vowel / ɪ / , not matching). Here, it was found that the pronunciation of "i" in "windy" is inconsistent with the standard / aɪ / pronunciation. However, the standard answer set itself contains these three words, indicating that the question actually tests "similar words containing the letter i" rather than strict phoneme matching. The system adaptively adjusts the verification rules based on the standard answer set, ultimately determining the answer to be correct.

[0250] Such comparisons rely on pre-defined semantic rule models (such as phonetic rule bases, word formation rules, and contextual reasoning) rather than static string equality.

[0251] 3) Order-independent set-based judgment (supports unordered answers):

[0252] When a question has multiple fill-in-the-blank positions, the system treats all student answers belonging to that question as an unordered set and compares them with the standard answer set. For example, the standard answer set for the question "windy" is {"sunny", "city", "happy"}, and the student answer set is {"happy", "sunny", "city"}. Even if the order is different, as long as the elements are completely identical or meet the preset semantic equivalence rules (such as accepting synonyms, variant words, and other extended rules), it is judged as completely correct. If there are missing, redundant, or semantically inconsistent items, the specific incorrect item is located and reported.

[0253] In summary, this comparison mechanism is an intelligent judgment process that uses semantic anchors as navigation, question logic as the criterion, and set relationships as the unit. Its essence is "understanding the question's intent → restoring the student's answer intent → verifying consistency in the semantic space", rather than mechanical text comparison.

[0254] This embodiment also provides boundary case handling:

[0255] (1) Handling of unanswered questions: For fill-in-the-blank positions marked as "unanswered", if the question allows partial answers, only the answers that have been answered will be scored; if the question requires all answers, the unanswered part will be scored as zero.

[0256] (2) Redundant answer handling: When the number of mapped answers for a question exceeds the number of standard answers, the answers with higher semantic weight values ​​are retained first, and the redundant answers are marked as "redundant" and prompted for review;

[0257] (3) Handling of missing answers: When the number of mapped answers for a question is less than the number of standard answers, the missing positions are marked as "not answered";

[0258] (4) Handling cross-page questions: For questions that span multiple pages, the cross-page fill-in-the-blank positions are grouped to the same semantic anchor point by the uniqueness constraint of the question number, and cross-page edge connections are established in the topological graph.

[0259] The intelligent grading method for fill-in-the-blank questions provided in this embodiment is applicable to fill-in-the-blank question scenarios involving multiple languages ​​and question types. The semantic anchor point extraction supports Chinese, English, and other natural languages.

[0260] This embodiment provides an intelligent grading method for fill-in-the-blank questions. First, it uses OCR to identify and locate the fill-in-the-blank positions on a blank test paper. Then, it establishes a semantic association between the questions and the fill-in-the-blank positions through triple constraints of spatial proximity, semantic attribution, and structural verification. Next, it constructs a topological graph containing attributes such as physical coordinates and semantic weights. When students answer, the handwritten answers are read in physical order and mapped to corresponding semantic anchor points. Low-confidence results trigger cross-question error correction and redirection. Finally, the grading results are compared with the standard answers to generate the grading results. This embodiment effectively solves the grading problems of answer misalignment and cross-question confusion in handwritten fill-in-the-blank questions by extracting semantic anchor points, constructing a topological graph, calculating semantic weight values, and performing confidence level processing and error correction and redirection. It achieves intelligent identification, dynamic mapping, and disordered grading of fill-in-the-blank questions, ensuring that answers can be accurately matched to the corresponding questions, and realizing robust, interpretable, and teaching-compliant intelligent grading.

[0261] Example 2

[0262] refer to Figure 2 This embodiment provides an intelligent grading system for fill-in-the-blank questions, based on the intelligent grading method for fill-in-the-blank questions described in Embodiment 1, including the following modules:

[0263] The fill-in-the-blank question information acquisition module is used to perform OCR recognition on the original test paper image containing multiple fill-in-the-blank questions that have not been answered, and to obtain all text content and the bounding box coordinates of each fill-in-the-blank position; the semantic association module is used to extract the question identifier phrase of each fill-in-the-blank question from the all text content as a semantic anchor point, and to establish a semantic spatial association between the semantic anchor point and the corresponding fill-in-the-blank position based on spatial proximity constraints, semantic attribution constraints and structural verification constraints.

[0264] The topology graph construction module is used to construct a topology graph based on the fill-in-the-blank positions and their spatial proximity and semantic attribution relationships. Nodes represent fill-in-the-blank positions, and edges represent spatial proximity and semantic attribution relationships. Each fill-in-the-blank position node stores its physical coordinates, the question number it belongs to, the candidate answer region, and a semantic weight value. The semantic weight value is generated by weighted fusion of spatial credibility, semantic attribution confidence, and structural consistency score.

[0265] The answer reading module is used to perform OCR recognition of handwritten content based on the candidate answer area when the student's answer image is received, and to read each answer according to the actual physical order of the blank positions to generate an ordered answer sequence.

[0266] The answer mapping module is used to map each answer in the ordered answer sequence to the corresponding semantic anchor point using the topological graph to form a set of mapped answers, and to perform confidence level processing according to the semantic weight value: for fill-in-the-blank positions with semantic weight values ​​lower than a preset threshold, the error correction module is triggered to perform cross-question semantic similarity reassessment and attribution redirection;

[0267] The answer comparison and grading module is used to compare the set of mapped answers corresponding to each semantic anchor with the pre-stored set of standard answers to generate grading results.

[0268] Example 3

[0269] This embodiment provides an example of a student completing an English reading comprehension exercise and having it graded by an intelligent grading system using the intelligent grading method for fill-in-the-blank questions described in Embodiment 1. This illustrates the actual operation of the intelligent grading system for fill-in-the-blank questions in this embodiment. The specific implementation steps are as follows:

[0270] Suppose a student encounters the following question while completing an English reading comprehension exercise:

[0271] Task 1: Find words in the text that contain the same letters and pronunciations as the underlined parts.

[0272] 1.windy: ________ ________ ________

[0273] 2. shy: ________ ________ ________

[0274] The student filled in the answers on the answer sheet, but in a disordered order, as shown below:

[0275] In the three blanks following "windy", the words were written as "sunny", "city", and "happy" in that order.

[0276] In the three blanks following “shy”, I wrote “by”, “fly”, and “pretty” in that order.

[0277] When the teacher scanned the image using the intelligent grading system, the system did not match the answers in the order from left to right and from top to bottom. Instead, it first used OCR to identify the keywords "1. windy:" and "2. shy:" in the question stem and used these two phrases as "semantic anchors".

[0278] After mapping in step S5:

[0279] The set of mapped answers for the question "windy" is: {"by", "fly", "pretty"};

[0280] The set of mapped answers for the question "shy" is: {"sunny", "city", "happy"};

[0281] During step S6, the system first performs semantic consistency analysis:

[0282] For the "windy" question:

[0283] The semantic template features of the anchor "windy" are: the first letter "w", the main vowel / i / (pronounced / ɪ / or / aɪ / ), and weather-related adjectives.

[0284] Verify "by": It does not contain "w", its part of speech is a preposition, and its match with the template is low (score approximately 0.15).

[0285] Validating "fly": It does not contain "w", is a verb, and has a low match score (approximately 0.20).

[0286] Verify “pretty”: It does not contain “w”, is an adjective but its main vowel is / ɪ / , and the match is moderate (score approximately 0.35).

[0287] The average matching score for this question is approximately 0.23, which is significantly lower than the preset threshold of 0.4, triggering the error correction module.

[0288] After the error correction module is activated, cross-question semantic similarity re-evaluation is performed:

[0289] Using the answer group {"by", "fly", "pretty"} under the "windy" question as the query set, calculate its overall similarity with all other question stem anchor semantic templates:

[0290] Similarity calculation with the "shy" anchor template:

[0291] The "shy" template features include: the last letter "y", the main vowel / aɪ / , and an adjective tendency.

[0292] “by”: The last letter “y”, G2P-> / baɪ / (main vowel / aɪ / , match), score 0.85.

[0293] “fly”: Last letter “y”, G2P-> / flaɪ / (main vowel / aɪ / , match), score 0.90.

[0294] “pretty”: Last letter “y”, G2P-> / ˈprɪti / (main vowel / ɪ / , partial match), score 0.65.

[0295] Average similarity = (0.85 + 0.90 + 0.65) / 3 = 0.80.

[0296] Similarity with the "windy" anchor template = 0.23 (original attribution).

[0297] Since 0.80 is much greater than 0.23, and the difference is statistically significant (exceeding two standard deviations of the mean similarity of all other question stems), the system determines that the overall attribution of this group of answers is incorrect.

[0298] The error correction module performs attribution redirection:

[0299] Unbind {"by", "fly", "pretty"} from the "windy" problem and reattach it to the "shy" problem.

[0300] Unbind {"sunny", "city", "happy"} from the "shy" problem and reattach it to the "windy" problem.

[0301] Semantic consistency analysis is invoked again after redirection:

[0302] New answers to the question “windy” include {"sunny", "city", "happy"}: all contain letter combinations similar to “windy”, with an average matching score of approximately 0.85, and have been verified.

[0303] The new answers under the question “shy” are {"by", "fly", "pretty"}: all contain “y” and the main vowel is / aɪ / , with an average matching score of about 0.87, which has been verified.

[0304] That is, the system analyzes the position of each blank and associates it with the corresponding semantic anchor. Even if the student answers in the wrong order, the system will automatically identify all the answers that belong to the question based on the semantic anchor "windy"—namely, "sunny", "city", and "happy"—and determine whether these words all contain "w" and are pronounced / ai / (such as the "i" in "windy" being pronounced / aɪ / ), thus scoring correctly.

[0305] For the question "shy", the system will automatically extract the three answers "by", "fly" and "pretty", and determine whether they all contain "y" and are pronounced / aɪ / , and finally give an accurate score.

[0306] Final grading result: Both questions were marked as correct.

[0307] The entire process requires no manual intervention and does not depend on the order in which students fill in their answers. The system can automatically identify, group, and compare answers, achieving efficient and accurate grading.

[0308] Example 4

[0309] refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of an intelligent question recording device according to this embodiment. The intelligent question recording device 20 of this embodiment includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, it implements the steps in the above method embodiments. Alternatively, when the processor 21 executes the computer program, it implements the functions of each module / unit in the above device embodiments.

[0310] For example, the computer program can be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the intelligent question-taking device 20. For example, the computer program can be divided into the modules shown in Embodiment 2. The specific functions of each module are described in the working process of the device described in the above embodiments, and will not be repeated here.

[0311] The intelligent question recording device 20 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that the schematic diagram is merely an example of the intelligent question recording device 20 and does not constitute a limitation on the intelligent question recording device 20. It may include more or fewer components than shown in the diagram, or combine certain components, or use different components. For example, the intelligent question recording device 20 may also include input / output devices, network access devices, buses, etc.

[0312] The processor 21 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 21 is the control center of the intelligent question recording device 20, connecting all parts of the intelligent question recording device 20 via various interfaces and lines.

[0313] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements various functions of the intelligent question-taking device 20 by running or executing the computer programs and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0314] If the modules / units integrated in the intelligent question recording device 20 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 21, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium may be appropriately added to or subtracted from the content as required by the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium may not include electrical carrier signals and telecommunication signals.

[0315] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0316] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 A process, multiple processes, and / or boxes Figure 1Devices that specify the functions in one or more boxes.

[0317] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction device, which is implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0318] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0319] The parts of this invention not described in detail are prior art. It will be apparent to those skilled in the art that this invention is not limited to the details of the above exemplary embodiments, and that the invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects, and are intended to encompass all changes falling within the meaning and scope of equivalents within this invention.

Claims

1. A method for intelligently grading fill-in-the-blank questions, characterized in that, Includes the following steps: S1. Perform OCR recognition on the original test paper image containing multiple fill-in-the-blank questions that has not been answered, and obtain all text content and the bounding box coordinates of each fill-in-the-blank position; S2. Extract the question identifier phrase of each fill-in-the-blank question from all the text content as a semantic anchor point, and establish a semantic spatial association between the semantic anchor point and the corresponding fill-in-the-blank position based on spatial proximity constraints, semantic attribution constraints and structural verification constraints. S3. Construct a topological graph based on the fill-in-the-blank positions and their spatial proximity and semantic attribution relationships, where nodes represent fill-in-the-blank positions and edges represent spatial proximity and semantic attribution relationships; each fill-in-the-blank position node stores its physical coordinates, the question number it belongs to, the candidate answer region, and the semantic weight value; the semantic weight value is generated by weighted fusion of spatial credibility, semantic attribution confidence, and structural consistency score. S4. When the student's answer image is received, OCR recognition of handwritten content is performed based on the candidate answer area, and each answer is read according to the actual physical order of the fill-in-the-blank positions to generate an ordered answer sequence. S5. Using the topological graph, each answer in the ordered answer sequence is mapped to the corresponding semantic anchor point to form a set of mapped answers, and confidence level processing is performed according to the semantic weight value: for fill-in-the-blank positions with semantic weight values ​​lower than a preset threshold, the error correction module is triggered to perform cross-question semantic similarity reassessment and attribution redirection; S6. Compare the set of mapped answers corresponding to each semantic anchor with the pre-stored set of standard answers to generate the grading results.

2. The method according to claim 1, characterized in that, The establishment of semantic space associations in step S2 includes: For each blank, calculate its central Euclidean distance to all semantic anchors, and take the one with the smallest distance as the preferred anchor. Verify whether the preferred anchor appears above or to the left of the blank without any stronger anchor in between. If the verification is successful, the semantic attribution is confirmed. If the semantic anchor ends with a colon, dash, or period and the blank is immediately after it, the semantic attribution weight is increased. If the semantic anchor contains a question number, all blanks belonging to that semantic anchor are marked as belonging to the same question group.

3. The method according to claim 2, characterized in that, The semantic weight value W mentioned in step S3 is calculated as follows: W = α×S + β×A + γ×C, where S is the spatial confidence, calculated based on the geometric distance decay function between the fill-in-the-blank position and the anchor point; A is the semantic attribution confidence, determined by the grammatical / structural adhesion strength between the anchor point and the fill-in-the-blank position; C is the structural consistency score, verifying whether the fill-in-the-blank position conforms to the preset structural pattern of its question; α is the spatial confidence weight, β is the semantic attribution confidence weight, γ is the structural consistency score weight, and α+β+γ=1.

4. The method according to claim 1, characterized in that, The candidate answer region mentioned in step S3 is generated in the following way: An initial rectangular region is formed by expanding a fixed number of pixels outward from the boundary box of the empty space as the center. Detect the text line where the blank is located, limit the initial rectangular area to the height of the text line and perform left and right boundary alignment correction; The height and width of the candidate answer area are dynamically adjusted using statistical values ​​of the font size, line height, and character width of the surrounding text. The candidate answer region is binarized and its contour is detected. If an ink block matching the letter features is detected, the center of the candidate answer region is finely adjusted to the centroid of the ink block.

5. The method according to claim 1, characterized in that, The confidence level grading process in step S5 includes: When the semantic weight value W of the fill-in position is greater than or equal to the first preset threshold, it is determined to be a high confidence mapping, and proceed directly to step S6; When 0.5≤W<first preset threshold, it is determined to be a mapping to be verified. First, semantic consistency pre-verification is performed. If the verification passes, proceed to step S6; otherwise, trigger the error correction module. When W < 0.5, it is determined to be a low-confidence mapping, and the error correction module is directly triggered to perform a home reassessment.

6. The method according to claim 1, characterized in that, The triggering conditions for the error correction module include: The average semantic consistency score of all answers under a certain semantic anchor point is lower than the second preset threshold; Answers exceeding a predetermined proportion under a certain semantic anchor point collectively mismatch the key dimensions; The semantic weight value of a certain fill-in-the-blank position is lower than the third preset threshold; The number of mapped answers does not match the number of blanks required by the question.

7. The method according to claim 1, characterized in that, The error correction module includes: The set of answers suspected of being misattributed is used as the query set, and the overall similarity between the answers and the semantic templates defined by each semantic anchor is calculated sequentially. If the average similarity between the query set and another semantic anchor is significantly higher than the average similarity with the original semantic anchor, then the query set is unbound from the original semantic anchor and reattached to the other semantic anchor. After the redirection is completed, semantic consistency is checked again. Only when the average matching score under the new assignment reaches the fourth preset threshold and no new abnormally low scores appear, the adjustment is confirmed and the corresponding question number and semantic weight value of the corresponding node in the topology graph are updated synchronously.

8. The method according to claim 1, characterized in that, The comparison described in step S6 specifically includes: Both the student-mapped answer set and the standard answer set are considered as unordered sets. Each element in the mapped answer set is semantically equivalent to an element in the standard answer set. The semantic equivalence determination includes exact matching, semantic equivalence matching, and partial matching. The system counts the number of successfully matched elements and calculates the score, while for unmatched elements, it identifies specific error items and generates error type labels.

9. The method according to claim 1, characterized in that, The method also includes boundary case handling, specifically including: For blanks where no valid ink was detected, mark them as "unanswered" and assign them a blank value; When the number of mapped answers to a question exceeds the number of standard answers, the answers with higher semantic weight values ​​are retained first, and the extra answers are marked as redundant. When the number of mapped answers to a question is less than the number of standard answers, the missing positions are marked as unanswered; For questions that span multiple pages, the uniqueness of the question number is used to group the fill-in-the-blank questions across pages to the same semantic anchor point.

10. A smart grading system for fill-in-the-blank questions, characterized in that, The method based on any one of claims 1-9 comprises the following modules: The fill-in-the-blank question information acquisition module is used to perform OCR recognition on the original test paper image containing multiple fill-in-the-blank questions that have not been answered, and to obtain all text content and the bounding box coordinates of each fill-in-the-blank position; the semantic association module is used to extract the question identifier phrase of each fill-in-the-blank question from the all text content as a semantic anchor point, and to establish a semantic spatial association between the semantic anchor point and the corresponding fill-in-the-blank position based on spatial proximity constraints, semantic attribution constraints and structural verification constraints. The topology graph construction module is used to construct a topology graph based on the fill-in-the-blank positions and their spatial proximity and semantic attribution relationships. Nodes represent fill-in-the-blank positions, and edges represent spatial proximity and semantic attribution relationships. Each fill-in-the-blank position node stores its physical coordinates, the question number it belongs to, the candidate answer region, and a semantic weight value. The semantic weight value is generated by weighted fusion of spatial credibility, semantic attribution confidence, and structural consistency score. The answer reading module is used to perform OCR recognition of handwritten content based on the candidate answer area when the student's answer image is received, and to read each answer according to the actual physical order of the blank positions to generate an ordered answer sequence. The answer mapping module is used to map each answer in the ordered answer sequence to the corresponding semantic anchor point using the topological graph to form a set of mapped answers, and to perform confidence level processing according to the semantic weight value: for fill-in-the-blank positions with semantic weight values ​​lower than a preset threshold, the error correction module is triggered to perform cross-question semantic similarity reassessment and attribution redirection; The answer comparison and grading module is used to compare the set of mapped answers corresponding to each semantic anchor with the pre-stored set of standard answers to generate grading results.