Automatic grading methods, devices, and storage media for matching test questions

By identifying and matching the relationships between image blocks of matching questions in the answer images, and utilizing the question database, the automatic grading of matching questions is achieved, solving the problem of teachers having a large workload in grading and improving grading efficiency.

CN114332899BActive Publication Date: 2025-10-31BEIJING YUNSIZHIXUE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111610472.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-10-31
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

Existing technology cannot effectively automate the grading of connection-based test questions, resulting in a heavy workload and low efficiency for teachers.

Method used

By identifying the lines in the answer images and determining the corresponding relationships between image blocks, and then matching them using a question database, the automatic grading of connection-based questions can be achieved.

Benefits of technology

It enables accurate and automatic grading of online test questions, reducing teachers' grading workload and improving grading efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332899B_ABST
    Figure CN114332899B_ABST
Patent Text Reader

Abstract

This invention discloses an automatic grading method, apparatus, and storage medium for matching questions. The automatic grading method for matching questions includes: acquiring answer images of the matching questions; identifying the matching lines based on the answer images and determining the image blocks corresponding to both ends of each matching line to obtain the image block correspondence relationship of each matching line; acquiring the image block correspondence relationship of the answer lines of the matching questions; matching the image block correspondence relationship of each matching line with the image block correspondence relationship of each answer line; if the match is successful, the matching is correct; otherwise, a "match failed" message is returned. This invention proposes a resource-based automatic grading method for matching questions, which compares the image block correspondence relationship in the answer images with the image block correspondence relationship to determine whether the answer to the matching question matches the answer, thereby achieving automatic grading of matching questions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of online education technology, specifically to a method, apparatus, and storage medium for automatically grading online test questions. Background Technology

[0002] School education, as the primary means of learning scientific and cultural knowledge, requires homework and test practice to help students master knowledge. Now, whether in primary school, middle school, high school, or even university, students need to do homework and test practice. At the same time, school teachers face the task of grading dozens or even hundreds of students' homework and test papers, resulting in a significant workload and pressure for them.

[0003] Therefore, automatic grading is increasingly appearing in teachers' teaching work. With the help of automatic grading, teachers' workload can be reduced and grading efficiency can be improved. Furthermore, based on the results of automatic grading, the mastery of knowledge points can be automatically analyzed for teachers to refer to and carry out more targeted teaching work.

[0004] Existing automated grading methods generally rely on large-scale question banks, which contain hundreds of millions of questions and explanations. Automated grading is achieved by scanning and identifying questions in the assignments to be graded and then searching and matching them within the large-scale question bank. However, for matching questions, which involve a combination of text and lines, existing large-scale question banks cannot perform automated grading. Furthermore, matching questions are a common question type, appearing almost throughout the entire student curriculum. Therefore, this invention aims to solve the problem of automated grading of matching questions.

[0005] In view of this, the present invention is hereby proposed. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention provides a method, apparatus, and storage medium for automatically grading online test questions. The specific technical solution is as follows:

[0007] This invention provides an automatic grading method for matching test questions, including:

[0008] Get the answer images for the matching questions;

[0009] Based on the answer images, identify the answer lines and determine the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line;

[0010] Obtain the corresponding image blocks of the lines connecting the answers to the matching questions;

[0011] The system matches the image patch correspondences of each answer line in the matching test with the image patch correspondences of each answer line. If the match is successful, the line is correct; otherwise, it returns "match failed".

[0012] As an optional embodiment of the present invention, obtaining the image block correspondence relationship of the answer connection lines for the connection questions includes:

[0013] Construct a question database containing a massive amount of online question resources;

[0014] Identify the matching questions in the answer images and search the question database to find the corresponding matching question resources;

[0015] The answer portion of the matching question resource is extracted to obtain the answer image of the matching question;

[0016] Identify the lines connecting the answers from the answer images and determine the corresponding image blocks at both ends of each line to obtain the image block correspondence between the lines connecting the answers.

[0017] As an optional embodiment of the present invention, the step of identifying the answer lines based on the answer images and determining the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line includes:

[0018] Establish the first coordinate system within the answer image;

[0019] Identify each first image block corresponding to the question portion in the answer image, and record the coordinate information of each first image block in the first coordinate system;

[0020] Identify the lines connecting the answers in the answer image and record the coordinates of each line in the first coordinate system;

[0021] The coordinate information of the answer connection line and the coordinate information of the first image block at both ends of the answer connection line are combined and stored.

[0022] As an optional embodiment of the present invention, the first image block coordinate information includes the vertex coordinates (X1, Y1) of the preset vertex of the first image block, as well as the length information L1 and the width information W1 of the first image block. The first image block coordinate information is recorded as M1 = [(X1, Y1), L1, W1];

[0023] Construct an answer connection rectangle with the answer connection line as the diagonal. The answer connection line coordinate information includes the vertex coordinates (X2, Y2) of the preset vertex of the answer connection rectangle, as well as the length information L2 and the width information W2 of the answer connection rectangle. The answer connection line coordinate information is recorded as M2 = [(X2, Y2), L2, W2];

[0024] The coordinate information of the answer connection line and the coordinate information of the first image block at both ends of the answer connection line are combined and stored in the format of (M1, M2).

[0025] As an optional embodiment of the present invention, the step of identifying the answer connection lines based on the answer images and determining the image blocks corresponding to both ends of each answer connection line to obtain the image block correspondence of each answer connection line includes:

[0026] The answer image for the matching question is cropped from the image of the test questions to be graded;

[0027] The answer image is adjusted to obtain a preprocessed answer image that overlaps with the answer image;

[0028] Establish a second coordinate system identical to the first coordinate system in the preprocessed response image;

[0029] Identify each second image block corresponding to the question portion in the preprocessed answer image, and record the coordinate information of each second image block in the second coordinate system;

[0030] Identify the lines connecting answers in the preprocessed answer images and record the coordinate information of each line in the second coordinate system;

[0031] The coordinate information of the answer connection line and the coordinate information of the second image blocks at both ends of the answer connection line are combined and stored.

[0032] As an optional embodiment of the present invention, the second image block coordinate information includes the vertex coordinates (X1', Y1') on the second image block corresponding to the preset vertex (X1, Y1) of the first image block, as well as the length information L1' and width information W1' of the second image block. The second image block coordinate information is recorded as M1' = [(X1', Y1'), L1', W1'];

[0033] Construct a rectangular frame for answer connection with the answer connection line as the diagonal. The coordinate information of the answer connection line includes the coordinates (X2', Y2') of the vertex corresponding to the preset vertex (X2, Y2) of the answer connection line rectangle, as well as the length information L2' and the width information W2' of the answer connection line rectangle. The coordinate information of the answer connection line is recorded as M2' = [(X2', Y2'), L2', W2'];

[0034] The coordinate information of the answer connection line and the coordinate information of the second image blocks at both ends of the answer connection line are combined and stored in the format of (M1', M2').

[0035] As an optional embodiment of the present invention, the step of matching the image block correspondence of each answer line in the same question with the image block correspondence of each answer line, and if the match is successful, the line is correct; otherwise, a "matching failure" message is returned, including:

[0036] Match the image patch correspondence (M1', M2') of the answer connection line with the image patch correspondence (M1, M2) of the answer connection line respectively;

[0037] If M1' = M1 and M2' = M2, then the match is successful and the connection is correct; otherwise, the match fails and a "match failed" message is returned.

[0038] As an optional embodiment of the present invention, obtaining the image block correspondence relationship of the answer connection lines for the connection questions includes:

[0039] Construct a link-connection question resource library that stores the image patch correspondences of the link-connection questions and the answers to each question;

[0040] The system identifies the matching questions in the answer image and retrieves the corresponding matching question resources from the matching question resource library. The system then obtains the image patch correspondence of the answer lines in the matching question from the retrieved matching question resources.

[0041] This invention also provides an automatic grading device for online test questions, comprising:

[0042] The answer image acquisition module captures the answer images of the matching questions;

[0043] The image processing module identifies the connecting questions in the answer image and retrieves the answers from the question database. Based on the answers to the connecting questions, it obtains the correspondence between the image blocks at both ends of each answer connecting line. It also identifies the answer connecting lines in the answer image and determines the image blocks corresponding to both ends of each answer connecting line, thus obtaining the correspondence between the image blocks of each answer connecting line.

[0044] The judgment and processing module matches the image block correspondence of each answer line in the same question with the image block correspondence of each answer line. If the match is successful, the line is correct; otherwise, it returns "match failed".

[0045] The present invention also provides a storage medium storing a computer-executable program, which, when executed, implements the automatic grading method for the connection-based test questions described in any of the above-mentioned embodiments.

[0046] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0047] This invention proposes an automatic grading method for matching questions based on resources. The so-called resource-based method means that the answers to the matching questions can be obtained. By matching the answers to the matching questions with the correct answers, the automatic grading of the matching questions can be achieved.

[0048] To achieve matching between the answer and the answer, this invention identifies the answer lines based on the answer image and determines the image blocks corresponding to the two ends of each answer line, thus obtaining the image block correspondence of each answer line; it then obtains the image block correspondence of the answer lines of the connection question; and finally matches the image block correspondence of each answer line with the image block correspondence of each answer line. Based on the characteristics of the connection question, the answer and the answer are compared by comparing the image block correspondence in the answer image and the image block correspondence of the answer to determine whether the answer and the answer match.

[0049] The automatic grading method for matching questions in this invention, based on the structural characteristics of matching questions and utilizing question resources in a question database, achieves automatic grading of matching questions with accurate and reliable results. Therefore, this automatic grading method can assist teachers in grading matching questions, reducing their workload and significantly improving their grading efficiency. Attached Figure Description

[0050] Figure 1 The flowchart of the automatic grading method for online test questions in this invention Figure 1 ;

[0051] Figure 2 The flowchart of the automatic grading method for online test questions in this invention Figure 2 ;

[0052] Figure 3 The flowchart of the automatic grading method for online test questions in this invention Figure 3 ;

[0053] Figure 4 The flowchart of the automatic grading method for online test questions in this invention Figure 4 ;

[0054] Figure 5 The flowchart of the automatic grading method for online test questions in this invention Figure 5 ;

[0055] Figure 6 The flowchart of the automatic grading method for online test questions in this invention Figure 6 ;

[0056] Figure 7 Example image of test questions to be graded according to an embodiment of the present invention;

[0057] Figure 8 Example diagram of the connection-based test question resources in the test question database of this invention;

[0058] Figure 9 Example image of capturing the answer image of a matching question according to an embodiment of the present invention;

[0059] Figure 10 An example image of the answer to a connecting-the-dots question in an embodiment of the present invention;

[0060] Figure 11 An example diagram of an image processed by OCR according to an embodiment of the present invention. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0062] Therefore, the following detailed description of embodiments of the present invention is not intended to limit the scope of the claimed invention, but merely illustrates some embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0063] It should be noted that, unless otherwise specified, the embodiments and features and technical solutions in the present invention can be combined with each other.

[0064] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0065] In the description of this invention, it should be noted that the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. These terms are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0066] See Figure 1 As shown, the automatic grading method for matching questions provided in this embodiment includes:

[0067] Get the answer images for the matching questions;

[0068] Based on the answer images, identify the answer lines and determine the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line;

[0069] Obtain the corresponding image blocks of the lines connecting the answers to the matching questions;

[0070] The system matches the image patch correspondences of each answer line in the matching test with the image patch correspondences of each answer line. If the match is successful, the line is correct; otherwise, it returns "match failed".

[0071] This embodiment proposes a resource-based automatic grading method for matching questions. The so-called resource-based method means that the answers to the matching questions can be obtained. By matching the answers to the matching questions with the correct answers, the automatic grading of the matching questions can be achieved.

[0072] To achieve matching between the answer results and the answers, this embodiment identifies the answer lines based on the answer images and determines the image blocks corresponding to both ends of each answer line, thus obtaining the image block correspondence of each answer line; obtains the image block correspondence of the answer lines of the connecting test questions; and matches the image block correspondence of each answer line of the connecting test questions with the image block correspondence of each answer line. Based on the characteristics of the connecting test questions, the matching judgment is made through the correspondence between the image blocks in the answer images and the corresponding image blocks in the answers.

[0073] The automatic grading method for matching questions in this embodiment achieves automatic grading of matching questions, and the grading method is accurate and reliable. It can be used to assist teachers in automatically grading matching questions, reducing teachers' grading workload and greatly improving teachers' grading efficiency.

[0074] As an optional implementation method in this embodiment, see Figure 2 As shown in the figure, the image block correspondence for obtaining the answer lines of the matching test questions in this embodiment includes:

[0075] Construct a question database containing a massive amount of online question resources;

[0076] Identify the matching questions in the answer images and search the question database to find the corresponding matching question resources;

[0077] The answer portion of the matching question resource is extracted to obtain the answer image of the matching question;

[0078] Identify the lines connecting the answers from the answer images and determine the corresponding image blocks at both ends of each line to obtain the image block correspondence between the lines connecting the answers.

[0079] The connection-based test question resources in the test question database constructed in this embodiment are as follows: Figure 8 As shown, the online test resource includes a question section 201 and an answer explanation section 202. See the answer image in this embodiment. Figure 7As shown, a single answer image typically includes multiple questions. During automatic grading, the answer image is scanned using a scanning device. The system identifies the connecting questions within the answer image, retrieves the corresponding connecting question resources from the question database, and extracts the connecting answer portion from the answer analysis section 202 to obtain the answer image 203. Based on the answer image 203, the answer lines are identified, and the image blocks corresponding to both ends of each answer line are determined, thus establishing the image block correspondence between each answer line.

[0080] Furthermore, the method described in this embodiment for identifying answer lines from answer images and determining the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line includes:

[0081] Establish the first coordinate system within the answer image;

[0082] Identify each first image block corresponding to the question portion in the answer image, and record the coordinate information of each first image block in the first coordinate system;

[0083] Identify the lines connecting the answers in the answer image and record the coordinates of each line in the first coordinate system;

[0084] The coordinate information of the answer connection line and the coordinate information of the first image block at both ends of the answer connection line are combined and stored.

[0085] See Figure 10 As shown, the first coordinate system established in the answer image generally takes a certain vertex of the answer image as the origin. Preferably, the upper left vertex of the answer image is selected as the origin, the direction extending horizontally to the right along the upper left vertex is the X-axis, and the direction extending vertically downward is the Y-axis.

[0086] The first image block in this embodiment is Figure 10 The first image block, labeled 204, includes multiple parts that correspond to the lines in the connecting question.

[0087] As an optional implementation of this embodiment, the first image block coordinate information includes the vertex coordinates (X1, Y1) of the preset vertex of the first image block 204, as well as the length information L1 and width information W1 of the first image block. The first image block coordinate information is recorded as M1 = [(X1, Y1), L1, W1];

[0088] A rectangular frame 205 for connecting the answers is constructed with the answer lines as diagonals. The coordinate information of the answer lines includes the vertex coordinates (X2, Y2) of the preset vertex of the rectangular frame 205, as well as the length information L2 and the width information W2 of the rectangular frame 205. The coordinate information of the answer lines is recorded as M2 = [(X2, Y2), L2, W2];

[0089] The coordinate information of the answer connection line and the coordinate information of the first image block at both ends of the answer connection line are combined and stored in the format of (M1, M2).

[0090] In this embodiment, the preset vertex of the answer connection rectangle 205 is generally selected as the upper left vertex.

[0091] The processing procedure for the answer image in this embodiment includes:

[0092] See Figure 7 and Figure 9 As shown, based on the answer images, the answer lines are identified and the image blocks corresponding to both ends of each answer line are determined. The image block correspondence of each answer line includes:

[0093] Image 101 of the answer to the line-connecting question is extracted from the image of the test questions to be graded;

[0094] The answer image 101 is adjusted to obtain a preprocessed answer image that overlaps with the answer image 203 (e.g., ...). Figure 9 (as shown);

[0095] Establish a second coordinate system identical to the first coordinate system in the preprocessed response image;

[0096] Identify each second image block 102 corresponding to the question portion in the preprocessed answer image, and record the second image block coordinate information of each second image block 102 in the second coordinate system;

[0097] Identify the lines connecting answers in the preprocessed answer images and record the coordinate information of each line in the second coordinate system;

[0098] The coordinate information of the answer connection line and the coordinate information of the second image blocks at both ends of the answer connection line are combined and stored.

[0099] In this embodiment, the answer image 101 of the connecting question is cropped from the image of the test questions to be graded. The length-to-width ratio of the cropped answer image 101 is equal to the length-to-width ratio of the answer image 203, ensuring that the connecting question is completely cropped. Then, the answer image 101 is adjusted, including proportionally enlarging and shrinking the image, so that the answer image 101 overlaps with the answer image 203. In addition, the connecting question in the answer image 101 and the answer image 203 in this embodiment must maintain the same layout, that is, both are left-right column layout or both are top-bottom row layout. Specifically, the coordinate information of the second image block includes the vertex coordinates (X1', Y1') on the second image block 102 corresponding to the preset vertex (X1, Y1) of the first image block 204, as well as the length information L1' and width information W1' of the second image block 102. The coordinate information of the second image block 102 is recorded as M1' = [(X1', Y1'), L1', W1'];

[0100] A rectangular frame 103 for answering lines is constructed with the answering lines as diagonals. The coordinate information of the answering lines includes the coordinates (X2', Y2') of the vertex corresponding to the preset vertex (X2, Y2) of the answering line rectangle 103, as well as the length information L2' and the width information W2' of the answering line rectangle. The coordinate information of the answering lines is recorded as M2' = [(X2', Y2'), L2', W2'];

[0101] The coordinate information of the answer connection line and the coordinate information of the second image blocks at both ends of the answer connection line are combined and stored in the format of (M1', M2').

[0102] This embodiment describes matching the image patch correspondence of each answer line in the same question with the image patch correspondence of each answer line. If the match is successful, the connection is correct; otherwise, a "match failed" message is returned.

[0103] Match the image patch correspondence (M1', M2') of the answer connection line with the image patch correspondence (M1, M2) of the answer connection line respectively;

[0104] If M1' = M1 and M2' = M2, then the match is successful and the connection is correct; otherwise, the match fails and a "match failed" message is returned.

[0105] As an optional implementation of this embodiment, this embodiment performs OCR recognition on the answer image 101, and divides the answer image 101 into several image blocks according to the OCR recognition result; identifies the answer lines in the answer image 101, and selects the image blocks closest to the two endpoints of the answer lines as the second image blocks. Since the answer lines for the connection questions are all hand-drawn by students, it is impossible to maintain standardization or consistency. Therefore, in order to better locate the first and second image blocks corresponding to the two ends of the answer lines, the image blocks closest to the two endpoints of the answer lines are selected as the second image blocks.

[0106] OCR (Optical Character Recognition) refers to the process by which electronic devices (such as scanners or digital cameras) examine printed characters on paper, determine their shapes by detecting dark and light patterns, and then translate the shapes into computer text using character recognition methods. In other words, for printed characters, optical methods are used to convert the text in paper documents into black and white dot matrix image files, and recognition software converts the text in the image into text format for further editing and processing by word processing software.

[0107] The main OCR process can be roughly divided into the following parts: image preprocessing; layout processing; image segmentation; feature extraction and model training; and post-recognition processing.

[0108] Image preprocessing

[0109] Because the thickness, smoothness, and printing quality of paper can all cause text distortion, resulting in interference such as broken strokes, merging, and smudges, noisy text images must be processed before text recognition. Preprocessing generally includes grayscale conversion, binarization, tilt detection and correction, line and character segmentation, image smoothing, normalization, etc.

[0110] Page layout

[0111] Page layout processing can generally be divided into three main parts: page layout analysis, page layout understanding, and page layout reconstruction.

[0112] Page Layout Analysis

[0113] The text image is segmented into different parts, and the attributes of each part are labeled, such as text, image, and table. Currently, the core idea of ​​layout analysis is based on connected component analysis, and later derived layout analysis methods based on neural networks are also based on connected components. A connected component is defined as the region in the image where any pixel in the binary matrix after binarization is considered connected if all pixels surrounding it have the same pixel value. The attributes of the connected component can be marked based on characteristics such as its size or pixel distribution, which can then be used as a basis for further processing.

[0114] Page layout understanding

[0115] Obtain the article's logical structure, including the logical attributes of each section, the article's hierarchical relationships, and the reading order. Determine the sequence to which the connected components belong based on the connected component location information recorded during page layout analysis.

[0116] Page layout redesign

[0117] Based on the layout analysis and OCR results, an electronic document containing textual and layout information is reconstructed.

[0118] Image segmentation

[0119] Image segmentation can be broadly categorized into two main types: row (column) segmentation and character segmentation. Only after segmentation can individual characters be easily recognized and processed.

[0120] Feature extraction and model training

[0121] Before deep learning was widely applied in image recognition, template matching was a common method. Later, the resurgence of neural networks brought a new lease on life to OCR. Now, with the improvement of computer hardware computing power, deep neural networks trained on large amounts of data have achieved remarkable results in image recognition.

[0122] The image block in this embodiment is the image result after layout analysis and processing in the OCR recognition process. See [link / reference] Figure 11 The image processing effect shown.

[0123] Furthermore, since the answer lines for the matching questions are all hand-drawn by students, it is impossible to maintain standardization or consistency. Therefore, in order to better locate the second image blocks corresponding to both ends of the answer lines, as an optional implementation method in this embodiment, the identification of the answer lines in the answer image and the selection of the image blocks closest to the two endpoints of the answer lines as the second image blocks includes:

[0124] Identify all the answer lines for a single matching question in the answer image;

[0125] Draw multiple initial rectangles with each answer line as its diagonal;

[0126] When the connecting question is a left-right connecting question, the corrected horizontal side length is obtained by summing up the horizontal side lengths of multiple initial rectangles and calculating the average value.

[0127] The horizontal side length of each initial rectangle is corrected to obtain the corrected horizontal side length. The position of the corrected rectangle is translated so that the center of the answer line coincides with the center of the diagonal of the corrected rectangle.

[0128] The image blocks closest to the two endpoints of the diagonal line connecting the answer are selected as the first image block and the second image block, respectively.

[0129] As an optional implementation of this embodiment, the step of identifying the answer connection line in the answer image and selecting the image block closest to both endpoints of the answer connection line as the second image block includes:

[0130] Identify all the answer lines for the connected questions in the answer image;

[0131] Draw multiple initial rectangles using each answer curve as its diagonal;

[0132] When the connection question is a vertical connection question, the vertical side lengths of multiple initial rectangles are summed and the average value is calculated to obtain the corrected vertical side length;

[0133] The vertical side length of each initial rectangle is corrected to obtain a corrected rectangle. The position of the corrected rectangle is translated so that the center of the answer line coincides with the center of the diagonal of the corrected rectangle.

[0134] The image blocks closest to the two endpoints of the diagonal line connecting the answer are selected as the first image block and the second image block, respectively.

[0135] As an optional implementation of this embodiment, in the process of calculating the average of the horizontal side lengths of multiple initial rectangles to obtain the corrected horizontal side length, or calculating the average of the vertical side lengths of multiple initial rectangles to obtain the corrected vertical side length, the horizontal side lengths or vertical side lengths are subtracted pairwise to obtain the length difference value. The length difference value is compared with a preset difference threshold, and the horizontal side lengths or vertical side lengths with larger length deviations are filtered out and discarded when calculating the average. This is mainly because the answer lines are generally drawn by students, and there are bound to be answer lines with larger deviations. Such answer curves will increase the correction error when correcting, so they need to be discarded.

[0136] As another implementation of this embodiment, the automatic grading method for matching questions described in this embodiment includes obtaining the image block correspondence of the answer lines for the matching questions, which includes:

[0137] Construct a link-connection question resource library that stores the image patch correspondences of the link-connection questions and the answers to each question;

[0138] The system identifies the matching questions in the answer image and retrieves the corresponding matching question resources from the matching question resource library. The system then obtains the image patch correspondence of the answer lines in the matching question from the retrieved matching question resources.

[0139] This embodiment also provides an automatic grading device for online test questions, including:

[0140] The answer image acquisition module captures the answer images of the matching questions;

[0141] The image processing module identifies the connecting questions in the answer image and retrieves the answers from the question database. Based on the answers to the connecting questions, it obtains the correspondence between the image blocks at both ends of each answer connecting line. It also identifies the answer connecting lines in the answer image and determines the image blocks corresponding to both ends of each answer connecting line, thus obtaining the correspondence between the image blocks of each answer connecting line.

[0142] The judgment and processing module matches the image block correspondence of each answer line in the same question with the image block correspondence of each answer line. If the match is successful, the line is correct; otherwise, it returns "match failed".

[0143] This invention proposes an automatic grading device for connection-based test questions based on resources. The term "resource-based" means that the answers to the connection-based test questions can be obtained. By matching the answers to the connection-based test questions with the correct answers, automatic grading of the connection-based test questions can be achieved.

[0144] To achieve matching between the answer and the answer, this invention identifies the answer lines based on the answer image and determines the image blocks corresponding to the two ends of each answer line, thus obtaining the image block correspondence of each answer line; it then obtains the image block correspondence of the answer lines of the connection question; and finally matches the image block correspondence of each answer line with the image block correspondence of each answer line. Based on the characteristics of the connection question, the answer and the answer are compared by comparing the image block correspondence in the answer image and the image block correspondence of the answer to determine whether the answer and the answer match.

[0145] The automatic grading device for matching questions in this invention, based on the structural characteristics of matching questions and utilizing question resources in a question database, achieves automatic grading of matching questions with accurate and reliable results. Therefore, this automatic grading device can assist teachers in automatically grading matching questions, reducing their workload and significantly improving their grading efficiency.

[0146] This embodiment also provides a storage medium storing a computer-executable program, which, when executed, implements the automatic grading method for the connected test questions.

[0147] The storage medium described in this embodiment may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0148] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory is used to store a computer-executable program, and when the computer program is executed by the processor, the processor executes the automatic grading method for the online test questions.

[0149] The electronic device is manifested in the form of a general-purpose computing device. It may contain one or more processors that work collaboratively. This invention also does not preclude distributed processing, meaning that processors may be distributed across different physical devices. The electronic device of this invention is not limited to a single entity, but may also be the sum of multiple physical devices.

[0150] The memory stores a computer-executable program, typically machine-readable code. The computer-readable program can be executed by the processor to enable the electronic device to perform the method of the present invention, or at least some steps of the method.

[0151] The memory includes volatile memory, such as random access memory (RAM) and / or cache memory, and may also be non-volatile memory, such as read-only memory (ROM).

[0152] It should be understood that the electronic device of the present invention may also include elements or components not shown in the examples above. For example, some electronic devices also include display units such as a display screen, and some electronic devices also include human-computer interaction elements such as buttons and keyboards. Any electronic device capable of executing a computer-readable program in its memory to implement the method of the present invention or at least some steps of the method can be considered as an electronic device covered by the present invention.

[0153] From the above description of the embodiments, those skilled in the art will readily understand that the present invention can be implemented by hardware capable of executing specific computer programs, such as the system of the present invention, and the electronic processing unit, server, client, mobile phone, control unit, processor, etc. included in the system. The present invention can also be implemented by computer software that executes the methods of the present invention, for example, by control software executed by a microprocessor, electronic control unit, client, server, etc. However, it should be noted that the computer software executing the methods of the present invention is not limited to execution in one or a specific set of hardware entities; it can also be implemented in a distributed manner by unspecified hardware. For computer software, the software product can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or distributed across a network, as long as it enables electronic devices to execute the methods according to the present invention.

[0154] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described herein. Although the present invention has been described in detail with reference to the above embodiments, the present invention is not limited to the specific embodiments described above. Therefore, any modifications or equivalent substitutions to the present invention, as well as all technical solutions and improvements that do not depart from the spirit and scope of the invention, are covered within the scope of the claims of the present invention.

Claims

1. An automatic grading method for matching questions, characterized in that, include: Get the answer images for the matching questions; Based on the answer images, identify the answer lines and determine the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line; Obtain the corresponding image blocks of the lines connecting the answers to the matching questions; Match the image patch correspondence of each answer line in the matching test with the image patch correspondence of each answer line. If the match is successful, the line is correct; otherwise, return "match failed". The step of identifying the answer lines based on the answer images and determining the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line includes: Establish the first coordinate system within the answer image; Identify each first image block corresponding to the question portion in the answer image, and record the coordinate information of each first image block in the first coordinate system; Identify the lines connecting the answers in the answer image and record the coordinates of each line in the first coordinate system; Combine and store the coordinate information of the answer connection line and the coordinate information of the first image block at both ends of the answer connection line; The first image block coordinate information includes the vertex coordinates (X1, Y1) of the preset vertex of the first image block, as well as the length information L1 and the width information W1 of the first image block. The first image block coordinate information is recorded as M1 = [(X1, Y1), L1, W1]; Construct an answer connection rectangle with the answer connection line as the diagonal. The answer connection line coordinate information includes the vertex coordinates (X2, Y2) of the preset vertex of the answer connection rectangle, as well as the length information L2 and the width information W2 of the answer connection rectangle. The answer connection line coordinate information is recorded as M2 = [(X2, Y2), L2, W2]; The coordinate information of the answer connection line and the coordinate information of the first image block at both ends of the answer connection line are combined and stored in the format of (M1, M2); The step of identifying the answer lines based on the answer images and determining the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line includes: The answer image for the matching question is cropped from the image of the test questions to be graded; The answer image is adjusted to obtain a preprocessed answer image that overlaps with the answer image; Establish a second coordinate system identical to the first coordinate system in the preprocessed response image; Identify each second image block corresponding to the question portion in the preprocessed answer image, and record the coordinate information of each second image block in the second coordinate system; Identify the lines connecting answers in the preprocessed answer images and record the coordinate information of each line in the second coordinate system; The coordinate information of the answer connection line and the coordinate information of the second image blocks at both ends of the answer connection line are combined and stored; The second image block coordinate information includes the vertex coordinates (X1', Y1') on the second image block corresponding to the preset vertex (X1, Y1) of the first image block, as well as the length information L1' and width information W1' of the second image block. The second image block coordinate information is recorded as M1' = [(X1', Y1'), L1', W1']; Construct a rectangular frame for answer connection with the answer connection line as the diagonal. The coordinate information of the answer connection line includes the coordinates (X2', Y2') of the vertex corresponding to the preset vertex (X2, Y2) of the answer connection line rectangle, as well as the length information L2' and the width information W2' of the answer connection line rectangle. The coordinate information of the answer connection line is recorded as M2' = [(X2', Y2'), L2', W2']; The coordinate information of the answer connection line and the coordinate information of the second image blocks at both ends of the answer connection line are combined and stored in the format of (M1', M2'); The image patch correspondences of each answer line in the same matching question are matched with the image patch correspondences of each answer line. If a match is successful, the line is considered correct; otherwise, a "match failed" message is returned. Match the image patch correspondence (M1', M2') of the answer connection line with the image patch correspondence (M1, M2) of the answer connection line respectively; If M1' = M1 and M2' = M2, then the match is successful and the connection is correct; otherwise, the match fails and a "match failed" message is returned.

2. The automatic grading method for matching questions according to claim 1, characterized in that, The image patch correspondence for obtaining the answer lines of the matching test questions includes: Construct a question database containing a massive amount of online question resources; Identify the matching questions in the answer images and search the question database to find the corresponding matching question resources; The answer portion of the matching question resource is extracted to obtain the answer image of the matching question; Identify the lines connecting the answers from the answer images and determine the corresponding image blocks at both ends of each line to obtain the image block correspondence between the lines connecting the answers.

3. The automatic grading method for matching questions according to claim 1, characterized in that, The image patch correspondence for obtaining the answer lines of the matching test questions includes: Construct a link-connection question resource library that stores the image patch correspondences of the link-connection questions and the answers to each question; The system identifies the matching questions in the answer image and retrieves the corresponding matching question resources from the matching question resource library. The system then obtains the image patch correspondence of the answer lines in the matching question from the retrieved matching question resources.

4. An automatic grading device for matching test questions, characterized in that, include: The answer image acquisition module captures the answer images of the matching questions; The image processing module identifies the connecting questions in the answer image and retrieves the answers from the question database. Based on the answers to the connecting questions, it obtains the correspondence between the image blocks at both ends of each answer connecting line. It also identifies the answer connecting lines in the answer image and determines the image blocks corresponding to both ends of each answer connecting line, thus obtaining the correspondence between the image blocks of each answer connecting line. The judgment and processing module matches the image block correspondence of each answer line in the same question with the image block correspondence of each answer line. If the match is successful, the line is correct; otherwise, it returns "match failed". The step of identifying the answer lines based on the answer images and determining the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line includes: Establish the first coordinate system within the answer image; Identify each first image block corresponding to the question portion in the answer image, and record the coordinate information of each first image block in the first coordinate system; Identify the lines connecting the answers in the answer image and record the coordinates of each line in the first coordinate system; Combine and store the coordinate information of the answer connection line and the coordinate information of the first image block at both ends of the answer connection line; The first image block coordinate information includes the vertex coordinates (X1, Y1) of the preset vertex of the first image block, as well as the length information L1 and the width information W1 of the first image block. The first image block coordinate information is recorded as M1 = [(X1, Y1), L1, W1]; Construct an answer connection rectangle with the answer connection line as the diagonal. The answer connection line coordinate information includes the vertex coordinates (X2, Y2) of the preset vertex of the answer connection rectangle, as well as the length information L2 and the width information W2 of the answer connection rectangle. The answer connection line coordinate information is recorded as M2 = [(X2, Y2), L2, W2]; The coordinate information of the answer connection line and the coordinate information of the first image block at both ends of the answer connection line are combined and stored in the format of (M1, M2); The step of identifying the answer lines based on the answer images and determining the image blocks corresponding to both ends of each answer line to obtain the image block correspondence of each answer line includes: The answer image for the matching question is cropped from the image of the test questions to be graded; The answer image is adjusted to obtain a preprocessed answer image that overlaps with the answer image; Establish a second coordinate system identical to the first coordinate system in the preprocessed response image; Identify each second image block corresponding to the question portion in the preprocessed answer image, and record the coordinate information of each second image block in the second coordinate system; Identify the lines connecting answers in the preprocessed answer images and record the coordinate information of each line in the second coordinate system; The coordinate information of the answer connection line and the coordinate information of the second image blocks at both ends of the answer connection line are combined and stored; The second image block coordinate information includes the vertex coordinates (X1', Y1') on the second image block corresponding to the preset vertex (X1, Y1) of the first image block, as well as the length information L1' and width information W1' of the second image block. The second image block coordinate information is recorded as M1' = [(X1', Y1'), L1', W1']; Construct a rectangular frame for answer connection with the answer connection line as the diagonal. The coordinate information of the answer connection line includes the coordinates (X2', Y2') of the vertex corresponding to the preset vertex (X2, Y2) of the answer connection line rectangle, as well as the length information L2' and the width information W2' of the answer connection line rectangle. The coordinate information of the answer connection line is recorded as M2' = [(X2', Y2'), L2', W2']; The coordinate information of the answer connection line and the coordinate information of the second image blocks at both ends of the answer connection line are combined and stored in the format of (M1', M2'); The image patch correspondences of each answer line in the same matching question are matched with the image patch correspondences of each answer line. If a match is successful, the line is considered correct; otherwise, a "match failed" message is returned. Match the image patch correspondence (M1', M2') of the answer connection line with the image patch correspondence (M1, M2) of the answer connection line respectively; If M1' = M1 and M2' = M2, then the match is successful and the connection is correct; otherwise, the match fails and a "match failed" message is returned.

5. A storage medium storing a computer-executable program, wherein when the computer-executable program is executed, it implements the automatic grading method for matching test questions as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Question processing method and device, electronic equipment and computer storage medium

    CN112949616A