A method for automatically generating in-class questions based on understanding of lecture texts

By using a multi-stage processing based on a large language model, high-quality questions that closely align with classroom teaching content are generated, solving the problems of insufficient accuracy and teaching applicability in existing technologies, and improving the efficiency and quality of classroom interaction.

CN122152994APending Publication Date: 2026-06-05HUAZHONG NORMAL UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAZHONG NORMAL UNIV
Filing Date
2026-03-04
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and accurately generate high-quality questions that closely align with the teaching content in classroom teaching, especially for new teachers or when teaching complex content, resulting in inconsistent question quality and a disconnect from the teaching focus.

Method used

By receiving classroom lecture texts, semantic compression and core extraction are performed using a large language model to generate a keyword list. The generated list is then corrected and validated through multi-stage iterative question-and-answer sessions to ensure the accuracy of the questions and their applicability to teaching.

Benefits of technology

It significantly reduces the cognitive load of teachers asking questions in real time, ensures that the generated questions are aligned with the teaching knowledge points, improves the efficiency and quality of classroom interaction, and ensures the credibility and usability of the generated content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152994A_ABST
    Figure CN122152994A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of teaching resource generation, and particularly relates to a method for automatically generating in-class questions based on text understanding of classroom lectures, which comprises the following steps: receiving multiple segments of externally input classroom lecture texts to form an initial lecture text corpus; instructing a large language model API through knowledge summary prompts to generate refined summary texts; taking the refined summary texts or the initial lecture text corpus as analysis objects to generate an ordered list of keywords; visualizing the ordered list of keywords and its associated quantitative data through a front-end interactive interface to determine target keywords for generating classroom questions; iteratively generating and self-verifying and correcting question-answer pairs to output final question-answer pairs; and uniformly presenting and outputting the final question-answer pair set, the refined summary texts and the target keyword list through the front-end interactive interface to form a set of in-class questions that can be directly used for classroom questioning or exercises. The present application effectively improves the efficiency and quality of classroom interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of teaching resource generation technology, specifically involving a method for automatically generating in-class questions based on classroom lecture text comprehension. Background Technology

[0002] In classroom teaching, teachers' ability to ask high-quality questions in real-time, based on the content being taught, is a key means of activating student thinking, assessing teaching effectiveness, and achieving interactive feedback. However, this process poses a significant challenge to teachers: it requires them to quickly and accurately conceive questions that are relevant to the current knowledge points, appropriately challenging, and rigorously worded while focusing on the content being taught. This heavily relies on teachers' on-the-spot experience, knowledge reserves, and mental agility. This pressure of in-question generation is particularly pronounced for new teachers or when teaching complex content, often resulting in inconsistent question quality, a disconnect from the teaching focus, or an inability to cover core concepts.

[0003] In existing technologies, tools that assist teachers in generating questions can be broadly categorized into two types. The first type is a retrieval system based on a static question bank, which matches questions from an existing question bank based on preset tags or keywords. The question generation capability of this type of system essentially depends on the size and annotation quality of the question bank, and it cannot adapt to dynamic, unstructured, real-time teaching content, and the relevance of the questions to the current teaching context is limited. The second type utilizes general text generation models (such as early rule-based or statistical models) to generate questions based on the input text. While these methods possess some generative capabilities, they generally suffer from several key flaws: First, the generated questions often remain at the surface level of the text (such as "What is XX?"), lacking an understanding of the deeper logic of the knowledge and the teaching intent; second, and most seriously, the accuracy of the generated results cannot be guaranteed, and the model may produce "illusionary" content that does not conform to the facts of the original text, which is a fatal flaw in a rigorous teaching environment; finally, existing methods are mostly "end-to-end" black-box one-time generation, lacking mechanisms that allow teachers to intervene in key decision points (such as specifying the knowledge focus of the examination) and automatic verification and correction after generation, resulting in insufficient credibility and practicality of their output.

[0004] With the breakthrough development of large language models, their powerful text understanding and generation capabilities offer new possibilities for solving the aforementioned problems. However, directly applying general-purpose large language models to in-class question generation still fails to address the core pain points mentioned above: the model may ignore teaching focus and generate irrelevant or overly generalized questions; the generated answers may contain factual errors; and the process is uncontrollable, with teachers unable to guide the generation direction. Therefore, designing a system that organically integrates the capabilities of large language models, the logic of the teaching domain, and human-computer interaction control, and incorporates a specialized question generation scheme with a rigorous quality verification closed loop, has become a key technical challenge for improving the level of intelligent classroom interaction. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method for automatically generating in-class questions based on classroom lecture text comprehension, which can significantly reduce the cognitive load and time cost of teachers asking questions in real time, while ensuring the teaching effectiveness and factual reliability of the generated questions, thereby effectively improving the efficiency and quality of classroom interaction.

[0006] To achieve the above objectives, this invention provides a method for automatically generating in-class questions based on classroom lecture text comprehension, comprising the following steps: S1. Receive multiple segments of classroom lecture text from external input, remove leading and trailing whitespace characters from each segment, filter out empty text, and then concatenate the remaining valid text segments in order to form an initial lecture text corpus. S2. Based on the initial lecture text corpus, construct a knowledge summary prompt and call the large language model API. Through the knowledge summary prompt, instruct the large language model API to perform semantic compression and core extraction on the lecture content in the initial lecture text corpus, and generate a concise summary text that summarizes the core knowledge and logical points of this course. S3. Using a corpus of refined summary texts or initial lecture texts as the analysis object, keywords are extracted and sorted through a hybrid strategy to generate an ordered list of keywords. S4. The ordered list of keywords and its associated quantitative data are visualized through the front-end interactive interface. Users select one or more keywords from the ordered list of keywords through the front-end interactive interface to determine the target keywords for generating classroom questions. S5. Based on the determined target keywords, iteratively generate and self-verify question-answer pairs, and output the final question-answer pairs; S6. Traverse and integrate all the final question-and-answer pairs corresponding to the target keywords, classify and organize them in a structured manner, and present and output the organized final question-and-answer pair set, together with the refined summary text and the target keyword list, through the front-end interactive interface to form a set of in-class questions that can be directly used for classroom questioning or exercises.

[0007] As a preferred embodiment of the present invention, in S2, the knowledge summary prompt is constructed in the following way: the large language model is defined as a teacher assistant role that is good at concise summarization, and it is instructed to extract the core knowledge points from the provided initial teaching text corpus, and is required to output the concise summary text in the format of a paragraph.

[0008] As a preferred embodiment of the present invention, the process of generating the ordered list of keywords in S3 is as follows: S3.1. Based on the term frequency-inverse document frequency weight, select an initial set of candidate keywords from the analysis objects; S3.2 Count the actual frequency of each keyword in the initial candidate keyword set in the analysis object; S3.3. Based on the preset keyword length conditions and minimum frequency threshold, the initial candidate keyword set is filtered to obtain the effective keyword set; S3.4 Sort the set of effective keywords in descending order according to their actual frequency of occurrence to generate the final ordered list of keywords.

[0009] As a preferred embodiment of the present invention, in S4, the quantitative data includes the word frequency and weight of the keywords, and the visualization display forms include at least a keyword word cloud and a frequency statistics bar chart. When visualizing the presentation, the top N keywords in the ordered list of keywords are automatically set as the default selected subset of keywords and presented in a pre-selected state on the front-end interactive interface, where N is a preset positive integer.

[0010] In a preferred embodiment of the present invention, in step S5, question-answer pair iterative generation and self-verification correction are performed to output the final question-answer pair. Specifically, this involves executing a closed-loop processing flow that includes multiple rounds of calls. S5.1 Preliminary generation sub-step: Using the current target keywords and refined summary text as input, construct question generation prompts and call the large language model API to generate one or more preliminary question-answer pairs. The question types of the question-answer pairs include, but are not limited to, multiple choice questions, short answer questions, and true / false questions. S5.2 Self-verification sub-step: Take the initial question-and-answer pairs and the initial teaching text corpus as input, construct verification instruction prompts, and call the large language model API again; The verification instruction prompts the Large Language Model API to review the initial question-and-answer pairs based on the course content in terms of factual accuracy, correctness of answers, clarity of questions, and completeness of options, and output a verification conclusion including "verification passed" or "problems found and descriptions". S5.3 Targeted Correction Sub-step: If the verification conclusion is "Problem found and description", then extract the problem description, construct correction instruction prompts and call the large language model API; The correction instruction includes strong constraints, requiring the large language model to only correct the answer part based on the initial teaching text corpus, while keeping the original question unchanged, and output the corrected final question-answer pair; If the verification result is "verification passed", the preliminary question-and-answer pair will be directly output as the final question-and-answer pair.

[0011] As a preferred embodiment of the present invention, in S5.1, the question generation prompt is constructed in the following way: the large language model is defined as the question-generating expert role, the current target keywords and refined summary text are injected as the core context, the type and number of questions to be generated are required, and the question-answer pairs are specified to be output in the formatted structure of "Question X: ... Answer X: ...".

[0012] As a preferred embodiment of the present invention, in S5.2, the preliminary question-and-answer pair is reviewed in terms of factual accuracy, correctness of answers, clarity of questions, and completeness of options, specifically as follows: Factual verification of answers: Verify whether each factual point in the initial question-and-answer pair can be found directly or indirectly in the initial teaching text corpus; Logical consistency review: For questions involving reasoning, comparison, or causality, review whether the derivation process of the initial question-and-answer pair is consistent with the internal logic of the text; Instructional suitability review: Assess whether the questions in the initial question-and-answer dialogue are clear and unambiguous, whether they are in line with the cognitive level of the current learning stage, and whether they closely relate to the knowledge points represented by the selected target keywords; Structural compliance review: For multiple-choice questions, review whether they provide options that meet the quantity requirements and have distracting value, and whether the length and structure of each option are relatively balanced.

[0013] As a preferred embodiment of the present invention, in S5.2, the verification instruction prompt is constructed in the following way: the large language model is defined as the course content review expert role, and an initial lecture text corpus or refined summary text is provided as the review context and the initial question-and-answer pair to be reviewed. The factual consistency of the answers, the clarity of the questions, and the completeness of the options are required to be reviewed, and the output format is limited to "verification passed" or "problem found and description". The "problem found and description" is required to adopt the following format: "requires correction: [problem description]; correction suggestion: [correction suggestion]".

[0014] As a preferred embodiment of the present invention, in S5.3, the correction instruction prompt is constructed in the following way: the large language model is defined as the course content editing role, and an initial lecture text corpus is provided as the basis for correction. The question-answer pair to be corrected and the question description extracted from the verification results are corrected. At the same time, strong constraints are applied, requiring the large language model to strictly follow the correction basis, only correct the answer part, and keep the original question unchanged. The instruction large language model is to directly output the corrected answer.

[0015] The beneficial effects of this invention are: This invention addresses the practical difficulties teachers face when generating high-quality questions in real-time during classroom teaching, including high cognitive load, a potential disconnect between questioning and key teaching points, and challenges in ensuring question quality. It provides an intelligent, controllable, and reliable solution for automatically generating in-class questions. Through deep semantic understanding and multi-stage progressive processing of classroom lecture text, it can not only accurately extract core course knowledge and quantify key teaching points, but also ensure the accuracy of generated content through a self-verification and correction mechanism, ultimately producing classroom question-and-answer pairs that align with the current teaching content. This capability frees teachers from the mental burden of instantly generating questions, allowing them to focus more on lecturing and classroom interaction, thereby significantly improving the fluency and efficiency of classroom teaching.

[0016] This invention constructs a quality assurance closed loop encompassing generation, verification, and correction. By utilizing a large language model that simultaneously acts as both generator and reviewer, it reduces the spread of model "illusions" and factual errors in educational scenarios. This enhances the credibility and pedagogical usability of automatically generated question-and-answer pairs, addressing the accuracy issues of AI-assisted teaching tools and providing reliable technical support for real-time classroom interaction. Furthermore, by empowering teachers with keyword selection during human-computer interaction, it ensures that the generated questions serve the teacher's specific teaching focus.

[0017] This invention can construct diverse and structurally standardized classroom question-and-answer pairs based on the knowledge focus selected by the teacher, and these pairs can be directly used for in-class questioning, group discussions, or reinforcement exercises. The generated question sets closely revolve around core knowledge points, exhibiting good adaptability to teaching. This process simplifies the process of teachers preparing interactive classroom materials, making it easy to create high-quality, personalized classroom questions, thereby effectively enhancing classroom participation and teaching effectiveness.

[0018] This invention employs a clear multi-stage modular design, breaking down the complex task of generating intelligent problems into coherent and controllable sub-steps. This reduces the complexity and uncertainty of technical implementation. Each functional module has clearly defined responsibilities and interfaces, exhibiting good maintainability and scalability. By realizing the entire process from text input to question output, it significantly lowers the technical threshold for real-time classroom interaction, providing innovative tools to improve the quality and efficiency of classroom teaching, and possesses broad educational application prospects and promotional value. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the principle of the method of the present invention; Figure 2 This is a schematic diagram of the modules of the system of the present invention. Detailed Implementation

[0020] The embodiments of the present invention will be further described below with reference to the accompanying drawings: Example 1: As Figure 1 As shown, a method for automatically generating in-class questions based on classroom lecture text comprehension includes the following steps: S1. Receive multiple segments of classroom lecture text from external input, remove leading and trailing whitespace characters from each segment, filter out empty text, and then concatenate the remaining valid text segments in order to form an initial lecture text corpus. S2. Based on the initial lecture text corpus, construct a knowledge summary prompt and call the large language model API. Through the knowledge summary prompt, instruct the large language model API to perform semantic compression and core extraction on the lecture content in the initial lecture text corpus, and generate a concise summary text that summarizes the core knowledge and logical points of this course. S3. Using a corpus of refined summary texts or initial lecture texts as the analysis object, keywords are extracted and sorted through a hybrid strategy to generate an ordered list of keywords. S4. The ordered list of keywords and its associated quantitative data are visualized through the front-end interactive interface. Users select one or more keywords from the ordered list of keywords through the front-end interactive interface to determine the target keywords for generating classroom questions. S5. Based on the determined target keywords, iteratively generate and self-verify question-answer pairs, and output the final question-answer pairs; S6. Traverse and integrate all the final question-and-answer pairs corresponding to the target keywords, classify and organize them in a structured manner, and present and output the organized final question-and-answer pair set, together with the refined summary text and the target keyword list, through the front-end interactive interface to form a set of in-class questions that can be directly used for classroom questioning or exercises.

[0021] In S2, the knowledge summary prompts are constructed in the following way: the large language model is defined as a teacher assistant role that is good at concise summarization, and it is instructed to extract the core knowledge points from the initial teaching text corpus provided, and to output a concise summary text in the format of a paragraph.

[0022] In S3, the process of generating an ordered list of keywords is as follows: S3.1. Based on the term frequency-inverse document frequency weight, select an initial set of candidate keywords from the analysis objects; S3.2 Count the actual frequency of each keyword in the initial candidate keyword set in the analysis object; S3.3. Based on the preset keyword length conditions and minimum frequency threshold, the initial candidate keyword set is filtered to obtain the effective keyword set; S3.4 Sort the set of effective keywords in descending order according to their actual frequency of occurrence to generate the final ordered list of keywords.

[0023] In S4, the quantitative data includes the word frequency and weight of keywords, and the visualization forms include at least keyword word cloud and frequency statistics bar chart; When visualizing the presentation, the top N keywords in the ordered list of keywords are automatically set as the default selected subset of keywords and presented in a pre-selected state on the front-end interactive interface, where N is a preset positive integer.

[0024] In S5, question-answer pairs are iteratively generated and self-verified for correction, outputting the final question-answer pairs. Specifically, this involves executing a closed-loop processing flow that includes multiple rounds of calls. S5.1 Preliminary generation sub-step: Using the current target keywords and refined summary text as input, construct question generation prompts and call the large language model API to generate one or more preliminary question-answer pairs. The question types of the question-answer pairs include, but are not limited to, multiple choice questions, short answer questions, and true / false questions. S5.2 Self-verification sub-step: Take the initial question-and-answer pairs and the initial teaching text corpus as input, construct verification instruction prompts, and call the large language model API again; The verification instruction prompts the Large Language Model API to review the initial question-and-answer pairs based on the course content in terms of factual accuracy, correctness of answers, clarity of questions, and completeness of options, and output a verification conclusion including "verification passed" or "problems found and descriptions". S5.3 Targeted Correction Sub-step: If the verification conclusion is "Problem found and description", then extract the problem description, construct correction instruction prompts and call the large language model API; The correction instruction includes strong constraints, requiring the large language model to only correct the answer part based on the initial teaching text corpus, while keeping the original question unchanged, and output the corrected final question-answer pair; If the verification result is "verification passed", the preliminary question-and-answer pair will be directly output as the final question-and-answer pair.

[0025] In S5.1, question generation prompts are constructed in the following way: the large language model is defined as the question-generating expert role, the current target keywords and refined summary text are injected as the core context, the type and number of questions to be generated are required, and the question-answer pairs are specified to be output in the formatted structure of "Question X: ... Answer X: ...".

[0026] S5.2 reviews the initial question-and-answer pairs in terms of factual accuracy, correctness of answers, clarity of questions, and completeness of options, specifically as follows: Factual verification of answers: Verify whether each factual point in the initial question-and-answer pair can be found directly or indirectly in the initial teaching text corpus; Logical consistency review: For questions involving reasoning, comparison, or causality, review whether the derivation process of the initial question-and-answer pair is consistent with the internal logic of the text; Instructional suitability review: Assess whether the questions in the initial question-and-answer dialogue are clear and unambiguous, whether they are in line with the cognitive level of the current learning stage, and whether they closely relate to the knowledge points represented by the selected target keywords; Structural compliance review: For multiple-choice questions, review whether they provide options that meet the quantity requirements and have distracting value, and whether the length and structure of each option are relatively balanced.

[0027] The verification instructions are constructed as follows: Define the large language model as the course content review expert role, and provide an initial lecture text corpus or refined summary text as the review context and the initial question-and-answer pair to be reviewed. The instructions require reviewing the factual consistency of the answers, the clarity of the questions, and the completeness of the options, and limit the output format to "Verification passed" or "Problems found and descriptions". The "Problems found and descriptions" are required to adopt the following format: "Requires correction: [Problem description]; Correction suggestion: [Correction suggestion]".

[0028] To avoid using the same large language model to validate newly generated content, cross-validation can be performed using large language models with different parameter scales or from different vendors when constructing validation instruction prompts. Furthermore, rule-based hard constraints can be added, such as requiring the answer to be included in the original text's TF-IDF high-scoring word field.

[0029] In S5.3, the correction instruction prompt is constructed in the following way: the large language model is defined as the course content editor role, and an initial lecture text corpus is provided as the basis for correction. The question-answer pairs to be corrected and the question descriptions extracted from the verification results are corrected. At the same time, strong constraints are imposed, requiring the large language model to strictly follow the correction basis, only correct the answer part, and keep the original question unchanged. The instruction large language model directly outputs the corrected answer.

[0030] Example 2: Figure 2 As shown, an automatic question generation system based on classroom lecture text comprehension, based on the method in Example 1, includes: The text receiving and integration module receives multiple segments of classroom lecture text from external input, removes leading and trailing whitespace characters from each segment, filters out empty text, and then concatenates the remaining valid text segments in order to form an initial lecture text corpus. The knowledge summary module, based on the initial lecture text corpus, constructs knowledge summary prompts and calls the large language model API. Through the knowledge summary prompts, the large language model API is instructed to perform semantic compression and core extraction on the lecture content in the initial lecture text corpus, generating a concise summary text that summarizes the core knowledge and logical points of this course. The keyword management module uses a corpus of refined summary texts or initial teaching texts as the analysis object. It extracts and sorts keywords through a hybrid strategy to generate an ordered list of keywords. The interactive control module visualizes the ordered list of keywords and its associated quantitative data through the front-end interactive interface. Users can select one or more keywords from the ordered list of keywords through the front-end interactive interface to determine the target keywords for generating classroom questions. The question-answer pair generation and verification engine, based on defined target keywords, iteratively generates and self-verifies question-answer pairs, outputting the final question-answer pairs; The output and display module iterates through and integrates all the final question-and-answer pairs corresponding to the target keywords, classifies and organizes them in a structured manner, and presents and outputs the organized final question-and-answer pair set, along with the refined summary text and the target keyword list, through the front-end interactive interface, forming a set of in-class questions that can be directly used for classroom questioning or exercises.

[0031] In this embodiment, the large language model (LLM) can be called through the API of MaaS (Model as a Service) platforms such as Qianfan Large Model Platform and Coze Platform, or directly deployed as open source / local models such as Spark-Lite and GLM-4-Flash.

[0032] This embodiment of the system has strong compatibility and can be integrated into various teaching-related hardware, software, and platforms. Its core functionality is adapted to the needs of real-time classroom interaction and teaching resource generation, for example: Teaching terminal hardware: It can be directly integrated into teachers' teaching computers, tablets, and smart lesson preparation terminals. When preparing or delivering lessons, teachers can input the lecture text or import audio-to-text transcripts to generate a question set in real time without switching between multiple tools, adapting to the real-time interactive needs of offline classrooms.

[0033] It can be embedded in an intelligent interactive whiteboard system, combining the whiteboard's writing recognition and text extraction functions to directly analyze the teacher's blackboard writing and generate corresponding classroom questions, thereby improving the continuity of classroom interaction.

[0034] Online teaching platform: Integrated into live and recorded course platforms, it can transcribe teachers' lectures into text in real time and generate a question set simultaneously for use in classroom Q&A sessions, post-class quizzes, and other activities, adapting to the interactive and learning assessment needs of online teaching.

[0035] Embedded in an online lesson preparation platform, it serves as an auxiliary tool for teachers' lesson preparation, generating different types of practice questions based on lesson plan texts to supplement the lesson preparation resource library.

[0036] Smart Classroom System: It works in conjunction with the recording and broadcasting system and the learning analysis system of the smart classroom. The classroom teaching content collected by the recording and broadcasting system can be automatically input into the system to generate questions. The learning analysis system can then optimize the focus of subsequent question generation based on the answers to these questions.

[0037] Educational Apps / Software: Integrated into learning analysis apps and homework assignment apps, these apps can generate targeted question-and-answer pairs based on keywords related to students' weak knowledge points, which can then be used to push personalized homework or review questions.

[0038] Embedded in teacher training software, it helps teacher trainees quickly generate questions that match the teaching content after simulated teaching, thereby improving their interactive design capabilities during the training process.

[0039] The hardware involved in the above implementation includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The processor executes the program to achieve the functions of the system in this embodiment.

[0040] Example 3: Based on the system of Example 2, assuming that an audio recording of a teacher lecturing on photosynthesis in plants has been processed into three text segments and input into the system, the automatic generation process of in-class questions is as follows: S1. Explain the steps of text reception and integration: The system receives three classroom lecture texts input from an external source (e.g., from an audio preprocessing system), performs operations such as removing leading and trailing whitespace and filtering empty paragraphs on each text, and then concatenates these three valid texts in their original order to form a complete and structured initial lecture text corpus, such as "Plant Photosynthesis Lecture Corpus".

[0041] S2. Core Knowledge Summary Generation: The system invokes the large language model, using the "Plant Photosynthesis Lecture Corpus" as input, to request the generation of a knowledge summary. The large language model API returns: "This course primarily explains the conditions for plant photosynthesis (including light, chloroplasts, carbon dioxide, and water), the basic processes (material and energy conversion in the light and dark reaction stages), the important significance of this physiological process (synthesizing organic matter to store energy, releasing oxygen to maintain atmospheric carbon-oxygen balance), and its applications in agricultural production (reasonable planting density, extending light duration, etc.)." S3. Keyword Mixed Extraction and Quantitative Ranking: The system first uses TF-IDF weights and limits nouns to specific parts of speech (e.g., nouns, gerunds) to initially screen out a set of candidate words from the refined summary text, such as "photosynthesis", "chloroplast", "carbon dioxide", "organic matter", and "light reaction". Next, the system counts the actual frequency of each candidate word in the refined summary text and filters them according to preset rules (e.g., length between 2-6 characters, frequency ≥ 2). For example, after filtering, "dark reaction" is removed because its frequency is 1, and "reasonable dense planting" is excluded because it is an agricultural term phrase not captured by the initial TF-IDF screening. Finally, the system sorts the filtered valid candidate words in descending order of their actual frequency. For example, if the frequency count is: "photosynthesis" (18 times), "chloroplast" (14 times), "carbon dioxide" (10 times), "organic matter" (7 times), and "oxygen" (5 times), the generated ordered list of keywords would be: [("photosynthesis", 18), ("chloroplast", 14), ("carbon dioxide", 10), ("organic matter", 7), ("oxygen", 5)].

[0042] S4. Interactive Keyword Filtering and Determination: The front-end interface displays the above list and corresponding word cloud ("photosynthesis" and "chloroplasts" are most prominent). The system defaults to selecting the first three. The teacher believes that the product concept of "organic matter" is key, while the product concept of "oxygen" also needs to be examined. Therefore, the teacher manually adjusted the selection and finally chose the target keywords as: [photosynthesis, chloroplasts, carbon dioxide, organic matter].

[0043] S5. Question-answering pairs are iteratively generated and self-verified for correction (taking "organic matter" as an example): S5.1 Preliminary Generation: For "organic matter", the large language model API generates a short answer question: "What is the main organic matter that plants synthesize through photosynthesis?" Preliminary answer: "The main organic matter that plants synthesize through photosynthesis is glucose." S5.2 Self-verification: The verification module submits the question-answer pairs and the original corpus for review. The Large Language Model API provides feedback after review: "Verification passed. The answer accurately identifies the main organic products of photosynthesis." S5.3 Correction Process: For the question about "carbon dioxide," the Large Language Model API generates a multiple-choice question, one option of which is "Carbon dioxide is the only raw material for photosynthesis." The verification module reports: "Correction needed: Option B is too absolute. The original text mentions 'both carbon dioxide and water are raw materials for photosynthesis,' not that it is the only one. Correction suggestion: Change 'carbon dioxide is the only raw material for photosynthesis' to 'carbon dioxide is one of the important raw materials for photosynthesis.'" Based on this, the correction module calls the Large Language Model API to generate the corrected option.

[0044] S6. Structured encapsulation and output of the problem set: The system outputs the final question set, categorized by four keywords. In the "Carbon Dioxide" section, option B in the multiple-choice questions has been corrected. All questions are clearly listed, allowing teachers to immediately use them for classroom questioning.

[0045] Example 4: Based on the system of Example 2, assuming that an audio recording of a teacher lecturing on solving linear equations in one variable has been processed into five text segments and input into the system, the automatic generation process of in-class questions is as follows: S1. Explain the steps of text reception and integration: The system receives five segments of classroom lecture text input from an external source (e.g., from an audio preprocessing system), performs operations such as removing leading and trailing whitespace characters and filtering empty paragraphs on each segment, and then concatenates these five valid segments in their original order to form a complete and structured initial lecture text corpus, such as "lecture corpus on solving linear equations in one variable".

[0046] S2. Core Knowledge Summary Generation: The system calls the Large Language Model, taking the "Corpus of Teaching Methods for Solving Linear Equations in One Variable" as input, and requests the generation of a knowledge summary. The Large Language Model API returns: "This course focuses on explaining the definition of a linear equation in one variable (an algebraic equation containing only one unknown with the unknown having a power of 1), the standard solution steps (removing denominators, removing parentheses, transposing terms, combining like terms, and reducing the coefficient to 1), the basis for each step (the basic properties of equations), and common mistakes made in the problem-solving process (not changing the sign when transposing terms, omitting the constant term when removing denominators, etc.)." S3. Keyword Mixed Extraction and Quantitative Ranking: The system first uses TF-IDF weights and limits nouns to specific parts of speech (e.g., nouns, gerunds) to initially screen out a set of candidate words from the refined summary text. Examples of candidate words include: "linear equation in one variable," "transposition," "combining like terms," ​​"coefficient reduced to 1," and "properties of equality." Next, the system counts the actual frequency of each candidate word in the refined summary text and filters them according to preset rules (e.g., length between 2-8 characters, frequency ≥ 2). For example, after filtering, "removing parentheses" is eliminated because its frequency is 1, and "common mistakes" is excluded because it is a general description and was not captured by the initial TF-IDF screening. Finally, the system sorts the filtered valid candidate words in descending order of their actual frequency. For example, if the statistical frequencies are: "linear equation in one variable" (20 times), "rearranging terms" (15 times), "combining like terms" (12 times), "coefficient reduced to 1" (8 times), "properties of equality" (6 times), then the generated ordered list of keywords is: [("linear equation in one variable", 20), ("rearranging terms", 15), ("combining like terms", 12), ("coefficient reduced to 1", 8), ("properties of equality", 6)].

[0047] S4. Interactive Keyword Filtering and Determination: The front-end interface displays the above list and corresponding word cloud ("linear equation in one variable" and "transposition" are the most prominent). The system defaults to selecting the first three. The teacher believes that "properties of equality" is the core basis of the solution method, and "reducing the coefficient to 1" is the key step in the final solution, which needs to be emphasized in the examination. Therefore, the teacher manually adjusted the settings and finally selected the target keywords as: [linear equation in one variable, transposition, combining like terms, properties of equality].

[0048] S5. Question-answering pairs are generated iteratively and self-verified for correction (taking "transitioning" as an example): S5.1 Preliminary Generation: Regarding "transposition", the large language model generates a short answer question: "When solving a linear equation in one variable, what is the core rule for transposition?" Preliminary answer: "When moving a term in an equation from one side of the equal sign to the other, the sign of that term must be changed." S5.2 Self-Verification: The verification module submits the question-and-answer pairs and the original corpus for review. The large language model provides feedback after review: "Verification passed. The answer accurately describes the core rules of term shifting and is a perfect match for the course content." S5.3 Correction Process: Regarding the "Properties of Equality," the large language model generates a multiple-choice question, one option of which is "Property 1 of equality states that multiplying both sides of an equation by the same number does not change the equality." The verification module reports: "Correction needed: Option D confuses the contents of Property 1 and Property 2 of equality. Property 1 states that adding or subtracting the same number or expression to both sides of an equation does not change the equality; Property 2 is the rule related to multiplication and division. Correction suggestion: Change option D to 'Property 1 of equality states that adding or subtracting the same number to both sides of an equation does not change the equality.'" Based on this, the correction module calls the large language model to generate the corrected option.

[0049] S6. Structured encapsulation and output of the problem set: The system outputs the final question set, categorized by four keywords. In the "Properties of Equations" section, option D in the multiple-choice questions has been corrected. All questions are clearly listed, allowing teachers to immediately use them for classroom questioning or in-class exercises.

[0050] Example 5: The difference between this example and Example 1 is that, in the process of generating the ordered list of keywords, a step of calculating and integrating the teaching dimension weight factor is added, specifically including: A teaching dimension weight library is constructed, which includes three types of parameters: the adaptability of knowledge points related to the course to the grade level, the proportion of requirements of the examination syllabus, and the annotation of core test points in the classroom. Each type of parameter is assigned a preset weight coefficient of 0 to 1. For each keyword in the effective keyword set, match the corresponding parameter in the teaching dimension weight library, and calculate the teaching dimension weight value of each keyword through a weighted summation formula; The keyword frequency weight and the teaching dimension weight are normalized and then weighted and merged to obtain the comprehensive weight value of the keyword. Sort the keywords in descending order according to their overall weight values ​​to generate the final ordered list of keywords.

[0051] The improved, ordered keyword list prioritizes keywords with higher teaching value, avoiding the problem of high-frequency but low-importance keywords occupying a prominent position. When selecting target keywords, teachers can more accurately pinpoint the core exam points of the course, and the generated question-and-answer pairs are more aligned with teaching and assessment needs, thereby enhancing the teaching adaptability and practicality of the question set.

[0052] Example 6: The difference between this example and Example 1 is that a learning-driven dynamic interactive optimization mechanism is added to the front-end interactive interface visualization and keyword selection process. Specifically: Add multi-dimensional filtering controls to the front-end interactive interface to support users to filter by keyword part of speech, teaching dimension weight level, and knowledge point relevance. The filtering results are updated in real time with the font size of the word cloud and the sorting order of the bar chart. Access the learning analysis database, which contains high-frequency error-prone knowledge point keywords and knowledge point mastery distribution data for students in the corresponding learning stage. Calculate the error-prone weight value of the target keywords based on the learning analysis data. The error-prone weight value of the keywords is combined with the word frequency weight to obtain the comprehensive score of learning situation matching. Based on this score, the default selected keyword subset is dynamically adjusted. Instead of fixedly selecting the top N keywords, the top N keywords with the comprehensive score of learning situation matching are selected first. Users can tag selected target keywords. When two or more logically related keywords are tagged, the system will automatically suggest generating cross-knowledge point integration questions and synchronize the tagging information to the subsequent question-and-answer pair generation process.

[0053] Multi-dimensional filtering controls help teachers quickly locate keywords corresponding to teaching focus and students' weaknesses, improving the efficiency of keyword selection; the default keyword adjustment mechanism adapted to learning situation allows the generated question set to prioritize covering students' error-prone knowledge points, enhancing the pertinence and targeting of classroom questioning; the keyword association tagging function supports the generation of cross-knowledge point integrated questions, expanding the depth and breadth of questions, making the final generated question set more in line with actual teaching and learning needs.

[0054] Example 7: The difference between this example and Example 1 is that a difficulty stratification and grade-level question type adaptation mechanism is added during the question generation and prompt construction process. This mechanism includes: The system has a three-level difficulty level library: basic, intermediate, and advanced. Each level has a specific ability assessment requirement. The basic level focuses on memorizing knowledge points, the intermediate level focuses on applying knowledge, and the advanced level focuses on knowledge transfer and comprehensive reasoning. The current course's corresponding grade level parameters and preset difficulty requirements are injected into the question generation prompts. The large language model is defined to take on the additional role of a learning adaptation planner in addition to the role of a question-setting expert. Establish a rule that links question types with difficulty levels: the basic level prioritizes generating true / false questions and basic multiple-choice questions, the advanced level prioritizes generating application questions and analytical questions, and the extension level prioritizes generating comprehensive short-answer questions and case analysis questions. In addition to following the format "Question X: ... Answer X: ...", the question-answer pairs output by the large language model must also include a difficulty level label at the end of each pair, and the question-answer pairs generated under the same target keyword must cover at least two difficulty levels.

[0055] The question generation mechanism in this embodiment can accurately match questions of corresponding difficulty according to the cognitive abilities of students at different learning stages, avoiding situations where questions are too easy and lack challenge, or too difficult and discourage students. The design of covering multiple difficulty levels for the same knowledge point not only meets the consolidation needs of students with weak foundations, but also adapts to the expansion needs of students with extra learning capacity, thereby improving the adaptability of the question set to differentiated teaching.

Claims

1. A method for automatically generating in-class questions based on classroom lecture text comprehension, characterized in that... Includes the following steps: S1. Receive multiple segments of classroom lecture text from external input, remove leading and trailing whitespace characters from each segment, filter out empty text, and then concatenate the remaining valid text segments in order to form an initial lecture text corpus. S2. Based on the initial lecture text corpus, construct a knowledge summary prompt and call the large language model API. Through the knowledge summary prompt, instruct the large language model API to perform semantic compression and core extraction on the lecture content in the initial lecture text corpus, and generate a concise summary text that summarizes the core knowledge and logical points of this course. S3. Using a corpus of refined summary texts or initial lecture texts as the analysis object, keywords are extracted and sorted through a hybrid strategy to generate an ordered list of keywords. S4. The ordered list of keywords and its associated quantitative data are visualized through the front-end interactive interface. Users select one or more keywords from the ordered list of keywords through the front-end interactive interface to determine the target keywords for generating classroom questions. S5. Based on the determined target keywords, iteratively generate and self-verify question-answer pairs, and output the final question-answer pairs; S6. Traverse and integrate all the final question-and-answer pairs corresponding to the target keywords, classify and organize them in a structured manner, and present and output the organized final question-and-answer pair set, together with the refined summary text and the target keyword list, through the front-end interactive interface to form a set of in-class questions that can be directly used for classroom questioning or exercises.

2. The method for automatically generating in-class questions based on classroom lecture text comprehension as described in claim 1, characterized in that, In S2, the knowledge summary prompt is constructed in the following way: the large language model is defined as a teacher assistant role that is good at concise summarization, and it is instructed to extract the core knowledge points from the provided initial teaching text corpus, and is required to output a concise summary text in the format of a paragraph.

3. The method for automatically generating in-class questions based on classroom lecture text comprehension as described in claim 1, characterized in that, In S3, the process of generating an ordered list of keywords is as follows: S3.

1. Based on the term frequency-inverse document frequency weight, select an initial set of candidate keywords from the analysis objects; S3.2 Count the actual frequency of each keyword in the initial candidate keyword set in the analysis object; S3.

3. Based on the preset keyword length conditions and minimum frequency threshold, the initial candidate keyword set is filtered to obtain the effective keyword set; S3.4 Sort the set of effective keywords in descending order according to their actual frequency of occurrence to generate the final ordered list of keywords.

4. The method for automatically generating in-class questions based on classroom lecture text comprehension as described in claim 1, characterized in that, In S4, the quantitative data includes the word frequency and weight of keywords, and the visualization format includes at least a keyword word cloud and a frequency statistics bar chart. When visualizing the presentation, the top N keywords in the ordered list of keywords are automatically set as the default selected subset of keywords and presented in a pre-selected state on the front-end interactive interface, where N is a preset positive integer.

5. The method for automatically generating in-class questions based on classroom lecture text comprehension according to claim 1, characterized in that, In S5, question-answer pairs are iteratively generated and self-verified for correction, and the final question-answer pairs are output. Specifically, this involves executing a closed-loop processing flow that includes multiple rounds of calls. S5.1 Preliminary generation sub-step: Using the current target keywords and refined summary text as input, construct question generation prompts and call the large language model API to generate one or more preliminary question-answer pairs. The question types of the question-answer pairs include, but are not limited to, multiple choice questions, short answer questions, and true / false questions. S5.2 Self-verification sub-step: Take the initial question-and-answer pairs and the initial teaching text corpus as input, construct verification instruction prompts, and call the large language model API again; The verification instruction prompts the Large Language Model API to review the initial question-and-answer pairs based on the course content in terms of factual accuracy, correctness of answers, clarity of questions, and completeness of options, and output a verification conclusion including "verification passed" or "problems found and descriptions". S5.3 Targeted Correction Sub-step: If the verification conclusion is "Problem found and description", then extract the problem description, construct correction instruction prompts and call the large language model API; The correction instruction includes strong constraints, requiring the large language model to only correct the answer part based on the initial teaching text corpus, while keeping the original question unchanged, and output the corrected final question-answer pair; If the verification result is "verification passed", the preliminary question-and-answer pair will be directly output as the final question-and-answer pair.

6. The method for automatically generating in-class questions based on classroom lecture text comprehension according to claim 5, characterized in that, In S5.1, the question generation prompts are constructed in the following way: the large language model is defined as the question-generating expert role, the current target keywords and refined summary text are injected as the core context, the type and number of questions to be generated are required, and the question-answer pairs are specified to be output in the formatted structure of "Question X: ... Answer X: ...".

7. The method for automatically generating in-class questions based on classroom lecture text comprehension according to claim 5, characterized in that, In S5.2, the preliminary question-and-answer pair is reviewed in terms of factual accuracy, correctness of answers, clarity of questions, and completeness of options, specifically as follows: Factual verification of answers: Verify whether each factual point in the initial question-and-answer pair can be found directly or indirectly in the initial teaching text corpus; Logical consistency review: For questions involving reasoning, comparison, or causality, review whether the derivation process of the initial question-and-answer pair is consistent with the internal logic of the text; Instructional suitability review: Assess whether the questions in the initial question-and-answer dialogue are clear and unambiguous, whether they are in line with the cognitive level of the current learning stage, and whether they closely relate to the knowledge points represented by the selected target keywords; Structural compliance review: For multiple-choice questions, review whether they provide options that meet the quantity requirements and have distracting value, and whether the length and structure of each option are relatively balanced.

8. The method for automatically generating in-class questions based on classroom lecture text comprehension according to claim 5, characterized in that, In S5.2, the verification instruction prompt is constructed in the following way: the large language model is defined as the course content review expert role, and an initial lecture text corpus or refined summary text is provided as the review context and the initial question-and-answer pair to be reviewed. It is required to review the factual consistency of the answers, the clarity of the questions and the completeness of the options, and the output format is limited to "verification passed" or "problem found and description". The "problem found and description" is required to adopt the following format: "requires correction: [problem description]; correction suggestion: [correction suggestion]".

9. The method for automatically generating in-class questions based on classroom lecture text comprehension according to claim 5, characterized in that, In S5.3, the correction instruction prompt is constructed in the following way: the large language model is defined as the course content editor role, and an initial lecture text corpus is provided as the basis for correction. The question-answer pair to be corrected and the question description extracted from the verification results are corrected. At the same time, strong constraints are applied, requiring the large language model to strictly follow the correction basis, only correct the answer part, and keep the original question unchanged. The instruction large language model directly outputs the corrected answer.