Method, device and equipment for processing test paper images

By using the test paper particle size analysis method in the online education platform, the test paper images are structured to identify the question set, and the electronic test paper documents are integrated in the order of page numbers, which solves the problem that the overall content of the test paper and the question context relationship in the existing technology are not effectively considered. The problem has achieved more accurate problem identification and integration effects.

CN114581934BActive Publication Date: 2025-02-18ALIBABA (CHINA) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210158414.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2025-02-18
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

When processing test paper images, the existing online education platform mainly analyzes the question granularity, and cannot effectively consider the overall content of the test paper and the contextual relationship between the questions, resulting in the inaccurate set of identified questions.

Method used

The method of analyzing the test paper grain size is adopted. By obtaining the test paper image collection, structured analysis is performed to identify the question collection, and electronic test paper documents are generated in the order of page numbers.

Benefits of technology

More accurate question identification and integration is achieved, and the contextual relationship between the overall content of the test paper and the questions can be better considered, and adapt to the business needs of the online education platform for the overall content of the test paper.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114581934B_ABST
    Figure CN114581934B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a method, device and equipment for processing test paper images, including: obtaining a set of test paper images corresponding to the test paper; performing structured analysis on each test paper image in the set of test paper images to obtain a set of questions contained in each test paper image; integrating the set of questions corresponding to each test paper image according to the order of page numbers corresponding to each test paper image to generate an electronic test paper document corresponding to the test paper.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of image processing, and in particular, to methods, devices, and equipment for processing test paper images. Background Art

[0002] In related technologies, with the popularization of the Internet and the increasing development of Internet technology, various online education platforms have emerged. Online education has become more and more popular due to its advantages such as being free from time and location restrictions. In online education scenarios, in addition to online teaching, business processing for test papers is also a very important component. For example, users upload test paper images to online education platforms, and online education platforms process the images, obtain the questions in the images, and perform subsequent business processing based on the obtained questions. Summary of the invention

[0003] In view of this, one or more embodiments of this specification provide a method, device and apparatus for processing test paper images.

[0004] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of this specification, a method for processing a test paper image is proposed, comprising:

[0006] Get the test paper image set corresponding to the test paper;

[0007] Performing structural analysis on each test paper image in the test paper image set to obtain a set of questions contained in each test paper image;

[0008] The question sets corresponding to the test paper images are integrated according to the page number sequence of the page numbers corresponding to the test paper images to generate an electronic test paper document corresponding to the test paper.

[0009] According to a second aspect of one or more embodiments of this specification, a test paper image processing device is provided, comprising:

[0010] An acquisition module, used to acquire a set of test paper images corresponding to the test paper;

[0011] An analysis module, used for performing structural analysis on each test paper image in the test paper image set to obtain a set of questions contained in each test paper image;

[0012] The generating module is used to integrate the question sets corresponding to each test paper image according to the page number sequence of the page numbers corresponding to each test paper image, so as to generate an electronic test paper document corresponding to the test paper.

[0013] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0014] processor;

[0015] a memory for storing processor-executable instructions;

[0016] Wherein, the processor implements the above-mentioned test paper image processing method by running the executable instructions.

[0017] According to a fourth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the above-mentioned method for processing the test paper image is implemented.

[0018] In this specification, the online education platform obtains a set of test paper images corresponding to the test paper, and performs structural analysis on each test paper image in the test paper image set to obtain a set of questions contained in each test paper image. The online education platform integrates the set of questions corresponding to each test paper image according to the page number sequence corresponding to each test paper image to generate an electronic test paper document corresponding to the test paper.

[0019] Since the online education platform first performs a structural analysis on a single-page test paper image to obtain a set of questions corresponding to the single-page test paper image, and then integrates the set of questions corresponding to multiple-page test paper images, the online education platform of this specification provides a method for analyzing at the test paper granularity. Taking the test paper as the granularity can consider the contextual relationship between questions and the overall content of the test paper questions, so that the identified question set is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a network architecture diagram of an online education system shown in an exemplary embodiment of this specification;

[0021] Figure 2 is a flow chart of a method for processing a test paper image shown in an exemplary embodiment of this specification;

[0022] Figure 3 is a schematic diagram of a test paper image shown in an exemplary embodiment of this specification;

[0023] Figure 4 is a schematic diagram of another test paper image shown in an exemplary embodiment of this specification;

[0024] Figure 5 It is a schematic diagram of the structured attributes of a test paper title and questions shown in an exemplary embodiment of this specification;

[0025] Figure 6 is a hardware structure diagram of a device shown in an exemplary embodiment of this specification;

[0026] Figure 7 It is a block diagram of a test paper image processing device shown as an exemplary embodiment of this specification. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0028] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0029] Traditional online education platforms usually analyze questions at the granularity of questions, so online education platforms usually support related processing services for question images, such as users taking photos to search for questions.

[0030] On the one hand, analysis based on the granularity of the topic can obtain the relationship chain between users and topics, but such a relationship chain cannot fully and accurately describe and characterize the user.

[0031] On the other hand, with the rapid development of online education, business needs for the overall content of test papers have emerged. For example, electronic test papers can be generated based on test paper images uploaded by users. Various analyses of electronic test papers (such as test paper difficulty, subject section analysis, etc.) can be performed. Under such requirements, the analysis method based on the granularity of questions is no longer applicable.

[0032] In view of this, this specification proposes a method for processing test paper images. In this specification, the online education platform obtains a set of test paper images corresponding to the test paper, and performs structural analysis on each test paper image in the test paper image set to obtain a set of questions contained in each test paper image. The online education platform integrates the set of questions corresponding to each test paper image according to the page number sequence corresponding to each test paper image to generate an electronic test paper document corresponding to the test paper.

[0033] Since the online education platform first performs a structured analysis on the single-page test paper image to obtain the question set corresponding to the single-page test paper image, and then integrates the question set corresponding to the multi-page test paper image, the online education platform of this specification provides a method for analysis at the test paper granularity. On the one hand, analysis at the test paper granularity can obtain a more complete relationship chain of users, test papers, and questions, which can better help the online education platform describe and characterize users. On the other hand, using the test paper as the granularity can consider the contextual relationship between questions and the overall content of the test paper questions, so that the identified question set is more accurate and more adapted to the business needs for the overall content of the test paper.

[0034] See also Figure 1 , Figure 1 It is a network architecture diagram of an online education system shown in an exemplary embodiment of this specification.

[0035] like Figure 1 As shown, the online education system includes: an online education platform and several electronic devices.

[0036] Among them, the online education platform is a platform for processing online education business and is the backend of the online education business. The online education platform can be built by a device with computing capabilities. For example, the device with computing capabilities can be a physical server containing an independent host, or a virtual server, a server cluster, a data center, a computer, etc. The online education platform is described here by way of example and is not specifically limited.

[0037] Several electronic devices are the front-ends of online education services. For example, electronic devices can refer to user terminals that have online education clients installed or log in to online education web pages. User terminals include: mobile phones, tablet devices, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc. User terminals are only exemplarily described here without specific limitations.

[0038] In the online education system, the electronic device can send an image to the online education platform. The online education platform can obtain a set of test paper images corresponding to the test paper, and perform structural analysis on each test paper image in the test paper image set to obtain a set of questions contained in each test paper image. The online education platform can integrate the set of questions corresponding to each test paper image according to the page number sequence of the page numbers corresponding to each test paper image to generate an electronic test paper document corresponding to the test paper.

[0039] See also Figure 2 , Figure 2This is a flowchart of a method for processing a test paper image shown in an exemplary embodiment of this specification. The method can be applied to an online education platform in the above-mentioned online education system, and may include the following steps.

[0040] Step 202: Obtain a set of test paper images corresponding to the test paper.

[0041] In an optional implementation, in actual applications, due to user mistaken uploading and other operations, the images uploaded by users are not necessarily test paper images containing test questions. For example, users may upload images that are completely unrelated to the test paper, answer sheets and other non-test paper images to the online education platform.

[0042] Therefore, in the embodiment of the present specification, the online education platform needs to filter out the test paper images from the images uploaded by the users to form a test paper image set, and then perform subsequent processing based on the test paper image set.

[0043] During implementation, the online education platform can obtain at least one image uploaded by a user terminal, extract identification features from the at least one image, identify the test paper image in the at least one image based on the extracted identification features, and create a test paper image set based on the identified test paper image.

[0044] In an optional implementation, in order to make the recognition of the test paper image more accurate, the above recognition features include: image features and text features. Of course, the above recognition features may also include image features or text features, and the test paper image is recognized from at least one image uploaded by the user only by one of the image features or the text features.

[0045] Taking the recognition features as image features and text features as an example, the following describes in detail "extracting recognition features from the at least one image, and recognizing the test paper image in the at least one image based on the extracted recognition features" through steps A1 to A2.

[0046] Step A1: extracting image features from the at least one image, and identifying candidate images related to the test paper in the at least one image based on the image features.

[0047] In implementation, for each of the at least one image, the online education platform may extract the image features of the image based on the image feature extraction model. The image features of the image are then input into the trained first classification model, and the first classification model outputs the probability that the image is a candidate image related to the test paper, and the probability that the image is a non-candidate image not related to the test paper. When the probability that the image is a candidate image is greater than a preset threshold, the online education platform determines the image as a candidate image.

[0048] The candidate images related to the test paper refer to candidate images related to the test paper, such as test paper images, answer sheet images, etc. Here, the candidate images related to the test paper are merely exemplarily described without any specific limitation.

[0049] The first classification model is trained by two sample label pairs, one of which has image features of images related to the test paper and labels of candidate images, and the other has image features of images unrelated to the test paper and labels of non-test paper images.

[0050] The above-mentioned image feature extraction model may refer to a model that can extract image features. For example, the image feature extraction model may be a convolutional neural network or a ResNet (residual neural network), etc. Here, the image feature extraction model is only exemplarily described without specific limitation.

[0051] In addition, in actual applications, the online education platform can also determine the candidate images by feature matching. Here, “identifying the candidate image related to the test paper in the at least one image based on the image features” is only exemplified without specific limitation.

[0052] Step A2: Perform optical character recognition on the candidate image to obtain a number of text boxes corresponding to the candidate image, extract text features from the text boxes, and further identify the test paper image from the candidate image based on the image features and the text features extracted from the candidate image.

[0053] In implementation, for each candidate image, the online education platform can perform OCR (Optical Character Recognition) on the candidate image to obtain a number of text boxes corresponding to the candidate image. Figure 3 As shown, Figure 3 The solid-line boxes in are several text boxes obtained by performing OCR recognition on the candidate images.

[0054] Then, the online education platform can extract text features from the text box. The online education platform can splice the text features and image features of the candidate image, and input the splicing result into the trained second classification model. The second classification model can output the probability that the candidate image is a test paper image, and the probability that the candidate image is an answer sheet. When the probability that the candidate image is a test paper image is greater than a preset threshold, the online education platform can determine the candidate image as a test paper image.

[0055] The second classification model is obtained by training two sample label pairs, one of which is the image feature of the test paper image and the label is the test paper, and the other is the image feature of the answer sheet image and the label is the answer sheet.

[0056] Of course, in actual applications, the online education platform determines whether the candidate image is a test paper image by feature matching based on the image features and text features of the candidate image. This is just an exemplary explanation and is not specifically limited.

[0057] In the embodiment of this specification, step A2 is mainly used to distinguish between the test paper image and the answer sheet, so the above text features are text features used to distinguish between the test paper image and the answer sheet. For example, the text information and the location of the text information on the test paper image and the answer sheet are different. For another example, the number and distribution of printed text and handwritten text on the test paper image and the answer sheet are different, for example, there are more printed text on the test paper image, and more handwritten text on the answer sheet.

[0058] Based on the difference between test paper images and answer sheets, the text features set in this specification may include any one or more combinations of the following: text information contained in the image, the position of each text information in the image, the proportion of handwritten text and printed text in the image, and the position distribution of printed text in the image.

[0059] In addition, it should be noted that when selecting test paper images from at least one test paper image uploaded by the user, on the one hand, this specification uses a combination of image features and text features to filter images and answer sheets that are not related to the test paper, and select test paper images. Since this specification uses features of multiple dimensions to describe images, the accuracy of the test paper images selected from at least one image uploaded by the user is higher. On the other hand, compared to directly selecting test paper images from at least one image based on image features and text features of the image, this specification first selects candidate images from at least one image through the image features of the image, and then performs OCR recognition on the candidate images, and selects test paper images from the candidate images based on text features and image features. This secondary screening method can eliminate the workload of extracting text features of most non-candidate images, splicing text features and image features of non-candidate images, and can effectively reduce the computational complexity of the online education platform.

[0060] It should be noted that only one method of obtaining a test paper image set is shown here. Of course, in actual applications, the user terminal may prompt the user to upload a test paper image before each user uploads an image. Alternatively, the user terminal may first detect the image to be uploaded by the user. When it is detected that the image to be uploaded by the user is a test paper image, the user terminal sends the test paper image to the online education platform. In this case, since the user terminal uploads test paper images to the online education platform, the online education platform can receive the test paper images uploaded by the user terminal to form a test paper image set. Here, only an exemplary description is given of obtaining a test paper image set corresponding to the test paper, and no specific limitation is imposed on it.

[0061] Step 204: Perform structural analysis on each test paper image in the test paper image set to obtain a set of questions contained in each test paper image.

[0062] Among them, structured analysis refers to identifying and correcting the text contained in each test paper image, and structurally representing the test paper based on the correction results.

[0063] In implementation, the online education platform identifies key text boxes from the text boxes corresponding to each test paper image, and partitions the test paper image by the key text boxes to obtain a test question area containing at least one question. Then, the online education platform extracts each question from the test question area to form a set of questions corresponding to the test paper image.

[0064] Step 204 is described in detail below through steps B1 to B4.

[0065] Step B1: for each test paper image, a key text box is determined from a number of text boxes obtained by performing OCR recognition on the test paper image, and a test question area is located from the test paper image based on the key text box.

[0066] The following describes step B1 in detail through step B11 to step B12.

[0067] Step B11: for each test paper image, determine a key text box from a number of text boxes obtained by performing OCR recognition on the test paper image.

[0068] In step 202, the online education platform performs OCR recognition on each candidate image to obtain a number of text boxes corresponding to each candidate image, that is, each candidate image corresponds to at least one text box. It can be seen that when a candidate image is determined to be a test paper image, the number of text boxes corresponding to the candidate image is the number of text boxes corresponding to the test paper image.

[0069] For each test paper image, a key text box is determined from a number of text boxes corresponding to the test paper image.

[0070] In this specification, key text boxes include multiple types of text boxes. For example, key text boxes in this specification may include: test paper title text box, question type text box, and footer text box.

[0071] The title text box refers to a text box containing the title of the topic. Figure 3 As shown, the title of the test paper is "Zhouli Middle School Senior Fourth Monthly Examination High School First Grade Mathematics Test Paper", so the text box containing "Zhouli Middle School Senior Fourth Monthly Examination" and the text box containing "High School First Grade Mathematics Test Paper" are determined as the test paper title text boxes.

[0072] The question type text box refers to a text box containing the question type. The question types may include: multiple choice questions, non-multiple choice questions, and essay questions. This is just an example of the question type and does not specifically limit it. Figure 3 As shown, the question type text box is a text box that contains "I. Multiple choice questions: This part has 12 questions in total...", which is the question type text box.

[0073] The footer text box is a text box that contains the page number. For example, Figure 3 As shown, the footer text box can be Figure 3 The text box in the form contains "Page 1 of 6".

[0074] In the embodiment of the present specification, the key text box can be determined from several text boxes corresponding to the test paper image by means of feature comparison.

[0075] For example, if the key text box contains multiple key text boxes, the text box features corresponding to the key text box are set for each key text box. The online education platform can establish a standard text box feature library for each key text box. When establishing, the online education platform can use the features corresponding to different key text boxes in the standard test paper in the sample as standard text box features. Then, for each text box corresponding to the test paper image, the online education platform extracts the text box features of the text box, calculates the similarity between the text box features and the standard text box features, and when the similarity is greater than the preset threshold, determines that the text box is this type of key text box.

[0076] For example, key text boxes include the test title text box, question type text box, and footer text box.

[0077] Taking the footer text box as an example, text box features that match the footer text box can be set. For example, the text box features of the footer text box are: a feature used to indicate that the text contains the specified characters of "Page XX of XX pages", a feature used to indicate the lower position of the text box in the test paper image, a feature used to indicate the percentage of the text box height to the test paper image height, and a feature used to indicate the percentage of the text box width to the test paper width.

[0078] The online education platform can extract the above text box features from the footer text box in the standard test paper in the sample, and use the extracted text box features as standard text box features to form a standard text box feature library. Then, the online education platform extracts the above text box features for each text box in the test paper image uploaded by the user, and then calculates the similarity between the extracted text box features and the standard text box features. When the similarity calculation is greater than a preset threshold, the text box is determined to be a footer text box.

[0079] Similarly, the online education platform can also set corresponding text box features for the test paper title text box, and set corresponding text box features for the question type text box, and determine these two types of text boxes through the above-mentioned feature comparison method.

[0080] Of course, in practical applications, the classification model can also be pre-trained. After the text box features of any text box corresponding to the test paper image are input into the classification model, the classification model can output the probability value of the text box belonging to various key text boxes. When the probability value of belonging to a certain key text box is greater than a preset threshold, it is determined that the text box belongs to the key text box of that type. For example, the classification model outputs that the probability of the text box belonging to the test title text box is 80%, the probability of belonging to the page script text box is 5%, and the probability of belonging to the question type text box is 5%. The preset threshold is 70%, then it is determined that the text box belongs to the test title text box.

[0081] Step B12: Locate the test question area from the test paper image based on the key text box.

[0082] The question area refers to an area containing several questions.

[0083] During implementation, the online education platform may determine the area between two adjacent question type text boxes as the test question area, and / or the online education platform may determine the area between the question type text box and the footer text box as the test question area.

[0084] For example, Figure 3 As shown, the online education platform can use the area between the question type text box (i.e., the text box containing "Multiple choice question: This question has 12 questions...") and the footer text box (i.e., the text box containing "Page 1 of 6 pages") as the test question area. Figure 3 The area encircled by the dotted line.

[0085] Step B2: extracting morphological features corresponding to at least one text box contained in the test question area; and semantic features corresponding to the text contained in the at least one text box, and based on the morphological features and the semantic features, identifying a reference text box as a question segmentation point from the at least one text box.

[0086] In the embodiment of this specification, since the reference text box is a text box representing the segmentation point of the question, the reference text box needs to have the characteristics of the segmentation point of the question. The online education platform can extract the features reflecting the characteristics of the segmentation point of the question to determine the reference text box from the several text boxes corresponding to the test paper image. Then, the reference text box is used as the segmentation point of the question to divide the test question area into several question areas.

[0087] The reference text box may be a text box indicating the beginning of a question or a text box indicating the end of a question.

[0088] For example, Figure 3 As shown in the text box "2. Inequality The solution set is ()" indicates the text box at the beginning of a question. This type of text box can be used as a benchmark text box.

[0089] For example, Figure 3 As shown, the text box containing "C, [0,1)∪(1,+∞)D, (-∞,0]∪[1,+∞)" indicates the text box at the end of a question, and this type of text box can also be used as a reference text box.

[0090] The reference text box is merely described here as an example and is not specifically limited.

[0091] The following describes step B2 in detail through step B21 to step B22.

[0092] Step B21: extracting the morphological features corresponding to at least one text box contained in the test question area; and the semantic features corresponding to the text contained in the at least one text box.

[0093] Since the morphological features and semantic features are used to determine the reference text frame as the topic segmentation point, the morphological features and phonetic features can express the characteristics of the topic segmentation point.

[0094] Among them, shape and position features refer to the shape features and position features of the text box.

[0095] The shape feature includes: a size feature that characterizes the relationship between the size of each text box and the size of the test paper image. For example, the size feature includes the ratio of the height of the text box to the height of the test paper image, etc. This is only an exemplary description and is not specifically limited.

[0096] Location features include one or more of the following combinations:

[0097] Positional features that characterize the positional relationship between text boxes.

[0098] Characterize the positional features of each text box in the test paper image where it is located;

[0099] Position features representing the positional relationship between each text box and a key text box marked on the test paper image;

[0100] The positional features of the positional relationship between the text boxes include: a feature indicating whether the current text box and the previous text box are in the same row, a feature indicating whether the current text box is the beginning of a new row, a feature indicating the distance between the current text box and the previous text box, etc. This is only an exemplary description and is not specifically limited.

[0101] The above-mentioned positional features characterizing the positional relationship between each text box and the key text box marked on the test paper image include: features characterizing the positional relationship between the current text box and the previous question type text box, and features characterizing the positional relationship between the current text box and the next question type text box. This is only an exemplary description and is not specifically limited.

[0102] The above semantic features include one or more combinations of the following: features indicating whether the text box contains specified characters and position features of the specified characters; features indicating whether the text information in the text box is semantically continuous with the text information in the previous text box.

[0103] The designated characters may be, for example, question numbers, option symbols (such as A, B, C, D), answer points (for example, in multiple-choice questions, the answer point is "()". For another example, in fill-in-the-blank questions, the answer point is "--"). The designated characters are merely exemplified here without any specific limitation.

[0104] It should be noted that, for example, if the reference text box is the question start text box, the text box contains the question number, and the text in the text box is not semantically continuous with the text in the previous text box. For another example, if the reference text box is the question end text box, the text box contains option D, and the text box is semantically continuous with the previous text box.

[0105] Step B22: Based on the morphological features and the semantic features, a reference text frame serving as a topic segmentation point is identified from the at least one text frame.

[0106] During implementation, the online education platform may input the morphological features and semantic features of each text box into the third classification model, and the third classification model may output the probability value that the text box is a benchmark text box. When the probability value is greater than a preset threshold, the online education platform may use the text box as a benchmark text box.

[0107] Step B3: Determine a text box set corresponding to each question included in the test question area based on the reference text box, and merge each text box in the text box set to obtain a question area corresponding to each question included in the test question area.

[0108] During implementation, the online education platform may regard the text box located between two reference text boxes and one of the two reference text boxes as a text box set corresponding to a topic.

[0109] The online education platform merges the text box sets corresponding to each question to obtain the question area corresponding to the question.

[0110] For example, when the reference text box is a topic start text box, the online education platform can take the text box between two topic start text boxes and the topic start text box located in the front position of the two topic start text boxes as a text box set corresponding to a topic. Then, the online education platform merges the text boxes in the text box set corresponding to the topic to obtain the topic area of ​​the topic.

[0111] like Figure 3 As shown, it is assumed that the starting text boxes of the two questions are text box 1 and text box 2 respectively.

[0112] Text box 1 is "2. Inequality The solution set is ().

[0113] Text box 2 is "3. Set A = {0, 1, 2}, if Then the number of sets B that meet the conditions is ()” and the converse of the proposition is ()”

[0114] The online education platform can use the text boxes between text box 1 and text box 2 (i.e., the text box containing "A, (-∞, 0]∪(1, +∞)B, [0, +∞)" and the text box containing "C, [0,1)∪(1, +∞)D, (-∞, 0]∪[1, +∞)") and the text box at the front of the two question start text boxes (i.e., text box 1) as the text box set for question 2.

[0115] Then, the online education platform merges the text boxes in the text box set of question 2 to obtain the question area of ​​question 2. For example, Figure 3 The dotted area where question 2 is located is the question area.

[0116] For another example, if the reference text box is a question end text box, the online education platform can treat the text box between two question end text boxes and the question end text box located at the rear of the two question end text boxes as a text box set corresponding to a question. Then, the online education platform merges the text boxes in the text box set corresponding to the question to obtain the test area of ​​the question.

[0117] like Figure 3 As shown, it is assumed that the two question ending text boxes are text box 3 and text box 4 respectively.

[0118] Assume that text box 3 contains "A.{0}B.{-3,-4}C.{-1,-2}D. " text box;

[0119] Text box 4 is a text box containing "C, [0, 1) ∪ (1, +∞) D, (-∞, 0] ∪ [1, +∞)". The online education platform can include the text box between text box 3 and text box 4 (i.e., the text box containing "2, inequality"). The solution set is ()" and the text box containing "A, (-∞, 0] ∪ (1, +∞) B, [0, +∞)" and the text box at the back of the two question end text boxes (that is, the text box containing "C, [0,1) ∪ (1, +∞) D, (-∞, 0] ∪ [1, +∞)") are used as the text box set for Question 2.

[0120] Then, the online education platform merges the text boxes in the text box set of question 2 to obtain the question area of ​​question 2. For example, Figure 3 The dotted area where question 2 is located is the question area.

[0121] Step B4: Extracting questions from the question areas corresponding to the questions contained in the question area, and sorting the extracted questions based on the position order of the question areas in the question area to obtain a question set contained in the test paper image.

[0122] During implementation, the online education platform extracts a question from each question area in the test question area, and the question may include a question number and question content.

[0123] In actual applications, since there will be traces of user writing on the test paper image, the question numbers of some questions are difficult to identify, which will cause difficulties in sorting the questions based on the question numbers. Therefore, in this specification, the online education platform can sort the extracted questions according to the position order of the question area in the test question area. For example, the online education platform can sort the questions extracted from the question area according to the order of the question area from top to bottom in the test question area to obtain a set of questions contained in the test paper image.

[0124] like Figure 3 As shown, Figure 3 The test paper image shown contains 6 dotted boxes. The online education platform can sort the questions in the 6 dotted boxes in order from top to bottom to generate a question set for the test paper image.

[0125] Of course, in actual applications, the online education platform can also sort the questions according to the question numbers in the test paper image. The sorting method is explained here as an example without any specific limitation.

[0126] Step 206: Integrate the question sets corresponding to the test paper images according to the page number sequence of the page numbers corresponding to the test paper images to generate an electronic test paper document corresponding to the test paper.

[0127] During implementation, the online education platform can identify the page number corresponding to each test paper image from the footer text box in the test paper image.

[0128] If the page numbers of all the test paper images are identified, the online education platform can sort the question sets corresponding to the test paper images according to the page number sequence of the page numbers corresponding to the test paper images to generate a question sequence corresponding to the test paper, and generate an electronic test paper document based on the question sequence;

[0129] In the embodiments of this specification, in a set of test papers, the question numbers are increasing. In other words, the larger the page number of the test paper image, the larger the average value of the question number. Based on this feature, in this specification, if the page numbers of some test paper images are identified, the online education platform can sort the question sets corresponding to each test paper image according to the order of the average value of the question numbers in the question sets on each test paper image to generate a question sequence corresponding to the test paper, and generate an electronic test paper document based on the question sequence.

[0130] For example, suppose there are three test paper images, namely test paper image 1, test paper image 2, and test paper image 3. Suppose the page number is identified as page 1 from test paper image 1, and the page number is not identified from test paper image 2 and test paper image 3. The online education platform can calculate the average value of the question numbers on test paper images 1, 2, and 3, and sort them according to the average value.

[0131] Assume that the test paper image 1 includes questions 1 to 4, and the average value of the question numbers is (1+2+3+4) / 4=2.5.

[0132] Test paper image 2 includes questions 15 to 21, and the average value of the question numbers is (15+16+17+18+19+20+21) / 7=18.

[0133] Test paper image 3 includes questions 5 to 14, and the average value of the question numbers is (5+6+7+8+9+10+11+12+13+14) / 10=9.5.

[0134] It can be seen that the average value of the question numbers is ranked as 2.5<9.5<18, so the question sets of these three test paper images can be sorted in the order of the question set of test paper image 1, the question set of test paper image 3 and the question set of test paper image 2 to obtain the question sequence of the test paper.

[0135] However, in actual applications, after sorting the question sets corresponding to each test paper image to obtain the test paper question sequence, errors may occur in the test paper question sequence. For example, some test questions have missing question numbers or repeated question numbers. In order to obtain a more accurate question sequence, the online education platform can correct the question sequence based on the question numbers in the question sequence, and generate an electronic test paper document based on the corrected question sequence.

[0136] The following is a detailed introduction to "Correcting the question sequence based on the question numbers in the question sequence".

[0137] Case 1: For the questions whose question numbers have been identified in the question sequence, when the question numbers of any two adjacent questions are not continuous, the question sequence is corrected according to the question numbers of any two adjacent questions.

[0138] During implementation, if the two questions have the same question number, the online education platform will merge the two questions.

[0139] It should be noted that, if the question numbers of any two adjacent questions in the question sequence are not continuous and the two questions have the same question numbers, it means that the two questions are the same question but are mistakenly split. Therefore, in this case, the two questions can be merged.

[0140] For example, when the last question on the previous page is the same as the first question on the next page, after sorting the question sets on the two pages, the resulting question sequence is [q1, q2, q2, q3], where q1, q2, and q3 represent the question numbers in the question sequence.

[0141] It can be seen from the question sequence that the second question number and the third question number in the question number sequence are the same. At this time, the two questions represented by q2 can be merged to obtain the question sequence [q1, q2, q3].

[0142] In the embodiment of the present specification, if the two questions have different question numbers, the online education platform re-segments the target question that is located at the front of the two questions, and replaces the target question with the multiple questions formed by the segmentation.

[0143] During implementation, if the question numbers of the two questions are not continuous and the question numbers of the two questions are different, it indicates that a missing question error has occurred, that is, the first question of the two questions has combined multiple questions, and the first question needs to be re-divided.

[0144] During segmentation, the online education platform can obtain the text boxes in the question area corresponding to the questions in the front position, and then obtain the probability values ​​of each text box output by the third classification model, and reduce the preset threshold value corresponding to the third classification model. For each text box, if the probability value of the text box is greater than the preset threshold value after the reduction, the text box is determined to be the reference text box as the question segmentation point.

[0145] Then, the online education platform re-divides the question area based on the benchmark text box to obtain several new question areas, and then extracts questions from the new question areas, replacing the front questions in the question sequence with the extracted questions.

[0146] For example, assuming that the question sequence is [q1, q2, q4, q5], it can be seen from the question sequence that the question numbers of the second question and the third question are not consecutive, and the question numbers of the two questions are different. In this case, question q2 can be re-split.

[0147] Assume that Figure 4 As shown, the question area corresponding to question q2 is as follows Figure 4 The area enclosed by the dotted line includes five text boxes, namely text box 401, text box 402, text box 403, text box 404, and text box 405.

[0148] The online education platform can obtain the probability value of the third classification model output that text box 401 is the benchmark text box, the probability value of text box 402 is the benchmark text box, the probability value of text box 403 is the benchmark text box, the probability value of text box 404 is the benchmark text box, and the probability value of text box 405 is the benchmark text box.

[0149] Then, the online education platform may lower the preset threshold corresponding to the third classification model. Assuming that the probability values ​​of text box 401 and text box 404 are greater than the lowered preset threshold, text box 401 and text box 404 are used as reference text boxes.

[0150] Then, the online education platform may merge text boxes 401 to 403 to generate a question area corresponding to question q2, and extract question q2 from the question area.

[0151] The online education platform may merge text boxes 404 to 405 to generate a question area corresponding to question q3, and extract question q3 from the question area.

[0152] Then, the online education platform can use q2, q3 to replace q2 in the above question sequence to obtain the corrected question sequence [q1, q2, q3, q4, q5].

[0153] Case 2: For questions with missing question numbers in the question sequence, correct the questions with missing question numbers based on the continuity of the existing question numbers.

[0154] In an optional implementation, if it is determined that the question numbers adjacent to the question with missing question number are not continuous, the question number of the question with missing question number is completed according to the question numbers of the questions adjacent to the question with missing question number.

[0155] During implementation, if it is determined that the question numbers adjacent to the question with missing question numbers are not continuous, it indicates that an error in missing question numbers has occurred. In this case, the question number of the question with the missing question number can be completed based on the question numbers adjacent to the question with the missing question number.

[0156] For example, the question sequence is [q1, q2, q?, q4, q5, q6], where q? indicates the question with missing question number. In this example, the questions adjacent to the question with missing question number are q2 and q4. The question numbers of q2 and q4 are not continuous, so the question number of the question with missing question number can be completed based on q2 and q4. In this example, since q? is between q2 and q4, q? is q3, and the question sequence after question number completion is [q1, q2, q3, q4, q5, q6].

[0157] In another optional implementation, if it is determined that the question numbers adjacent to the question with the missing question number are continuous, the question with the missing question number is merged with the question that is located in the front position among the adjacent questions.

[0158] In implementation, if it is determined that the question numbers of the questions adjacent to the question with the missing question number are continuous, it indicates that there is a mis-cutting error, that is, the originally same question is cut into two questions. In this case, the online education platform can merge the question with the missing question number with the question that is located in the front position among the adjacent questions.

[0159] For example, the question sequence is [q1, q2, q?, q3, q4], where q? indicates a question with a missing question number. In this example, the questions adjacent to the question with a missing question number are q2 and q3. The question numbers of q2 and q3 are continuous, indicating that q2 and q? were originally the same question, but were mistakenly divided into two. In this case, q2 and q? can be merged to obtain the corrected question sequence [q1, (q2+q?), q2, q3].

[0160] In practical applications, other methods may be used to correct the question sequence, which are only described here for example and are not specifically limited.

[0161] It should be noted that the existing structured analysis based on question granularity only focuses on a single question without considering the relationship between different questions, so the identified questions may have some problems (such as misclassification, missing questions, etc.). However, this specification performs structured analysis based on the test paper granularity, and corrects the question sequence based on the relationship between the questions in the test paper question sequence. Therefore, this specification obtains a more accurate question sequence through structured analysis based on the test paper granularity.

[0162] In addition, in the embodiments of the present specification, in addition to obtaining the above-mentioned question sequence, the online education platform can also analyze the obtained question sequence to obtain the attribute information of the test paper, and perform statistics on the attribute information of the test paper, and display the results through visualization element statistics, so that users can clearly obtain the attribute information of the test paper.

[0163] This part of the content is described in detail below through steps C1 to C3.

[0164] Step C1: Perform multi-dimensional classification on each question in the generated electronic test paper document to obtain the attribute value of each question under at least one preset question attribute.

[0165] In implementation, the online education platform can classify each question in the electronic test paper document in multiple dimensions through natural language processing technology to obtain the attribute value of each question under at least one preset question attribute, wherein each classification dimension corresponds to each preset question attribute.

[0166] Among them, the preset question attributes include one or more of the following: subject section, knowledge point, difficulty, problem-solving method, question type, etc.

[0167] For example, assume that the preset question attributes include: subject stage and difficulty.

[0168] For each question, the online education platform can classify the questions based on the subject stage. Assuming that the classification result of the question is that the question belongs to Grade 12 Mathematics, then the question attribute and its attribute value corresponding to the question are "Subject Stage = Grade 12 Mathematics", where "Subject Stage" is the preset question attribute and "Grade 12 Mathematics" is the attribute value.

[0169] In addition, the online education platform can also classify the topic in terms of difficulty. Assuming that the classification result of the topic is that the topic belongs to the second-level difficulty, the topic attribute and its attribute value corresponding to the topic are "difficulty = second-level difficulty", where "difficulty" is the preset topic attribute and "second-level difficulty" is the attribute value.

[0170] In addition, in the embodiments of the present specification, after obtaining the attribute value of each question under at least one preset question attribute, the online education platform may also correct the attribute value of the question in order to ensure the accuracy of the attribute value.

[0171] In implementation, a designated topic attribute is pre-specified in at least one topic attribute, that is, the designated topic attribute is one or more of the preset topic attributes. For example, the preset topic attributes include: subject section, difficulty. Pre-specifying the subject section is the designated topic attribute.

[0172] For a specified topic attribute, the online education platform can count the number of multiple attribute values ​​under the specified topic attribute, and then use the attribute value with the largest number as the standard attribute value, and correct the attribute values ​​of several topics under the specified attribute based on the standard attribute value.

[0173] For example, assuming that the specified question attribute is subject section, and assuming that there are 15 questions written into the electronic test paper document, among which, the attribute values ​​of questions 1 to 10, question 14, and question 15 under the subject section are all senior high school mathematics, and the attribute values ​​of questions 11 to 13 under the subject section are senior high school mathematics.

[0174] The online education platform can count the number of attribute values ​​of Senior 2 Mathematics (i.e., 12) and the number of attribute values ​​of Senior 1 Mathematics (i.e., 3). Since the number of attribute values ​​of Senior 2 Mathematics is the largest, Senior 2 Mathematics is used as the standard attribute value. Then, the attribute values ​​of Questions 11 to 13 under the subject section are changed from Senior 1 Mathematics to Senior 2 Mathematics.

[0175] It should be noted that this manual performs analysis at the test paper granularity. By considering the contextual relationship between questions, the attribute values ​​of the questions can be effectively corrected, making the attribute values ​​of each question identified by the online education platform more accurate.

[0176] Step C2: Identify the test paper title from any test paper image in the test paper set, and identify the attribute value under the preset title attribute from the test paper title

[0177] During implementation, the online education platform can identify the test paper title from the text information in the test paper title text box of any test paper image, and identify the attribute value under the preset title attribute from the test paper title.

[0178] The preset title attribute refers to information used to describe the test paper title. For example, the preset title attribute may include one or more of the following: year, semester, subject section, and test paper type.

[0179] For example, suppose the identified test paper title is: Datong No. 4 Middle School Alliance School 2020-2021 academic year second semester May monthly exam questions for high school students in liberal arts and mathematics.

[0180] Assuming that the preset title attributes include: year, semester, subject section and test paper type, the preset question attributes and their attribute values ​​identified from the test paper title are shown in Table 1:

[0181] Preset title attributes Property Value years 2020-2021 semester Second Semester Subject Senior 2 Liberal Arts Test paper type Monthly Exam

[0182] Table 1

[0183] Step C3: Write the attribute value of each question and the attribute value of the test paper title into the electronic test paper document

[0184] During implementation, the electronic device may write the attribute values ​​of the test paper title under each title attribute into the electronic test paper document, for example, writing the content shown in Table 1 into the electronic test paper document.

[0185] In addition, the attribute values ​​of each question under each preset question attribute of the electronic device are written into the electronic test paper document. For example, "Question 1: Subject level is Senior 2, Arts and Mathematics, Difficulty is Class 2, Knowledge point is Analytic Geometry, Question type is Answer Question" is written into the electronic test paper document.

[0186] Of course, in actual application, the online education platform can also display relevant statistical information of the test paper to users so that users can understand the test situation more intuitively.

[0187] During implementation, the electronic device counts the number of attribute values ​​that appear under each topic attribute, and displays the statistical result according to the visual display element.

[0188] The visual display element refers to an element that can intuitively display statistical results, including graphic elements (such as pie charts, bar charts, etc.), tables, etc. The visual display element is only exemplarily described here, and is not specifically limited.

[0189] For example, if the question attribute is question type, and the attribute values ​​under this question attribute are multiple-choice questions, essay questions, and others, then the statistical attribute value is the number of multiple-choice questions (assuming 12 questions), the statistical attribute value is the number of essay questions (assuming 6 questions), and the statistical attribute value is the number of other types of questions (assuming 4 questions). Figure 5 As shown, the online education platform can display the statistical results of question types and their attribute values ​​in the form of a table.

[0190] For example, the question attribute is difficulty, and the attribute values ​​under this attribute are difficulty level 1, difficulty level 2, and difficulty level 3. Assuming that the test paper has 20 questions, 15 of the 20 questions are difficulty level 2, 2 are difficulty level 1, and 3 are difficulty level 3. Then, the questions of difficulty level 1 account for 10%, the questions of difficulty level 2 account for 75%, and the questions of difficulty level 3 account for 15%. Then, the online education platform can follow the following steps: Figure 5 The sectors shown show this statistical result.

[0191] In addition, in actual applications, users may upload test paper images of different sets of test papers to the online education platform. Therefore, before returning the electronic test paper document to the user terminal, the online education platform can also determine whether the test paper images in the test paper image set are the same test paper based on the information identified from each image in the test paper image set.

[0192] In implementation, before returning the electronic test paper document to the user terminal, the online education platform may detect whether the test paper images in the test paper image set meet the preset conditions for representing the same set of test papers.

[0193] The preset conditions include one or more of the following combinations:

[0194] One of the at least one test paper images includes a test paper title;

[0195] The standard attribute value under the designated topic attribute identified from each topic is consistent with the attribute value under the designated topic attribute identified from the test paper title; wherein the designated topic attribute is the same as the designated topic attribute;

[0196] The number of repeated question numbers is less than the preset threshold.

[0197] The following explains "the standard attribute value under the specified question attribute identified from each question is consistent with the attribute value under the specified title attribute identified from the test paper title."

[0198] For example, specify the topic attribute as the subject section, and specify the title attribute as the subject section.

[0199] Suppose that the title of the test paper is "Datong No. 4 Middle School Alliance School 2020-2021 Academic Year Second Semester May Monthly Exam Questions Senior 2 Liberal Arts and Mathematics", then the subject section identified from the title of the test paper is Senior 2 Liberal Arts and Mathematics.

[0200] Assume that the test paper has 15 questions, and the attribute values ​​of questions 1 to 10, 14, and 15 under the subject section are all senior high school literature, and the attribute values ​​of questions 11 to 13 under the subject section are senior high school literature. The online education platform can count the number of attribute values ​​and then select the attribute value with the largest number as the standard attribute value. In this example, the online education platform counts that the number of questions with the attribute value of senior high school literature is 12, and the number of questions with the attribute value of senior high school literature is 3. In this case, the online education platform can determine senior high school literature as the standard attribute value.

[0201] Then, the online education platform can detect whether the standard attribute value under the specified question attribute of the subject period identified from the question (i.e., high school liberal arts and mathematics) and the attribute value under the specified title attribute identified from the test paper title (i.e., high school liberal arts and mathematics) are consistent. In this example, the standard attribute value under the specified question attribute of the subject period identified from the question (i.e., high school liberal arts and mathematics) and the attribute value under the specified title attribute identified from the test paper title (i.e., high school liberal arts and mathematics) are consistent, so the second condition of the above-mentioned preset conditions is met.

[0202] In the embodiment of the present specification, if the test paper images in the test paper image set meet the preset condition of representing the same set of test papers, the electronic test paper document is returned to the user terminal.

[0203] If the test paper images in the test paper image set do not meet the preset conditions for representing the same set of test papers, the electronic test paper document is corrected and the corrected electronic test paper document is returned to the user terminal. For example, if there are two test paper images in the test paper set that contain test paper titles, the electronic test paper document is cut into two electronic test paper documents, each of which corresponds to a set of test papers. The online education platform returns the two electronic test paper documents to the user terminal.

[0204] From the above description, it can be seen that since the online education platform first performs a structured analysis on the single-page test paper image to obtain the question set corresponding to the single-page test paper image, and then integrates the question set corresponding to the multi-page test paper images, the online education platform of this specification provides a method for analysis at the test paper granularity.

[0205] On the one hand, analyzing at the test paper granularity can obtain a more complete relationship chain of users, test papers, and questions, which can better help online education platforms describe and characterize users.

[0206] On the other hand, taking the test paper as the granularity can consider the overall content of the test paper questions based on the contextual relationship between the questions, so that the question sequence obtained after integrating the questions corresponding to multiple pages of test paper images and the question attributes of each question can be corrected, thereby making the obtained question sequence and question attribute values ​​more accurate.

[0207] Figure 6 This is a schematic diagram of an online education platform provided by an exemplary embodiment. Figure 6 At the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610, and may also include hardware required for other services. One or more embodiments of this specification may be implemented based on software, such as the processor 602 reading the corresponding computer program from the non-volatile memory 610 into the memory 608 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0208] Please refer to Figure 7 , the test paper image processing device can be applied to Figure 6 The device shown in the figure is used to implement the technical solution of this specification. The device for processing the test paper image may include:

[0209] An acquisition module 701 is used to acquire a set of test paper images corresponding to the test paper;

[0210] The analysis module 702 is used to perform structural analysis on each test paper image in the test paper image set to obtain a set of questions contained in each test paper image;

[0211] The generating module 703 is used to integrate the question sets corresponding to each test paper image according to the page number sequence of the page numbers corresponding to each test paper image, so as to generate an electronic test paper document corresponding to the test paper.

[0212] Optionally, the acquisition module 701, when acquiring a test paper image set corresponding to a test paper, is used to acquire at least one image uploaded by a user terminal; extract identification features from the at least one image, and identify the test paper image in the at least one image based on the extracted identification features, and create a test paper image set based on the identified test paper image.

[0213] Optionally, the identification features include image features and text features;

[0214] The acquisition module 701, when extracting recognition features from the at least one image and identifying the test paper image in the at least one image based on the extracted recognition features, is used to extract image features from the at least one image and identify candidate images related to the test paper in the at least one image based on the image features; perform optical character recognition on the candidate images to obtain a number of text boxes corresponding to the candidate images, extract text features from the text boxes, and further identify the test paper image from the candidate images based on the image features extracted from the candidate images and the text features.

[0215] Optionally, the text feature includes any one or more combinations of the following:

[0216] The text information contained in the image, the position of each text information in the image, the ratio of handwritten text to printed text in the image, and the position distribution of printed text in the image.

[0217] Optionally, the analysis module 702, when performing structured analysis on each test paper image in the test paper image set to obtain a set of questions contained in each test paper image, is used to determine, for each test paper image, a key text box from a plurality of text boxes obtained by performing optical character recognition on the test paper image, and locate a test question area from the test paper image based on the key text box; extract morphological features corresponding to at least one text box contained in the test question area; and semantic features corresponding to the text contained in the at least one text box, and identify a reference text box as a question segmentation point from the at least one text box based on the morphological features and the semantic features; determine a set of text boxes corresponding to each question contained in the test question area based on the reference text box, and merge each text box in the text box set to obtain a question area corresponding to each question contained in the test question area; extract questions from the question areas corresponding to each question contained in the test question area, and sort the extracted questions based on the position order of each question area in the test question area to obtain a set of questions contained in the test paper image.

[0218] Optionally, the key text boxes include: a title type text box, a page number text box;

[0219] The analysis module 702, when locating the test question area from the test paper image based on the key text box, is used to use the area between two adjacent question type text boxes, and / or the area between the question type text box and the page number text box as the test question area.

[0220] Optionally, the shape and position features include any one or more combinations of the following:

[0221] Positional features that characterize the positional relationship between text boxes;

[0222] Characterize the positional features of each text box in the test paper image where it is located;

[0223] Dimensional features that characterize the relationship between the size of each text box and the size of the test paper image;

[0224] Position features representing the positional relationship between each text box and a key text box marked on the test paper image;

[0225] The semantic features include any one or more combinations of the following:

[0226] Characterizes whether the text box contains the specified character;

[0227] Characterize the position features of the specified characters in the text box;

[0228] A feature that indicates whether the text information in a text box is semantically continuous with the text information in the previous text box.

[0229] Optionally, the key text box includes a page number text box; the questions in the question set corresponding to the test paper image include: question content and question number;

[0230] The generating module 703 is used to identify the page number corresponding to each test paper image from the text information in the page number text box of each test paper image when integrating the question sets corresponding to each test paper image according to the page number sequence of the page numbers corresponding to each test paper image to generate an electronic test paper document of the test paper; if the page numbers corresponding to all the test paper images are identified, the question sets corresponding to each test paper image are sorted according to the page number sequence of the page numbers corresponding to each test paper image to generate a question sequence corresponding to the test paper, and the electronic test paper document is generated based on the question sequence; if the page numbers corresponding to some of the test paper images are identified, the question sets corresponding to each test paper image are sorted according to the order of the average question numbers in the question sets on each test paper image to generate a question sequence corresponding to the test paper, and the electronic test paper document is generated based on the question sequence.

[0231] Optionally, when generating an electronic test paper document according to the question sequence, the generating module 703 is used to correct the question sequence according to the question numbers of the questions in the question sequence, and generate the electronic test paper document according to the corrected question sequence.

[0232] Optionally, when correcting the question sequence according to the question numbers of the questions in the question sequence, the generating module 703 is used to correct the question sequence according to the question numbers of any two adjacent questions for the questions whose question numbers have been identified in the question sequence when the question numbers of any two adjacent questions are not continuous. For the questions with missing question numbers in the question sequence, the questions with missing question numbers are corrected according to the continuity of the question numbers of the existing questions.

[0233] Optionally, the generation module 703, when correcting the question sequence based on the question numbers of any two adjacent questions, is used to merge the two questions if the two questions have the same question numbers; if the two questions have different question numbers, re-segment the target question that is located in the front position of the two questions, and replace the target question with the multiple questions formed by the segmentation.

[0234] Optionally, when correcting questions with missing question numbers based on the continuity of existing question numbers, the generation module 703 is used to complete the question number of the question with missing question number based on the question numbers of the questions adjacent to the question with missing question number if it is determined that the question numbers of the questions adjacent to the question with missing question number are discontinuous; if it is determined that the question numbers of the questions adjacent to the question with missing question number are continuous, then merge the question with missing question number with the preceding question among the adjacent questions.

[0235] Optionally, the generation module 703 is also used to perform multi-dimensional classification on each question in the generated electronic test paper document to obtain the attribute value of each question under at least one preset question attribute; and to identify the test paper title from any test paper image in the test paper set, and to identify the attribute value under the preset title attribute from the test paper title; and to write the attribute value of each question and the attribute value of the test paper title into the electronic test paper document.

[0236] Optionally, the generation module 703 is also used to count the number of multiple attribute values ​​appearing under the specified question attribute before writing the attribute value of each question and the attribute value of the test paper title into the electronic test paper document; taking the attribute value with the largest number as the standard attribute value, and correcting the attribute values ​​of several questions under the specified question attribute according to the standard attribute value.

[0237] Optionally, the preset title attributes include one or more of the following: year, semester, subject section, test paper type;

[0238] The preset question attributes include one or more of the following: subject section, knowledge point, difficulty, problem-solving method, and question type.

[0239] Optionally, the generating module 703 is further used to count the number of attribute values ​​appearing under each topic attribute, and display the statistical results according to the visual display element.

[0240] Optionally, the generation module 703 is also used to detect whether the test paper images in the test paper image set meet the preset conditions for representing the same set of test papers. If so, the electronic test paper document is returned to the user terminal; if not, the electronic test paper document is corrected and the corrected electronic test paper document is returned to the user terminal.

[0241] Optionally, the preset condition includes one or more of the following combinations:

[0242] A test paper image in the test paper image collection includes a test paper title;

[0243] The standard attribute value under the designated topic attribute identified from each topic is consistent with the attribute value under the designated topic attribute identified from the test paper title; wherein the designated topic attribute is the same as the designated topic attribute;

[0244] The number of repeated question numbers is less than the preset threshold.

[0245] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0246] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0247] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0248] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0249] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0250] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0251] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0252] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0253] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A method for processing a test paper image, comprising: Get the test paper image set corresponding to the test paper; For each test paper image, a key text box is determined from a plurality of text boxes obtained by performing optical character recognition on the test paper image, and a test question area is located from the test paper image based on the key text box; Extracting morphological features corresponding to at least one text box contained in the test question area; and semantic features corresponding to the text contained in the at least one text box, and identifying a reference text box as a question segmentation point from the at least one text box based on the morphological features and the semantic features; Determining a text box set corresponding to each question included in the test question area based on the reference text box, and merging each text box in the text box set to obtain a question area corresponding to each question included in the test question area; Extracting questions from question areas corresponding to the questions contained in the question area, respectively, and sorting the extracted questions based on the position sequence of the question areas in the question area to obtain a question set contained in the test paper image; The question sets corresponding to the test paper images are integrated according to the page number sequence of the page numbers corresponding to the test paper images to generate an electronic test paper document corresponding to the test paper.

2. According to the method of claim 1, the step of obtaining a set of test paper images corresponding to the test paper comprises: Acquire at least one image uploaded by a user terminal; Recognition features are extracted from the at least one image, and a test paper image in the at least one image is recognized based on the extracted recognition features, and a test paper image set is created based on the recognized test paper image.

3. The method according to claim 2, wherein the recognition features include image features and text features; The extracting of identification features from the at least one image, and identifying the test paper image in the at least one image based on the extracted identification features, comprises: Extracting image features from the at least one image, and identifying a candidate image related to the test paper in the at least one image based on the image features; Optical character recognition is performed on the candidate image to obtain a plurality of text boxes corresponding to the candidate image, and text features are extracted from the text boxes. Based on the image features and the text features extracted from the candidate image, a test paper image is further identified from the candidate image.

4. According to the method of claim 3, the text features include any one or more combinations of the following: The text information contained in the image, the position of each text information in the image, the ratio of handwritten text to printed text in the image, and the position distribution of printed text in the image.

5. The method according to claim 1, wherein the key text box comprises: Title type text box, page number text box; The step of locating the test question area from the test paper image according to the key text box includes: The area between two adjacent question type text boxes and / or the area between the question type text box and the page number text box is used as the test question area.

6. The method according to claim 1, wherein the shape and position features include any one or more combinations of the following: Positional features that characterize the positional relationship between text boxes; Characterize the positional features of each text box in the test paper image where it is located; Dimensional features that characterize the relationship between the size of each text box and the size of the test paper image; Position features representing the positional relationship between each text box and a key text box marked on the test paper image; The semantic features include any one or more combinations of the following: Characterizes whether the text box contains the specified character; Characterize the position features of the specified characters in the text box; A feature that indicates whether the text information in a text box is semantically continuous with the text information in the previous text box.

7. The method according to claim 1, wherein the key text box includes a page number text box; and the questions in the question set corresponding to the test paper image include: The content of the question and its number; The step of integrating the question sets corresponding to the test paper images according to the page number sequence of the page numbers corresponding to the test paper images to generate the electronic test paper document of the test paper includes: Identify the page number corresponding to each test paper image from the text information in the page number text box of each test paper image; If the page numbers corresponding to all the test paper images are identified, then the question sets corresponding to the test paper images are sorted according to the page number sequence of the page numbers corresponding to the test paper images to generate a question sequence corresponding to the test paper, and an electronic test paper document is generated according to the question sequence; If the page numbers corresponding to some test paper images are identified, the question sets corresponding to each test paper image are sorted according to the order of the average question numbers in the question sets on each test paper image to generate a question sequence corresponding to the test paper, and an electronic test paper document is generated based on the question sequence.

8. The method according to claim 7, wherein generating an electronic test paper document according to the question sequence comprises: The question sequence is corrected according to the question numbers of the questions in the question sequence, and an electronic test paper document is generated according to the corrected question sequence.

9. The method according to claim 8, wherein the step of correcting the question sequence according to the question number of each question in the question sequence comprises: For the questions whose question numbers have been identified in the question sequence, when the question numbers of any two adjacent questions are not continuous, the question sequence is corrected according to the question numbers of the any two adjacent questions; For questions with missing question numbers in the question sequence, the questions with missing question numbers are corrected based on the continuity of the question numbers of the existing questions.

10. The method according to claim 9, wherein the step of correcting the question sequence according to the question numbers of any two adjacent questions comprises: If the two questions have the same question number, the two questions will be merged; If the two topics have different topic numbers, the target topic that is located in the front position of the two topics is split again, and the multiple topics formed by the splitting replace the target topic.

11. The method according to claim 9, wherein the step of correcting the questions with missing question numbers based on the continuity of the question numbers of the existing questions comprises: If it is determined that the question numbers adjacent to the question with the missing question number are not continuous, then the question number of the question with the missing question number is completed according to the question numbers adjacent to the question with the missing question number; If it is determined that the question numbers of the questions adjacent to the question with the missing question number are continuous, the question with the missing question number is merged with the question that is located in the front position among the adjacent questions.

12. The method according to claim 1, further comprising: Perform multi-dimensional classification on each question in the generated electronic test paper document to obtain the attribute value of each question under at least one preset question attribute; as well as, Identify a test paper title from any test paper image in the test paper set, and identify an attribute value under a preset title attribute from the test paper title; The attribute value of each question and the attribute value of the test paper title are written into the electronic test paper document.

13. The method according to claim 12, before writing the attribute value of each question and the attribute value of the test paper title into the electronic test paper document, the method further comprises: Count the number of multiple attribute values ​​that appear under the specified topic attribute; The attribute value with the largest number is taken as the standard attribute value, and the attribute values ​​of several questions under the specified question attribute are corrected according to the standard attribute value.

14. The method according to claim 12, wherein the preset title attributes include one or more of the following: year, semester, subject section, and test paper type; The preset question attributes include one or more of the following: subject section, knowledge point, difficulty, problem-solving method, and question type.

15. The method according to claim 12, further comprising: For each topic attribute, the number of attribute values ​​that appear under the topic attribute is counted, and the statistical results are displayed based on the visual display element.

16. The method according to claim 13, further comprising: Detect whether the test paper images in the test paper image set meet the preset conditions representing the same set of test papers. If so, return the electronic test paper document to the user terminal. If not, correct the electronic test paper document and return the corrected electronic test paper document to the user terminal.

17. The method according to claim 16, wherein the preset condition comprises one or more combinations of the following: A test paper image in the test paper image collection includes a test paper title; The standard attribute value under the specified question attribute identified from each question is consistent with the attribute value under the specified title attribute identified from the test paper title; wherein, The specified topic attribute is the same as the specified title attribute; The number of repeated question numbers is less than the preset threshold.

18. A test paper image processing device, comprising: An acquisition module, used to acquire a set of test paper images corresponding to the test paper; The analysis module is used to determine, for each test paper image in the test paper image set, a key text box from a plurality of text boxes obtained by performing optical character recognition on the test paper image, and locate a test question area from the test paper image according to the key text box; extract a morphological feature corresponding to at least one text box included in the test question area; and a semantic feature corresponding to the text included in the at least one text box, and identify a reference text box as a question segmentation point from the at least one text box based on the morphological feature and the semantic feature; Determine a text box set corresponding to each question included in the test question area based on the reference text box, and merge each text box in the text box set to obtain a question area corresponding to each question included in the test question area; extract questions from the question areas corresponding to each question included in the test question area, and sort the extracted questions based on the position sequence of each question area in the test question area to obtain a question set included in the test paper image; The generating module is used to integrate the question sets corresponding to each test paper image according to the page number sequence of the page numbers corresponding to each test paper image, so as to generate an electronic test paper document corresponding to the test paper.

19. According to the device of claim 18, the acquisition module, when acquiring the test paper image set corresponding to the test paper, is used to acquire at least one image uploaded by the user terminal; extract identification features from the at least one image, and identify the test paper image in the at least one image based on the extracted identification features, and create a test paper image set based on the identified test paper image.

20. The apparatus according to claim 19, wherein the recognition features include image features and text features; The acquisition module is used to extract image features from the at least one image and identify a candidate image related to the test paper in the at least one image based on the image features when extracting recognition features from the at least one image and identifying the test paper image in the at least one image based on the extracted recognition features; perform optical character recognition on the candidate image to obtain a plurality of text boxes corresponding to the candidate image, extract text features from the text boxes, and further identify the test paper image from the candidate image based on the image features extracted from the candidate image and the text features.

21. The apparatus according to claim 20, wherein the text features include any one or more combinations of the following: The text information contained in the image, the position of each text information in the image, the ratio of handwritten text to printed text in the image, and the position distribution of printed text in the image.

22. The apparatus according to claim 18, wherein the key text box comprises: Title type text box, page number text box; The analysis module is used to use the area between two adjacent question type text boxes and / or the area between the question type text box and the page number text box as the question area when locating the question area from the test paper image based on the key text box.

23. The device according to claim 18, wherein the shape and position features include any one or more combinations of the following: Positional features that characterize the positional relationship between text boxes; Characterize the positional features of each text box in the test paper image where it is located; Dimensional features that characterize the relationship between the size of each text box and the size of the test paper image; Position features representing the positional relationship between each text box and a key text box marked on the test paper image; The semantic features include any one or more combinations of the following: Characterizes whether the text box contains the specified character; Characterize the position features of the specified characters in the text box; A feature that indicates whether the text information in a text box is semantically continuous with the text information in the previous text box.

24. The device according to claim 18, wherein the key text box comprises a page number text box; and the questions in the question set corresponding to the test paper image comprise: The content of the question and its number; The generating module is used to identify the page number corresponding to each test paper image from the text information in the page number text box of each test paper image when integrating the question set corresponding to each test paper image according to the page number sequence of the page numbers corresponding to each test paper image to generate the electronic test paper document of the test paper; If the page numbers corresponding to all the test paper images are identified, the question sets corresponding to each test paper image are sorted according to the page number order of the page numbers corresponding to each test paper image to generate a question sequence corresponding to the test paper, and an electronic test paper document is generated based on the question sequence; if the page numbers corresponding to some of the test paper images are identified, the question sets corresponding to each test paper image are sorted according to the order of the average question numbers in the question sets on each test paper image to generate a question sequence corresponding to the test paper, and an electronic test paper document is generated based on the question sequence.

25. The device according to claim 24, wherein the generating module, when generating the electronic examination paper document according to the question sequence, is used to correct the question sequence according to the question numbers of the questions in the question sequence, and generate the electronic examination paper document according to the corrected question sequence.

26. The device according to claim 25, when correcting the question sequence according to the question numbers of each question in the question sequence, the generating module is used to correct the question sequence according to the question numbers of any two adjacent questions with identified question numbers in the question sequence when the question numbers of the two adjacent questions are not continuous; and correct the questions with missing question numbers in the question sequence according to the continuity of the question numbers of the existing questions.

27. According to the device according to claim 26, the generating module, when correcting the question sequence according to the question numbers of any two adjacent questions, is used to merge the two questions if the question numbers of the two questions are the same; if the question numbers of the two questions are different, re-segment the target question that is located in the front position of the two questions, and replace the target question with the multiple questions formed by the segmentation.

28. According to the device according to claim 26, the generation module, when correcting questions with missing question numbers based on the continuity of existing question numbers, is used to complete the question number of the question with missing question number based on the question numbers of questions adjacent to the question with missing question number if it is determined that the question numbers of questions adjacent to the question with missing question number are discontinuous; if it is determined that the question numbers of questions adjacent to the question with missing question number are continuous, then merge the question with missing question number with the previous question among the adjacent questions.

29. According to the device of claim 18, the generation module is also used to perform multi-dimensional classification on each question in the generated electronic test paper document to obtain the attribute value of each question under at least one preset question attribute; and to identify the test paper title from any test paper image in the test paper set, and to identify the attribute value under the preset title attribute from the test paper title; and to write the attribute value of each question and the attribute value of the test paper title into the electronic test paper document.

30. According to the device according to claim 29, the generation module is further used to count the number of multiple attribute values ​​appearing under the specified question attribute before writing the attribute value of each question and the attribute value of the test paper title into the electronic test paper document; take the attribute value with the largest number as the standard attribute value, and correct the attribute values ​​of several questions under the specified question attribute according to the standard attribute value.

31. The apparatus according to claim 29, wherein the preset title attributes include one or more of the following: year, semester, subject section, and test paper type; The preset question attributes include one or more of the following: subject section, knowledge point, difficulty, problem-solving method, and question type.

32. According to the device of claim 29, the generating module is further used to count the number of attribute values ​​appearing under each topic attribute, and display the statistical results according to the visual display element.

33. According to the device according to claim 30, the generation module is also used to detect whether the test paper images in the test paper image set meet the preset conditions for representing the same set of test papers. If so, the electronic test paper document is returned to the user terminal; if not, the electronic test paper document is corrected and the corrected electronic test paper document is returned to the user terminal.

34. The apparatus according to claim 33, wherein the preset condition comprises one or more of the following combinations: A test paper image in the test paper image collection includes a test paper title; The standard attribute value under the specified question attribute identified from each question is consistent with the attribute value under the specified title attribute identified from the test paper title; wherein, The specified topic attribute is the same as the specified title attribute; The number of repeated question numbers is less than the preset threshold.

35. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 17 by running the executable instructions.

36. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Test paper generation method and device

    CN112699283A

  • Test paper analysis method and device, storage medium and electronic equipment

    CN113177435A

  • Intelligent test paper cutting method and system and storage medium

    CN113205527A