Intelligent homework correction method, storage medium and equipment
By using a handwriting decoupling model and mathematical verification algorithm, student assignments are automatically graded, solving the problems of low efficiency and logical misjudgment in traditional assignment grading, and providing detailed error feedback.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional homework correction is inefficient, relies on manual review, suffers from OCR recognition errors due to illegible handwriting and logical misjudgments in mathematical problem-solving processes, and lacks dynamic verification capabilities.
An attention-based handwriting decoupling model is used to reconstruct overlapping digits. Combined with a common divisor tracing algorithm and a graph neural network to verify the mathematical steps, a visual correction report is output to locate errors.
It achieves efficient and accurate homework correction, automatically identifies and verifies writing and logical errors in students' answers, and provides detailed error location feedback.
Smart Images

Figure SMS_1 
Figure SMS_9 
Figure QLYQS_1
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent education technology, specifically to an intelligent homework grading method, storage medium, and device. Background Technology
[0002] In the current education field, traditional homework correction mainly relies on manual review, which suffers from problems such as low efficiency and strong subjectivity. Especially in math homework correction, OCR recognition errors caused by students' illegible handwriting (such as overlapping numbers) and logical misjudgments of complex calculation steps are prominent issues. In addition, existing technologies lack the ability to dynamically verify the math problem-solving process, for example, they cannot effectively identify the completeness of simplification steps or the correctness of logic. Summary of the Invention
[0003] In view of the shortcomings of the existing technology, the present invention aims to provide a method, storage medium and device for intelligent job correction.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: A method for intelligent homework grading includes: S1. Receive student answer images. For overlapping numbers in the handwritten answers of each question, restore the occluded numbers through a handwriting decoupling model based on an attention mechanism to obtain the restored student answers. S2. Correct the restored student answers: For fraction reduction problems, based on the step dependency verification rule, we verify whether the student's answer presents a continuous simplification process, and verify the legality of each step in the student's answer through the common divisor tracing algorithm. For verification problems, construct the topology graph of the operation chain in the student's answer, and use a graph neural network to verify the mathematical equivalence between adjacent steps in the answer; S3. Output a visual correction report containing error location, using color coding to distinguish three types of problems: handwriting recognition and reconstruction, missing step errors, and calculation logic errors, and using heatmaps to mark the error evolution path; the error location refers to the location of the error in the student's answer.
[0005] Furthermore, the handwriting decoupling model includes a spatiotemporal convolution module and an adversarial generation module. First, the spatiotemporal convolution module extracts the writing sequence features of the strokes, and then the adversarial generation module is used to reconstruct the original appearance of the occluded digits.
[0006] Furthermore, the handwriting decoupling model also includes a confidence verification module, which calculates and verifies the confidence level of the reconstructed occluded digits. The confidence level is calculated using the following formula:
[0007] Where S represents the overall confidence score of the current question, ranging from 0 to 1, with a value closer to 1 indicating a better restoration effect; pi is the predicted number, and qi is the reference number; wi and hi are the width and height of the character box of the restored number, respectively, and max(wi,hi) represents the maximum side length of the character box, used to standardize the difference value; n represents the total number of restored numbers in the handwritten answer of the current question, and D(pi,qi) represents the difference between the predicted number pi and the reference number qi.
[0008] Furthermore, the adversarial generation module reconstructs the original appearance of the occluded digit as a predicted digit, and the confidence verification module further matches the most likely reference digit for the predicted digit based on the standard digit feature library in the training data.
[0009] Further, in step S2, the step dependency verification rules include: (1) The simplification problem must satisfy the following conditions: The complete derivation chain, where gcd represents the greatest common divisor formula, and a and b represent the numerator and denominator, respectively. Indicates for The simplification must result in the following: ; (2) Each simplification step must satisfy the requirement that the numerator and denominator use the same common divisor for simplification; (3) Prohibited Reverse simplification, a k and b k Let a represent the numerator and denominator of the current step, respectively. k+1 and b k+1 Let these represent the numerator and denominator of the next step, respectively. This indicates that the greatest common divisor of the current step is not less than the greatest common divisor of the next step.
[0010] Furthermore, in step S2, for verification questions, adjacent operation steps in the restored student answers are modeled as directed edges, and the weight of each directed edge is determined by the operator consistency coefficient. The decision is made that when the weight C of a directed edge exceeds a preset threshold θ, it is considered a potential erroneous step. Here, LHS and RHS represent the sets of numbers in two adjacent operation steps, |LHS∩RHS| represents the number of elements in the intersection of LHS and RHS, and |LHS∪RHS| represents the number of elements in the union of LHS and RHS. C takes values from 0 to infinity. The smaller the value, the stronger the correlation between adjacent steps, and the larger the value, the weaker the correlation. θ is a manually set empirical threshold.
[0011] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0012] The present invention also provides a computer device, including a processor and a memory, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the above-described method.
[0013] The beneficial effects of this invention are as follows: 1. This invention, combined with a handwriting decoupling model, can accurately recognize students' handwriting. 2. This invention achieves traceability of steps by forcibly verifying the continuity of reduction steps and the equivalence of the computation chain through a common divisor tracing algorithm and graph neural networks: 3. Visual feedback: Using heatmaps to mark the error progression path can help teachers quickly locate the three types of errors in students' answers (handwriting, steps, and logic). Detailed Implementation
[0014] The present invention will be further described below. It should be noted that this embodiment is based on the present technical solution and provides detailed implementation methods and specific operation processes, but the protection scope of the present invention is not limited to this embodiment.
[0015] This embodiment provides a method for intelligent homework grading, including: S1. Receive student answer images. For overlapping numbers in the handwritten answers of each question, restore the occluded numbers through a handwriting decoupling model based on an attention mechanism to obtain the restored student answers. S2. Correct the restored student answers: For fraction reduction problems, based on the step dependency verification rule, we verify whether the student's answer presents a continuous simplification process, and verify the legality of each step in the student's answer through the common divisor tracing algorithm. For verification problems, construct the topology graph of the operation chain in the student's answer, and use a graph neural network to verify the mathematical equivalence between adjacent steps in the answer; S3. Output a visual correction report containing error location, using color coding to distinguish three types of problems: handwriting recognition and reconstruction, missing step errors, and calculation logic errors, and using heatmaps to mark the error evolution path; the error location refers to the location of the error in the student's answer.
[0016] In this embodiment, the handwriting decoupling model includes a spatiotemporal convolution module and an adversarial generation module. First, the spatiotemporal convolution module extracts the writing sequence features of the strokes, and then the adversarial generation module is used to reconstruct the original appearance of the occluded digits.
[0017] Furthermore, in this embodiment, the handwriting decoupling model also includes a confidence verification module, which calculates and verifies the confidence of the reconstructed occluded digits.
[0018] The confidence level is calculated using the following formula:
[0019] Where S represents the overall confidence score of the current question, with a value of (0-1), where a value closer to 1 indicates a better restoration effect; pi is the predicted number, and qi is the reference number; wi and hi are the width and height of the character box of the restored number, respectively; max(wi,hi) represents the maximum side length of the character box, used to standardize the difference value. For example, if a number box is 30px wide and 50px high, then max(30,50)=50. If D(pi,qi)=15px, then the standardization is 15 / 50=0.3; n represents the total number of restored numbers in the handwritten answer of the current question (i.e., the total number of numbers that need to be verified). D(pi,qi) represents the difference between the predicted number pi and the reference number qi.
[0020] Furthermore, in this embodiment, the adversarial generation module reconstructs the original appearance of the occluded number as the predicted number, and the confidence verification module further matches the most likely reference number for the predicted number based on the standard number feature library in the training data.
[0021] For example, when the predicted number generated by the adversarial generation module is "6", the confidence verification module matches the predicted number "6" with each number in the standard number feature library based on the standard number feature library, and selects the most similar standard number as the reference number qi. If the confidence verification module calculates that the predicted number "6" has the highest matching degree with the standard "6" in the feature library, then the reference number qi is determined to be "6".
[0022] In the above process, the handwriting decoupling model uses spatiotemporal convolution and adversarial generative techniques to restore the overlapping handwritten digits of students into clear and recognizable standard digits, and uses a confidence formula to verify the accuracy of the restoration results.
[0023] For example, in a problem where two numbers are restored, the difference in restoration for the first number is 5px, and the character box is 20x40px, so the confidence level is 1 - 5 / 40 = 0.875. The difference in restoration for the second number is 12px, and the character box is 25x30px, so the confidence level is 1 - 12 / 30 = 0.6. Therefore, the confidence level for restoring the handwritten answer to this problem is S = (0.875 + 0.6) / 2 = 0.7375. In this embodiment, in step S2, the step dependency verification rule includes: (1) The simplification problem must satisfy the following conditions: The complete derivation chain, where gcd represents the greatest common divisor formula, and a and b represent the numerator and denominator, respectively. Indicates for The simplification must result in the following: ; (2) Each simplification step must satisfy the requirement that the numerator and denominator use the same common divisor for simplification; (3) Prohibited Reverse simplification, a k and b k Let a represent the numerator and denominator of the current step, respectively. k+1 and b k+1 Let these represent the numerator and denominator of the next step, respectively. This indicates that the greatest common divisor of the current step is not less than the greatest common divisor of the next step.
[0024] In the above process, the solution steps for simplification problems are strictly regulated by mathematical formulas to ensure that students must simplify fractions step by step according to the correct simplification logic, and to prevent skipping steps or incorrect simplification methods.
[0025] For rule (1) For example, when reducing the fraction 6 / 12, the greatest common divisor of 6 and 12 is 6. Therefore, according to rule (1), the final result of reducing 6 / 12 must be the simplest fraction 1 / 2.
[0026] Regarding the prohibition in rule (3) For example, if a step results in gcd(3,6)=3 but the next step gcd(6,12)=6 (i.e. 3 / 6→6 / 12), it is judged as an error, which is used to prevent reverse simplification (such as incorrectly "enlarging" 3 / 6 to 6 / 12).
[0027] The three formulas in the above three rules supervise the reduction process. Rule (1) requires that the final result must be reduced to its simplest form. Rule (2) requires that the numerator and denominator of each step can only "disassemble" the same number (with the same common divisor). Rule (3) requires that reverse operation is prohibited.
[0028] In this embodiment, in step S2, for verification questions, adjacent operation steps in the restored student answers are modeled as directed edges, and the edge weight of each directed edge is determined by the operator consistency coefficient. The decision is made that when the weight C of a directed edge exceeds a preset threshold θ, it is considered a potential erroneous step. Here, LHS and RHS represent the sets of numbers in two adjacent operation steps, |LHS∩RHS| represents the number of elements in the intersection of LHS and RHS, and |LHS∪RHS| represents the number of elements in the union of LHS and RHS. C takes values from 0 to infinity. The smaller the value, the stronger the correlation between adjacent steps, and the larger the value, the weaker the correlation. θ is a manually set empirical threshold (e.g., θ=5).
[0029] In the above process, by constructing a topological graph of the operation steps in the student's answer and calculating the consistency of operators in adjacent steps, it is possible to automatically detect possible erroneous skips or logical breaks in the mathematical operation process of the student's answer.
[0030] For example, if LHS (left operand set) = {6, 12} and RHS (right operand set) = {3, 6}, then LHS∩RHS = {6}, |LHS∩RHS| = 1, LHS∪RHS = {3, 6, 12}, |LHS∪RHS| = 3, and C = 3 / 1, indicating strong correlation. Another example is LHS∩RHS = {} (empty set), LHS∪RHS = {2, 3, 4, 6}, therefore |LHS∩RHS| = 0, |LHS∪RHS| = 4, and C = 4 / 0 → ∞, indicating no correlation between adjacent steps.
[0031] Furthermore, step S2 also includes: detecting special numerical features in the mathematical expressions of the restored student answers. The detection of special numerical features includes: 1) When the numerator and denominator satisfy the structure 1 / (n*(n+1)), activate fractional splitting analysis to determine whether it can be correctly split into 1 / n - 1 / (n+1). If the student fails to do this correctly, locate the error in the splitting step.
[0032] 2) When detected When the form is in odd number verification mode, n is any integer used to check whether the numerator and denominator are odd numbers when this type of fraction is detected, to ensure that the operation logic is correct.
[0033] By detecting special numerical features in the mathematical expressions of students' answers, the system automatically triggers corresponding analysis processes (such as partial fraction analysis and odd number verification), which helps to more intelligently identify and process special structures in students' answers.
[0034] Fractional partial fraction analysis is mainly used to verify whether students have mastered the special techniques for simplifying fractions.
[0035] Odd number checking is used to detect operational logic involving parity. For example, in proof problems, students might need to use the property that "odd numbers can be represented as 2k+1". By checking this feature, it can be determined whether the student's solution process reasonably utilizes the parity property of numbers.
[0036] In this embodiment, step S2 further includes: triggering a writing standardization check when the same operator appears more than three times in a student's answer.
[0037] For those skilled in the art, various corresponding changes and modifications can be made based on the above technical solutions and concepts, and all such changes and modifications should be included within the protection scope of the claims of this invention.
Claims
1. A method for intelligent correction of homework, characterized by, Comprising: S1, receiving a student answer image, for each question in the student answer image, restoring the hidden numbers in the handwritten answers by using an attention mechanism-based handwriting decoupling model to obtain the restored student answers; S2, correcting the restored student answers: For fraction problems, based on step dependency verification rules, verify whether the student answers present a continuous simplification process, and verify the legality of each step in the student answers by using a greatest common divisor backtracking algorithm; For verification problems, construct an operation chain topology graph of the student answers, and use a graph neural network to verify the mathematical equivalence between adjacent steps in the answers; S3, output a visual correction report containing error positioning, color-coded to distinguish between three types of problems: handwriting recognition reconstruction, step missing errors, and calculation logic errors, and use a heat map to mark the error evolution path; the error positioning refers to the location of the errors in the student answers.
2. The method of claim 1, wherein, The handwriting decoupling model includes a spatio-temporal convolution module and an adversarial generation module. First, the spatio-temporal convolution module extracts the time sequence features of the strokes, and then the adversarial generation module reconstructs the original appearance of the hidden numbers.
3. The method of claim 2, wherein, The handwriting decoupling model further includes a confidence checking module. The handwriting decoupling model uses the confidence checking module to calculate and check the confidence of the reconstructed hidden numbers: The confidence calculation formula is as follows: Where S represents the overall confidence score of the current question, taking a value of 0-1, and the closer to 1 indicates the better the restoration effect; pi is the predicted number, and qi is the reference number; wi and hi are the width and height of the character box of the restored number, respectively, and max(wi, hi) represents the maximum side length of the character box, which is used to standardize the difference value; n represents the total number of restored numbers in the handwritten answers of the current question, and D(pi, qi) represents the difference between the predicted number pi and its reference number qi.
4. The method of claim 3, wherein, The adversarial generation module reconstructs the original appearance of the hidden numbers as the predicted numbers, and the confidence checking module further matches the most likely reference numbers for the predicted numbers based on the standard number feature library in the training data.
5. The method of claim 1, wherein, In step S2, the step dependency verification rules include: (1) The fraction must satisfy the complete deduction chain gcd denotes the greatest common divisor formula, a and b represent the numerator and denominator, respectively, for the reduction of The final result must be ; (2) Each simplification step must use the same greatest common divisor to simplify the numerator and denominator; (3) Prohibition of occurrence of a backward simplification, a k and b k denote the numerator and denominator of the current step, a k+1 and b k+1 denote the numerator and denominator of the next step, denotes the prohibition of occurrence of the greatest common divisor of the current step being less than the greatest common divisor of the next step.
6. The method of claim 1, wherein, In step S2, for the verification question, adjacent operation steps in the student's answer after reduction are modeled as directed edges, and the edge weight of each directed edge is determined by the operator consistency coefficient When the edge weight C of a directed edge exceeds a preset threshold θ, it is determined that there is a potential error jump, where LHS and RHS represent the number sets in the adjacent two operation steps, |LHS∩RHS| represents the number of elements in the intersection of LHS and RHS, |LHS∪RHS| represents the number of elements in the union of LHS and RHS; C takes a value from 0 to infinity, the smaller the value, the stronger the correlation between adjacent steps, the larger the value, the weaker the correlation, and θ is an empirical threshold set by humans.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1-6.
8. A computer device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1-6.