Test question answer marking method and device, electronic equipment and computer readable medium
By annotating electronic answer information on the test question page image, and utilizing user operation and image recognition technology, combined with various annotation tools to generate annotation boxes, the problem of displaying answers for complex test questions in existing technologies has been solved. This enables fast and flexible answer annotation, addresses the difficulties in answer annotation in existing technologies, and improves the efficiency of answer display and grading.
Patent Information
- Application Number
- CN202110356688.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-01
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2041-04-01
AI Technical Summary
Existing technologies cannot effectively label the location coordinates, size, text content, and relationships of complex test questions when creating test questions with answers. This is especially true for elementary school test questions, which contain a wide variety of answer types, including text, images, and other forms of drawing, making it difficult to highlight the relationship between the test questions and the answers.
By annotating electronic answer information on the test question page image, and using user operation and image recognition technology to generate annotation boxes, combined with various annotation tool controls, such as ordinary annotation, text annotation, image annotation, linear annotation, graphic annotation, pen annotation, intelligent calculation and intelligent annotation, flexible and fast answer annotation can be achieved.
It enables quick and flexible annotation of answer information on the test question page, making it easier for students to search for answers and assisting teachers in grading assignments, thus improving the accuracy and efficiency of answer display.
Smart Images

Figure CN113569161B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of computer information processing, and in particular, to a test question answer labeling method and device, an electronic device, and a computer readable medium. BACKGROUND
[0002] With the development of computer technology, online teaching has developed rapidly, and some teaching tool products have also emerged as the times require. These teaching tool products provide technical support and help for students, teachers, and parents in education guidance. Some of these products can provide students with test question training and verification correction functions. In the background of these application systems, test questions with answers are needed first, and then the test questions and answers are split and integrated together. Through such operations, students can retrieve test questions and their corresponding answer information at any time when they actually use them.
[0003] However, when making test questions with answers, most of the current technologies simply associate test question pictures with answer pictures. For test question pictures that are relatively complex, the drawing tools in the prior art cannot circle the position coordinates, size, text content, and association relationship data of a certain part of the drawing. In fact, there are many types of test questions, and many test questions combine test questions and answers together for the purpose of combining teaching with fun. In particular, the types of test questions and answers for primary school students are diverse and not only include text, but also may include various linear, image, and other forms of drawings. In order to better highlight the relationship between test questions and answers and help students better understand the content of test question answers, a new test question answer labeling method is needed.
[0004] The above information disclosed in the background section is only intended to strengthen the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] Therefore, the present disclosure provides a test question answer labeling method, device, electronic device, and computer readable medium, which can flexibly and quickly label answer information for test questions in a test question page at appropriate positions, quickly generate a test question page with answers, and thus conveniently and quickly display test question answers to student users when they search for test question answers. When a teacher user corrects homework, the labeling content can be displayed on the test question page, thereby assisting the teacher user in correcting homework.
[0006] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.
[0007] According to an aspect of the present disclosure, a test question answer marking method is provided, which can mark electronic answer information on a test question page image. The method comprises: displaying a task page, wherein the task page comprises a test question page image and single question information of each test question in the test question page image, and the single question information comprises a question and an answer corresponding to the question; determining target single question information to be marked according to a user operation; marking an answer of a test question corresponding to the target single question information on the test question page image based on the answer contained in the target single question information to generate marking information, wherein the marking information is associated with a test question region of the test question page corresponding to the target single question information.
[0008] In an exemplary embodiment of the present disclosure, determining target single question information according to a user operation comprises: determining target single question information according to a user operation on the task page; and displaying prompt information on the test question page image to remind the user of the target single question information and the corresponding single question on the test question page image.
[0009] In an exemplary embodiment of the present disclosure, marking an answer of a test question corresponding to the target single question information on the test question page image based on the answer contained in the target single question information to generate marking information comprises: obtaining an answer marking region input by a user by monitoring a user operation, or generating a suggested marking region by performing image recognition on the test question page image, and obtaining the answer marking region based on the suggested marking region and a user operation; generating a marking box on the test question page image based on the answer marking region; generating marking content in the marking box based on the answer contained in the target single question information and a user operation; and generating the marking information based on the marking box and the marking content.
[0010] In an exemplary embodiment of the present disclosure, the test question page image has an associated outer layer; the answer marking region is obtained by monitoring a mouse event of a user on the outer layer, and the answer marking region comprises position information of a marking box; and the step of generating a marking box comprises: creating a marking box based on the answer marking region, and positioning the marking box in a corresponding region of the outer layer based on the position information of the marking box.
[0011] In an exemplary embodiment of the present disclosure, the task page is provided with a marking tool control; and when the marking box is generated on the test question page image or the marking box is activated for editing, the test question answer marking method further comprises: obtaining the marking tool control selected by the user; and when the marking box is created or the marking box is activated for editing, a corresponding menu is popped up according to the marking tool control selected by the user, so that the user can input marking content in the marking box based on the menu.
[0012] In an example embodiment of the present disclosure, the annotation tool control includes one or more of the following: a general annotation control for simple character text entry with basic text setting functions; a text annotation control for long character text entry with formula entry tools and text setting functions; a picture annotation control for character text and picture entry with picture entry and setting tools; a linear annotation control for character text and line segment entry with line segment entry and setting tools; a figure annotation control for character text and figure entry with figure entry and setting tools; a brush annotation control for user drawing entry with brush setting functions; an intelligent calculation control for identifying the answer content of the single question information and returning answer-containing annotation box coordinate data; an intelligent annotation control for identifying the answer annotation area of each question in the question page image and returning annotation box coordinate information not containing answers; a global layout control for globally setting each annotation box and its annotation content of the task page; and a magnifying glass control for zooming in on the image at the current position of the mouse.
[0013] In an example embodiment of the present disclosure, the single question information includes a question image and a corresponding answer image, and the method further includes: obtaining a question page image; extracting the question image of each question in the question page image and its position information; obtaining the answer image corresponding to the question image; generating single question information through the question image, its position information, and the answer image; and associating the single question information with each question on the question page image.
[0014] According to an aspect of the present disclosure, an exam question answer annotation device is provided, which can annotate electronic answer information on a question page image. The device includes: a display module configured to display a task page, the task page including a question page image and single question information of each question in the question page image, the single question information including a question and an answer corresponding to the question; a determination module configured to determine target single question information to be annotated according to a user operation; and an annotation module configured to perform answer annotation on a question corresponding to the target single question information on the question page image based on the answer contained in the target single question information to generate annotation information, the annotation information being associated with a question area of the question page corresponding to the target single question information.
[0015] According to an aspect of the present disclosure, an electronic device is provided, which includes: one or more processors; a storage device configured to store one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of the above.
[0016] According to an aspect of the present disclosure, a computer readable medium is provided, which stores a computer program, and the program is executed by a processor to implement the method of any one of the above.
[0017] The present application further provides a computer program product, which stores a computer executable program, and the computer executable program, when executed, implements the test question answer marking method.
[0018] According to the test question answer marking method, device, electronic equipment and computer readable medium, target single question information is determined according to the operation of a user; single question information is marked based on a single question answer image on a test question page image to generate marking information; and the marking information is created on the test question page image to complete answer marking of the target single question information. The marking information is associated with a test question region of the test question page corresponding to the target single question information. In this way, the answer information of each test question can be marked on a proper position of the test question page image flexibly and quickly, and test question page data containing answers can be produced, thereby facilitating implementation of the whole-page answer function.
[0019] The present application can mark answer information for test questions in a test question page flexibly and quickly on a proper position, quickly generate a test question page with answers, and assist a teacher user in homework correction.
[0020] It should be understood that the foregoing general description and the following detailed description are only examples and are not limiting the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 is a flowchart of a test question answer marking method according to an example embodiment.
[0022] Figure 2 is a marking schematic diagram of a test question answer marking method according to an example embodiment.
[0023] Figure 3 is a flowchart of a test question answer marking method according to another example embodiment.
[0024] Figure 4 is a schematic diagram of a test question answer marking method according to an example embodiment.
[0025] Figure 5 is a schematic diagram of a test question answer marking method according to another example embodiment.
[0026] Figure 6 is a schematic diagram of a test question answer marking method according to an example embodiment.
[0027] Figure 7 is a block diagram of a test question answer marking device according to an example embodiment.
[0028] Figure 8is a block diagram of an electronic device according to an exemplary embodiment.
[0029] Figure 9 is a block diagram of a computer readable medium according to an exemplary embodiment. DETAILED DESCRIPTION
[0030] In the introduction of specific embodiments, the detailed description of the structure, performance, effect or other characteristics is for the purpose of enabling a full understanding of the embodiments by those skilled in the art. However, it does not exclude that those skilled in the art can implement the present application without the above-mentioned structure, performance, effect or other characteristics in specific cases.
[0031] The flowchart in the drawing is only an exemplary flow demonstration, and does not represent that all the contents, operations and steps in the flowchart must be included in the scheme of the present application, nor does it represent that the execution must be performed in the order shown in the drawing. For example, some operations / steps in the flowchart can be decomposed, some operations / steps can be combined or partially combined, etc. The execution order shown in the flowchart can be changed according to the actual situation without departing from the inventive concept of the present application.
[0032] The blocks in the drawing Figure 1 Generally represent functional entities, and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processing unit devices and / or microcontroller devices.
[0033] The same reference signs in the various drawings represent the same or similar elements, components or parts, so that the repeated description of the same or similar elements, components or parts can be omitted hereinafter. It should also be understood that although the first, second, third, etc. representational adjectives may be used herein to describe various devices, elements, components or parts, these devices, elements, components or parts should not be limited by these adjectives. That is, these adjectives are only used to distinguish one from another. For example, the first device can also be referred to as the second device without departing from the essential technical solution of the present application. In addition, the terms "and / or", "and / or" mean all combinations of the listed items.
[0034] Those skilled in the art can understand that the drawings are only schematic diagrams of exemplary embodiments, and the modules or flows in the drawings are not necessarily required to implement the present disclosure, and therefore cannot be used to limit the protection scope of the present disclosure.
[0035] Figure 1is a flow chart of a test question answer marking method according to an exemplary embodiment. The test question answer marking method can mark electronic answer information on a test question page image. The test question answer marking method 10 comprises at least steps S102, S104, S106.
[0036] As shown in S102, a task page is displayed, which comprises a test question page image, and single question information of each test question in the test question page image, the single question information comprising a question and an answer corresponding to the question. The test question can be of various types, such as a multiple-choice question, a fill-in-the-blank question, an essay question, etc. The single question can comprise one question or multiple questions, such as ten small multiple-choice questions, multiple fill-in-the-blank questions, etc. Figure 1 An exemplary task page is shown in FIG. 2.
[0037] As shown in FIG. 2, the left side of the figure displays a test question page image, and the right side displays single question information of each test question in the test question page image, i.e. a question and an answer corresponding to the question. The single question information is arranged in order of serial numbers. Clicking on single question information of a serial number, such as serial number 11, displays the question numbered 11 and the answer corresponding to the question. Figure 5 The test question page image, the question, and the answer corresponding to the question displayed in the task page can be obtained by processing a paper book. The test question and the answer corresponding to the question can be located on the same page or can not be located on the same page.
[0038] Exemplarily, the test question page image, the question, and the answer corresponding to the question required by the task page can be obtained in the following manner: obtaining a test question page image; extracting a question image and position information of each test question in the test question page image; obtaining an answer image corresponding to the question image; generating the single question information based on the question image, the position information, and the answer image; and associating the single question information with each test question on the test question page image. The position information of the question image of each test question in the test question page image refers to the position of the question image relative to the entire test question page image. Alternatively, the single question information can be associated with each test question on the test question page image through the position information.
[0039] The test question page image, the question, and the answer corresponding to the question displayed in the task page can also be obtained in other manners, such as a test question page containing an answer or having answer information, which can directly extract the test question and the answer on the test question page. The test question and the answer can be stored in the form of an image or in the form of text. For example, a test question page can be obtained from a test question library, which can be stored in the form of an image or in the form of text in the background. The question and the answer in the single question information can also be obtained by searching the test question library.
[0040] The single question information has a corresponding relationship with each test question in the test question page image. The corresponding relationship can be established based on, for example, a question serial number, a type, or a position.
[0041] The single question information has a corresponding relationship with each test question in the test question page image. The corresponding relationship can be established based on, for example, a question serial number, a type, or a position.
[0042] In one embodiment, the information for a single question may also include the position of the question image in the question page image, the question type, the question number, and so on.
[0043] In some embodiments, the answer in the single-question information may include an answer image and answer information. The answer information may include the position information of the answer image relative to the entire question page image, and information about the single question to which the answer belongs, such as the question number. The single-question information and each question on the question page image can be associated through the position of the single question on the question page image, or through the question number of the single question.
[0044] In S104, the target single-question information to be labeled is determined based on the user's operation.
[0045] Users can be the annotators for the test questions. Users can select and annotate the questions sequentially according to the order of the individual questions on the test page image, or select any individual question to annotate according to their personal habits.
[0046] The individual question information corresponds to each question in the question page image. This applies regardless of whether the user selects a question (e.g., clicks on it). Figure 5 (A specific question area in the image on the left-hand side of the question page) or select individual question information (click). Figure 5 The target question information can be obtained through the correspondence between any serial number on the right and any other serial number on the right.
[0047] In some embodiments, the target question information to be annotated can be determined based on the user's operation on the task page; and a prompt message can be displayed on the question page image to remind the user of the target question information and the corresponding question on the question page image. This embodiment can utilize the above correspondence to provide linked prompts on the task page for a question to be annotated on the question page image and the corresponding question information, making it easier for the user to annotate the answer.
[0048] Optionally, when the question information includes its location on the question page, location information can be used to provide hints to assist users in marking. When a user selects the target question information to mark on the task page, a highlighted or red task box can be displayed at the corresponding location on the question page image based on the location information included in the question information; simultaneously, the task box can also circle the target question information, or a color bar can be used to highlight the target question information, such as... Figure 2As shown, a red color bar prompt can be used at the top of the label marked with the serial number. When the user selects the target single question to be marked, according to the position of the target single question on the test question page, the position corresponding to the single question on the test question page is circled, which can be circled with a red dashed line, and the serial number (for example, "serial number 11:") above the dashed line can be marked to facilitate the marker to determine the single question being marked; in addition, the target single question corresponding single question information can also be marked, and further, the single question information label can also be expanded, such as Figure 2 As shown.
[0049] In S106, based on the answer contained in the target single question information, the test question corresponding to the target single question information is marked on the test question page image to generate marking information, and the marking information is associated with the test question region corresponding to the target single question information on the test question page.
[0050] In one embodiment, the user input answer marking area can be obtained by monitoring the user operation, and the suggestion marking area can also be generated by image recognition on the test question page image, and the answer marking area can be obtained based on the suggestion marking area and the user operation; the marking box is generated on the test question page image based on the answer marking area; the marking content is generated in the marking box based on the answer contained in the target single question information and the user operation; the marking information is generated based on the marking box and the marking content.
[0051] It should be noted that the marker can directly mark the single question answer according to the content in the answer when marking the test question, and the marker can not need to have the answering ability.
[0052] The detailed content of "based on the answer contained in the target single question information, marking the test question corresponding to the target single question information on the test question page image to generate marking information" will be described in detail in Figure 3 the corresponding embodiments.
[0053] According to the test question answer marking method of the present disclosure, the target single question information to be marked is determined according to the user's operation; based on the answer contained in the target single question information, the test question corresponding to the target single question information is marked on the test question page image to generate marking information, and the marking information is associated with the test question region corresponding to the target single question information on the test question page, which can quickly and flexibly mark the answer information for the test question in the test question page in multiple ways, so as to conveniently and quickly display the test question answer to the student user when the student user searches for the test question answer, especially suitable for the whole page answer situation. When the teacher user corrects the homework, the marking content can be displayed on the test question page, thereby assisting the teacher user to correct the homework.
[0054] It should be clearly understood that the present disclosure describes how to form and use specific examples, but the principles of the present disclosure are not limited to any details of these examples. On the contrary, based on the teachings of the disclosure disclosed in the present disclosure, these principles can be applied to many other embodiments.
[0055] Figure 3 is a flowchart of a test question answer marking method according to another exemplary embodiment. Figure 3 The flowchart 30 shown is a process of marking answers of test questions according to an exemplary embodiment. Figure 1 An exemplary description of S106 in the flowchart shown is that, based on the answers contained in the target single question information, the test question corresponding to the target single question information is marked with answers on the test question page image to generate marking information.
[0056] As shown in FIG. 3, in S302, the answer marking area input by the user is obtained by monitoring the user operation. For example, a marking box can be generated by obtaining the mouse operation track on the test question page image. More specifically, the user can generate a marking box at the blank of a fill-in-the-blank question by the drag operation of the mouse. Figure 3 The answer marking area can be obtained based on the suggestion marking area and the user operation.
[0057] In other embodiments, as shown in S304, the suggestion marking area can be generated by image recognition on the test question page image, and the answer marking area can be obtained based on the suggestion marking area and the user operation. As shown in FIG. 3A, for example, the image recognition technology control can be used to perform image recognition on the test question page image to determine the position of the answer to be marked. More specifically, the marker, i.e., the user, can circle the approximate range on the test question page, and then transmit the picture of the circled range to the service for image recognition. After the image recognition identifies the areas such as the checkered pattern or the brackets, the suggestion marking area prompt can be generated in these areas for the marking user to select. The intelligent marking box control can be provided, and the intelligent marking box control can select the category of the recognition box, including brackets, horizontal lines, squares, circles, checkered patterns, tables, etc., select the recognition result to return the marking type of the marking box data, and the recognition result can be the marking box coordinate information not containing the answer. Figure 4
[0058] In S306, the marking box is generated on the test question page image based on the answer marking area. The step of generating the marking box includes creating the marking box based on the answer marking area, and positioning the marking box in the corresponding area of the outer layer based on the position information of the marking box.
[0059] In S308, the marking content is generated in the marking box based on the answer contained in the target single question information and the user operation. The marking information is generated based on the marking box and the marking content. The marking information can include text information, image information, and graphic information.
[0060] As shown in FIG. 3, in S302, the answer marking area input by the user is obtained by monitoring the user operation. For example, a marking box can be generated by obtaining the mouse operation track on the test question page image. More specifically, the user can generate a marking box at the blank of a fill-in-the-blank question by the drag operation of the mouse. Figure 4 (b) As shown, the annotation content can also be generated by image recognition. More specifically, the user can circle the range on the test paper image, and then transmit the test paper image and the circled range coordinate data to the OCR service for text recognition.
[0061] The text recognition can be performed by the OCR recognition technology to reduce manual operation and save cost. OCR (Optical Character Recognition) refers to a process in which an electronic device (such as a scanner or a digital camera) checks characters printed on paper, determines the shape of the characters by detecting light and dark patterns, and then translates the shape into computer text by using character recognition methods.
[0062] In S310, the annotation information is generated based on the annotation frame and the annotation content.
[0063] For ease of understanding, the above steps are described below in combination with an embodiment.
[0064] Step S302 obtains the answer annotation area input by the user by monitoring the user operation. The test paper image can have an associated outer layer. The answer annotation area is obtained by monitoring the mouse event of the user in the outer layer, and the answer annotation area includes the position information of the annotation frame. The step of generating the annotation frame in step S306 can include: creating the annotation frame based on the answer annotation area, and positioning the annotation frame in the corresponding area of the outer layer based on the position information of the annotation frame.
[0065] More specifically, the above steps can be implemented by the following steps, and the annotation information is associated with the test paper image:
[0066] The mouse event and the position positioning data are obtained, and an outer layer (div) with the display:inline-block; position:relative attribute is added outside the img tag of each test paper image. The img tag defines an image in an HTML page. Technically, the image is not inserted into the HTML page, but linked to the HTML page. The role of the img tag is to create a placeholder for the referenced image.
[0067] The outer layer has the same size as the picture of the test paper, and the outer layer is also set to the original size for display. All the generated annotation frames are positioned on the outer layer div (i.e., the outer layer) of the test paper image by using position:absolute, which is equivalent to being positioned on the test paper image because the test paper image is completely wrapped by the outer div.
[0068] Wherein, the mouse event can be set to listen to the picture outer layer div: mouse down marks the state canMove = true; and record the mouse down relative to the test page picture of the outer layer div position as the starting point of the coordinate of the mark box. Mouse up marks the state canMove = false; mouse move canMove = true, draw frame processing, mouse move new state, judge whether isCreating = true; when the mouse move position relative to the drop point x, y (that is, the width and height of the mark box: w, h) are greater than 5px, formal frame. Mouse state isCreating = false, and the data of the mark box containing x, y, w, h is combined with the additional information of the current selection type, placed in the page display rendering of the test question all mark data, record the order of the current changing mark box in the array. Continue to move the mouse, change the width and height of the mark array current mark (the coordinate of the moving position is less than the starting point coordinate of the mark box, that is, x 移动点 <x 标注框起点 Or y 移动点 <y 标注框起点 When the mouse is up, end the mark box drawing.
[0069] Wherein, the calculation of the eight adjustment mark box of the mark box, the eight direction mouse down record the current adjusted direction can be recorded as follows, mouse move:
[0070] Upper left point: change the horizontal coordinate x and vertical coordinate y of the mark box and the width and height w, h of the mark box, the coordinates x, y of the mouse moving point are set as the coordinates of the current mark box, the difference between the horizontal and vertical coordinates of the mouse moving point and the drop point is the increase and decrease of the width and height of the current mark box;
[0071] Left side: change the horizontal coordinate x and width w of the mark box, the x of the mouse moving point is set as the horizontal coordinate x of the current mark box, and the difference between the horizontal coordinate of the mouse moving point and the horizontal coordinate of the drop point is the increase and decrease of the width of the mark box;
[0072] Lower left point: change the horizontal coordinate x and vertical coordinate y of the mark box and the width and height w, h of the mark box, the coordinates x, y of the mouse moving point are set as the coordinates x, y of the current mark box, the difference between the horizontal and vertical coordinates of the mouse moving point and the drop point is the increase and decrease of the width and height of the current mark box;
[0073] Upper point: change the vertical coordinate y of the mark box and the height h of the mark box, the vertical coordinate y of the mouse moving point is set as the vertical coordinate y of the mark box, and the difference between the vertical coordinate of the mouse moving point and the vertical coordinate of the drop point is the increase and decrease of the height of the current mark box;
[0074] Lower point: change the vertical coordinate y of the annotation box and the height h of the annotation box, set the vertical coordinate y of the mouse movement point as the vertical coordinate y of the annotation box, and the difference between the vertical coordinates of the mouse movement point and the drop point as the increase or decrease of the current annotation box height;
[0075] Upper right: change the horizontal and vertical coordinates x, y of the annotation box and the width and height w, h of the annotation box, set the coordinates x, y of the mouse movement point as the coordinates x, y of the current annotation box, and the difference between the horizontal and vertical coordinates of the mouse movement point and the drop point as the increase or decrease of the width and height of the current annotation box;
[0076] Right side: change the horizontal coordinate x of the annotation box and the width w, set the x of the mouse movement point as the horizontal coordinate x of the current annotation box, and the difference between the horizontal coordinates of the mouse movement point and the drop point as the increase or decrease of the width of the annotation box;
[0077] Lower right: change the horizontal and vertical coordinates x, y of the annotation box and the width and height w, h of the annotation box, set the coordinates x, y of the mouse movement point as the coordinates x, y of the current annotation box, and the difference between the horizontal and vertical coordinates of the mouse movement point and the drop point as the increase or decrease of the width and height of the current annotation box;
[0078] Note: when the width or height of the annotation box adjusted by the eight points is less than 5px, stop the current adjustment operation. Among them, only the annotation box in the active state can change size, delete, change content, click the annotation box to change the current annotation box to the active state, record the order of the current annotation box in all annotation data arrays, and there is only one value in the active state.
[0079] The creation and creation position of the annotation box can be completed through mouse operation on the outer div of the test page picture. The conversion relationship of the mouse position corresponding to the test page picture position is as follows:
[0080] / / Get the relative test page picture position according to the current mouse position
[0081] e: the event obtained when the current mouse event is triggered
[0082] getCurXY(e: any) {
[0083] let ref: any = this.$refs.imgWrap; / / outer div object of the whole page picture (i.e. test page picture)
[0084] / / Get the position of the upper left corner of the outer div of the whole page picture relative to the browser viewport
[0085] Let parentTop = ref.getBoundingClientRect().y;
[0086] Let parentLeft=ref.getBoundingClientRect().x;
[0087] / / Calculate the position of the current mouse point relative to the outer div of the entire page's images;
[0088] Let x:number=Math.floor(ex)-parentLeft;
[0089] Let y:number=Math.floor(ey)-parentTop;
[0090] return {x:x, y:y}; / / Returns the position relative to the image on the test page;
[0091] The following describes the input of annotation content in conjunction with specific embodiments.
[0092] In one embodiment, such as Figure 5 As shown, the task page is equipped with annotation tool controls; when generating or activating annotation boxes on the question page image for editing, the question answer annotation method also includes: obtaining the annotation tool control selected by the user; when the user creates or activates an annotation box for editing, a corresponding menu pops up based on the annotation tool control selected by the user, so that the user can input annotation content in the annotation box based on the menu.
[0093] Annotation tool controls may include one or more of the following: Basic annotation control for simple character text input, with basic text settings; Text annotation control for large blocks of character text input, with formula input tools and text settings; Image annotation control for inputting character text and images, with image input and settings tools; Linear annotation control for inputting character text and line segments, with line segment input and settings tools; Graphic annotation control for inputting character text and graphics, with graphic input and settings tools; Pen annotation control for inputting user drawings, with pen settings; Smart calculation control for recognizing the answer content of a single question and returning the coordinate data of the annotation box containing the answer; Smart annotation control for recognizing the answer annotation area of each question in the image on the question page and returning the coordinate information of the annotation box that does not contain the answer; Global layout control for globally setting each annotation box and its annotation content on the task page; Magnifier control for magnifying the image at the current mouse position.
[0094] For example, such as Figure 5 The task page shown provides the following controls at the top of the annotation and answer area: regular annotation control, linear annotation control, image annotation control, text annotation control, smart calculation control, smart annotation control, pen annotation control, global layout control, delete empty box, and magnifying glass control.
[0095] 1) Ordinary annotation: click the ordinary annotation control (the top of the answer area, the first on the left), as shown in Figure 5 (a). The ordinary annotation control is suitable for simple character text entry, with small amount of text and multiple answers. Multiple answers are or relationships. The main purpose is to improve the accuracy of mental arithmetic correction. It can also achieve the following functions: Figure 6
[0096] Basic selection settings: font boldness corresponds to the weight: true / false field, and the css-->font-weight:bolder field sets the content of the annotation box.
[0097] Font size corresponds to the size: value field, which can be implemented by setting the css-->font-size value of the annotation box content. The font size has a limit (the default font size is the height of the current whole page test picture / 53 and is rounded down, and the minimum font size is the height of the current whole page test picture / 106 and is rounded down);
[0098] Annotation font size reset: users can restore the standard font size calculated by the system if they are not satisfied with their own adjusted font size;
[0099] Line spacing: the line spacing of the annotation content display is realized by default as the css-->line-height value corresponding to the height of the annotation box;
[0100] Text layout: horizontal alignment of annotation content display, left, right, center; css can be set as text-align:left / right / center; justify-content:space-around can also be set for scattered alignment.
[0101] 2) Text entry: click the text annotation control in Figure 5 (b), as shown in Figure 6 (b), the text annotation control is suitable for large paragraph text entry and can enter complex formulas. Compared with ordinary annotation, the features are: multiple text entry, complex formula. Text settings can refer to the ordinary annotation control in the above.
[0102] 3) Picture entry: click the picture annotation control in Figure 5 (c), as shown in Figure 6 (c). The picture can be entered using the text editor in the above text entry, and the size of the picture display can be adjusted. If no adjustment is made, the width of the picture will be set to 80%. The existing picture of the single question answer can also be directly copied into the annotated answer.
[0103] 4) Graphic annotation: Select Figure 5 The text annotation control (the fourth one from the left at the top of the annotation answer area), such as... Figure 6 As shown in (d), several usable graphics can be pre-stored in the system: SVG graphics such as smiley faces, stars, flowers, and circles. The appearance of the graphics can be preset. Graphics can be selected and set; the border thickness is adjusted by setting the SVG's stroke-width, and the fill color is set by setting the SVG's fill. The color value is RGBA, and the transparency value is set by the fourth 'a' in the RGBA property of the fill. For example, for red: RGBA(254,64,51,1), when opaque, the brightness is 100, the fourth 'a' is 1, and the value of 'a' is opacity / 100. Selected graphics can be filled when drawing annotation boxes.
[0104] 5) Linear annotation: Select Figure 5 The linear annotation control (the third one from the left at the top of the annotation answer area), such as... Figure 6 As shown in (e), some usable line segments can be preset—horizontal, vertical, and diagonal solid lines, dashed lines, arrows, double lines, etc. The image below shows the selection and settings of line segments. The line thickness is adjusted by setting the SVG's stroke-width. Selected lines can be filled when drawing annotation boxes.
[0105] 6) Pen annotation: Select Figure 5 The pen annotation control (the sixth one from the left at the top of the answer area), such as... Figure 6 As shown in (f). The annotation content can be generated within the annotation box based on the pen function, including: triggering the pen function based on user operation; establishing a canvas area within the annotation box based on the pen function; and monitoring mouse operation events within the canvas area to generate the annotation content.
[0106] like Figure 6 As shown in (f), select the brush to annotate, choosing the brush thickness and color. The implementation is primarily based on canvas drawing. Once the annotation box is defined, a canvas of the same size as the annotation box with a transparent background is automatically generated and placed within the annotation box.
[0107] The canvas can be configured as follows:
[0108] this.canvas=document.getElementById('theCanvas');
[0109] this.canvasContext = this.canvas.getContext('2d');
[0110] / / Set the color of the brush
[0111] this.canvasContext.fillStyle = 'rgba(0,0,0,0.8)';
[0112] / / Set the width and height of the bounding box
[0113] this.canvas.style.width = `${this.positions.w}px`;
[0114] this.canvas.style.height = `${this.positions.h}px`;
[0115] / / Set the color of the brush
[0116] this.canvasContext.strokeStyle = `rgba(${this.color})`;
[0117] / / Set the size of the brush
[0118] this.canvasContext.lineWidth = this.size;
[0119] / / Set the start and end style of the line
[0120] this.canvasContext.lineCap = 'round';
[0121] / / Set the join style of the line
[0122] this.canvasContext.lineJoin = 'round';
[0123] The brush operation can be achieved by recording the points moved by the mouse and connecting them to draw a picture. When the mouse is clicked, the canvas is converted into a picture and stored in the bounding box.
[0124] Other operations can also be performed in the bounding box:
[0125] 7) Intelligent calculation: click the intelligent calculation control (the seventh from the left at the top of the marking answer area) in Figure 5 , as shown in Figure 4 . The intelligent calculation control can be used to identify the answer content of the single question information and return the answer-containing marking box coordinate data.
[0126] 8) Intelligent marking: click the intelligent marking control (the eighth from the left at the top of the marking answer area) in Figure 5 , as shown in Figure 4 . The intelligent marking control is used to identify the answer marking area of each question in the question page image and return the marking box coordinate information that does not contain answers.
[0127] Both intelligent calculation and intelligent marking intervene in ocr recognition services to reduce manual operations and save costs. Both intelligent calculation and intelligent marking transmit the whole page picture and the drawn range coordinate data to the ocr service by drawing a range on the whole page image. The generated data is not stored in the marking data array. Intelligent calculation can select the answer content to be identified: mental calculation, vertical method, and horizontal method. The identification result is the answer-containing marking box coordinate data.
[0128] 9) Global layout: click the brush marking control (the ninth from the left at the top of the marking answer area) in Figure 5 , as shown in Figure 6 . The following settings can be made: whether the font is bold, the marking text font size, resetting the standard font size, line spacing, the alignment of the marking content in the marking box (same meaning as the ordinary marking setting), horizontal alignment (adjusting the horizontal coordinate): aligning the left side of the marking box with the leftmost marking box in the selected area, center alignment: aligning the center of the marking box with the center of the selected area, right alignment: aligning the right side of the marking box with the rightmost marking box in the selected area; vertical alignment (adjusting the vertical coordinate): aligning the top of the marking box with the topmost marking box in the selected area, center alignment: aligning the center of the marking box with the center of the selected area, bottom alignment: aligning the bottom of the marking box with the bottommost marking box in the selected area, distribution - horizontal distribution (adjusting the horizontal coordinate): finding the marking boxes near the leftmost, rightmost, and center of the selected area as reference marking boxes, and aligning with the reference closest to the reference; vertical distribution (adjusting the vertical coordinate): finding the marking boxes near the top, center, and bottom of the selected area as reference marking boxes, and aligning with the reference closest to the reference.
[0129] 10) Magnifying glass: click the magnifying glass control in Figure 5The magnifying glass control (annotated as the top left eleventh) in the magnifying glass space can generate a magnified picture of the current mouse position. The magnified area is a small window with a width of 140px and a height of 140px, and is positioned to the right of the mouse. The small window contains a picture, which is centered on the mouse point and translated so that the picture position at the mouse is in the center of the small window. The translation is implemented as transform: translate (horizontal translation distance px, vertical translation distance px). When the mouse moves out of the whole page picture magnification window, the window disappears.
[0130] There are currently four auxiliary tool controls: intelligent calculation, intelligent annotation, global layout, and magnifying glass.
[0131] Exemplarily, in one embodiment, the data stored by a complete annotation box is as follows:
[0132] Text or text annotation:
[0133] align: "center", / / alignment
[0134] c: "B", / / annotation content
[0135] defaultLHeight: 35, / / default line height - can be automatically adjusted according to the current height
[0136] deg: 0, / / annotation box rotation angle clockwise according to center point
[0137] h: 37.771883289125, / / annotation box height
[0138] lineHeight: 0, / / annotation box line height (annotation personnel setting priority higher than default line height)
[0139] n: "", / / picture order when multiple pictures
[0140] size: 55, / / annotation content font size
[0141] type: "0", / / annotation type
[0142] w: 158.16976127321, / / annotation box width
[0143] weight: false, / / whether to bold the annotation text
[0144] x: 892.36074557924, / / annotation box top left corner horizontal coordinate based on annotation picture (distance from left)
[0145] y: 672.81166396407 / / The vertical coordinate of the top-left corner of the bounding box based on the annotation image (distance from the top).
[0146] Graphic annotation: {
[0147] c: "", / / Annotation content
[0148] color: "255,204,0,1", / / Graphic color
[0149] deg: 0, / / Rotation angle of the bounding box clockwise based on the center point
[0150] h: 412.48148148148084, / / Height of the bounding box
[0151] n: "", / / Picture order when multiple pictures are used
[0152] opacity: 81, / / Graphic color transparency (100 is opaque, 0 is completely transparent)
[0153] svg: "star", / / SVG graphic used by the annotation
[0154] svgSize: 4, / / Line width of the SVG graphic
[0155] type: "7", / / Annotation type
[0156] w: 356.74074074074065, / / Width of the bounding box
[0157] x: 905.7870305379231, / / Horizontal coordinate of the top-left corner of the bounding box based on the annotation image (distance from the left)
[0158] y: 2421.9352123119215 / / Vertical coordinate of the top-left corner of the bounding box based on the annotation image (distance from the top) A person skilled in the art can understand that all or part of the steps of the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided by the present disclosure are executed. The program can be stored in a computer readable storage medium, which can be a read-only memory, a disk or an optical disk, etc.
[0159] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not for limiting purposes. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0160] Embodiments of the present disclosure also provide an electronic device, comprising: one or more processors; a storage device for storing one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of the preceding method embodiments.
[0161] Embodiments of the present disclosure also provide a computer readable medium having stored thereon a computer program, which when executed by a processor, implements the method according to any one of the preceding method embodiments.
[0162] Embodiments of the present disclosure also provide a computer program product, which stores a computer executable program, and the computer executable program, when executed, implements the test question answer labeling method. The following is an apparatus embodiment of the present disclosure, which can be used to execute the method embodiment of the present disclosure. For details not disclosed in the apparatus embodiment of the present disclosure, please refer to the method embodiment of the present disclosure.
[0163] Figure 7 is a block diagram of a test question answer labeling apparatus according to an exemplary embodiment. As shown in Figure 7 the test question answer labeling apparatus 70 comprises a display module 702, a determination module 704, and a labeling module 706.
[0164] The display module 702 is configured to display a task page, wherein the task page comprises a test question page image and single question information of each test question in the test question page image, and the single question information comprises a question and an answer corresponding to the question.
[0165] The determination module 704 is configured to determine target single question information to be labeled according to an operation of a user.
[0166] The labeling module 706 is configured to perform answer labeling on a test question corresponding to the target single question information in the test question page image based on an answer contained in the target single question information to generate labeling information, and the labeling information is associated with a test question region of the test question page corresponding to the target single question information.
[0167] According to the test question answer labeling apparatus of the present disclosure, target single question information to be labeled is determined according to an operation of a user, and answer labeling is performed on a test question corresponding to the target single question information in the test question page image based on an answer contained in the target single question information to generate labeling information, and the labeling information is associated with a test question region of the test question page corresponding to the target single question information. In this way, the test question answer information can be labeled for test questions in a test question page in a flexible and fast manner through various ways, so that when a student user searches for test question answers, the test question answers can be conveniently and quickly displayed to the student user, and when a teacher user corrects homework, the labeling content can be displayed on the test question page, thereby assisting the teacher user in correcting the homework.
[0168] AsFigure 8 As shown, the electronic device is in the form of a general computing device. The processor can be one or multiple and work cooperatively. The present application does not exclude distributed processing, i.e. the processor can be dispersed in different physical devices. The electronic device of the present application is not limited to a single physical device, but can also be the sum of multiple physical devices.
[0169] The memory stores computer executable programs, usually machine readable codes. The computer readable programs can be executed by the processor to enable the electronic device to perform the method of the present application, or at least some steps of the method.
[0170] The memory includes volatile memory, such as random access memory (RAM) and / or cache memory, and / or non-volatile memory, such as read only memory (ROM).
[0171] Optionally, the electronic device further includes an I / O interface for data exchange between the electronic device and external devices. The I / O interface can be one or more of several types of bus structures, including memory bus or memory controller, peripheral bus, graphics acceleration port, processing unit, or local bus using any of the bus structures.
[0172] It should be understood that, Figure 8 The electronic device shown is only an example of the present application, and the electronic device of the present application can also include elements or components not shown in the above examples. For example, some electronic devices also include display units such as display screens, and some electronic devices also include human-computer interaction elements such as buttons and keyboards. As long as the electronic device can execute the computer readable programs in the memory to implement the method of the present application or at least some steps of the method, it can be considered as an electronic device covered by the present application.
[0173] From the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software combined with necessary hardware. Therefore, as long as the functions of the embodiments are not affected, the embodiments can be implemented in various forms of hardware, software, and combinations thereof. Figure 9 As shown, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiments of the present application.
[0174] The software product can employ any combination of one or more computer-readable media. The computer-readable media can be a computer-readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0175] The computer-readable storage medium can include data signals on a carrier wave, propagated over a propagation medium, in which the computer-readable program code is embodied. Such propagated signals can take a wide variety of forms, including but not limited to, electro-magnetic signals, optical signals, or any suitable combination thereof. The computer-readable storage medium can also be any computer-readable medium other than a computer-readable storage medium that can be a source of computer-readable program code, which can be read by the instruction execution system, apparatus, or device, and used, used in combination, or to manufacture the instruction execution system, apparatus, or device. The computer-readable program code embodied on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0176] The program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0177] The computer readable medium carries one or more programs, when the one or more programs are executed by the device, the computer readable medium causes the computer readable medium to realize the following functions: displaying a task page, the task page including a test page image, single question information of each question in the test page image, the single question information including a question and an answer corresponding to the question; determining target single question information to be marked according to an operation of a user; performing answer marking on a question corresponding to the target single question information on the test page image based on an answer contained in the target single question information to generate marking information, the marking information being associated with a question area of the test page corresponding to the target single question information.
[0178] Those skilled in the art can understand that the above modules can be distributed in the device according to the description of the embodiments, and can also be changed in one or more devices different from the embodiments. The modules of the above embodiments can be combined into one module, or can be further split into multiple sub-modules.
[0179] Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a plurality of instructions to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiments of the disclosure.
[0180] The example embodiments of the disclosure are specifically shown and described above. It should be understood that the disclosure is not limited to the detailed structure, arrangement or implementation method described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements within the spirit and scope of the appended claims.
Claims
1. A method for annotating test answers, which can annotate electronic answer information on a test paper image, characterized in that, include: Get the image of the test question page; Extract the question image and its position information for each question from the question page image. The position information is the position of the question image relative to the entire question page image. Obtain the answer image corresponding to the question image; Individual question information is generated based on the question image and its location information, and the answer image. The individual question information includes the question and the corresponding answer. The location information is used to associate individual question information with each question on the question page image; The task page is displayed, which includes the test page image shown on the left and the individual question information arranged by number for each question in the test page image shown on the right. Determine the target question information to be labeled based on the user's actions; The answer annotation area can be obtained by monitoring the user's mouse events in the outer layer associated with the test question page image, or by performing image recognition on the test question page image to generate suggested annotation areas and obtaining the answer annotation area based on the suggested annotation areas and user operations; Generate annotation boxes on the question page image based on the answer annotation area; Generate annotation content within the annotation box based on the answers and user actions contained in the target question information; Annotation information is generated based on the annotation box and annotation content, and the annotation information is associated with the question area on the question page that corresponds to the target question information.
2. The test answer annotation method as described in claim 1, characterized in that, The target question information to be labeled is determined based on the user's actions, including: The target question information is determined based on the user's actions on the task page; A prompt message is displayed on the test question page image to remind the user of the target question information and the corresponding question on the test question page image.
3. The test answer annotation method as described in claim 1, characterized in that, Generating a label box includes: creating a label box based on the answer label area, wherein the answer label area includes the position information of the label box; and positioning the label box in the corresponding area of the outer layer based on the position information of the label box.
4. The method for marking test answers as described in claim 1, characterized in that, Also includes: The task page includes annotation tool controls; When generating or activating annotation boxes on the test question page image, the test question answer annotation method further includes: Obtain the annotation tool control selected by the user; When a user creates a label box or activates the label box for editing, a corresponding menu pops up based on the labeling tool control selected by the user, so that the user can enter the labeling content in the label box based on the menu.
5. The test answer annotation method as described in claim 4, characterized in that, The annotation tool control includes one or more of the following: The standard annotation control is used for simple character text input and has basic text setting functions; The text annotation control is used for entering large blocks of character text, and it has formula entry tools and text setting functions; Image annotation control, used to input text and images, with image input and settings tools; Linear annotation control, used to input characters and line segments, with tools for inputting and setting line segments; Graphic annotation control, used for entering text and graphics, with graphic input and setting tools; The pen annotation control is used to input user drawings and has pen settings functions; The intelligent calculation control is used to identify the answer content of the single question information and return the coordinate data of the annotation box with the answer; The intelligent annotation control is used to identify the answer annotation area for each question in the question page image and return the coordinate information of the annotation box that does not contain the answer. A global layout control is used to globally set the annotation boxes and their annotation content on the task page; The magnifying glass control is used to zoom in on the image at the current mouse position.
6. A test question answer annotation device, capable of annotating electronic answer information on a test question page image, characterized in that, include: The display module is used to acquire images of the test question page; Extract the question images and their position information for each question from the question page image. The position information refers to the position of the question image relative to the entire question page image. Obtain the answer image corresponding to the question image. Generate single-question information based on the question image, its position information, and the answer image. The single-question information includes the question and its corresponding answer. Associate the single-question information with each question on the question page image through the position information. Display the task page, which includes the question page image displayed on the left and the single-question information corresponding to each question in the question page image displayed on the right, arranged in sequence. The determination module is used to determine the target question information to be labeled based on the user's operation. The annotation module is used to obtain the user's input answer annotation area by monitoring the user's mouse events in the outer layer associated with the test question page image, or to generate suggested annotation areas by performing image recognition on the test question page image and obtain the answer annotation area based on the suggested annotation areas and the user's operation; Generate annotation boxes on the question page image based on the answer annotation area; Generate annotation content within the annotation box based on the answers and user actions contained in the target question information; Annotation information is generated based on the annotation box and annotation content, and the annotation information is associated with the question area on the question page that corresponds to the target question information.
7. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.
8. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Test paper correction method and device, electronic device and storage medium
CN109815932A
Question recording system based on digital education resources
CN112381099A