Test question rendering method and device, equipment and medium

By obtaining the font size specified by the user and adjusting the size and position of the test questions rendering, the problem of unsightly rendering of the test questions in the existing technology is solved, and the rendering quality and students' answering experience are improved.

CN120012713APending Publication Date: 2025-05-16BEIJING FLYING ELEPHANT PLANET TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510102112.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

It is difficult for the existing technology to coordinate the size and position relationships between the question text and the accompanying drawings when rendering the test questions, resulting in the unsightly rendering effect and affecting students' answering experience.

Method used

By obtaining the font size specified by the user, obtaining the text, drawings and layout information of the test questions, thereby calculating the proportion and adjusting it to ensure that the size and position of the rendered test questions text and drawings are consistent.

Benefits of technology

It improves the quality of the test questions rendering, making the rendered question sheet beautiful and compact, and improves the students' answering experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012713A_ABST
    Figure CN120012713A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test question rendering method and device, equipment and a medium. According to the scheme, the method comprises the steps of obtaining a specified font size of a user for a target test question; obtaining test question texts and illustrations of the target test questions and typesetting information of the target test questions in the test question publication page; the typesetting information comprises the font size of the test question text, the illustration size of the illustration and first relative position data of the test question text and the illustration; calculating a ratio of a specified font size to the font size; adjusting the size of the illustration according to the proportion to obtain the rendering size of the illustration; adjusting the first relative position data according to the proportion to obtain second relative position data; and rendering the target test question according to the specified font size, the rendering size of the illustration and the second relative position data. According to the embodiment of the invention, the typesetting information of the target test question in the test question publication page can be obtained, so that the target test question is rendered by using the typesetting information, and the test question rendering quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and more particularly to a method for rendering a test question. One or more embodiments of this specification also relate to a method for storing test questions, a device for rendering test questions, a computing device, a computer-readable storage medium, and a computer program product. Background Art

[0002] In actual applications, test questions can be stored in a question bank in advance, and then various test questions can be selected from the question bank to render into a question list. The question list can be printed into homework questions, test papers, etc. for students to practice and answer.

[0003] The existing technology usually stores the test questions by manually recording the test questions and manually capturing the relevant pictures of the test questions. When the test questions are stored manually, the layout information of the test questions will not be recorded. Since the layout information is not recorded, it is difficult to coordinate the font size relationship of the test text and the picture in the test question when rendering the question list, as well as the position relationship between the test text and the picture, etc., resulting in the rendered question list being unsightly, affecting students' experience in answering homework questions, test papers, etc. Summary of the invention

[0004] In view of this, an embodiment of the present specification provides a method for question rendering. One or more embodiments of the present specification also relate to a method for question storage, a question rendering apparatus, a computing device, a computer-readable storage medium and a computer program to improve the quality of question rendering.

[0005] According to a first aspect of an embodiment of this specification, a method for rendering a test question is provided, comprising:

[0006] Get the user's specified font size for the target test question;

[0007] Acquire the test text, the accompanying picture of the target test question and the typesetting information of the target test question in the test question publication page from the test question database; the typesetting information includes the font size of the test text in the test question publication page, the size of the accompanying picture in the test question publication page and the first relative position data of the test text and the accompanying picture in the test question publication page;

[0008] Calculating the ratio of the specified font size to the font size of the test question text in the page of the test question publication;

[0009] Adjusting the size of the illustration according to the ratio to obtain a rendering size of the illustration;

[0010] The first relative position data is adjusted according to the ratio to obtain second relative position data between the rendering position of the test question text and the rendering position of the accompanying picture;

[0011] The target test question is rendered according to the specified font size, the rendering size of the illustration, and the second relative position data.

[0012] According to a second aspect of the embodiments of this specification, a test question storage method is provided, comprising:

[0013] Get an image of the test publication page;

[0014] Identify the test text, the font size of the test text and the first position data of the test text in the page of the test publication from the image;

[0015] Identify from the image the picture of the test question text, the picture size of the picture, and second position data of the picture in the page of the test question publication;

[0016] Calculating first relative position data of the test question text and the illustration in the page of the test question publication according to the first position data and the second position data;

[0017] The test question text, the font size of the test question text, the illustration, the illustration size of the illustration and the first relative position data are saved in a test question database.

[0018] According to a third aspect of an embodiment of this specification, a test question rendering device is provided, including:

[0019] A designated font size acquisition module is configured to acquire a user's designated font size for a target test question;

[0020] A data acquisition module is configured to acquire the test text, the accompanying picture of the target test question and the typesetting information of the target test question in the test question publication page from the test question database; the typesetting information includes the font size of the test text in the test question publication page, the size of the accompanying picture in the test question publication page and the first relative position data of the test text and the accompanying picture in the test question publication page;

[0021] A ratio calculation module, configured to calculate the ratio of the specified font size to the font size of the test question text in the page of the test question publication;

[0022] A first adjustment module is configured to adjust the size of the image according to the ratio to obtain a rendering size of the image;

[0023] A second adjustment module is configured to adjust the first relative position data according to the ratio to obtain second relative position data between the rendering position of the test question text and the rendering position of the accompanying image;

[0024] The target question rendering module is configured to render the target question according to the specified font size, the rendering size of the illustration and the second relative position data.

[0025] According to a fourth aspect of an embodiment of this specification, a computing device is provided, including:

[0026] Memory and processor;

[0027] The memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions. When the computer programs or instructions are executed by the processor, the steps of the above method are implemented.

[0028] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program or instructions, and the steps of the above method are implemented when the computer program or instructions are executed by a processor.

[0029] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0030] At least one embodiment of the present specification achieves the following beneficial effects: the embodiments of the present specification can obtain the test text, illustrations and typesetting information of the target test question in the test question publication page, the typesetting information including the font size of the test text in the test question publication page, the illustration size in the test question publication page and the first relative position data of the test text and illustration in the test question publication page, and then the typesetting information can be used to render the target test question according to the user's specified font size for the target test question, thereby improving the test question rendering quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a flow chart of a test question rendering method provided by an embodiment of this specification;

[0032] Figure 2 It is a schematic diagram of a test question publication page provided by one embodiment of this specification;

[0033] Figure 3 A schematic diagram of region identification provided for one embodiment of this specification;

[0034] Figure 4 is a flow chart of a test question storage method provided by an embodiment of this specification;

[0035] Figure 5 It is an overall flow chart of a test question rendering method provided by an embodiment of this specification;

[0036] Figure 6 It is a schematic diagram of a question list provided by an embodiment of this specification;

[0037] Figure 7 It is a structural schematic diagram of a test question rendering device provided by an embodiment of this specification;

[0038] Figure 8 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0039] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0040] 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 in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0041] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this 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 may also be referred to as the second, and similarly, the second may also be referred to as the first. 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".

[0042] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0043] In this specification, a test question rendering method is provided. This specification also involves a test question storage method, a test question rendering device, a computing device, a computer-readable storage medium and a computer program, which are described in detail one by one in the following embodiments.

[0044] See also Figure 1 , Figure 1 This is a flowchart of a method for question rendering provided by an embodiment of this specification. From a program perspective, the execution subject of the process can be a program installed on a server or a question rendering platform. From a hardware perspective, the execution subject of the process can be a server or a question rendering platform capable of question rendering. The method can specifically include the following steps.

[0045] Step 102: Obtain the user's specified font size for the target test question.

[0046] In practical applications, the test questions can be rendered to obtain a question list, wherein the question list can be printed into homework questions, test papers, etc. containing the test questions for students to practice and answer.

[0047] In the embodiments of this specification, the user may be a user who has a need for test question rendering, such as a teacher, a student's parent, etc.

[0048] When rendering test questions in actual applications, the target test question to be rendered may be determined first, and then the target test question to be rendered may be rendered, wherein the target test question may be a test question in a pre-set test question database.

[0049] As a specific implementation, the user can select a target test question in the test question database. For example, the user terminal can display at least one of the test question text and the test question picture. The user can select the target test question by selecting the test question text or the test question picture.

[0050] Optionally, the target question may be one question or multiple questions, which is not limited here.

[0051] In the embodiments of this specification, the user can select the font size of the target test question. For example, the user terminal can display multiple selectable font sizes, such as "font size 1", "font size 2", "font size 3", etc. The user can select a specific font size from the multiple selectable font sizes, such as "font size 2", etc.

[0052] In the embodiments of this specification, the specified font size may refer to the rendering size of the test text of the target test question. Specifically, it may be the font size of the target test question in the question list, or in other words, it may be the font size of the target test question in the printed material. The printed material may be printed for the question list containing the target test question. For example, the printed material may specifically be homework questions, test papers, etc.

[0053] Step 104: Acquire the test text, illustrations and layout information of the target test question in the test publication page from the test database; the layout information includes the font size of the test text in the test publication page, the illustration size of the illustration in the test publication page and the first relative position data of the test text and the illustration in the test publication page.

[0054] In the embodiment of the present specification, the test question database may be pre-set, and specifically may be set before executing the process of the embodiment of the present specification.

[0055] Optionally, the test question database may include one or more test questions.

[0056] As a specific implementation method, the test question database can be set by manually recording the test question text, the test question illustrations, and the typesetting information of the test questions in the test question publication page.

[0057] As a specific implementation method, the test question database can also be set up by recording the test question text, the test question illustrations, and the typesetting information of the test questions in the test question publication page in an automated manner.

[0058] In the embodiments of the present specification, the test question publication may be a publication with the layout information of the test questions already typeset, such as a test paper, an exercise book, etc.

[0059] Specifically, the test question publication page may be a paper page of the test question publication, or may be an electronic page of the test question publication, such as a picture.

[0060] In practical applications, the test question database includes the test question text, accompanying pictures and layout information of the target test question in the test question publication page.

[0061] Optionally, the test text of the target test question may be the stem of the target test question. Specifically, the stem of the target test question may include Chinese characters, fractions, formulas, tables, and the like.

[0062] Optionally, the pictures of the target questions can be used to understand the meaning of the questions or to supplement the stem of the target questions. Specifically, the pictures can be geometric pictures related to math questions, scene pictures related to picture-based writing questions in Chinese, or experimental device diagrams related to chemistry questions.

[0063] In an embodiment of the present specification, the layout information of the target test question may include the font size of the test text of the target test question in the test question publication page, the size of the illustration of the target test question in the test question publication page, and the first relative position data of the test text of the target test question and the illustration of the target test question in the test question publication page.

[0064] Optionally, if the test question publication page is a paper page, the font size of the test question text may be the actual size of the test question text in the paper page. Specifically, the actual size may be at least one of the width or height of the text in the test question text, such as 0.8 cm in width and 1 cm in height. Specifically, the width and height of the text in the test question text may be the average of multiple texts in the test question text.

[0065] Furthermore, if the test question publication page is a paper page, the size of the illustration may be the actual size of the illustration in the paper page. Specifically, the actual size of the illustration in the test question publication page may include at least one of the width and height of the illustration in the test question publication page.

[0066] As a specific implementation, if the test question publication is an electronic page, the font size of the test question text may be the pixel size of the test question text in the electronic page. Specifically, the pixel size of the test question text in the electronic page may be the number of pixels occupied by the width or height of the text in the test question text in the electronic page. For example, if a certain text occupies 5 pixels in width and 6 pixels in height, then the width of the certain text, or the test question text, is 5 pixels and the height is 6 pixels.

[0067] Furthermore, if the test publication is an electronic page, the size of the illustration can be the pixel size of the illustration in the electronic page. Specifically, the pixel size of the illustration in the electronic page can be the number of pixels occupied by the width or height of the illustration in the electronic page. For example, if a certain illustration occupies 40 pixels in width and 60 pixels in height, then the width of the illustration is 40 pixels and the height is 60 pixels.

[0068] In practical applications, the first relative position data may be data including direction and length, such as vector data. Specifically, the first relative position data may be determined by the position data of the test text in the test publication page and the position data of the accompanying image in the test publication page.

[0069] Step 106: Calculate the ratio of the specified font size to the font size of the test question text in the test question publication page.

[0070] In the embodiment of this specification, the ratio of the designated font size to the font size of the test question text in the test question publication page can be an adjustment ratio for the font size of the test question text. The font size of the test question text can be adjusted by the adjustment ratio to obtain the designated font size.

[0071] In actual applications, the font size of the specified font size in the printed material can be determined based on the relationship between the specified font size and the font size of the specified font size in the printed material. For example, if the specified font size is "font size 1", and the font size of "font size 1" in the printed material is "5 pixels high", then the font size of the specified font size in the printed material can be determined to be "5 pixels high".

[0072] Furthermore, the ratio can be obtained by calculating the ratio between the font size of the specified font size in the printed material and the font size of the test text in the test publication page. Continuing with the above example, if the font size of the test text in the test publication page is "6 pixels high", the ratio can be 5 / 6.

[0073] Step 108: adjusting the size of the image according to the ratio to obtain a rendering size of the image.

[0074] Specifically, adjusting the size of the image according to the ratio may be to multiply the ratio by the image size. The rendering size of the image may be the product of the ratio and the image size. For example, if the ratio is 5 / 6 and the image size is "60 pixels high", the rendering size of the image may be "50 pixels high".

[0075] In the embodiments of the present specification, the rendering size of the illustration may be the illustration size in the question sheet, or in other words, may be the illustration size in the printed material.

[0076] In the embodiments of this specification, the size of the illustrations can be adjusted according to the ratio to obtain the rendering size of the illustrations. The rendering size of the illustrations can be used to render the illustrations of the target test questions, so that the size ratio of the illustrations in the rendered question list relative to the test question text is the same as the size ratio of the illustrations in the test question publication relative to the test question text. Since the font size of the test question text and the illustration size of the illustrations in the test question publication are typeset information, that is, the size ratio of the font size of the test question text to the illustration size is typeset information, the embodiments of this specification render the illustrations using the rendering size of the illustrations, and can obtain a question list with the size ratio of the font size of the test question text and the illustration size that has been typeset, thereby improving the quality of test question rendering.

[0077] Step 110: adjusting the first relative position data according to the ratio to obtain second relative position data between the rendering position of the test question text and the rendering position of the illustration.

[0078] Specifically, adjusting the first relative position data according to the ratio may be performed by multiplying the ratio by the first relative position data. The second relative position data may be the product of the ratio and the first relative position data.

[0079] In the embodiments of the present specification, the second relative position data may be the relative position data of the test question text and the accompanying diagram in the test sheet, or in other words, may be the relative position data of the test question text and the accompanying diagram in the printed material.

[0080] In the embodiment of the present specification, the first relative position data can be adjusted according to the ratio to obtain the second relative position data. The second relative position data can be used to render the relative position of the test text and the illustration in the question list, so that the relative position of the test text in the rendered question list relative to the illustration is the same as the relative position of the test text in the question publication relative to the illustration. And because the relative position of the test text and the illustration in the question publication is typeset information that has been typeset, the embodiment of the present specification renders the relative position of the test text and the illustration through the second relative position data, and can obtain a question list with the relative position of the test text and the illustration already typeset, thereby improving the quality of question rendering.

[0081] Step 112: Render the target test question according to the specified font size, the rendering size of the illustration, and the second relative position data.

[0082] In practical applications, rendering the target test question according to the specified font size may specifically include rendering the test question text of the target test question into the specified font size.

[0083] Optionally, the target test question is rendered according to the rendering size of the accompanying image, and specifically, the test text of the target test question may be rendered into a specified font size.

[0084] Optionally, rendering the target question according to the second relative position data may specifically include rendering the question text of the target question and the accompanying picture of the target question into the relative position relationship represented by the second relative position data.

[0085] The embodiments of this specification can obtain the typesetting information of the target test question in the page of the test question publication, wherein the test question publication is a publication of the typesetting information of the test question that has been typeset. Therefore, in the process of rendering the target test question, the typesetting information in the page of the test question publication can be used to render the target test question, and the rendering result of the typesetting information of the test question that has been typeset can be obtained, thereby improving the typesetting effect of rendering the question sheet and improving the quality of test question rendering.

[0086] On the other hand, the layout information of the target test question in the test question publication page includes the font size of the test question text in the test question publication page, the size of the illustration of the target test question in the test question publication page, and the first relative position data of the test question text and the illustration in the test question publication page. Then, the embodiment of this specification can use the above-mentioned layout information to render the target test question, so as to achieve a rendering effect with clear test question text, clear illustration, and compact and beautiful layout between the test question text and the illustration.

[0087] based on Figure 1 The method, the examples of this specification also provide some specific implementation plans of the method, which are described below.

[0088] In the embodiment of the present specification, a test question database containing the typesetting information of the test questions in the test question publication page can be pre-set, so as to render the test questions using the typesetting information of the test questions in the test question database, thereby improving the quality of test question rendering. Optionally, before obtaining the test question text, accompanying pictures and typesetting information of the target test question in the test question publication page from the test question database, the method can also include:

[0089] An image of a test question publication page where the target test question is located is obtained.

[0090] The test question text, the font size of the test question text and the first position data of the test question text in the page of the test question publication are identified from the image.

[0091] The illustration, the illustration size of the illustration and second position data of the illustration in the page of the test question publication are identified from the image.

[0092] The first relative position data of the test question text and the illustration in the page of the test question publication is calculated according to the first position data and the second position data.

[0093] The test question text, the font size of the test question text, the illustration, the illustration size of the illustration and the first relative position data are saved in a test question database.

[0094] In the embodiments of this specification, the test question publication is a publication of the typesetting information of the test question. The typesetting information of the test question may include the font size of the test question text in the test question publication, the size of the picture of the test question in the test question publication, and the relative position data of the test question text and the picture of the test question in the test question publication. Specifically, the test question publication may be a test paper, an exercise book, etc.

[0095] As a specific implementation, the test question publication page may be a paper page of the test question publication. Further, the image of the test question publication page may be obtained by capturing an image of the paper page of the test question publication.

[0096] As a specific implementation, the test question publication page may also be an electronic page of the test question publication. Further, the image of the test question publication page may be obtained based on the electronic page of the test question publication, such as by capturing the image of the electronic page.

[0097] Figure 2 is a schematic diagram of a test question publication page provided by an embodiment of this specification, such as Figure 2 As shown, the test publication page can include the test text and accompanying pictures.

[0098] In practical applications, text recognition technologies such as optical character recognition (OCR) and deep learning algorithms can be used to identify the test text of the target test question, the font size of the test text, and the first position data of the test text in the test publication page from the image.

[0099] Optionally, the question text of the target question can be the stem of the target question. Specifically, the stem of the target question can include at least one of Chinese characters, fractions, formulas, tables, and answer areas. Among them, Chinese characters can include Arabic numerals and decimals. Fractions are numbers containing numerators, denominators, and fraction lines. Formulas can include mathematical formulas, physical formulas, and chemical formulas. Tables can enclose data structures that organize data in rows and columns. The answer area is the area where the answer data of the target question is to be filled in. Specifically, the answer area can be an area containing parentheses, such as the answer area "()" for multiple-choice questions, true-or-false questions, etc.; the answer area can be an area containing underscores, such as the answer area "_______" for fill-in-the-blank questions; the answer area can also be a blank area below the stem, such as the answer area for solution questions and application questions.

[0100] Optionally, the font size of the test text may be the pixel size of the test text in the image. Specifically, the pixel size of the test text in the image may be the number of pixels occupied by the width or height of the text in the test text in the image. For example, the average number of pixels occupied by the height of each text in the test text may be used as the font size of the test text.

[0101] In the embodiment of the present specification, the position data of the first text in the test question text in the test question publication page may be used as the first position data of the test question text.

[0102] As a specific implementation, the position data of the feature point of the area where the test text is located in the test publication page can also be used as the first position data of the test text. Optionally, the feature point can be the center point of the area where the test text is located, the point in the upper left corner of the area, the point in the lower left corner of the area, the point in the upper right corner of the area, the point in the lower right corner of the area, etc. The area where the test text is located can be identified using optical character recognition technology. Figure 3 A schematic diagram of region identification is provided for one embodiment of this specification. Figure 3 As shown, the optical character recognition technology can be used to identify the test text area where the test text is located. For example, the position data of the center point of the area in the test publication page is used as the first position data.

[0103] Specifically, the first position data may be the coordinates of the test question text in the page of the test question publication.

[0104] In practical applications, object recognition algorithms such as Scale-Invariant Feature Transform (SIFT), Single Shot MultiBox Detector (SSD) and YOLO (You Only Look Once) algorithm can be used to identify the illustration, the size of the illustration and the second position data of the illustration in the test publication page from the image.

[0105] In the embodiments of this specification, the illustrations of the target test questions may be geometric diagrams related to math problems, scene diagrams related to picture-based writing problems in Chinese language problems, or schematic diagrams of experimental devices related to chemistry problems.

[0106] Optionally, the size of the image may be the pixel size of the image in the image. Specifically, the pixel size of the image in the image may be the number of pixels occupied by the width or height of the image in the image.

[0107] Optionally, the position data of the feature point of the area where the illustration is located in the test question publication page can be used as the second position data of the illustration. Optionally, the feature point can be the center point of the area where the illustration is located, the point in the upper left corner of the area, the point in the lower left corner of the area, the point in the upper right corner of the area, the point in the lower right corner of the area, etc. Figure 3 , a single detection multi-frame detector, a YOLO algorithm, etc. can be used to identify the area where the illustration is located, such as using the position data of the center point of the area in the test publication page as the second position data.

[0108] Specifically, the second position data may be the coordinates of the illustration in the page of the test publication.

[0109] In the embodiments of the present specification, the first relative position data of the test text and the accompanying picture in the test publication page can be calculated based on the first position data and the second position data. For example, the relative position data between the coordinates of the test text in the test publication page and the coordinates of the accompanying picture in the test publication page can be calculated, such as calculating the vector between the two coordinates, and using the calculated vector as the first relative position data.

[0110] In the embodiment of this specification, the test question text, the font size of the test question text, the illustration, the illustration size of the illustration, and the first relative position data are saved in the test question database. Specifically, the test question text, the font size of the test question text, the illustration, the illustration size of the illustration, and the first relative position data are associated and saved in the test question database. In this way, when rendering the target test question, it is convenient to obtain the font size, illustration, the illustration size, and the first relative position data of the test question text corresponding to the target test question from the database, so as to render the target test question based on the above data obtained.

[0111] In practical applications, a test question publication page may contain multiple test questions. The embodiment of this specification may divide the test questions in the test question publication page into test questions based on the test question numbers, and then at least some of these test questions may be saved to the test question database. Optionally, the identifying the test question text from the image may specifically include:

[0112] Using text recognition technology, the text content contained in the image and the position of the text content are identified; the text content contains at least one question number; the at least one question number contains the question number of the target test question.

[0113] According to the position of the text content, the text content is divided into test question texts corresponding to each question number of the at least one question number; one test question text corresponds to one question number.

[0114] In the embodiments of this specification, text recognition technology may include optical character recognition technology, deep learning algorithm, etc.

[0115] Optionally, the text content included in the image may be all text or at least part of the text in the image. All text or at least part of the text in the image may include Chinese characters, fractions, formulas, and the like.

[0116] Optionally, the position of the text content may be the position of each text of the text content in the test question publication page, and may specifically be the coordinates of each text in the test question publication page.

[0117] In the embodiment of the present specification, the text content included in the image may include at least one question number. Specifically, the question number may be a question number representing a test question, such as "1", "one", "first question", etc.

[0118] In practical applications, the text content is divided into test texts corresponding to each question number in at least one question number according to the position of the text content. Specifically, the text content can be divided into test texts corresponding to each question number according to the position of each text in the test question publication page and the position of each question number of the test question in the test question publication page. For example, for a certain question number, the test text corresponding to the certain question number can be determined based on the ordinate of the certain question number in the test question publication page, the ordinate of the next question number of the certain question number in the test question publication page, and the ordinate of each text in the test question publication page. If the value of the ordinate of a certain text is between the value of the ordinate of the certain question number and the value of the ordinate of the next question number, it can be determined that the text is the test text corresponding to the certain question number.

[0119] In the embodiment of this specification, in order to facilitate the rendering of the test questions, the test question text of the test question can be converted into data in a preset format in advance, and then stored in the test question database. Optionally, before saving the test question text to the test question database, the following steps may also be included:

[0120] If the test question text contains a score, converting the score into score data in LaTex format; saving the test question text to a test question database may specifically include: saving the test question text containing the score data to a test question database.

[0121] If the test question text contains a formula, the formula is converted into formula data in LaTex format; and the step of saving the test question text to a test question database may specifically include: saving the test question text containing the formula data to a test question database.

[0122] If the test question text contains a table, the table is converted into table data in LaTex format or HTML format; saving the test question text to the test question database may specifically include: saving the test question text containing the table data to the test question database.

[0123] If the test question text contains an answer area, data in a specified format representing the answer area is generated; the data in the specified format is used to render the answer area after being read; and saving the test question text to a test question database may specifically include: saving the test question text containing the data in the specified format to a test question database.

[0124] In the embodiments of this specification, the scores, formulas, tables, etc. in the test text can be converted into data in LaTex format.

[0125] Among them, LaTex is a typesetting language used to generate data documents containing high-quality typesetting information.

[0126] In the embodiment of this specification, the table can also be converted into table data in HTML format.

[0127] Among them, html (HyperText Markup Language) is a markup language. Data in html format is data in plain text format.

[0128] In the embodiment of this specification, data of a specified format representing the answer area of ​​the test text can also be generated. In other words, the embodiment of this specification can convert the answer area of ​​the test text into data of a specified format. The data of the specified format can be used to render the answer area of ​​the test question after being read. In practical applications, the data of the specified format can be data in json format, etc.

[0129] Before storing the test questions in the database, the embodiments of the present specification can convert the scores, formulas, tables, answer areas, etc. in the test question text into data in a preset format, so that different scores in different test question texts can be represented by data in a unified format, different formulas in different test question texts can be represented by data in a unified format, different tables in different test question texts can be represented by data in a unified format, and different answer areas in different test question texts can be represented by data in a unified format, etc., thereby facilitating test question rendering.

[0130] In practical applications, a test question publication page may contain multiple test questions and multiple illustrations. The embodiment of this specification can determine the correspondence between the test question text and the illustration based on the positions of multiple test question texts and the positions of multiple illustrations of the multiple test questions, or in other words, determine which illustration is the illustration of which test question text. Optionally, the method may also include:

[0131] The positions of the multiple test question texts contained in the image are identified by using text recognition technology.

[0132] Using a target recognition algorithm, positions of multiple illustrations contained in the image are identified.

[0133] A test question is determined according to the positions of the multiple test question texts and the positions of the multiple illustrations; a relative position relationship between the illustrations included in a test question and the test question text included in the test question satisfies a preset condition; and the test question includes the target test question.

[0134] In the embodiments of this specification, the aforementioned text recognition technology can be used to identify the positions of multiple test question texts in the image.

[0135] Optionally, the target recognition algorithm mentioned above can be used to identify the locations of multiple images in the image.

[0136] In actual application, the layout of the test publication page Figure 1 Generally, the distance between the test text and the illustration is close to the test text, for example, the illustration is located below the test text at a preset distance, or above the test text at a preset distance, etc. Therefore, the test questions can be determined by using the positions of multiple test texts and the positions of multiple illustrations. For example, for any illustration among multiple illustrations, if the distance between a certain test text and the any illustration is less than or equal to a preset distance, the test text and the any illustration can be determined as one test question.

[0137] In the embodiment of this specification, the relative position relationship between the picture included in a test question and the test question text included in the test question can meet a preset condition. The preset condition can be that the distance between the picture and the test question text is less than or equal to a certain preset distance.

[0138] As a specific implementation manner, a determined test question may include one illustration, may include multiple illustrations, or may include no illustration, which is not limited here.

[0139] In practical applications, the answer data of the test questions can also be saved in a test question database. Optionally, the method can also include:

[0140] Answer data for the target test question is determined.

[0141] The answer data is associated with the target test question and saved in a test question database.

[0142] In the embodiments of this specification, the answer data of the target test question can be determined in a variety of ways. For example, the target test question can be answered manually to determine the answer data of the target test question. The target test question can be answered using a deep learning algorithm such as a large model to determine the answer data of the target test question. Optionally, if the test question publication contains the answer data of the target test question, the answer data of the target test question can also be obtained from the test question publication.

[0143] In the embodiment of the present specification, the answer data is associated with the target test question and saved in the test question database, which may be to save the answer data and the corresponding relationship between the answer data and the target test question in the test question database. The answer data of the target test question can be obtained from the test question database through the corresponding relationship between the answer data and the target test question, and the obtained answer data can be used to render the answer data of the target test question.

[0144] In actual application, the user can select a test question, and then the server can render the test question selected by the user. Optionally, before obtaining the user's specified font size for the target test question, the following may also be included:

[0145] Based on the user's selection operation, the target test question is determined.

[0146] In an embodiment of the present specification, a user may select a target test question in a test question database. For example, a user terminal may display at least one of a test question text and a test question picture. The user's selection operation may be at least one of an operation of selecting a test question text and an operation of selecting a test question picture, and then the server may determine the target test question based on the test question text or picture selected by the user.

[0147] As a specific implementation, the test question database may also store test question types. Test question types may include multiple choice questions, fill-in-the-blank questions, true or false questions, application questions, and answer questions. Optionally, test question types may also include types based on subject divisions, such as math questions, Chinese questions, English questions, and chemistry questions. Optionally, test question types may also include types based on knowledge points, such as solid geometry questions, number series questions, Chinese typo recognition questions, chemical element inference questions, and the like.

[0148] Furthermore, the user terminal may also display the type of test questions. The user's selection operation may be an operation of selecting the type of test questions. For example, the user may select any of the above test question types, and then the server may randomly extract one or more target test questions of the test question type selected by the user from the test question database. Optionally, the target test question in the embodiment of this specification may be a test question of any of the above test question types.

[0149] In the embodiment of this specification, the user terminal may also display the number of test questions. The number of test questions is the number of target test questions. The user's selection operation may also include an operation of selecting the number of test questions. For example, after the user selects the type of test question, the user selects the number of test questions. Then, the server may extract the target test questions of the number of test questions selected by the user from the test question database.

[0150] As a specific implementation, the user's selection operation can also be an operation in which the server randomly extracts target test questions from a test question database based on a preset format. The preset format may include multiple test question types, the order of the multiple test question types, and the number of test questions corresponding to each test question type. Specifically, the preset format is 5 fill-in-the-blank questions, followed by 5 multiple-choice questions, 5 true-or-false questions, and 3 answer questions. The user terminal can display a control for randomly extracting target test questions based on a preset format, and the user can select the control, and then the server can randomly extract 5 fill-in-the-blank questions, 5 multiple-choice questions, 5 true-or-false questions, and 3 answer questions according to the above preset format.

[0151] In actual applications, the representation of the answer area of ​​multiple-choice questions and true-or-false questions can be the same, for example, both are "()". In order to improve the rendering quality of the test questions, the embodiment of this specification can render the answer area of ​​the multiple-choice questions or true-or-false questions before the test text of the test questions, or after the test text of the test questions. Optionally, the target test question is a multiple-choice question or a true-or-false question; the method may also include:

[0152] The answer area of ​​the target test question is rendered before the test question text, or the answer area of ​​the target test question is rendered after the test question text.

[0153] The embodiments of this specification can uniformly render the answer areas of multiple-choice questions and true-or-false questions before or after the test question text, thereby improving the quality of test question rendering.

[0154] In actual applications, the answer area of ​​a fill-in-the-blank question is generally represented by an underline of a certain length, such as "_______". The embodiment of this specification can render the answer area of ​​the fill-in-the-blank question according to the number of characters in the answer data of the fill-in-the-blank question, such as rendering the length of the underline, so as to improve the rendering quality of the question. Optionally, the target question is a fill-in-the-blank question; the method may also include:

[0155] Answer data for the target test question is determined.

[0156] The number of characters of the answer data is calculated.

[0157] Render the answer area of ​​the target test question according to the length corresponding to the number of characters.

[0158] In practical applications, the answer data of the target test questions can be determined by artificial intelligence, deep learning algorithms, etc. The answer data of the target test questions can also be obtained from test question publications, which is not limited here.

[0159] Optionally, the number of characters in the answer data may be calculated manually, or a character count algorithm such as a regular expression may be used to calculate the number of characters in the answer data.

[0160] In the embodiments of the present specification, the length corresponding to the number of characters in the answer data can be calculated by the number of characters in the answer data and the estimated length of a single character. Specifically, the estimated length of a single character can be obtained based on the font size specified by the user for the target test question. For example, the length of the text in the specified font size can be used as the estimated length, or the lengths of multiple texts in the specified font size can be used as the estimated length, and so on.

[0161] Optionally, rendering the answer area of ​​the target test question according to a length corresponding to the number of characters may be rendering the length of the answer area of ​​the target test question into a length corresponding to the number of characters.

[0162] In actual applications, the answer area of ​​a solution question or an application question is generally a blank area of ​​a certain size. The embodiment of this specification can render the answer area of ​​the solution question or the application question according to the number of characters of the answer data of the solution question or the application question, such as rendering the size of the blank area, so as to improve the rendering quality of the test question. Optionally, the target test question is a solution question or an application question; the method may also include:

[0163] Answer data for the target test question is determined.

[0164] The number of characters of the answer data is calculated.

[0165] The estimated number of rows of the answer data is calculated based on the number of characters and the estimated number of characters that can be accommodated in a single row.

[0166] According to the estimated number of rows, the answer area of ​​the target test question is rendered.

[0167] Optionally, the answer data of the target test question may be determined in the manner mentioned above, or the number of characters of the answer data may be calculated in the manner mentioned above.

[0168] In the embodiments of this specification, the estimated number of characters that can be accommodated in a single line can be the estimated number of characters that can be accommodated in a single line in the question list. Specifically, the number of characters that can be accommodated in a single line in the question list can be estimated by the size of the question list. For example, if the size of the question list is the size of A4 paper, the number of characters that can be accommodated in a single line in the question list of the size of A4 paper can be estimated to be any number of characters between 25 and 30 based on the user's writing habits on A4 paper.

[0169] Furthermore, the ratio of the number of characters to the estimated number of characters that can be accommodated in a single line can be used as the estimated number of lines of the answer data. Specifically, if the ratio is an integer, the ratio can be used as the estimated number of lines of the answer data. If the ratio is not an integer, the ratio can be rounded up, and the integer obtained by rounding up can be used as the estimated number of lines of the answer data.

[0170] In an embodiment of the present specification, rendering the answer area of ​​the target test question according to the estimated number of lines can be based on the size of the area occupied by the estimated number of lines. Specifically, the answer area of ​​the target test question can be rendered to the size of the area occupied by the estimated number of lines. The size of the area occupied by the estimated number of lines can be obtained based on the estimated number of lines and the size of the area occupied by a line of characters. Optionally, the size of the area occupied by a line of characters can be obtained by estimation.

[0171] Corresponding to the above-mentioned test question rendering method embodiment, this specification also provides a test question storage method embodiment, Figure 4 FIG. 1 is a flowchart of a method for storing test questions provided by an embodiment of this specification. Figure 4 As shown, the test question storage method may include:

[0172] Step 402: Obtain an image of a test publication page.

[0173] Step 404: Identify the test text, the font size of the test text, and the first position data of the test text in the page of the test publication from the image.

[0174] Step 406: Identify from the image the graphic of the test question text, the graphic size of the graphic, and the second position data of the graphic in the page of the test question publication.

[0175] Step 408: Calculate first relative position data of the test question text and the illustration in the page of the test question publication based on the first position data and the second position data.

[0176] Step 410: Save the test question text, the font size of the test question text, the illustration, the illustration size of the illustration, and the first relative position data to a test question database.

[0177] The embodiment of this specification can save the font size of the test question text, the picture size of the picture, and the first relative position data of the test question text and the picture in the test question publication page to a database. Then, when rendering the test question, the font size of the test question text, the picture size of the picture of the test question, and the first relative position data of the test question text and the picture in the test question publication page can be obtained from the database to render the test question. Since the test question publication is a publication with the layout information of the test question already typeset, rendering the test question using the above data in the database can improve the quality of the test question rendering.

[0178] The above is a schematic scheme of a test question storage method of this embodiment. It should be noted that the technical scheme of the test question storage method and the technical scheme of the test question rendering method described above are of the same concept, and the details not described in detail in the technical scheme of the test question storage method can be found in the description of the technical scheme of the test question rendering method described above.

[0179] Figure 5 This is an overall flow chart of a test question rendering method provided by an embodiment of this specification. Figure 5 As shown, the question rendering method may include:

[0180] Step 502: Acquire an image.

[0181] In the embodiment of the present specification, an image of a page of a test publication may be obtained.

[0182] Optionally, the test question publication is a publication of the typesetting information of the test question. The typesetting information of the test question may include the font size of the test question text in the test question publication, the size of the picture of the test question in the test question publication, and the relative position data of the test question text and the picture of the test question in the test question publication. Specifically, the test question publication may be a test paper, an exercise book, etc.

[0183] Step 504: Identify data.

[0184] In practical applications, the test text, the font size of the test text, the first position data of the test text in the test publication page, the illustrations, the illustration size, the second position data of the illustrations in the test publication page, etc. can be identified from the image.

[0185] Specifically, the above data can be identified from the image using text recognition technology and target recognition algorithm.

[0186] As a specific implementation manner, the first relative position data of the test question text and the accompanying diagram in the page of the test question publication can also be calculated by using the first position data and the second position data.

[0187] Step 506: Data format conversion.

[0188] In the embodiments of this specification, the test text can be formatted. Specifically, the score in the test text can be converted into score data in LaTex format. The formula in the test text can be converted into formula data in LaTex format. The table in the test text can be converted into table data in LaTex format, or converted into table data in html format. Optionally, if the test text contains an answer area, data in a specified format representing the answer area of ​​the test question can also be generated. The data in the specified format is used to render the answer area after being read.

[0189] In the embodiments of this specification, a format conversion tool can be used to convert the format of the test text, wherein the format conversion tool can be a LaTex conversion tool, an html conversion tool, a json conversion tool, etc.

[0190] Furthermore, the test question text containing score data, formula data, table data and data in a specified format can be stored in the test question database.

[0191] Furthermore, the font size of the identified test question text, the illustration, the illustration size of the illustration, and the first relative position data of the test question text and the illustration in the test question publication page may be saved in the test question database.

[0192] In practical applications, before storing the test questions in the test question database, manual quality inspection can also be used to ensure the quality of test question storage.

[0193] In order to facilitate the understanding of test question storage, the embodiment of this specification also provides a specific test question storage example. The specific example can be as follows:

[0194] {

[0195] "Test text": {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$latex formula$, xxxxxxx$1$, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, $2$.$table$"; "Font height": char_h};

[0196]

[0197] In the above example, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$latex formula$, xxxxxxx$1$, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, $2$.$table$" is the specific content of the test text. Among them, "$latex formula$" is the formula data in LaTex format. "$1$" is the data in the specified format corresponding to the first answer area in the test question. "$2$" is the data in the specified format corresponding to the second answer area in the test question. "char_h" is the font size of the test text in the test question publication page. " Figure 1 " is the name of the first illustration in the question publication page. Figure 2 " is the name of the second illustration in the question publication page.

[0198] In the embodiments of this specification, the pictures can be stored in a variety of storage formats. For example, the pictures can be stored using the picture URL address, or using the picture binary string. Figure 1 "URL address." Figure 2 Binary string" is "matching Figure 2 " is the binary representation of .

[0199] Furthermore, in the above example, "img_h1" is "matching Figure 1 "img_h2" is the height of Figure 2 "The height of ". "Answer 1" is the answer data corresponding to "$1$". "Answer 2" is the answer data corresponding to "$2$".

[0200] In practical applications, a test question may include sub-test questions. For example, a question for answering may include two sub-test questions or three sub-test questions. If a test question includes sub-test questions, the sub-test questions may also be stored in a database.

[0201] In the embodiments of this specification, test questions can be stored automatically. Specifically, the test question text, the font size of the test question text, and the first position data of the test question text in the test question publication page can be recognized from the image of the test question publication page using text recognition technology; the image, the size of the image, and the second position data of the image in the test question publication page can be recognized from the image of the test question publication page using a target recognition algorithm; the test question text can be formatted using a format conversion tool, etc. Compared with the existing manual storage of test questions, the test question storage efficiency is high.

[0202] Step 508: The user selects an operation.

[0203] In the embodiment of this specification, the user can select a target test question in the test question database. The user's selection operation can be an operation of selecting the test question text or picture.

[0204] The embodiments of this specification can determine the target test question corresponding to the test text or the picture according to the user's operation of selecting the test text of the test question or the user's operation of selecting the picture.

[0205] Furthermore, the user's selection operation may also include a selection operation of specifying a font size, wherein the specified font size may refer to a rendering size of the test question text of the target test question.

[0206] Step 510: Obtain layout information.

[0207] In the embodiment of the present specification, the layout information of the target test question can be obtained from the test question database.

[0208] Specifically, the typesetting information may include the font size of the target test question's text in the test question publication page, the image size of the target test question's image in the test question publication page, and the first relative position data of the target test question's text and image in the test question publication page.

[0209] Step 512: Render the test questions.

[0210] In the embodiments of the present specification, the target test question may be rendered according to the layout information obtained from the test question database.

[0211] Specifically, the target test question may be rendered according to the font size specified by the user for the target test question and the typesetting information obtained from the test question database.

[0212] Specifically, the ratio of the specified font size to the font size of the test question text in the typesetting information can be calculated. The size of the accompanying image is adjusted according to the ratio to obtain the rendering size of the accompanying image. The first relative position data in the typesetting information is adjusted according to the ratio to obtain the second relative position data between the rendering position of the test question text and the rendering position of the accompanying image. Thus, the target test question can be rendered according to the specified font size, the rendering size of the accompanying image and the second relative position data.

[0213] In the embodiment of this specification, the target test questions can be rendered to obtain a question list.

[0214] Figure 6 Schematic diagram of a question sheet provided by an embodiment of this specification. Figure 6 As shown, the question list is a question list with layout information that has been typeset.

[0215] In order to clearly explain the test question rendering process, this specification embodiment also provides Figure 6 An example of the rendering process of the question sheet shown.

[0216] The user can select the type of test question through the user terminal. For example, if a fill-in-the-blank question is selected, the user terminal can then display the fill-in-the-blank questions contained in the test question database to the user. Specifically, the user terminal can display at least one of the test question text and the accompanying picture of the fill-in-the-blank question. The user can select the fill-in-the-blank question through at least one of the test question text and the accompanying picture. The user can select multiple test questions. For example, the user selects the accompanying picture 602 and the test question text 604 from the user terminal in sequence.

[0217] Furthermore, the user can also select other types of test questions through the user terminal. For example, if a true or false question is selected, the user terminal can then display the true or false questions contained in the test question database to the user. Specifically, the user terminal can display at least one of the test text and the accompanying picture of the true or false question. The user can select the true or false question through at least one of the test text and the accompanying picture. For example, the user selects test text 606, test text 608, test text 610, test text 612, and test text 614 from the user terminal in sequence.

[0218] Furthermore, the user can also select a test question of the multiple-choice type through the user terminal. The user terminal can display the multiple-choice questions contained in the test question database to the user. Specifically, the user terminal can display at least one of the test text and the accompanying picture of the multiple-choice question. The user can select a fill-in-the-blank question through at least one of the test text and the accompanying picture. For example, the user selects test text 616, test text 618, test text 620, test text 622, and test text 624 from the user terminal in sequence.

[0219] Furthermore, the user can also select a specified font size through the user terminal. The specified font size can be the font size of the question type title and the font size of the question text of the question.

[0220] In actual applications, the user may also select only the font size of the test question text. The server may determine the font size of the test question type title based on the font size of the test question text selected by the user, and then render the test question type title.

[0221] The server can render the question type title according to the font size of the question type title. The rendered question type title can be as follows: Figure 6 The question numbers "one, fill-in-the-blank questions", "two, true-or-false questions" and "three, multiple-choice questions" shown in the above question type titles may be determined according to the order in which the user selects the question type.

[0222] Furthermore, the server can obtain the test text, the font size of the test text, the picture in the test text, the size of the picture, the relative position relationship between the test text and the picture, etc. from the test database according to the test text and the picture selected by the user, and then use the above data obtained from the test database to render the test. The process of rendering the test question by using the data obtained from the test database can be referred to the relevant introduction in the previous embodiment, which will not be repeated here.

[0223] In the embodiment of the present specification, in the process of rendering test questions, for the same type of test questions, the question number of the test question can be rendered according to the order in which the user selects the test questions. For example, for fill-in-the-blank questions, the user first selects the illustration 602 and then selects the test question text 604, then the question number of the test question corresponding to the illustration 602 can be rendered as "1.", and the question number of the test question corresponding to the test question text 604 can be rendered as "2.", etc. For multiple-choice questions, the user selects the test question text 616, the test question text 618, the test question text 620, the test question text 622, and the test question text 624 in order, then the question number of the test question corresponding to the test question text 616 can be rendered as "1.", the question number of the test question corresponding to the test question text 618 can be rendered as "2.", the question number of the test question corresponding to the test question text 620 can be rendered as "3.", the question number of the test question corresponding to the test question text 622 can be rendered as "4.", and the question number of the test question corresponding to the test question text 624 can be rendered as "5.", etc.

[0224] Furthermore, Figure 6 The question sheet shown can be printed out into homework questions, test papers, etc. containing test questions for students to practice and answer.

[0225] Corresponding to the above-mentioned test question rendering embodiment, this specification also provides a test question rendering device embodiment, Figure 7 Schematic diagram of a test question rendering device provided by an embodiment of this specification. Figure 7 As shown, the device comprises:

[0226] The designated font size acquisition module 702 is configured to acquire the user's designated font size for the target test question.

[0227] The data acquisition module 704 is configured to acquire the test text, illustrations and typesetting information of the target test question in the test publication page from the test database; the typesetting information includes the font size of the test text in the test publication page, the illustration size of the illustration in the test publication page and the first relative position data of the test text and the illustration in the test publication page.

[0228] The ratio calculation module 706 is configured to calculate the ratio of the specified font size to the font size of the test question text in the page of the test question publication.

[0229] The first adjustment module 708 is configured to adjust the size of the image according to the ratio to obtain a rendering size of the image.

[0230] The second adjustment module 710 is configured to adjust the first relative position data according to the ratio to obtain second relative position data between the rendering position of the test question text and the rendering position of the accompanying image.

[0231] The target question rendering module 712 is configured to render the target question according to the specified font size, the rendering size of the illustration and the second relative position data.

[0232] Optionally, the device may further include:

[0233] The target question determination module is configured to determine the target question based on the user's selection operation.

[0234] Optionally, the device may further include:

[0235] The image acquisition module is configured to acquire an image of a page of the test question publication where the target test question is located.

[0236] The text recognition module is configured to recognize the test question text, the font size of the test question text and the first position data of the test question text in the page of the test question publication from the image.

[0237] The image recognition module is configured to recognize the illustration, the illustration size of the illustration and the second position data of the illustration in the page of the test publication from the image.

[0238] The first relative position data calculation module is configured to calculate the first relative position data of the test question text and the illustration in the page of the test question publication according to the first position data and the second position data.

[0239] The data saving module is configured to save the test question text, the font size of the test question text, the illustration, the illustration size of the illustration and the first relative position data into the test question database.

[0240] Optionally, the text recognition module may be specifically configured as follows:

[0241] Using text recognition technology, the text content contained in the image and the position of the text content are identified; the text content contains at least one question number; the at least one question number contains the question number of the target test question.

[0242] According to the position of the text content, the text content is divided into test question texts corresponding to each question number of the at least one question number; one test question text corresponds to one question number.

[0243] Optionally, the device may further include:

[0244] The first conversion module is configured to convert the score into score data in LaTex format if the test question text contains the score.

[0245] The data saving module may be specifically configured to save the test question text including the score data into a test question database.

[0246] The second conversion module is configured to convert the formula into formula data in LaTex format if the test question text contains a formula.

[0247] The data saving module may be specifically configured to save the test question text including the formula data into a test question database.

[0248] The third conversion module is configured to convert the table into table data in LaTex format or HTML format if the test question text contains a table.

[0249] The data saving module may be specifically configured to save the test question text including the table data into a test question database.

[0250] The fourth conversion module is configured to generate data in a specified format representing an answer area if the test question text includes the answer area.

[0251] The data saving module may be specifically configured to save the test question text containing the data in the specified format into a test question database.

[0252] Optionally, the device may further include:

[0253] The text position identification module is configured to use text recognition technology to identify the positions of multiple test texts contained in the image.

[0254] The image position identification module is configured to use a target recognition algorithm to identify the positions of multiple images contained in the image.

[0255] The test question determination module is configured to determine the test question according to the positions of the multiple test question texts and the positions of the multiple illustrations; the relative position relationship between the illustrations included in a test question and the test question text included in the test question meets a preset condition; and the test question includes the target test question.

[0256] Optionally, the device may further include:

[0257] The answer data determination module is configured to determine the answer data of the target test question.

[0258] The associated saving module is configured to associate the answer data with the target test question and save them in a test question database.

[0259] Optionally, the target test question is a multiple-choice question or a true-or-false question. The device may also include:

[0260] The first rendering module is configured to render the answer area of ​​the target question before the question text, or render the answer area of ​​the target question after the question text.

[0261] Optionally, the target test question is a fill-in-the-blank question; the device may further include:

[0262] The answer data determination module is configured to determine the answer data of the target test question.

[0263] The character quantity calculation module is configured to calculate the character quantity of the answer data.

[0264] The second rendering module is configured to render the answer area of ​​the target test question according to the length corresponding to the number of characters.

[0265] Optionally, the target test question is a problem-solving question or an application question. The device may also include:

[0266] The answer data determination module is configured to determine the answer data of the target test question.

[0267] The character quantity calculation module is configured to calculate the character quantity of the answer data.

[0268] The estimated line number calculation module is configured to calculate the estimated line number of the answer data according to the number of characters and the estimated number of characters that can be accommodated in a single line.

[0269] The third rendering module is configured to render the answer area of ​​the target test question according to the estimated number of rows.

[0270] The above is a schematic scheme of a test question rendering device of this embodiment. It should be noted that the technical scheme of the test question rendering device and the technical scheme of the test question rendering method described above belong to the same concept, and the details of the technical scheme of the test question rendering device that are not described in detail can all be referred to the description of the technical scheme of the test question rendering method described above.

[0271] Figure 8 The structure block diagram of a computing device 800 provided according to an embodiment of the present specification is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and the database 850 is used to store data.

[0272] The computing device 800 also includes an access device 840 that enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0273] In one embodiment of the present specification, the above components of the computing device 800 and Figure 8 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 8 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0274] The computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 800 may also be a mobile or stationary server.

[0275] The processor 820 is used to execute the following computer executable instructions, which implement the steps of the above method when executed by the processor.

[0276] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned test question rendering method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned test question rendering method.

[0277] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above method when executed by a processor.

[0278] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned test question rendering method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned test question rendering method.

[0279] An embodiment of the present specification also provides a computer program product, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above method.

[0280] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above-mentioned test question rendering method belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be referred to the description of the technical scheme of the above-mentioned test question rendering method.

[0281] 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.

[0282] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0283] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0284] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0285] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A test question rendering method, characterized in that: include: Get the user's specified font size for the target test question; Acquire the test text and pictures of the target test question and the layout information of the target test question in the test question publication page from the test question database; The typesetting information includes the font size of the test question text in the test question publication page, the size of the illustration in the test question publication page, and the first relative position data of the test question text and the illustration in the test question publication page; Calculating the ratio of the specified font size to the font size of the test question text in the page of the test question publication; Adjusting the size of the illustration according to the ratio to obtain a rendering size of the illustration; The first relative position data is adjusted according to the ratio to obtain second relative position data between the rendering position of the test question text and the rendering position of the accompanying picture; The target test question is rendered according to the specified font size, the rendering size of the illustration, and the second relative position data.

2. The method according to claim 1, characterized in that Before obtaining the user's designated font size for the target test question, the method further includes: Based on the user's selection operation, the target test question is determined.

3. The method according to claim 1, characterized in that Before acquiring the test text and the accompanying diagram of the target test question and the typesetting information of the target test question in the test question publication page from the test question database, the method further includes: Acquire an image of a test question publication page where the target test question is located; Identify the test question text, the font size of the test question text, and first position data of the test question text in the page of the test question publication from the image; Identify the illustration, the illustration size of the illustration, and second position data of the illustration in the page of the test publication from the image; Calculating first relative position data of the test question text and the illustration in the page of the test question publication according to the first position data and the second position data; The test question text, the font size of the test question text, the illustration, the illustration size of the illustration and the first relative position data are saved in a test question database.

4. The method according to claim 3, characterized in that The step of recognizing the test question text from the image specifically includes: Using text recognition technology, identifying text content contained in the image and the position of the text content; the text content contains at least one question number; the at least one question number contains the question number of the target test question; According to the position of the text content, the text content is divided into test question texts corresponding to each question number of the at least one question number; one test question text corresponds to one question number.

5. The method according to claim 3, characterized in that Before saving the test question text to the test question database, the method further includes: If the test question text contains a score, converting the score into score data in LaTex format; the step of saving the test question text to the test question database specifically includes: saving the test question text containing the score data to the test question database; If the test question text contains a formula, the formula is converted into formula data in LaTex format; the step of saving the test question text to the test question database specifically includes: saving the test question text containing the formula data to the test question database; If the test question text contains a table, converting the table into table data in LaTex format or HTML format; saving the test question text into the test question database specifically includes: saving the test question text containing the table data into the test question database; If the test question text contains an answer area, data in a specified format representing the answer area is generated; the data in the specified format is used to render the answer area after being read; and saving the test question text to the test question database specifically includes: saving the test question text containing the data in the specified format to the test question database.

6. The method according to claim 3, characterized in that The method further comprises: Using text recognition technology, identifying the positions of multiple test question texts contained in the image; Using a target recognition algorithm, identifying the positions of multiple illustrations contained in the image; A test question is determined according to the positions of the multiple test question texts and the positions of the multiple illustrations; a relative position relationship between the illustrations included in a test question and the test question text included in the test question satisfies a preset condition; and the test question includes the target test question.

7. The method according to claim 3, characterized in that The method further comprises: Determining answer data for the target test question; The answer data is associated with the target test question and saved in a test question database.

8. The method according to claim 1, characterized in that The target test question is a multiple-choice question or a true-or-false question; the method further includes: The answer area of ​​the target test question is rendered before the test question text, or the answer area of ​​the target test question is rendered after the test question text.

9. The method according to claim 1, characterized in that The target test question is a fill-in-the-blank question; the method further comprises: Determining answer data for the target test question; Counting the number of characters in the answer data; Render the answer area of ​​the target test question according to the length corresponding to the number of characters.

10. The method according to claim 1, characterized in that The target test question is a problem-solving question or an application question; the method further comprises: Determining answer data for the target test question; Counting the number of characters in the answer data; Calculate the estimated number of lines of the answer data according to the number of characters and the estimated number of characters that can be accommodated in a single line; Render the answer area of ​​the target test question according to the estimated number of rows.

11. A method for storing test questions, characterized in that: include: Get an image of the test publication page; Identify the test text, the font size of the test text and the first position data of the test text in the page of the test publication from the image; Identify from the image the picture of the test question text, the picture size of the picture, and second position data of the picture in the page of the test question publication; Calculating first relative position data of the test question text and the illustration in the page of the test question publication according to the first position data and the second position data; The test question text, the font size of the test question text, the illustration, the illustration size of the illustration and the first relative position data are saved in a test question database.

12. A test question rendering device, characterized in that: include: A designated font size acquisition module is configured to acquire a user's designated font size for a target test question; A data acquisition module is configured to acquire the test text, the accompanying picture of the target test question and the typesetting information of the target test question in the test question publication page from the test question database; the typesetting information includes the font size of the test text in the test question publication page, the size of the accompanying picture in the test question publication page and the first relative position data of the test text and the accompanying picture in the test question publication page; A ratio calculation module, configured to calculate the ratio of the specified font size to the font size of the test question text in the page of the test question publication; A first adjustment module is configured to adjust the size of the image according to the ratio to obtain a rendering size of the image; A second adjustment module is configured to adjust the first relative position data according to the ratio to obtain second relative position data between the rendering position of the test question text and the rendering position of the accompanying image; The target question rendering module is configured to render the target question according to the specified font size, the rendering size of the illustration and the second relative position data.

13. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions. When the computer programs or instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium, characterized in that: It stores a computer program or instruction, which, when executed by a processor, implements the steps of the method described in any one of claims 1 to 11.

15. A computer program product, characterized in that The method comprises a computer program or instructions, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.