Teaching courseware generation method and system
Patent Information
- Application Number
- CN202611034567.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]然而,由于该类方案在将大纲文本写入目标页面的过程中,缺乏对实际写入文本数据量进行量化感知的评估机制,导致其排版过程无法适应文本规模的动态变化
[0008]本发明的有益效果在于:通过提取所述结构化课件大纲中每一大纲页面的文本量化指标,将页面内非结构化的文本长度转化为工程可计算的数值特征,并根据所述文本量化指标与预设阈值的比对结果判定每一所述大纲页面的页面密度等级,实现了将连续变化的页面文本数据量划分为确定的状态等级;在此基础上,基于预设的密度等级与版式参数之间的映射表,获取与所述页面密度等级相匹配的字号、行间距及布局模式作为版式决策参数,构建了一条从底层数据特征到上层排版参数的确定性映射链路。通过将文本数据量进行指标量化并直接驱动渲染引擎执行参数匹配,赋予了排版过程中针对实际内容空间占用的反馈调节能力,使得输出的所述目标演示文稿能够依据当前大纲页面的具体内容密度动态分配页面渲染空间,规避了由于采用固定排版规则而引发的文本重叠拥挤或大面积冗余留白现象,实现了一套完整的内容感知型自动排版流程。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of education and automatic content arrangement technology, and in particular to a method and system for generating teaching courseware. Background Technology
[0002] Most current intelligent courseware generation solutions on the market adopt a technical approach of "text generation combined with static template filling". Such solutions typically first use a large language model to generate outline text for the courseware based on the user-input topic and teaching materials, and then directly fill the generated outline text into a preset presentation template to generate the final page.
[0003] This closest existing technology relies primarily on fixed layout rules from the platform's preset template library during the typesetting and rendering stage. Specifically, the system uses static settings or fixed constraints for page layout parameters such as body text size, line spacing, bullet point spacing, content area height, and margins.
[0004] However, because such solutions lack a mechanism to quantify the actual amount of text written into the target page, their layout process cannot adapt to dynamic changes in text size. In actual generation, when a single page has a large number of key points or a large total number of characters, the fixed layout framework and limited content area height force text to be stacked within a limited space, resulting in severely crowded text layout and font sizes that are compressed to an illegible level, significantly increasing the visual reading load in presentation scenarios. Conversely, when a single page outline has very few key points, the fixed layout cannot automatically compensate for font size or adjust centering, leading to large areas of meaningless white space on the page, disrupting the visual balance of the presentation layout. In summary, existing technologies lack the ability to perceive and dynamically adapt layout based on the actual content density of the page. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method and system for generating teaching courseware, which can dynamically calculate layout parameters and adaptively typeset based on the text data capacity of the courseware page.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for generating teaching courseware, comprising: Receive a courseware generation request, obtain teaching materials from the courseware generation request, call a large language model to perform content analysis on the teaching materials, and generate a structured courseware outline; Extract the text quantification index of each outline page in the structured courseware outline, and determine the page density level of each outline page based on the comparison result of the text quantification index and the preset threshold. Based on a preset mapping table between density levels and layout parameters, obtain layout decision parameters that match the page density level; Based on the structured courseware outline and the layout decision parameters, render and output the target presentation.
[0007] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A teaching courseware generation system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement any of the above-described teaching courseware generation methods.
[0008] The beneficial effects of this invention are as follows: By extracting the text quantification index of each outline page in the structured courseware outline, the length of unstructured text within the page is transformed into a numerical feature that can be calculated in engineering. Based on the comparison result of the text quantification index and a preset threshold, the page density level of each outline page is determined, thus classifying the continuously changing page text data into defined state levels. Furthermore, based on a preset mapping table between density levels and layout parameters, font size, line spacing, and layout mode matching the page density level are obtained as layout decision parameters, constructing a deterministic mapping link from underlying data features to upper-level layout parameters. By quantifying the text data volume and directly driving the rendering engine to perform parameter matching, the invention provides feedback adjustment capabilities for actual content space occupancy during the layout process. This allows the output target presentation to dynamically allocate page rendering space according to the specific content density of the current outline page, avoiding text overlap, congestion, or large areas of redundant white space caused by using fixed layout rules, and realizing a complete content-aware automatic layout process. Attached Figure Description
[0009] Figure 1 This is a flowchart of a teaching courseware generation method according to an embodiment of the present invention; Figure 2 This is an overall architecture diagram of a teaching courseware generation system according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating a structured content analysis and outline generation method according to an embodiment of the present invention. Figure 4 This is a flowchart illustrating a cognitive hierarchy verification and metadata injection method according to an embodiment of the present invention. Figure 5 This is a flowchart of a subject-specific image selection and image screening process according to an embodiment of the present invention; Figure 6 This is a flowchart illustrating a cognitive load assessment and adaptive typesetting decision-making process according to an embodiment of the present invention; Figure 7 This is a flowchart illustrating a context-aware local intelligent refinement method according to an embodiment of the present invention. Figure 8 This is a schematic diagram illustrating an online courseware editing interaction based on a browser, according to an embodiment of the present invention. Figure 9 This is a diagram illustrating an end-to-end data flow and technology layering architecture according to an embodiment of the present invention. Figure 10 This is a flowchart illustrating an image regeneration and prompt word metadata persistence method according to an embodiment of the present invention. Figure 11 This is a flowchart illustrating a full-process module call according to an embodiment of the present invention; Figure 12 This is a schematic diagram of a teaching courseware generation system according to an embodiment of the present invention. Detailed Implementation
[0010] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0011] In existing technologies, the integration of educational informatization and artificial intelligence has made the automatic generation of teaching materials a typical application scenario in the education industry. Teachers typically need to input specific teaching topics and materials when preparing for class, relying on cloud-based platforms to quickly arrange and generate presentation slides for classroom demonstrations. However, most existing automatic courseware generation solutions adopt a "text generation + static template filling" model. This model lacks quantitative assessment methods for the information density of teaching content in the actual layout and rendering process. When the single-page text output by the large language model is large, the static template, limited by a fixed container size, easily leads to problems such as crowded text, overlapping, or excessively small font sizes; while when the content is small, it results in visual imbalance due to large areas of blank space. This rigid application of fixed layout rules cannot adapt to the dynamic changes in the amount of content, causing the generated slides to fail to meet the basic requirements of clarity and aesthetics for classroom teaching.
[0012] To at least address the aforementioned issues, this invention receives courseware generation requests and acquires teaching materials. It then uses a large language model to perform content analysis to generate a structured courseware outline. Next, it extracts the text quantification indicators for each page of the structured courseware outline, determining its page density level based on the comparison results. Furthermore, it obtains layout decision parameters matching the page density level based on a preset mapping table. Finally, it renders and outputs the target presentation document based on the structured courseware outline and the layout decision parameters. In this way, the most reasonable font size, line spacing, and layout mode can be automatically adapted according to the actual text data volume of each outline page, solving the problems of overlapping and crowding when there is too much text and large blank areas on the screen when there is too little text, achieving dynamic layout rendering with adaptive content density.
[0013] The following describes a method for generating teaching courseware according to the present invention. Please refer to [link / reference]. Figure 1 , Figure 2 , Figure 3 , Figure 6 The method 100 includes steps 101 to 104: Step 101: Receive the courseware generation request, obtain the teaching materials from the courseware generation request, call the large language model to perform content analysis on the teaching materials, and generate a structured courseware outline.
[0014] For example, in a scenario where a middle school chemistry teacher generates courseware, the system server frontend receives a request form containing specified chemistry teaching content. Figure 2 As shown in the "Input Layer Topic / Subject / Grade / Materials" node on the left, the system accurately extracts the corresponding teaching materials from the courseware generation request. Subsequently, the system inputs the extracted teaching materials into the subsequent "Content Analysis Module" node, calling the large language model for processing. Combined with... Figure 3 The execution mechanism of "reading teaching materials" to "LLM structured output" involves the system outputting structured data containing multi-dimensional logical attributes obtained through semantic parsing, thereby generating and caching a structured courseware outline.
[0015] Step 102: Extract the text quantification index of each outline page in the structured courseware outline, and determine the page density level of each outline page based on the comparison results of the text quantification index and the preset threshold.
[0016] For example, after generating a structured courseware outline, the system enters... Figure 2 The "Cognitive Load Assessment Module" in the middle section. The system traverses each outline page in the structured courseware outline, extracting its textual statistical features as textual quantitative indicators. Combined with... Figure 6The “Statistical Key Points / Character Count” node in the upper left corner and the “Density Grading LIGHT-OVERFLOW” processing logic in the upper middle section compare the text quantification index of the current outline page with the preset threshold benchmark. Based on the different ranges of the data, the system maps it to a specific level type, and then determines and outputs the page density level of each outline page.
[0017] Step 103: Based on the preset mapping table between density levels and layout parameters, obtain layout decision parameters that match the page density level.
[0018] For example, the system pre-stores a mapping table containing configuration attributes in a database or cache unit. The typesetting engine uses the page density level output in step 102 as the search key, such as... Figure 6 As shown in the "Check Layout Parameter Table" node in the upper right corner, the pre-set font size, line spacing values, and predefined container alignment instruction sets are extracted from the mapping table, and then combined to obtain and combine them into layout decision parameters that match the current outline page.
[0019] Step 104: Render and output the target presentation based on the structured courseware outline and layout decision parameters.
[0020] For example, the system enters the underlying document assembly module. Figure 2 As shown in the "Courseware Rendering and Export Module" at the bottom left, the system reads the structured courseware outline and performs page space allocation according to the layout decision parameters calculated in step 103. Finally, the data is transmitted to... Figure 2 The "Output Layer Courseware Document Online Editing" node at the bottom encapsulates XML code and image resources in the system's underlying program, rendering and outputting a target presentation with the extension .pptx.
[0021] As described above, by extracting text quantification indicators from each outline page in the structured courseware outline, the length of unstructured text within the page is transformed into a numerical feature that can be calculated in engineering. Based on the comparison between the text quantification indicators and preset thresholds, the page density level of each outline page is determined, thus classifying the continuously changing page text data into defined state levels. Furthermore, based on a preset mapping table between density levels and layout parameters, font size, line spacing, and layout mode matching the page density level are obtained as layout decision parameters, constructing a deterministic mapping link from underlying data features to upper-level layout parameters. By quantifying the text data volume and directly driving the rendering engine to perform parameter matching, the system gains the ability to adjust for actual content space occupancy during the layout process. This allows the output presentation to dynamically allocate page rendering space based on the specific content density of the current outline page, avoiding text overlap, congestion, or large areas of redundant white space caused by fixed layout rules. This achieves a complete content-aware automatic layout process.
[0022] Please refer to Figure 6 In one embodiment of the present invention, for the steps in claim 2, step 102 includes steps 201 to 202: Step 201: Calculate the number of key points, total number of characters, longest key point character count, and average key point character count contained in each outline page as text quantification indicators.
[0023] For example, during the parsing phase, the system executes... Figure 6 The "Number of Key Points / Character Count" node in the top left corner performs the following operations: Within this node, the system reads the list object of each outline page to obtain the array length, recording it as the number of key points; it then sums the byte lengths of all text blocks within that outline page, recording the total number of characters; simultaneously, the system iterates through each line of characters to find the longest extreme value, recording it as the longest key point character count; and finally, it calculates the quotient of the total number of characters and the number of key points as the average key point character count. These four precise values together constitute the text quantification metric.
[0024] Step 202: Compare the number of key points, total number of characters, number of characters of the longest key point, and number of characters of the average key point in the text quantification indicators with their respective preset thresholds. Based on the comparison results of each text quantification indicator with the preset thresholds, determine the page density level of each outline page.
[0025] For example, the system sets a preset threshold based on cognitive load theory (such as Miller's 7±2 rule) and experience with courseware readability, and then executes... Figure 6The upper-middle section displays the "Density Grading LIGHT-OVERFLOW" operation box. The system's internal algorithm uses a median baseline of 240 characters (40 characters per key point multiplied by 6 key points). During the judgment process: when there are 1 to 3 key points and the total number of characters does not exceed 150, the system determines the page density level as light (LIGHT); when there are no more than 6 key points and the total number of characters does not exceed 350, the system determines the page density level as normal (NORMAL); when there are no more than 9 key points and the total number of characters does not exceed 600, the page density level is determined as high (DENSE), with the 9 key point limit approaching the upper limit of human working memory as defined by Miller's rule; in other cases, when the total number of characters exceeds 600 or the number of key points reaches 10, the system determines the page density level as overloaded (OVERFLOW), and then outputs the final page density level judgment result.
[0026] As described above, density is determined by statistically analyzing dimensions such as the number of key points and the total number of characters, combined with specific numerical thresholds set based on the limits of human working memory (such as Miller's rule). This step calculates exactly how much space the current page occupies and uses clear numerical benchmarks (such as judging a single page as overloaded if it contains more than 9 key points or 600 characters) to allow the system to accurately judge whether there is too much information on the page, just like a human. This provides a reliable data basis for automatically matching appropriate font sizes and line spacing in subsequent layouts.
[0027] Please refer to Figure 6 In one embodiment of the present invention, step 103, which involves obtaining layout decision parameters matching the page density level based on a preset mapping table between density levels and layout parameters, includes steps 301 to 302: Step 301: When the page density level is in the low density range, match the first layout decision parameters according to the mapping table. The body text size in the first layout decision parameters is the first preset value, the line spacing is the first preset spacing, and the layout mode is the center layout mode.
[0028] For example, when the system determines that the current outline page's page density level is in the low-density range (such as the LIGHT level determined above), the system accesses... Figure 6 The "Query Layout Parameter Table" node. The system retrieves the first layout decision parameter, which includes a large body text size with a first preset value, a loose line spacing parameter with a first preset spacing, and sets the container's layout mode to a centered layout mode, based on the low-density key-value mapping table.
[0029] Step 302: When the page density level is in the high density range, match the second layout decision parameters according to the mapping table. The body text size in the second layout decision parameters is the second preset value, the line spacing is the second preset spacing, and the layout mode is the compact layout mode; wherein, the first preset value is greater than the second preset value, and the first preset spacing is greater than the second preset spacing.
[0030] For example, when the system determines that the page density level is in the high-density range (such as the DENSE level mentioned above), the system matches the high-density key value in the "Look Up Layout Parameter Table" node. It then obtains a second layout decision parameter containing a smaller body text size with a second preset value, a narrower line spacing with a second preset spacing, and sets the layout mode to compact layout mode. The final output mapping strategy ensures that the first preset value is greater than the second preset value, and that the first preset spacing is greater than the second preset spacing.
[0031] As described above, the system binds low-density and high-density states to different font sizes and layout modes. This achieves dynamic adjustment, using large, centered fonts for fewer words and small, compact fonts for more words. This ensures that regardless of the length of the text generated by the large model, the text box automatically adapts to the content like a flexible container, avoiding display errors caused by excessive text exceeding the slide boundaries.
[0032] Please refer to Figure 3 In one embodiment of the present invention, step 101, when generating the structured courseware outline, further includes steps 401 to 402: Step 401: Constrain the content of each outline page in the structured courseware outline based on preset single-page content constraints. The single-page content constraints include the upper limit of the number of key points per page and the upper limit of the number of characters per key point.
[0033] For example, such as Figure 3 As shown in the processing path, after obtaining the "LLM structured output" and completing the initial "JSON validation," the system transmits the data to the "Page Number / Key Point Constraints" validation node at the bottom. Within this node, the system uses preset single-page content constraints to intercept and check the content of each outline page, specifically verifying whether the number of key points on the outline page exceeds the set limit of 6, and whether the length of each individual key point exceeds the set limit of 40 characters.
[0034] Step 402: If there are outline pages in the structured courseware outline that do not meet the single-page content constraints, then split the outline pages that do not meet the single-page content constraints and generate new outline pages that meet the single-page content constraints.
[0035] For example, in Figure 3Within the "Page / Key Point Constraint" processing stage, if the system detects that a certain outline page does not meet the single-page content constraints (e.g., a single page has 7 key points or characters severely exceed the limits), a splitting function is triggered. The system forcibly splits the non-compliant outline page at a specified threshold breakpoint, re-encapsulates the overflowing characters and key points, and generates a new outline page that meets the single-page content constraints. After processing, all valid data can be output to the "Output Courseware Outline" endpoint on the left.
[0036] As described above, by forcibly limiting the number of key points and character length per page when the large language model generates the outline, and automatically splitting the page when these limits are exceeded, the problem of the large model frequently generating large, uncontrolled paragraphs is controlled at the source. When the system detects that a page has too much content, it will proactively split it into two or more pages, preventing massive amounts of text from piling up on a single slide and causing the downstream typesetting system to crash.
[0037] Please refer to Figure 5 In one embodiment of the present invention, before rendering and outputting the target presentation in step 104, steps 501 to 504 are further included: Step 501: Perform content type identification on each outline page in the structured courseware outline to obtain the page content type of each outline page.
[0038] For example, before triggering the typesetting module, the system calls the subject-specific illustration determination module. Combined with... Figure 5 The leftmost "Content Type Recognition" starting node allows the system to perform keyword frequency analysis on the text of each outline page in the structured courseware outline. By identifying feature words such as "definition, concept, principle", the page is classified as "definition", or by identifying "steps, methods, experiments", it is classified as "process" or "scenario" page content types.
[0039] Step 502: Parse and obtain the subject type from the courseware generation request, query the preset two-dimensional decision matrix based on the subject type and page content type, determine whether each outline page needs to be accompanied by an image, and obtain the corresponding image type and image placement position when the determination result shows that an image is required.
[0040] For example, the system parses the subject type from the request. Figure 5As shown in the execution path at the top, the system enters the core node of "Subject × Content Matrix Lookup Table," using the extracted two-dimensional combination of subject type and page content type to address a pre-built two-dimensional decision matrix containing 48 decision units (8 subjects multiplied by 6 content types). The system performs a necessity determination for accompanying images. For process-type pages corresponding to subjects such as mathematics, physics, and chemistry, the system extracts high-precision flowchart / schematic diagram image types; for scene-type pages corresponding to subjects such as Chinese and history, the system extracts contextual illustration image types and simultaneously obtains the set image placement positions.
[0041] Step 503: Generate image description text based on image type, and call the image generation service to generate the target image.
[0042] For example, along Figure 5 The process on the right proceeds downwards, and the system enters the "Structured Prompt Generation" node. Based on the acquired image type, it extracts a preset template and generates image description text for calling the interface. Subsequently, the "High-Priority Filtering" node at the bottom organizes the queue. When the total number of images required exceeds the system's maximum image limit (e.g., no more than 6 images), the task with the highest accuracy level and strongest teaching relevance is prioritized and sent to the "Output Image Task (Upper Limit Constraint)" node. This calls the image generation service to generate the final target image data.
[0043] Step 504: Adjust the layout mode in the layout decision parameters according to the image placement position, and insert the target image into the corresponding presentation page in the target presentation according to the adjusted layout mode.
[0044] For example, when the system receives the aforementioned generated target image, it extracts the screen space size that the image placement will occupy. The system then updates the layout decision parameters based on the horizontal value of the occupied area, adjusting the original layout mode. Subsequently, the system inserts the target image into the corresponding presentation page of the target presentation strictly according to the adjusted layout mode.
[0045] As described above, the system uses a lookup table based on subject and content type to determine the image parameters, and then adjusts the text layout by calculating the screen width occupied by the image. This step first solves the problem that previous AI-generated free image selection often resulted in visually appealing images that did not conform to the rigor of scientific principles. Simultaneously, after inserting the image, the system proactively moves the text content to the side to ensure that the newly generated image never obscures the original text, achieving truly usable fully automated mixed text and image layout.
[0046] Please refer to Figure 10 In one embodiment of the present invention, after rendering and outputting the target presentation in step 104, steps 601 to 603 are further included: Step 601: Receive new image description text for the target image.
[0047] For example, in the front-end interactive interface after the target presentation is output, the user selects the target image that needs to be modified. Figure 10 As shown at the starting point of the process on the left, the system responds to the "user selects AI image" action; after executing "replay original prompt words" for reference, the user interface enters the "enter new prompt words" node, and the system receives and captures the new image description text as a redraw constraint.
[0048] Step 602: Based on the new image description text, call the image generation service to generate new image data, and replace the original position of the target image in the target presentation with the new image data.
[0049] For example, Figure 10 The processing chain on the right responds to the input and executes downwards. The system enters the "Call Image Generation Service" node, requesting the image service interface to generate new image data with the new image description text. Immediately afterwards, the system executes the "In-Situ Replacement + Real-Time Preview" node operation, using the cached original object size parameters to lock the rendering area boundary, and accurately replaces the new image data into the original coordinates of the target image in the target presentation.
[0050] Step 603: Write the new image description text as metadata into the corresponding image object property in the target presentation.
[0051] For example, after the view replacement is completed, the system executes... Figure 10 The "Hint Metadata Persistence Writing" process in the lower left corner involves formatting the new image description text, injecting it as metadata, and overwriting the corresponding image object properties in the target presentation, forming persistent parameters that are retained along with the document.
[0052] As described above, the system allows users to directly replace unsatisfactory images in their original positions by inputting new suggestions, and these suggestions are hardcoded into the underlying properties of the presentation file. This solves the pain point of traditional AI layout software where images cannot be modified once generated. Users can not only redraw parts of the image instantly, but also retrieve the original suggestions and continue to modify and iterate even if they reopen the file later.
[0053] Please refer to Figure 4 In one embodiment of the present invention, for the steps in claim 7, the method further includes steps 701 to 704: Step 701: For each outline page in the structured courseware outline, according to the preset keyword weight mapping rules, mark each outline page as one of the target cognitive levels among multiple preset cognitive levels.
[0054] For example, such as Figure 4 At the top, the system performs "page-by-page text aggregation" to extract the concatenated text containing the title, key points, and body. The text is then input into the "keyword weighted scoring" node in the middle. The system has a pre-built thesaurus of 59 weighted keywords and calculates a weighted score based on the six levels of "memory, understanding, application, analysis, evaluation, and creation" in the Bloom taxonomy. This score is then passed to the "level determination (1-6)" classification stage on the right, where the system explicitly marks the highest-scoring level. When multiple levels have the same score, the higher-level level is prioritized. When no keywords are matched, the system defaults to classifying it as the basic "understanding level" as the target cognitive level for that outline page.
[0055] Step 702: Calculate the proportion of higher-order cognitive levels in all outline pages based on the target cognitive level of each outline page, and generate a verification result based on whether the proportion reaches a preset threshold; higher-order cognitive levels are cognitive levels that are greater than the level threshold.
[0056] For example, Figure 4 The processing flow on the right proceeds downwards, entering the "Progression and Higher-Order Percentage" statistics node. The system iterates through all outline pages, counting the number of pages where the target cognitive level is determined to be a higher-order cognitive level such as "Analysis, Evaluation, Creation" (above the level threshold), and then calculates its percentage among all outline pages. The system verifies whether this percentage reaches the preset passing threshold of 25%. If it is greater than or equal to 25%, the system outputs a verification result with a status of "Pass" and comprehensive score data to the "Comprehensive Score and Suggestions" node on the left.
[0057] Step 703: Write the target cognitive level and verification result into the metadata field of the corresponding outline page in the structured courseware outline.
[0058] Step 704, after rendering and outputting the target presentation based on the structured courseware outline and layout decision parameters, includes: reading the target cognitive level and verification results from the metadata field, using the read target cognitive level and verification results as associated metadata of the target presentation, encapsulating the target presentation and its associated metadata into response data, and outputting the response data.
[0059] For example, the system along Figure 4 At the bottom left, the "Write Back Bloom Metadata" process is executed. The system writes the established target cognitive level and verification results into the metadata field of the corresponding outline page in the structured courseware outline. After the target presentation is rendered and output, the system extracts data from the metadata field, uses it as the associated metadata of the target presentation, performs a packetization operation, and finally outputs response data containing all verification parameter sequences.
[0060] As described above, a keyword weight matching algorithm assigns a cognitive tag to each page, and mandates that advanced content must comprise more than 25% of the entire curriculum. This transforms the difficult-to-assess teaching quality into concrete filtering indicators, enabling the system to automatically scan and block inferior syllabus data that merely focuses on basic definitions and simple listings. This overcomes the technical flaw of traditional content generation software, which often results in a flat and straightforward presentation, thus ensuring that the output courseware has a progressive logic in its content arrangement, moving from simple to complex.
[0061] Please refer to Figure 7 In one embodiment of the present invention, after rendering and outputting the target presentation in step 104, steps 801 to 804 are further included: Step 801: Receive partial refinement instructions for the target presentation page in the target presentation.
[0062] For example, when the target presentation has finished rendering and the front-end interface appears. Figure 7 As shown at the starting point of the operation, the user initiates a "user selects target page" event for a specific page, and the system interface then receives local refinement instructions from the user, such as "expand content" or "change the wording".
[0063] Step 802: Extract the text content of the target demo page and the adjacent demo pages adjacent to the target demo page, and combine the local fine-tuning instructions with the extracted text content to construct prompt words containing context constraints.
[0064] For example, system entry Figure 7 The "Extract Context from Previous and Next Pages" operation unit on the right allows the system to retrieve the text content of at least one page before and one page after the target demo page using an index. Then, it proceeds to the "Instruction Constraint Rewrite" node, where local refinement instructions are concatenated with the extracted text content to construct a prompt containing contextual constraints and complete logical boundaries between the preceding and following pages.
[0065] Step 803: Rewrite the text content of the target demo page by calling the large language model based on the prompt words containing context constraints, while keeping the non-text objects in the target demo page unchanged.
[0066] For example, after processing context-constrained prompts using a large language model, the system obtains the reconstructed target text data. During this overwrite process, the system only modifies the selected text fields, locking non-text objects such as the background layer and external images referenced by the target demo page to keep the non-text objects on the target demo page absolutely unchanged.
[0067] Step 804: Extract text quantification metrics from the rewritten target demo page and obtain updated layout decision parameters based on the mapping table. Use the updated layout decision parameters to re-render the target demo page.
[0068] For example, in Figure 7 After the logic on the right is completed, the processing steps move down to "Merge Text Fields" and pass the updated data to the "Re-cognition Load Assessment" processing box in the lower left corner. The system re-extracts text quantification indicators from the rewritten target demo page's text content and calculates updated layout decision parameters based on the mapping table. Finally, it enters the "Preview and Apply" node in the lower left corner, using the updated layout decision parameters to perform a localized, seamless re-render of the target demo page.
[0069] As described above, when a user wants to modify the content of a page, the system sends the text from the pages before and after it to the larger model for reference. After rewriting, only that page is reformatted. This allows users to streamline a section of text without having to completely regenerate the entire courseware. It not only reduces the time spent modifying a single page from one or two minutes to a dozen seconds, but also ensures that the newly rewritten text does not have logical breaks or layout errors with the pages before and after it.
[0070] Please refer to Figure 6 In one embodiment of the present invention, after obtaining the layout decision parameters matching the page density level based on the preset mapping table between density levels and layout parameters in step 103, the method further includes steps 901 to 902: Step 901: Parse and obtain grade information from the courseware generation request.
[0071] For example, during the parsing of courseware generation requests, the system extracts the feature tags of the target user and parses them to obtain grade information for a specific applicable scope.
[0072] Step 902: When the grade information belongs to the preset lower grade range, increase the font size of the body text, the font size of the title, and the line spacing in the layout decision parameters.
[0073] For example, when the typesetting queue is about to execute the configuration, the system verification program finds that the grade information belongs to the lower grade range (grades 1-3) in the system configuration table, and then proceeds... Figure 6 The "Grade Compensation / Image Compensation" branch in the lower right corner processes the layout decision parameters. The system extracts the acquired layout decision parameters, adjusts the body text size, title font size, and line spacing by a preset ratio, and finally outputs the overwritten layout decision parameters to suit the screen reading characteristics of young children.
[0074] As described above, after obtaining the standard layout parameters, if the system detects that the current courseware is designed for lower elementary school students, it will directly enlarge and replace the font size and line spacing. This ensures that when facing young children, the slides can automatically display larger fonts and wider spacing, thereby protecting children's eyesight and improving their reading clarity on the classroom projection screen.
[0075] Please refer to Figure 9 In another embodiment of the present invention, step 101 involves obtaining teaching materials from the courseware generation request, calling a large language model to perform content analysis on the teaching materials, and generating a structured courseware outline, including steps 1101 to 1102: Step 1101: During the content generation stage of calling the large language model, a courseware generation request is received, and a one-way push channel is established to send data packets in segments.
[0076] For example, combining Figure 9 The architecture shown depicts a system where the "API interface layer" receives courseware generation requests and simultaneously initiates the "streaming interaction layer" to establish a one-way push channel via the SSE (Server-Sent Events) event protocol. The system server then encapsulates the generated structured courseware outline into data packets according to node slices and sends them sequentially.
[0077] Step 1102: Maintain the receiving buffer queue, perform enqueue caching and integrity checks on incomplete data fragments, and proceed to the parsing and rendering operation after the checks are passed.
[0078] For example, the front-end maintains a receive buffer queue; it performs enqueue caching for incomplete data fragments caused by network jitter, and periodically checks the integrity of JSON text characters in the buffer in a separate thread. Only when the integrity check passes is the data removed from the buffer and allowed to enter the front-end for parsing and rendering.
[0079] As described above, the system employs a streaming network protocol to push the generated courseware data to the front-end browser segment by segment, and uses a buffer to reassemble any broken or garbled text caused by network jitter. This step solves the problem of the extremely long time required to generate a complete set of courseware from a large model, which would cause the user interface to freeze for an extended period. By generating, assembling, and displaying the courseware simultaneously, users can immediately see the content of the first page of courseware, significantly reducing their anxiety about waiting while using the system.
[0080] Please refer to Figure 8 In another embodiment of the present invention, after rendering and outputting the target presentation document according to the structured courseware outline and layout decision parameters in step 104, steps 1201 to 1202 are further included: Step 1201: After loading the target presentation on the front-end interface, record the scaling ratio of the current interface.
[0081] For example, combining Figure 8 During the browser editing interaction process, after the target presentation is loaded on the front-end interface ("Courseware rendering complete"), the system loads the "16:9 proportional canvas loading" module and records the scaling ratio of the interface under the current browser window.
[0082] Step 1202: Capture the displacement action of the page element, extract the device screen coordinate offset vector, divide it by the scaling ratio value to perform coordinate compensation mapping calculation, and overwrite the restored logical coordinates into the actual positioning attribute of the page element.
[0083] For example, when the system detects a "drag / zoom" displacement action on a page element, due to the difference between the device's actual resolution and the canvas's logical coordinates, the system calls the compensation calculation logic to extract the device screen coordinate offset vector and divide it by the recorded scaling ratio to perform a "coordinate compensation" mapping calculation. Finally, the compensated and restored clean logical coordinates are overwritten and updated into the actual positioning attribute of the page element.
[0084] As described above, the system specifically records the scaling ratio of the current courseware canvas in the browser. When a user drags an image or text within the courseware with the mouse, the system divides the actual physical movement of the mouse in pixels by the scaling ratio to deduce the component's true landing position. This step resolves the issue of inaccurate positioning and erratic movement of dragged elements when viewing courseware in a web page editor, ensuring accurate WYSIWYG layout operations.
[0085] Please refer to Figure 9 In another embodiment of the present invention, step 104, which involves rendering and outputting the target presentation document based on the structured courseware outline and layout decision parameters, further includes steps 1301 to 1302: Step 1301: Extract and bind the unique authorization identifier of the requesting user in the request context, and establish an association mapping constraint between the target resource entity and the unique authorization identifier.
[0086] For example, combining Figure 9 At the lowest level of the data processing layer, the system extracts and binds the unique authorization identifier ID of the requesting user from the initial request context. When the data persistence layer executes storage transactions, it establishes a strong association mapping constraint between the final output target presentation path, structured courseware outline configuration parameters, etc., and the unique authorization identifier ID.
[0087] Step 1302: When executing read / write commands for system data, a unique authorization identifier is forcibly embedded as a filter statement for permission comparison.
[0088] For example, the system database executes "asynchronous DB + user isolation" read and write logic. All subsequent data change and read call commands issued to this system are forcibly embedded at the database operation entry point as the highest level filter for permission comparison.
[0089] As described above, when saving courseware data to the database, the system forcibly binds it to the unique identity ID of the currently operating user, and uses this ID as a mandatory verification condition in all subsequent read operations. This step ensures complete isolation of each user's courseware data from the underlying database mechanism, completely eliminating the risk of database cross-access and privilege escalation when multiple users are online simultaneously, such as "user A accidentally viewing or overwriting user B's courseware."
[0090] In summary, the teaching courseware generation method and system provided in this application, by quantifying the text data volume and combining it with the subject type, transforms uncontrollable content characteristics into clear layout constraints, achieving precise algorithmic allocation and automatic avoidance of text and image layout. This solution not only completely solves the display defects of text crowding or large areas of blank space caused by simply applying static templates in the traditional way, but also constructs a fully automated courseware generation system that combines rigorous teaching logic with high availability at the engineering level by deeply integrating Bloom teaching structure verification, multimedia real-time overwrite generation, streaming network transmission, and front-end coordinate compensation technologies.
[0091] Please refer to Figure 12 The present invention also provides a teaching courseware generation system 1400, including a memory 1401, a processor 1402, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of a teaching courseware generation method as described above.
[0092] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for generating teaching courseware, characterized in that, include: Receive a courseware generation request, obtain teaching materials from the request, call a large language model to perform content analysis on the teaching materials, and generate a structured courseware outline; Extract the text quantification index of each outline page in the structured courseware outline, and determine the page density level of each outline page based on the comparison result of the text quantification index and the preset threshold. Based on a preset mapping table between density levels and layout parameters, obtain layout decision parameters that match the page density level; Based on the structured courseware outline and the layout decision parameters, render and output the target presentation.
2. The method for generating teaching courseware according to claim 1, characterized in that, The step of extracting text quantification indicators from each outline page in the structured courseware outline, and determining the page density level of each outline page based on the comparison results of the text quantification indicators with preset thresholds, includes: The number of key points, total number of characters, longest key point character count, and average key point character count contained in each outline page are counted as the text quantification indicators. The number of key points, total number of characters, number of characters in the longest key point, and number of characters in the average key point in the text quantification indicators are compared with their respective preset thresholds. Based on the comparison results of each text quantification indicator with the preset threshold, the page density level of each outline page is determined.
3. The method for generating teaching courseware according to claim 1, characterized in that, The method of obtaining layout decision parameters that match the page density level based on a preset mapping table between density levels and layout parameters includes: When the page density level is in the low density range, the first layout decision parameters are matched according to the mapping table. The body text size in the first layout decision parameters is a first preset value, the line spacing is a first preset spacing, and the layout mode is a center layout mode. When the page density level is in the high density range, the second layout decision parameters are matched according to the mapping table. The body text size in the second layout decision parameters is a second preset value, the line spacing is a second preset spacing, and the layout mode is a compact layout mode. Wherein, the first preset value is greater than the second preset value, and the first preset spacing is greater than the second preset spacing.
4. The method for generating teaching courseware according to claim 1, characterized in that, The process of generating a structured courseware outline also includes: The content of each outline page in the structured courseware outline is constrained based on preset single-page content constraints. The single-page content constraints include the upper limit of the number of key points per page and the upper limit of the number of characters per key point. If there are outline pages in the structured courseware outline that do not meet the single-page content constraints, then the outline pages that do not meet the single-page content constraints are split up, and new outline pages that meet the single-page content constraints are generated.
5. The method for generating teaching courseware according to claim 1, characterized in that, Before rendering and outputting the target presentation, the process also includes: Perform content type identification on each outline page in the structured courseware outline to obtain the page content type of each outline page; The subject type is obtained by parsing the courseware generation request. Based on the subject type and the page content type, a preset two-dimensional decision matrix is queried to determine whether each outline page needs to be accompanied by an image. If the determination result is that an image is required, the corresponding image type and image placement position are obtained. Generate image description text based on the image type, and call the image generation service to generate the target image; Adjust the layout mode in the layout decision parameters according to the image placement position, and insert the target image into the corresponding presentation page in the target presentation according to the adjusted layout mode.
6. The method for generating teaching courseware according to claim 5, characterized in that, After rendering and outputting the target presentation, the process also includes: Receive new image description text for the target image; Based on the new image description text, the image generation service is invoked to generate new image data, and the new image data replaces the original position of the target image in the target presentation. The new image description text is written as metadata into the image object attribute corresponding to the new image data in the target presentation.
7. The method for generating teaching courseware according to claim 1, characterized in that, Also includes: For each outline page in the structured courseware outline, according to the preset keyword weight mapping rules, each outline page is marked as a target cognitive level among multiple preset cognitive levels; The proportion of higher-order cognitive levels in all outline pages is calculated based on the target cognitive level of each outline page, and a verification result is generated based on whether the proportion reaches a preset threshold; the higher-order cognitive level is a cognitive level that is greater than the level threshold. Write the target cognitive level and the verification result into the metadata field of the corresponding outline page in the structured courseware outline; After rendering and outputting the target presentation based on the structured courseware outline and the layout decision parameters, the process includes: The target cognitive level and the verification result are read from the metadata field, and the read target cognitive level and the verification result are used as the associated metadata of the target presentation. The target presentation and its associated metadata are encapsulated into response data, and the response data is output.
8. The method for generating teaching courseware according to claim 1, characterized in that, After rendering and outputting the target presentation, the process also includes: Receive partial refinement instructions for the target presentation page in the target presentation document; Extract the text content of the target demo page and adjacent demo pages adjacent to the target demo page, and combine the local refinement instructions with the extracted text content to construct prompt words containing context constraints; Based on the context-constrained prompt words, the large language model is invoked to rewrite the text content of the target demo page, while keeping the non-text objects in the target demo page unchanged. The text quantification index is extracted from the text content of the rewritten target demo page, and the updated layout decision parameters are obtained based on the mapping table. The updated layout decision parameters are then used to re-render the target demo page.
9. A method for generating teaching courseware according to claim 1, characterized in that, After obtaining the layout decision parameters matching the page density level based on the preset mapping table between density levels and layout parameters, the method further includes: The grade information is obtained by parsing the courseware generation request; When the grade information belongs to the preset lower grade range, the font size of the body text, the font size of the title, and the line spacing in the layout decision parameters are increased.
10. A teaching courseware generation system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a teaching courseware generation method according to any one of claims 1 to 9.