Target-driven exercise recommendation method for enhancing attention based on cognition
By constructing a cognitively enhanced attention deep Q-network, incorporating the time forgetting effect and practice history effect, and combining a dual decoupled reward mechanism, the opacity and short-sightedness of deep knowledge tracking models are solved, enabling accurate assessment of students' knowledge status and efficient goal-oriented recommendations.
Patent Information
- Application Number
- CN202511705767.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, deep knowledge tracking models lack interpretability in educational psychology, resulting in opaque diagnostic results. Furthermore, the recommendation strategies lack long-term goal planning capabilities and cannot generate efficient learning paths to achieve specific learning objectives.
A cognitively enhanced attention deep Q-network is constructed, incorporating the time forgetting effect and the practice history effect, and combined with a dual decoupled reward mechanism. The cognitively enhanced attention network is used to evaluate students' dynamic knowledge status and generate recommendation decisions oriented towards long-term goals.
It achieves accurate assessment of students' knowledge status and efficient goal-oriented recommendations, generates efficient learning path sequences, and solves the problems of opaque diagnostic results and lack of long-term planning in existing technologies.
Smart Images

Figure CN121502085A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of intelligent education, and particularly relates to a target-driven exercise recommendation method. BACKGROUND
[0002] With the popularization of online education, the field has shifted from a mode of providing massive content to an intelligent and personalized service mode that pursues individualized education, and the market demand is huge.
[0003] Currently, the technical development in this field has generally shifted from traditional recommendation methods such as collaborative filtering to knowledge tracking technology based on deep learning. Models represented by deep knowledge tracking and self-attention knowledge tracking can dynamically assess the mastery of each knowledge point by analyzing the student's historical exercise sequence. This diagnosis method centered on the student's knowledge state constitutes the technical cornerstone of the current mainstream personalized recommendation system.
[0004] There are still two defects in the prior art: first, the black box problem of the cognitive model. Although models such as SAKT use powerful attention mechanisms to improve prediction accuracy, the internal decision-making process is not transparent, and it fails to explicitly and structurally integrate recognized cognitive laws in educational psychology, such as the forgetting curve and the practice effect. This leads to the fact that the diagnosis results of the model sometimes violate common sense and are difficult to explain, making it difficult to gain the complete trust of educators. Second, the short-sightedness of the recommendation strategy. Most existing systems recommend a single exercise that can maximize the next step's return based on the diagnosed current weak points. This recommendation lacks long-term strategic planning capabilities, and it cannot answer key questions such as "how to help students achieve a specific learning goal before the final exam through the most efficient exercise sequence".
[0005] In view of the above defects, some known product schemes or information have made improvement attempts. Most of these measures focus on improving the accuracy of the diagnosis model, such as introducing more complex network structures or integrating more dimensional features. These improvements are still limited to optimizing the effectiveness of single-step recommendations and have not fundamentally introduced a mathematical framework that can perform long-term, goal-oriented path planning. Therefore, the existing technology still generally lacks cognitive explainability in the diagnosis model and long-term goal planning capability in the recommendation strategy, resulting in the inability to generate a truly efficient learning path that achieves a specific knowledge goal for learners. SUMMARY
[0006] The technical problem to be solved by the present application is to overcome the shortcomings of the prior art, and to provide a target-driven exercise recommendation method based on cognitive-enhanced attention, which is accurate in diagnosis, efficient in recommendation, and strong in goal orientation.
[0007] The technical solution adopted to solve the above technical problems is composed of the following steps:
[0008] (1) Data acquisition and processing
[0009] Select ASSISTment 2009 dataset, divide the dataset into training set and test set according to 9:1.
[0010] (2) Extract key features
[0011] Extract the student's historical interaction sequence features from the dataset :
[0012]
[0013] In the formula, is the problem identifier corresponding to the th interaction, is the result of the interaction, which takes 1 for correct answer and 0 for wrong answer, and the timestamp of each interaction .
[0014] 1) Construct interaction embedding matrix
[0015] Convert each interaction to interaction index according to the following formula:
[0016]
[0017] Where, is the total number of problems in the system, and E takes a finite positive integer value.
[0018] Construct the interaction embedding matrix of N rows and d dimensions according to the following formula: :
[0019]
[0020]
[0021] Where, , represents the learnable interaction embedding matrix with dimension , is the sequence length, takes a finite positive integer value.
[0022] 2) Construct the problem embedding matrix
[0023] Construct the problem embedding matrix according to the following formula: :
[0024]
[0025]
[0026] wherein, , denotes a learnable question embedding matrix of dimension .
[0027] (3) Constructing cognitive attention deep Q network
[0028] The cognitive attention deep Q network is composed of a cognitive enhanced attention network and a target conditional deep Q network in series.
[0029] (4) Training the cognitive attention deep Q network
[0030] 1) Constructing a double reward mechanism
[0031] The total reward is determined by the following formula :
[0032]
[0033]
[0034]
[0035] wherein, and are weight coefficients, , is the normalized short-term local benefit reward, is the normalized long-term global benefit reward, is the mastery degree of the th knowledge point after recommending the question, is the mastery degree of the th knowledge point before recommending, is the preset target state, is the cosine similarity function.
[0036] 2) Constructing a loss function
[0037] The loss function includes a cognitive attention loss function and a deep Q network loss function
[0038] The loss function is constructed by the following formula :
[0039] =
[0040] The cognitive attention loss function is constructed by the following formula :
[0041]
[0042] wherein, is the prediction output of the cognitive attention network at the t-th step, is the real interaction result label.
[0043] The deep Q network loss function is constructed as follows :
[0044]
[0045] wherein, is the target Q value, γ is a discount factor, and γ [0.8, 1).
[0046] 3) Training the cognitive attention deep Q network
[0047] The training set is input into the cognitive attention deep Q network for training, and the training parameters are as follows: the batch size of training is 256, the learning rate is 0.001, the optimizer uses adam, and the training is performed until the loss function converges.
[0048] (5) Testing the cognitive attention deep Q network
[0049] The test set is input into the trained cognitive attention deep Q network for testing, and the target-driven exercise recommendation result is output.
[0050] In step (3) of constructing the cognitive attention deep Q network of the application, the cognitive attention network is composed of cognitive attention module 1, feedforward neural network 1, cognitive attention module 2, feedforward neural network 2, cognitive attention module 3, and feedforward neural network 3 connected in series.
[0051] The cognitive attention module 1 of the application is composed of a time bias multi-layer perceptron, an original attention mechanism module, and an exercise history bias multi-layer perceptron connected in parallel; the structure of the cognitive attention module 2 and the cognitive attention module 3 is the same as that of the cognitive attention module 1.
[0052] The time bias multi-layer perceptron of the application is composed of a fully connected layer 1 and an activation function layer 1, a fully connected layer 2, an activation function layer 2, and a fully connected layer 3 connected in series.
[0053] The exercise history bias multi-layer perceptron of the application is composed of a fully connected layer 4 and an activation function layer 3, a fully connected layer 5, an activation function layer 4, a fully connected layer 6, an activation function layer 5, and a fully connected layer 7 connected in series.
[0054] In step (2) of extracting key features of the application, 1) an interaction embedding matrix is constructed , each interaction is converted into an interaction index :
[0055]
[0056] wherein, the total number of exercises in the system, E is in the range of 5000-10000.
[0057] The N-row d-dimensional interaction embedding matrix is constructed according to the following formula :
[0058]
[0059]
[0060] wherein, , represents a learnable interaction embedding matrix with a dimension of , L is the sequence length, and is in the range of 10-100. In step (2) of extracting key features of the application, 1) the interaction embedding matrix is constructed
[0061] , each interaction is converted into an interaction index :
[0062]
[0063] wherein, the total number of exercises in the system, E is in the range of 8000.
[0064] The N-row d-dimensional interaction embedding matrix is constructed according to the following formula :
[0065]
[0066]
[0067] wherein, , represents a learnable interaction embedding matrix with a dimension of , L is the sequence length, and is in the range of 60.
[0068] The application constructs a cognitive enhanced attention network that takes time forgetting effect and practice history effect as learnable bias items and integrates attention score calculation, is used for accurately evaluating dynamic knowledge state of students, splices current knowledge state of students and preset target knowledge state as input to generate recommendation decisions for long-term target, and constructs a double decoupling reward mechanism to guide the target condition deep Q network to efficiently learn.
[0069] Compared with the prior art, the application has the following advantages:
[0070] Since the application constructs a cognitive enhanced attention network that takes time forgetting effect and practice history effect as learnable bias items and integrates attention score calculation, the problem that the existing deep knowledge tracking model lacks educational psychology interpretability is solved, and the model can more accurately capture and evaluate the dynamic changing knowledge state of students.
[0071] The application adopts a target condition deep Q network, splices current knowledge state of students and preset target knowledge state as input, breaks through the short-sighted limitation that traditional recommendation methods are usually based on a single-step greedy strategy and lack long-term planning, and makes the model be able to perform global path planning according to a set long-term teaching target, and realize result-oriented target-driven recommendation.
[0072] The application constructs a double decoupling reward mechanism that contains short-term local benefits and long-term global benefits, and the target condition deep Q network considers instant knowledge growth and achievement of the final target in the training process, and ensures that the generated learning path sequence has extremely high learning efficiency and clear target orientation. BRIEF DESCRIPTION OF DRAWINGS
[0073] Figure 1 is a flowchart of embodiment 1 of the application.
[0074] Figure 2 is a structural schematic diagram of a cognitive attention deep Q network.
[0075] Figure 3 is Figure 2 a structural schematic diagram of a cognitive enhanced attention network in the application.
[0076] Figure 4 is Figure 3 a structural schematic diagram of a cognitive enhanced attention module 1 in the application.
[0077] Figure 5 is Figure 4 a structural schematic diagram of a time bias multilayer perception machine in the application.
[0078] Figure 6 is Figure 4 a schematic diagram of a structure of a history bias multi-layer perception. DETAILED DESCRIPTION
[0079] The application will be further described in detail below in conjunction with the accompanying drawings and examples, but the application is not limited to the following embodiments.
[0080] Example 1
[0081] In Figure 1 , the cognitive-enhanced attention-based target-driven exercise recommendation method of the present embodiment consists of the following steps:
[0082] (1) Data acquisition and processing
[0083] Select the ASSISTment 2009 dataset, and divide the dataset into a training set and a test set at a ratio of 9:1.
[0084] (2) Extract key features
[0085] Extract the historical interaction sequence features of students from the dataset :
[0086]
[0087] wherein, is the exercise identifier corresponding to the th interaction, is the result of the interaction, which takes the value 1 for correct answer and 0 for wrong answer, and the timestamp of each interaction.
[0088] 1) Construct an interaction embedding matrix
[0089] Convert each interaction to an interaction index according to the following formula:
[0090]
[0091] wherein, is the total number of exercises in the system, and E takes a value in the range of 5000-10000, and the value of E in the present embodiment is 8000.
[0092] Construct an interaction embedding matrix of N rows and d dimensions according to the following formula: :
[0093]
[0094]
[0095] wherein, , The dimension is Learnable interactive embedding matrix, For sequence length, The value ranges from 10 to 70 in this embodiment. The value is 40.
[0096] 2) Construct the question embedding matrix
[0097] Construct the question embedding matrix as follows :
[0098]
[0099]
[0100] in, , The dimension is The embedding matrix of learnable topics.
[0101] (3) Constructing a deep Q-network for cognitive attention
[0102] Figure 2 A schematic diagram of the cognitive attention depth Q-network structure in this embodiment is provided. Figure 2 In this embodiment, the cognitive attention depth Q-network is composed of a cognitive enhancement attention network and a target conditional depth Q-network connected in series.
[0103] Figure 3 Given Figure 2 A schematic diagram of the structure of a cognitive attention enhancement network. Figure 3 In this embodiment, the cognitive enhanced attention network is composed of cognitive enhanced attention module 1 and feedforward neural network 1, cognitive enhanced attention module 2, feedforward neural network 2, cognitive enhanced attention module 3, and feedforward neural network 3 connected in series.
[0104] Figure 4 Given Figure 3 A schematic diagram of the structure of the cognitive attention enhancement module 1. Figure 4 In this embodiment, the cognitive enhancement attention module 1 is composed of a time-biased multilayer perceptron, the original attention mechanism module, and a practice history-biased multilayer perceptron connected in parallel; the structures of the cognitive enhancement attention module 2 and the cognitive enhancement attention module 3 are the same as those of the cognitive enhancement attention module 1.
[0105] Figure 5 Given Figure 4 A schematic diagram of a time-biased multilayer perceptron. Figure 5In this embodiment, the time-biased multilayer perceptron is composed of a fully connected layer 1 and an activation function layer 1, a fully connected layer 2, an activation function layer 2, and a fully connected layer 3 connected in series.
[0106] Figure 6 Given Figure 4 A schematic diagram of the structure of a history-biased multilayer perceptron used in practice. Figure 5 In this embodiment, the practice history biased multilayer perceptron is composed of a fully connected layer 4 and activation function layers 3, 5, 6, 7, and 4 connected in series.
[0107] (4) Training a deep Q-network for cognitive attention
[0108] 1) Construct a dual reward mechanism for value determination
[0109] The total reward is determined by the following formula. :
[0110]
[0111]
[0112]
[0113] in, and These are the weighting coefficients. In this embodiment The value is 0.2. The value is 0.8. This is a normalized short-term localized reward. This is the normalized long-term global return reward. To do the recommended questions The next Mastery of each knowledge point The first one before recommendation Mastery of each knowledge point The preset target state, This is the cosine similarity function.
[0114] 2) Construct the loss function
[0115] loss function Including cognitive attention loss function And the loss function of deep Q network .
[0116] Construct the loss function as follows :
[0117] =
[0118] Construct the cognitive attention loss function as follows :
[0119]
[0120] in, For the predicted output of the cognitively enhanced attention network at step t, Labels for actual interaction results.
[0121] Construct the loss function of a deep Q-network using the following formula :
[0122]
[0123] in, Let γ be the target Q value, and γ be the discount factor. [0.8,1), the value in this embodiment is 0.9.
[0124] 3) Training a deep Q-network for cognitive attention
[0125] The training set was fed into a cognitive attention deep Q-network for training. The training parameters were: batch size of 256, learning rate of 0.001, and Adam optimizer. Training continued until the loss function converged.
[0126] (5) Testing the cognitive attention depth Q-network
[0127] The test set is input into the trained cognitive attention deep Q network for testing, and the output is a goal-driven exercise recommendation result.
[0128] Complete a goal-driven exercise recommendation method based on cognitive enhancement and attention.
[0129] Example 2
[0130] The goal-driven exercise recommendation method based on cognitively enhanced attention in this embodiment consists of the following steps:
[0131] (1) Data acquisition and processing
[0132] The steps are the same as in Example 1.
[0133] (2) Extracting key features
[0134] 1) Constructing an interaction embedding matrix
[0135] The following formula will be used for each interaction Convert to interactive index :
[0136]
[0137] in, E represents the total number of exercises in the system, and its value ranges from 5000 to 10000. In this embodiment, E is set to 5000.
[0138] Construct an N-row, d-dimensional interaction embedding matrix using the following formula. :
[0139]
[0140]
[0141] in, , The dimension is Learnable interactive embedding matrix, For sequence length, The value range is 10 to 70, in this embodiment The value is 10.
[0142] The other steps in this procedure are the same as in Example 1.
[0143] 2) Construct the question embedding matrix
[0144] The steps are the same as in Example 1.
[0145] (3) Constructing a deep Q-network for cognitive attention
[0146] The structure of the cognitive attention depth Q network is the same as that in Example 1.
[0147] (4) Training a deep Q-network for cognitive attention
[0148] 1) Construct a dual reward mechanism for value determination
[0149] The total reward is determined by the following formula. :
[0150]
[0151]
[0152]
[0153] in, and These are the weighting coefficients. In this embodiment The value is 0.1. The value is 0.7, and the other parameters, variables, and value ranges are the same as in Example 1.
[0154] 2) Construct the loss function
[0155] loss function Including cognitive attention loss function And the loss function of deep Q network
[0156] Cognitive attention loss function The expression is the same as in Example 1.
[0157] In cognitive attention loss function In this example, the parameters, variables, and their value ranges are the same as in Example 1.
[0158] Construct the loss function of a deep Q-network using the following formula :
[0159]
[0160] in, Let γ be the target Q value, and γ be the discount factor. [0.8,1), in this embodiment, the value of γ is 0.8.
[0161] The other steps in this procedure are the same as in Example 1.
[0162] The other steps are the same as in Example 1, thus completing the goal-driven exercise recommendation method based on cognitively enhanced attention.
[0163] Example 3
[0164] The goal-driven exercise recommendation method based on cognitively enhanced attention in this embodiment consists of the following steps:
[0165] (1) Data acquisition and processing
[0166] The steps are the same as in Example 1.
[0167] (2) Extracting key features
[0168] 1) Constructing an interaction embedding matrix
[0169] The following formula will be used for each interaction Convert to interactive index :
[0170]
[0171] in, E represents the total number of exercises in the system, and its value ranges from 5000 to 10000. In this embodiment, the value range of E is 10000.
[0172] Construct an N-row, d-dimensional interaction embedding matrix using the following formula. :
[0173]
[0174]
[0175] in, , The dimension is Learnable interactive embedding matrix, For sequence length, The value ranges from 10 to 70 in this embodiment. The value is 70.
[0176] The other steps in this procedure are the same as in Example 1.
[0177] 2) Construct the question embedding matrix
[0178] The steps are the same as in Example 1.
[0179] (3) Constructing a deep Q-network for cognitive attention
[0180] The structure of the cognitive attention depth Q network is the same as that in Example 1.
[0181] (4) Training a deep Q-network for cognitive attention
[0182] 1) Construct a dual reward mechanism for value determination
[0183] The total reward is determined by the following formula. :
[0184]
[0185]
[0186]
[0187] in, and These are the weighting coefficients. In this embodiment The value is 0.3. The value is 0.95, and the other parameters, variables, and value ranges are the same as in Example 1.
[0188] 2) Construct the loss function
[0189] loss function Including cognitive attention loss function And the loss function of deep Q network
[0190] Cognitive attention loss function The expression is the same as in Example 1.
[0191] In cognitive attention loss function In this example, the parameters, variables, and their value ranges are the same as in Example 1.
[0192] Construct the loss function of a deep Q-network using the following formula :
[0193]
[0194] in, Let γ be the target Q value, and γ be the discount factor. [0.8,1), in this embodiment, the value of γ is 0.95.
[0195] The other steps in this procedure are the same as in Example 1.
[0196] The other steps are the same as in Example 1, thus completing the goal-driven exercise recommendation method based on cognitively enhanced attention.
Claims
1. A goal-driven exercise recommendation method based on cognitively enhanced attention, characterized in that... It consists of the following steps: (1) Data acquisition and processing Select the ASSISTment2009 dataset and divide it into training and test sets in a 9:1 ratio; (2) Extracting key features Extracting historical interaction sequence features of students from the dataset : In the formula, For the first The exercise identifier corresponding to each interaction. This represents the result of the interaction, with a value of 1 for a correct answer and 0 for an incorrect answer, along with the timestamp of each interaction. ; 1) Constructing an interaction embedding matrix The following formula will be used for each interaction Convert to interactive index : in, Let E be the total number of exercises in the system, and its value range is a finite positive integer. Construct an N-row, d-dimensional interaction embedding matrix using the following formula. : in, , The dimension is Learnable interactive embedding matrix, For sequence length, The value can be a finite number of positive integers; 2) Construct the question embedding matrix Construct the question embedding matrix as follows : in, , The dimension is The learnable question embedding matrix; (3) Constructing a deep Q-network for cognitive attention The cognitive attention depth Q network is composed of a cognitive enhanced attention network and a target conditional depth Q network connected in series. (4) Training a deep Q-network for cognitive attention 1) Construct a dual reward mechanism The total reward is determined by the following formula. : in, and These are the weighting coefficients. , This is a normalized short-term localized reward. This is the normalized long-term global return reward. To do the recommended questions The next Mastery of each knowledge point The first one before recommendation Mastery of each knowledge point The preset target state, The cosine similarity function; 2) Construct the loss function loss function Including cognitive attention loss function And the loss function of deep Q network Construct the loss function as follows : = Construct the cognitive attention loss function as follows : in, For the predicted output of the cognitively enhanced attention network at step t, Labels representing actual interaction results; Construct the loss function of a deep Q-network using the following formula : in, Let γ be the target Q value, and γ be the discount factor. [0.8,1); 3) Training a deep Q-network for cognitive attention The training set was input into the cognitive attention deep Q network for training. The training parameters were: batch size of 256, learning rate of 0.001, and the optimizer was adam. Training was continued until the loss function converged. (5) Testing the cognitive attention depth Q-network The test set is input into the trained cognitive attention deep Q network for testing, and the output is a goal-driven exercise recommendation result.
2. The goal-driven exercise recommendation method based on cognitively enhanced attention as described in claim 1, characterized in that... In step (3), the cognitive attention deep Q network is constructed by sequentially connecting the cognitive attention module 1, the feedforward neural network 1, the cognitive attention module 2, the feedforward neural network 2, the cognitive attention module 3, and the feedforward neural network 3.
3. The goal-driven exercise recommendation method based on cognitively enhanced attention as described in claim 2, characterized in that: The cognitive attention enhancement module 1 is composed of a time-biased multilayer perceptron, the original attention mechanism module, and a practice history-biased multilayer perceptron connected in parallel; the cognitive attention enhancement modules 2 and 3 have the same structure as the cognitive attention enhancement module 1.
4. The goal-driven exercise recommendation method based on cognitively enhanced attention as described in claim 3, characterized in that: The time-biased multilayer perceptron described in 5 is composed of a fully connected layer 1 and an activation function layer 1, a fully connected layer 2, an activation function layer 2, and a fully connected layer 3 connected in series.
5. The goal-driven exercise recommendation method based on cognitively enhanced attention as described in claim 3, characterized in that: The practice history biased multilayer perceptron is composed of a fully connected layer 4 and activation function layers 3, 5, 4, 6, 5, and 7 connected in series.
6. The goal-driven exercise recommendation method based on cognitively enhanced attention as described in claim 3, characterized in that: In step (2), extract key features and construct the interaction embedding matrix. The following formula will be used for each interaction Convert to interactive index : in, E represents the total number of exercises in the system, with a value ranging from 5000 to 10000. Construct an N-row, d-dimensional interaction embedding matrix using the following formula. : in, , The dimension is Learnable interactive embedding matrix, For sequence length, The value ranges from 10 to 100.
7. The goal-driven exercise recommendation method based on cognitively enhanced attention as described in claim 3, characterized in that: In step (2), extract key features and construct the interaction embedding matrix. The following formula will be used for each interaction Convert to interactive index : in, E represents the total number of exercises in the system, with a value of 8000. Construct an N-row, d-dimensional interaction embedding matrix using the following formula. : in, , The dimension is Learnable interactive embedding matrix, For sequence length, The value is 60.