Student knowledge mastering prediction method based on staged forgetting rate and related device

By using Bayesian probabilistic inference and a phased forgetting rate model, the problem of parameter mismatch in forgetting rate in existing technologies is solved, enabling accurate prediction of students' knowledge mastery status and improving prediction accuracy.

CN121920595APending Publication Date: 2026-04-24CHONGQING UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2025-12-30
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing methods for predicting student knowledge acquisition fail to consider the differences in cognitive abilities and knowledge reserves among students at different learning stages, resulting in a mismatch between the forgetting rate parameter and the actual forgetting pattern, thus reducing prediction accuracy.

Method used

A Bayesian probabilistic inference method was used to determine the stage affiliation of students, and a stage-based forgetting rate knowledge tracking model was constructed. By acquiring answer data from the education platform, calculating the contextual distance data between questions, constructing a multi-head attention mechanism, and dynamically matching forgetting rate parameters, the shortcomings of a globally unified forgetting rate were solved.

Benefits of technology

It accurately captures the knowledge forgetting characteristics of students at different stages, improves the prediction accuracy of knowledge mastery status, and makes the prediction results more consistent with the students' actual learning level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121920595A_ABST
    Figure CN121920595A_ABST
Patent Text Reader

Abstract

The invention provides a staged forgetting rate-based student knowledge mastering prediction method and related device, and the method comprises the steps: firstly obtaining education platform log answer data, carrying out the standardization processing of the data, obtaining a standardized answer data set, and determining the stage affiliation result of each student based on the data set through employing a Bayesian probability inference method, meanwhile, a student answering time sequence is constructed, context distance data between questions in the sequence is calculated, then a staged forgetting rate knowledge tracking model is constructed in combination with a student stage attribution result, the answering time sequence and the context distance data, training is completed, and finally the trained model is adopted to predict the knowledge mastering condition of the student. By matching the corresponding forgetting rate parameters for the students in different learning stages, the knowledge forgetting characteristics of the students in different stages can be accurately captured, the prediction precision of the knowledge mastering state of the students is effectively improved, and the prediction result is more fit for the actual learning level of the students.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to a method and related apparatus for predicting student knowledge mastery based on staged forgetting rates. Background Technology

[0002] Currently, methods for predicting student knowledge mastery are widely used in the field of intelligent education. Their core is to analyze students' historical learning data, model their mastery of knowledge points, and then predict their subsequent learning outcomes. Early methods were mostly based on statistical models, inferring students' knowledge levels from their correct or incorrect answers. With the development of deep learning technology, knowledge tracking methods based on sequence modeling have emerged. These methods construct sequences of student answer records in chronological order, utilize neural networks to learn the correlation between answer behavior and knowledge mastery, and capture the correlation features and temporal patterns between questions through structures such as embedding layers and attention modules. This allows for dynamic prediction of students' knowledge mastery and has become the mainstream technological direction in this field.

[0003] Existing methods for predicting student knowledge mastery generally use a globally uniform forgetting rate parameter when modeling the forgetting process of students' knowledge. This means that all students are assumed to forget knowledge points at the same rate, without considering the significant differences in cognitive abilities and knowledge reserves among students at different learning stages. As a result, the forgetting rate parameter does not match the actual forgetting pattern of students, which leads to a decrease in the accuracy of the model's prediction of students' knowledge mastery status at different stages and a large deviation between the prediction results and the actual situation. Summary of the Invention

[0004] This application provides a method and related apparatus for predicting student knowledge mastery based on staged forgetting rate. It can accurately capture the knowledge forgetting characteristics of students at different stages, effectively improve the prediction accuracy of students' knowledge mastery status, and make the prediction results more consistent with students' actual learning level.

[0005] A first aspect of this application provides a method for predicting student knowledge mastery based on a staged forgetting rate, the method comprising:

[0006] After obtaining the answer data from the logs of the education platform and performing standardization processing, a standardized answer dataset is obtained.

[0007] Based on the standardized answer dataset, the Bayesian probabilistic inference method was used to determine the stage affiliation of each student.

[0008] Based on the standardized answer dataset, construct an answer time series and calculate the context distance data between questions in the answer time series;

[0009] Based on the student stage attribution results, answer time series, and context distance data, a stage-based forgetting rate knowledge tracking model is constructed.

[0010] The staged forgetting rate knowledge tracking model is trained to obtain the trained staged forgetting rate knowledge tracking model.

[0011] The trained, phased forgetting rate knowledge tracking model is used to predict students' knowledge mastery, and the predicted results of students' knowledge mastery are obtained.

[0012] In one possible implementation, determining the stage affiliation of each student using a Bayesian probabilistic inference method based on the standardized answer dataset includes:

[0013] The question knowledge points and question meta-information are extracted from the standardized answer dataset, and the candidate mapping relationship between the knowledge points and the primary, junior high and senior high school stages is determined by the keyword matching method.

[0014] Based on the candidate mapping relationships, construct a knowledge point-stage mapping table;

[0015] Based on the standardized answer dataset, the frequency of each knowledge point in the student's answer records is determined, and the distribution characteristics of the student's knowledge points are obtained.

[0016] Prior probabilities during the construction phase;

[0017] Based on the knowledge point-stage mapping table, determine the conditional probability of a knowledge point in the corresponding stage;

[0018] Based on the distribution characteristics of the knowledge points, the prior probability of each stage, and the conditional probability of each knowledge point, the posterior probability of a student belonging to each stage is calculated using Bayes' theorem.

[0019] Based on the pre-set confidence threshold and posterior probability, the stage assignment result for each student is determined.

[0020] In one possible implementation, the step of constructing a time series of answers based on the standardized answer dataset and calculating the contextual distance data between questions in the time series includes:

[0021] Group the student IDs in the standardized answer dataset and extract the question ID, answer result, and answer timestamp for each group;

[0022] Construct a student answer time sequence based on the answer timestamp, question ID, and answer result;

[0023] If the length of the student answer time series exceeds the preset maximum sequence length, the student answer time series is segmented to obtain multiple subsequences of fixed length;

[0024] The questions in the student answer time series and subsequences are embedded to obtain the query vector and key vector for each question;

[0025] Based on the query vector and key vector, calculate the similarity between the questions at the current time t and the questions at the historical time t';

[0026] Then, the similarity scores of the questions are normalized using softmax to obtain the similarity weights.

[0027] The context-aware distance is calculated based on the similarity weights and time differences.

[0028] In one possible implementation, the step of constructing a phased forgetting rate knowledge tracking model based on the student's stage affiliation results, answer time series, and contextual distance data includes:

[0029] Construct a question embedding layer and a response embedding layer for the knowledge tracing model;

[0030] The fusion result of the question embedding vector and the response embedding vector is linearly projected according to a preset number of attention heads H to generate Query vector, Key vector and Value vector respectively;

[0031] Initialize the learnable original parameter matrix, and transform the original parameter matrix using the softplus activation function to obtain the staged forgetting rate parameter;

[0032] Based on the student stage affiliation results, the stage-based forgetting rate parameter is matched to obtain the matched stage-based forgetting rate parameter;

[0033] Calculate the forgetting decay factor based on the context distance data and the staged forgetting rate parameter after matching;

[0034] The overall attention score is determined based on the query vector, key vector, and forgetting decay factor.

[0035] The comprehensive attention score is then normalized using softmax to obtain the attention weights.

[0036] Based on the attention weights and the Value vector, the final output of the multi-head attention mechanism is determined;

[0037] An output layer is built after the multi-head attention module. The output layer converts the feature output into the predicted probability of the answer accuracy, thus obtaining a complete knowledge tracking model.

[0038] In one possible implementation, the staged forgetting rate parameter is expressed as follows:

[0039] θ h,s=softplus(γ) h,s ),

[0040] Where, θ h,s For staged forgetting rate, γ h,s These are the original values ​​for the stage parameters.

[0041] In one possible implementation, the formula for expressing the post-matching staged forgetting rate parameter is as follows:

[0042]

[0043] Where, θ b,h Let h be the forgetting rate corresponding to the attention head h of batch sample b. Let s be the forgetting rate of the sample at attention head h during this stage. b For sample b, the stage is...

[0044] In one possible implementation, training the staged forgetting rate knowledge tracking model to obtain the trained staged forgetting rate knowledge tracking model includes:

[0045] Using binary cross-entropy as the prediction loss function, the error between the predicted probability and the actual answer result of the staged forgetting rate knowledge tracing model is calculated.

[0046] A stage smoothing regularization term is introduced to constrain the difference range of forgetting rate parameters in each stage, and L2 regularization terms are added to the parameters of the embedding layer and the projection layer.

[0047] The AdamW optimizer is used, with initial learning rate and batch size set, and an early stopping strategy is executed based on the validation set AUC metric.

[0048] Iteratively minimize the total loss, save the optimal model parameters, and obtain the trained staged forgetting rate knowledge tracking model.

[0049] This example provides a method for predicting student knowledge mastery based on staged forgetting rates. First, log data from an educational platform is acquired and standardized to obtain a standardized answer dataset. Then, a Bayesian probabilistic inference method is used to determine the stage affiliation of each student based on this dataset. Simultaneously, a student answer time series is constructed, and the contextual distance between questions in the series is calculated. Subsequently, a staged forgetting rate knowledge tracking model is constructed and trained by combining the student stage affiliation, answer time series, and contextual distance data. Finally, the trained model is used to predict students' knowledge mastery. By matching corresponding forgetting rate parameters to students at different learning stages, this method solves the problem of mismatch between the existing method's use of a globally uniform forgetting rate and the actual forgetting patterns of students. It can accurately capture the knowledge forgetting characteristics of students at different stages, effectively improving the prediction accuracy of students' knowledge mastery status and making the prediction results more consistent with students' actual learning levels.

[0050] A second aspect of this application provides a student knowledge mastery prediction device based on a staged forgetting rate, the device comprising:

[0051] The first acquisition unit is used to acquire the answer data from the logs of the education platform, and after standardization processing, obtain a standardized answer dataset.

[0052] The first processing unit is used to determine the stage attribution result of each student based on the standardized answer dataset using the Bayesian probability inference method.

[0053] The second processing unit is used to construct an answer time series based on the standardized answer dataset and calculate the context distance data between questions in the answer time series;

[0054] The model building unit is used to build a phased forgetting rate knowledge tracking model based on the student's stage affiliation results, answer time series, and context distance data.

[0055] The model training unit is used to train the staged forgetting rate knowledge tracking model to obtain the trained staged forgetting rate knowledge tracking model.

[0056] The prediction unit is used to predict students' knowledge mastery using the trained phased forgetting rate knowledge tracking model, and obtain the predicted results of students' knowledge mastery.

[0057] A third aspect of this application provides a terminal including a processor, an input device, an output device, and a memory, wherein the processor, input device, output device, and memory are interconnected, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute the steps of the student knowledge mastery prediction method based on staged forgetting rate as described in the first aspect of this application.

[0058] A fourth aspect of this application provides a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the student knowledge mastery prediction method based on staged forgetting rate in the first aspect of this application.

[0059] A fifth aspect of this application provides a computer program product, comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the student knowledge mastery prediction method based on staged forgetting rate in the first aspect of this application. The computer program product may be a software installation package. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This application provides a schematic diagram of the overall process for predicting student knowledge mastery based on staged forgetting rate in an embodiment of the present application.

[0062] Figure 2 This application provides a schematic diagram of the overall structure of a student knowledge mastery prediction device based on a staged forgetting rate.

[0063] Figure 3 This application provides a schematic diagram of the structure of a terminal.

[0064] Figure label:

[0065] First acquisition unit-1, first processing unit-2, second processing unit-3, model building unit-4, model training unit-5, prediction unit-6. Detailed Implementation

[0066] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0067] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0068] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0069] To better understand the student knowledge mastery prediction method based on staged forgetting rate provided in this application, a brief introduction to the scenarios in which this method is applied is given below. Existing knowledge tracing models mainly include deep knowledge tracing based on recurrent neural networks, DKVMN based on memory networks, and AKT models based on attention mechanisms. Although these models simulate the memory forgetting process through monotonically decaying attention mechanisms, they use a uniform global decay parameter θ, failing to reflect the significant differences in forgetting rates among students of different age groups. Furthermore, in actual educational data, students' grades or learning stages are often not clearly labeled, making individualized modeling difficult, and directly learning parameters individually for each student can lead to data sparsity and overfitting problems.

[0070] The student knowledge mastery prediction method based on staged forgetting rate is applied to a student knowledge mastery prediction device based on staged forgetting rate. Figure 1 A schematic diagram illustrating the overall process of a student knowledge mastery prediction method based on staged forgetting rates is shown. Figure 1 As shown, it includes:

[0071] S1. Obtain the answer data from the education platform logs, perform standardization processing, and obtain a standardized answer dataset.

[0072] In this example, the Junyi platform logs are converted into a standard interactive question-and-answer table, and exceptions and missing items are handled to output a standardized question-and-answer dataset. Specifically, timestamps are uniformly converted to Unix seconds or milliseconds, and then sorted by time after being grouped by user. Filtering rules include: deleting duplicate logs, deleting records with extremely long execution times, or marking them as exceptions and excluding them. Records missing "exercise" (knowledge points) or "time_done" (completion time) are discarded directly; for missing values, they are set to null but the record is retained, and then the standardized question-and-answer dataset is output.

[0073] S2. Based on the standardized answer dataset, the Bayesian probability inference method is used to determine the stage affiliation of each student.

[0074] Step S2 includes the following sub-steps:

[0075] S201. Extract the question knowledge points and question meta-information from the standardized answer dataset, and determine the candidate mapping relationship between the knowledge points and the primary, junior high, and senior high school stages through keyword matching method.

[0076] Among them, candidate mappings can be generated by matching question tags and question name keywords with a preset keyword list (such as "fraction", "integer" → Primary; "equation" → Secondary; "derivative" → High).

[0077] S202. Based on the candidate mapping relationship, construct a knowledge point-stage mapping table.

[0078] In this process, after the candidate mapping relationships are corrected by experts, a knowledge point-stage mapping table is constructed.

[0079] S203. Based on the standardized answer dataset, determine the frequency of each knowledge point in the student's answer record to obtain the student's knowledge point distribution characteristics.

[0080] For student u, the set of knowledge points involved in their answers is Q. u ={c1,c2,…,c n}

[0081] S204, Prior probabilities during the construction phase.

[0082] Here, let P(S=s) be the empirical prior (if there is no prior, it can be assumed to be uniform), or estimated according to the school / grade distribution.

[0083] S205. Based on the knowledge point-stage mapping table, determine the conditional probability of a knowledge point in the corresponding stage.

[0084] This can be solved using a problem-stage mapping approach, expressed as follows:

[0085]

[0086] In the formula, Q u Let S be the set of questions or sequence of knowledge points for student u, S be the stage variable, s be the stage number (e.g., primary school, junior high school, senior high school), and c be the stage number. i For set Q u The i-th knowledge point identifier in the text, P(c i |S=s) represents the knowledge point c that appears in stage s. i The conditional probability.

[0087] Wherein, P(c i |S=s) can be estimated from the proportion of questions at the same stage in the question bank, or set as

[0088]

[0089] To avoid a zero probability.

[0090] In the formula, f(c) is the mapping function from knowledge point to stage, ∈ is the smoothing constant (e.g., 0.01), and S is the total number of stages.

[0091] S206. Based on the distribution characteristics of the knowledge points, the prior probability of the stage, and the conditional probability of the knowledge points, calculate the posterior probability of the student belonging to each stage using Bayes' theorem.

[0092] The formulas for the posterior probabilities of students belonging to each stage are shown below:

[0093]

[0094] In the formula, P(S=s|Qu) is the posterior probability, the probability that student u belongs to stage s. P(S=s) is the prior probability of stage s (which can be set as empirical prior or uniform distribution), and k is the index of all stages in the stage set (summation symbol ∑). k (loop variable).

[0095] Calculate the posterior probability that student u belongs to stage s using Bayes' theorem. It is the likelihood P(Q u The product of |S=s) and the prior P(S=s) divided by the total probability (normalization constant)

[0096] S207. Determine the stage assignment result for each student based on the pre-set confidence threshold and posterior probability.

[0097] First, a confidence threshold τ is set; if the maximum probability value is... If the value is greater than or equal to τ, the model is considered to be highly reliable in its stage inference for that student. Therefore, the student's stage_ids[user] is determined as the stage with the highest probability argmax. s Otherwise, it is marked as "mixed phase" and a weighted phase strategy is adopted.

[0098] Furthermore, for students whose stage is uncertain, the weight vector w is calculated. s =P(S=s|Q), and use weighted combinations during training (e.g., θ=∑ when choosing θ). s w s θ s Alternatively, students can be placed in "mixed groups" and assigned to the closest relevant stage.

[0099] Output: stage_ids (by user)

[0100] Important note: Use smoothness ∈ to prevent unseen concepts from causing zero probability.

[0101] For students with long-term activity, it may be necessary to use the most recent N answers (e.g., the most recent 100 answers) to estimate the stage, to avoid bias caused by outdated historical data.

[0102] S3. Based on the standardized answer dataset, construct an answer time series and calculate the context distance data between questions in the answer time series.

[0103] Step S3 includes the following sub-steps:

[0104] S301. Group the student IDs in the standardized answer dataset and extract the question ID, answer result and answer timestamp of each group.

[0105] S302. Based on the answer timestamp, question ID, and answer result, construct a student answer time sequence. Specifically, for each user, construct the sequence in ascending order of time:

[0106] {(q1,r1,t1),(q2,r2,t2),…,(q T ,r T ,t T )}

[0107] Where q is the question or knowledge point, r is the corresponding answer (0 or 1), and t is the timestamp of the answer.

[0108] S303. If the length of the student answer time sequence exceeds the preset maximum sequence length, the student answer time sequence is segmented to obtain multiple subsequences of fixed length.

[0109] If a student's length T is very large, the training is divided into slices according to the maximum sequence length L (e.g., 200), and each slice is trained using a sliding window or breakpoints.

[0110] S304. Embed the questions in the student answer time series and subsequences to obtain the query vector and key vector for each question.

[0111] S305. Based on the query vector and key vector, calculate the question similarity between the current time t and the historical time t', and then perform softmax normalization on the question similarity to obtain the similarity weight.

[0112] Wherein, for a given current time t, we define:

[0113]

[0114] In the formula, γ t,t'为 Similarity weight, q t ,k t' Let d represent the query vector at time t and the key vector at time t', respectively. k The dimension d / H for each attention head.

[0115] The similarity weights after Softmax normalization. This represents the similarity weights at the current time t, relative to all historical times (from τ'-1 to t), compared to the current query q. t The similarity percentage.

[0116] S307. Calculate the context-aware distance based on the similarity weight and time difference.

[0117] The formula for calculating the context-aware distance is as follows:

[0118]

[0119] In the formula, d(t,τ) is the context-aware distance, t is the current time (query), τ is the historical time (the key being followed), and |t-τ| is the sequence distance or absolute time difference (seconds). The specific implementation depends on the data characteristics.

[0120] Defined as the sum of the time distance |t-τ| multiplied by the similarity weights γt,t' at the midpoint (between τ+1 and t). It is used to simulate time intervals and the forgetting effect.

[0121] Calculating γ requires query / key similarity, so it is dynamically calculated in batches during forward propagation and gradient blocking is applied to d(t,τ). If we want to pre-calculate and cache d for common sequences, we need to calculate it once before each training batch. Here, the model's calculation is performed simultaneously for all samples in the current batch.

[0122] S4. Based on the student stage attribution results, answer time series, and context distance data, construct a staged forgetting rate knowledge tracking model.

[0123] Step S4 includes the following sub-steps:

[0124] S401. Construct the question embedding layer and response embedding layer of the knowledge tracing model.

[0125] This includes:

[0126] Embedding layer (title / response embedding)

[0127] Title embedding Response to embedding Alternatively, QA can be used to merge the embedding.

[0128] Input tensor shape:

[0129] -q_ids: [batch, seq](int)

[0130] -r_ids: [batch, seq] (int, 0 / 1)

[0131] - Embedded output:

[0132]

[0133] In the formula, e q Let e ​​be the embedding vector of the sequence of questions, with shape [B,L,d]. r Let E be the embedding vector of the answer response sequence (correct / incorrect), with shape [B,L,d]. q Embeddinglookup function to embed a mapping function into the problem. r In response to the embeddinglookup function, q is the question ID input tensor q_ids, which is an integer tensor of shape [B,L], r is the response ID input tensor r_ids, which is an integer tensor of shape [B,L] (0 or 1), B is the batch size, L is the sequence length (time steps), and d is the dimension of the embedding vector.

[0134] S402. The fusion result of the question embedding vector and the response embedding vector is linearly projected according to the preset number of attention heads H to generate Query vector, Key vector and Value vector respectively.

[0135] In this process, a linear projection is performed on each head (same as in the Transformer):

[0136] K = W K E,V = W V E

[0137] In the formula, Q is the Query tensor, K is the Key tensor, V is the Value tensor, and V is the projected output tensor used for attention calculation, with shape [B,L,H,d]. k ], W Q W K W V Let E be a linear mapping matrix, used to project the input embedding E onto the learnable weight matrix in the Q, K, V spaces, where E is the input embedding tensor and e is the question embedding. q and response embedding e r The combination, where H is the number of attention heads, d k The dimension of each attention head is calculated as d / H.

[0138] S403. Initialize the learnable original parameter matrix, and transform the original parameter matrix using the softplus activation function to obtain the staged forgetting rate parameter.

[0139] Wherein, the original parameter Γ is a learnable tensor:

[0140] Γ h,s =γ h,s

[0141] In the formula, Γ is the original learnable parameter matrix with shape [H,S]. h,s These are the original values ​​for the stage parameters, and can be any real number.

[0142] - The constraint is positive:

[0143] θ h,s =softplus(γ) h,s )

[0144] In the formula, θ h,s For staged forgetting rate, γ h,s For the initial values ​​of the stage parameters, the initial parameter γ is... h,sThe staged forgetting rate is obtained by applying the softplus function. This parameter is learnable. h is the attention head index (number of heads H), and s is the stage index (total number of stages S).

[0145] The softplus function is defined as follows:

[0146] softplus(x) = ln(1+e) x )

[0147] Wherein, softplus(x) is used to transform the original learnable parameter γ h,s The constraint is a positive activation function, where x is the input variable, and in this case, γ. h,s .

[0148] This function is used to guarantee θ h,s It is set to a positive value to prevent the forgetting rate from becoming negative or zero.

[0149] S404. Based on the student stage affiliation results, match the stage-based forgetting rate parameter to obtain the matched stage-based forgetting rate parameter.

[0150] For each sample b in the batch, there is a stage index stage_ids[b].

[0151] - Select the corresponding theta:

[0152]

[0153] In the formula, θ b,h Let h be the forgetting rate corresponding to the attention head h of batch sample b. This is the parameter actually used in attention calculation. In the staged forgetting rate matrix Γ (after softplus constraints), the values ​​corresponding to the head h and stage s are... b The specific value, S b The stage index or stage number (e.g., 0, 1, 2) for batch sample b is obtained through a stage inference algorithm. `stage_id[b]` stores the stage index (ID) used to determine the stage from θ. b,h The specific forgetting rate is found in the matrix. The formula describes how to dynamically select the appropriate forgetting rate parameter θ based on each student's stage during training.

[0154] S405. Calculate the forgetting decay factor based on the context distance data and the staged forgetting rate parameter after matching.

[0155] The scoring is performed using the following formula:

[0156]

[0157] In the formula, b is the batch sample index (batchsizeB), and Q... b,h,t Let K be the query vector containing sample b, attention head h, and time t. b,h,τ Let b be the key vector of the sample, h be the attention head, and τ be the time. This is a scaling factor used to prevent the dot product from becoming too large; it represents the dot product score in the standard attention mechanism of the Transformer.

[0158] The exponential decay calculation is performed using the following formula:

[0159] decay b,h,t,τ =exp(-θ) b,h ·d(t,τ))

[0160] In the formula, θ b,h Let θh,sb be the forgetting rate corresponding to batch sample b and attention head h. Before calculation, θh,sb is selected based on the inference stage sb of sample b, and d(t,τ) is the context-aware distance. An exponential decay term calculated based on the staged forgetting rate θb,h and the context-aware distance d(t,τ) is used to simulate the forgetting effect.

[0161] S406. Determine the comprehensive attention score based on the Query vector, Key vector, and forgetting decay factor.

[0162] The formula for calculating the overall attention score is as follows:

[0163] s b,h,t,τ =score b,h,t,τ ·decay b,h,t,τ

[0164] In the formula, s b,h,t,τ To obtain the overall attention score, the dot product similarity score is multiplied by the exponential decay factor (decay).

[0165] S407. Perform softmax normalization on the comprehensive attention score to obtain the attention weight.

[0166] The formula for calculating attention weights is as follows:

[0167]

[0168] In the formula, α b,h,t,τ The attention weights are obtained by performing Softmax normalization on the historical sequence τ' dimension of the comprehensive score s.

[0169] S408. Determine the final output of the multi-head attention mechanism based on the attention weights and the Value vector.

[0170] The final output of the multi-head attention mechanism is calculated using the following formula;

[0171]

[0172] In the formula, ∑ τ α b,h,t,τ V b,h,τ The output of a single attention head is the value vector V at historical time τ. b,h,τ According to its attention weight α b,h,t,τ Perform weighted summation, and concatenate the outer part. h (·) is to concatenate the outputs of all H attention heads (each with an output dimension of dk) along the feature dimension to restore its dimension to the original embedding dimension d.

[0173] In the above, gradient blocking should be performed when calculating d(t,τ) to stabilize training.

[0174] Theta is guaranteed to be positive using Softplus.

[0175] After selecting theta by sample in the batch, it needs to be reshaped to [B,H,1,1] for broadcast multiplication.

[0176] S409. After the multi-head attention module, build an output layer. The output layer converts the feature output into the predicted probability of the answer accuracy, thus obtaining a complete knowledge tracking model.

[0177] S5. Train the staged forgetting rate knowledge tracking model to obtain the trained staged forgetting rate knowledge tracking model.

[0178] Step S5 includes the following sub-steps:

[0179] S501. Using binary cross-entropy as the prediction loss function, calculate the error between the predicted probability and the actual answer result of the staged forgetting rate knowledge tracing model.

[0180] S502, Introduce a stage smoothing regularization term to constrain the difference range of forgetting rate parameters in each stage, and add L2 regularization terms for the embedding layer and projection layer parameters.

[0181] S503 uses the AdamW optimizer, sets the initial learning rate and batch size, and executes an early stopping strategy based on the validation set AUC metric.

[0182] S504. Iterate to minimize the total loss, save the optimal model parameters, and obtain the trained phased forgetting rate knowledge tracking model.

[0183] The specific implementation methods of steps S501 to S502 are as follows:

[0184] Predicted loss (summation over all masked locations):

[0185]

[0186] In the formula, y b,t The label for the actual answer result (0 or 1). The output is the probability of the model's prediction accuracy. This is the binary cross-entropy function. The binary cross-entropy (BCE) loss is used to measure the probability of the model's prediction accuracy. Compared with the actual answer result y b,t The differences.

[0187] - Stage smoothing regularization (shrunk according to the in-head mean):

[0188]

[0189] In the formula, λ is the stage smoothing regularization coefficient (hyperparameter, default 0.05), and θ h,s This represents the staged forgetting rate. This represents the average staged forgetting rate of the attention head h. It is achieved by constraining the forgetting rate θ of each stage within each attention head h. h,s The average forgetting rate across all stages of the head is close to that of the head. This helps alleviate the overfitting problem caused by sparse stage samples.

[0190] - Additional regular expressions added (e.g., L2 embedding in the question):

[0191]

[0192] In the formula, L2 is the weight decay term, used to penalize the L2 norm of the model weights W to prevent overfitting, and β is the L2 weight decay coefficient (hyperparameter, default le-5). Let W be the squared L2 norm of all learnable weights W in the model.

[0193] - Calculate the total loss:

[0194]

[0195] In the formula, Let be the total loss function for model training, which is the weighted sum of the three loss terms.

[0196] The optimization and hyperparameter settings are as follows:

[0197] Select the AdamW optimizer;

[0198] The initial learning rate is 1e-4 (adjustable range [1e-5, 5e-4]);

[0199] Choose batch_size as 32;

[0200] The head number H is 8, embeddingdimd=256, d_k=d / H;

[0201] The regularization coefficient λ is 0.05 by default (can be increased to 0.1 in sparse scenarios), and β (embedding L2) is 1e-5;

[0202] The number of training epochs is 20 (depending on the amount of data / early stopping);

[0203] Early Stopping is based on validation AUC, with a patience of 5 (stopping if there is no improvement after 5 consecutive rounds).

[0204] The numerical stability and implementation details are as follows:

[0205] Before softmax, perform scores = scores - scores.max(dim = -1, keepdim = True)[0] on scores to prevent overflow risk.

[0206] To prevent underflow or overflow, truncate exp(-theta*d) using the formula decay = torch.exp(torch.clamp(-theta*d,min=-50,max=50)).

[0207] Use float32 for d and detach(): d = d.detach().

[0208] Use a small initialization for the gamma parameter to keep the initial softplus value in a small positive range, thereby avoiding extreme decay in the early stages.

[0209] Other aspects include evaluation, visualization, and deployment.

[0210] Select evaluation indicators;

[0211] AUC (primary indicator), ACC

[0212] Phased indicators: Calculate the AUC for primary school / middle school / high school separately.

[0213] Perform interpretable visualization;

[0214] Plot θh,s (bar chart) for each head and each stage to observe the differences between stages.

[0215] Draw attention heatmaps (t×τ of α) for several example students to demonstrate how the model pays attention to historical interactions.

[0216] The function curve of exp(-θh,s·d) as a function of d is displayed to compare different stages.

[0217] Statistical significance;

[0218] By comparing with the baseline model (AKT, DKVMN global forgetting parameter θ), the bootstrap method was used to test the significance of the AUC improvement.

[0219] Perform t-tests or nonparametric tests on the differences in staged θ to verify whether the differences in forgetting rates between primary school, junior high school, and senior high school are significant.

[0220] Launch plan;

[0221] By comparing with the baseline model (AKT, DKVMN global forgetting parameter θ), the bootstrap method was used to test the significance of the AUC improvement.

[0222] Perform t-tests or nonparametric tests on the differences in stage θ to verify whether the differences in forgetting rates between primary school, junior high school, and senior high school are significant.

[0223] Deploy the prediction interface;

[0224] The input is (user_id latest historical sequence, question_id), and the server returns p (correct) and explanatory information (top-k historical interactions and attention weights).

[0225] For newly enrolled students (cold start):

[0226] Use the phase inference module to quickly estimate the phase or set it to a hybrid strategy.

[0227] S6. The trained phased forgetting rate knowledge tracking model is used to predict students' knowledge mastery, and the predicted results of students' knowledge mastery are obtained.

[0228] This example provides a method for predicting student knowledge mastery based on staged forgetting rates. First, log data from an educational platform is acquired and standardized to obtain a standardized answer dataset. Then, a Bayesian probabilistic inference method is used to determine the stage affiliation of each student based on this dataset. Simultaneously, a student answer time series is constructed, and the contextual distance between questions in the series is calculated. Subsequently, a staged forgetting rate knowledge tracking model is constructed and trained by combining the student stage affiliation, answer time series, and contextual distance data. Finally, the trained model is used to predict students' knowledge mastery. By matching corresponding forgetting rate parameters to students at different learning stages, this method solves the problem of mismatch between the existing method's use of a globally uniform forgetting rate and the actual forgetting patterns of students. It can accurately capture the knowledge forgetting characteristics of students at different stages, effectively improving the prediction accuracy of students' knowledge mastery status and making the prediction results more consistent with students' actual learning levels.

[0229] For those consistent with the above, please refer to Figure 2 , Figure 2 This application provides a schematic diagram of a student knowledge mastery prediction device based on a staged forgetting rate. Figure 2 As shown, the device includes:

[0230] The first acquisition unit 1 is used to acquire the answer data from the logs of the education platform, and after standardization processing, obtain a standardized answer dataset;

[0231] The first processing unit 2 is used to determine the stage attribution result of each student based on the standardized answer dataset using the Bayesian probability inference method.

[0232] The second processing unit 3 is used to construct an answer time series based on the standardized answer dataset and calculate the context distance data between questions in the answer time series;

[0233] Model building unit 4 is used to build a phased forgetting rate knowledge tracking model based on the student stage affiliation results, answer time series and context distance data;

[0234] Model training unit 5 is used to train the staged forgetting rate knowledge tracking model to obtain the trained staged forgetting rate knowledge tracking model.

[0235] Prediction unit 6 is used to predict students' knowledge mastery using the trained phased forgetting rate knowledge tracking model, and obtain the predicted results of students' knowledge mastery.

[0236] For examples consistent with the above embodiments, please refer to... Figure 3 , Figure 3A schematic diagram of a terminal structure provided in an embodiment of this application is shown in the figure. It includes a processor, an input device, an output device, and a memory. The processor, input device, output device, and memory are interconnected. The memory is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions. The program includes instructions for performing the following steps.

[0237] After obtaining the answer data from the logs of the education platform and performing standardization processing, a standardized answer dataset is obtained.

[0238] Based on the standardized answer dataset, the Bayesian probabilistic inference method was used to determine the stage affiliation of each student.

[0239] Based on the standardized answer dataset, construct an answer time series and calculate the context distance data between questions in the answer time series;

[0240] Based on the student stage attribution results, answer time series, and context distance data, a stage-based forgetting rate knowledge tracking model is constructed.

[0241] The staged forgetting rate knowledge tracking model is trained to obtain the trained staged forgetting rate knowledge tracking model.

[0242] The trained, phased forgetting rate knowledge tracking model is used to predict students' knowledge mastery, and the predicted results of students' knowledge mastery are obtained.

[0243] This example provides a method for predicting student knowledge mastery based on staged forgetting rates. First, log data from an educational platform is acquired and standardized to obtain a standardized answer dataset. Then, a Bayesian probabilistic inference method is used to determine the stage affiliation of each student based on this dataset. Simultaneously, a student answer time series is constructed, and the contextual distance between questions in the series is calculated. Subsequently, a staged forgetting rate knowledge tracking model is constructed and trained by combining the student stage affiliation, answer time series, and contextual distance data. Finally, the trained model is used to predict students' knowledge mastery. By matching corresponding forgetting rate parameters to students at different learning stages, this method solves the problem of mismatch between the existing method's use of a globally uniform forgetting rate and the actual forgetting patterns of students. It can accurately capture the knowledge forgetting characteristics of students at different stages, effectively improving the prediction accuracy of students' knowledge mastery status and making the prediction results more consistent with students' actual learning levels.

[0244] The above mainly describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the terminal includes the corresponding hardware structure and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0245] This application embodiment can divide the terminal into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0246] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the student knowledge mastery prediction methods based on staged forgetting rates as described in the above method embodiments.

[0247] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program that causes a computer to perform some or all of the steps of any of the student knowledge mastery prediction methods based on staged forgetting rates as described in the above method embodiments.

[0248] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0249] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0250] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0251] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0252] Furthermore, the functional units in the various embodiments of the application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.

[0253] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0254] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.

[0255] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for predicting student knowledge mastery based on staged forgetting rate, characterized in that, include: After obtaining the answer data from the logs of the education platform and performing standardization processing, a standardized answer dataset is obtained. Based on the standardized answer dataset, the Bayesian probabilistic inference method was used to determine the stage affiliation of each student. Based on the standardized answer dataset, construct an answer time series and calculate the context distance data between questions in the answer time series; Based on the student stage attribution results, answer time series, and context distance data, a stage-based forgetting rate knowledge tracking model is constructed. The staged forgetting rate knowledge tracking model is trained to obtain the trained staged forgetting rate knowledge tracking model. The trained, phased forgetting rate knowledge tracking model is used to predict students' knowledge mastery, and the predicted results of students' knowledge mastery are obtained.

2. The student knowledge mastery prediction method based on staged forgetting rate according to claim 1, characterized in that, The step of determining the stage affiliation of each student using Bayesian probabilistic inference based on the standardized answer dataset includes: The question knowledge points and question meta-information are extracted from the standardized answer dataset, and the candidate mapping relationship between the knowledge points and the primary, junior high and senior high school stages is determined by the keyword matching method. Based on the candidate mapping relationships, construct a knowledge point-stage mapping table; Based on the standardized answer dataset, the frequency of each knowledge point in the student's answer records is determined, and the distribution characteristics of the student's knowledge points are obtained. Prior probabilities during the construction phase; Based on the knowledge point-stage mapping table, determine the conditional probability of a knowledge point in the corresponding stage; Based on the distribution characteristics of the knowledge points, the prior probability of each stage, and the conditional probability of each knowledge point, the posterior probability of a student belonging to each stage is calculated using Bayes' theorem. Based on the pre-set confidence threshold and posterior probability, the stage assignment result for each student is determined.

3. The student knowledge mastery prediction method based on staged forgetting rate according to claim 1, characterized in that, The step of constructing a time series of answers based on the standardized answer dataset and calculating the contextual distance data between questions in the time series includes: Group the student IDs in the standardized answer dataset and extract the question ID, answer result, and answer timestamp for each group; Construct a student answer time sequence based on the answer timestamp, question ID, and answer result; If the length of the student answer time series exceeds the preset maximum sequence length, the student answer time series is segmented to obtain multiple subsequences of fixed length; The questions in the student answer time series and subsequences are embedded to obtain the query vector and key vector for each question; Based on the query vector and key vector, calculate the similarity between the questions at the current time t and the questions at the historical time t'; Then, the similarity scores of the questions are normalized using softmax to obtain the similarity weights. The context-aware distance is calculated based on the similarity weights and time differences.

4. The student knowledge mastery prediction method based on staged forgetting rate according to claim 3, characterized in that, The step of constructing a phased forgetting rate knowledge tracking model based on the student's stage affiliation results, answer time series, and contextual distance data includes: Construct a question embedding layer and a response embedding layer for the knowledge tracing model; The fusion result of the question embedding vector and the response embedding vector is linearly projected according to a preset number of attention heads H to generate Query vector, Key vector and Value vector respectively; Initialize the learnable original parameter matrix, and transform the original parameter matrix using the softplus activation function to obtain the staged forgetting rate parameter; Based on the student stage affiliation results, the stage-based forgetting rate parameter is matched to obtain the matched stage-based forgetting rate parameter; Calculate the forgetting decay factor based on the context distance data and the staged forgetting rate parameter after matching; The overall attention score is determined based on the query vector, key vector, and forgetting decay factor. The comprehensive attention score is then normalized using softmax to obtain the attention weights. Based on the attention weights and the Value vector, the final output of the multi-head attention mechanism is determined; An output layer is built after the multi-head attention module. The output layer converts the feature output into the predicted probability of the answer accuracy, thus obtaining a complete knowledge tracking model.

5. The student knowledge mastery prediction method based on staged forgetting rate according to claim 4, characterized in that, The formula for expressing the staged forgetting rate parameter is as follows: θ h,s =softplus(γ h,s ) Where, θ h,s To represent the staged forgetting rate, γ h,s These are the original values ​​for the stage parameters.

6. The student knowledge mastery prediction method based on staged forgetting rate according to claim 5, characterized in that, The formula for the staged forgetting rate parameter after matching is shown below: Where, θ b,h Let h be the forgetting rate corresponding to the attention head h of batch sample b. The forgetting rate of the sample at the attention head h during this phase, s b This refers to the stage of sample b.

7. The student knowledge mastery prediction method based on staged forgetting rate according to claim 4, characterized in that, The step of training the staged forgetting rate knowledge tracking model to obtain the trained staged forgetting rate knowledge tracking model includes: Using binary cross-entropy as the prediction loss function, the error between the predicted probability and the actual answer result of the staged forgetting rate knowledge tracing model is calculated. A stage smoothing regularization term is introduced to constrain the difference range of forgetting rate parameters in each stage, and L2 regularization terms are added to the parameters of the embedding layer and the projection layer. The AdamW optimizer is used, with initial learning rate and batch size set, and an early stopping strategy is executed based on the validation set AUC metric. Iteratively minimize the total loss, save the optimal model parameters, and obtain the trained staged forgetting rate knowledge tracking model.

8. A student knowledge mastery prediction device based on staged forgetting rate, characterized in that, include: The first acquisition unit is used to acquire the answer data from the logs of the education platform, and after standardization processing, obtain a standardized answer dataset. The first processing unit is used to determine the stage attribution result of each student based on the standardized answer dataset using the Bayesian probability inference method. The second processing unit is used to construct an answer time series based on the standardized answer dataset and calculate the context distance data between questions in the answer time series; The model building unit is used to build a phased forgetting rate knowledge tracking model based on the student's stage affiliation results, answer time series, and context distance data. The model training unit is used to train the staged forgetting rate knowledge tracing model to obtain the trained staged forgetting rate knowledge tracing model. The prediction unit is used to predict students' knowledge mastery using the trained phased forgetting rate knowledge tracking model, and obtain the predicted results of students' knowledge mastery.

9. A terminal, characterized in that, The system includes a processor, an input device, an output device, and a memory, which are interconnected. The memory stores a computer program, which includes program instructions. The processor is configured to invoke the program instructions to execute the student knowledge mastery prediction method based on staged forgetting rate as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the student knowledge mastery prediction method based on staged forgetting rate as described in any one of claims 1-7.

Citation Information

Cited By

  • Personalized physical exercise recommendation system and method based on big data analysis

    CN122155910A