A knowledge graph navigation-based joint decoding method and system for educational content generation

By employing pre-decoding coverage planning, dual-head joint decoding, and a pre-dependency backtracking mechanism, the problems of incomplete knowledge point coverage and logical consistency in teaching content generation are solved, achieving efficient and logically sound teaching content generation.

CN122154870APending Publication Date: 2026-06-05BEIJING PROSHINE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING PROSHINE TECH CO LTD
Filing Date
2026-03-31
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies lack a navigation and decoding paradigm based on course knowledge graphs in the generation of teaching content, resulting in incomplete coverage of knowledge points, disordered dependencies, and a lack of backtracking capabilities for prior dependencies, thus failing to ensure the logic and completeness of the teaching content.

Method used

The system employs pre-decoding coverage planning, dual-head joint decoding, and a prior dependency backtracking mechanism to generate teaching content through knowledge graph navigation in the educational curriculum. Pre-decoding planning generates a coverage planning sequence based on prior dependencies, dual-head joint decoding uses graph cursors to control teaching transitions, and the prior dependency backtracking mechanism automatically supplements any unexplained prior knowledge.

Benefits of technology

It achieves complete coverage and logical consistency of teaching content, reduces the computational resource consumption of the generation process, and improves the quality and efficiency of teaching content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application discloses a kind of education content generation-oriented navigation based on knowledge graph combined decoding method and system, belong to artificial intelligence and education technology cross field.This method contains three cooperative mechanisms: pre-decoding coverage planning, topological sorting is executed based on the front dependency relationship of education course knowledge graph and distributes teaching content generation length budget according to Bloom cognitive hierarchy;Double-head combined decoding, maintain graph cursor in autoregressive decoding, output teaching text and knowledge point teaching transition action by Token prediction head and navigation prediction head cooperation;Front dependency backtracking, when detecting that reference is not explained front knowledge, automatically pause and insert review explanation after recovery, simulate teacher immediate knowledge review.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of artificial intelligence and educational technology, specifically to "a joint decoding method and system based on knowledge graph navigation for educational content generation," which is an application of knowledge graph-guided automatic generation and constraint decoding technology for teaching content. Background Technology

[0002] With the development of intelligent education technology, the automatic generation of teaching content based on large language models has become a key requirement for educational informatization. In K-12 basic education, higher education, and vocational training, teaching content must strictly adhere to the prerequisite dependencies between knowledge points within the curriculum's knowledge system, ensuring that students possess the necessary prior knowledge before encountering new material. For example, in a mathematics course, before explaining "the graph and properties of quadratic functions," it is essential to ensure that students have mastered prerequisite knowledge such as "linear functions," "coordinate systems," and "completing the square." However, existing technologies suffer from the following fundamental shortcomings:

[0003] First, existing Retrieval Enhancement Generation (RAG) schemes only inject knowledge information on the input side, and the decoding process itself is not constrained by the course knowledge graph. This results in a lack of guarantee in terms of the completeness of knowledge coverage and the orderliness of teaching logic in the generated teaching content, often leading to problems such as omissions of knowledge points, disordered dependencies, or premature introduction of higher-level knowledge, which do not conform to the teaching principles.

[0004] Second, while recent graph-constrained decoding methods attempt to utilize knowledge graph topology for constraints during decoding, they are all geared towards knowledge-based question-and-answer scenarios rather than instructional content generation scenarios. Specifically: the DoG method (Lu W, Hou Y, et al. DoG: Decoding of Graphs for Knowledge-Grounded Dialogue. Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (ACL), 2023, pp.3974-3985) is geared towards knowledge-based question-and-answer dialogues; the GCR method (Luo L, Li Y, et al. Reasoning on Graphs: Faithful and Interpretable Large Language Model Reasoning. Proceedings of the 12th International Conference on Learning Representations (ICLR), 2024) is geared towards reasoning path generation. These methods do not address the topological sorting of prerequisite dependencies based on the curriculum knowledge system, the differentiated instructional content length allocation based on Bloom's hierarchy of knowledge, or the dynamic backtracking ability to simulate immediate teacher review when encountering unexplained prerequisite knowledge in educational scenarios.

[0005] Third, the industry lacks a graph navigation and decoding paradigm specifically designed for educational content generation, with the ability to plan course knowledge coverage and trace back prior dependencies. Existing solutions cannot continuously navigate the course knowledge graph throughout the entire decoding process of teaching content generation, and lack the ability to plan knowledge points according to teaching logic and the ability to automatically review prior knowledge that has not been explained. Summary of the Invention

[0006] This invention addresses the following key technical issues: (1) How to automatically generate a coverage planning sequence based on the prerequisite dependencies of the educational course knowledge graph before decoding the teaching content of the large language model, so as to ensure that the generated teaching content fully covers the target knowledge range and follows the correct knowledge learning order; (2) How to maintain the course knowledge graph cursor during the autoregressive decoding process and realize the joint control of teaching text generation and knowledge point teaching transition through a dual-head architecture; (3) How to automatically trigger backtracking when a reference to unexplained prerequisite knowledge is detected during the generation of teaching content, simulating the instant knowledge review in the teacher's lecture.

[0007] This invention proposes a joint decoding method for coverage planning and backtracking navigation for educational content generation. Unlike existing graph constraint decoding methods that only utilize graph topology to filter invalid tokens in question-and-answer scenarios, this method is specifically designed for educational scenarios and includes three collaborative mechanisms: pre-decoding coverage planning, dual-head joint decoding, and pre-dependency backtracking. These three mechanisms work together to support the controlled generation of teaching content based on course knowledge graph navigation.

[0008] (a) Pre-decoding Coverage Planning. Before the decoding of instructional content begins, based on the target set of instructional knowledge points K_target, a prerequisite dependency-aware topological sorting based on prerequisite relationships is performed on the educational curriculum knowledge graph to generate a coverage planning sequence Plan = [k_π(1), k_π(2), ..., k_π(n)], such that for any knowledge point k_π(i), all prerequisite nodes of prerequisite types in the curriculum knowledge graph are placed before the sequence position π(i). The coverage planner also allocates an instructional content generation length budget budget(k_i) for each knowledge point based on its importance weight, difficulty level, and Bloom cognitive level. Knowledge points with higher Bloom cognitive levels (such as "analysis", "evaluation", and "creation") receive more generation length budgets through the difficulty attribute to support more comprehensive instructional development. This planning sequence serves as a macro-level navigation blueprint for the instructional content decoding process.

[0009] (b) Dual-head joint decoding and graph cursor. During the decoding process, a graph cursor is maintained, pointing to the currently being explained knowledge node. At each time step t, the last hidden state h_t of the model is simultaneously fed into the Token prediction head (outputting vocabulary probabilities to generate teaching text) and the navigation prediction head (outputting graph action probabilities to control the teaching transition between knowledge points). The navigation action space includes: STAY (staying at the current knowledge point to continue the explanation), ADVANCE (moving to the next knowledge point according to the coverage plan to start a new teaching segment), BRIDGE(e_j) (jumping along the non-planned edge to the related knowledge point to establish a cross-knowledge point teaching association), and COMPLETE (marking that the current knowledge point has been fully explained). After the cursor moves, the graph embedding of the target knowledge node is fused into the next hidden state through a gating mechanism: h'_t = h_t + σ(W_g · [h_t; v_cursor; e_plan_progress]) ⊙ W_v · v_cursor.

[0010] Here, e_plan_progress is the coverage planning progress encoding vector, enabling the model to perceive which stage of the teaching planning sequence it is currently in. Specifically, e_plan_progress uses a learnable positional embedding method to encode the sequence number of the currently completed teaching planning step into an embedding vector of fixed dimensions (the same as the hidden state dimension d_model). This embedding matrix is ​​updated through backpropagation during training.

[0011] Regarding the network structure of the navigation prediction head: The navigation prediction head consists of two fully connected layers. The first layer maps the hidden state h_t from the d_model dimension to the d_model / 2 dimension and performs ReLU activation and Dropout (with a rate of 0.1). The second layer maps the d_model / 2 dimension to the action space dimension (4 + |E_bridge|, where |E_bridge| is the number of bridge edges reachable from the current knowledge node) and outputs the action probability distribution after Softmax normalization. The token prediction head reuses the original language model head (LM Head) of the large language model without any additional modifications.

[0012] Regarding the acquisition method of the graph embedding vector: The graph embedding vector v_cursor obtains its initial embedding by pre-training a TransE model on the educational course knowledge graph. The embedding dimension is set to be the same as the hidden state dimension d_model of the large language model (4096 dimensions in LLAMA-2-7B). During the joint fine-tuning phase, this embedding matrix participates in end-to-end training and is further updated through backpropagation to adapt to the joint decoding task in the educational scenario. To reduce GPU memory usage, the system adopts an embedding caching strategy: at the start of each teaching content generation task, only the embeddings of the knowledge points involved in the current coverage planning sequence and their first-order neighbor node embeddings are preloaded into the GPU memory, and the embeddings of other nodes are dynamically loaded from CPU memory as needed.

[0013] (c) Pre-dependency backtracking mechanism. If the navigation head predicts that a pre-existing knowledge point k_pre that has not yet been explained needs to be referenced during the decoding process, the system triggers a backtracking operation: pausing the generation of the current teaching content, inserting a brief review and explanation of k_pre (the backtracking depth is limited by max_backtrack_depth), and resuming the main teaching after the review is completed. This mechanism simulates the teaching strategy of an experienced teacher who, when discovering that a student lacks certain pre-existing knowledge, pauses the current content, briefly reviews it, and then continues. The backtracking decision is triggered by the following condition: Backtrack(k_pre) iff ref_score(h_t, k_pre) > θ_ref AND covered(k_pre) = false.

[0014] Where ref_score(h_t, k_pre) = cos(W_ref · h_t, v_{k_pre}), W_ref is the learnable projection matrix (dimension d_model × d_model), and v_{k_pre} is the graph embedding vector of the prior knowledge point k_pre. ref_score measures the strength of the current hidden state's intention to reference the prior knowledge point.

[0015] Regarding the model training method: The dual-head joint decoder adopts a two-stage training strategy. The first stage is the pre-training alignment stage, where the LLM backbone parameters are frozen, and only the navigation prediction head (including the parameters of two fully connected network layers and the graph embedding matrix) is trained. The teaching traversal sequence of knowledge points labeled by the teacher is used as the supervision signal, and the loss function is the cross-entropy loss of the navigation action L_nav = -Σlog P(a_t|h_t). The second stage is the joint fine-tuning stage, where the LLM backbone parameters are unfrozen, and end-to-end training is performed using the dual-head joint loss L_joint = L_token + λ_nav·L_nav + λ_cover·L_cover, where L_token is the standard language model loss, L_cover is the teaching coverage planning completion loss (defined as the binary cross-entropy of the proportion of uncovered knowledge points), and λ_nav=0.3 and λ_cover=0.1 are the balance coefficients.

[0016] Regarding the boundary conditions of the backtracking mechanism: the `max_backtrack_depth` parameter is set to 2 by default, meaning a maximum of two levels of nested backtracking is allowed (backtracking is triggered again during the backtracking explanation). When the backtracking depth reaches the upper limit, the system adopts a degradation strategy: it stops recursively backtracking, instead inserting a brief prompt about the missing prerequisite knowledge at the current position (such as "For details about XX, please refer to the previous chapter") and continues generating the main teaching content. The backtracking text generation strategy is as follows: it uses a high-temperature (τ=1.5), low-derivation-steps (g=1) summary decoding parameter, and the generation length is limited to 30% of the budget for equivalent knowledge points in the main line, to ensure that the review content is concise and does not affect the rhythm of the main teaching. The return of multi-level nested backtracking uses stack management: each time backtracking is triggered, the current cursor position and generation state are pushed onto the stack, and the stack is popped after the backtracking is completed to restore the correct main teaching position.

[0017] Regarding the construction method of the educational curriculum knowledge graph: The complete schema definition of the educational curriculum knowledge graph G=(V,E,A) is as follows. Node types include: Subject (subject nodes, such as "Mathematics" and "Physics"), Unit (unit nodes, such as "Quadratic Function" and "Force and Motion"), KnowledgePoint (knowledge point nodes, such as "Completing the Square" and "Newton's Second Law"), Concept (concept nodes, such as "Axis of Symmetry" and "Acceleration"), and Formula (formula nodes, such as "Vertex Coordinate Formula" and "F=ma"). Edge types include: prerequisite (prerequisite dependency, representing the order in which knowledge points are learned), contains (containment relationship, representing the hierarchical affiliation of subject-unit-knowledge point), related_to (association relationship, representing the horizontal connection between knowledge points), instantiate (instantiation relationship, representing the concretization of concepts and formulas), and equivalent (equivalence relationship, representing the same knowledge in different forms). The attribute set A includes: difficulty∈[1,5] (difficulty level, corresponding to the level of requirements in the curriculum standards), importance∈[0,1] (importance weight, reflecting the weight in the examination syllabus and teaching syllabus), bloom_level∈{Memory, Comprehension, Application, Analysis, Evaluation, Creation} (Bloom's cognitive levels), typical_duration (typical teaching duration, in minutes), and grade_range (applicable grade range, such as "Grade 8 to Grade 10").

[0018] The knowledge graph is constructed semi-automatically: First, education experts manually create a skeleton graph of knowledge point nodes and their prerequisite relationships based on national curriculum standards and teaching syllabi; then, a large language model is used to extract concept nodes, formula nodes, and relationships such as `related_to` and `instantiate` from the textbook text, which are then merged into the skeleton graph after review by education experts; finally, constraint verification using a graph database ensures that the graph is acyclic (prerequisite relationships form a directed acyclic graph) and has no isolated nodes. The knowledge graph is stored in the Neo4j graph database and accessed using the Cypher query language.

[0019] The key technical features that distinguish this invention from the closest prior art, DoG (Lu et al., ACL 2023), are: (1) pre-decoding coverage planning mechanism – DoG does not have the ability to plan coverage based on pre-course dependencies before decoding; (2) STAY / ADVANCE / BRIDGE / COMPLETE multi-action space of the navigation prediction head – DoG only has a simple graph topology filtering mechanism and does not have multi-action control for teaching transitions; (3) stack-managed pre-dependency backtracking mechanism – DoG does not have the backtracking ability to simulate the teacher's immediate knowledge review. The technical problem that these key technical features address together is how to ensure that the teaching content fully covers the target knowledge range and follows the correct knowledge learning order while maintaining the fluency of the teaching text, and automatically supplement the pre-knowledge review when needed. There is a synergistic effect among coverage planning, dual-head joint decoding, and pre-dependency backtracking – the coverage planning sequence provides a teaching navigation blueprint for the navigation prediction head, and the navigation prediction head provides a basis for citation intent detection for the backtracking mechanism – the combination of the three produces an effect that exceeds the sum of their individual contributions (ablation experiments verified, see the detailed implementation section). Beneficial effects

[0020] The technical solution provided by this invention has the following beneficial effects in the field of educational content generation:

[0021] (1) Coverage planning determines the teaching content generation path in one go through the topological sorting based on the course knowledge system in the pre-decoding stage, avoiding invalid exploration and repeated generation in the decoding process. Under the same teaching text length constraint, the average number of decoding steps is reduced by about 18% compared with the system without coverage planning (from an average of 4,120 steps to 3,378 steps), and the corresponding GPU inference time is reduced from an average of 12.3 seconds to 10.1 seconds (NVIDIA A100 40GB environment, batch_size=1), which reduces the consumption of server-side GPU computing resources in the scenario of batch generation of educational content.

[0022] (2) The pre-dependency backtracking mechanism simulates the teacher's real-time knowledge review during lectures, detects references to unexplained pre-knowledge in the teaching text in real time, and automatically inserts brief reviews. The backtracking mechanism replaces full text regeneration with stack-style targeted supplementation. In scenarios where pre-knowledge review needs to be supplemented, the computational cost of backtracking text is only about 35% of that of full text regeneration, which significantly reduces the GPU computing load of the server cluster in scenarios of batch generation of teaching content.

[0023] (3) In the prototype system experimental verification (experimental environment: NVIDIA A100 40GB GPU×1, base model LLaMA-2-7B, educational curriculum knowledge graph stored in Neo4j 5.x), the coverage planning-backtracking navigation joint decoding for K12 mathematics courses achieved a knowledge coverage rate of 98.3% (confidence interval of 97.1% to 99.2%), a prerequisite dependency violation rate of less than 0.5% (mean 0.31%), and a teaching content quality assessment (evaluated by senior mathematics teachers on a 5-point scale) of 3.81±0.28 points. Detailed experimental data can be found in the specific implementation section. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the overall process of the method of the present invention. It shows the complete process from constructing a knowledge graph (S1), pre-decoding coverage planning (S2), dual-head joint decoding (S3), pre-dependency backtracking (S4) to outputting teaching content text, including reference detection and judgment and backtracking loop.

[0025] Figure 2 This is a flowchart illustrating the coverage planning-backtracking navigation joint decoding method. The data flow of the three collaborative mechanisms—pre-decoding coverage planning (topology sorting, length budget allocation), dual-head joint decoding (cooperative work of the token header and navigation header), and pre-dependent backtracking (stack pushing, backtracking generation, and stack popping recovery)—is shown in a three-column parallel structure.

[0026] Figure 3 This is a schematic diagram of the system architecture of the present invention. It shows three core modules: the teaching coverage planning engine, the dual-head joint decoding engine, and the pre-dependency backtracking controller, as well as the interaction between the inter-module communication bus and the data layer (the Neo4j knowledge graph database for educational courses and the GPU memory embedded cache).

[0027] Figure 4 This is a schematic diagram of an educational course knowledge graph. It shows the complete definitions of 5 node types (Subject, Unit, KnowledgePoint, Concept, Formula), 5 edge types (prerequisite, contains, related_to, instantiate, equivalent), and attribute set A (difficulty, importance, bloom_level, etc.).

[0028] Figure 5 This is a schematic diagram of a dual-head joint decoder structure. It shows the process of the LLM backbone output being split into the Token prediction head and the navigation prediction head after the last hidden state h_t, and the fusion of the graph embedding v_cursor and the coverage planning progress encoding e_plan_progress through a gating mechanism.

[0029] Figure 6 This diagram illustrates the state transitions of the backtracking stack for pre-dependent dependencies. It shows the complete state transition loop starting from the main teaching generation state, through reference intent detection, backtracking depth determination, pushing and saving the cursor state onto the stack, generating review text, and popping from the stack to restore the cursor. Detailed Implementation

[0030] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0031] like Figure 3 As shown, the system for generating educational content in this invention includes: a teaching coverage planning engine, a dual-head joint decoding engine, and a pre-dependency backtracking controller. The teaching coverage planning engine is responsible for performing topological sorting and teaching length budget allocation based on the educational curriculum knowledge graph before decoding; the dual-head joint decoding engine is responsible for maintaining the graph cursor during decoding and collaboratively outputting teaching text tokens and knowledge point teaching transition actions through a dual-head architecture; the pre-dependency backtracking controller is responsible for detecting referencing intents and managing the backtracking stack. Modules communicate through a unified message bus to transmit coverage planning sequences, cursor state updates, and backtracking trigger signals. The data layer includes an educational curriculum knowledge graph database (Neo4j 5.x) and an embedded cache (PyTorch Tensor cache within GPU memory).

[0032] Experimental Environment and Hyperparameter Settings: The experiments of this invention are based on the LLaMA-2-7B pedestal model (hidden state dimension d_model=4096, number of attention heads=32, number of layers=32), and are conducted on an NVIDIA A100 40GB GPU. The educational curriculum knowledge graph contains 120 knowledge points and 328 pre-dependencies in the K12 mathematics curriculum. The training dataset contains 200 texts explaining the knowledge points written by experienced mathematics teachers (each text has an average of approximately 3200 tokens). The annotation process for the training data is as follows: (a) Three teachers with more than 5 years of K12 mathematics teaching experience independently annotated the knowledge point traversal sequence and navigation action sequence of each teaching text, with an annotation consistency (Cohen's Kappa coefficient) of 0.82; (b) For samples with inconsistent annotations, a fourth senior teacher made the final decision; (c) The annotation specifications for navigation actions are: ADVANCE when a knowledge point first appears, STAY when the knowledge point is explained in detail, BRIDGE when referencing cross-knowledge point associations, and COMPLETE when the knowledge point is explained. The dataset was divided into a training set (140 texts), a validation set (30 texts), and a test set (30 texts) in a ratio of 7:1.5:1.5 to ensure that the coverage ratio of knowledge points and prerequisite dependencies in each set is similar after the division.

[0033] Training hyperparameters: First stage training epoch=10, learning rate 1e-4, optimizer Adam, batch_size=4; Second stage joint fine-tuning epoch=5, learning rate 5e-5, optimizer AdamW (weight_decay=0.01), batch_size=2, λ_nav=0.3, λ_cover=0.1. Backtracking trigger threshold θ_ref=0.65 (selected by grid search [0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8] on the teacher-annotated validation set, max_backtrack_depth=2. Gated fusion parameter matrix W_g has dimensions of d_model × (3·d_model) (due to concatenation of three d_model dimension vectors: h_t, v_cursor, and e_plan_progress), and W_v has dimensions of d_model × d_model, both initialized uniformly using Xavier.

[0034] The complete operation flow of the system of this invention is as follows: Step 1, receive a request to generate teaching content. The request parameters include the target set of teaching knowledge points and the length constraint of the teaching text. Step 2, the teaching coverage planning engine performs topological sorting (using the Kahn algorithm) based on the target set of knowledge points and the prerequisite dependencies in the knowledge graph of the educational course, generates a coverage planning sequence Plan=[k1,k2,...,kn], and allocates a teaching content generation length budget for each knowledge point according to the importance, difficulty and Bloom's hierarchy of knowledge. Step 3, the joint decoding engine initializes the graph cursor, embeds the knowledge nodes involved in the coverage planning sequence into the GPU memory cache, and starts the dual-head decoding process. The token prediction head generates the teaching text, and the navigation prediction head controls the teaching transition between knowledge points. Each time the cursor moves, the hidden state is updated through a gating mechanism based on the graph embedding of the target knowledge node. Step 4, if the teaching text is detected to reference a prerequisite knowledge point that has not yet been explained and the reference intent exceeds the threshold during the decoding process, backtracking is triggered, the main teaching is paused and a brief review is inserted. After completion, the stack is popped and the main line continues to be generated. Step 5, the generated teaching content is returned through the API interface.

[0035] Step 1: The teacher or teaching system issues a generation request (target teaching knowledge point: quadratic function / vertex coordinates, generation length constraint: 3000 tokens).

[0036] Step Two: The instructional coverage planning engine queries the educational curriculum knowledge graph and finds that the prerequisite dependency chain for "vertex coordinates" is: linear function → coordinate system basics → quadratic function concept → completing the square → vertex coordinates. The planner performs topological sorting to generate a coverage plan: Plan = [Review of completing the square → Derivation of vertex coordinate formula → Application of vertex coordinates]. Each knowledge point receives a corresponding instructional length budget based on its importance, difficulty, and Bloom's cognitive level. Among them, "Derivation of vertex coordinate formula" receives a larger generation budget because its Bloom level is "understanding" and difficulty = 3.

[0037] Step 3: The joint decoding engine starts, and the cursor is initialized at the [Quadratic Function] node. During the generation of teaching text, the navigation head advances to each target knowledge point sequentially according to the coverage plan. After each advance, the graph of the target knowledge node is embedded into the hidden state through gating, and the coverage plan progress encoding is updated simultaneously. The token prediction head generates the teaching explanation text for the corresponding knowledge point based on the fused hidden state.

[0038] Step 4: When the teaching text reaches the "Vertex Coordinate Formula Derivation" stage, the model attempts to use the "Perfect Square Formula" to derive the vertex coordinate formula, but detects that ref_score([Perfect Square Formula]) = 0.78 > θ_ref = 0.65 and covered([Perfect Square Formula]) = false. The system triggers a backtracking: pausing the main teaching, pushing the current cursor position and generation state onto the stack, jumping the cursor to the [Perfect Square Formula] node, and generating a brief review text using the generalized decoding parameters (e.g., "Review: The Perfect Square Formula (a±b)² = a²±2ab+b², it is the basic tool for transforming quadratic expressions into perfect square forms"). After the review is complete, pop the stack, restore the cursor to its original position, and continue generating the main teaching.

[0039] This invention's method is applicable to the generation of educational content across different disciplines. Taking K-12 physics as an example: the target teaching knowledge point is "Newton's Second Law," and the prerequisite dependency chain in the educational curriculum knowledge graph is: the concept of force → mass and inertia → Newton's First Law → acceleration → Newton's Second Law. The coverage planning engine automatically generates a teaching plan sequence arranged according to the prerequisite dependencies. The joint decoding engine generates the teaching explanation content for each knowledge point sequentially according to the planning sequence, and the navigation head controls the depth of the teaching content development and the timing of teaching transitions between knowledge points. If, during the generation process, explaining "F=ma" requires referencing the previously unexplained concept of "vector decomposition," the backtracking mechanism automatically inserts a brief review before resuming the main teaching thread.

[0040] This invention's method is also applicable to higher education scenarios. Taking a university linear algebra course as an example: the target teaching knowledge point is "eigenvalue decomposition," and the prerequisite dependency chain is: matrix multiplication → determinant → characteristic equation → eigenvalue → eigenvector → eigenvalue decomposition. The Bloom cognitive level of each knowledge point in the knowledge graph has a wider span (from matrix multiplication at the "memory" level to eigenvalue decomposition at the "analysis" level). The coverage planning engine allocates the teaching generation length budget differently accordingly, allowing higher cognitive level knowledge points to have more ample space for teaching development.

[0041] To verify the individual contributions and combined effects of the three synergistic mechanisms in educational content generation, an ablation experiment was conducted on a K-12 mathematics curriculum test set (30 teaching texts). Knowledge coverage was defined as the proportion of target knowledge points actually covered in the generated teaching texts to the total number of target knowledge points (calculated by the number of knowledge points). The logical consistency of the teaching content was assessed by three experienced mathematics teachers on a 5-point scale (5 points for complete adherence to teaching logic, 1 point for serious violation of teaching logic). The results are as follows:

[0042] (a) Complete system (coverage planning + dual-head decoding + backtracking): knowledge coverage rate 98.3%, prerequisite dependency violation rate 0.31%, teaching logic score 3.81±0.28.

[0043] (b) Removal of coverage planning (dual-head decoding + backtracking only): knowledge coverage rate 89.2%, prerequisite dependency violation rate 2.1%, teaching logic score 3.24±0.41.

[0044] (c) Removal of backtracking mechanism (coverage planning + dual-head decoding): knowledge coverage rate 95.6%, prerequisite dependency violation rate 1.8%, teaching logic score 3.52±0.35.

[0045] (d) Removal of dual-head decoding (coverage planning + standard decoding + backtracking): knowledge coverage rate 91.7%, prerequisite dependency violation rate 3.4%, teaching logic score 3.15±0.39.

[0046] (e) Baseline scheme comparison – Direct generation without coverage planning: coverage rate 72.4%, violation rate 8.7%, teaching logic score 2.63±0.52; Standard RAG scheme: coverage rate 81.6%, violation rate 5.2%, teaching logic score 2.91±0.45; DoG graph constraint decoding scheme: coverage rate 85.1%, violation rate 3.8%, teaching logic score 3.08±0.42.

[0047] Ablation experiments showed that each of the three mechanisms significantly contributed to the quality of educational content generation, and the performance of the complete system was superior to the simple sum of any two mechanisms, verifying the synergistic effect among the three. Coverage planning improved the logicality score of instructional content arrangement from 2.63±0.52 in the baseline scheme to 3.81±0.28 (an improvement of 44.9%, p<0.001 in paired t-test).

[0048] Before practical application, the educational content generated by this invention should undergo the following quality assurance process: (a) at the system level, confirm that all target knowledge points have been covered through a coverage planning completion check; (b) at the content level, perform automated knowledge point accuracy verification on the generated teaching text, including formula correctness checks and concept definition consistency checks; (c) at the application level, it is recommended that the content be reviewed and confirmed by teachers before being put into teaching to ensure that the generated content meets the requirements of the teaching syllabus and students' cognitive level. This invention aims to assist teachers in improving the efficiency of teaching content preparation and does not replace teachers' professional judgment.

Claims

1. A joint decoding method and system based on knowledge graph navigation for educational content generation, wherein the method runs on a computer system including a processor and a GPU-accelerated computing unit, and is implemented by the processor executing program instructions on a storage medium, for automatically generating teaching content text following the pre-dependency order of knowledge points based on an educational curriculum knowledge graph, characterized in that, Includes the following steps: S1: Construct an educational curriculum knowledge graph G=(V,E,A), where V is a set of nodes, including subject nodes, unit nodes, knowledge point nodes, concept nodes, and formula nodes; E is a set of edges, including prerequisite edges representing the learning order of knowledge points; and A is a set of attributes, including knowledge point difficulty level, importance weight, and Bloom's hierarchy of knowledge attributes. The knowledge graph is stored in a graph database and the node embedding vectors are frequently accessed through GPU memory caching. S2: Pre-decoding Coverage Planning - Based on the target set of teaching knowledge points, perform a prerequisite dependency-aware topological sorting based on prerequisite relationships on the knowledge graph of the educational courses to generate a coverage planning sequence Plan = [k_π(1), k_π(2), ..., k_π(n)], so that all prerequisite dependent knowledge points of any knowledge point in the sequence are placed before that knowledge point, and generate a length budget by allocating teaching content to each knowledge point according to the importance weight, difficulty level and Bloom's hierarchy of knowledge points; S3: Dual-head joint decoding—During the autoregressive decoding process of the large language model, a graph cursor is maintained pointing to the currently explained knowledge node. At each decoding time step, the last hidden state h_t of the model is simultaneously fed into the Token prediction head and the navigation prediction head. The Token prediction head outputs a vocabulary probability distribution to generate teaching text, and the navigation prediction head outputs graph action probabilities to control the teaching transition between knowledge points. After the cursor moves, the graph embedding and coverage planning progress encoding of the target knowledge node are fused into the next hidden state through a gating mechanism. S4: Pre-dependency backtracking - If, during the decoding process, it is detected that the teaching text references a pre-existing knowledge point that has not yet been explained and the intensity of the reference intent exceeds a preset threshold, the generation of the current teaching content is paused, the current cursor position and generation state are pushed onto the backtracking stack, and a brief summary of the pre-existing knowledge point is inserted. After the review is completed, the stack is popped back to its original position and generation continues, simulating the teacher's real-time knowledge review during lectures.

2. The method according to claim 1, characterized in that, The action space of the navigation prediction head in step S3 includes four types of teaching transition actions: STAY is used to continue the explanation of the current knowledge point; ADVANCE is used to advance to the next target knowledge point according to the coverage planning sequence to start a new teaching segment; BRIDGE(e_j) is used to jump to the related knowledge point along the non-planning edge to establish a cross-knowledge point teaching association; and COMPLETE is used to mark that the current knowledge point has been fully explained.

3. The method according to claim 1, characterized in that, In step S3, the gating fusion formula is h'_t = h_t + σ(W_g·[h_t;v_cursor;e_plan_progress]) ⊙ W_v·v_cursor, where v_cursor is the graph embedding vector of the knowledge node pointed to by the current cursor, e_plan_progress is the coverage planning progress encoding vector, σ is the sigmoid activation function, ⊙ is element-wise multiplication, and W_g and W_v are learnable parameter matrices.

4. The method according to claim 1, characterized in that, In step S4, the backtracking trigger condition is ref_score(h_t, k_pre) > θ_ref and covered(k_pre) = false. Here, ref_score measures the strength of the reference intention of the current hidden state h_t to the preceding knowledge point k_pre, θ_ref is the preset reference intention threshold, and covered(k_pre) is the explained state mark of knowledge point k_pre. The backtracking depth is limited by the max_backtrack_depth parameter. When the backtracking depth reaches the upper limit, a degradation strategy is adopted, inserting a brief prompt for the missing preceding knowledge at the current position and continuing the generation of main teaching content.

5. The method according to claim 4, characterized in that, The multi-layered nested backtracking uses a stack-based management system. Each time backtracking is triggered, the current graph cursor position and generation state are pushed onto the stack. After backtracking is completed, the stack is popped to restore the original state, ensuring that the correct main teaching position is returned. The generation of the backtracking text uses a high-temperature, low-derivation-step summary decoding parameter. The generation length is limited to a preset proportion of the budget for equivalent knowledge points in the main teaching line, ensuring that the review content is concise and does not affect the pace of the main teaching line.

6. The method according to claim 1, characterized in that, The dual-head joint decoder employs a two-stage training strategy: the first stage is the pre-training alignment stage, where the backbone parameters of the large language model are frozen, and only the navigation prediction head is trained. The teaching traversal sequence of knowledge points annotated by the teacher is used as the supervision signal, and the loss function is the cross-entropy loss of the navigation action. The second stage is the joint fine-tuning stage, where the backbone parameters of the large language model are unfrozen, and end-to-end training is performed using the joint loss L_joint = L_token + λ_nav·L_nav + λ_cover·L_cover, where L_token is the standard language model loss, L_nav is the cross-entropy loss of the navigation action, and L_cover is the teaching content coverage planning completion loss.

7. The method according to claim 1, characterized in that, In step S2, the allocation formula for the teaching content generation length budget is budget(k_i) = L_total · (w_imp · importance(k_i) + w_diff · difficulty(k_i)) / Σ_j(w_imp · importance(k_j) + w_diff · difficulty(k_j)), where L_total is the total teaching text length constraint, importance(k_i) and difficulty(k_i) are the importance weight and difficulty level attribute value of knowledge point k_i in the educational course knowledge graph, respectively, and w_imp and w_diff are weighting coefficients; knowledge points with high Bloom cognitive levels obtain more generation length budget through the difficulty attribute.

8. The method according to claim 4, characterized in that, The ref_score referencing intent strength is calculated as ref_score(h_t, k_pre) = cos(W_ref · h_t, v_{k_pre}), where W_ref is the learnable projection matrix, v_{k_pre} is the graph embedding vector of the prior knowledge point k_pre, and the θ_ref threshold is determined by maximizing the F1-score on the teacher-annotated validation set.

9. A joint decoding system based on knowledge graph navigation for educational content generation, the system comprising a processor, a GPU-accelerated computing unit, and a memory, wherein the memory stores a computer program, and the processor, when executing the computer program, implements the following functional modules, characterized in that, include: The teaching coverage planning engine is used to perform a prerequisite dependency-aware topological sorting based on prerequisite relationships on the educational course knowledge graph before decoding starts, according to the target set of teaching knowledge points. It generates a coverage planning sequence and allocates teaching content according to the importance, difficulty and Bloom's cognitive level to generate a length budget. The teaching coverage planning engine obtains the course topology information of the knowledge graph through the graph database query interface. A dual-head joint decoding engine is used to maintain a graph cursor during the autoregressive decoding process of a large language model. It outputs teaching text tokens and knowledge point teaching transition actions in collaboration with the Token prediction head and the navigation prediction head. After the cursor moves, the knowledge node embedding and coverage planning progress encoding are integrated into the hidden state through a gating mechanism. The dual-head joint decoding engine obtains the knowledge node embedding through the embedding cache module in the GPU memory. The pre-dependency backtracking controller is used to detect whether the intention to reference unexplained pre-knowledge points during the generation of teaching text exceeds a preset threshold. If it does, a backtracking operation is triggered, and backtracking and recovery are controlled by a stack-based management system. The inter-module communication bus is used to connect the teaching coverage planning engine, the dual-head joint decoding engine, and the front-end dependency backtracking controller, and to transmit the coverage planning sequence, cursor status, and backtracking signals.

10. A joint decoding device based on knowledge graph navigation for educational content generation, characterized in that, include: The instructional coverage planning unit is used to perform a pre-dependency-aware topological sorting on the educational curriculum knowledge graph based on the target set of teaching knowledge points, generate a coverage planning sequence, and allocate a length budget for the teaching content generated for each knowledge point. The dual-head joint decoding unit is used to maintain the graph cursor during the autoregressive decoding process. It outputs teaching text and knowledge point teaching transition actions in collaboration with the Token prediction head and the navigation prediction head, and integrates knowledge node embedding through a gating mechanism. The pre-dependency backtracking unit is used to detect the intention of the teaching text to reference pre-knowledge and to trigger and control the backtracking operation through stack-based management; An embedded caching unit is used to cache the embedding vectors of frequently accessed educational course knowledge graph nodes in GPU memory to reduce graph embedding query latency.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.