Test paper analysis method and device based on correction traces, storage medium and computer device
By acquiring the coordinates of marking traces through an object detection model and generating an intermediate state inference graph, and using a large visual language model for semantic mapping, the problem of attribution of traces in irregular spatial locations is solved, thus realizing the reliability of digital test paper analysis and the generation of personalized learning paths.
Patent Information
- Application Number
- CN202610725120.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2046-05-25
AI Technical Summary
Existing technologies cannot accurately map the marking marks in irregular spatial locations, resulting in insufficient reliability of digital test paper analysis.
The coordinates of correction traces are obtained by using an object detection model, an intermediate state reasoning graph is generated, and semantic mapping is performed through a large visual language model. The relationship between a unique index and the question number is established, and a learning path is generated by combining multiple attribution and attribution reversal.
It improves the accuracy of attribution of marking traces, enhances the reliability of digital test paper analysis, provides a solid data foundation for personalized learning, and avoids the need to modify the layout of the original test paper.
Smart Images

Figure CN122416472B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, storage medium, and computer equipment for analyzing test papers based on marking traces. Background Technology
[0002] With the advancement of educational informatization, digital analysis of graded test papers has become a crucial aspect of personalized learning. A key aspect of test paper analysis is accurately mapping the teacher's markings to each question. However, in real-world teaching, teachers' marking habits are highly arbitrary; for example, large checkmarks may span multiple question boundaries, scores are often written in the margins, and deductions are indicated by lines pointing to specific locations. These unstructured markings pose a significant challenge to automatic attribution mapping.
[0003] To address this, a relatively direct approach is to determine the attribution by detecting the overlap or distance between the coordinates of the marking marks and the question area. However, this method relies on the assumption that the marks are within the question area, making it difficult to handle irregular situations such as writing over lines, across areas, or on page margins, resulting in a high misclassification rate and frequent errors in subsequent score statistics and incorrect question analysis. In contrast, another approach directly ignores the teacher's existing marking marks and instead identifies the student's answer and re-marks the question. While this avoids the attribution mapping problem, it wastes computing power, has limited handwriting recognition accuracy, and is prone to conflicts between AI scoring and teacher scoring.
[0004] In summary, the current inability to accurately map and assign marking marks in irregular spatial locations limits the reliability of digital test paper analysis. Summary of the Invention
[0005] The purpose of this application is to at least address one of the aforementioned technical deficiencies, particularly the current inability to accurately map and assign marking marks in irregular spatial locations, which restricts the reliability of digital test paper analysis.
[0006] Firstly, this application provides a test paper analysis method based on marking traces, the method including: The marking marks on the graded test paper images were detected using an object detection model, and a list of marking mark coordinates was obtained. Create a copy of the graded test paper image, and draw a visual identifier for each grade mark on the copy image based on the list of grade mark coordinates, and label it with a unique index to generate an intermediate state inference graph; Based on the intermediate state inference graph and the number and content of each question in the image of the graded test paper, the visual language big model is used to establish a semantic mapping relationship between the unique index and the number through visual question answering, so as to obtain the grading traces corresponding to each question. Based on the marking history for each question, the score for that question is calculated. When a question is determined to be incorrect, a corresponding learning path is generated based on the question's content, score, marking history, difficulty, and knowledge points, through multiple attribution and attribution reversal.
[0007] In one embodiment, the steps of establishing a semantic mapping relationship between a unique index and a number in the intermediate state inference graph and the number and content of each question in the graded test paper image, using a large visual language model and a visual question-and-answer method, to obtain the grading traces corresponding to each question, include: Based on the images of the graded test papers, the visual language model is used to analyze the test paper layout structure, obtain the semantic information of the layout, as well as the number and content of each question; Generate visual question-and-answer prompts based on the semantic information of the page layout; By using a large visual language model combined with visual question-and-answer prompts, intermediate-state reasoning graphs, and the number and content of each question, spatial semantic attribution reasoning is performed on the correction traces corresponding to each unique index in the intermediate-state reasoning graph to obtain the correction traces corresponding to each question.
[0008] In one embodiment, the step of generating visual question-and-answer prompts based on layout semantic information includes: Partition detection is performed based on page layout semantic information to determine each layout partition and its partition type; Based on the partition type of each layout partition, obtain the corresponding attribution inference template and generate the template parameters for each attribution inference template; Based on each typesetting partition and its corresponding template parameters, analyze the spatial relationship between adjacent typesetting partitions and generate boundary handover rules; Based on the boundary handover rules, each typesetting partition and its corresponding template parameters, potential attribution conflict conditions between different attribution inference templates are identified, and arbitration rules are generated. Natural language conversion is performed on the boundary handover rules, arbitration rules, each layout partition and its corresponding template parameters to obtain visual question-and-answer prompts.
[0009] In one embodiment, the step of calculating the score for each question based on the grading marks corresponding to that question includes: For each question, identify the symbol type of the correction marks to determine the correction symbols; When the correction symbol includes multiple correction symbol types, the target correction symbol is determined based on the semantic association and priority relationship between the various correction symbol types; The score is determined based on the marking semantics corresponding to each target marking symbol, combined with the content of the question.
[0010] In one embodiment, the steps for determining the score based on the marking semantics corresponding to each target marking symbol and in conjunction with the content of the question include: Assign semantic contribution to each target marking symbol based on the content of the question; According to the marking semantics corresponding to each target marking symbol, obtain the score mapping value of each target marking symbol; Based on the semantic contribution and the score mapping value, calculate the local semantic score of each target correction symbol; The score for a question is obtained by semantically fusing the local semantic scores associated with the question.
[0011] In one embodiment, based on the content, score, grading history, difficulty, and knowledge points of the question, the steps to generate the corresponding learning path through multiple attribution and attribution refutation include: A multidimensional attribution analysis was performed on the content, score, marking history, difficulty, and knowledge points of the question to generate multiple candidate attribution results. By using the scores of questions at different difficulty levels, we can refute each candidate attribution result and establish an attribution-refutation relationship. The attribution relationship is used to correct multiple candidate attribution results, determine the target attribution result, and generate the corresponding learning path based on the target attribution result.
[0012] In one embodiment, the step of using scores from questions of different difficulty levels to refute each candidate attribution result and establishing an attribution-refutation relationship includes: The related questions in the graded test paper images that belong to the same knowledge point as this question are divided into at least two levels according to their difficulty level. Calculate the standard score pattern vector corresponding to each candidate attribution result, and calculate the actual score vector of the associated questions corresponding to each difficulty coefficient; The actual score vector is matched with each standard score pattern vector, and the attribution proof relationship is determined based on the matching results.
[0013] Secondly, this application provides a test paper analysis device based on marking traces, the device comprising: The marking trace detection module is used to detect marking traces in marked test paper images using a target detection model and obtain a list of marking trace coordinates; The intermediate state inference graph generation module is used to create a copy of the graded test paper image, and draw a visual identifier for each grade mark on the copy image and mark it with a unique index according to the list of grade mark coordinates, thereby generating an intermediate state inference graph. The marking trace mapping module is used to establish a semantic mapping relationship between a unique index and a number based on the intermediate state inference graph and the number and content of each question in the marked test paper image. It utilizes a large visual language model and a visual question-and-answer method to obtain the marking trace corresponding to each question. The learning path generation module is used to calculate the score of each question based on the marking traces. When a question is determined to be wrong, it generates a corresponding learning path based on the question's content, score, marking traces, difficulty, and knowledge points, through multiple attribution and attribution reversal.
[0014] Thirdly, this application provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of any of the test paper analysis methods based on grading traces in the above embodiments.
[0015] Fourthly, this application provides a computer device, including: one or more processors, and a memory; The memory stores computer-readable instructions, which, when executed by one or more processors, perform the steps of any of the test paper analysis methods based on marking traces in the above embodiments.
[0016] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: The test paper analysis method, apparatus, storage medium, and computer equipment provided in this application, based on marking traces, do not directly perform spatial matching after obtaining the coordinates of marking traces using an object detection model. Instead, it draws a visual identifier and assigns a unique index to each marking trace on a copy of the marked test paper image, generating an intermediate inference graph that can be used for reasoning by a large visual language model. Subsequently, the large visual language model synchronously reads the identifiers, indices, and the numbers and contents of each question in the graph using a visual question-and-answer approach, establishing a semantic mapping relationship between each unique index and the corresponding question number. This process completely eliminates the dependence on the spatial overlap between marking traces and question areas and can accurately determine the marking trace corresponding to each question. Based on this accurate attribution result, the score for each question is further calculated, and for incorrect questions, personalized learning paths are generated through multiple attributions and attribution reversal, combining information such as question content, difficulty, and knowledge points. This significantly improves the accuracy of marking trace attribution under complex layouts, enhances the overall reliability of digital test paper analysis, provides a solid data foundation for score statistics, incorrect question diagnosis, and personalized learning recommendations, and avoids any modification requirements to the original test paper layout. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating the test paper analysis method based on marking traces provided in this application embodiment; Figure 2 A schematic diagram of the test paper analysis device based on marking traces provided in an embodiment of this application; Figure 3 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] This application provides a method for analyzing exam papers based on grading records. The following embodiments illustrate this method using a computer device as an example. It is understood that the computer device can be any device with data processing capabilities, including but not limited to a single server and server clusters. Figure 1 As shown, the method may include the following steps: S101: Use an object detection model to detect marking marks on the marked test paper image and obtain a list of marking mark coordinates.
[0021] Among them, the object detection model is an artificial intelligence model that has been trained to locate and identify specific categories of objects in an image, and its output usually includes the location information of the object. A graded exam paper image refers to a digital image of an exam paper containing the teacher's handwriting, acquired through devices such as scanners or cameras. Grading marks refer to various markings left by the teacher during the grading process, including checkmarks, crosses, half-checks, scores, deductions, underlines, wavy lines, circles, question marks, and connecting lines pointing to specific deduction locations. A grading mark coordinate list is an ordered set that records the spatial position of each detected grading mark in the form of the coordinates of the vertices or center point of its bounding rectangle.
[0022] In practice, the first step is to acquire an image of the graded exam paper. This image can be a color image captured by a regular flatbed scanner at 300 dpi resolution, or a clear image taken by a document scanner or mobile phone camera under natural light conditions. To ensure the target detection model functions effectively, necessary preprocessing can be performed on the original image. For example, the image size can be uniformly scaled to the dimensions required by the model input, such as adjusting it to 640 pixels by 640 pixels while maintaining the original aspect ratio and filling any insufficient areas with white, or proportional scaling and cropping can be used. For images with uneven lighting or heavy shadows, histogram equalization or adaptive thresholding can be performed first to enhance the contrast between the grading marks and the exam paper background, making subsequent detection more stable.
[0023] Choose a suitable target detection model architecture for detecting marking errors, such as a single-stage detection model from the YOLO series or a two-stage detection model from the Faster R-CNN series. During the model training phase, a specialized labeled dataset needs to be constructed, collecting a large number of images of marked exam papers from real teaching scenarios. Humans should meticulously annotate various marking errors in the images, including the category of the error and its precise bounding box. During training, data augmentation techniques such as random rotation, brightness adjustment, and simulating the erosion or dilation of handwriting can be used to enable the model to adapt to different pen colors used by teachers, such as red, blue, and green, as well as different pen thicknesses and writing pressures. After training, the images of marked exam papers to be detected are input into the target detection model. The model extracts image features through a convolutional neural network and predicts regions where marking errors may appear on feature maps at different scales. Finally, it outputs several candidate boxes, each associated with a class confidence score.
[0024] A threshold is set for the confidence score based on the actual application scenario, for example, a threshold of 0.5. Only detection results with a confidence score higher than this threshold are retained to filter out false detections caused by paper creases, stains, or student notes. For cases where multiple overlapping candidate boxes may be generated for the same correction mark, a non-maximum suppression algorithm is used to remove duplicates, retaining the box with the highest confidence score. Each valid detection box obtained corresponds to a specific correction mark. The horizontal and vertical coordinates of the top-left and bottom-right corners in the image coordinate system are extracted from the location information of the detection box, and these coordinate values, along with the mark category, are stored in a correction mark coordinate list. This list can be organized using an array or linked list data structure. Each element in the list is a structure containing the mark number, mark category, and corresponding rectangular coordinate parameters. Through this processing, the discrete and irregular visual correction information in the original image is transformed into structured spatial data, providing a clear localization basis for subsequent mark attribution inference.
[0025] In one example, after acquiring the image of the graded exam paper uploaded by the student, denoising and enhancement processes are performed first. Then, the YOLO model is called to detect grading marks and output a list of mark coordinates. For optimization of small targets, an improved YOLO model is used, capable of detecting four types of targets: checkmarks, crosses, half-checkmarks, and handwritten scores. Specific improvements include increasing small and clear target samples through data augmentation and generation methods, with a focus on copying and pasting small targets. At the structural level, the CBAM attention mechanism or RFCBAMConv is introduced into the backbone and neck network of YOLO11 to enhance the C3k2 module. A P2 small target detection layer is also added, and the SPPF module is replaced with the DFPC module in the feature fusion part, using SPD-Conv to improve downsampling.
[0026] It's important to note that using an object detection model to locate markings in the image of graded exam papers and generate a coordinate list is crucial because the markings in the original image are diverse in shape and arbitrary in location, making it difficult to efficiently and accurately obtain their spatial positions using manual methods or simple rules. Automating this process allows for the acquisition of structured location information for all markings at once, avoiding the tedious and time-consuming manual selection and marking of each marking. With a clear list of marking coordinates, subsequent processing avoids repeatedly scanning the entire image or relying on subjective judgment; instead, it allows for direct attribution analysis and calculation based on the coordinate data, thereby improving the determinism and efficiency of the overall processing flow. Furthermore, the detection model-based method can reliably output the precise locations of different markings, providing a reliable basis for reducing attribution errors caused by ambiguous marking locations.
[0027] S102: Create a copy of the graded test paper image, and draw a visual identifier for each grade mark on the copy image and label it with a unique index according to the list of grade mark coordinates, generating an intermediate state inference graph.
[0028] The "copy image" refers to a complete copy of the original graded exam paper image, identical in pixel content to the original but stored independently. All subsequent drawing operations are performed on the copy image to avoid damaging the original. Visual identifiers are graphic symbols drawn to help observers clearly distinguish different marking marks, such as colored rectangles, circular markers, or pointing arrows. A unique index assigns a unique, non-repeating number to each marking mark, used to uniquely identify it during subsequent reasoning. The intermediate-state reasoning diagram is the image generated after the above drawing and annotation process. This image retains the original exam paper's question content, as well as the visual identifier and numerical index corresponding to each marking mark.
[0029] After obtaining the list of coordinates for the marking marks, the marked exam paper image is first loaded from memory. A copy function from the image processing library is then called to generate a complete copy of the image. This copy image has the same width, height, color channels, and pixel values as the original image. All subsequent visualization operations are performed on this copy. The purpose of this is to ensure that the original image data is not altered by any drawing operations, facilitating the regeneration of the intermediate inference graph or regression to the original state if necessary.
[0030] Next, based on each item in the list of marking marks' coordinates, a visual identifier is drawn for each mark on the copy image. Specifically, the coordinates of the bounding rectangle of a mark can be obtained from the list, such as the x and y coordinates of the top-left and bottom-right corners of the rectangle. Then, a drawing function is called to draw a brightly colored, semi-transparent filled box at that location, such as a red or blue rectangle, with a width of 2 to 3 pixels to ensure it is prominent enough in the image without obscuring the original text on the exam paper. This same drawing operation is performed for each mark in the coordinate list until all marks are marked with visual boxes.
[0031] Each mark with a visual bounding box is assigned a unique index, which is achieved by writing an Arabic numeral near each visual bounding box. The starting value of the number can be set to 1, and then incremented sequentially according to the order in which the marks were detected or their order from top to bottom and left to right in the image. During the drawing process, the center point coordinates or top-left corner coordinates of each visual bounding box are first determined, and then offset by several pixels as the starting point for the text. The text drawing function in the image library is called to write the index number with an appropriate font size and contrast color, such as white numbers with black shading. It is necessary to ensure that each index number is visually clearly associated with its corresponding visual bounding box, and that the indices of different marks do not overlap with each other or significantly overlap with the original text content of the exam paper. After all the drawing is completed, the current copy image has become an intermediate inference graph carrying all the visual markers and unique numerical indices of the marking marks. This image is stored in memory or saved as a temporary file for further semantic understanding and inference by the subsequent large-scale visual language model.
[0032] It's important to note that by creating a copy of the image and drawing visual identifiers and unique indexes on it, the data integrity of the original image is fully preserved. All drawing operations do not cause irreversible modifications to the original image, facilitating repeated processing or recovery. Drawing prominent visual identifiers for each correction mark transforms the originally discrete and difficult-to-observe coordinate information into intuitive graphic elements, enabling subsequent visual language models to interpret the image like a human. Figure 1This allows for easy identification of the location and extent of each trace. The unique index assigns a clear identification number to each trace, eliminating potential confusion between different traces. When establishing the correspondence between traces and questions, only this number needs to be referenced, eliminating the need to repeatedly describe the spatial coordinates of the traces. The resulting intermediate-state reasoning graph integrates the original coordinate data, visual features, and semantic identifiers onto a single image, providing a structured and easily understood input format for efficient visual question-answering reasoning in large-scale visual language models. This lays a solid image foundation for accurately establishing the attribution relationship between grading traces and test questions.
[0033] S103: Based on the intermediate state inference graph and the number and content of each question in the image of the graded test paper, use the visual language big model to establish a semantic mapping relationship between the unique index and the number through visual question answering, and obtain the grading traces corresponding to each question.
[0034] The question number and content in the graded exam paper image refer to the question number (e.g., first question, second question) and the question text or stem information obtained from the original exam paper image through detection or recognition. The Visual Language Model is an artificial intelligence model capable of simultaneously understanding both visual image information and semantic text information. This model can receive mixed image and text input and output natural language answers. Visual question answering refers to the process of inputting an image and a question posed based on that image into the model, which then answers the question based on the image content. Semantic mapping refers to establishing a correspondence between the unique index representing the grading mark and the question number, clearly defining which mark belongs to which question.
[0035] After obtaining the intermediate inference graph, it needs to be fed into the visual language model along with the question information from the original exam paper for inference. First, the question number and content of each question are extracted from the graded exam paper image. This step can be accomplished using a separate question detection model or optical character recognition technology, such as detecting all question numbers appearing in the exam paper with commas or parentheses, and extracting the corresponding question stem text. The extracted question numbers and content are then organized into a text description, formatted as "What is the content of Question 1?", "What is the content of Question 2?", and so on, ensuring the model can clearly understand each question number and its corresponding text content.
[0036] Next, prepare the input for the visual language model. The input consists of two parts. The first part is an intermediate inference graph, which is passed to the model as an image file path or image binary data. The second part is a carefully crafted visual question-and-answer prompt text. This text requires the model to observe visual identifiers in the image and their corresponding unique indices, while simultaneously reading the given question numbers and content, ultimately finding the question number to which each unique index belongs. For example, the prompt text could be written as: "Please observe the marking marks with yellow numbers in the image." Combining the exam paper layout logic (from left to right, from top to bottom), analyze which question number each yellow box and its unique index semantically belongs to. Note: The teacher's score may be written in the blank space of the question or in the margin; please output a mapping dictionary.
[0037] The intermediate inference graph and the prompt text are fed into a large-scale visual-language model. The model first encodes the image, identifying all visual boxes with numerical labels and the original question numbers on the test paper. Then, it combines the question numbers and text provided in the prompt with a cross-modal attention mechanism to associate the visual trace locations with the semantic meaning of the questions in the text. The model might infer that a checkmark box near the first question area, corresponding to index 1, should belong to question one, while a cross box drawn on the page margin but connected to the third question, corresponding to index 5, should belong to question three. The model outputs a natural language answer, such as index 1 corresponding to question one, index 2 corresponding to question one, index 3 corresponding to question two, and so on.
[0038] Finally, the model's output is analyzed to extract the correspondence between each unique index and the question number, resulting in a set of correction traces for each question. In practice, the questions can be grouped by question number, collecting all unique indices belonging to the same question. Then, based on the index, the specific category and location information of each trace can be obtained from the original list of correction trace coordinates. This completes the transformation from semantic reasoning in the large visual language model to structured data, providing accurate trace evidence for subsequent score calculations for each question.
[0039] It's important to note that by utilizing a large-scale visual language model to establish a semantic mapping between unique indices and question numbers through visual question answering, the reliance on the spatial coordinates of correction marks and the overlap of question areas is completely eliminated. This approach can accurately handle irregular situations such as marks overlapping lines, crossing areas, or being written on page margins. This method transforms the problem of mark attribution into a joint understanding problem of images and text, fully leveraging the advantages of large-scale models in semantic reasoning, rather than simply mechanically calculating geometric overlap. Compared to methods based directly on coordinate matching, visual question answering significantly reduces the requirements for the accuracy of detection boxes. Even if the coordinates of the detected marks are slightly off, the model can still make correct judgments based on the positional relationship of visual identifiers and the semantic information of the question content. By establishing a clear mapping from unique indices to question numbers, it is ultimately possible to accurately determine which correction marks correspond to each question, providing a reliable data foundation for subsequent score statistics and error analysis.
[0040] S104: Calculate the score for each question based on the marking marks. When a question is determined to be wrong, generate a corresponding learning path based on the question's content, score, marking marks, difficulty, and knowledge points through multiple attributions and attribution reversal.
[0041] The scoring system involves assigning a numerical value to a question based on the type and location of markings. For example, a checkmark indicates full marks, a cross indicates zero marks, a half-check indicates partial marks, and handwritten marks are directly extracted as the score. Incorrect answers are those where the score does not meet the full mark requirement, which can be obtained from a pre-defined question score database or inferred from the type of markings. Multiple attribution involves analyzing the possible reasons for student errors from multiple dimensions, including question content, score, markings, question difficulty, and relevant knowledge points, rather than solely relying on the correctness of the answer. Attribution by contradiction involves first proposing a hypothetical reason for the error, then verifying the hypothesis based on the specific location of deductions in the markings or the characteristics of the student's answer, thus selecting the most reliable attribution conclusion. The learning path refers to a series of learning activity suggestions generated to address the knowledge gaps revealed by the incorrect answer, including relearning basic concepts, targeted practice questions, and subsequent consolidation tests.
[0042] After obtaining the set of marking marks for each question, the first step is to calculate the score for that question. For each question, all its corresponding marking marks are processed one by one. If the mark type is a checkmark, the question is considered to have a full score. The full score can be pre-stored in a mapping table from question number to full score, or it can be dynamically calculated based on the total score of the exam and the number of questions. If the mark type is a cross, the score is considered to be zero. If the mark type is half-correct, it is usually awarded as half of the full score or a specific ratio, for example, a question with a full score of 2 points is awarded 1 point for a half-correct answer. If handwritten score marks are detected, the optical character recognition model is directly called to extract the number as the score for that question. Handwritten scores are often written near the margin of the page and can cover the final score given by the teacher.
[0043] When a question is determined to be incorrect (i.e., the score is lower than the full score), further analysis of the reasons for the loss and generation of a learning path are needed. First, obtain the difficulty level and related knowledge point of the question from the question bank system or test paper structure information. Difficulty can be divided into three levels: easy, medium, and hard. Knowledge points include, for example, addition and subtraction of fractions, and the quadratic formula for solving quadratic equations. Simultaneously, collect the original question stem, the student's answer (if identifiable), and specific marking details, such as whether the cross was placed on the final result or an intermediate step, and which calculation step the circled mark next to a partial answer indicates.
[0044] Next, perform multiple attribution analysis. Based on the question's content, determine the core competency being tested. If the question is a calculation problem and the markings show an incorrect answer but some intermediate steps are correct, it might be attributed to careless calculation or poor formula memorization. If the question is an application problem and the markings show incorrect units or missing sentences, it might be attributed to insufficient training in proper answer format. Considering the relevant knowledge point, if errors occurred in previous questions, it's attributed to a lack of mastery of that knowledge point rather than accidental mistakes. Also consider the question's difficulty; errors on difficult questions might simply indicate a temporary lack of ability, while errors on easy questions are more likely due to a weak foundation. Multiple attribution will generate multiple possible hypotheses regarding the causes of failure.
[0045] Then, we perform attribution by contradiction. For each hypothetical cause of failure, we look in the markings to see if there is evidence supporting or disproving that hypothesis. For example, if the failure was due to careless calculation, the markings should show the correct solution steps but the final answer is wrong, or there should be teacher markings indicating a calculation error. If the actual markings show the entire question crossed out with no points awarded for each step, then the hypothesis is proven false, and the real cause of failure might be complete ignorance. After this process of attribution by contradiction, we retain the verified attribution conclusions as the final analysis result.
[0046] Finally, a corresponding learning path is generated based on the attribution conclusion. If the attribution is due to a lack of mastery of a certain knowledge point, the first step of the learning path is to recommend watching an explanatory video or reading the corresponding chapter in the textbook for that knowledge point. The second step is to provide five basic practice questions for that knowledge point. The third step is to require students to complete a similar type of question of comparable difficulty as a test. If the attribution is due to careless calculation, the learning path focuses on timed practice and cultivating the habit of checking calculations. For example, students are required to complete 10 simple calculation problems consecutively and check their work, writing out the verification process for each problem. If the attribution is due to a problem with answer format, the learning path will include a display of a standard answer template and practice exercises. The generated learning path can be saved as structured data, including learning objectives, a list of specific activities, suggested completion time, and expected level of mastery, and is ultimately pushed to students or teachers for personalized tutoring.
[0047] It's important to note that calculating scores directly based on the marking history for each question fully utilizes the teacher's assessments, avoiding the wasted computational effort of re-marking and potential conflicts with teacher grading. When a question is marked incorrect, multiple attributions are used to analyze the reasons for the loss from multiple perspectives: question content, score, marking history, difficulty, and knowledge points. This approach is more comprehensive and in-depth than simply drawing conclusions based on the wrong mark, distinguishing between incompetence, carelessness, or grammatical errors. Introducing attribution by contradiction to verify each hypothesis effectively eliminates unreasonable attributions, retaining the most reliable reasons for the loss and improving the accuracy of the attribution results. The learning path generated based on accurate attribution is highly targeted, moving beyond general recommendations to include specific learning content and practice strategies tailored to the specific areas where points were lost. This helps students truly address their weaknesses and improve personalized learning outcomes.
[0048] In the above embodiments, after obtaining the coordinates of the correction marks using the object detection model, spatial matching is not performed directly. Instead, a visual identifier is drawn on a copy of the corrected test paper image, and a unique index is marked for each correction mark, generating an intermediate inference graph that can be used for reasoning by the visual language model. Subsequently, the visual language model synchronously reads the identifiers, indices, and the numbers and contents of each question in the graph using a visual question-and-answer approach. A semantic mapping relationship is established between each unique index and the corresponding question number. This process completely eliminates the dependence on the spatial overlap between the correction marks and the question areas and can accurately determine the correction mark corresponding to each question. Based on this accurate attribution result, the score for each question is further calculated, and for incorrect questions, combined with information such as question content, difficulty, and knowledge points, a personalized learning path is generated through multiple attributions and attribution reversal. This significantly improves the accuracy of attribution of correction marks under complex layouts, enhances the overall reliability of digital test paper analysis, provides a solid data foundation for score statistics, incorrect question diagnosis, and personalized learning recommendations, and avoids any modification requirements to the original test paper layout.
[0049] In one embodiment, the steps of establishing a semantic mapping relationship between a unique index and a number in the intermediate state inference graph and the number and content of each question in the graded test paper image, using a large visual language model and a visual question-and-answer method, to obtain the grading traces corresponding to each question, include: Based on the images of the graded test papers, the visual language model is used to analyze the test paper layout structure, obtain the semantic information of the layout, as well as the number and content of each question; Generate visual question-and-answer prompts based on the semantic information of the page layout; By using a large visual language model combined with visual question-and-answer prompts, intermediate-state reasoning graphs, and the number and content of each question, spatial semantic attribution reasoning is performed on the correction traces corresponding to each unique index in the intermediate-state reasoning graph to obtain the correction traces corresponding to each question.
[0050] The test paper layout analysis involves using a visual language model to identify and divide the layout areas in the test paper image, such as distinguishing the question header area, question area, score area, and margin area, and understanding the spatial relationships and semantic roles between these areas. Layout semantic information refers to the structured description obtained after analysis of the categories, positions, and logical relationships of each area of the test paper. For example, which area belongs to the stem of the first question, which area belongs to the answer area of the second question, and which question the score is near in the margin. Visual question-answering prompts are natural language instructions designed to guide the visual language model in performing specific reasoning tasks. These instructions combine layout semantic information to clarify the angle of the question and the expected output format. Spatial semantic attribution reasoning refers to the process by which the visual language model, based on the spatial position of visual identifiers in the image, the semantics of each area of the layout, and the textual information of the question number, comprehensively determines which question each unique index represents as a marking mark should belong to.
[0051] After obtaining the image of the graded exam paper, the visual language model is first used to analyze the layout structure of the entire paper. Specifically, the original exam paper image is directly input into the visual language model, accompanied by a layout analysis prompt, such as asking the model to identify the functional areas in the image, including the question title area, the question stem area, the student answer area, the teacher's annotation area, and the score writing area, outputting the location description and category label for each area. By analyzing lines, white space, font size, and layout patterns in the image, the visual language model can automatically divide the exam paper into different semantic blocks. For example, the model can identify that the top of the exam paper contains the exam name and basic information, then sequentially identify that the question stem of the first question occupies the area from pixel coordinates 100 to 300, the answer area of the first question occupies the area from 300 to 500, the teacher's markings for the first question appear in the area from 500 to 550, and so on for the second question. The model also outputs the number and content of each question, extracting the question number and text from the question stem area to form a structured list of what content corresponds to question one, question two, etc. The layout semantic information further describes the adjacency and top-bottom correspondence between these areas, such as which grading area is closest to the question stem or answer area of which question.
[0052] Next, visual question-and-answer prompts are generated based on the semantic information of the exam layout. The purpose of this step is to construct a highly customized question statement tailored to the characteristics of the current exam layout, enabling the visual language model to fully utilize the results of layout analysis during subsequent attribution inference. Specifically, the semantic information of the layout is converted into natural language descriptions and then embedded into the question-and-answer template. For example, if layout analysis reveals a separate area for writing scores in the margins, and this area is horizontally aligned with the answer area for question three, the generated prompt could be: "Given that in the exam layout, there are handwritten scores in the margin areas, and this area is directly opposite the answer area for question three. Please determine which question each number corresponds to based on the colored boxes and numbers in the image." If layout analysis finds that a checkmark for one question crosses the boundaries of two questions, the prompt can also explicitly state this, allowing the model to handle cross-regional marks. The generated prompt typically includes a unique index range marked in the input image, a list of known question numbers, a description of key features of the layout, and the desired output format, such as outputting line by line in the form of index number corresponding to question number.
[0053] Finally, spatial semantic attribution reasoning is performed. The intermediate-state reasoning graph, the extracted question numbers and content, and the visual question-and-answer prompts generated based on layout semantic information are input into the visual language model. The model first reads the layout description and task requirements from the prompts, then observes various visual identifiers, unique index numbers, and the original text and question numbers on the intermediate-state reasoning graph. It then combines this with the specific text content of each question given in the prompts to perform cross-modal comprehensive reasoning. For example, if the model sees a colored box with index 3 next to a handwritten fraction number on the page margin, and the layout semantic information indicates that this margin area corresponds to question 3, and question 3 calculates the area of a circle, the model will assign index 3 to question 3. Similarly, if the box with index 5 is a large checkmark that covers the answer areas of questions 2 and 3, but the layout semantic information indicates a clear dividing line between the answer areas of questions 2 and 3, and the center of the checkmark is closer to question 2, the model will, after reasoning, assign index 5 to question 2. After the model outputs the question number corresponding to each unique index, parsing the output will yield a list of grading marks for each question, thus completing the transformation from unordered marks to ordered classification.
[0054] For example, in the original state, questions 15 and 16 on the exam paper are closely spaced, with a large checkmark drawn by the teacher between them. A handwritten deduction of 5 points is written in the blank space to the right of question 15. Traditional geometric rule algorithms cannot understand these visual semantics, easily leading to misjudgments. To address this, an intermediate-state inference graph is constructed. Instead of pure geometric calculations, a yellow box is drawn around the checkmark, labeled ID 1, and around the deduction of 5 points, labeled ID 2. After inputting the intermediate-state inference graph into the large visual model, the model infers based on visual semantic analysis: although ID 1 obscures the question number of question 15, its visual focus and shape affirm the answer area of question 16, thus it belongs to question 16; ID 2 represents the deduction of points for question 15. Finally, a dictionary is accurately output, with key 1 corresponding to question number 16 and key 2 corresponding to question number 15, thus completely overcoming the spatial semantic ambiguity problem between unstructured handwriting and structured questions.
[0055] It's important to note that by first using a large visual language model to analyze the exam paper's layout, prior knowledge about the functional semantics and spatial relationships of each area can be obtained. This transforms subsequent attribution inference from blind coordinate comparison into a framework guided by the layout. Generating targeted visual question-and-answer prompts based on the layout's semantic information explicitly injects the contextual knowledge obtained from the layout analysis into the question-and-answer process, guiding the model to focus on specific spatial relationships such as margin alignment or cross-area coverage, thereby improving the accuracy of inference. Combining layout semantic information, intermediate-state inference diagrams, and question number content for spatial semantic attribution inference fully integrates layout structure clues, visual identifier clues, and textual content clues, making it more robust than relying on any single method alone. This approach is particularly effective in handling complex layout situations such as checkmarks spanning multiple questions, scores written on margins with connecting lines, and deduction points located outside the question area. Because the layout semantic information pre-tells which areas belong to which questions, the model can make judgments consistent with human grading common sense, ultimately obtaining accurate grading marks for each question.
[0056] In one embodiment, the step of generating visual question-and-answer prompts based on layout semantic information includes: Partition detection is performed based on page layout semantic information to determine each layout partition and its partition type; Based on the partition type of each layout partition, obtain the corresponding attribution inference template and generate the template parameters for each attribution inference template; Based on each typesetting partition and its corresponding template parameters, analyze the spatial relationship between adjacent typesetting partitions and generate boundary handover rules; Based on the boundary handover rules, each typesetting partition and its corresponding template parameters, potential attribution conflict conditions between different attribution inference templates are identified, and arbitration rules are generated. Natural language conversion is performed on the boundary handover rules, arbitration rules, each layout partition and its corresponding template parameters to obtain visual question-and-answer prompts.
[0057] The layout partitions are rectangular areas divided from the exam paper image based on semantic information. Each area corresponds to a specific functional type, such as the question stem area, answer area, marking area, score writing area, or margin area. The partition type identifies the functional role of each layout partition. The attribution inference template is a pre-designed logical framework for specific partition types, guiding how to attribute markings to questions. This framework contains several fillable parameter bits. Template parameters are specific numerical values or text filled into the attribution inference template, such as question number range, partition coordinate boundaries, and mark type. Spatial association refers to the geometric relationships between adjacent layout partitions, such as adjacency, inclusion, bridging, or alignment. Boundary intersection rules are judgment criteria described in natural language for handling mark attribution issues at the boundaries of adjacent partitions. Potential attribution conflict conditions refer to the possible attribution contradictions that may arise when the same marking mark simultaneously meets the matching conditions of multiple attribution inference templates. Arbitration rules are the priority or judgment logic used to adjudicate the final attribution when an attribution conflict occurs.
[0058] After obtaining the semantic information of the layout, the first step is to perform partition detection. Each rectangular area marked with a category label is extracted from the semantic information, and its coordinates and partition type are recorded, such as the question stem area, answer area, or margin score area, forming a layout partition list. Next, based on the type of each partition, the corresponding attribution reasoning template is retrieved from the template library, and template parameters are generated. For example, the template for the answer area can be set to "traces located inside the answer area belong to the question number corresponding to that answer area," with parameters being the coordinate range of the answer area and the corresponding question number; the template for the margin score area can be set to "margin scores belong to the question directly opposite it horizontally," with parameters being the vertical coordinate range of the score area and the directly opposite question number.
[0059] Next, we analyze the spatial relationships between adjacent layout sections and generate boundary connection rules. Adjacent sections can be left-right or top-bottom adjacent. For example, the answer area of one question and the stem area of the next question may be vertically connected, with only a very thin dividing line or no blank space in between. We analyze the coordinate parameters of these sections to determine whether there is overlap, overlap, or obvious separation between them. Based on the analysis results, we generate several boundary connection rules using natural language. For example, we can stipulate that if the bounding box of a mark covers the boundary area between the bottom of the upper section and the top of the lower section, and the mark type is a checkmark, then it is assigned to the section whose visual center of gravity is located. The section to which the center of gravity is biased is the section to which it belongs. Another example is that if a handwritten fraction mark is located outside the right boundary of the left section and overlaps with the left boundary of the right section, then the fraction belongs to the right section. These rules clearly define the processing logic when a mark falls on or crosses a boundary.
[0060] Then, based on the generated boundary handover rules, each layout partition, and its corresponding template parameters, potential attribution conflict conditions between different attribution inference templates are identified, and arbitration rules are generated. Attribution conflicts typically occur when the same correction mark simultaneously satisfies the matching conditions of two or more partition templates. For example, a checkmark box falls within the coverage area of the attribution template for the first question's answer area and also covers the boundary of the second question's stem area, causing both templates to believe that the mark should belong to their respective questions. After identifying such overlapping areas or logical overlaps, arbitration rules need to be generated to resolve the contradictions. Arbitration rules can be set based on the priority of partition types, such as stipulating that the priority of the correction mark area is higher than that of the answer area, and the priority of the answer area is higher than that of the stem area. Arbitration rules can also be based on the specificity of the mark type, such as prioritizing handwritten score marks to the score area template rather than the answer area template. In addition, distance weights can be introduced, selecting the template with the closest distance from the mark's center point to the partition center when multiple templates are candidates. These arbitration rules are then recorded in natural language.
[0061] Finally, all generated boundary handover rules, arbitration rules, partitions, and their template parameters are converted into natural language to obtain a complete visual question-and-answer prompt. The prompt describes the type and coordinates of each partition in sequence, lists the attribution inference templates and their parameters for different partitions, explains the boundary handover rules, and provides arbitration rules in case of conflict, forming a clear instruction text for the visual language model to use in subsequent attribution inference.
[0062] It should be noted that by performing partition detection based on the semantic information of the page layout and determining the type of each layout partition, the complex and random exam paper layout can be structured, providing a clear basis for subsequent attribution reasoning. By calling the corresponding attribution reasoning template and generating template parameters according to different partition types, the attribution logic for traces in different areas such as the question stem area, answer area, and page margin area can be customized differently, avoiding the limitations of using a uniform rule to handle all traces. Analyzing the spatial relationships between adjacent partitions and generating boundary transition rules specifically solves the problem of attribution judgment in cases of blurred boundaries such as traces overlapping lines or crossing regions, filling blind spots that rules within a single partition cannot cover. Identifying potential attribution conflict conditions and generating arbitration rules provides a clear basis for adjudication when multiple rules simultaneously match the same trace, preventing contradictions or randomness in the reasoning results. By converting all the above rules and parameters into visual question-and-answer prompts through natural language, the structured layout knowledge and manually designed attribution logic are essentially encapsulated in a way that the visual language model can directly understand. This allows the model to perform spatial semantic attribution reasoning without having to learn layout rules from scratch. Instead, it can directly follow clear, complete, and conflict-free reasoning guidelines, thereby significantly improving the accuracy and interpretability of attribution judgments.
[0063] In one embodiment, the step of calculating the score for each question based on the grading marks corresponding to that question includes: For each question, identify the symbol type of the correction marks to determine the correction symbols; When the correction symbol includes multiple correction symbol types, the target correction symbol is determined based on the semantic association and priority relationship between the various correction symbol types; The score is determined based on the marking semantics corresponding to each target marking symbol, combined with the content of the question.
[0064] Symbol type recognition categorizes marking marks into predefined classes based on their visual appearance, such as checkmarks, crosses, half-corrections, fractions, and deduction indicators. The marking symbol itself is the category label obtained after recognition. Multiple marking symbol types refer to the simultaneous appearance of two or more different categories of marking marks on the same question. For example, there might be a half-correction symbol next to a deduction number, or a checkmark and a circle next to a step. Semantic association refers to the inherent connection between different marking symbols in the teacher's marking logic. For example, half-corrections and deduction numbers often appear together to explain the reason for the deduction, while checkmarks usually appear independently without additional deduction markings. Priority refers to the order of judgment determined by teaching routines or the importance of the symbols themselves when multiple symbols coexist. For example, handwritten fractions have higher authority as the final score than half-corrections, and deduction numbers are more decisive for the score than step circles. The target marking symbol is the one selected from multiple marking symbols to ultimately determine the score for the question. The semantic meaning of grading refers to the meaning of the score represented by each grading symbol. For example, a checkmark means full marks, a cross means zero marks, a half-correction means partial marks, handwritten marks directly indicate the specific marks, and deduction numbers indicate that the corresponding marks are deducted from the full marks.
[0065] After obtaining the set of marking marks for each question, the first step is to identify the symbol type of each mark in the set. For example, a classification model is used to determine whether it is a checkmark, cross, half-correction, handwritten score, or deduction number. After the identification is completed, each mark has a definite symbol category.
[0066] Next, the target marking symbol is determined based on the recognition results. If the question has only one marking symbol, regardless of its type, that symbol is directly used as the target marking symbol. If multiple marking symbols exist, priority is given to checking if they include handwritten fractions or deduction numbers. If any fraction symbol is present, it is used as the target marking symbol, and other checkmarks, crosses, half-pairs, or other symbols are disregarded. If no fraction symbols exist, but one or more of checkmarks, crosses, or half-pairs exist, all of these symbols are used as target marking symbols. For example, if a question has both a half-pair and a minus 2, and minus 2 is a fraction symbol, then only minus 2 is used as the target. Similarly, if a question only has checkmarks and a few circled steps, but no fraction symbols, then only checkmarks are used as the target, and circled steps are not. Furthermore, if a question has no fraction symbols but both checkmarks and crosses appear, this is relatively rare, but according to the rules, both symbols will be used as target marking symbols, and subsequent decisions will be made based on priority.
[0067] After determining the target marking symbols, the score is calculated based on the marking semantics of these symbols and the full score of the question. If the target marking symbol is a fraction symbol, if it is a handwritten fraction, that number is taken directly; if it is a deduction number, the score is equal to the full score minus that number. If the target marking symbol is a checkmark, the score is equal to the full score. If it is an X, the score is zero. If it is a partial correct answer, it is usually awarded half of the full score. If the target marking symbols contain both checkmarks and Xs, or multiple contradictory symbols, the final score is determined according to the marking order or the conventional priority of the symbols. For example, a later symbol overrides an earlier one, or if checkmarks and Xs coexist, the X takes precedence. Each question ultimately receives a definite score.
[0068] It should be noted that by identifying the symbol types of the marking marks corresponding to each question, the diverse visual marking marks can be transformed into standardized marking symbol categories, providing a calculable basis for score calculation. When a question has multiple marking symbols, determining the target marking symbol based on the semantic and priority relationships between the symbols can effectively handle contradictory or supplementary markings in teacher marking, avoiding scoring errors caused by simply taking an average or ignoring a particular symbol. Calculating scores based on the marking semantics of the target marking symbol combined with the question content can fully accommodate various common marking formats such as checkmarks, crosses, partial marks, handwritten scores, and deductions, without requiring separate scoring logic for each test paper, thus improving the generalization ability and accuracy of score calculation.
[0069] In one embodiment, the steps for determining the score based on the marking semantics corresponding to each target marking symbol and in conjunction with the content of the question include: Assign semantic contribution to each target marking symbol based on the content of the question; According to the marking semantics corresponding to each target marking symbol, obtain the score mapping value of each target marking symbol; Based on the semantic contribution and the score mapping value, calculate the local semantic score of each target correction symbol; The score for a question is obtained by semantically fusing the local semantic scores associated with the question.
[0070] Semantic contribution refers to the weighting coefficient assigned to each target marking symbol based on the question's content. This coefficient reflects the symbol's importance in the overall question score calculation. The scoring mapping value is the result of converting marking semantics into specific numerical values. For example, a checkmark maps to the full score, a half-check maps to half the full score, and handwritten marks are directly mapped to this number. Local semantic score refers to the score component calculated for a single target marking symbol after considering its contribution; it equals the semantic contribution multiplied by the scoring mapping value. Semantic fusion refers to the process of merging all local semantic scores associated with the same question into a single total score according to certain rules.
[0071] After determining the target marking symbols for a question, first obtain the question's content, including the question stem, question type, and the distribution of marks for each step. Assign a semantic contribution to each target marking symbol based on the question content. If the question content explicitly provides the weight or mark for each step, the contribution is assigned proportionally to that weight. For example, a calculation question worth 6 points contains three equivalent steps, each worth 2 points. The teacher marks the three steps with a checkmark, a partial checkmark, and an X, respectively. The semantic contribution is then assigned to each symbol based on the mark percentage of each step, with each contribution being the mark for that step divided by the total question mark, i.e., 2 / 6 = 1 / 3. If the step weights cannot be obtained from the question content, or if the marking symbols do not correspond to specific steps but are distributed across different parts of the question, a simplified method can be used to calculate the semantic contribution: dividing the question's full mark by the total number of target marking symbols. For example, a question worth 10 points has 5 target marking symbols; the semantic contribution of each symbol is 10 divided by 5, which equals 2 marks.
[0072] Next, the scoring mapping value is obtained according to the scoring semantics of each target correction symbol. A checkmark has a scoring mapping value of 1 representing the full score percentage, a half-correct symbol has a value of 0.5, a cross has a value of 0, and handwritten scores are directly obtained by dividing the number by the full score. Deductions are calculated by subtracting the deduction from the full score and then dividing by the full score. Then, the local semantic score is calculated by multiplying the semantic contribution by the scoring mapping value to obtain the actual score component corresponding to that symbol. If a simplified method is used and the semantic contribution is already in absolute score units, then the local semantic score equals the semantic contribution multiplied by the scoring mapping value. For example, if the full score is 10 points, and each of the 5 symbols contributes 2 points, and one symbol is a checkmark with a mapping value of 1, its local semantic score is 2 points; another symbol is a half-correct symbol with a mapping value of 0.5, its local semantic score is 1 point.
[0073] Finally, all local semantic scores associated with the question are semantically fused, usually by summing, to obtain the final score for that question. If multiple marking symbols overlap, deduplication or taking the maximum value is performed during fusion. After semantic fusion is complete, the score for each question is output.
[0074] It's important to note that breaking down the scoring calculation into four steps—semantic contribution allocation, score mapping value acquisition, local semantic score calculation, and semantic fusion—fully leverages the scoring information carried by each of the multiple marking symbols on a single question. Assigning a semantic contribution to each target marking symbol based on the question content ensures that the weight of each symbol in the final score matches its actual position within the question, avoiding the simplistic approach of treating all symbols equally. Acquiring score mapping values based on marking semantics transforms non-numerical markers such as checkmarks, crosses, partial correctness, and handwritten scores left by teachers into calculable numerical proportions. Combining these with the contribution values, the local semantic score for each symbol is calculated, thus achieving a quantitative expression of fine-grained marking information such as step scores, partial correctness, and multiple deductions. Finally, semantic fusion merges the various local semantic scores into the total question score, accurately reflecting the combined effect of multiple marking symbols on a single question, rather than relying solely on a single symbol or taking an average. This step-by-step integration approach better aligns with teachers' actual scoring intentions in complex grading scenarios such as step-by-step scoring, partial correctness, and multiple deductions, thereby significantly improving the accuracy and rationality of score calculation.
[0075] In one embodiment, based on the content, score, grading history, difficulty, and knowledge points of the question, the steps to generate the corresponding learning path through multiple attribution and attribution refutation include: A multidimensional attribution analysis was performed on the content, score, marking history, difficulty, and knowledge points of the question to generate multiple candidate attribution results. By using the scores of questions at different difficulty levels, we can refute each candidate attribution result and establish an attribution-refutation relationship. The attribution relationship is used to correct multiple candidate attribution results, determine the target attribution result, and generate the corresponding learning path based on the target attribution result.
[0076] Candidate attribution results are one or more possible hypotheses for reasons for point deduction output from multidimensional attribution analysis, such as lack of knowledge, careless calculation, misreading the question, or improper answer format. Scores at different difficulty levels refer to the scores obtained by the same student on easy, medium, and difficult questions on the same knowledge point or similar question types. These scores reflect the student's varying levels of mastery at different difficulty levels. Attribution by contradiction establishes a verification association between candidate attribution results and the student's performance on questions of different difficulty levels. For example, if a student's point deduction is due to a lack of knowledge, they should score lower on related questions at all difficulty levels. Target attribution results are the most reliable reasons for point deduction retained after screening and correction through proof by contradiction.
[0077] After calculating the score and identifying the question as incorrect, the first step is to collect the question's content, score, marking information, difficulty level, and relevant knowledge point. Then, multidimensional attribution analysis is performed to generate multiple candidate attribution results. For example, a medium-difficulty fraction addition question with a score of 0, a marking mark of one cross, and the knowledge point being addition of fractions with unlike denominators, generates three candidate attribution results after analysis: the student did not master the method of finding a common denominator; the student carelessly added the numerator and denominator directly during calculation; and the student missed the conversion conditions when reading the question.
[0078] Next, we use the student's scores on related questions for this knowledge point to demonstrate the error by contradiction. We search the historical answer records for scores on questions of different difficulty levels related to this knowledge point. Let's assume there's a simple addition problem with unlike denominators where the student scored full marks; a medium-difficulty problem (the same as the current incorrect answer) where the student scored 0 marks; and a difficult repeated addition problem where the student scored 0 marks. We then demonstrate the error by contradiction for each candidate attribution: If the student didn't master the method of finding a common denominator, they should have also answered the simple unlike denominator problem incorrectly, but they actually got full marks, thus disproving the hypothesis. If it was careless calculation, it's reasonable that the student answered the simple problem correctly but answered the medium-difficulty problem incorrectly due to carelessness; the difficult problem might have been answered incorrectly because it was too difficult, thus disproving the hypothesis by contradiction. If it was a misreading of the question, checking the question content reveals no special transformation conditions, and the grading records show no signs of misreading the question, thus disproving the hypothesis by contradiction. After these proofs by contradiction, only careless calculation remains as a candidate result.
[0079] Then, the candidate attribution results are revised using attribution-by-contrast reasoning to determine the target attribution result as carelessness in calculation. Based on this result, a corresponding learning path is generated: First, review the rule of finding a common denominator; second, provide five simple addition problems with unlike denominators and require students to write out the process of finding a common denominator; third, solve a problem equivalent to the incorrect problem for comparison and confirmation; fourth, record the common mistakes in a mistake notebook. The generated learning path is saved and pushed to students or teachers.
[0080] For example, based on the zone of proximal development theory, when a question with a score below 100% is input, the RoBERTa model is concurrently invoked to determine its semantic difficulty (e.g., "hard"), and a large language model is invoked to infer the pre- and post-knowledge of the corresponding knowledge point. Subsequently, the large language model, combined with the grading traces (e.g., calculation process but incorrect result or completely blank steps), precisely locates the cause of the error to one of three dimensions: knowledge mastery, ability application, or problem-solving habits, under the constraint of controlled prompts. If the error is attributed to the knowledge dimension and the difficulty is easy, then low-difficulty questions corresponding to the pre-knowledge are recommended; if the error is attributed to the ability dimension and the difficulty is hard, then variations of the same difficulty level for the same knowledge point are recommended; if the error is attributed to the habit dimension, then medium-difficulty questions containing error-prone traps are recommended for anti-interference training.
[0081] It's important to note that multidimensional attribution analysis generates multiple candidate reasons for point deductions simultaneously from various dimensions, including question content, score, grading records, difficulty, and knowledge points. This avoids the one-sidedness of simply drawing conclusions based on wrong answers, allowing for a more comprehensive and in-depth exploration of students' true weaknesses. By using scores from questions of different difficulty levels to refute candidate attribution results, attribution reasoning is grounded in objective scoring data, rather than relying solely on subjective judgment, making the attribution process verifiable and logically closed-loop. This refutation effectively eliminates attribution hypotheses that, while seemingly reasonable, contradict the student's actual performance on other questions of different difficulty, thus selecting the most reliable conclusions regarding point deductions. The learning path generated based on the revised target attribution results is highly targeted, moving beyond general exercise recommendations to providing corresponding concept reviews, specialized exercises, and consolidation tests tailored to specific areas of point deduction, helping students address their weaknesses and improve learning outcomes.
[0082] In one embodiment, the step of using scores from questions of different difficulty levels to refute each candidate attribution result and establishing an attribution-refutation relationship includes: The related questions in the graded test paper images that belong to the same knowledge point as this question are divided into at least two levels according to their difficulty level. Calculate the standard score pattern vector corresponding to each candidate attribution result, and calculate the actual score vector of the associated questions corresponding to each difficulty coefficient; The actual score vector is matched with each standard score pattern vector, and the attribution proof relationship is determined based on the matching results.
[0083] Among them, related questions refer to all other questions extracted from the image of the graded test paper that belong to the same knowledge point as the current incorrect question. The difficulty coefficient is a numerical indicator that measures the difficulty level of a question, usually divided into easy, medium, and hard levels. The standard score pattern vector refers to a pre-set sequence of scores that students should present on related questions at different difficulty levels for each candidate attribution result. For example, the pattern corresponding to a lack of knowledge point mastery is low scores across all difficulty levels, while the pattern corresponding to careless calculation is high scores on easy questions, low scores on medium questions, and low scores on hard questions. The actual score vector refers to the sequence of actual score proportions of students on related questions at each difficulty level for that knowledge point.
[0084] After obtaining multiple candidate attribution results for the current incorrect question, the first step is to identify all related questions belonging to the same knowledge point from the images of the graded test papers. For example, if the current incorrect question tests the addition of fractions with unlike denominators, then other questions testing the same knowledge point of fraction addition and subtraction or finding a common denominator are selected from the test papers, including calculation questions, fill-in-the-blank questions, or application questions. These related questions are then divided into at least two levels according to their difficulty coefficient, typically into three levels: easy, medium, and hard. The difficulty coefficient can be obtained based on the question's preset difficulty label in the question bank, or it can be dynamically determined based on the student's score rate in the whole school or class. For example, questions with a score rate higher than 0.8 are classified as easy, those with a score rate between 0.4 and 0.8 are classified as medium, and those with a score rate lower than 0.4 are classified as hard.
[0085] Next, a standard score pattern vector is calculated for each candidate attribution result. For example, the standard pattern for the candidate attribution result "knowledge point not mastered" is: low percentage of scores on easy questions, low percentage of scores on medium questions, and low percentage of scores on difficult questions, which can be represented as the vector [0.2, 0.2, 0.2]. The standard pattern for the candidate attribution result "careless calculation" is: high percentage of scores on easy questions, medium-to-low percentage of scores on medium questions, and low percentage of scores on difficult questions, which can be represented as [0.9, 0.4, 0.2]. The standard pattern for the candidate attribution result "misreading the question" is: high percentage of scores on easy questions, high percentage of scores on medium questions, and low percentage of scores on difficult questions, because misreading the question often occurs in questions with complex conditions or convoluted wording. Easy and medium questions are less likely to be misread if the wording is clear, which can be represented as [0.9, 0.8, 0.2]. These standard pattern vectors can be pre-set based on teaching experience or obtained through historical data clustering.
[0086] Then, the actual score vector for each difficulty level's associated questions is calculated. Specifically, for the easy level's associated questions, the sum of the student's scores on all questions at that level is divided by the total score for that level to obtain the actual score ratio for the easy level. Similarly, the actual score ratios for the medium and difficult levels are calculated to form the actual score vector, for example, [0.85, 0.3, 0.1]. The actual score vector is then matched with the standard score pattern vectors of each candidate attribution result. Matching methods can include cosine similarity or Euclidean distance. The actual vector [0.85, 0.3, 0.1] shows very low similarity to the "knowledge point not mastered" pattern [0.2, 0.2, 0.2], relatively high similarity to the "careless calculation" pattern [0.9, 0.4, 0.2], and slightly lower similarity to the "misreading the question" pattern [0.9, 0.8, 0.2]. Based on the matching results, the attribution proof relationship is determined; that is, the candidate attribution result corresponding to the standard pattern with the highest matching degree is verified by contradiction, while the candidate results with low matching degree are negated by contradiction. If the actual vector closely matches a certain pattern, the candidate attribution is valid; otherwise, it is invalid. This attribution-by-contradiction relationship provides a quantitative basis for subsequently determining the target attribution result.
[0087] It's important to note that by dividing related questions on the same knowledge point into multiple difficulty levels and calculating students' actual score vectors at different levels, we can objectively quantify the differences in students' mastery across different difficulty levels, rather than relying solely on subjective judgments based on a single incorrect answer. Pre-defining a standard score pattern vector for each candidate attribution result transforms abstract attribution hypotheses into calculable and comparable numerical patterns, giving the proof-of-concept a clear mathematical foundation. Matching the actual score vector with the standard pattern vector automatically filters out the attribution hypothesis that best matches the actual data, avoiding the arbitrariness and uncertainty of human experience-based judgment. This vector-matching-based attribution-of-concept method fully utilizes the score information from multiple questions on the same knowledge point, making the attribution conclusions more reliable and convincing, providing solid data support for subsequent precise learning path recommendations.
[0088] The following describes the test paper analysis device based on marking traces provided in the embodiments of this application. The test paper analysis device based on marking traces described below can be referred to in correspondence with the test paper analysis method based on marking traces described above. Figure 2 As shown, this application provides a test paper analysis device based on marking traces, the device comprising: The marking trace detection module 201 is used to detect marking traces in the marked test paper image using a target detection model and obtain a list of marking trace coordinates. The intermediate state inference graph generation module 202 is used to create a copy image of the graded test paper image, and draw a visual identifier for each grade mark on the copy image and mark a unique index according to the list of grade mark coordinates, thereby generating an intermediate state inference graph. The grading trace mapping module 203 is used to establish a semantic mapping relationship between a unique index and a number based on the intermediate state inference graph and the number and content of each question in the image of the graded test paper, using a large visual language model and a visual question-and-answer method, so as to obtain the grading trace corresponding to each question. The learning path generation module 204 is used to calculate the score of each question based on the marking marks corresponding to each question, and when the question is determined to be an incorrect question, it generates the corresponding learning path based on the content, score, marking marks, difficulty and knowledge points of the question, through multiple attribution and attribution reversal.
[0089] In one embodiment, the correction trace mapping module 203 includes: The page layout semantic information determination unit is used to analyze the page layout structure of the exam paper based on the image of the graded exam paper and the visual language big model to obtain the page layout semantic information, as well as the number and content of each question; The visual question-and-answer prompt information generation unit is used to generate visual question-and-answer prompt information based on the semantic information of the layout. The correction trace mapping unit is used to perform spatial semantic attribution reasoning on the correction trace corresponding to each unique index in the intermediate state reasoning graph by combining the visual language big model with visual question-and-answer prompts, intermediate state reasoning graph, and the number and content of each question, so as to obtain the correction trace corresponding to each question.
[0090] In one embodiment, the visual question-answering prompt information generation unit includes: The partition detection subunit is used to perform partition detection based on page layout semantic information to determine each layout partition and its partition type. The attribution inference template acquisition sub-unit is used to obtain the corresponding attribution inference template according to the partition type of each layout partition, and generate the template parameters for each attribution inference template; The boundary intersection rule generation sub-unit is used to analyze the spatial relationship between adjacent layout partitions based on each layout partition and its corresponding template parameters, and generate boundary intersection rules. The arbitration rule generation subunit is used to identify potential ownership conflict conditions between different ownership inference templates based on the boundary handover rules, each typesetting partition and its corresponding template parameters, and generate arbitration rules. The visual question-and-answer prompt information generation subunit is used to perform natural language conversion on the boundary intersection rules, arbitration rules, each layout partition and its corresponding template parameters to obtain visual question-and-answer prompt information.
[0091] In one embodiment, the learning path generation module 204 includes: The marking symbol determination unit is used to identify the symbol type of the marking marks corresponding to each question and determine the marking symbol. The target correction symbol determination unit is used to determine the target correction symbol based on the semantic association and priority relationship between the various correction symbol types when the correction symbol contains multiple correction symbol types. The scoring unit is used to determine the score based on the marking semantics corresponding to each target marking symbol and the content of the question.
[0092] In one embodiment, the scoring unit includes: The semantic contribution allocation subunit is used to allocate the semantic contribution of each target grading symbol according to the content of the question; The rating mapping value acquisition sub-unit is used to acquire the rating mapping value of each target grading symbol according to the grading semantics corresponding to each target grading symbol; The local semantic score calculation subunit is used to calculate the local semantic score of each target correction symbol based on the semantic contribution and the score mapping value. The scoring determination sub-unit is used to semantically fuse the local semantic scores associated with the question to obtain the question's score.
[0093] In one embodiment, the learning path generation module 204 includes: The candidate attribution result generation unit is used to perform multi-dimensional attribution analysis on the content, score, marking history, difficulty and knowledge points of the question, and generate multiple candidate attribution results. The attribution-contrast relationship establishment unit is used to use the scores of questions at different difficulty levels to refute each candidate attribution result and establish attribution-contrast relationships. The learning path generation unit is used to correct multiple candidate attribution results using attribution-reverse proof relationships, determine the target attribution result, and generate the corresponding learning path based on the target attribution result.
[0094] In one embodiment, the attribution-rebuttal relationship establishment unit includes: The related question division sub-unit is used to divide related questions in the graded test paper image that belong to the same knowledge point into at least two levels according to the difficulty coefficient; The actual score vector calculation subunit is used to calculate the standard score pattern vector corresponding to each candidate attribution result, and to calculate the actual score vector of the associated questions corresponding to each difficulty coefficient. The attribution-contrast relationship determination sub-unit is used to match the actual score vector with each standard score pattern vector and determine the attribution-contrast relationship based on the matching results.
[0095] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the test paper analysis method based on grading traces as described in any of the above embodiments.
[0096] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the test paper analysis method based on grading traces as described in any of the above embodiments.
[0097] Indicatively, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 3 The computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the grading-track-based test paper analysis method of any of the above embodiments.
[0098] The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate on an operating system stored in memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0099] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0100] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, "a," "an," "the," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. "Multiple" refers to at least two, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of the related listed items.
[0101] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0102] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A test paper analysis method based on marking traces, characterized in that, The method includes: The marking marks on the graded test paper images were detected using an object detection model, and a list of marking mark coordinates was obtained. Create a copy of the graded test paper image, and draw a visual identifier for each grade mark on the copy image according to the list of grade mark coordinates, and mark a unique index to generate an intermediate state inference graph. Based on the intermediate state inference graph and the number and content of each question in the graded test paper image, a semantic mapping relationship between the unique index and the number is established using a visual language big model and a visual question-and-answer method to obtain the grading traces corresponding to each question. Based on the marking history for each question, the score for that question is calculated. When a question is determined to be incorrect, a multi-dimensional attribution analysis is performed on the question's content, score, marking history, difficulty, and knowledge points to generate multiple candidate attribution results. The scores of questions at different difficulty levels are used to refute each candidate attribution result, establishing an attribution-refutation relationship. The attribution-refutation relationship is then used to correct the multiple candidate attribution results, determining the target attribution result. Based on the target attribution result, a corresponding learning path is generated.
2. The test paper analysis method based on marking traces according to claim 1, characterized in that, The step of establishing a semantic mapping relationship between the unique index and the number and content of each question in the graded test paper image based on the intermediate state inference graph and using a visual language model to obtain the grading trace corresponding to each question includes: Based on the image of the graded test paper, the visual language model is used to analyze the test paper layout structure to obtain the semantic information of the layout, as well as the number and content of each question. Visual question-and-answer prompts are generated based on the semantic information of the layout. By combining the visual language big model with the visual question-and-answer prompts, the intermediate state inference graph, and the number and content of each question, spatial semantic attribution inference is performed on the correction traces corresponding to each unique index in the intermediate state inference graph to obtain the correction traces corresponding to each question.
3. The test paper analysis method based on marking traces according to claim 2, characterized in that, The step of generating visual question-and-answer prompts based on the semantic information of the layout includes: Based on the semantic information of the layout, partition detection is performed to determine each layout partition and its partition type; Based on the partition type of each layout partition, obtain the corresponding attribution inference template and generate template parameters for each attribution inference template; Based on each typesetting partition and its corresponding template parameters, analyze the spatial relationship between adjacent typesetting partitions and generate boundary handover rules; Based on the boundary handover rules, each typesetting partition and its corresponding template parameters, potential attribution conflict conditions between different attribution inference templates are identified, and arbitration rules are generated. The boundary intersection rules, the arbitration rules, each layout partition and its corresponding template parameters are converted into natural language to obtain the visual question-and-answer prompt information.
4. The test paper analysis method based on marking traces according to claim 1, characterized in that, The step of calculating the score for each question based on the grading marks corresponding to each question includes: For each of the aforementioned questions, the marking marks are identified by symbol type to determine the marking symbols; When the correction symbol includes multiple correction symbol types, the target correction symbol is determined based on the semantic association and priority relationship between the various correction symbol types; The score is determined based on the grading semantics corresponding to each target grading symbol and in conjunction with the content of the question.
5. The test paper analysis method based on marking traces according to claim 4, characterized in that, The step of determining the score based on the marking semantics corresponding to each target marking symbol and in combination with the content of the question includes: Based on the content of the question, assign a semantic contribution to each of the target correction symbols; According to the marking semantics corresponding to each target marking symbol, obtain the score mapping value of each target marking symbol; Based on the semantic contribution and the scoring mapping value, calculate the local semantic score for each target correction symbol; The local semantic scores associated with the question are semantically fused to obtain the score for the question.
6. The test paper analysis method based on grading traces according to claim 1, characterized in that, The step of using scores from questions of different difficulty levels to refute each candidate attribution result and establish an attribution-refutation relationship includes: The related questions in the graded test paper images that belong to the same knowledge point as the question are divided into at least two levels according to their difficulty coefficient; Calculate the standard score pattern vector corresponding to each candidate attribution result, and calculate the actual score vector of the associated question corresponding to each difficulty coefficient; The actual score vector is matched with each of the standard score pattern vectors, and the attribution-proof relationship is determined based on the matching results.
7. A test paper analysis device based on marking traces, characterized in that, The device includes: The marking trace detection module is used to detect marking traces in marked test paper images using a target detection model and obtain a list of marking trace coordinates; The intermediate state inference graph generation module is used to create a copy image of the graded test paper image, and draw a visual identifier for each grade mark on the copy image and mark it with a unique index according to the list of grade mark coordinates, thereby generating an intermediate state inference graph. The grading trace mapping module is used to establish a semantic mapping relationship between the unique index and the number and content of each question in the graded test paper image based on the intermediate state inference graph and the visual language big model, through visual question answering, so as to obtain the grading trace corresponding to each question. The learning path generation module is used to calculate the score of each question based on the grading traces corresponding to each question. When a question is determined to be incorrect, the module performs multi-dimensional attribution analysis on the content, score, grading traces, difficulty, and knowledge points of the question to generate multiple candidate attribution results. The module uses the scores of questions at different difficulty levels to refute each candidate attribution result, establishes an attribution-refutation relationship, and uses the attribution-refutation relationship to correct the multiple candidate attribution results, determine the target attribution result, and generate the corresponding learning path based on the target attribution result.
8. A storage medium, characterized in that: The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the test paper analysis method based on marking traces as described in any one of claims 1 to 6.
9. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the test paper analysis method based on marking traces as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Test question correction trace identification method, storage medium and equipment
CN115482547A
