A long-short term learning behavior fusion programming knowledge tracking method
Patent Information
- Application Number
- CN202611221420.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-13
AI Technical Summary
[0003]然而,在编程学习场景中,由于学生近期答题状态、算法复杂度与知识点综合性等因素,导致学生的作答结果常出现大幅度波动
[0015]有益效果:本发明提供了一种长短期学习行为融合的编程知识追踪方法,通过对历史题目信息分别进行长期学习信息提取和短期学习信息提取,能够从长、短两种时间尺度综合评判学生的学习能力,从而有效规避了短期学习状态波动对综合能力评估造成的干扰。同时,通过确定目标相关性特征和各历史题目对当前题目的重要性权重,能够精准量化历史题目与当前题目的关联程度。基于此,利用历史题目的历史题目信息,实现了对学生当前题目正确率的准确预测,显著提升了编程知识追踪的预测准确性。
Smart Images

Figure CN122905029A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning, and more particularly to a programming knowledge tracking method that integrates long-term and short-term learning behaviors. Background Technology
[0002] Programming knowledge tracking aims to dynamically assess an individual's programming knowledge status by modeling the history of their interactions with programming problems. Its core objective is to diagnose in real time a student's mastery of specific programming concepts, syntax rules, and algorithmic thinking, thereby accurately predicting their performance in subsequent programming tasks and allocating problems accordingly.
[0003] However, in programming learning scenarios, students' answers often fluctuate significantly due to factors such as their recent performance, algorithm complexity, and the comprehensiveness of the knowledge points. Existing programming knowledge tracking systems often fail to effectively separate the "interference of question difficulty" from "real knowledge growth," causing models to easily misattribute "failing difficult questions" to insufficient ability or "guessing easy questions correctly" to improved skill. This confusion not only obscures the system's understanding of students' actual programming abilities but also significantly reduces the accuracy of predicting answer results. Summary of the Invention
[0004] This invention provides a programming knowledge tracking method that integrates long-term and short-term learning behaviors. By combining long-term and short-term information on students' programming problems, this method can accurately determine the accuracy of students' answers to current questions, thereby improving the accuracy of programming knowledge tracking and prediction.
[0005] This invention provides a programming knowledge tracking method that integrates long-term and short-term learning behaviors, including: Based on the historical question information of each historical question and the current question information of the current question, determine the historical fusion vector of the historical question and the current feature vector of the current question; Based on the historical question information and the current question information for each historical question, the target relevance characteristics between each historical question and the current question are determined. The target relevance characteristics represent the degree of correlation between the historical question and the current question in terms of question attributes. Based on the historical fusion vector, the current feature vector, and the target relevance features, determine the importance weight of each historical question to the current question; Based on the historical question information, long-term learning information features are determined, and based on the target relevance features, the preset short-term duration, and the importance weights, short-term learning information features are determined; wherein, the long-term learning information features represent the long-term learning status of students based on all historical question information; and the short-term learning information features represent the short-term learning status of students based on historical question information within the preset short-term duration. Based on the long-term learning information features, short-term learning information features, and current question information, a credibility gating is determined, wherein the credibility gating is used to adjust the fusion ratio of historical question information to the prediction of the current question. The accuracy of the current question is determined based on the credibility gating, the historical fusion vector of each historical question, the current feature vector, and the importance weight.
[0006] Specifically, determining the historical fusion vector of the historical questions and the current feature vector of the current question based on the historical question information of each historical question and the current question information of the current question includes: The historical question information is mapped to a preset vector space to obtain the historical feature vector of the historical question. Different historical questions have corresponding question time sequences, and the question time sequence represents the solution time of the historical question. For any historical question, a historical fusion vector for the historical question is generated based on the historical feature vector of the historical question and the historical feature vectors of all historical questions preceding the historical question in the question time sequence of the historical question. The current question information is mapped to a preset vector space to obtain the current feature vector.
[0007] Specifically, the step of determining the target relevance characteristics between each historical question and the current question based on the historical question information and the current question information includes: Based on the question attributes of historical questions and the question attributes of the current question, determine whether there are the same knowledge tags between historical questions and the current question; Based on the question attributes of historical questions and the question attributes of the current question, determine the attribute similarity between the current question and historical questions; Obtain the ability difficulty interaction embedding table, and determine the difficulty ability characteristics from the ability difficulty interaction embedding table based on the difficulty of the current question and the student's current ability. The ability difficulty interaction embedding table represents the performance of students with different abilities when answering questions of different difficulty. Based on the knowledge tags, attribute similarity, and difficulty / ability characteristics, the target relevance characteristics between historical questions and current questions are determined.
[0008] Specifically, the acquisition capability difficulty interactive embedding table includes: Obtain each student's answers to each history question, as well as the global average accuracy rate for each history question; The student's ability level is determined based on the results of each answer, and the difficulty level of each history question is determined based on the global average accuracy rate. The student ability level and the question difficulty level are combined to obtain an ability difficulty combination; a corresponding feature vector is configured for each ability difficulty combination to obtain an ability difficulty interactive embedding table.
[0009] Specifically, the step of determining the importance weight of each historical question to the current question based on the historical fusion vector, the current feature vector, and the target relevance features includes: Attention analysis is performed based on each historical fusion vector, the current feature vector, and the target relevance features to obtain the importance weights of each historical fusion vector and the current feature vector.
[0010] Specifically, determining the long-term learning information characteristics based on the historical question information includes: Obtain the historical accuracy standard deviation, average consecutive error length, question switching rate, and programming language switching rate corresponding to the historical question information; The long-term behavior statistical vector is determined based on the historical accuracy standard deviation, the average consecutive error length, the question switching rate, and the programming language switching rate. The long-term behavioral statistical vector is subjected to feature mapping to obtain the long-term learning information features.
[0011] Specifically, determining the short-term learning information features based on the target relevance features, the preset short-term duration, and the importance weights of each feature includes: Obtain the target historical fusion vector corresponding to the target historical question within a preset short time period; Based on the target relevance characteristics and importance weights of each historical topic, candidate short-term observation characteristics are determined; The short-term learning information features are obtained by concatenating the historical fusion vectors of each target, the candidate short-term observation features, and the difficulty and ability features.
[0012] Specifically, determining the credibility gating based on the long-term learning information features, short-term learning information features, and the current feature vector includes: The long-term learning information features, short-term learning information features, and the current feature vector are fused to obtain the long-short-term fused features. Normalize each element of the long-short fusion feature to obtain the updated weight vector; Based on the weights of each position in the updated weight vector, the long-term learning information features and the short-term learning information features are weighted and fused to obtain the comprehensive learning information features; The integrated learning information features, short-term learning information features, and the current feature vector are concatenated to obtain a concatenated vector. The credibility gating is calculated based on the spliced vector.
[0013] Specifically, determining the accuracy of the current question based on the credibility gating, the historical fusion vector of each historical question, the current feature vector, and the importance weight includes: Based on the historical fusion vector and importance weight of each historical topic, generate a target-related context vector; Calculate the historical reference state corresponding to the historical fusion vector of each historical topic; Based on the credibility gating, the historical reference state and the target-related context vector are weighted and calculated to obtain the corrected context vector. The accuracy rate of the current question is determined based on the corrected context vector and the current feature vector.
[0014] Specifically, determining the accuracy of the current question based on the corrected context vector and the current feature vector includes: The corrected context vector and the current feature vector are concatenated to obtain the prediction vector; The predicted vectors are input into a pre-trained prediction model to obtain candidate scores; The candidate scores are adjusted based on the difficulty of the current question to obtain a corrected score. The corrected score is then normalized to obtain the accuracy rate of the current question.
[0015] Beneficial Effects: This invention provides a programming knowledge tracking method that integrates long-term and short-term learning behaviors. By extracting long-term and short-term learning information from historical question information separately, it can comprehensively evaluate students' learning abilities from both long and short time scales, effectively avoiding the interference of short-term learning status fluctuations on comprehensive ability assessment. Simultaneously, by determining the target relevance characteristics and the importance weight of each historical question to the current question, the correlation between historical and current questions can be accurately quantified. Based on this, utilizing historical question information, accurate prediction of students' current question accuracy is achieved, significantly improving the predictive accuracy of programming knowledge tracking. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below.
[0017] Figure 1 A flowchart illustrating a programming knowledge tracking method that integrates long-term and short-term learning behaviors, provided as an embodiment of the present invention. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0019] Example 1 Figure 1 This flowchart illustrates a programming knowledge tracking method that integrates short-term and long-term learning behaviors, provided as an embodiment of the present invention. This method is specifically applicable to scenarios involving predicting students' programming problem-solving accuracy and can be integrated into a programming problem-solving tutoring system. Based on the predicted accuracy of students' programming problem-solving abilities, the system dynamically adjusts the difficulty and focus of subsequent questions, thereby achieving personalized tutoring and effectively improving students' problem-solving skills and learning outcomes.
[0020] like Figure 1 As shown, it includes: Step 110: Based on the historical question information of each historical question and the current question information of the current question, determine the historical fusion vector of the historical question and the current feature vector of the current question.
[0021] Historical questions refer to programming questions that students have previously answered. Historical question information includes core data such as question number, question attributes, programming language, difficulty level, and answer result. Correspondingly, current question information may include question number, question attributes, programming language, and difficulty level. It should be noted that the historical questions naturally possess a chronological structure based on the order in which they were answered, thus forming a historical question sequence. The length of the historical question sequence is equal to the total number of historical questions. The historical question sequence allows for multiple consecutive answers to the same question—that is, multiple consecutive answers to the same question. to The history question identifiers can be the same, but the corresponding history question information may be different (e.g., and The answer regarding location was incorrect, while (To be correct). Therefore, the sequence of history questions can characterize the changes in students' learning status and the evolution of their abilities during the history answering process.
[0022] Specifically, since a student's learning ability at a specific point in time is related to all the questions answered before that point, the historical fusion vector of a particular historical question within a specific historical time series should contain information from all the historical questions answered before that question. In other words, for the historical fusion vector at time i, it encompasses the historical feature vectors corresponding to all historical questions before time i. In this way, the historical fusion vector of each historical question can cover all historical information that may affect its answer, thereby improving the comprehensiveness of the information. The current feature vector is a vectorized representation of the information for the current question.
[0023] Optionally, based on the historical question information of each historical question and the current question information of the current question, determine the historical fusion vector of the historical question and the current feature vector of the current question, including: The historical question information is mapped to a preset vector space to obtain the historical feature vector of the historical question. Different historical questions have corresponding question time sequences, and the question time sequence represents the solution time of the historical question. For any historical question, the historical fusion vector of the historical question is generated based on the historical feature vector of the historical question and the historical feature vectors of the historical questions preceding the question time sequence of the historical question. The current question information is mapped to the preset vector space to obtain the current feature vector.
[0024] Specifically, question information can be mapped to a vector space through embedding, thereby obtaining vectorized historical question information, i.e., historical feature vectors.
[0025] For example: ; in, Indicates the first The historical feature vector of each historical topic (historical topic with time sequence i). This indicates a function that jointly embeds the question information and the answer result. This indicates the question information for history questions. This indicates the answer to a history question. Similarly, , This represents the current feature vector of the current problem. This indicates that the question is embedded in a function. This indicates the question attributes of the current question.
[0026] Specifically, the above formula is used to perform vector fusion of historical questions and their corresponding answers, and map them to historical feature vectors in a preset form, which facilitates subsequent calculations and processing.
[0027] Furthermore, , Indicates the first The historical fusion vector of each historical question can be used as the hidden state representation of the historical question. This refers to a causal sequence encoder (such as GRU, LSTM, or causal Transformer), where the encoding of the output position i depends only on the input position. Elements, future information ( Subsequent elements are not allowed to leak into the past in order to maintain temporal causality and avoid interference from future information. This represents the historical feature vector from the first historical question to the second historical question. A vector sequence consisting of the historical feature vectors of each historical topic.
[0028] Specifically, for a historical question at a specific time i, its historical fusion vector incorporates information from all historical questions prior to time i.
[0029] Step 120: Based on the historical question information and the current question information, determine the target relevance characteristics between each historical question and the current question. The target relevance characteristics represent the degree of correlation between the historical question and the current question in terms of question attributes.
[0030] Among them, question attributes are information that characterizes the question itself; these can be obtained through question metadata, specifically including the set of knowledge concept tags tested, difficulty level, and question type. Target relevance features are comprehensive features generated by integrating the characteristics of multiple question attributes. The purpose is to determine the degree of correlation between the current question and historical questions from multiple attribute dimensions. The greater the correlation between the historical questions and the current question in terms of question attributes, the closer the answers to the historical questions and the current question are likely to be, thus allowing for the inference of the accuracy rate of the current question's answer.
[0031] Optionally, based on the question attributes of historical questions and the question attributes of the current question, determine whether there are the same knowledge tags between historical questions and the current question; determine the attribute similarity between the current question and the historical questions based on the question attributes of historical questions and the question attributes of the current question; obtain an ability-difficulty interaction embedding table, and determine the difficulty-ability features from the ability-difficulty interaction embedding table based on the difficulty of the current question and the student's current ability, wherein the ability-difficulty interaction embedding table represents the performance of students with different abilities when answering questions of different difficulty; determine the target relevance features between historical questions and the current question based on the knowledge tags, attribute similarity, and difficulty-ability features.
[0032] Among them, knowledge tags are labels that identify the knowledge concepts or knowledge points tested in the questions, and attribute similarity is a measure of the similarity between historical questions and current questions in terms of question attributes. It can be obtained by calculating the Jaccard similarity or other similarity indicators between the question attributes of historical questions and current questions, or it can include a similarity score based on the intersection-union ratio of the knowledge tag sets. That is, the larger the intersection-union ratio of the knowledge tag sets of historical questions and current questions, the more overlapping the tags of historical questions and current questions are, and the more similar they are. The ability difficulty cross-embedding table represents the performance of students with different abilities when answering questions of different difficulty levels. The element (i, j) in row i and column j of the table represents the student's performance on a question with difficulty level i and student ability j. The performance is configured in (i, j) in the form of a feature vector.
[0033] Optionally, the ability difficulty interactive embedding table includes: Obtain each student's answer to each history question, as well as the global average accuracy rate of each history question; determine each student's ability level based on the answer results, and determine the difficulty level of each history question based on the global average accuracy rate; combine each student's ability level with each question's difficulty level to obtain an ability-difficulty combination; configure a corresponding feature vector for each ability-difficulty combination to obtain an ability-difficulty interactive embedding table.
[0034] Specifically, students' abilities can be categorized based on their answers to various history questions and the overall average accuracy rate of those questions. The difficulty of the history questions can also be categorized. For example, based on the overall average accuracy rate, the difficulty of the questions can be divided into N levels; if a student answers a question at the corresponding level correctly, they receive the corresponding score. By combining the answers to all history questions, a student's total score can be obtained, and M student ability levels can be determined based on this total score. Subsequently, the M student ability levels are combined with the N question difficulty levels to obtain M×N ability difficulty combinations. Different feature vectors are then assigned to different ability difficulty combinations to reflect the performance of students at that ability level in answering questions of that difficulty level.
[0035] Furthermore, based on the aforementioned knowledge tags, attribute similarity, and difficulty / ability characteristics, the target relevance characteristics between historical questions and the current question are determined, including: Knowledge tags are binary feature value tags. If there is a common knowledge tag between a historical question and the current question, the knowledge tag value is 1; otherwise, it is 0. The difficulty and ability features are the feature vectors corresponding to the above combination of ability and difficulty.
[0036] For example, the target relevance features can be determined using the following formula: Indicates the first Historical interactions (historical questions) and the current question Target relevance characteristics, This represents a relational fusion multilayer perceptron used for feature fusion and concatenation after standardizing vectors of multiple different dimensions. Furthermore, It can be a type of feedforward neural network, consisting of an input layer, one or more hidden layers, and an output layer, with fully connected layers, and learns complex mappings through non-linear activation functions. Its function is to map knowledge labels, attribute similarity, and difficulty / ability features to target relevance features of a specified dimension. The specific training process of this neural network is not limited here. This represents the similarity vector obtained by mapping the Jaccard attribute similarity. This represents the tag vector corresponding to the values of the knowledge tags; Feature vectors representing difficulty and ability characteristics.
[0037] The forms of expression are as follows: The feature vector corresponding to the difficulty and ability features. Indicates an embedded function, used to... and The features are concatenated and merged into a feature vector of a preset dimension. Indicates the current prediction time Student ability levels This indicates the difficulty level of the current question.
[0038] Step 130: Determine the importance weight of each historical question to the current question based on the historical fusion vector, the current feature vector, and the target relevance features.
[0039] Specifically, attention analysis is performed based on each historical fusion vector, the current feature vector, and the target relevance features to obtain the importance weights of each historical fusion vector and the current feature vector.
[0040] For example, the importance weights can be determined using the following formula: Indicates the first Historical questions can be used to predict current questions. Importance weights (attention weights).
[0041] All are attention matrices, obtained through a pre-trained attention neural network: the query transformation matrix transforms the feature vector of the current question. A linear mapping is used to represent a query vector. The key transformation matrix represents the fusion vector of historical interactions. Mapped to key vectors; The gated transformation matrix is used to transform the target correlation features. The mapping is to a context-enhanced vector, and the further key vector is added to the context-enhanced vector. Together, they form a "key-context" joint representation, which, along with the query vector, constitutes a "key-context" joint representation. The dot product is scaled Then, it is used to measure the similarity between the current question and historical interactions in the feature space. Scaling factor middle, for The dimension of similarity serves to suppress excessively large dot product results and ensure the stability of the training process. Finally, by normalizing the above similarity, the importance weight of each historical interaction to the current prediction is obtained. This represents the current feature vector of the current question; Indicates the first A historical fusion vector of historical interactions, This refers to the target relevance feature.
[0042] Step 140: Based on the historical question information, determine the long-term learning information characteristics, and based on the target relevance characteristics, the preset short-term duration, and the importance weights, determine the short-term learning information characteristics; wherein, the long-term learning information characteristics represent the long-term learning status of students based on all historical question information; the short-term learning information characteristics represent the short-term learning status of students based on historical question information within the preset short-term duration.
[0043] Specifically, regarding the characteristics of long-term learning information: Among them, long-term learning information features represent the long-term behavioral state of students based on all historical question information representations. This can be considered a priori state, used to characterize the stable behavioral patterns formed by students over a relatively long historical period (specifically, the historical period corresponding to the length of the historical question sequence). Furthermore, the accuracy rate of answering questions, the number of trials and errors, the frequency of question switching, and the frequency of programming language switching can all reflect the student's learning status and learning ability from different perspectives. Long-term learning information features are comprehensive features integrating multiple dimensions of the student's learning status under long-term historical activities.
[0044] Optional methods for determining the characteristics of long-term learning information include: Obtain the historical accuracy standard deviation, average consecutive error length, question switching rate, and programming language switching rate corresponding to the historical question information; determine the long-term behavior statistical vector based on the historical accuracy standard deviation, the average consecutive error length, the question switching rate, and the programming language switching rate; perform feature mapping on the long-term behavior statistical vector to obtain the long-term learning information features.
[0045] Among them, the standard deviation of historical accuracy represents the fluctuation of accuracy in students' long-term learning behavior, the average consecutive error length represents the average duration / number of consecutive errors when students answer historical questions, the question switching rate reflects students' proficiency with historical questions, and the programming language switching rate reflects students' proficiency and preference for different programming languages.
[0046] Specifically, the historical accuracy standard deviation, average consecutive error length, question switching rate, and programming language switching rate can be vectorized, and then concatenated based on the vectorized average consecutive error length, question switching rate, and programming language switching rate to obtain a long-term behavioral statistical vector. The long-term behavioral statistical vector can then be mapped and spatially transformed to obtain long-term learning information features with preset dimensional requirements.
[0047] For example, long-term learning information features can be represented as: ; in, For long-term learning of information characteristics, Representing students, For long-term behavioral statistics vectors, It is a pre-trained neural network model used to map long-term behavioral statistical vectors into long-term learning information features of a preset dimension. Represented as: By using the standard deviation of historical accuracy Average consecutive error length Question switching rate and programming language switching rate This is obtained by concatenating vectors. The question switching rate is represented as: , It measures the frequency of question switching within a sequence of historical questions. This indicates the length of the historical question sequence, i.e., the number of historical questions referenced in this prediction. When the sequence length is insufficient, it can be handled by padding with zeros or interpolation. The identifier representing the i-th answer. For indicator functions When the The questions answered in the second attempt are the same as those in the first attempt. The value is 1 if the problem is different (i.e., a problem switch occurs), otherwise it is 0; the summation term accumulates from i=2 to... The total number of question switches that actually occurred from the second question to the end of the sequence was counted. In the denominator This gives the theoretically maximum number of switches possible for this length sequence (maximum number of switches). (times), and ensure that when the maximum value operation is performed, The denominator is not less than 1, thus avoiding division by zero errors. Therefore, The value ranges from 0 to 1, with a higher value indicating more frequent question switching in the past answers. Similarly, the programming language switching rate... It measures the frequency of programming language switching in historical responses, and its calculation formula is as follows: This indicates the length of the sequence used by the historical programming language, i.e., the number of historical responses referenced in this prediction. When the sequence length is insufficient, it can be handled by padding with zeros or interpolation. Representing the The programming language identifier used in this response For indicator functions The value is 1 if the programming language used in the i-th response is different from that in the (i-1)-th response (i.e., a language switch occurs); otherwise, the value is 0. Summation term from Accumulate to The total number of programming language switches that actually occurred from the second response to the end of the sequence was calculated. In the denominator This gives the theoretically maximum number of switches possible for this length sequence (maximum number of switches). (times), and ensure that when the maximum value operation is performed, The denominator is not less than 1, thus avoiding division by zero errors. The value ranges from 0 to 1. A larger value indicates a more frequent switching of programming languages in the historical responses, and a shorter average consecutive error length. This characterizes the average duration of incorrect answers during a student's long-term learning process, for example: Specifically, This represents the answer to the i-th history question in the sequence of history questions. If the answer is correct, then... , misspelled , preset Therefore, the numerator is the total number of errors, and the denominator is only valid when... and The clock is set to 1; therefore, the denominator represents the number of erroneous segments. For example, if the sequence of answers is [1, 1, 0, 1], then the numerator = 3, and the denominator = (1*1) + (1*0) + (0*0) + (1*1) = 2. Therefore, It should be noted that if the answer results for the sequence of history questions are all correct, then... It is 0.
[0048] Specifically, regarding the characteristics of short-term learning information: Among these features, short-term learning information reflects students' immediate learning status within a preset short period. In question-answering scenarios, students' answers are influenced not only by their long-term learning ability but also directly by their short-term learning status. Therefore, integrating long-term and short-term features can effectively improve the accuracy of question accuracy prediction.
[0049] Specifically, obtain the target historical fusion vector corresponding to the target historical question within a preset short period of time; Based on the target relevance characteristics and importance weights of each historical topic, candidate short-term observation characteristics are determined; The short-term learning information features are obtained by concatenating the historical fusion vectors of each target, the candidate short-term observation features, and the difficulty and ability features.
[0050] Here, the preset short-term duration refers to the number of recent interactions used to represent short-term behavior (for example, an interaction time window can be preset, and historical questions within the window can be used as recent reference questions; for instance, the window length can be 5). In this case, the model selects only the last 5 historical questions in the historical question sequence as target historical questions, and the corresponding target historical fusion vector encodes the student's behavioral information within these 5 most recent learning cycles. Compared with the complete historical sequence, the short-term learning information features only fuse a small amount of history close to the current moment, thus reflecting the student's immediate learning status more sensitively.
[0051] Specifically, the characteristics of short-term learning information can be represented by the following formula: Among them, the characteristics of short-term learning information are: , These are candidate short-term observation features; The target historical fusion vector; This is a feature vector representing the difficulty and ability characteristics. Specifically, , Weighting the importance of history topics This refers to the target relevance feature. For pre-trained neural networks, used to... Perform vector concatenation and merge into a specific dimension. .
[0052] Specifically, long-term learning information features can reflect stable behavioral patterns formed by students over a longer historical period, while short-term learning information features are used to describe local behavioral evidence that is directly related to the target question near the current prediction time. Therefore, by combining long-term and short-term approaches, we can accurately describe the student's overall learning status, which is convenient for predicting the accuracy of subsequent question answers.
[0053] Step 150: Determine the credibility gating based on the long-term learning information features, short-term learning information features, and the current feature vector. The credibility gating is used to adjust the fusion ratio of historical question information to the prediction of the current question.
[0054] Among them, the credibility gating is an overall credibility scalar used to adjust the fusion ratio of historical question information to the prediction of the current question.
[0055] Specifically, the long-term learning information features, short-term learning information features, and the current feature vector are fused to obtain a long-short-term fused feature; each element of the long-short-term fused feature is normalized to obtain an updated weight vector; based on the weights of each position in the updated weight vector, the long-term learning information features and short-term learning information features are weighted and fused to obtain a comprehensive learning information feature; the comprehensive learning information feature, short-term learning information features, and the current feature vector are concatenated to obtain a concatenated vector; and a confidence gating is calculated based on the concatenated vector.
[0056] For example, the confidence gating can be calculated in the following way: ; Indicates overall credibility (credibility gating). This represents an activation function of the Sigmoid form, with a range of (0,1). Indicates intermediate behavior state, This represents the characteristics of short-term learning information. This represents the current feature vector. For pre-trained multilayer perceptron models, used to... Integration is characterized by both short-term and long-term integration, specifically... The output is a scalar, and then through Normalizing the long-term and short-term fusion characteristics yields .
[0057] Furthermore, It can be determined using the following formula: ;in, This is an intermediate behavior state vector resulting from the fusion of long-term and short-term features. Each element represents the proportion of long-term and short-term features retained at the corresponding time point. This is a channel-level update gate used to determine the fusion ratio between long-term and short-term features. This represents element-wise multiplication. For long-term learning of information characteristics, This represents the short-term learning information characteristics. Furthermore, this formula essentially borrows the idea of dynamic balance between prior estimation and observation update in Kalman filtering, implementing a Kalman-filter-inspired gating update mechanism in the neural feature space to ensure the effective fusion of long-term and short-term information.
[0058] in, , For long-term learning of information characteristics, This represents the characteristics of short-term learning information. This represents the current feature vector. For pre-trained multilayer perceptron models, used to... Vector concatenation and fusion are performed to output a concatenated vector of a preset dimension. Each element of the concatenated vector is normalized using a sigmoid function to obtain the channel-level update gate. .
[0059] Specifically, when the reliability of short-term observations is higher than that of long-term behavioral priors, the model can assign higher weights to short-term contexts to capture students' immediate changes in knowledge state; when short-term behavior has strong fluctuations or potential noise, the model can introduce more stable historical reference information to improve the robustness of knowledge state estimation.
[0060] Step 160: Determine the accuracy of the current question based on the credibility gating, the historical fusion vector of each historical question, the current feature vector, and the importance weight.
[0061] Specifically, based on the historical fusion vector and importance weight of each historical question, a target-related context vector is generated; the historical reference state corresponding to the historical fusion vector of each historical question is calculated; based on the credibility gating, the historical reference state and the target-related context vector are weighted and calculated to obtain a corrected context vector; based on the corrected context vector and the current feature vector, the accuracy of the current question is determined.
[0062] Specifically, the historical fusion vector and importance weight of each historical topic can be weighted and calculated to obtain the target-related context vector. The specific formula is as follows: in, Let be the target-related context vector, where i is the time sequence identifier of the historical questions. Let i be the historical fusion vector corresponding to historical question i. For the current prediction time t, the importance weight of the historical question i. The attention matrix is obtained using the same network parameters of the attention neural network as in step 130.
[0063] Furthermore, the formula for calculating the context vector is revised as follows: in, To correct the context vector, For credibility gating, For the target-related context vector, This provides a historical reference state for students up to the current prediction time.
[0064] ; The average fusion vector, This is a pre-trained multilayer perceptron model. ,in, Let i be the historical fusion vector corresponding to historical question i. For a valid sequence mask, To prevent small quantities from being excluded.
[0065] Specifically, due to the target-related context vector It is calculated using a very small number of target historical questions similar to the current question. Therefore, if the target historical questions happen to contain noise, it will lead to... The error is significant; therefore, it can be corrected using historical reference states and confidence gating. Furthermore, This is a binary indicator with a value of 0 or 1. If there is actual data at position i, then... Otherwise, it is 0. Therefore... The average level of the historical fusion vector corresponding to all real historical topics is used as the baseline for real historical data. Will Mapping the dimensions to obtain This allows for confidence-based gating of data that may contain noise. The model is then corrected to obtain a corrected context vector. This method helps avoid prediction errors caused by biases resulting from local "spurious correlations."
[0066] Furthermore, based on the corrected context vector and the current feature vector, the accuracy of the current question is determined, including: The modified context vector and the current feature vector are concatenated to obtain a prediction vector; the prediction vector is input into a pre-trained prediction model to obtain a candidate score; the candidate score is modified according to the difficulty of the current question to obtain a modified score; the modified score is normalized to obtain the accuracy of the current question.
[0067] Specifically, , For the prediction vector, To correct the context vector, The current feature vector can then be input into a pre-trained prediction model to obtain candidate scores.
[0068] The formula for calculating the candidate score is: in, For candidate scores, This is the primary prediction model, used to calculate candidate scores based on the prediction vector. Furthermore, to further model the impact of different difficulty levels of the current question on actual responses, a difficulty bias corresponding to the difficulty level of the current question can be used. ,right Make corrections to obtain a corrected score. Then normalize the corrected score to obtain the accuracy rate for the current question. The formula for calculating the corrected score is: .
[0069] It should be added that the loss function for a pre-trained prediction model can be defined as: in, The prediction loss for a single training session. The length of the sequence of history questions for students. This indicates the actual answer to the history question. This represents the accuracy of predictions during the training process. This is the effective data mask, used to mask padding bits and invalid prediction bits. It is 1 if the historical data is real data, and 0 otherwise.
[0070] For example, since the present invention has multiple preset dimensions of vectors to ensure the normal operation of calculations, the dimensions and forms of the parameters mentioned above will be uniformly organized and explained here for ease of understanding.
[0071] The current detection time is preset to t, and the length of the historical question sequence is t. =50, the dimension of a single history question is d=128.
[0072] Historical feature vector Dimension 128; Historical fusion vector Dimension 128; All are attention matrices with a dimension of 128*128.
[0073] Current feature vector Dimension 128; Knowledge Tags , scalar (0 / 1); Attribute similarity Scalar; vector corresponding to attribute similarity Dimension 128; Vectors corresponding to knowledge tags Dimensions 128; Difficulty and Ability Characteristics Dimension 128; Target relevance characteristics Dimensions: 128; Importance weights scalar; Target-related context vector Dimension 128; Average consecutive error length Dimensional scalar; Long-term learning information characteristics Dimension 128; Candidate short-term observation features Dimension 128; Embedded Unions Dimension 128; Short-term learning information characteristics Dimension 128; Update weight vector Dimension 128; Comprehensive learning information features Dimension 128; Trust Gating Scalar; average fusion vector Dimension 128; Historical reference representation Dimension 128; Correcting the context vector Dimension 128; Prediction vector , dimension 256.
[0074] It should be noted that the various MLP networks mentioned above are all used for vector fusion and concatenation. Because the input sources of each MLP are different, the number and dimensions of the input vectors vary, resulting in differences between the input vectors and the final required 128-dimensional output. Therefore, the purpose of each MLP network is similar: to fuse the features of the concatenated high-dimensional vectors and uniformly map them to a 128-dimensional target vector.
[0075] This invention provides a programming knowledge tracking method that integrates long-term and short-term learning behaviors. By extracting long-term and short-term learning information from historical question data, it can comprehensively evaluate students' learning abilities across both time scales, effectively avoiding interference from short-term learning fluctuations in the overall ability assessment. Simultaneously, by determining the target relevance features and the importance weight of each historical question to the current question, the degree of correlation between historical and current questions can be accurately quantified. Based on this, utilizing historical question information, accurate prediction of students' current question accuracy is achieved, significantly improving the predictive accuracy of programming knowledge tracking.
Claims
1. A programming knowledge tracking method that integrates long-term and short-term learning behaviors, characterized in that, include: Based on the historical question information of each historical question and the current question information of the current question, determine the historical fusion vector of the historical question and the current feature vector of the current question; Based on the historical question information and the current question information for each historical question, the target relevance characteristics between each historical question and the current question are determined. The target relevance characteristics represent the degree of correlation between the historical question and the current question in terms of question attributes. Based on the historical fusion vector, the current feature vector, and the target relevance features, determine the importance weight of each historical question to the current question; Based on the historical question information, long-term learning information features are determined, and based on the target relevance features, the preset short-term duration, and the importance weights, short-term learning information features are determined; wherein, the long-term learning information features represent the long-term learning status of students based on all historical question information; and the short-term learning information features represent the short-term learning status of students based on historical question information within the preset short-term duration. Based on the long-term learning information features, short-term learning information features, and the current feature vector, a credibility gating is determined, wherein the credibility gating is used to adjust the fusion ratio of historical question information to the prediction of the current question. The accuracy of the current question is determined based on the credibility gating, the historical fusion vector of each historical question, the current feature vector, and the importance weight.
2. The method according to claim 1, characterized in that, The step of determining the historical fusion vector of the historical questions and the current feature vector of the current question based on the historical question information of each historical question and the current question information of the current question includes: The historical question information is mapped to a preset vector space to obtain the historical feature vector of the historical question. Different historical questions have corresponding question time sequences, and the question time sequence represents the solution time of the historical question. For any historical question, a historical fusion vector for the historical question is generated based on the historical feature vector of the historical question and the historical feature vectors of all historical questions preceding the historical question in the question time sequence of the historical question. The current question information is mapped to a preset vector space to obtain the current feature vector.
3. The method according to claim 1, characterized in that, The step of determining the target relevance characteristics between each historical question and the current question based on the historical question information and the current question information includes: Based on the question attributes of historical questions and the question attributes of the current question, determine whether there are the same knowledge tags between historical questions and the current question; Based on the question attributes of historical questions and the question attributes of the current question, determine the attribute similarity between the current question and historical questions; Obtain the ability difficulty interaction embedding table, and determine the difficulty ability characteristics from the ability difficulty interaction embedding table based on the difficulty of the current question and the student's current ability. The ability difficulty interaction embedding table represents the performance of students with different abilities when answering questions of different difficulty. Based on the knowledge tags, attribute similarity, and difficulty / ability characteristics, the target relevance characteristics between historical questions and current questions are determined.
4. The method according to claim 3, characterized in that, The interactive embedded table for acquiring ability difficulty includes: Obtain each student's answers to each history question, as well as the global average accuracy rate for each history question; The student's ability level is determined based on the results of each answer, and the difficulty level of each history question is determined based on the global average accuracy rate. The student ability level and the question difficulty level are combined to obtain an ability difficulty combination; a corresponding feature vector is configured for each ability difficulty combination to obtain an ability difficulty interactive embedding table.
5. The method according to claim 1, characterized in that, The step of determining the importance weight of each historical question to the current question based on the historical fusion vector, the current feature vector, and the target relevance features includes: Attention analysis is performed based on each historical fusion vector, the current feature vector, and the target relevance features to obtain the importance weights of each historical fusion vector and the current feature vector.
6. The method according to claim 1, characterized in that, The step of determining long-term learning information characteristics based on the historical question information includes: Obtain the historical accuracy standard deviation, average consecutive error length, question switching rate, and programming language switching rate corresponding to the historical question information; The long-term behavior statistical vector is determined based on the historical accuracy standard deviation, the average consecutive error length, the question switching rate, and the programming language switching rate. The long-term behavioral statistical vector is subjected to feature mapping to obtain the long-term learning information features.
7. The method according to claim 1, characterized in that, The step of determining short-term learning information features based on the target relevance features, a preset short-term duration, and the weights of each importance feature includes: Obtain the target historical fusion vector corresponding to the target historical question within a preset short time period; Based on the target relevance characteristics and importance weights of each historical topic, candidate short-term observation characteristics are determined; The short-term learning information features are obtained by concatenating the historical fusion vectors of each target, the candidate short-term observation features, and the difficulty and ability features.
8. The method according to claim 1, characterized in that, The step of determining the credibility gating based on the long-term learning information features, short-term learning information features, and the current feature vector includes: The long-term learning information features, short-term learning information features, and the current feature vector are fused to obtain the long-short-term fused features. Normalize each element of the long-short fusion feature to obtain the updated weight vector; Based on the weights of each position in the updated weight vector, the long-term learning information features and the short-term learning information features are weighted and fused to obtain the comprehensive learning information features; The integrated learning information features, short-term learning information features, and the current feature vector are concatenated to obtain a concatenated vector. The credibility gating is calculated based on the spliced vector.
9. The method according to claim 8, characterized in that, The process of determining the accuracy of the current question based on the credibility gating, the historical fusion vector of each historical question, the current feature vector, and the importance weight includes: Based on the historical fusion vector and importance weight of each historical topic, generate a target-related context vector; Calculate the historical reference state corresponding to the historical fusion vector of each historical topic; Based on the credibility gating, the historical reference state and the target-related context vector are weighted and calculated to obtain the corrected context vector. The accuracy rate of the current question is determined based on the corrected context vector and the current feature vector.
10. The method according to claim 9, characterized in that, The step of determining the accuracy of the current question based on the corrected context vector and the current feature vector includes: The corrected context vector and the current feature vector are concatenated to obtain the prediction vector; The predicted vectors are input into a pre-trained prediction model to obtain candidate scores; The candidate scores are adjusted based on the difficulty of the current question to obtain a corrected score. The corrected score is then normalized to obtain the accuracy rate of the current question.