A test item batch re-batching method, a storage medium and a device
By extracting standard question data and using a multimodal grading model, the problem of high computational overhead in the re-grading of assignments in existing technologies has been solved, achieving efficient batch grading and intelligent scoring, which is suitable for teaching scenarios such as exam review.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUHAI DUSHILANG SOFTWARE TECH CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-26
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent education technology, specifically to a method, storage medium, and device for batch re-grading of test questions. Background Technology
[0002] In traditional intelligent homework grading processes, when a question experiences widespread misjudgment and requires re-grading (e.g., due to incorrect grading criteria), existing systems typically need to re-execute the entire OCR recognition, question stem parsing, and large-scale model grading process for each assignment. This results in repeated OCR calls to process the same question stem content and a large number of redundant large-scale model inference requests, leading to high computational overhead, low grading efficiency, and significant resource waste. This performance bottleneck is particularly pronounced for questions containing complex text and images (such as reading comprehension and drawing questions). Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention aims to provide a method, storage medium, and device for batch re-grading of test questions.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: A method for batch re-grading of test questions includes the following steps: S1. Receive multiple student homework images to be re-graded, and locate the answer area of the target re-graded question in the student homework image. The answer area contains the question stem and the student's handwritten answer. S2. Extract the complete question stem content of the target re-graded question from any student homework image received in step S1, generate structured question stem data through optical character recognition (OCR) technology and / or image understanding technology, and mark it as the standard question stem data of the target re-graded question; S3. For each student homework image received in step S1, crop out the student answer area corresponding to the target re-graded question, remove the question stem part contained in the student answer area, and keep only the handwritten answer to form a clean image of student answer traces. S4. All student answer trace images are stitched together at the image level according to the preset layout rules and preset stitching order to generate an aggregated answer image containing all student answer traces. S5. Input the standard question data obtained in step S2 and the aggregated answer image obtained in step S4 into a trained multimodal grading model. Use the multimodal grading model to simultaneously identify the content of each student's answer traces and score and generate comments for each student's answer traces. S6. Analyze the output of the multimodal grading model, restore the scores and comments of each student's answer trace one by one according to the splicing order of step S4, and update the corresponding original homework grading records.
[0005] Furthermore, in step S4, the preset layout rule is as follows: after scaling each student's answer trace image to a fixed width, they are arranged horizontally, with consistent white space between adjacent student answer trace images, and visual dividing lines or numbered labels are added to distinguish different student answer trace image areas.
[0006] Furthermore, in step S1, when the number of student homework images to be re-batched exceeds a preset threshold, the total number of student homework images is first divided into several subsets, and each subset independently executes steps S2-S6.
[0007] Furthermore, the multimodal correction model includes image branching, text branching, and a cross-modal attention module; Image branching is used to encode the converged answer images and extract the spatial location and writing content of each student's answer traces; Text branches are used to encode the semantic information of the standard question stem data; The cross-modal attention module is used to fuse the semantic information of the standard question stem data with the content of the student's answer trace image to determine the correctness and quality level of the student's answer.
[0008] Furthermore, in step S3, the specific process of removing the question stem portion contained in the student's answer area is as follows: using template matching and differential image technology to remove the printed content in the student's answer area, retaining only the handwritten content in the student's answer area.
[0009] Furthermore, the above method also includes the following steps: persistently storing the standard question stem data and its embedded representation extracted in step S2, so that the standard question stem data can be directly called when the corresponding questions need to be re-graded later.
[0010] The present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-described method.
[0011] 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.
[0012] The beneficial effects of this invention are as follows: 1. This invention significantly improves processing efficiency by extracting and reusing the standard question stem from a single assignment, thus avoiding the need to repeatedly identify the question stem for each assignment. 2. This invention achieves a highly efficient "one-time input, batch grading" model by cropping and splicing together the clean answer traces of all students to form an aggregated image; 3. This invention combines a multimodal grading model, which can simultaneously understand the requirements of the question and each student's handwritten answer, accurately score and generate feedback; 4. This invention, in conjunction with a caching mechanism and a dynamic batching strategy, can also adapt to different scales of re-batch requirements, saving computing resources.
[0013] In summary, this invention can significantly reduce the burden on teachers, improve the consistency and intelligence of grading, and is particularly suitable for teaching scenarios such as exam review and unified grading. 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 batch re-grading of test questions, including the following steps: S1. Receive multiple student homework images to be re-graded, and locate the answer area of the target re-graded question in the student homework image. The answer area contains the question stem and the student's handwritten answer. S2. Extract the complete question stem content of the target re-graded question from any student homework image received in step S1, generate structured question stem data through optical character recognition (OCR) technology and / or image understanding technology, and mark it as the standard question stem data of the target re-graded question; S3. For each student homework image received in step S1, crop out the student answer area corresponding to the target re-graded question, remove the question stem part contained in the student answer area, and keep only the handwritten answer to form a clean image of student answer traces. S4. All student answer trace images are stitched together at the image level according to the preset layout rules and preset stitching order (such as receiving order, student ID order, etc.) to generate an aggregated answer image containing all student answer traces. S5. Input the standard question data obtained in step S2 and the aggregated answer image obtained in step S4 into a trained multimodal grading model. Use the multimodal grading model to simultaneously identify the content of each student's answer traces and score and generate comments for each student's answer traces. S6. Analyze the output of the multimodal grading model, restore the scores and comments of each student's answer trace one by one according to the splicing order of step S4, and update the corresponding original homework grading records.
[0016] Furthermore, the standard question stem data includes not only the question stem text, but also vectorized representations or embedded codes of non-text elements such as key attached figures, graph coordinate systems, and paragraphs of reading material.
[0017] In this embodiment, in step S4, the preset layout rule is as follows: after scaling each student's answer trace image to a fixed width, they are arranged horizontally, the white space between adjacent student answer trace images is consistent, and visual dividing lines or numbered labels are added to distinguish different student answer trace image areas.
[0018] In this embodiment, in step S1, when the number of student homework images to be re-approved exceeds a preset threshold, the total number of student homework images is first divided into several subsets, and each subset independently executes steps S2-S6.
[0019] In this embodiment, the multimodal correction model includes image branching, text branching, and a cross-modal attention module; Image branching is used to encode the converged answer images and extract the spatial location and writing content of each student's answer traces; Text branches are used to encode the semantic information of the standard question stem data; The cross-modal attention module is used to fuse the semantic information of the standard question stem data with the content of the student's answer trace image to determine the correctness and quality level of the student's answer.
[0020] In this embodiment, the specific process of clearing the question stem portion contained in the student's answer area in step S3 is as follows: using template matching and differential image technology to remove the printed content in the student's answer area, and only retaining the handwritten content in the student's answer area.
[0021] In this embodiment, the above method further includes the following steps: persistently storing the standard question stem data and its embedded representation extracted in step S2, so that when the corresponding questions need to be re-batched later, the standard question stem data can be directly called to avoid repeated parsing.
[0022] Example 2 This embodiment provides an application example of Embodiment 1.
[0023] A high school physics teacher assigned a unit test to the second-year students. Question 5 was a calculation problem: "A 2kg object slides down an inclined plane with an angle of 30° from rest. The coefficient of kinetic friction is 0.2, and the length of the inclined plane is 3m. Find the velocity of the object when it reaches the bottom." The problem was accompanied by a standard diagram (a schematic diagram of the inclined plane and a force analysis coordinate system). All students' answer sheets had the same question and diagram template printed on them. Students were required to derive the formula and perform numerical calculations in the blank area below.
[0024] Because the teaching and research group uniformly adjusted the scoring rules after the exam (originally, only the final result was scored, but now it is required that key steps such as "force analysis - writing Newton's second law equation - application of kinematic formulas" be scored step by step), teachers need to re-grade the answers of this question for a total of 180 students in 6 classes across the entire grade.
[0025] (a) Receive 180 scanned student assignment images (PDF or image format) and locate the answer area for question 5 in each assignment using OCR and layout analysis technology.
[0026] (b) Extract the complete question text and illustrations from the first assignment, use OCR to recognize the text content, and use an image understanding model to convert the inclined plane diagram into vectorized graphic codes (such as representing semantic information such as angles, friction direction, and coordinate axes) to generate standard question data containing textual and graphic semantics, and cache it on the server for subsequent use.
[0027] (c) For each student assignment image, a template matching algorithm is used to identify and crop out the student's answer area for question 5; the printed question stem and coordinate grid background are removed by differential image technology (comparing the original printed template with the actual answer image), and only the handwritten handwriting in the student's answer area (including formulas, calculation processes, numbers, arrows, etc.) is retained to generate 180 clean images of the student's answer traces.
[0028] (d) If the total number of students exceeds a preset threshold (e.g., 100 students), activate the dynamic batching mechanism: divide the 180 students into 3 batches (60 students per batch). Within each batch, scale 60 images of students' answer traces to a fixed width, arrange them horizontally, maintain consistent white space between adjacent images, add light gray vertical lines to separate them, label them with student ID numbers, and stitch them together into a uniformly sized aggregated answer image.
[0029] (e) Input the standard question stem data and each aggregated answer image into the trained multimodal grading model: Image branching encoding is used to aggregate response images and identify the handwritten content and spatial layout of each image. Text branch analysis reveals the semantics of the question stem and the scoring criteria; The cross-modal attention module aligns each student's answer with the question requirements, determines whether the force equation is correctly established, whether parameters are reasonably substituted, and whether units are omitted, and scores according to the new scoring criteria and generates personalized feedback (e.g., "Work done without considering friction, deduct 2 points").
[0030] (f) After grading, the output results are parsed, and the scores and comments of each student are restored in the original order. The results are automatically updated to the corresponding homework records in the school's teaching management system, and a class error statistics report is generated.
[0031] If the same or similar questions appear again in the future (such as exercises in the same textbook chapter), the cached standard question stem and its embedded representation can be directly called without re-parsing, further improving the response speed.
[0032] 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 test item batch re-batching method, characterized by, Includes the following steps: S1. Receive multiple student homework images to be re-graded, and locate the answer area of the target re-graded question in the student homework image. The answer area contains the question stem and the student's handwritten answer. S2. Extract the complete question stem content of the target re-graded question from any student homework image received in step S1, generate structured question stem data through optical character recognition (OCR) technology and / or image understanding technology, and mark it as the standard question stem data of the target re-graded question; S3. For each student homework image received in step S1, crop out the student answer area corresponding to the target re-graded question, remove the question stem part contained in the student answer area, and keep only the handwritten answer to form a clean image of student answer traces. S4. All student answer trace images are stitched together at the image level according to the preset layout rules and preset stitching order to generate an aggregated answer image containing all student answer traces. S5. Input the standard question data obtained in step S2 and the aggregated answer image obtained in step S4 into a trained multimodal grading model. Use the multimodal grading model to simultaneously identify the content of each student's answer traces and score and generate comments for each student's answer traces. S6. Analyze the output of the multimodal grading model, restore the scores and comments of each student's answer trace one by one according to the splicing order of step S4, and update the corresponding original homework grading records.
2. The method of claim 1, wherein, In step S4, the preset layout rule is as follows: after scaling each student's answer trace image to a fixed width, they are arranged horizontally, with consistent white space between adjacent student answer trace images, and visual dividing lines or numbered labels are added to distinguish different student answer trace image areas.
3. The method of claim 1, wherein, In step S1, when the number of student homework images to be re-batched exceeds a preset threshold, the total number of student homework images is first divided into several subsets, and each subset is executed independently in steps S2-S6.
4. The method of claim 1, wherein, The multimodal grading model includes image branching, text branching, and a cross-modal attention module; Image branching is used to encode the converged answer images and extract the spatial location and writing content of each student's answer traces; Text branches are used to encode the semantic information of the standard question stem data; The cross-modal attention module is used to fuse the semantic information of the standard question stem data with the content of the student's answer trace image to determine the correctness and quality level of the student's answer.
5. The method of claim 1, wherein, In step S3, the specific process of removing the question stem portion contained in the student's answer area is as follows: use template matching and differential image technology to remove the printed content in the student's answer area, and only retain the handwritten content in the student's answer area.
6. The method of claim 1, wherein, It also includes the following steps: persistently storing the standard question stem data and its embedded representation extracted in step S2, so that the standard question stem data can be directly called when the corresponding questions need to be re-graded later.
7. A computer readable storage medium characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.
8. A computer device, comprising: A computer program product comprising a computer readable medium, the computer readable medium having stored thereon the computer program of claim 7. A computer program product comprising a computer readable medium, the computer readable medium having stored thereon the computer program of claim 7. A computer program product comprising a computer readable medium, the computer readable medium having stored thereon the computer program of claim 7. A computer program product comprising a computer readable medium, the computer readable medium having stored thereon