Cognitive diagnosis method based on emotion perception
By introducing emotion perception modules and transfer learning technology into cognitive diagnostic methods, the performance degradation of existing methods in insufficient data and domain-specific applications is solved, achieving higher accuracy and robustness, as well as improving cross-domain adaptability.
Patent Information
- Application Number
- CN202510273913.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-10
AI Technical Summary
The existing cognitive diagnostic methods are limited in practical scenarios, especially when data is insufficient and domain-specific models are applied, resulting in a degradation in model performance.
A cognitive diagnosis method based on emotion perception is proposed. By constructing student emotion perception modules in the source domain and the target domain, combining transfer learning technology, emotion prediction and cognitive diagnosis are realized, thereby improving the adaptability and accuracy of the model.
This method realizes emotion prediction and cognitive diagnosis without emotion labels, improves the accuracy and robustness of the model, and enhances cross-domain adaptability.
Smart Images

Figure CN120123742A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of cognitive diagnosis, and specifically relates to a cognitive diagnosis method based on emotion perception. Background Art
[0002] In intelligent education, cognitive diagnosis (CD) is the fundamental support for various downstream tasks and is thus of crucial importance. Cognitive diagnosis models include the concepts of students, exercises, and knowledge points. Specifically, an exercise contains corresponding knowledge concepts, and the cognitive diagnosis task aims to infer the student's knowledge state of relevant concepts through the exercise answer record (correct or incorrect).
[0003] In the research on cognitive diagnosis, especially in classical models such as the item response theory IRT and the deterministic input noise and "and" gate DINA model, these models use discrete vectors to represent students and test questions and use functions to simulate the interaction between students and exercises. The development of cognitive diagnosis has gone through several stages, and various models have played important roles. Tatsuoka first proposed the concept of cognitive diagnosis and introduced the Q-matrix theory to describe the relationship between test questions and knowledge concepts, laying the foundation for subsequent models. Classical models such as the item response theory (IRT) and the deterministic input, noise "and" gate (DINA) model played important roles in the early stage. IRT is a continuous model that expresses the probability of a correct answer in functional form and uses the Logistic function to relate the student's ability to performance. DINA is a discrete model that combines the student's test scores (matrix X), knowledge point tests (matrix Q), and the student's mastery of these points (matrix A). It introduces slip and guess parameters and uses simple "and" gate logic, with high interpretability and ease of use. With the progress of cognitive diagnosis, the neuro-cognitive diagnosis (NCD) model now uses neural network technology to learn complex user-task interactions from heterogeneous data, providing accurate and interpretable results. In addition, the relationship graph-driven cognitive diagnosis (RCD) model captures intra-layer structures and inter-layer interactions through a multi-layer relationship graph, significantly improving performance.
[0004] However, despite their great success, some problems limit their application in practical scenarios. First, some domains usually lack sufficient data. For example, many schools do not have a system for collecting students' learning data (such as students' emotion data when doing exercises). Second, even if there is sufficient data, existing methods are domain-specific. Directly applying a model trained in one domain (such as ASSISTments2017) to another domain (such as ASSISTments2012) is not a good choice because it may lead to a significant performance decline. Summary of the Invention
[0005] The present invention aims to solve the above-mentioned deficiencies in the prior art and proposes a cognitive diagnosis method based on emotion perception, with the expectation of realizing emotion prediction and cognitive diagnosis without emotion labels, thereby improving the accuracy and robustness of cognitive diagnosis.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A cognitive diagnosis method based on emotion perception according to the present invention is characterized by including the following steps:
[0008] Step 1. Define a cognitive diagnosis task based on emotion perception:
[0009] Step 1.1 Construct a set of source domain student answer records , and let Any source domain student answer record in be , where represents the th source domain student, represents the th source domain exercise, represents the th source domain student 's score on the th source domain exercise . When = 1, it means that the th source domain student answers the th source domain exercise correctly. When = 0, it means that the th source domain student answers the th source domain exercise incorrectly. represents the th source domain student 's emotion vector during the process of answering the th source domain exercise , and , where represents the th source domain student 's th emotion label value during the process of answering the th source domain exercise; is the number of emotion categories; is the number of source domain students, is the number of source domain exercises, is the number of source domain knowledge concepts;
[0010] Step 1.2 Construct the set of answer records of target-domain students , let any answer record of a target-domain student in be , where represents the th target-domain student, represents the th target-domain exercise,
[0011]
[0012] , where represents whether the th source-domain exercise is related to the th source-domain knowledge concept . If it is related, then let , otherwise, let ;
[0012] Construct the relationship matrix between target-domain exercises and target-domain knowledge concepts , where represents whether the th target-domain exercise is related to the th target-domain knowledge concept . If it is related, then let , otherwise, let ;
[0013] Step 2. Respectively establish a source-domain diagnostic network and a target-domain diagnostic network based on emotion perception, both of which include a student emotion perception module, a basic cognitive diagnosis module, and an emotion-perception-based cognitive diagnosis module;
[0014] Step 2.1. Construct the source-domain student emotion perception module in the source-domain diagnostic network, and calculate the mastery level of each source-domain student on knowledge concepts using different matrices to be trained on the source domain , the potential emotion features of each source-domain student , the difficulty of each source-domain exercise on different knowledge concepts and discrimination , so as to obtain the emotion prediction value of the source-domain student in the process of answering source-domain exercises, and use it to construct the mean square error loss function ;
[0015] Step 2.2. Construct the target-domain student emotion perception module in the target-domain diagnostic network, and calculate the mastery level of each target-domain student on knowledge concepts using different matrices to be trained on the target domain , the potential emotion features of each target student , the difficulty of each target-domain exercise on different knowledge concepts and discrimination , so as to obtain the emotion prediction value of the target-domain student in the process of answering target-domain exercises;
[0016] Step 2.3. The basic cognitive diagnostic modules on the source domain and the target domain are respectively used to process , , and as well as , , and to obtain the initial prediction scores on the source domain and the initial prediction scores on the target domain;
[0017] Step 2.4. The cognitive diagnostic modules on the source domain and the target domain respectively process the emotion prediction values on the source domain and the emotion prediction values on the target domain, and correspondingly obtain the final prediction scores on the source domain and the final prediction scores on the target domain, and use them to construct the binary cross-entropy loss function and the binary cross-entropy loss function of the cognitive diagnostic module in the target-domain diagnostic network ;
[0018] Step 3. Use Equation (24) to construct the total loss function of the source-domain diagnostic network , and use the Adam optimizer to train the source-domain diagnostic network and minimize until converges, so as to obtain the trained source-domain diagnostic model, and output the optimal source-domain emotion category centroid matrix , the optimal source-domain slip category centroid matrix and the optimal source-domain guess category centroid matrix ;
[0019] (24)
[0020] In formula (12), represents the weight parameter of the source domain emotion loss;
[0021] Step 4: Construct the total loss of the target domain diagnosis network , and use the Adam optimizer to train the target domain diagnosis network and minimize until converges, so as to obtain a target domain diagnosis model with better prediction effect, and transfer the emotion weights of other domains to realize the cognitive diagnosis of emotions.
[0022] Another feature of the cognitive diagnosis method based on emotion perception according to the present invention is that the step 2.1 includes the following steps:
[0023] Step 2.1.1: Map the th source domain student to the corresponding one-hot encoded vector , and let the th encoding in be 1, and the other encodings be 0;
[0024] Map the th source domain exercise to the corresponding one-hot encoded vector , and let the th encoding in be 1, and the other encodings be 0;
[0025] Step 2.1.2: Define the matrix to be trained of the source domain students , the matrix to be trained of the source domain emotion features , the matrix to be trained of the source domain difficulty , the matrix to be trained of the source domain discrimination and the matrix of the source domain weights to be trained ; represents the dimension of the potential emotion features of each source domain student , ;
[0026] Step 2.1.3: Use formula (1) to calculate the mastery level of the th source domain student on the source domain knowledge concepts and the initial potential emotion features of the :
[0027] (1)
[0028] In formula (1), represents a non - linear activation function;
[0029] Step 2.1.4: Calculate the source - domain correlation vector of the th source - domain exercise on the source - domain knowledge concept using formula (2), and calculate the difficulty and discrimination of the th source - domain exercise using formula (3): th difficulty and discrimination :
[0030] (2)
[0031] (3)
[0032] Step 2.1.5: Obtain the emotional prediction value of the source - domain student when answering the th source - domain exercise using formula (4), where represents the th emotional prediction label value of the th source - domain student when answering the th source - domain exercise: th
[0033] (4)
[0034] In formula (4), , represents the weight matrix in the fully - connected layer, is the bias in the fully - connected layer, represents the vector concatenation operation;
[0035] Step 2.1.6: Construct the mean - square error loss function of the source - domain student emotional perception module using formula (5):
[0036] (5).
[0037] Furthermore, Step 2.2 includes the following steps:
[0038] Step 2.2.1: Map the target - domain student node to a one - hot encoded vector , let The bit is 1, and the other bits are 0; map each target exercise node to a one-hot encoded vector , and let The bit is 1, and the other bits are 0;
[0039] Step 2.2.2, Define the trainable matrix of students in the target domain , the trainable matrix of emotional features in the target domain , the matrix to be trained for the difficulty of the target domain , the trainable matrix of discrimination in the target domain and the weight matrix of the target domain ; ;
[0040] Step 2.2.3, Use Equation (6) to calculate the mastery level of students in the target domain on the knowledge concepts in the target domain , the initial potential emotional features of students in the target domain :
[0041] (6)
[0042] Step 2.2.4, Use Equation (2) to calculate the target domain correlation vector of the target exercise on the knowledge concepts in the target domain, and use Equation (3) to calculate the difficulty of the target exercise , the discrimination of the target exercise :
[0043] (7)
[0044] (8)
[0045] Step 2.2.5, Construct a fully connected layer in the target domain, and use Equation (9) to obtain the emotional prediction value of students in the target domain during the process of answering the target exercise , where represents:
[0046] (9)
[0047] In Equation (4), contains the predicted values of the emotions of students in the target domain for each exercise, represents the weight matrix, is the bias, represents a vector concatenation operation.
[0048] Furthermore, step 2.3 includes the following steps:
[0049] Step 2.3.1: When n = 1, the basic cognitive diagnosis module in the source domain diagnosis network uses Equation (10) to obtain the source domain prediction result at the th layer during answering, and the basic cognitive diagnosis module in the target domain diagnosis network uses Equation (11) to obtain the target domain prediction result at the th layer during answering: :
[0050] (10)
[0051] (11)
[0052] In Equations (10) and (11), is an element-wise product;
[0053] Step 2.3.2: The basic cognitive diagnosis module in the source domain diagnosis network uses Equation (12) to obtain the source domain prediction result at the nth layer during answering , and the basic cognitive diagnosis module in the target domain diagnosis network uses Equation (13) to obtain the source domain prediction result at the nth layer during answering , , :
[0054] (12)
[0055] (13)
[0056] In Equation (12), represents the weight matrix of the fully connected layer at the nth layer in the basic cognitive diagnosis module of the source domain diagnosis network, and
[0057] represents the bias of the fully connected layer at the nth layer in the basic cognitive diagnosis module of the target domain diagnosis network; represents the bias of the fully connected layer at the nth layer in the basic cognitive diagnosis module of the target domain diagnosis network;
[0058] Step 2.3.2. The basic cognitive diagnosis module in the source domain diagnosis network uses Equation (14) to obtain the initial prediction score when answering ; the basic cognitive diagnosis module in the target domain diagnosis network uses Equation (15) to obtain the initial prediction score when answering : : :
[0059] (14)
[0060] (15).
[0061] Furthermore, Step 2.4 includes the following steps:
[0062] Step 2.4.1. The cognitive diagnosis module in the source domain diagnosis network uses Equations (16) and (17) to calculate the probability of guessing when answering and the probability of making a mistake ; the cognitive diagnosis module in the target domain diagnosis network uses Equations (18) and (19) to calculate the probability of guessing when answering and the probability of making a mistake :
[0063] (16)
[0064] (17)
[0065] (18)
[0066] (19)
[0067] In Equations (16) and (17), are the source domain guessing weight matrix and the source domain sliding weight matrix respectively, , are the source domain guessing bias term and the source domain sliding bias term respectively;
[0068] In Equations (18) and (19), are the target domain guessing weight matrix and the target domain sliding weight matrix respectively, , are the target domain guessing bias term and the target domain sliding bias term respectively;
[0069] Step 2.4.2. The cognitive diagnosis module in the source domain diagnosis network uses Equation (20) to obtain the source domain student In the process of answering the final predicted score ; the cognitive diagnosis module in the target domain diagnosis network uses equation (21) to obtain the final predicted score of the target domain students in the process of answering the final predicted score :
[0070] (20)
[0071] (21)
[0072] Step 2.4.3. Use equations (22) and (23) to construct the binary cross-entropy loss function of the cognitive diagnosis module in the source domain diagnosis network and the binary cross-entropy loss function of the cognitive diagnosis module in the target domain diagnosis network :
[0073] (22)
[0074] (23).
[0075] Furthermore, the total loss in step 4 is constructed as follows:
[0076] Step 4.1. Use equation (25) to construct the emotion loss MMD function of the target domain diagnosis network :
[0077] (25)
[0078] In equation (25), represents the optimal source domain emotion category centroid matrix, represents the target domain emotion category centroid matrix; represents the reproducing kernel Hilbert space, represents the mean of the sample distribution in the feature space;
[0079] Step 4.2. Use equation (26) to construct the sliding loss MMD function of the target domain diagnosis network :
[0080] (26)
[0081] In equation (26), represents the optimal source domain slip category centroid matrix, represents the target domain slip category centroid matrix;
[0082] Step 4.3. Construct the guessing loss MMD function of the target domain diagnosis network using Equation (27). :
[0083] (27)
[0084] In Equation (27), represents the class centroid matrix of the optimal source domain guess, represents the class centroid matrix of the target domain guess;
[0085] Step 4.4. Construct the total loss of the target domain diagnosis network using Equation (28). :
[0086] (28)
[0087] In Equation (28), and are weight parameters that balance the impact recognition error and the MMD loss.
[0088] An electronic device according to the present invention includes a memory and a processor, characterized in that the memory is used to store a program that supports the processor to execute the cognitive diagnosis method, and the processor is configured to execute the program stored in the memory.
[0089] A computer-readable storage medium according to the present invention, characterized in that a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the cognitive diagnosis method when run by a processor.
[0090] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0091] 1. The present invention breaks through the limitations of traditional methods in the field of cognitive diagnosis. In order to avoid the complexity of the open set, a new domain adaptation (DA) method is innovatively proposed from the perspective of emotion. By combining emotion perception and transfer learning techniques, the effectiveness of the method of the present invention in cognitive diagnosis is proved. This method not only improves the adaptability of the model in the new domain, but also provides a new research direction and technical approach for further exploration and development in the fields of emotion perception and cognitive diagnosis in the future;
[0092] 2. Based on the existing cognitive diagnosis framework, the present invention deeply explores the joint alignment technology of marginal distribution and conditional distribution. By matching the marginal distributions of the source domain and the target domain and combining the alignment of conditional distributions, the data distribution differences between different domains are effectively reduced. This method of joint distribution alignment not only improves the generalization ability of the model but also enhances its adaptability and accuracy in different domains, providing a solid theoretical basis and technical support for cross-domain cognitive diagnosis;
[0093] 3. To verify the effectiveness of the cognitive diagnosis method for emotion domain adaptation, the present invention conducts comprehensive experiments on multiple benchmark datasets. The experimental results show that the performance of this method on different datasets is better than that of traditional cognitive diagnosis methods, significantly improving the accuracy and robustness of the model. These experiments not only verify the reliability of the emotion domain adaptation method but also demonstrate its potential in practical applications, providing strong experimental support for the combination of emotion perception and cognitive diagnosis.
[0094] 4. The present invention uses transfer learning technology to transfer the emotion features and cognitive patterns learned in the source domain to the target domain, thereby improving the performance of the target domain model. The experimental results show that this method significantly improves the cognitive diagnosis effect in the target domain, proving the effectiveness of the combination of transfer learning and cognitive diagnosis. This method not only expands the application scope of cognitive diagnosis but also provides new ideas and methods for the effective utilization of cross-domain knowledge. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] Figure 1 It is a framework diagram of the model of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0096] In this embodiment, a cognitive diagnosis method based on emotion perception is as Figure 1 shown and includes the following steps:
[0097] Step 1. Define a cognitive diagnosis task based on emotion perception:
[0098] Step 1.1 Construct a set of source domain student answer records , and let any source domain student answer record in it be , where represents the th source domain student, represents the th source domain exercise, represents the th source domain student 's score on the th source domain exercise . When = 1, it means the A source domain student At the th source domain exercise Answering correctly, when = 0, it means the th source domain student At the th source domain exercise Answering wrongly, It means the th source domain student During the process of answering the th source domain exercise Emotional vector, and , where It means the th source domain student During the process of answering the th source domain exercise The th emotional label value, for example, the degree of concentration or confusion of the student When doing the exercise ; Is the number of emotional categories; Is the number of source domain students, Is the number of source domain exercises, Is the number of source domain knowledge concepts.
[0099] Step 1.2 Construct the answering record set of target domain students , Let Any answering record of a target domain student in , where It means the th target domain student, It means the 'th target domain exercise, It means the th target domain student At the th target domain exercise The score obtained, when = 1, it means the th target domain student At the th target domain exercise Answering correctly, when = 0, it means the th target domain student At the th target domain exercise Answering wrongly. The purpose of this step is to establish an answering record similar to that of the source domain for target domain students for subsequent emotional and cognitive analysis.
[0100] Step 1.3 Construct a relationship matrix between the source domain exercises and the source domain knowledge concepts , where represents the th source domain exercise and the th source domain knowledge concept is relevant. If it is relevant, let , otherwise, let ;
[0101] Construct a relationship matrix between the target domain exercises and the target domain knowledge concepts , where represents the th target domain exercise and the th target domain knowledge concept is relevant. If it is relevant, let , otherwise, let . This matrix is similar to the source domain matrix, aiming to describe the relevance between exercises and knowledge concepts in the target domain for cross - domain analysis and comparison.
[0102] Step 2: Respectively establish a source domain diagnosis network and a target domain diagnosis network based on emotion perception, both of which include a student emotion perception module, a basic cognitive diagnosis module, and an emotion - perception - based cognitive diagnosis module;
[0103] Step 2.1: Construct the source domain student emotion perception module in the source domain diagnosis network, and calculate the mastery level of each source domain student on knowledge concepts using different matrices to be trained respectively , each source domain student's potential emotion feature , the difficulty and discrimination of each source domain exercise on different knowledge concepts:
[0104] Step 2.1.1: Map the th source domain student to the corresponding one - hot encoded vector , let the th bit encoding in be 1, and the other bit encodings be 0;
[0105] Map the th source domain exercise to the corresponding one - hot encoded vector , let the th bit encoding in be 1, and the other bit encodings be 0.
[0106] Step 2.1.2, define the matrix to be trained for source domain students , the matrix to be trained for source domain emotional features , the matrix to be trained for source domain difficulty , the matrix to be trained for source domain discrimination and the weight matrix of the source domain to be trained ; represents the dimensionality of the potential emotional features of each source domain student . .
[0107] Step 2.1.3, use Equation (1) to calculate the mastery level of the -th source domain student on the knowledge concepts in the source domain and the initial potential emotional features of the -th source domain student : :
[0108] (1)
[0109] In Equation (1), represents the non-linear activation function, represents the mastery level of the source domain student on the knowledge concepts, is the potential emotional feature of the source domain student.
[0110] Step 2.1.4, use Equation (2) to calculate the source domain correlation vector of the -th source domain exercise on the knowledge concepts in the source domain, and use Equation (3) to calculate the difficulty and discrimination of the -th source domain exercise :
[0111] (2)
[0112] (3)
[0113] In Equation (2), represents the knowledge concepts involved in each source domain exercise. In Equation (3), represents the difficulty of the source domain exercise on each knowledge concept, represents the ability of the source domain exercise to distinguish students with different mastery levels of knowledge concepts, is the one-hot encoded vector of the source domain exercise.
[0114] Step 2.1.5, use Equation (4) to obtain the source domain student When answering the source domain exercise the emotional prediction value during the process , where represents the th source domain student when answering the th source domain exercise the th emotional prediction label value during the process:
[0115] (4)
[0116] In formula (4), contains the predicted values of the emotions of each source domain, represents the weight matrix in the fully connected layer, is the bias in the fully connected layer, represents the vector concatenation operation.
[0117] Step 2.1.6. Use formula (5) to construct the mean square error loss function of the source domain student emotion perception module :
[0118] (5)
[0119] In formula (5), represents the emotional vector annotation of the interaction record of the th source domain student - the jth source domain exercise. The emotional loss is averaged over mini - batches. The main purpose of this constraint is to train the source domain weight matrix
[0120] Step 2.2. Construct the target domain student emotion perception module in the target domain diagnosis network, and calculate the mastery level of each target domain student in knowledge concepts using different matrices to be trained on the target domain , the potential emotional characteristics of each target student , the difficulty and discrimination of each target domain exercise in different knowledge concepts:
[0121] Step 2.2.1. Map the target domain student node to a one - hot encoded vector , let the th bit in be 1 and other bits be 0; map each target exercise node to a one - hot encoded vector let the bit is 1 and the other bits are 0;
[0122] Step 2.2.2, define the trainable matrix of students in the target domain , the trainable matrix of emotional features in the target domain , the matrix to be trained for the difficulty in the target domain , the trainable matrix of discrimination in the target domain and the weight matrix in the target domain ; .
[0123] Step 2.2.3, use Equation (6) to calculate the mastery level of students in the target domain on the knowledge concepts in the target domain , the initial potential emotional features of students in the target domain :
[0124] (6)
[0125] In Equation (6), where , represents the mastery level of students in the target domain on the knowledge concepts, is the potential emotional feature of students in the target domain.
[0126] Step 2.2.4, use Equation (2) to calculate the target domain correlation vector of the exercises in the target domain on the knowledge concepts in the target domain , use Equation (3) to calculate the difficulty of the exercises in the target domain , the discrimination of the exercises in the target domain :
[0127] (7)
[0128] (8)
[0129] In Equation (2), , represents the knowledge concepts involved in each exercise in the target domain;
[0130] In Equation (3), represents the difficulty of the exercises in the target domain on each knowledge concept, represents the ability of the exercises in the target domain to distinguish students with different mastery levels of knowledge concepts, is the one-hot encoded vector of the exercises in the target domain.
[0131] Step 2.2.5, construct a fully connected layer in the target domain, and use and to predict the students in the target domain In the process of solving the exercises in the target domain Emotions :
[0132] (9)
[0133] In formula (9), Contains the predicted value of the emotions of the students in the target domain for each exercise, Represents the weight matrix, Is the bias, Represents the vector concatenation operation.
[0134] Step 2.3, The basic cognitive diagnosis modules on the source domain and the target domain are respectively used for , And And , , And For processing, to obtain the predicted score On the source domain And the predicted score on the target domain
[0135] Step 2.3.1, The basic cognitive diagnosis module in the source domain diagnosis network uses formula (10) to obtain When answering The predicted result of the (n - 1)-th layer of the source domain , The basic cognitive diagnosis module in the target domain diagnosis network uses formula (11) to obtain When answering The predicted result of the (n - 1)-th layer of the target domain :
[0136] (10)
[0137] (11)
[0138] In formulas (10) and (11), Is the element-wise product;
[0139] Step 2.3.2, The basic cognitive diagnosis module in the source domain diagnosis network uses formula (12) to obtain When answering The predicted result of the n-th layer of the source domain , The basic cognitive diagnosis module in the target domain diagnosis network uses formula (13) to obtain When answering The predicted result of the n-th layer of the source domain , :
[0140] (12)
[0141] (13)
[0142] In Equation (12), represents the weight matrix of the n-th fully connected layer in the basic cognitive diagnosis module of the source domain diagnosis network, represents the bias of the n-th fully connected layer in the basic cognitive diagnosis module of the source domain diagnosis network.
[0143] In Equation (13), represents the weight matrix of the n-th fully connected layer in the basic cognitive diagnosis module of the target domain diagnosis network, represents the bias of the n-th fully connected layer in the basic cognitive diagnosis module of the target domain diagnosis network.
[0144] Step 2.3.2: The basic cognitive diagnosis module in the source domain diagnosis network uses Equation (14) to obtain the initial prediction score when answering , and the basic cognitive diagnosis module in the target domain diagnosis network uses Equation (15) to obtain the initial prediction score when answering :
[0145] (14)
[0146] (15)
[0147] Step 2.4: The cognitive diagnosis modules in the source domain and the target domain respectively process the predicted sentiment and to obtain the and in the source domain, and the and in the target domain:
[0148] Step 2.4.1: The cognitive diagnosis module in the source domain diagnosis network uses Equations (16) and (17) to calculate the probability of guessing when answering and the probability of making a mistake , and the cognitive diagnosis module in the target domain diagnosis network uses Equations (18) and (19) to calculate the probability of guessing when answering and the probability of making a mistake :
[0149] (16)
[0150] (17)
[0151] (18)
[0152] (19)
[0153] In equations (16) and (17), are the source domain guessing weight matrix and the source domain sliding weight matrix respectively, , are the source domain guessing bias term and the source domain sliding bias term respectively, represents the probability that a student in the source domain correctly answers an exercise due to guessing, ;
[0154] In equations (18) and (19), are the target domain guessing weight matrix and the target domain sliding weight matrix respectively, , are the target domain guessing bias term and the target domain sliding bias term respectively, represents the probability that a student in the target domain correctly answers an exercise due to guessing, .
[0155] Step 2.4.2. The cognitive diagnosis module in the source domain diagnosis network combines , and , and uses the DINA diagnosis formula shown in equation (20) to obtain the final predicted score of the source domain student when answering ; The cognitive diagnosis module in the target domain diagnosis network combines , and , uses the DINA diagnosis formula shown in equation (21), and obtains the final predicted score of the target domain student when answering :
[0156] (20)
[0157] (21)
[0158] In equation (20), the first part represents that the student does not know how to answer the exercise , but answers correctly by guessing, and the second part represents that based on the student With the ability, he should have answered the exercise correctly, but he made a mistake. The same applies to Equation (21).
[0159] Step 2.3.3: Use Equation (22) and Equation (23) to construct the binary cross-entropy loss function of the cognitive diagnosis module in the source domain diagnosis network and the binary cross-entropy loss function of the cognitive diagnosis module in the target domain diagnosis network :
[0160] (22)
[0161] (23)
[0162] Given the answer result labels of the students and are binary (0 indicates incorrect, 1 indicates correct), so the binary cross-entropy loss is used as the loss function for cognitive diagnosis.
[0163] Step 3: Training of the source domain diagnosis network;
[0164] Step 3.1: Initialize all network parameters using the Xavier initialization method;
[0165] Step 3.2: Use Equation (24) to construct the total loss function of the source domain diagnosis network :
[0166] (24)
[0167] In Equation (12), represents the weight parameter of the source domain sentiment loss;
[0168] Step 3.3: Use the Adam optimizer to train the source domain diagnosis network and minimize until converges, so as to obtain the trained source domain diagnosis model and output the optimal source domain emotion category centroid matrix 、the optimal source domain slip category centroid matrix and the optimal source domain guess category centroid matrix .
[0169] Step 4: Training of the target domain diagnosis network;
[0170] Step 4.1: Construct the total loss of the target domain diagnosis network :
[0171] Step 4.1.1: Use Equation (25) to construct the emotion loss MMD function of the target domain diagnosis network , different domains form different emotion category centroid matrices through the ACD model , approximated by MMD:
[0172] (25)
[0173] In Equation (25), represents the source domain emotion category centroid matrix, represents the target domain emotion category centroid matrix, represents the Reproducing Kernel Hilbert Space (RKHS), which is a Hilbert space with an inner product structure; represents the mean of the sample distribution in the feature space; the squared form of MMD retains the basic properties of the metric through simplified mathematical operations and analysis, and ensures the non-negativity of the mean difference; the source domain analyzes the emotional responses of students during the learning process (such as pleasure, confusion, frustration, satisfaction) through the ACD model, calculates the central position of each emotion, and forms the source domain category centroid matrix . This matrix captures the emotional change patterns of source domain students in different situations and represents them in a high-dimensional space. By adjusting the source domain bias term , the emotional responses of source domain students in different source domain exercises are mapped to these category centroids, forming emotional pseudo-labels. is both a model parameter and a feature reflecting the emotional responses of source domain students. The source domain and the target domain respectively affect the category centroid matrix. Given the cross-domain similarity of emotional responses - that is, students show highly consistent emotional responses in different learning situations - the emotion category centroid matrices of different domains are similar. This similarity can be approximated by MMD;
[0174] Step 4.1.2. Construct the sliding loss MMD function of the target domain diagnostic network using Equation (26) , construct the guessing loss MMD function of the target domain diagnostic network using Equation (27) :
[0175] (26)
[0176] (27)
[0177] Guessing behavior is often related to students' confused or focused mood, while slipping behavior may reflect students' anxiety or boredom. Therefore and respectively represent the source domain slipping and guessing category centroid matrices, and respectively represent the centroid matrices of the target domain's slipping and guessing categories, which helps to understand how emotions affect students' Q&A behavior. There are also cross-domain similarities in the source domain and the target domain. For and as well as and perform MMD approximation respectively.
[0178] Step 4.2: Use Equation (28) to construct the total loss of the target domain diagnosis network : These losses ensure the comprehensive performance of emotion recognition and cross-domain adaptation:
[0179] (28)
[0180] In Equation (28), and are weight parameters that balance the influence recognition error and the MMD loss. Through optimization algorithms such as gradient descent, the model iteratively optimizes the parameters, improving the emotion recognition accuracy and cross-domain self-adaptability.
[0181] Step 4.3: Use the Adam optimizer to train the target domain diagnosis network and minimize until converges, thereby obtaining the trained target domain diagnosis model, that is, using the trained source domain emotion category centroid matrix, slipping and guessing category centroid matrices output in Step 3.3 to perform MMD approximation processing on the target domain's emotion category centroid matrix, slipping and guessing category centroid matrices, thereby obtaining a target domain cognitive diagnosis model with better prediction effect.
[0182] In this embodiment, an electronic device includes a memory and a processor. The memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0183] In this embodiment, a computer-readable storage medium stores a computer program, and when the computer program is run by a processor, it executes the steps of the above method.
Claims
1. A cognitive diagnosis method based on emotion perception, characterized in that: The following steps are involved: Step 1: Define the cognitive diagnostic task based on emotion perception: Step 1.1 Build a source domain student answer record collection ,make The answer record of students in any source domain is ,in, Indicates Students from the source domain, Indicates Source domain exercises, Indicates Students from the source domain In the Source Domain Exercises The score on =1, indicating the Students from the source domain In the Source Domain Exercises The correct answer is =0, indicating the Students from the source domain In the Source Domain Exercises Wrong answer, Indicates Students from the source domain In answering Source Domain Exercises The sentiment vector in the process, and ,in, Indicates Students from the source domain In answering Source Domain Exercises In the process sentiment label value; is the number of emotion categories; is the number of students in the source domain, is the number of source domain exercises, is the number of source domain knowledge concepts; Step 1.2 Build a target domain student answer record set ,make The answer record of any target domain student is ,in, Indicates Target domain students, Indicates 'Target domain exercises, Indicates Target domain students In the Target Domain Exercises The score on =1, indicating the Target domain students In the Target Domain Exercises The correct answer is =0, indicating the Target domain students In the Target Domain Exercises Wrong answer; Step 1.3 Construct a relationship matrix between source domain exercises and source domain knowledge concepts ,in, Indicates Source Domain Exercises With Source Domain Knowledge Concept Is it relevant? If so, let , otherwise, let ; Construct a relationship matrix that records the target domain exercises and target domain knowledge concepts ,in, Indicates Target domain exercises With Target Domain Knowledge Concept Is it relevant? If so, let , otherwise, let ; Step 2: Establish a source domain diagnosis network and a target domain diagnosis network based on emotion perception, respectively, and both include a student emotion perception module, a basic cognitive diagnosis module, and an emotion perception cognitive diagnosis module; Step 2.1: Construct the source domain student emotion perception module in the source domain diagnosis network, and use different training matrices on the source domain to calculate the mastery level of each source domain student in the knowledge concept. , each source domain student’s potential sentiment characteristics , the difficulty of each source domain exercise in different knowledge concepts and Discrimination , thereby obtaining the predicted emotional value of source domain students in the process of answering source domain exercises, and using it to construct the mean square error loss function ; Step 2.2: Construct the target domain student emotion perception module in the target domain diagnosis network, and use different training matrices on the target domain to calculate the mastery level of each target domain student in terms of knowledge concepts. , the potential emotional characteristics of each target student , the difficulty of each target domain exercise in different knowledge concepts and Discrimination , thus obtaining the predicted emotional value of the target domain students in the process of solving the target domain exercises; Step 2.3: The basic cognitive diagnosis modules in the source domain and the target domain are used to , , and as well as , , and Processing is performed to obtain an initial prediction score on the source domain and an initial prediction score on the target domain; Step 2.4: The cognitive diagnosis module states on the source domain and the target domain process the sentiment prediction value on the source domain and the sentiment prediction value on the target domain respectively, and obtain the final prediction score on the source domain and the final prediction score on the target domain respectively, and use them to construct the binary cross entropy loss function. and the binary cross entropy loss function of the cognitive diagnosis module in the target domain diagnosis network ; Step 3: Use formula (24) to construct the total loss function of the source domain diagnosis network , and use the Adam optimizer to train the source domain diagnosis network and minimize until Until convergence, the trained source domain diagnosis model is obtained, and the optimal source domain emotion category centroid matrix is output. , the class centroid matrix of the optimal source domain slip and the class centroid matrix of the optimal source domain guess ; (24) In formula (12), The weight parameter representing the source domain sentiment loss; Step 4: Construct the total loss of the target domain diagnosis network , and use the Adam optimizer to train the target domain diagnosis network and minimize until Until convergence, a target domain diagnostic model with better prediction effect is obtained, so as to transfer the emotion weights of other domains to realize cognitive diagnosis of emotions.
2. The cognitive diagnosis method based on emotion perception according to claim 1, characterized in that: The step 2.1 comprises the following steps: Step 2.1.1, Students from the source domain Mapped to the corresponding one-hot encoded vector ,make The Bit encoding is 1, and the other bits are encoded as 0; The first Source Domain Exercises Mapped to the corresponding one-hot encoded vector ,make The Bit encoding is 1, and the other bits are encoded as 0; Step 2.1.2: Define the matrix to be trained for the source domain students , the matrix to be trained of source domain sentiment features , the matrix to be trained of the source domain difficulty , the matrix to be trained for source domain discrimination And the source domain weight matrix to be trained ; Represents the potential emotional characteristics of each source domain student The dimension of ; Step 2.1.3: Use formula (1) to calculate Students from the source domain The level of mastery of source domain knowledge concepts and Students from the source domain The initial latent emotional features : (1) In formula (1), represents a nonlinear activation function; Step 2.1.4: Use formula (2) to calculate Source Domain Exercises Source domain relevance vector on source domain knowledge concepts , and use formula (3) to calculate the Source Domain Exercises Difficulty and discrimination : (2) (3) Step 2.1.5: Use formula (4) to get the source domain students In answering Source Domain Exercises The predictive value of emotion in the process ,in, Indicates Students from the source domain In answering Source Domain Exercises In the process Sentiment prediction label values: (4) In formula (4), , represents the weight matrix in the fully connected layer, is the bias in the fully connected layer, Represents a vector concatenation operation; Step 2.1.6: Use formula (5) to construct the mean square error loss function of the source domain student emotion perception module : (5)。 3. The cognitive diagnosis method based on emotion perception according to claim 2, characterized in that: Step 2.2 includes the following steps: Step 2.2.1: Set the target domain student node Mapped to a one-hot encoded vector ,make The Bit is 1, and the other bits are 0; each target exercise node Mapped to a one-hot encoded vector ,make The Bit is 1, the other bits are 0; Step 2.2.2: Define the target domain student trainable matrix , target domain sentiment feature trainable matrix , the matrix to be trained of the target domain difficulty , target domain discrimination trainable matrix and the target domain weight matrix ; ; Step 2.2.3: Use formula (6) to calculate the number of students in the target domain The level of mastery of target domain knowledge concepts , the initial target domain students’ latent emotional characteristics : (6) Step 2.2.4: Use formula (2) to calculate the target domain problem Target domain relevance vector on target domain knowledge concepts , use formula (3) to calculate the target domain problem Difficulty , target domain exercise discrimination : (7) (8) Step 2.2.5: Build a fully connected layer in the target domain and use formula (9) to get the target domain student Solving the target domain exercises The predictive value of emotion in the process ,in, express: (9) In formula (4), Contains the predicted value of the target domain students’ sentiment towards each exercise, represents the weight matrix, is the bias, Represents a vector concatenation operation.
4. The cognitive diagnosis method based on emotion perception according to claim 3 is characterized in that: Step 2.3 includes the following steps: Step 2.3.1: When n = 1, the basic cognitive diagnosis module in the source domain diagnosis network is obtained using formula (10): In answer The Layer source domain prediction results The basic cognitive diagnosis module in the target domain diagnosis network is obtained using formula (11): In answer The Layer target domain prediction results : (10) (11) In formula (10) and formula (11), is the element-wise product; Step 2.3.2: The basic cognitive diagnosis module in the source domain diagnosis network is obtained using formula (12): In answer The prediction result of the source domain at the nth layer , the basic cognitive diagnosis module in the target domain diagnosis network is obtained using formula (13) In answer The prediction result of the source domain at the nth layer , : (12) (13) In formula (12), Represents the weight matrix of the nth fully connected layer in the basic cognitive diagnosis module of the source domain diagnosis network, Represents the bias of the nth fully connected layer in the basic cognitive diagnosis module of the source domain diagnosis network; In formula (13), Represents the weight matrix of the nth fully connected layer in the basic cognitive diagnosis module of the target domain diagnosis network, represents the bias of the nth fully connected layer in the basic cognitive diagnosis module of the target domain diagnosis network; Step 2.3.2: The basic cognitive diagnosis module in the source domain diagnosis network is obtained using formula (14): In answer The initial prediction score at , the basic cognitive diagnosis module in the target domain diagnosis network is obtained using formula (15) In answer The initial prediction score at : (14) (15)。 5. The cognitive diagnosis method based on emotion perception according to claim 4, characterized in that: Step 2.4 includes the following steps: Step 2.4.1: The cognitive diagnosis module in the source domain diagnosis network is calculated using equations (16) and (17): answer The probability of guessing and the probability of error , the cognitive diagnosis module in the target domain diagnosis network is calculated using equations (18) and (19) answer The probability of guessing and the probability of error : (16) (17) (18) (19) In formula (16) and formula (17), They are the source domain guessing weight matrix and the source domain sliding weight matrix, , They are the source domain guessing bias term and the source domain sliding bias term; In formula (18) and formula (19), They are the target domain guessing weight matrix and the target domain sliding weight matrix, , They are the target domain guessing bias term and the target domain sliding bias term; Step 2.4.2: The cognitive diagnosis module in the source domain diagnosis network uses formula (20) to obtain the source domain student In answer The final prediction score at ; The cognitive diagnosis module in the target domain diagnosis network uses formula (21) to obtain the target domain student In answer The final prediction score at : (20) (21) Step 2.4.3: Use equations (22) and (23) to construct the binary cross entropy loss function of the cognitive diagnosis module in the source domain diagnosis network. and the binary cross entropy loss function of the cognitive diagnosis module in the target domain diagnosis network : (22) (23)。 6. The cognitive diagnosis method based on emotion perception according to claim 5, characterized in that: Total loss in step 4 It is constructed as follows: Step 4.1: Use formula (25) to construct the emotion loss MMD function of the target domain diagnosis network : (25) In formula (25), represents the optimal source domain emotion category centroid matrix, Represents the target domain emotion category centroid matrix; represents the reproducing kernel Hilbert space, Represents the mean of the sample distribution in the feature space; Step 4.2: Use formula (26) to construct the sliding loss MMD function of the target domain diagnosis network : (26) In formula (26), represents the optimal source domain slip category centroid matrix, The class centroid matrix representing the target domain slip; Step 4.3: Use formula (27) to construct the guess loss MMD function of the target domain diagnosis network : (27) In formula (27), represents the class centroid matrix of the optimal source domain guess, Represents the class centroid matrix of the target domain guess; Step 4.4: Use formula (28) to construct the total loss of the target domain diagnosis network : (28) In formula (28), and It is a weight parameter that balances the impact of recognition error and MMD loss.
7. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the cognitive diagnosis method according to any one of claims 1 to 6, and the processor is configured to execute the program stored in the memory.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the cognitive diagnosis method according to any one of claims 1 to 6 are executed.
Citation Information
Patent Citations
Field-adaptive deep knowledge tracking and personalized exercise recommendation method
CN111444432A
Learning cognitive analysis model robustness optimization method based on causal effect
CN115879536A
Self-adaptive cognitive diagnosis method based on double-layer confrontation
CN116796822A
Personalized online test question recommendation method for student emotion perception
CN117370665A
Cross-course knowledge tracking method and device based on transfer learning
CN117911915A