Automatic generation system and method for teaching questions

By inputting generation instructions through a user interface, the knowledge points and templates of teaching questions are determined, variable parameters are randomly generated and verified, answers are calculated and converted into image format, solving the problems of low generation efficiency, insufficient flexibility and insufficient answer accuracy in existing teaching and tutoring systems, and realizing efficient, flexible and accurate automatic generation of teaching questions.

CN121328477APending Publication Date: 2026-01-13姜中涵
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511389964.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing teaching and tutoring systems suffer from problems such as low efficiency in generating teaching questions, insufficient flexibility, and lack of guaranteed accuracy in answers, making it difficult to meet the needs of large-scale teaching and personalization.

Method used

By inputting generation instructions from the user, the system determines the knowledge points and templates, randomly generates variable parameters and performs compliance verification, calls the solution algorithm to calculate the answer, and converts the questions and answers into image format to generate high-quality teaching question documents.

Benefits of technology

It enables the automated, intelligent, and customizable generation of teaching questions, improving generation efficiency, ensuring the subject rigor of the questions and the accuracy of the answers, and adapting to the personalized needs of different teaching scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121328477A_ABST
    Figure CN121328477A_ABST
Patent Text Reader

Abstract

The invention provides an automatic generation system and method for teaching questions, and the method comprises the following steps: S1, inputting a generation instruction: inputting the generation instruction by a user through an interaction interface; s2, determining a question template, and searching and determining a corresponding question template from a preset knowledge point question bank according to the knowledge points; s3, randomly generating variable parameters, randomly generating specific data of the variable parameters under constraint conditions according to the topic template, and performing compliance verification on the generated topic; s4, calculating answers of the questions, and automatically calculating and generating the answers of the questions based on the generated specific numerical values of the variable parameters; s5, converting into an image format, and converting the generated questions and answers into a preset image format; and S6, creating a question document and an answer document, and respectively putting the question and the answer in the image format into the corresponding documents. Through automatic random generation and compliance verification, diversified personalized exercises can be efficiently and accurately generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of teaching and tutoring technology, and in particular to an automatic teaching question generation system and method. Background Technology

[0002] In the current field of teaching and tutoring, especially for mathematical and physical subjects that involve a large number of formula derivations and numerical calculations (such as "Probability Theory and Mathematical Statistics"), the generation of practice questions mainly relies on two traditional methods.

[0003] The first method involves teachers or teaching assistants manually creating questions based on the key knowledge points in the textbook. While this method ensures the questions align with the teaching schedule, its drawbacks are also quite obvious. First, it is inefficient; manually creating a logically sound and data-driven math problem often requires a significant amount of time and effort, making it difficult to meet the immediate needs of large-scale teaching or personalized student practice. Second, the quality of the questions varies greatly, and human error can easily lead to incomplete conditions or incorrect answers.

[0004] The second approach involves using basic question generation tools. These tools typically generate questions based on fixed templates, which can improve question generation speed to some extent. However, existing tools generally lack flexibility; they cannot dynamically adjust to specific user needs, such as selecting specific knowledge points, adjusting question difficulty, setting the number of questions, or customizing output formats. More importantly, these tools often only perform simple numerical substitutions, lacking compliance verification of the generated question logic itself. This can lead to questions with non-compliant data, contradictory conditions, or even no solution, making it difficult to guarantee the accuracy of the answers. This seriously affects students' learning outcomes and their correct understanding of knowledge.

[0005] In summary, existing technologies generally suffer from low efficiency in generating questions, insufficient flexibility, and a lack of assurance regarding the accuracy of answers. There is an urgent need for a solution that can automatically, intelligently, and customarily generate high-quality teaching questions. Summary of the Invention

[0006] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide an automatic question generation system and method for teaching questions, which solves the problems of low question generation efficiency, insufficient flexibility and lack of guarantee of answer accuracy in the prior art.

[0007] To achieve the above and other related objectives, this invention provides an automatic method for generating teaching questions, comprising the following steps: S1, inputting a generation command: the user inputs a generation command through an interactive interface, the generation command including at least one knowledge point, the number of questions, and format parameters; S2, determining a question template: based on the knowledge point, a corresponding question template is searched and determined from a preset knowledge point question bank, the question template including question structure, variable parameters, and other preset constraints; S3, randomly generating variable parameters: based on the question template and under the constraints, specific data of the variable parameters are randomly generated, and the generated questions are verified for compliance; S4, calculating the question answer: based on the specific values ​​of the generated variable parameters, a solution algorithm associated with the question template is invoked to automatically calculate the answer to the generated question; S5, converting to image format: the generated questions and answers are converted to a preset image format; S6, creating a question document and an answer document, and placing the image format questions and answers into the corresponding documents respectively.

[0008] By adopting the above technical solution, the knowledge points and related information of the questions to be generated are determined by the user's generation instructions. Then, the question template is determined by preset information and constraints. Then, the specific values ​​of variable parameters are randomly generated according to the question template. After verification, the accurate answer is generated based on the specific parameter values, thereby realizing the automatic generation of teaching questions. The questions are converted into image format, which can ensure the uniformity and accuracy of the output. It can also retain complex formulas and symbols to avoid display errors caused by different software environments. Finally, question documents and answer documents are generated and embedded separately to realize the automated, intelligent and customizable generation of questions.

[0009] In one embodiment of the present invention, compliance verification includes verifying whether the randomly generated variable parameters satisfy preset disciplinary axioms or theorems.

[0010] In one embodiment of the present invention, the step of verifying whether the randomly generated variable parameters satisfy a preset axiom or theorem of a discipline is as follows: when the question template is the probability density function of a two-dimensional continuous random variable in "Probability Theory and Mathematical Statistics", the step is to verify that the sum of the integrals of the generated probability density function f(x,y) over the entire domain is 1.

[0011] In one embodiment of the present invention, the constraints include the numerical type, range, or form of the variable parameter.

[0012] In one embodiment of the present invention, the constraint condition is specifically that the variable parameter is limited to an integer whose absolute value is not greater than 10.

[0013] In one embodiment of the present invention, the step of converting the generated questions and answers into a preset image format ensures the accuracy of the display of formulas and special symbols by fixing the layout format.

[0014] A system for automatically generating teaching questions as described above includes:

[0015] A storage unit is provided for storing program instructions; a processing module is electrically connected to the storage unit; the processing module is used to execute the program instructions to implement the method as described in any one of claims 1 to 6. In one embodiment of the present invention,

[0016] By adopting the above technical solution, the program quality in the above method is stored in the storage unit, and then the processing module is responsible for executing these commands.

[0017] In one embodiment of the present invention, the processing module includes: a user interaction module, used to present a user interaction interface and receive the generation instruction input by the user; a question generation engine, used to determine a question template based on the knowledge points, randomly generate specific values ​​of variable parameters under the constraints, and perform compliance verification on the generated questions; an answer calculation module, used to call a solution algorithm to automatically calculate the answer to the generated questions; and a document output module, used to convert the questions and answers into image format and create a document containing the questions and answers in the image format.

[0018] In one embodiment of the present invention, the question generation engine avoids calculation errors caused by floating-point precision errors by using a feedback check mechanism or converting the decimal representation to a fractional representation during compliance verification.

[0019] In one embodiment of the present invention, the question templates in the knowledge point question bank support dynamic expansion, allowing new application scenarios to be added based on the original question conditions.

[0020] As described above, the automatic generation system and method for teaching questions of the present invention have the following beneficial effects:

[0021] 1. High efficiency: By automating a series of processes such as question design, parameter generation, answer calculation, and document formatting, the question-setting time is greatly shortened, and the efficiency of teaching and lesson preparation is significantly improved;

[0022] 2. Diversity: Questions are generated based on random data conditions, ensuring that the content of each generated question is unique, avoiding rote memorization caused by rote memorization from question banks, and better testing students' mastery of knowledge points;

[0023] 3. Flexibility: Users can intuitively select knowledge points, customize the number of questions and font format through a graphical interface, which meets the personalized needs of different teaching scenarios and has strong applicability;

[0024] 4. Accuracy: The invention incorporates a compliance verification mechanism, such as automatically checking whether the integral of the generated probability density function is 1, which fundamentally ensures the disciplinary rigor of the questions and the correctness of the answers, avoiding common logical errors in existing technologies.

[0025] 5. Convenience: The generated questions and answers are directly output as standardized Word documents, and the content is in image format, ensuring accurate display on any device, which is convenient for teachers to print and distribute or to conduct electronic teaching. Attached Figure Description

[0026] Figure 1 The diagram shows the overall process flow disclosed in this embodiment of the invention. Detailed Implementation

[0027] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification.

[0028] Please see Figure 1 It should be understood that the structures, proportions, sizes, etc., illustrated in the accompanying drawings are merely for illustrative purposes to aid those skilled in the art and to facilitate understanding and reading. They are not intended to limit the scope of the invention and therefore have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to size, without affecting the effectiveness and purpose of the invention, should still fall within the scope of the technical content disclosed in this invention. Furthermore, the terms such as "upper," "lower," "left," "right," "middle," and "one" used in this specification are merely for clarity and not intended to limit the scope of the invention. Changes or adjustments to their relative relationships, without substantially altering the technical content, should also be considered within the scope of the invention's implementation.

[0029] Example 1:

[0030] This invention provides a method for automatically generating teaching questions, comprising the following steps:

[0031] S1. Input generation command: The user inputs the generation command through the interactive interface. The generation command includes at least one knowledge point, the number of questions, and format parameters.

[0032] S2. Determine the question template. Based on the knowledge points, search for and determine the corresponding question template from the preset knowledge point question bank. The question template includes the question structure, variable parameters, and other preset constraints.

[0033] S3. Randomly generate variable parameters. Based on the question template and under the aforementioned constraints, randomly generate specific data for the variable parameters and verify the compliance of the generated questions.

[0034] S4. Calculate the answer to the question. Based on the specific values ​​of the generated variable parameters, call the solution algorithm associated with the question template to automatically calculate and generate the answer to the question.

[0035] S5. Convert to image format: Convert the generated questions and answers into a preset image format;

[0036] S6. Create a question document and an answer document, and place the question and answer in the image format into the corresponding documents respectively.

[0037] In step S2, the constraints include the numerical type, range, or form of the variable parameters.

[0038] In step S3, compliance verification includes verifying whether the randomly generated variable parameters satisfy preset disciplinary axioms or theorems.

[0039] In step S5, the generated questions and answers are converted into a preset image format. The fixed layout format ensures the accuracy of the display of formulas and special symbols.

[0040] Example 2:

[0041] like Figure 1 As shown, this embodiment provides a system for automatically generating teaching questions as described in Embodiment 1, comprising:

[0042] Storage unit, used to store program instructions;

[0043] The processing module is electrically connected to the memory and is used to execute program instructions to implement the method described in Embodiment 1.

[0044] The processing module includes:

[0045] The user interaction module is used to present the user interaction interface and receive the generation instructions input by the user.

[0046] The main control module serves as the system's central scheduling center.

[0047] The question generation engine is used to determine the question template based on the knowledge points, randomly generate specific values ​​of variable parameters under the constraints, and perform compliance verification on the generated questions.

[0048] The answer calculation module is used to call the solution algorithm and automatically calculate and generate the answer to the question;

[0049] The document output module is used to convert the questions and answers into image format and create a document containing the questions and answers in the image format.

[0050] In this embodiment, the user interaction module specifically corresponds to the program file main_window.py, whose main function is to generate and display a graphical user interface (GUI) to the user. Through this interface, the user can select target knowledge points, set the number of questions to generate, and adjust format parameters such as font size in the output document. After the user completes the settings and clicks the "Generate" button, this module will capture these instructions and pass them to the main control module.

[0051] In this embodiment, the main control module can specifically correspond to the main.py program file. It is responsible for initializing and calling the user interaction module to present the interface. After receiving the generation instruction, it sequentially calls the question generation engine and the document output module according to the predetermined logic to coordinate the entire workflow.

[0052] In this embodiment, the question generation engine can specifically correspond to the probability_handling.py program file, which includes:

[0053] The question bank access unit is responsible for interacting with the preset knowledge point question bank. This question bank systematically organizes all the knowledge points of one or more courses and designs corresponding question templates for each knowledge point. The question templates not only contain the text framework of the question stem, but also define the variable parameters (such as function coefficients, boundary conditions, etc.) and the constraints that these parameters must comply with.

[0054] After the question template is determined, the parameter generation unit and the question bank access unit are responsible for randomly generating specific values ​​of the parameters under the constraints.

[0055] The compliance verification unit performs subject-specific logical verification on the complete set of questions after the parameters are generated.

[0056] The answer calculation unit is used to call the solution algorithm bound to the question template after the question has been verified. Based on the determined parameters, the answer and solution steps are calculated accurately.

[0057] In this embodiment, the document output module can specifically correspond to the utility.py program file, which is responsible for processing the final output of the generated content. The document output module can receive the question text and answer text from the question generation engine, especially the complex formulas or special symbols contained therein, and render them into high-quality image files. By solidifying the volatile text format into an unchanging image format, the problem of formatting chaos, missing symbols or display errors that may occur in different operating systems and different software can be fundamentally solved.

[0058] Then, through the document output module, two blank Word documents are created, and the question images and answer images generated in the previous step are inserted into these two documents one by one according to the number set by the user, finally generating practice materials that can be used directly by the user or printed.

[0059] Example 3;

[0060] The method and system for automatically generating teaching questions in this embodiment, specifically taking "Probability Theory and Mathematical Statistics" as an example, includes the following steps:

[0061] S101, Receive generation command:

[0062] When the user starts the program, the main control module calls the user interaction module, and a question generation window is displayed on the screen. The user selects a specific knowledge point from the drop-down menu in the window, such as "Chapter 3 - Question Type 2.1: Solving the probability density function of a two-dimensional continuous random variable" in "Probability Theory and Mathematical Statistics", sets the number of questions to be generated to 5, and the font size to "small four". Then, the user clicks the "Generate" button. The user interaction module 10 captures these inputs and forms a generation instruction.

[0063] S102. Determine the question template and parameters:

[0064] The main control module transmits instructions to the question generation engine, which uses its question bank access unit to find the corresponding question template based on the selected knowledge point. The template defines the question structure as: "Given that the joint density function of a two-dimensional random variable (X,Y) is f(x,y)=k\cdot g(x,y), and is 0 in region D, and elsewhere, find the constant k."

[0065] The problem template defines that the form of g(x,y) can be randomly selected from {ax+by+c,xy+c}, the form of region D can be randomly selected from a rectangular domain or a trapezoidal domain, and the constraint condition for all coefficients is "an integer whose absolute value does not exceed 10".

[0066] S103. Randomly generate parameters and perform compliance verification:

[0067] The parameter generation unit starts to work. Suppose it randomly selects the form of \(g(x, y)\) as \(2x + 3y + 5\), and the form of region \(D\) as a rectangular domain \(\{0 < x < 1, 0 < y < 2\}\); at this time, the compliance verification unit intervenes; it needs to verify whether the problem holds in terms of mathematical logic.

[0068] S104. Calculate the answer:

[0069] The answer calculation unit calculates the answer.

[0070] S105. Convert to image format:

[0071] The document output module receives the generated problem and answer, and calls the internal rendering engine to convert the two texts containing mathematical formulas into two independent PNG pictures;

[0072] S106. Generate and output documents:

[0073] The document output module 40 creates 《Practice.docx》 and 《Answer.docx》 in the specified output folder. Then it inserts the PNG picture of the problem into the practice document and the PNG picture of the answer into the answer document.

[0074] The above steps S102 to S106 are executed 5 times (the number set by the user). Finally, 5 problems and 5 corresponding answers are generated in the two documents respectively.

[0075] The template also defines that the form of \(g(x, y)\) can be randomly selected from \(\{ax + by + c, xy + c\}\), and the form of region \(D\) can be randomly selected from a rectangular domain or a trapezoidal domain. The constraint condition for all coefficients is "an integer whose absolute value does not exceed 10".

[0076] In summary, by constructing a complete automated process including user interaction, template invocation, constrained random generation, logical verification, automatic solution, and formatted output, the present invention can provide efficient, reliable, and personalized question resources support for teaching and learning in various disciplines that require a large number of practice questions (especially in mathematics and physics). Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

[0077] The above embodiments are only illustrative of the principles and effects of the present invention, and are not used to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present invention should still be covered by the claims of the present invention.

Claims

1. A method for automatically generating teaching questions, characterized in that, Includes the following steps: S1. Input generation command: The user inputs the generation command through the interactive interface. The generation command includes at least one knowledge point, the number of questions, and format parameters. S2. Determine the question template. Based on the knowledge points, search for and determine the corresponding question template from the preset knowledge point question bank. The question template includes the question structure, variable parameters, and other preset constraints. S3. Randomly generate variable parameters. Based on the question template and under the constraints, randomly generate specific data for the variable parameters and verify the compliance of the generated questions. S4. Calculate the answer to the question. Based on the specific values ​​of the generated variable parameters, call the solution algorithm associated with the question template to automatically calculate and generate the answer to the question. S5. Convert to image format: Convert the generated questions and answers into a preset image format; S6. Create a question document and an answer document, and place the question and answer in the image format into the corresponding documents respectively.

2. The method for automatically generating teaching questions according to claim 1, characterized in that: The compliance verification includes verifying whether the randomly generated variable parameters satisfy preset disciplinary axioms or theorems.

3. The method for automatically generating teaching questions according to claim 2, characterized in that: The steps to verify whether randomly generated variable parameters satisfy preset axioms or theorems of the discipline are as follows: when the question template is the probability density function of a two-dimensional continuous random variable in "Probability Theory and Mathematical Statistics", verify that the sum of the integrals of the generated probability density function f(x,y) over the entire domain is 1.

4. The method for automatically generating teaching questions according to claim 1, characterized in that: The constraints include the numerical type, range, or form of the variable parameters.

5. The method for automatically generating teaching questions according to claim 4, characterized in that: Specifically, the constraint condition is that the variable parameter is limited to an integer whose absolute value is not greater than 10.

6. The method for automatically generating teaching questions according to claim 1, characterized in that: The step of converting the generated questions and answers into a preset image format ensures the accuracy of formula and special symbols display by fixing the layout format.

7. A system for automatically generating teaching questions as described in any one of claims 1-6, characterized in that: include: Storage unit, used to store program instructions; The processing module is electrically connected to the memory; The processing module is used to execute program instructions to implement the method as described in any one of claims 1 to 6.

8. The system for automatically generating teaching questions according to claim 7, characterized in that: The processing module includes: a user interaction module, used to present a user interaction interface and receive the generation command input by the user; The question generation engine is used to determine the question template based on the knowledge points, randomly generate specific values ​​of variable parameters under the constraints, and perform compliance verification on the generated questions. The answer calculation module is used to call the solution algorithm and automatically calculate and generate the answer to the question; The document output module is used to convert the questions and answers into image format and create a document containing the questions and answers in the image format.

9. The system for automatically generating teaching questions according to claim 8, characterized in that: In the question generation engine, during compliance verification, a feedback check mechanism or conversion of decimal representation to fractional representation is used to avoid calculation errors caused by floating-point precision errors.

10. The system for automatically generating teaching questions according to claim 8, characterized in that: The question templates in the knowledge point question bank support dynamic expansion, allowing new application scenarios to be added based on the original question conditions.