An education content generation-oriented knowledge graph joint decoding method and system based on coverage planning backtracking navigation
By using the combined decoding method of coverage planning and backtracking navigation, the problems of incomplete knowledge point coverage and logical consistency in the generation of educational content are solved, achieving complete coverage and improved logic of teaching content, while reducing the consumption of computing resources and the number of manual corrections.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING PROSHINE TECH CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies cannot effectively ensure that teaching content fully covers the target knowledge range and follows the correct teaching and cognitive sequence in the generation of educational content. They lack the navigation and backtracking capabilities for prior dependencies, resulting in omissions of knowledge points or confusion of prior dependencies.
A joint decoding method of coverage planning and backtracking navigation is adopted. The teaching coverage planning sequence is generated by pre-decoding the coverage planning. Combined with dual-head joint decoding and pre-dependency backtracking mechanism, the generated content is ensured to follow the teaching logic and automatically supplement the pre-knowledge.
It achieves complete coverage and improved logic of teaching content, reduces the consumption of computing resources and the number of manual corrections in the generation process, and significantly improves the logic and learning coherence of the generated content.
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and intelligent education technology, specifically to a knowledge graph joint decoding method and system based on coverage planning and backtracking navigation for educational content generation, which belongs to the application of knowledge graph-guided automatic generation and constraint decoding technology for educational content. Background Technology
[0002] Automatic generation of educational content based on large language models has become a core requirement in the field of intelligent education. In scenarios involving the generation of teaching content (such as personalized learning materials, automatic writing of course notes, and adaptive teaching content delivery), the generated content must strictly adhere to the pre-dependencies between course knowledge points (i.e., learning sequence constraints) to ensure that the teaching content fully covers the target knowledge range and conforms to the cognitive patterns of teaching. However, existing technologies suffer from the following fundamental shortcomings:
[0003] First, existing Retrieval Enhanced Generation (RAG) schemes only inject knowledge information on the input side, and the decoding process itself is not constrained by the educational 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 or disordered dependencies between teaching sessions, which is not conducive to learners building a knowledge system step by step.
[0004] Second, while recent graph constraint decoding methods (such as DoG, see Lu et al., "DoG: Decoding of Graphs for Knowledge-Grounded Dialogue", ACL 2023) attempt to utilize knowledge graph topology for constraints during decoding, their essence is triple chain generation for question-answering tasks, using only graph topology as token filtering constraints. Although there are content ordering and planning schemes in the knowledge graph-to-text (KG-to-Text) domain (such as KGCDP-T's Content Ordering + Dynamic Planning and GCP's Topology Traversal Content Planning), these methods are geared towards tasks that describe existing triple sets as text, and do not address the prerequisite dependency topology ordering, length budget differential allocation, and dynamic backtracking and stack-based recovery capabilities encountered when encountering uncovered prerequisite knowledge in scenarios such as education. Similarly, GCR (Luo et al., "Reasoning on Graphs: Faithful and Interpretable Large Language Model Reasoning", ICLR 2024) converts knowledge graphs into KG-Trie indexes for constraint decoding, but its goal is also to generate reasoning paths for question-answering tasks.
[0005] Third, there are currently no reported solutions for graph-based navigation and decoding of educational content that simultaneously possess the ability to plan instructional coverage and trace back prior knowledge. Existing solutions cannot continuously navigate according to instructional logic throughout the entire process of decoding instructional content, and lack the ability to plan content according to the course knowledge system and the ability to automatically trace back and supplement when encountering missing prior knowledge. Summary of the Invention
[0006] This invention addresses the following key technical issues: (1) How to automatically generate a teaching coverage planning sequence based on the prior dependencies (learning sequence constraints) of the educational knowledge graph before decoding the large language model, ensuring that the generated teaching content fully covers the target knowledge range and follows the correct teaching cognitive sequence; (2) How to maintain the graph cursor during the autoregressive decoding process and realize the joint control of teaching text generation and knowledge graph navigation through a dual-head architecture; (3) How to automatically trigger teaching backtracking when the intention to reference uncovered prior knowledge is detected during the generation of teaching content, insert prior knowledge review, restore the original position and continue generation, so as to simulate the real-time knowledge connection in the teaching of excellent teachers. Technical solution
[0007] This invention proposes a joint decoding method for coverage planning and backtracking navigation for the structured generation of educational content. Unlike existing graph-constrained decoding methods (such as DoG) that only utilize graph topology to filter invalid tokens to generate triple chains, this method comprises four steps: S1 constructs a multi-level knowledge graph for the education domain; S2 performs pre-decoding coverage planning; S3 performs dual-head joint decoding; and S4 performs pre-dependency backtracking. The three collaborative mechanisms, S2, S3, and S4, jointly support controlled text generation based on knowledge graph navigation.
[0008] (a) Pre-decoding Coverage Planning (corresponding to step S2). Before decoding begins, based on the target knowledge point set K_target, a learning order-aware topological sorting based on prerequisite relationships is performed on the knowledge graph to generate a coverage planning sequence Plan = [k_π(1), k_π(2), ..., k_π(n)], ensuring that for any knowledge point k_π(i), all prerequisite nodes of prerequisite types in the knowledge graph are placed before the sequence position π(i). The coverage planner also allocates a target generation length budget budget(k_i) for each knowledge point, dynamically based on the importance and difficulty of the knowledge point. This planning sequence serves as a macro-level instructional navigation blueprint for the decoding process of teaching content, ensuring that the generated content is arranged according to the cognitive laws of teaching.
[0009] (b) Dual-head joint decoding and graph cursor (corresponding to step S3). During the decoding process, a graph cursor is maintained, pointing to the current knowledge node. At each time step t, the model's hidden state h_t is simultaneously fed into the token prediction head (outputting vocabulary probabilities) and the navigation prediction head (outputting graph action probabilities). The navigation action space includes: STAY (staying at the current node to continue expanding), ADVANCE (advancing to the next node according to the coverage plan), BRIDGE (e_j) (jumping along a non-planned edge to an associated node to establish a knowledge association), and COMPLETE (marking that the current knowledge point has been fully covered). After the cursor moves, the graph embedding of the target 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] The navigation prediction head employs a two-layer fully connected network structure. The input dimension is consistent with the hidden state dimension of a large language model (e.g., the hidden state dimension of LLaMA-2-7B is 4096). The hidden layers use the Rectified Linear Activation (ReLU) function, and the output layer uses the Normalized Exponential (softmax) function. The output dimension is equal to the size of the navigation action space (i.e., 4 plus the number of currently available BRIDGE target edges). The projection matrix W_ref shares input layer parameters with the navigation prediction head and is jointly optimized during the first stage of training.
[0011] Here, e_plan_progress is the coverage planning progress encoding vector, enabling the model to perceive which stage of the planning sequence it is currently in.
[0012] (c) Pre-dependency backtracking mechanism (corresponding to step S4). If the navigation head predicts that a pre-dependency knowledge point k_pre that has not yet been covered needs to be referenced during the decoding process, the system triggers a backtracking operation: pausing the current generation, inserting a brief review text of k_pre (backtracking depth is limited by max_backtrack_depth), and resuming generation after the review is completed. The backtracking decision is triggered by the following conditions: Backtrack(k_pre) iff ref_score(h_t, k_pre)>θ_ref AND covered(k_pre) =false
[0013] The `ref_score` measures the strength of the current hidden state's intention to reference knowledge point `k_pre`. This mechanism ensures that generated content is automatically supplemented with prior knowledge when needed, simulating real-time review during lectures.
[0014] 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 is trained. The labeled knowledge point traversal sequence 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 coverage planning completion loss, and λ_nav=0.3 and λ_cover=0.1 are balancing coefficients.
[0015] 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 process). 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 "Note: Concept XX is required here, see Chapter XX for details") and continues generating the main storyline. 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 storyline, to ensure that the backtracking content is concise and does not overshadow the main storyline. 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 storyline position.
[0016] Regarding the knowledge graph construction method (corresponding to step S1): The complete schema definition of the multi-level knowledge graph G=(V,E,A) is as follows. Node types include: Subject (subject node, such as "mathematics"), Unit (unit node, such as "quadratic function"), KnowledgePoint (knowledge point node, such as "vertex coordinates"), Concept (concept node, such as "parabola"), Formula (formula node, such as "y=a(xh)²+k"). Edge types include: prerequisite (prerequisite dependency, representing learning order constraints), contains (containment relationship, representing hierarchical membership), related_to (association relationship, representing cross-unit concept connection), instantiate (instantiation relationship, connecting formulas and concepts), and equivalent (equivalence relationship, connecting equivalent representations). The attribute set A includes: difficulty ∈ [1,5] (difficulty level), importance ∈ [0,1] (importance weight), bloom_level ∈ {memory, comprehension, application, analysis, evaluation, creation} (Bloom's hierarchy of knowledge), typical_duration (typical teaching duration in minutes), and grade_range (applicable grade range). The knowledge graph can be manually constructed by domain experts based on curriculum standards, or obtained by automatically extracting knowledge points and their prerequisite dependencies from textbook text using automated knowledge extraction tools, followed by manual verification.
[0017] (1) Compared with graph constraint decoding methods such as DoG: DoG generates triple chains for question-answering tasks, while this method generates structured long texts for educational scenarios, producing free-format teaching content that conforms to the cognitive laws of teaching; DoG only uses topological filtering, while this method has a complete navigation system with coverage planning + progress awareness + backtracking capabilities. GCR converts the knowledge graph into a KG-Trie index for constraint decoding, but its goal is also to generate reasoning paths for question-answering tasks, without involving coverage planning and pre-dependency backtracking. (2) Compared with the RAG scheme: RAG injects knowledge at the input end all at once, while this method continuously navigates throughout the decoding process and has the planning ability to arrange content according to knowledge logic.
[0018] The key technical differences between this invention and the closest prior art, DoG (Lu et al., ACL 2023), are: (1) pre-decoding coverage planning mechanism – DoG lacks the ability to plan coverage based on prior dependencies before decoding; (2) multiple action space of the navigation prediction head (STAY / ADVANCE / BRIDGE / COMPLETE) – DoG only has a simple graph topology filtering mechanism; (3) stack-based prior dependency backtracking mechanism – DoG lacks backtracking capability. These key technical differences collectively address the technical problem of “how to ensure that the teaching content fully covers the target knowledge range and follows the correct teaching and cognitive order while maintaining the fluency of the teaching text, and automatically supplementing prior knowledge when needed to ensure learning continuity.” This technical problem does not exist in graph-constrained decoding methods for short text question answering, such as DoG, therefore DoG does not provide inspiration for the technical solution of this invention. Furthermore, there is a synergistic effect among coverage planning, dual-head joint decoding, and pre-dependency backtracking—the coverage planning sequence provides a macro-level 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 verify this), and such a combination is not obvious to those skilled in the art. Beneficial effects
[0019] The technical solution provided by this invention has the following beneficial effects:
[0020] (1) Coverage planning determines the generation path in one go through topological sorting in the pre-decoding stage, avoiding invalid exploration and duplicate token generation during the decoding process. Under the same generation length constraint, the average number of decoding steps is reduced by about 18% compared to 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.
[0021] (2) The pre-dependency backtracking mechanism detects the reference intent in real time and automatically supplements the pre-reference knowledge, reducing the number of times manual correction and content rework are required after generation.
[0022] (2a) The pre-dependency backtracking mechanism replaces full text regeneration with stack-based targeted supplementation. In scenarios where pre-knowledge needs to be supplemented, the computational overhead 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 batch generation scenarios.
[0023] (3) In the prototype system experimental verification (experimental environment: NVIDIA A100 40GB GPU×1, base model LLaMA-2-7B, knowledge graph stored in Neo4j 5.x), the joint decoding of coverage planning and backtracking navigation achieved a knowledge coverage rate of 98.3% (confidence interval of 97.1% to 99.2%), and the pre-dependency violation rate was less than 0.5% (mean 0.31%). The test dataset covers 120 knowledge points and 328 pre-dependencies in the K12 mathematics curriculum, generating 50 texts (each with an average of 3200 tokens). Compared with three baseline schemes: direct generation without coverage planning (coverage rate 72.4%, violation rate 8.7%), standard RAG scheme (coverage rate 81.6%, violation rate 5.2%), and DoG graph constraint decoding scheme (coverage rate 85.1%, violation rate 3.8%). The coverage plan improved the content arrangement logic score (assessed by 3 teachers on a 5-point scale) from 3.12±0.34 in the baseline plan to 3.81±0.28 (an improvement of 22%, p<0.001 in paired t-test).
[0024] (4) In terms of educational application value, the teaching content generated by the method of this invention strictly follows the pre-requirement dependencies of the course knowledge system, ensuring that learners have the necessary pre-requirement knowledge base before encountering new knowledge points. The pre-requirement backtracking mechanism simulates the real-time knowledge connection strategy in excellent teachers' lectures, automatically inserting a brief review when referring to pre-requirement concepts that have not yet been taught, effectively reducing the cognitive load of learners. In the above experiments, the teacher review panel unanimously agreed that the teaching logic and naturalness of knowledge connection of the generated content were significantly better than the baseline scheme, and it is suitable for educational scenarios such as personalized learning material generation, automatic writing of course handouts, and adaptive teaching content push. Attached Figure Description
[0025] Figure 1 (The complete process of S1→S2→S3→S4, including backtracking loop and completion judgment) is a schematic diagram of the overall process of the method of the present invention.
[0026] Figure 2 The three-coordination mechanism data flow diagram (pre-decoding coverage planning / dual-head joint decoding / pre-dependency backtracking are displayed side by side) is a flowchart of the coverage planning-backtracking navigation joint decoding method, including the data flow of the three coordination mechanisms: pre-decoding coverage planning, dual-head joint decoding and pre-dependency backtracking. Detailed Implementation
[0027] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Implementation
[0028] The system comprises: a coverage planning engine, a dual-head joint decoding engine, and a pre-dependency backtracking controller. The coverage planning engine is responsible for performing topological sorting and length budget allocation based on the knowledge graph before decoding; the dual-head joint decoding engine is responsible for maintaining the graph cursor during decoding and collaboratively outputting text tokens and navigation actions through a dual-head architecture; and the pre-dependency backtracking controller is responsible for detecting citation intent and managing the backtracking stack. The data layer includes a knowledge graph database (Neo4j) and a vector database (Milvus).
[0029] Experimental Environment and Hyperparameter Settings: The experiments of this invention are based on the LLaMA-2-7B pedestal model and conducted on an NVIDIA A100 40GB GPU. The training dataset contains a knowledge graph of 120 knowledge points and 328 pre-dependencies from the K12 mathematics curriculum, as well as 200 texts explaining the knowledge points written by experienced teachers (each text is labeled with the knowledge point traversal sequence and navigation action sequence). The first stage of training has 10 epochs and a learning rate of 1e-4; the second stage of joint fine-tuning has 5 epochs and a learning rate of 5e-5, with λ_nav=0.3 and λ_cover=0.1. The backtracking trigger threshold θ_ref=0.65 (optimized by F1 score on the validation set), and max_backtrack_depth=2.
[0030] The complete operation flow of the system of this invention is as follows: Step 1, receive the generation request, the request parameters include the target knowledge point set and the length constraint of the generated content; Step 2, the coverage planning engine performs topological sorting according to the target knowledge point set and the prerequisite dependencies in the knowledge graph, generates the coverage planning sequence Plan=[k1,k2,...,kn], and allocates a generation length budget for each knowledge point; Step 3, the joint decoding engine initializes the graph cursor and starts the dual-head decoding process. The token prediction head and the navigation prediction head work together to generate the content of each knowledge point in sequence according to the coverage planning sequence. Each time the cursor moves, the hidden state is updated through a gating mechanism according to the graph embedding of the target node; Step 4, if the intention to reference the uncovered prerequisite knowledge points is detected to exceed the threshold during the decoding process, the backtracking generation mechanism is triggered, the main line generation is paused and a brief review text is inserted. After completion, the stack is popped and the main line generation is resumed; Step 5, the generation result is returned through the API interface.
[0031] Step 1: Receive the generation request (target knowledge point: quadratic function / vertex coordinates).
[0032] Step 2: The coverage planner generates a coverage plan Plan = [Complete the square method review → Vertex coordinate formula → Vertex coordinate application] based on the topological sorting of the knowledge graph. Each knowledge point obtains a corresponding length budget according to its importance and difficulty.
[0033] Step 3: The joint decoding engine starts, and the cursor is initialized at the [Quadratic Function] node. During the generation process, the navigation head advances to each target knowledge point according to the coverage plan. After each advance, the graph of the target node is embedded into the hidden state through gating and fusion, and the coverage plan progress encoding is updated at the same time.
[0034] Step 4: If the generation process requires referencing an uncovered [Perfect Square Formula], and ref_score exceeds the threshold θ_ref and covered([Perfect Square Formula]) = false, a backtracking mechanism is triggered: the main thread is paused, the current cursor position and generation state are pushed onto the stack, the cursor jumps to the [Perfect Square Formula] node, a brief review text is generated using the summary decoding parameters, and after the review is completed, the stack is popped to restore the cursor to its original position, and the main thread generation continues.
[0035] This invention's method is also applicable to programming education course content generation scenarios. Given the knowledge system of a programming course and its prerequisite dependencies (e.g., "variables → conditional statements → loops → functions → object-oriented programming"), the coverage planning engine automatically generates a planning sequence arranged according to the order of teaching dependencies based on learning sequence constraints. The joint decoding engine generates teaching explanations of each programming concept sequentially according to the planning sequence. The navigation head controls the depth of content development and the timing of teaching switching between knowledge points based on the difficulty level of each knowledge point and Bloom's hierarchy of needs. If the generation process requires referencing prerequisite programming concepts that have not yet been explained (e.g., when explaining "loops," it is necessary to refer to "Boolean expressions" that have not yet been covered), the backtracking mechanism automatically inserts a brief teaching review before resuming the main line generation.
[0036] This example uses the "quadratic function" unit in the K12 mathematics curriculum to fully demonstrate the entire process from knowledge graph construction to model training, reasoning generation, and result evaluation.
[0037] Step 1: Knowledge Graph Construction. Extract the knowledge points and their relationships from the curriculum standards and textbooks for this unit, and construct a local knowledge graph containing the following nodes: Knowledge point nodes include "definition of quadratic function" (importance=0.9, difficulty=2), "general form y=ax²+bx+c" (importance=0.8, difficulty=2), "completing the square" (importance=0.7, difficulty=3), "vertex form y=a(xh)²+k" (importance=0.8, difficulty=3), "vertex coordinates" (importance=0.9, difficulty=3), "axis of symmetry" (importance=0.7, difficulty=2), and "opening direction" (importance=0.6, difficulty=1); Pre-dependency edges include "definition of quadratic function" → "general form", "general form" → "completing the square", "completing the square" → "vertex form", "vertex form" → "vertex coordinates", "vertex coordinates" → "axis of symmetry", etc.
[0038] Step Two: Training Data Annotation. Experienced teachers write explanatory texts for the aforementioned knowledge graph and annotate the traversal sequence and navigation action sequence corresponding to each text segment. For example, an annotated sample might be: Traversal sequence [Quadratic function definition, general form, completing the square, vertex form, vertex coordinates], corresponding to the navigation action sequence [STAY×15, ADVANCE, STAY×12, ADVANCE, STAY×18, BRIDGE(related_to: perfect square formula), STAY×8, ADVANCE, STAY×20, ADVANCE, STAY×16, COMPLETE]. A total of 200 such texts are annotated as the training set.
[0039] Step 3: Two-stage model training. In the first stage, the LLaMA-2-7B backbone parameters are frozen, and only the navigation prediction head and projection matrix W_ref are trained. The above-annotated navigation action sequences are used as supervision signals, and training lasts for 10 epochs with a learning rate of 1e-4. After the first stage, the action prediction accuracy of the navigation prediction head is evaluated on the validation set, reaching 87.2%. In the second stage, the backbone parameters are unfrozen for joint fine-tuning, using a joint loss L_joint = L_token + 0.3·L_nav + 0.1·L_cover, and training lasts for 5 epochs with a learning rate of 5e-5. Simultaneously, the backtracking trigger threshold θ_ref = 0.65 is determined through F1 score optimization on the validation set.
[0040] Step 4: Inference Generation and Intermediate Process. Given the target knowledge point set {vertex coordinates, axis of symmetry} and the total length constraint L_total=800 tokens, the coverage planning engine performs topological sorting, automatically completes the prerequisite knowledge points, and generates a coverage planning sequence Plan=[quadratic function definition, general form, completing the square method, vertex form, vertex coordinates, axis of symmetry], and allocates the generation length budget for each knowledge point according to importance and difficulty. The joint decoding engine generates step by step according to this sequence. When generating content related to "vertex coordinates", the navigation prediction head detects a reference intention to "perfect square formula" (this concept is not in the target set but belongs to the associated node) ref_score=0.72>θ_ref=0.65, and covered(perfect square formula)=false, triggering backtracking: the current cursor position and hidden state are pushed onto the stack, and a review text of about 40 tokens is generated with the generalized decoding parameters (τ=1.5, g=1). After the review is completed, the stack is popped to restore the main line and continue generation.
[0041] Step 5: Result Evaluation. The generated text underwent both automatic and manual evaluation: the automatic evaluation checked the coverage of target knowledge points (6 / 6=100%) and the violation rate of prerequisite dependencies (0 / 5=0%); the manual evaluation was conducted by 3 teachers who assessed the logical arrangement of the content on a 5-point scale, with a score of 4.0. This result validated the effectiveness of the end-to-end process.
Claims
1. A joint decoding method for knowledge graphs based on coverage planning and backtracking navigation for educational content generation, wherein the method is implemented by a processor calling a hardware-accelerated computing unit to execute program instructions on a storage medium, characterized in that, Includes the following steps: S1: Construct a multi-level knowledge graph G=(V,E,A) for the education field, where V is a set of nodes including subject nodes, unit nodes and knowledge point nodes, E is a set of edges including learning order constraint edges of the type of prerequisite, and A is a set of attributes including knowledge point difficulty level and importance weight. S2: Pre-decoding Coverage Planning - Based on the target set of teaching knowledge points, perform learning order-aware topological sorting based on prerequisite relationships on the knowledge graph to generate a coverage planning sequence Plan = [k_π(1), k_π(2), ..., k_π(n)] that conforms to the teaching logic, so that all prerequisite type predecessor nodes of any knowledge point k_π(i) in the sequence are placed before the sequence position π(i), and the length budget is generated by allocating teaching content to each knowledge point according to the importance and difficulty level of each knowledge point; S3: Dual-head joint decoding—During the autoregressive decoding process of the large language model, the graph cursor is maintained to point to the current knowledge node. At each decoding time step, the model hidden state h_t is fed into both the token prediction head and the navigation prediction head. The token prediction head outputs the vocabulary probability distribution, and the navigation prediction head outputs the graph action probability. After the cursor moves, the graph embedding and coverage planning progress encoding of the target node are fused into the next hidden state through a gating mechanism. S4: Pre-dependency backtracking - If the decoding process detects that the intention to reference an uncovered pre-knowledge point exceeds a preset threshold, the generation of the current teaching content is paused through stack management, and the graph cursor position and generation status are saved. The teaching review text for the pre-knowledge point is inserted. The teaching review text adopts a concise summary strategy to simulate the teacher's instant review during the lecture. After the review is completed, the stack is popped to restore the original position and the generation continues.
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 actions: STAY, which is used to continue generating at the current knowledge node; ADVANCE, which is used to advance to the next target knowledge node according to the coverage planning sequence; BRIDGE (e_j), which is used to jump to the associated node along the non-planned edge to establish a cross-knowledge point association; and COMPLETE, which is used to mark that the current knowledge point has been fully covered.
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 knowledge point k_pre, θ_ref is the preset reference intention threshold, and covered(k_pre) is the covered state marker of the 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 about the missing prior knowledge at the current position and continuing the main line generation.
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 line position is returned. The generation of the backtracking text uses a generalized decoding parameter with high temperature and low derivation steps. The generation length is limited to a preset proportion of the budget of knowledge points of equal value to the main 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, using the labeled knowledge point traversal sequence as the supervision signal; 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 navigation action cross-entropy loss, and L_cover is the coverage planning completion loss.
7. The method according to claim 1, characterized in that, The allocation formula for the generation length budget in step S2 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 generation length constraint, importance(k_i) and difficulty(k_i) are the importance and difficulty attribute values of knowledge point k_i in the knowledge graph, respectively, and w_imp and w_diff are weighting coefficients.
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 knowledge point k_pre, and the θ_ref threshold is determined by maximizing the F1 score on the validation set. The projection matrix W_ref is obtained by joint training with the navigation prediction head in the first stage of training.
9. A knowledge graph joint decoding system based on coverage planning and backtracking navigation for educational content generation, the system comprising a processor, a hardware-accelerated computing unit, and a memory, wherein the memory stores a computer program, and the processor, when calling the hardware-accelerated computing unit to execute the computer program, implements the following functional modules, characterized in that, include: The coverage planning engine is used to perform learning sequence-aware topology sorting based on prerequisite relationships on the educational knowledge graph before decoding starts, according to the target set of teaching knowledge points. This generates a coverage planning sequence that conforms to the teaching logic and assigns teaching content to each knowledge point to generate a length budget. A dual-head joint decoding engine is used to maintain the graph cursor during the autoregressive decoding process of a large language model. It outputs vocabulary probabilities and graph action probabilities through the collaborative output of the token prediction head and the navigation prediction head. After the cursor moves, the graph embedding and coverage planning progress encoding are fused into the hidden state through a gating mechanism. The pre-dependency backtracking controller is used to detect whether the intention to reference uncovered pre-knowledge points exceeds a preset threshold. If it does, a backtracking operation is triggered, and backtracking and recovery are controlled through stack-based management. The data layer module includes a database for storing the multi-level knowledge graph and a database for storing node embedding vectors.
10. 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.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.