Programming knowledge tracking method and device fusing multi-dimensional attributes of questions and code representation

By integrating multi-dimensional attributes and code representation of the problem, a more complete programming knowledge tracking model is built, which solves the problems of information loss and iteration process not being considered in the programming learning scenarios, and realizes the knowledge of students' programming Accurate mastery and accurate prediction of future answering performance improves learning efficiency and pertinence.

CN119026681APending Publication Date: 2024-11-26BEIJING NORMAL UNIVERSITY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411134770.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing technology cannot accurately understand the degree of students' mastery of programming knowledge, and the traditional knowledge tracking model has problems such as information loss and iteration process not being considered in programming learning scenarios.

Method used

Using a programming knowledge tracking method that integrates multi-dimensional attributes and code representations of questions, a more complete programming knowledge tracking model is constructed to obtain student programming questions through multi-dimensional attribute sub-models, code representation sub-models, programming iterative feature sub-models and knowledge state sub-models. multi-dimensional attribute information, code representation information and programming iterative characteristics predict the probability that students can correctly answer programming questions.

Benefits of technology

It has achieved accurate mastery of students' programming knowledge and accurate prediction of future answering performance, timely discover shortcomings, guide personalized learning, and improve the pertinence and efficiency of programming learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026681A_ABST
    Figure CN119026681A_ABST
Patent Text Reader

Abstract

The invention provides a programming knowledge tracking method and device fusing question multi-dimensional attributes and code characterization, the method comprises the programming knowledge tracking method fusing question multi-dimensional attributes and code characterization, and the method comprises the steps: obtaining a target programming question to be answered by a target student; inputting the target programming question into the programming knowledge tracking model to obtain a probability that the target student correctly answers the target programming question; the programming knowledge tracking model is obtained based on multi-dimensional attribute information, code representation information and programming iteration feature training of programming questions answered by the target students. The method provided by the embodiment of the invention realizes accurate mastering of programming knowledge of students and accurate prediction of future answering performance of the students.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge tracking technology, and in particular to a programming knowledge tracking method and device integrating multi-dimensional attributes of a question and code representation. Background Art

[0002] The popularization of the Internet and the increasing maturity of technologies such as artificial intelligence and big data have effectively promoted the development of online education. How to use massive user learning data, discover valuable information, and adaptively provide personalized guidance to students is a topic that educational researchers continue to pay attention to.

[0003] In related technologies, knowledge tracking is used to accurately understand students' mastery of knowledge. That is, based on students' historical answer records collected on online education platforms, a model is built to track students' knowledge status and predict students' future performance in answering questions. However, programming learning is different from traditional course learning and has its own particularities. The knowledge tracking of traditional courses currently explored is not completely applicable to the teaching scenario of student programming. Therefore, how to build a programming knowledge tracking model to accurately understand students' mastery of programming knowledge and improve the prediction effect of the model is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0004] The present invention provides a programming knowledge tracking method and device integrating multi-dimensional attributes of questions and code representation, so as to solve the problem in the prior art that it is impossible to accurately understand the degree of mastery of students' programming knowledge.

[0005] The present invention provides a programming knowledge tracking method integrating multi-dimensional attributes of questions and code representation, comprising the following steps.

[0006] Obtain target programming questions to be answered by target students; The target programming problem is input into a programming knowledge tracking model to obtain the probability that the target student correctly answers the target programming problem; the programming knowledge tracking model is trained based on multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming problems that the target student has solved.

[0007] According to a programming knowledge tracing method that integrates multi-dimensional attributes of a topic and code representation provided by the present invention, the programming knowledge tracing model includes: Topic multidimensional attribute sub-model, code representation sub-model, programming iteration feature sub-model, knowledge state sub-model and prediction sub-model; among them,

[0008] The question multidimensional attribute sub-model is used to obtain multidimensional attribute information of the programming questions that the target student has answered; the multidimensional attribute information includes the semantic similarity between programming questions and the difficulty of programming questions; The code representation sub-model is used to obtain code representation information of the programming questions answered by the target student; the code representation information includes the code semantics and grammatical structure of the target student code corresponding to the programming question; The programming iteration feature sub-model is used to obtain programming iteration features of programming problems that the target student has solved; the iteration features include iteration features when the target student solves the programming problems multiple times; The knowledge status sub-model is used to determine the knowledge status of the target student based on the multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of the programming questions that the target student has answered; The prediction sub-model is used to predict the probability that the target student correctly answers the target programming problem based on the knowledge status of the target student and the target programming problem to be solved by the target student.

[0009] According to a programming knowledge tracking method that integrates question multidimensional attributes and code representation provided by the present invention, the question multidimensional attribute sub-model is trained based on the following method: Inputting the concept overlap between multiple programming questions into the question multidimensional attribute sub-model to predict the semantic similarity and difficulty of the programming questions; The question multidimensional attribute sub-model is trained according to the label information and the predicted semantic similarity and difficulty of the programming questions to obtain a trained question multidimensional attribute sub-model; the label information includes the concept overlap between the programming questions and the correct answer rate of the programming questions.

[0010] According to a programming knowledge tracking method integrating multi-dimensional attributes of questions and code representation provided by the present invention, the code representation sub-model is trained based on the following method: Obtain an initial code representation sub-model; the initial code representation sub-model is obtained based on industry source code training; The initial code representation sub-model is trained according to the student codes in the student code corpus and the student codes in the programming knowledge tracking data set to obtain the trained code representation sub-model.

[0011] According to a programming knowledge tracking method integrating multi-dimensional attributes of a topic and code representation provided by the present invention, the method further includes: Inputting the code semantics and grammatical structures respectively corresponding to the target student's multiple answers to the programming question output by the code representation sub-model into the programming iteration feature sub-model; The programming iteration feature sub-model fuses the code semantics and grammatical structures respectively corresponding to the multiple solutions to obtain the programming iteration feature.

[0012] The present invention also provides a programming knowledge tracking module integrating multi-dimensional attributes of questions and code representation, including the following modules: An acquisition module is used to acquire target programming questions to be answered by target students; A tracking module is used to input the target programming problem into a programming knowledge tracking model to obtain the probability that the target student correctly answers the target programming problem; the programming knowledge tracking model is trained based on the multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming problems that the target student has solved.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the programming knowledge tracking method integrating multi-dimensional attributes of a question and code representation as described in any one of the above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a programming knowledge tracking method that integrates multi-dimensional attributes of a question and code representation as described in any one of the above.

[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned programming knowledge tracking methods that integrate multi-dimensional attributes of questions and code representations.

[0016] The programming knowledge tracking method and device for integrating multi-dimensional attributes of questions and code representations provided by the present invention construct a more complete programming knowledge tracking model by integrating multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of programming questions, thereby not only further enriching the question representation based on the multi-dimensional attributes of the questions, effectively solving the problem that the existing models mostly use concept IDs or question IDs to represent questions, resulting in partial information loss, but also more comprehensively and completely capturing the students' learning process based on the code representation information, better grasping the multiple steps and iteration stages of students in solving problems based on the programming iteration characteristics, understanding the students' debugging strategies and thinking processes, and better modeling the students' knowledge status, thereby achieving accurate grasp of students' programming knowledge and accurate prediction of students' future answering performance, timely and effectively discovering the shortcomings of students' programming knowledge, and targetedly guiding students' programming knowledge learning direction and learning content, effectively improving the pertinence and efficiency of students' programming learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of a programming knowledge tracking method that integrates multi-dimensional attributes of questions and code representations provided by the present invention.

[0019] Figure 2 It is a structural schematic diagram of a programming knowledge tracking device that integrates multi-dimensional attributes of questions and code representations provided by the present invention.

[0020] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] Combine the following Figure 1-Figure 3 The present invention describes a programming knowledge tracing method and device that integrates multi-dimensional attributes of a topic and code representation.

[0023] In order to facilitate a clearer understanding of the technical solutions of the embodiments of the present application, some technical contents related to the embodiments of the present application are first introduced.

[0024] (1) The widespread application of the Internet and the increasing maturity of technologies such as artificial intelligence and big data have effectively promoted the development of online education. Compared with traditional classroom teaching, online education platforms have attracted the favor of many users with their rich teaching resources and advantages such as freedom from time and location constraints, and have therefore collected a large amount of student learning trajectory data. However, at the same time, it is insufficient in providing personalized education for students, which is contrary to the educational philosophy of teaching students in accordance with their aptitude that we have always adhered to. How to use massive user learning data, discover valuable information, and adaptively provide students with personalized guidance is a topic that educational researchers continue to pay attention to.

[0025] The premise of achieving personalized education is to accurately understand the students' mastery of knowledge. Knowledge tracking is a powerful tool to achieve this task. It builds a model to track students' knowledge status and predict their future performance based on the students' historical answer records collected by the online education platform. Specifically, given a student's (question ID, answer result) binary sequence from time 1 to time T, and the question of question T+1, the goal is to train a model that can predict the probability of the student correctly answering question T+1.

[0026] In the era of artificial intelligence, computational thinking and programming education are highly valued by countries around the world, prompting more and more students to learn computer science and acquire computational thinking skills to meet the digital economy era. As the demand for programming learning increases, a series of online assessment websites that assist programming education are more widely used, with a large number of programming questions for learners to practice and practice, and automatically giving the judgment results of the program.

[0027] The importance of programming education is becoming increasingly prominent. In order to help improve learners' programming skills, it is necessary to study the application of knowledge tracing in the specific situation of programming learning. However, programming learning has its own particularity. The knowledge tracing currently explored by researchers is not fully applicable to the teaching scenario of student programming.

[0028] Existing research on knowledge tracking mainly targets traditional course learning, and the types of questions involved are mostly objective questions, and the answering mode is "one-shot". However, the student behavior data generated by the entire programming learning process is much richer than that of traditional course learning, and it has its own special features, which are specifically reflected in the following three points: 1) Most questions do not have a unique standard answer, and each question often tests multiple knowledge concepts at the same time. Students write programs based on the knowledge they have learned for open-ended answers, and the program is considered correct if it passes all test cases for the question. 2) The source code of the student's answer contains the syntax and semantic information of the programming language, which is important feedback information on the student's mastery of programming knowledge. 3) For a programming exercise, students often need to write code and make multiple modifications and submissions before they can finally pass the exercise, which is an "iterative" answering mode. The iterative answering process of students for each question reflects the changing process of the student's programming knowledge status.

[0029] (2) Knowledge tracking is a key technology for enabling online education platforms to provide personalized guidance to students. It can automatically track the knowledge status of each student and predict their performance in future question-answering activities.

[0030] Traditional knowledge tracing models include Item Response Theory (IRT), DINA (Deterministic Input, Noisy And Gate) model and Bayesian Knowledge Tracing (BKT). The IRT model is based on the logistic regression model and models the students' ability parameters and various parameters of the project (such as difficulty and discrimination) to measure the students' knowledge mastery level. The DINA model uses binary variables to represent the students' mastery of knowledge points. Each question contains guessing parameters and error parameters. Combining the question-knowledge point matrix and the student's answer matrix, the question parameters are solved by maximum likelihood estimation. Similar to DINA, BKT also uses binary variables to represent the students' mastery of knowledge concepts. BKT uses hidden Markov models to model the whole process of students learning a certain knowledge concept. Traditional methods have strong interpretability, but often rely on some simple assumptions, such as the students' knowledge state only includes two states: mastery and non-mastery, and the students will not forget once they have learned, which is inconsistent with the complexity of the real learning environment.

[0031] Figure 1 It is a flowchart of a programming knowledge tracking method integrating multi-dimensional attributes of a question and code representation provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 101, obtaining a target programming question to be answered by a target student; Specifically, programming learning is different from traditional course learning. Therefore, knowledge tracking methods for programming education scenarios need to be further explored based on the original knowledge tracking. There are some challenges in existing knowledge tracking: 1) Existing models mostly use concept IDs or question IDs to represent questions, resulting in some information loss. 2) Existing models do not consider the semantic and grammatical structure of the code when embedding student code, and do not consider the modeling of the programming iteration process.

[0032] In order to solve the above problems, in the embodiment of the present application, the target programming questions to be answered by the target students are first obtained. Optionally, the target students are students whose programming knowledge mastery needs to be evaluated; the target programming questions to be answered are programming questions that the target students need to answer in the future, that is, questions that need to be predicted whether the target students can answer correctly.

[0033] Step 102: Input the target programming problem into the programming knowledge tracking model to obtain the probability that the target student correctly answers the target programming problem; the programming knowledge tracking model is trained based on the multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming problems that the target student has solved.

[0034] Specifically, after obtaining the target programming questions to be answered by the target students, that is, after obtaining the programming questions that the target students need to answer in the future, the target programming questions are input into the programming knowledge tracking model in the implementation of this application to obtain the probability that the target students correctly answer the target programming questions. Among them, the programming knowledge tracking model in the embodiment of this application is obtained based on the multidimensional attribute information, code representation information and programming iteration feature training of the programming questions that the target students have answered; wherein, the multidimensional attribute information of the programming questions that the target students have answered may include multidimensional information such as the semantic similarity between programming questions and the difficulty of programming questions, which is used to further enrich the question representation and effectively solve the problem that the existing model mostly uses concept ID or question ID to represent the questions, resulting in the loss of some information. Optionally, the code submitted by the students for the programming questions reflects the students' understanding and application of knowledge in the programming learning process. The introduction of student code representation can enable the knowledge tracking model to capture the students' learning process more comprehensively. Optionally, the programming iteration feature includes multiple steps and iterative stages when students solve problems. The programming iteration feature helps to understand the students' debugging strategies and thinking processes, so that the students' knowledge status can be better modeled. That is, in the embodiments of the present application, by integrating student code, programming iterations, programming question features and answer results, a more complete programming knowledge tracking model is constructed, which enables accurate grasp and evaluation of students' programming knowledge, and thus accurate prediction of students' future answering performance can be achieved. Further, based on the prediction results, students' learning plans and programs for programming knowledge can be adjusted in a targeted manner, effectively improving the pertinence and efficiency of students' programming learning.

[0035] The method of the above embodiment constructs a more complete programming knowledge tracking model by integrating the multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of programming questions, thereby not only further enriching the question representation based on the multi-dimensional attributes of the question, effectively solving the problem that the existing model mostly uses concept ID or question ID to represent the question, resulting in partial information loss, but also can capture the students' learning process more comprehensively and completely based on the code representation information, better grasp the students' multiple steps and iteration stages when solving problems based on the programming iteration characteristics, understand the students' debugging strategies and thinking processes, and better model the students' knowledge status, thereby achieving accurate grasp of students' programming knowledge and accurate prediction of students' future answering performance, timely and effectively discovering the shortcomings of students' programming knowledge, and targetedly guiding students' programming knowledge learning direction and learning content, effectively improving the pertinence and efficiency of students' programming learning.

[0036] In one embodiment, the programming knowledge tracking model includes: Topic multidimensional attribute sub-model, code representation sub-model, programming iteration feature sub-model, knowledge state sub-model and prediction sub-model; among them,

[0037] The question multidimensional attribute sub-model is used to obtain the multidimensional attribute information of the programming questions that the target students have solved; the multidimensional attribute information includes the semantic similarity between programming questions and the difficulty of programming questions; The code representation sub-model is used to obtain code representation information of programming problems that the target students have solved; the code representation information includes the code semantics and grammatical structure of the target students' code corresponding to the programming problems; The programming iteration feature sub-model is used to obtain the programming iteration features of the programming problems that the target students have solved; the iteration features include the iteration features when the target students solve the programming problems multiple times; The knowledge status sub-model is used to determine the target student's knowledge status based on the multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of the programming questions that the target student has answered; The prediction sub-model is used to predict the probability that the target student correctly answers the target programming problem according to the target student's knowledge status and the target programming problem to be solved by the target student.

[0038] Specifically, the programming knowledge tracking model in the embodiment of the present application includes a question multidimensional attribute sub-model, a code representation sub-model, a programming iteration feature sub-model, a knowledge state sub-model and a prediction sub-model. Among them, the question multidimensional attribute sub-model is used to obtain the multidimensional attribute information of the programming questions that the target students have solved. The multidimensional attribute information includes the semantic similarity between programming questions and the difficulty of programming questions, that is, by introducing the semantic similarity relationship of questions and the difficulty of questions, the representation of programming questions is further enriched.

[0039] Optionally, the code representation sub-model is used to obtain code representation information of programming problems that the target students have solved, and the code representation information includes the code semantics and grammatical structure of the target student code corresponding to the programming problem. Among them, the code submitted by the students for the programming problems reflects the students' understanding and application of knowledge in the programming learning process. The introduction of student code representation can enable the knowledge tracking model to capture the students' learning process more comprehensively. Moreover, the student code representation in the present application includes not only the code semantics of the target student code corresponding to the programming problem, but also the grammatical structure of the target student code corresponding to the programming problem, thereby achieving a comprehensive and accurate representation of the code, and it is also possible to more accurately and comprehensively obtain the students' understanding and application capabilities of knowledge in the programming learning process.

[0040] Optionally, the programming iteration feature sub-model is used to obtain the programming iteration features of the programming problems that the target students have solved. The iteration features include the iteration features when the target students solve the programming problems multiple times. That is, students may debug and modify the code multiple times when writing the code. The programming iteration process includes multiple steps and iteration stages when students solve the problem. By learning the programming iteration process, we can more accurately understand the students' debugging strategies and thinking processes, and better model the students' knowledge status. Optionally, the code representation information corresponding to the code submitted by students for the same problem at different times can be studied, or the code representation information corresponding to the code submitted by students for multiple times during multiple modifications to the same problem can be studied, so as to obtain the programming iteration features.

[0041] Optionally, the knowledge status sub-model is used to determine the target student's knowledge status based on the multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of the programming questions that the target student has answered. That is, after comprehensive and accurate learning of the multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of the programming questions that the target student has answered, the target student's knowledge status can be accurately determined based on the above rich and comprehensive information. Optionally, the question embedding representation that integrates the multi-dimensional attributes of the question, the student code embedding representation that integrates semantic and grammatical structure information, and the programming iteration information can be introduced into the AKT knowledge tracking model to model the student's knowledge status and predict the student's future performance in answering questions.

[0042] Optionally, the prediction sub-model is used to predict the probability that the target student correctly answers the target programming question based on the target student's knowledge state and the target programming question to be answered by the target student. After accurately determining the target student's knowledge state based on the multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of the programming questions that the target student has answered, it is also possible to accurately predict whether the target student can correctly answer various types of programming questions in the future based on the target student's current programming knowledge state. Optionally, each sub-model in the embodiment of the present application can be a deep learning model in the field of technology, which can accurately predict the results of students' future programming question answers by learning the multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming questions that the students have answered.

[0043] In the method of the above embodiment, the programming knowledge tracking model includes a question multi-dimensional attribute sub-model, a code representation sub-model, a programming iteration feature sub-model, a knowledge state sub-model and a prediction sub-model, so that comprehensive and accurate learning can be carried out based on the multi-dimensional attribute information, code representation information, programming iteration features and answer results of the programming questions that the target students have solved, and further, based on the above rich and comprehensive information, the knowledge state of the target students can be accurately determined, and the accurate prediction of the students' future programming question answering results can be achieved.

[0044] In one embodiment, the topic multi-dimensional attribute sub-model is trained based on the following method: The concept overlap between multiple programming questions is input into the question multidimensional attribute sub-model to predict the semantic similarity and difficulty of programming questions. The multidimensional attribute sub-model of the questions is trained according to the semantic similarity between the label information and the predicted programming questions and the difficulty of the programming questions to obtain the trained multidimensional attribute sub-model of the questions; the label information includes the concept overlap between the programming questions and the correct answer rate of the programming questions.

[0045] Specifically, in the embodiments of the present application, the semantic similarity relationship of the questions and the difficulty of the questions are introduced to further enrich the question representation, effectively solving the problem that the existing models mostly use concept IDs or question IDs to represent questions, resulting in the loss of some information. Optionally, in the present application, the semantic similarity relationship of the questions is represented by programming the concept overlap between the questions, and the accurate and rapid quantification of the semantic similarity relationship of the questions is achieved, so that the various types of questions can be effectively distinguished, and the students' mastery of various types of questions can be accurately understood. Optionally, in the embodiments of the present application, based on the correct answer rate of the students to each question, the difficulty of the question can be accurately represented and quantified, and then the students' mastery of each question can be accurately represented and understood.

[0046] For example, in this application, the semantic similarity relationship of questions and question difficulty are considered as two training objectives. Task one is to predict the semantic similarity of questions, thereby integrating the question relationship, and task two is to predict the difficulty of questions, thereby integrating the question difficulty attribute.

[0047] Assume that the set of questions is , the concept set is Each question examines one or more concepts, using Indicate the topic The set of concept labels included, e.g. ; Optionally, the concept set corresponding to each question is the set of knowledge points tested by each question. Specifically, the BERT model is first used to extract the concept set of each question. The semantic features of the text are used to obtain its embedding representation vector For Task 1 (predicting topic similarity), the concept overlap between topics is used as the similarity label. The concept overlap is defined as the quotient between the number of concepts that overlap between two topics and the maximum number of concepts contained in the two topics. and topic , concept overlap The definition is shown in formula (1). The cosine similarity of the semantic features of the title text is used as shown in formula (2), and the square loss of the concept overlap label is used as the relationship loss function as shown in formula (3).

[0048] (1)

[0049] (2)

[0050] (3)

[0051] For Task 2 (predicting the difficulty of a question), the students in the training set The correct answer rate is the question difficulty label , using a single-layer fully connected neural network to extract difficulty attributes from the semantic features of the question text , as shown in formula (4), the square loss of the two is used as the difficulty loss function, as shown in formula (5).

[0052] (4)

[0053] (5)

[0054] Finally, the loss function is the sum of the relation loss function and the difficulty loss function, as shown in formula (6). The question embedding representation obtained through the pre-training framework combines the question relationship and question difficulty.

[0055] , (6)

[0056] The method of the above embodiment, on the one hand, characterizes the semantic similarity relationship of the programming questions through the concept overlap between the questions, thereby realizing accurate and rapid quantification of the semantic similarity relationship of the questions, thereby effectively distinguishing various types of questions and accurately understanding the students' mastery of various types of questions. On the other hand, based on the correct answer rate of each question by the student group, the difficulty of the question is accurately characterized and quantified, thereby accurately characterizing and understanding the students' mastery of each question. The embodiment of the present application effectively enriches the representation of programming questions, and can effectively solve the problem that the existing model mostly uses concept ID or question ID to represent questions, resulting in partial information loss.

[0057] In one embodiment, the code representation sub-model is trained based on the following method: Obtain an initial code representation sub-model; the initial code representation sub-model is obtained based on industry source code training; According to the student codes in the student code corpus and the student codes in the programming knowledge tracking dataset, the initial code representation sub-model is trained to obtain the trained code representation sub-model.

[0058] Specifically, in the embodiment of the present application, the code submitted by students for programming questions reflects the students' understanding and application of knowledge in the programming learning process. The introduction of student code representation can enable the knowledge tracking model to capture the students' learning process more comprehensively. It should be noted that the student code representation in the present application includes not only the code semantics of the target student code corresponding to the programming question, but also the grammatical structure of the target student code corresponding to the programming question, thereby achieving a comprehensive and accurate representation of the code, thereby more accurately and comprehensively obtaining the students' understanding and application ability of knowledge in the programming learning process.

[0059] For example, the existing UniXcoder pre-trained model uses multimodal content, namely code, code comments and code abstract syntax tree information, to explicitly model the semantics and grammatical structure information of the code. However, since UniXcoder is a code representation model obtained by pre-training with large-scale industry source code, and our goal is to represent student code, there are differences in the feature distribution between student code and industry source code. Therefore, this application uses a two-stage fine-tuning method based on the UniXcoder model, so that the student code embedding representation that integrates the code semantics and grammatical structure can be obtained more accurately and efficiently. Optionally, in the first stage, the Unixcoder model is fine-tuned for the first time using the Masked Language Modeling (MLM) task using the student code external corpus from the kaggle platform to obtain the unsupervised embedding of the code. In the second stage, the student code in the programming knowledge tracking dataset is used as the input feature input to the UniXcoder model, and a layer of fully connected neural network is applied to the output of the UniXcoder model, and the student submission results are used as labels to perform code classification tasks, and the second stage of supervised classification training is performed to further enhance the code embedding, thereby finally obtaining the embedding representation of the student code. It should be noted that the student code in the programming knowledge tracking dataset includes not only the students' final code, but also the non-knowledge errors that occur in students' programming, such as programming timeout, compilation errors, spelling errors, etc., so that not only the students' knowledge status can be learned, but also the information related to the students' knowledge status can be learned, which can effectively improve the comprehensive evaluation of students' programming knowledge, thereby obtaining more accurate and rich information on students' programming knowledge status, and then more accurately predicting the results of students' future programming problem solutions.

[0060] The method of the above embodiment takes into account the differences in features between student code and industry source code, and trains the code representation sub-model based on the student code in the student code corpus and the student code in the programming knowledge tracking dataset, so that not only the student's knowledge status can be learned, but also the information related to the student's knowledge status can be learned, effectively improving the comprehensive evaluation of the student's programming knowledge, thereby obtaining more accurate and rich information on the student's programming knowledge status, and further more accurately predicting the results of students' solutions to future programming problems.

[0061] In one embodiment, the code semantics and grammatical structures corresponding to the target student's multiple answers to the programming problem output by the code representation sub-model are input into the programming iteration feature sub-model; The programming iteration feature sub-model fuses the code semantics and grammatical structures corresponding to multiple solutions to obtain the programming iteration feature.

[0062] Specifically, the programming iteration feature includes multiple steps and iterative stages when students solve problems. The programming iteration feature helps to understand students' debugging strategies and thinking processes, so that students' knowledge status can be better modeled. Optionally, students will practice multiple times for key and difficult programming questions; or, for questions that students have not mastered, students may continue to modify them in the process of answering. It is based on the above situation that in the embodiments of the present application, the code representation information corresponding to the code submitted by students at different times for the same question is studied, or the code representation information corresponding to the code submitted by students multiple times during multiple modifications to the same question is studied, and the programming iteration feature is obtained, which can better model the students' knowledge status.

[0063] For example, for the embedding vectors of multiple code submissions, the global information of the programming iteration process can be captured with the help of the multi-head attention mechanism and the pooling network. The programming iteration process can be abstracted into a feature vector, which can accurately and efficiently obtain the programming iteration features and better model the students' knowledge status.

[0064] The method of the above embodiment learns the code representation information corresponding to the codes submitted by students at different times for the same question, or learns the code representation information corresponding to the codes submitted by students multiple times during multiple revisions of the same question, to obtain programming iteration features, thereby better modeling the students' knowledge status.

[0065] Exemplarily, a method for programming knowledge tracing based on a programming knowledge tracing model is provided in an embodiment of the present application, and the specific process is as follows: Assume that the programming question answered by the student at time i is processed by the multidimensional attribute sub-model of the question and the embedding representation of the question is: The code submitted by the students is processed by the code representation sub-model to obtain the embedding representation of the code as The code iteration process of the student's multiple attempts on the same question is processed by the programming iteration feature sub-model to obtain the iteration feature representation as follows: The student's answer is . Input the historical answer sequence of students from time 1 to time t-1 , the goal is to predict the student's answer to the question at time t The answer result .

[0066] First, we construct the question encoder and knowledge encoder. The question encoder represents the embedding of the question. As input, it uses a monotonic attention mechanism to output context-aware title embedding The knowledge encoder embeds the student code, the programming iteration features, and the student's answer results into a sequence As input, , also uses the monotonic attention mechanism to model students’ actual knowledge acquisition The calculation of monotonic attention is shown in formula (7) and formula (8). In the calculation of the attention weight of the commonly used scaled dot product attention mechanism, a multiplicative exponential decay term is introduced to simulate the forgetting behavior of students, where is a learnable decay rate parameter greater than 0, Represents time steps and The relative time distance difference between them.

[0067] (7)

[0068] (8)

[0069] Next, we construct a knowledge retriever, which takes the context-aware question embedding output by the question encoder and the context-aware student knowledge output by the knowledge encoder as input, and uses the monotonic attention mechanism to retrieve the knowledge related to the current question obtained in the student's answer history to obtain the student's current knowledge state. .

[0070] Finally, a prediction module is constructed to convert the student’s current knowledge status output by the knowledge retriever into Embedded representation with the current topic The connection of is taken as input, and passes through a fully connected neural network with sigmoid as the activation function to generate the predicted probability that the student will correctly answer the current question. .

[0071] This application uses a random Gaussian distribution Initialize the model parameters. Use the cross entropy function to optimize the model. The optimization goal of the model is to make the real label With the predicted value The cross entropy loss between them is minimized, as shown in formula (9).

[0072] (9)

[0073] The method of the embodiment of the present application proposes a programming knowledge tracking model that integrates the multi-dimensional attributes of questions and code representations, introduces the multi-dimensional attributes of questions, student code characteristics, and programming iteration characteristics, explores more reasonable embedding representation methods for programming questions and student codes, and a code iteration process modeling method for students' multiple attempts on the same question, constructs a more complete programming knowledge tracking model, achieves accurate mastery and evaluation of students' programming knowledge and accurate prediction of students' future answering performance, timely discovers the shortcomings of students' programming knowledge, and provides targeted guidance on students' programming knowledge learning direction and learning content, effectively improving the pertinence and efficiency of students' programming learning.

[0074] The following is a description of the programming knowledge tracking device for integrating the multi-dimensional attributes of the topic and the code representation provided by the present invention. The programming knowledge tracking device for integrating the multi-dimensional attributes of the topic and the code representation described below and the programming knowledge tracking method for integrating the multi-dimensional attributes of the topic and the code representation described above can be referred to each other. Figure 2 As shown, including: An acquisition module 210 is used to acquire a target programming question to be answered by a target student; The tracking module 220 is used to input the target programming problem into the programming knowledge tracking model to obtain the probability that the target student correctly answers the target programming problem; the programming knowledge tracking model is trained based on the multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming problems that the target student has solved.

[0075] Optionally, the programming knowledge tracking model includes: Topic multidimensional attribute sub-model, code representation sub-model, programming iteration feature sub-model, knowledge state sub-model and prediction sub-model; among them,

[0076] The question multidimensional attribute sub-model is used to obtain the multidimensional attribute information of the programming questions that the target students have solved; the multidimensional attribute information includes the semantic similarity between programming questions and the difficulty of programming questions; The code representation sub-model is used to obtain the code representation information of the programming questions that the target students have answered; the code representation information includes the code semantics and grammatical structure of the target students' code corresponding to the programming questions; The programming iteration feature sub-model is used to obtain the programming iteration features of the programming problems that the target students have solved; the iteration features include the iteration features when the target students solve the programming problems multiple times; The knowledge status sub-model is used to determine the knowledge status of the target students based on the multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of the programming questions that the target students have answered; The prediction sub-model is used to predict the probability that the target student correctly answers the target programming problem according to the target student's knowledge status and the target programming problem to be solved by the target student.

[0077] Optionally, the topic multi-dimensional attribute sub-model is trained based on the following method: The concept overlap between multiple programming questions is input into the question multidimensional attribute sub-model to predict the semantic similarity and difficulty of programming questions. The multidimensional attribute sub-model of the questions is trained according to the semantic similarity between the label information and the predicted programming questions and the difficulty of the programming questions to obtain the trained multidimensional attribute sub-model of the questions; the label information includes the concept overlap between the programming questions and the correct answer rate of the programming questions.

[0078] Optionally, the code representation sub-model is trained based on the following method: Obtain an initial code representation sub-model; the initial code representation sub-model is obtained based on industry source code training; According to the student codes in the student code corpus and the student codes in the programming knowledge tracking dataset, the initial code representation sub-model is trained to obtain the trained code representation sub-model.

[0079] Optionally, the tracking module 220 is further used to input the code semantics and grammatical structures respectively corresponding to the target student's multiple answers to the programming questions output by the code representation sub-model into the programming iteration feature sub-model; The programming iteration feature sub-model fuses the code semantics and grammatical structures corresponding to multiple solutions to obtain the programming iteration feature.

[0080] Figure 3 An example of a physical structure diagram of an electronic device is provided, and the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communications bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other through the communications bus 340. The processor 310 may call the logic instructions in the memory 330 to execute a programming knowledge tracking method that integrates the multi-dimensional attributes of the question and the code representation, and the method includes: obtaining a target programming question to be answered by a target student; inputting the target programming question into a programming knowledge tracking model to obtain the probability that the target student correctly answers the target programming question; the programming knowledge tracking model is obtained by training based on the multi-dimensional attribute information, code representation information, and programming iteration characteristics of the programming questions that have been answered by the target student.

[0081] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0082] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the programming knowledge tracking method that integrates the multi-dimensional attributes of the problem and the code representation provided by the above-mentioned methods. The method includes: obtaining a target programming problem to be solved by a target student; inputting the target programming problem into a programming knowledge tracking model to obtain the probability that the target student correctly answers the target programming problem; the programming knowledge tracking model is trained based on the multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming problems that have been solved by the target students.

[0083] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the programming knowledge tracking method that integrates the multi-dimensional attributes and code representation of the problem provided by the above-mentioned methods, the method comprising: obtaining a target programming problem to be solved by a target student; inputting the target programming problem into a programming knowledge tracking model to obtain the probability that the target student correctly solves the target programming problem; the programming knowledge tracking model is trained based on the multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming problems that have been solved by the target students.

[0084] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A programming knowledge tracking method integrating multi-dimensional attributes of questions and code representation, characterized in that: include: Obtain target programming questions to be answered by target students; The target programming problem is input into a programming knowledge tracking model to obtain the probability that the target student correctly answers the target programming problem; the programming knowledge tracking model is trained based on multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming problems that the target student has solved.

2. The programming knowledge tracking method integrating multi-dimensional attributes of questions and code representation according to claim 1 is characterized in that: The programming knowledge tracking model includes: Topic multidimensional attribute sub-model, code representation sub-model, programming iteration feature sub-model, knowledge state sub-model and prediction sub-model; among them, The question multidimensional attribute sub-model is used to obtain multidimensional attribute information of the programming questions that the target student has answered; the multidimensional attribute information includes the semantic similarity between programming questions and the difficulty of programming questions; The code representation sub-model is used to obtain code representation information of the programming questions answered by the target student; the code representation information includes the code semantics and grammatical structure of the target student code corresponding to the programming question; The programming iteration feature sub-model is used to obtain programming iteration features of programming problems that the target student has solved; the iteration features include iteration features when the target student solves the programming problems multiple times; The knowledge status sub-model is used to determine the knowledge status of the target student based on the multi-dimensional attribute information, code representation information, programming iteration characteristics and answer results of the programming questions that the target student has answered; The prediction sub-model is used to predict the probability that the target student correctly answers the target programming problem based on the knowledge status of the target student and the target programming problem to be solved by the target student.

3. The programming knowledge tracking method integrating multi-dimensional attributes of questions and code representation according to claim 2 is characterized in that: The multi-dimensional attribute sub-model of the topic is trained based on the following method: Inputting the concept overlap between multiple programming questions into the question multidimensional attribute sub-model to predict the semantic similarity and difficulty of the programming questions; The question multidimensional attribute sub-model is trained according to the label information and the predicted semantic similarity and difficulty of the programming questions to obtain a trained question multidimensional attribute sub-model; the label information includes the concept overlap between the programming questions and the correct answer rate of the programming questions.

4. The programming knowledge tracking method integrating multi-dimensional attributes of questions and code representation according to claim 2 is characterized in that: The code representation sub-model is trained based on the following method: Obtain an initial code representation sub-model; the initial code representation sub-model is obtained based on industry source code training; The initial code representation sub-model is trained according to the student codes in the student code corpus and the student codes in the programming knowledge tracking data set to obtain the trained code representation sub-model.

5. The programming knowledge tracking method integrating multi-dimensional attributes of questions and code representation according to any one of claims 2 to 4, characterized in that: The method further comprises: Inputting the code semantics and grammatical structures respectively corresponding to the target student's multiple answers to the programming question output by the code representation sub-model into the programming iteration feature sub-model; The programming iteration feature sub-model fuses the code semantics and grammatical structures respectively corresponding to the multiple solutions to obtain the programming iteration feature.

6. A programming knowledge tracking module integrating multi-dimensional attributes of questions and code representation, characterized in that: include: An acquisition module is used to acquire target programming questions to be answered by target students; A tracking module is used to input the target programming problem into a programming knowledge tracking model to obtain the probability that the target student correctly answers the target programming problem; the programming knowledge tracking model is trained based on the multi-dimensional attribute information, code representation information and programming iteration characteristics of the programming problems that the target student has solved.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the programming knowledge tracking method integrating multi-dimensional attributes of questions and code representation as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the programming knowledge tracking method integrating multi-dimensional attributes of a topic and code representation as described in any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the programming knowledge tracking method integrating multi-dimensional attributes of a topic and code representation as described in any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Personalized programming question recommendation method fusing dynamic interaction information

    CN120892633A

  • A Personalized Programming Problem Recommendation Method Integrating Dynamic Interactive Information

    CN120892633B