A fine-grained programming knowledge point cognitive diagnosis method in programming education

By combining students' theoretical learning and practical experience, using graph attention networks and knowledge graphs, fine-grained programming knowledge point cognitive diagnosis in the field of programming education is realized, and the problems of incomplete and inaccurate evaluation in the existing technology are solved. Personalized teaching support.

CN119168238BActive Publication Date: 2025-02-18ARTIFICIAL INTELLIGENCE RES INST OF HEFEI COMPREHENSIVE NAT SCI CENT (ANHUI ARTIFICIAL INTELLIGENCE LAB)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411671409.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-18
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

The existing technology is difficult to fully integrate students' theoretical learning and practical experience in the field of programming education, ignores the special data generated by programming questions, and lacks consideration of the correlation between programming knowledge points, resulting in inaccurate and incomplete student cognitive diagnosis results.

Method used

The cognitive diagnosis method of knowledge points is adopted, combined with students' theoretical learning and practical experience data, and the graph attention network and knowledge graph are used to realize the fine-grained representation and cognitive diagnosis of students' learning situation.

Benefits of technology

It realizes a comprehensive and accurate assessment of students' mastery of programming knowledge points, can capture students' deep programming performance and style habits, and provides personalized teaching support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168238B_ABST
    Figure CN119168238B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of programming education technology, and discloses a fine-grained programming knowledge point cognitive diagnosis method in the field of programming education, inputs the learning situation representation of the knowledge point and the knowledge graph into the cognitive diagnosis model that completes the training, and outputs the category of the degree of mastery of the knowledge point by the student; the training process has the following steps: collecting theoretical learning data and practical experience data; characterizing the learning situation of the student's knowledge point; measuring the similarity between the knowledge points by cosine similarity, integrating the similarity between the knowledge points into the adjacency matrix, and obtaining the similarity adjacency matrix; inputting the node feature matrix and the similarity adjacency matrix into the graph attention network for information aggregation, and then inputting into the fully connected layer, obtaining the probability that the knowledge point is diagnosed as each mastery degree category; using a multi-category cross entropy loss function to realize model training. The cognitive diagnosis method in the present invention can accurately locate the students' knowledge mastery status and provide strong support for personalized teaching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of programming education technology, and in particular to a fine-grained programming knowledge point cognitive diagnosis method in the field of programming education. Background Art

[0002] Cognitive Diagnosis is a scientific assessment method that conducts in-depth analysis of user behavior and performance to achieve standardized evaluation of user knowledge and skill levels. Cognitive diagnosis is a necessary task in the fields of education, game competition, human resources, etc. It can help teachers, coaches, human resources experts and other professionals to more accurately understand the user's abilities and needs, thereby providing more effective teaching, training, management and other services.

[0003] Cognitive diagnosis is particularly widely used in smart education scenarios. In the field of programming education, students' mastery of programming knowledge points can be diagnosed through analysis of their learning situation and actual programming practice. Based on students' mastery, teachers can implement differentiated teaching according to students' characteristics and needs, customize exclusive learning paths for students, and improve students' learning efficiency through personalized teaching strategies. At the same time, programming learning is a gradual accumulation process. Cognitive diagnosis results, as a kind of timely feedback, are conducive to teachers' early intervention in students' learning, timely adjustment of teaching gaps, and avoidance of greater difficulties for students in programming learning in the later stage.

[0004] In addition, cognitive diagnosis results can provide a more accurate and reasonable evaluation of teachers' teaching effectiveness and quality.

[0005] Since there is a complex and multi-dimensional relationship between students' ability level and behavioral performance, the use of neural network methods to solve cognitive diagnosis problems has become the current mainstream. However, in the field of programming education, neural network diagnosis methods for programming knowledge points are still insufficient. These deficiencies are mainly reflected in:

[0006] 1) The current evaluation method lacks an effective combination of students' theoretical learning and practical experience. Theoretical learning and practical experience are two important aspects of measuring students' learning outcomes. Theoretical learning can reflect students' understanding and mastery of knowledge, while practical experience can reflect students' ability to apply knowledge to practical problems. Only by combining the two reasonably can we fully understand students' learning situation. However, current research often tends to use data on one side, and cannot fully measure students' mastery of programming knowledge points.

[0007] 2) Current evaluation methods lack the use of special data generated by programming questions. As a novel way of practicing, online programming exercises will record special data that traditional questions do not have, such as the number of student code submissions. These data are the most intuitive reflection of students' programming practice and are of great significance for understanding students' actual programming learning. However, these data are often routinely processed by researchers or even directly ignored.

[0008] 3) Current evaluation methods lack consideration of the relationship between programming knowledge points. Current evaluation methods for programming knowledge points are often limited to a single knowledge point, which ignores the relationship between knowledge points. Programming knowledge points are not isolated, but are interrelated, presenting a complex network structure. There is often a predecessor-successor learning path relationship between knowledge points, and they are correlated with each other. Only by treating the knowledge points as a whole can the model learn a deeper knowledge structure and potential association patterns.

[0009] The existing technical solutions are difficult to capture students' real learning situation of programming knowledge points in the special field of programming education. This may lead to inaccurate and incomplete results of students' cognitive diagnosis, making it impossible to truly reflect students' level and ability, thus affecting teaching effects and students' learning progress. In the programming education scenario, cognitive diagnosis of students' programming knowledge points is still a challenge. Summary of the invention

[0010] In order to solve the above technical problems, the present invention provides a fine-grained programming knowledge point cognitive diagnosis method in the field of programming education. It combines students' theoretical learning situation and practical experience performance to achieve fine-grained characterization of students' learning situation based on the characteristics of programming questions; and uses a graph attention network in combination with a programming knowledge point knowledge graph to achieve effective diagnosis of students' learning level.

[0011] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0012] A fine-grained cognitive diagnosis method for programming knowledge points in the field of programming education outputs categories of the degree to which students have mastered the knowledge points by completing a trained cognitive diagnosis model; the cognitive diagnosis model training process includes:

[0013] Collect theoretical learning data and practical experience data; the practical experience data includes students' implicit answer performance and explicit answer performance for each question of each knowledge point;

[0014] The theoretical learning data is upgraded to obtain the representation A of the students' theoretical learning of the knowledge point; the implicit answer performance and explicit answer performance of the students on the n questions related to each knowledge point are represented and spliced, and the spliced ​​n multi-dimensional vectors are processed into a multi-dimensional vector to obtain the representation B of the students' practical experience learning of the knowledge point; A and B are spliced ​​to obtain the overall representation C of the students' learning of the knowledge point;

[0015] Constructing a knowledge graph based on the learning path relationship of knowledge points and storing it in the form of an adjacency matrix, integrating the similarity between knowledge points into the adjacency matrix to obtain a similarity adjacency matrix;

[0016] Each knowledge point is regarded as a node, C is regarded as the node feature, the node feature matrix and the similarity adjacency matrix are input into the graph attention network, and a new representation D of the student's learning status of the knowledge point corresponding to each node is output; based on D, the probability of the knowledge point being diagnosed as each mastery level category is obtained; and the multi-category cross entropy loss function is used to realize the training of the cognitive diagnosis model.

[0017] Furthermore, the dimension of the theoretical learning data is upgraded to obtain the representation A of the students' theoretical learning situation of the knowledge points, which specifically includes:

[0018] Theoretical learning data includes three dimensions of data: the completion percentage of the document reading where the knowledge point is located, the completion percentage of the video course where the knowledge point is located, and the completion percentage of the questions where the knowledge point is located;

[0019] The reading completion percentage of the document containing the knowledge point is recorded as , the completion percentage of the video course where the knowledge point is located is recorded as , the completion percentage of the question where the knowledge point is located is recorded as , then we can obtain the students' theoretical learning status representation of the knowledge points , superscript Indicates transpose.

[0020] Furthermore, the implicit answer performance and the explicit answer performance of the students on the n questions related to each knowledge point are characterized and then spliced, and the spliced ​​n multidimensional vectors are processed into a multidimensional vector to obtain the student's practical experience learning situation representation B for the knowledge point; A and B are spliced ​​to obtain the student's overall learning situation representation C for the knowledge point, which specifically includes:

[0021] The implicit answer performance of the question includes the time taken to answer each question, the time complexity of the code submitted each time, and the code text of the question. The explicit answer performance of the question includes the ratio of the number of passed test cases submitted each time to the total number of test cases.

[0022] Characterize the implicit answer performance of each question: determine whether the time taken to answer each question exceeds the prescribed time for the question, and use the proportion of times that do not exceed the prescribed time as the student's answer time score ; Determine whether the time complexity of the code submitted each time meets the specified time complexity of the question, and use the proportion of times that meet the specified time complexity as the score of the student's code running efficiency ; Input the code text of the question into a large language model with code capabilities. The large language model evaluates the quality of the code text based on the code format and code readability, and uses the evaluation result as the score of the student's code quality ; Implicit answer representation of the question , superscript represents transpose;

[0023] Characterize the display answer performance of each question: the ratio of the number of passed test cases submitted each time to the total number of test cases is used as the display answer score each time, and the display answer scores of the most recently submitted e times for the same question are used as the display answer representation of the question , Indicates the most recent e-th time the answer score is displayed;

[0024] Represent the implicit answer of each question and display answer representation Splice together to get a complete representation of the answer to the question ; According to the order of answering questions, the complete answer situation of n questions related to a knowledge point is represented to form an answer situation sequence , For the A complete representation of the answer to a question; ;

[0025] Experts mark the importance of questions relative to knowledge points, and obtain a weight matrix based on the importance of each question relative to the knowledge point. , the sequence of answering questions The elements in are weighted to obtain the weighted answer sequence :

[0026] ;

[0027] Indicates The importance of the question relative to the knowledge point; For the The weighted complete answer representation of a question;

[0028] Weighted answer sequence Through the Transformer serialization model, we can obtain the student’s practical experience and learning status representation B of the knowledge point:

[0029] ;

[0030] The theoretical learning representation A and the practical experience representation B are concatenated, and the concatenated result is passed through a fully connected layer to obtain the student's overall learning representation C of the knowledge point:

[0031] ;

[0032] in, is the first weight matrix, is the first bias vector, Indicates that A and B are concatenated.

[0033] Furthermore, the knowledge graph records the predecessor and successor relationships between m knowledge points. dimensional adjacency matrix; if there is no pointing relationship between two knowledge points in the knowledge graph, the corresponding element in the adjacency matrix is ​​initialized to 0; if there is a pointing relationship between two knowledge points in the knowledge graph, the corresponding element in the adjacency matrix is ​​initialized to 1.

[0034] Furthermore, the knowledge graph is constructed based on the learning path relationship of the knowledge points and stored in the form of an adjacency matrix, and the similarity between the knowledge points is integrated into the adjacency matrix to obtain a similarity adjacency matrix, which specifically includes:

[0035] The knowledge graph and the corresponding adjacency matrix are processed by the similarity between knowledge points to obtain the similarity adjacency matrix E:

[0036] If there is no pointing relationship between two knowledge points in the knowledge graph, the initialization value of the corresponding element in the adjacency matrix is ​​retained as 0;

[0037] If there is a pointing relationship between two knowledge points in the knowledge graph, the similarity between the two knowledge points is used as the new value of the corresponding element in the adjacency matrix. The similarity between the knowledge points is calculated as follows:

[0038] Pass the two knowledge points through the large language model to obtain the word embedding vector of the first knowledge point And the word embedding vector of the second knowledge point ; The similarity s of two knowledge points is measured by calculating the cosine similarity between word embedding vectors. The formula is as follows:

[0039] ;

[0040] in, is the inner product of two vectors, and Respectively and Length.

[0041] Furthermore, each knowledge point is taken as a node, C is taken as a node feature, the node feature matrix and the similarity adjacency matrix are input into the graph attention network, and a new representation D of the student's learning status of the knowledge point corresponding to each node is output; based on D, the probability of the knowledge point being diagnosed as each mastery level category is obtained, specifically including:

[0042] The graph attention network is used to learn the attention weights between nodes and combine the features of neighboring nodes with the features of the current node to achieve information aggregation:

[0043] Calculate the attention weight between the node corresponding to the i-th knowledge point and the node corresponding to the j-th knowledge point :

[0044] ;

[0045] and are the overall learning status representations of the i-th knowledge point and the j-th knowledge point respectively; is the second weight matrix; Indicates that and Perform splicing processing; LeakyReLu is the activation function, and softmax represents the softmax function used to normalize the attention weight;

[0046] Calculate the aggregated features of the node corresponding to the i-th knowledge point:

[0047] ;

[0048] The node corresponding to the i-th knowledge point is called node i. represents the aggregated features of node i, is the activation function; m is the number of knowledge points; is an element in the similarity adjacency matrix E used to represent the similarity between the i-th knowledge point and the j-th knowledge point;

[0049] The output of the graph neural network is a new representation D of the learning status of the knowledge point corresponding to each node; D is passed through a fully connected layer and a softmax function to obtain the probability that the i-th knowledge point is diagnosed as each mastery level category. :

[0050] ;

[0051] in, is the new representation of the learning situation of the i-th knowledge point, is the third weight matrix, is the third bias vector.

[0052] Furthermore, the multi-category cross entropy loss function for:

[0053] ;

[0054] in, is the total number of knowledge point training samples; is the total number of mastery categories; Represents the true classification label. If The knowledge point training samples belong to mastery level categories, then ,otherwise ; Indicates The knowledge point training samples are predicted as The probability of mastery level categories; , .

[0055] Compared with the prior art, the beneficial technical effects of the present invention are:

[0056] The present invention combines students' theoretical learning and practical experience to conduct a comprehensive assessment of students' learning situation, and can comprehensively and systematically measure students' mastery of programming knowledge points. For the special type of programming questions, special data such as the quality of the code generated by students' answers are processed in a fine-grained manner to help the model capture students' deep-level performance and style habits. Through the graph attention network, combined with the knowledge graph that incorporates learning paths and similarity information, cognitive diagnosis is achieved, which can accurately locate students' knowledge mastery and provide strong support for personalized teaching. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A schematic diagram of the process of training a cognitive diagnosis model according to the present invention;

[0058] Figure 2 This is a schematic diagram of data collection according to the present invention. DETAILED DESCRIPTION

[0059] A preferred embodiment of the present invention is described in detail below with reference to the accompanying drawings.

[0060] A fine-grained cognitive diagnosis method for programming knowledge points in the field of programming education comprehensively considers students' theoretical learning situation, practical experience performance, and special data that can be generated by programming learning, and uses graph attention networks and knowledge graphs to achieve effective diagnosis of students' mastery of programming knowledge points.

[0061] like Figure 1 As shown, the fine-grained programming knowledge point cognitive diagnosis method in the field of programming education in the present invention includes the following steps:

[0062] S1: Data collection and annotation. Relying on the mainstream integrated programming teaching platform, data is collected from two dimensions: theoretical learning and practical experience. Experts annotate the importance of questions relative to knowledge points, the relationship between knowledge points in learning paths, and the categories of students' mastery of knowledge points.

[0063] Step S1 specifically includes:

[0064] Data collection: With the help of the current mainstream programming teaching integrated platform, according to Figure 2 Conduct data collection. For theoretical learning data, the main purpose is to record students' learning status in multiple dimensions, including the completion percentage of document reading for the knowledge point, the completion percentage of video lessons for the knowledge point, and the completion percentage of questions for the knowledge point. For practical experience data, the main purpose is to record students' implicit answer performance and explicit answer performance for each question of each knowledge point. Among them, the implicit answer performance not only records the time taken to answer each question, but also records the time complexity of the code submitted each time and the code text of the question, so as to analyze the quality of students' code. The explicit answer performance of the question includes the ratio of the number of passed test cases submitted each time to the total number of test cases to obtain the answer sequence.

[0065] Data labeling: For the questions corresponding to each knowledge point, experts label the importance of the questions to the knowledge points based on the difficulty, coverage and quality of the questions, and perform normalization. Experts label the predecessor and successor relationships between knowledge points based on the learning path, and construct a knowledge graph stored in the form of an adjacency matrix. If there is no directed relationship between knowledge points, the corresponding element in the adjacency matrix is ​​set to 0, and if there is a directed relationship between knowledge points, the corresponding element in the adjacency matrix is ​​set to 1. Experts label the students' mastery of each knowledge point based on their daily learning level, test level and programming level, and divide them into elementary, intermediate, advanced and expert levels.

[0066] S2: Representation of students’ learning situation of knowledge points. Process theoretical learning data and represent the theoretical learning data of three dimensions as a three-dimensional vector. Process practical experience data and represent and concatenate the students’ implicit answer performance and explicit answer performance on n questions related to each knowledge point. The concatenated n multidimensional vectors are processed into a multidimensional vector through a serialization model to obtain the representation of students’ practical experience learning situation of the knowledge points; the representation of theoretical learning situation and the representation of practical experience learning situation are concatenated and input into the fully connected layer to obtain the overall representation of students’ learning situation of the knowledge points.

[0067] Step S2 specifically includes:

[0068] Representation of students’ theoretical learning: The percentage of document reading completion for the knowledge point is recorded as , the completion percentage of the video course where the knowledge point is located is recorded as , the completion percentage of the question where the knowledge point is located is recorded as , then we can obtain the students' theoretical learning status representation of the knowledge points .

[0069] Characterization of students’ practical experience: This process mainly designs scoring criteria and comprehensively evaluates students’ practical performance. The process is as follows.

[0070] 1) Characterize the implicit answer performance of each question: For programming questions, each answer is a direct reflection of the student's mastery of the knowledge points. Therefore, the average value method is used to process each implicit answer performance. Determine whether the time spent on each answer exceeds the prescribed time for the question, and use the proportion of times that do not exceed the prescribed time as the student's answer time score. ; Determine whether the time complexity of the code submitted each time meets the specified time complexity of the question, and use the proportion of times that meet the specified time complexity as the score of the student's code running efficiency ; Input the code text of the question into the large language model with code capabilities. The large language model evaluates the quality of the code text based on the code format and code readability. The evaluation result is a continuous value from 0 to 1. The obtained evaluation result is used as the score of the student's code quality ; Implicit answer representation of the question , superscript Indicates transpose.

[0071] 2) Characterize the display answer performance of each question: The ratio of the number of passed test cases to the total number of test cases submitted each time is used as the display answer score for each time. Since the number of times students attempt to submit programming questions varies, and statistics show that students generally submit no more than seven times. Considering that each submission by a student represents their learning process and progress in understanding. Therefore, only the display answer scores of the last seven student submissions are retained. For students who have answered questions less than seven times, a forward-fill method is used to copy the results of the first submission to the previous place where there is no data. The sequence of seven display answer scores is the display answer representation of the question. .

[0072] 3) Represent the implicit answer of each question and display answer representation By splicing, you can get a complete representation of the answer to the question. ; According to the order of answering questions, the complete answer situation of n questions related to a knowledge point is represented to form an answer situation sequence , For the A complete representation of the answer to a question; .

[0073] In the above annotation stage, the weight matrix of each question relative to the knowledge point is obtained , the weighted answer sequence can be obtained by the following formula :

[0074] .

[0075] The answer sequence is passed through the Transformer serialization model, and the student's practical experience and learning situation of the knowledge point is represented as B:

[0076] ;

[0077] in, is a , B is a matrix The matrix of .

[0078] The theoretical learning situation representation A is concatenated with the practical experience learning situation representation B, and the concatenated result is processed into dimensional vector, that is, the overall learning status representation of students on the knowledge point C:

[0079] ;

[0080] in, The size is The first weight matrix, is the first bias vector of length d, Indicates the concatenation of A and B. d indicates the length of the student's overall representation of the knowledge point.

[0081] S3: Representation of knowledge point relevance: The similarity between knowledge points is measured by cosine similarity, and the similarity between knowledge points is incorporated into the adjacency matrix to obtain a similarity adjacency matrix.

[0082] Step S3 specifically includes:

[0083] The knowledge graph in the form of an adjacency matrix annotated by experts is further processed. The knowledge graph records the predecessor and successor relationships between m knowledge points, in the form of a dimensional adjacency matrix.

[0084] If there is no directional relationship between two knowledge points in the knowledge graph, the initialization value of the corresponding element in the adjacency matrix is ​​retained as 0.

[0085] If there is a pointing relationship between two knowledge points in the knowledge graph, the similarity between the two knowledge points is used as the new value of the corresponding element in the adjacency matrix. The similarity between the knowledge points is calculated as follows:

[0086] Use the word embedding interface provided by the commercial large language model to calculate the similarity between knowledge points. For example, using the openai open source word embedding interface, take two knowledge points as input and obtain two dimensional word embedding vector and Then, considering that the embedding vectors of programming knowledge points may be highly multidimensional in semantics, the cosine similarity is used to calculate the similarity s between the knowledge points corresponding to the two word embedding vectors:

[0087] ;

[0088] in, is the inner product of two vectors, and Represents vectors With vector Length.

[0089] The similarity adjacency matrix after incorporating similarity information is recorded as E, which is still a dimensional matrix.

[0090] S4: Cognitive diagnosis model training. Each knowledge point is taken as a node, and the student's overall learning status representation of the knowledge point is taken as the node feature. The relationship between nodes is identified through the similarity adjacency matrix. The node feature matrix and the similarity adjacency matrix are input into the graph attention network for information aggregation, and the new representation D of the student's learning status of the knowledge point corresponding to each node is output; D is input into the fully connected layer to obtain the probability of the knowledge point being diagnosed as each mastery level category.

[0091] Step S4 specifically includes:

[0092] The overall learning status of the i-th knowledge point is represented as , is a The matrix of . The similarity adjacency matrix E of dimensional records the relationship between knowledge points. The attention weights between nodes are learned through the graph attention network, and the features of neighbor nodes are combined with the features of the current node to achieve information aggregation.

[0093] Among them, the core formula of the graph attention mechanism is:

[0094] 1) Calculate the attention weight between the node corresponding to the i-th knowledge point and the node corresponding to the j-th knowledge point :

[0095] ;

[0096] in, and are the overall learning status representations of the i-th knowledge point and the j-th knowledge point respectively; is the second weight matrix; Indicates that and The splicing process is performed; LeakyReLu is an activation function that can increase the nonlinear fitting ability of the graph attention network; softmax represents the softmax function used to normalize the attention weight.

[0097] 2) Calculate the aggregated features of node i:

[0098] ;

[0099] in, Represents the aggregated features of node i, with the same dimension ,Right now dimension; is the activation function, ReLU function can be used; m is the number of knowledge points; is an element in the similarity adjacency matrix E used to represent the similarity between the ith knowledge point and the jth knowledge point.

[0100] The output of the graph neural network is a new representation D of the learning status of the knowledge point corresponding to each node; D is passed through a fully connected layer and a softmax function to obtain the probability that the i-th knowledge point is diagnosed as each mastery level category. :

[0101] ;

[0102] in, is the new representation of the learning situation of the i-th knowledge point, dimensional vector, is the third weight matrix, with dimension , where k is the total number of mastery level categories, in this embodiment k=4, and the mastery level categories include elementary, intermediate, advanced and expert levels; is the third bias vector, with dimension The output dimension of the fully connected layer is the same as the total number of mastery levels.

[0103] Finally, the multi-category cross entropy loss function is used To implement cognitive diagnostic model training:

[0104] ;

[0105] in, is the total number of knowledge point training samples; is the total number of mastery categories; Represents the true classification label. If The knowledge point training samples belong to mastery level categories, then ,otherwise ; Indicates The knowledge point training samples are predicted as The probability of mastery level categories, The result has a total of k dimensions, each of which represents the probability of being predicted as the corresponding mastery level category.

[0106] After the cognitive diagnosis model training is completed, the students' overall learning situation representation of the knowledge points and knowledge graph information are input, and the cognitive diagnosis model will output a probability distribution for each knowledge point. This probability distribution represents the probability of the knowledge point being diagnosed as each category according to the degree of mastery of the student.

[0107] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.

[0108] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A fine-grained programming knowledge point cognitive diagnosis method in the field of programming education, characterized in that: By completing the cognitive diagnosis model training, the categories of the degree of students' mastery of knowledge points are output; the cognitive diagnosis model training process includes: Collect theoretical learning data and practical experience data; the practical experience data includes students' implicit answer performance and explicit answer performance for each question of each knowledge point; The theoretical learning data is upgraded to obtain the representation A of the students' theoretical learning of the knowledge point; the implicit answer performance and explicit answer performance of the students on the n questions related to each knowledge point are represented and spliced, and the spliced ​​n multi-dimensional vectors are processed into a multi-dimensional vector to obtain the representation B of the students' practical experience learning of the knowledge point; A and B are spliced ​​to obtain the overall representation C of the students' learning of the knowledge point; A knowledge graph is constructed based on the learning path relationship of knowledge points and stored in the form of an adjacency matrix, and the similarities between knowledge points are integrated into the adjacency matrix to obtain a similarity adjacency matrix; specifically, the following steps are included: The knowledge graph and the corresponding adjacency matrix are processed by the similarity between knowledge points to obtain the similarity adjacency matrix E: If there is no pointing relationship between two knowledge points in the knowledge graph, the initialization value of the corresponding element in the adjacency matrix is ​​retained as 0; If there is a pointing relationship between two knowledge points in the knowledge graph, the similarity between the two knowledge points is used as the new value of the corresponding element in the adjacency matrix. The similarity between the knowledge points is calculated as follows: Pass the two knowledge points through the large language model to obtain the word embedding vector of the first knowledge point And the word embedding vector of the second knowledge point ; The similarity s of two knowledge points is measured by calculating the cosine similarity between word embedding vectors. The formula is as follows: ; in, is the inner product of two vectors, and Respectively and Length; Each knowledge point is regarded as a node, C is regarded as the node feature, the node feature matrix and the similarity adjacency matrix are input into the graph attention network, and a new representation D of the student's learning status of the knowledge point corresponding to each node is output; based on D, the probability of the knowledge point being diagnosed as each mastery level category is obtained; and the multi-category cross entropy loss function is used to realize the training of the cognitive diagnosis model.

2. The fine-grained programming knowledge point cognitive diagnosis method in the field of programming education according to claim 1 is characterized in that: The theoretical learning data is upgraded to obtain the representation A of the students' theoretical learning situation of the knowledge points, which specifically includes: Theoretical learning data includes three dimensions of data: the completion percentage of the document reading where the knowledge point is located, the completion percentage of the video course where the knowledge point is located, and the completion percentage of the questions where the knowledge point is located; The reading completion percentage of the document containing the knowledge point is recorded as , the completion percentage of the video course where the knowledge point is located is recorded as , the completion percentage of the question where the knowledge point is located is recorded as , then we can obtain the students' theoretical learning status representation of the knowledge points , superscript Indicates transpose.

3. The fine-grained programming knowledge point cognitive diagnosis method in the field of programming education according to claim 1 is characterized in that: The implicit answer performance and the explicit answer performance of the students on the n questions related to each knowledge point are characterized and then spliced, and the spliced ​​n multidimensional vectors are processed into a multidimensional vector to obtain the student's practical experience learning situation representation B for the knowledge point; A and B are spliced ​​to obtain the student's overall learning situation representation C for the knowledge point, which specifically includes: The implicit answer performance of the question includes the time taken to answer each question, the time complexity of the code submitted each time, and the code text of the question. The explicit answer performance of the question includes the ratio of the number of passed test cases submitted each time to the total number of test cases. Characterize the implicit answer performance of each question: determine whether the time taken to answer each question exceeds the prescribed time for the question, and use the proportion of times that do not exceed the prescribed time as the student's answer time score ; Determine whether the time complexity of the code submitted each time meets the specified time complexity of the question, and use the proportion of times that meet the specified time complexity as the score of the student's code running efficiency ; Input the code text of the question into a large language model with code capabilities. The large language model evaluates the quality of the code text based on the code format and code readability, and uses the evaluation result as the score of the student's code quality ; Implicit answer representation of the question , superscript represents transpose; Characterize the display answer performance of each question: the ratio of the number of passed test cases submitted each time to the total number of test cases is used as the display answer score each time, and the display answer scores of the most recently submitted e times for the same question are used as the display answer representation of the question , Indicates the most recent e-th time the answer score is displayed; Represent the implicit answer of each question and display answer representation Splice together to get a complete representation of the answer to the question ; According to the order of answering questions, the complete answer situation of n questions related to a knowledge point is represented to form an answer situation sequence , For the A complete representation of the answer to a question; ; Experts mark the importance of questions relative to knowledge points, and obtain a weight matrix based on the importance of each question relative to the knowledge point. , the sequence of answering questions The elements in are weighted to obtain the weighted answer sequence : ; Indicates The importance of the question relative to the knowledge point; For the The weighted complete answer representation of a question; Weighted answer sequence Through the Transformer serialization model, we can obtain the student’s practical experience and learning status representation B of the knowledge point: ; The theoretical learning representation A and the practical experience representation B are concatenated, and the concatenated result is passed through a fully connected layer to obtain the student's overall learning representation C of the knowledge point: ; in, is the first weight matrix, is the first bias vector, Indicates that A and B are concatenated.

4. The fine-grained programming knowledge point cognitive diagnosis method in the field of programming education according to claim 1 is characterized in that: The knowledge graph records the predecessor and successor relationships between m knowledge points. It is stored in the form of a dimensional adjacency matrix; If there is no pointing relationship between two knowledge points in the knowledge graph, the corresponding element in the adjacency matrix is ​​initialized to 0. If there is a pointing relationship between two knowledge points in the knowledge graph, the corresponding element in the adjacency matrix is ​​initialized to 1.

5. The fine-grained programming knowledge point cognitive diagnosis method in the field of programming education according to claim 1 is characterized in that: Each knowledge point is taken as a node, C is taken as a node feature, the node feature matrix and the similarity adjacency matrix are input into the graph attention network, and a new representation D of the student's learning status of the knowledge point corresponding to each node is output; Based on D, the probability of a knowledge point being diagnosed as each mastery level category is obtained, including: The graph attention network is used to learn the attention weights between nodes and combine the features of neighboring nodes with the features of the current node to achieve information aggregation: Calculate the attention weight between the node corresponding to the i-th knowledge point and the node corresponding to the j-th knowledge point : ; and are the overall learning status representations of the i-th knowledge point and the j-th knowledge point respectively; is the second weight matrix; Indicates that and Perform splicing processing; LeakyReLu is the activation function, and softmax represents the softmax function used to normalize the attention weight; Calculate the aggregated features of the node corresponding to the i-th knowledge point: ; The node corresponding to the i-th knowledge point is called node i. represents the aggregated features of node i, is the activation function; m is the number of knowledge points; is an element in the similarity adjacency matrix E used to represent the similarity between the i-th knowledge point and the j-th knowledge point; The output of the graph neural network is a new representation D of the learning status of the knowledge point corresponding to each node; D is passed through a fully connected layer and a softmax function to obtain the probability that the i-th knowledge point is diagnosed as each mastery level category. : ; in, is the new representation of the learning situation of the i-th knowledge point, is the third weight matrix, is the third bias vector.

6. The fine-grained programming knowledge point cognitive diagnosis method in the field of programming education according to claim 1, characterized in that: The multi-class cross entropy loss function for: ; in, is the total number of knowledge point training samples; is the total number of mastery categories; Represents the true classification label. If The knowledge point training samples belong to mastery level categories, then ,otherwise ; Indicates The knowledge point training samples are predicted as The probability of mastery level categories; , .

Citation Information

Patent Citations

  • Cognitive diagnosis method and device based on graph attention network and text information

    CN115238036A

  • Intelligent exercise recommendation method and system for programming learning scene and storage medium

    CN116151242A