Student learning cognition diagnosis method and device based on tensor network
By constructing a student learning tensor based on tensor networks and iteratively training it to extract latent features, this approach solves the problems of time-consuming, inefficient, and inaccurate diagnosis in existing cognitive diagnostic methods, achieving efficient and accurate cognitive diagnosis and dynamic teaching support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2026-04-03
Smart Images

Figure CN121789950A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and apparatus for diagnosing student learning cognition based on tensor networks. Background Technology
[0002] Cognitive diagnostics is an educational assessment method that infers students' mastery of specific knowledge points by analyzing their performance in tests or learning activities. This technology not only focuses on students' overall performance but also delves into individual abilities and skills in different cognitive domains, providing a basis for personalized instruction. As artificial intelligence evolves from perceptual intelligence to cognitive intelligence, cognitive diagnostics is also beginning to employ core AI technologies such as knowledge graphs and neural networks. The application of these technologies enables cognitive diagnostic systems to more accurately understand students' cognitive states and provide more targeted instructional support.
[0003] Existing cognitive diagnostic methods often require students to complete a large number of exercises, which is not only time-consuming but can also be inefficient. With only a small sample size, existing methods may fail to provide accurate diagnostic results. Secondly, students' mastery of knowledge points is dynamic, and traditional diagnostic methods often ignore this temporal variation. To address these issues, there is an urgent need for a new cognitive diagnostic method that can better adapt to the evolution of students' cognitive states, thereby providing more accurate diagnostic results. Summary of the Invention
[0004] To address the problem of low accuracy in diagnosing student learning cognition in existing technologies, this invention proposes a method and apparatus for diagnosing student learning cognition based on tensor networks.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A student learning cognitive diagnosis method based on tensor networks specifically includes the following steps:
[0007] S1: Collect and store student learning data from the server, which includes M students, N practice questions, and K time points;
[0008] S2: Construct a student learning tensor based on student learning data;
[0009] S3: Construct a target loss function based on student learning data and student learning tensor, and perform iterative training to extract the latent features of student learning;
[0010] S4: Output cognitive diagnostic results based on the student's latent learning characteristics.
[0011] Preferably, in step S1, the collected student learning data is stored in the form of a quadruple, which is represented as Q = (m, n, l, v), where m represents an individual student, n represents a practice question, l represents a certain time, and v represents the score obtained by the m-th student at time t for the n-th practice question.
[0012] Preferably, S2 includes:
[0013] S2-1: Select the quadruple Q in the first time interval from the student learning data quadruple Q=(m,n,l,v). (1) = (m,n,1,v), using Q (1) Construct a slice matrix T from the data (m,n,v) (1) Slice matrix T (1) The matrix has I rows, J columns, and T elements. (1) ij =v, representing the score of the i-th student at time 1 in the student learning data for the j-th exercise;
[0014] S2-2: Then select the quadruples Q from the quadruples Q = (m,n,l,v) in sequence. (2) Q (3) Q (K) Construct slice matrix T respectively (2) T (3) ... T (K) ;
[0015] S2-3: Finally, use K slice matrices arranged in ascending order of slice time periods in three-dimensional space to construct a third-order student learning data tensor X∈R. |I|×|J|×|K| R is the set of real numbers; I represents the number of students; J represents the number of practice questions; and K represents the number of time periods.
[0016] Preferably, S3 includes:
[0017] S3-1: Initialize the process parameters involved in the student learning and cognitive diagnosis process;
[0018] S3-2: Construct the target loss function based on student learning data, student learning tensor, and process parameters;
[0019] S3-3: Iteratively optimize the target loss function;
[0020] S3-4: Determine whether the target loss function has reached the termination condition. If not, continue training iteration; if so, stop training iteration and output the latent features.
[0021] Preferably, in S3-1, the process parameters include: latent feature tensors A, B, and C; feature dimensions R1, R2, and R3; maximum number of training iterations; iteration number control variable t during training; convergence termination threshold τ; and regularization factor λ.
[0022] Preferably, in step S3-2, the target loss function ε is:
[0023]
[0024] In formula (1), A, B, and C are the latent feature tensors of the tensor network; Λ represents the set of all data in tensor X, including the number of students I, the number of test questions J, and the number of time periods K; v ijk Let R1, R2, and R3 represent known entities in the student test score data tensor X, namely, the score of the i-th student on the j-th test item in the k-th time period; R1, R2, and R3 represent the feature dimensions; λ represents the regularization factor; and r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
[0025] Preferably, in step S3-3, the formula for the iteration is as follows:
[0026]
[0027] In formula (2), Λ represents the set of all data in tensor X, including the number of students I, the number of test questions J, and the number of time periods K; v ijk Let R1, R2, and R3 represent known entities in the student test score data tensor X, namely, the score of the i-th student on the j-th test item in the k-th time period; R1, R2, and R3 represent the feature dimensions; λ represents the regularization factor; and r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
[0028] Preferably, in steps S3-4, the method for determining whether the target loss function has reached the termination condition is as follows:
[0029] The target loss function increments the value of the training iteration number control variable t by 1 in each training iteration. Training stops when the value of the training iteration number control variable reaches the maximum number of training iterations.
[0030] Alternatively, during the training of the target loss function, if the absolute value of the difference between the target loss function value calculated after the current iteration and the target loss function value of the previous iteration is less than the convergence termination threshold, training is stopped.
[0031] Preferably, in step S4, the formula for calculating the cognitive diagnosis result is:
[0032]
[0033] In formula (3), This represents the cognitive diagnostic results in the student learning tensor calculated from the latent feature tensors A, B, and C; R1, R2, and R3 represent the feature dimensions; r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
[0034] The present invention also provides a student learning and cognitive diagnosis device based on tensor networks, including a data acquisition module, a storage module, a tensor construction module, a latent feature extraction module, and an output module;
[0035] The data acquisition module is used to receive student learning data from the server;
[0036] The storage module is used to store the received student learning data and cognitive diagnostic results;
[0037] The tensor construction module is used to construct student learning data tensors based on student learning data.
[0038] The latent feature extraction module is used to construct a target loss function based on the student learning data tensor and the student learning data, and extract latent features.
[0039] The output module is used to output cognitive diagnostic results based on the extracted latent features.
[0040] In summary, by adopting the above technical solution, the present invention has at least the following beneficial effects compared with the prior art:
[0041] This invention provides a method and apparatus for student learning cognitive diagnosis based on tensor networks. Specifically designed for learning data, it enables highly accurate cognitive diagnosis that conforms to statistical laws, addressing the problem of cognitive diagnosis of student learning data containing time information. It can be widely applied in cognitive diagnosis technology, educational assessment technology, and other fields. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of a student learning cognitive diagnosis method based on tensor networks according to an exemplary embodiment of the present invention.
[0043] Figure 2 This is a schematic diagram of a student learning cognitive diagnosis device based on tensor networks according to an exemplary embodiment of the present invention.
[0044] Figure 3 This is a schematic diagram of a storage module according to an exemplary embodiment of the present invention.
[0045] Figure 4This is a schematic diagram of a latent feature extraction module according to an exemplary embodiment of the present invention. Detailed Implementation
[0046] The present invention will be further described in detail below with reference to embodiments and specific implementation methods. However, this should not be construed as limiting the scope of the above-described subject matter of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.
[0047] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0048] like Figure 1 As shown, this invention provides a student learning cognition diagnosis method based on tensor networks, specifically including the following steps:
[0049] S1: Receives the instruction from the server to predict student learning diagnosis, collects student learning data from the server with M students, N practice questions, and K time points, and stores it.
[0050] The server may send instructions periodically, or according to a notification from the device, or according to a notification from a server, to the data receiving module, requesting a prediction of student learning diagnoses.
[0051] In this embodiment, the collected student learning data is stored in the form of quadruples; the quadruple is represented as Q = (m, n, l, v), where m represents an individual student, n represents a practice question, l represents a certain moment, and when v has a value, it represents the score obtained by the m-th student at the t-th moment for the n-th practice question in the student learning data.
[0052] S2: Construct a student learning tensor based on student learning data.
[0053] S2-1: Select the quadruple Q from the student learning data quadruple Q=(m,n,l,v) that is in the first time interval (i.e., l=1). (1) = (m,n,1,v), using Q (1) Construct a slice matrix T from the data (m,n,v) (1) Slice matrix T (1) The matrix has I rows, J columns, and T elements. (1) ij=v, representing the score of the i-th student at time 1 in the student learning data for the j-th exercise;
[0054] S2-2: Then select the quadruples Q from the quadruples Q = (m,n,l,v) in sequence. (2) Q (3) Q (K) Construct slice matrix T respectively (2) T (3) ... T (K) ;
[0055] S2-3: Finally, use K slice matrices arranged in ascending order of slice time periods in three-dimensional space to construct a third-order student learning data tensor X∈R. |I|×|J|×|K| Let R be the set of real numbers; I represent the number of students; J represent the number of practice questions; and K represent the number of time periods. Since a student cannot complete all the practice questions in one time period, the constructed student learning tensor X is a non-negative incomplete tensor. The set of all data in X is denoted by Λ, which includes the number of students I, the number of test questions J, the number of time periods K, etc.
[0056] S3: Construct a target loss function based on student learning data and student learning tensor, and perform iterative training to extract the latent features of student learning.
[0057] S3-1: Initialize the process parameters involved in the student learning and cognitive diagnosis process.
[0058] In this embodiment, the process parameters include: three latent feature tensors A, B, and C (filled with random decimals from 0 to 0.05); feature dimensions R1, R2, and R3 (generally set to a constant of 20); a maximum number of training iterations of 1000; a control variable t for the number of iterations during training, where t = 0 and t ≦ 1000; a convergence termination threshold τ = 0.00001; and a regularization factor λ; where:
[0059] The feature dimensions R1, R2, and R3 determine the feature space dimensions of the latent feature matrices A, B, and C, respectively.
[0060] The size of the three latent feature tensors A, B, and C is determined by the value of each dimension of the corresponding student learning tensor X and the feature dimension; that is, A is the student latent feature matrix with I rows and R1 columns, B is the exercise latent feature matrix with J rows and R2 columns, and C is the time latent feature matrix with K rows and R3 columns. The three latent feature matrices are initialized with small random positive numbers (0 to 0.05).
[0061] The maximum number of training iterations is a variable that controls the upper limit of the iteration process;
[0062] The convergence termination threshold is a parameter used to determine whether the iterative process has converged.
[0063] The regularization factor is a constant that controls the regularization effect of the relevant elements of the three latent feature matrices during the extraction iteration process.
[0064] S3-2: Based on the known data set Λ of the target student learning tensor X, the student learning tensor, and the process parameters, construct the target loss function ε, expressed by the following formula:
[0065]
[0066] In formula (1), A, B, and C are the latent feature tensors of the tensor network; Λ represents the set of all data in tensor X, including the number of students I, the number of test questions J, and the number of time periods K; v ijk Let R1, R2, and R3 represent known entities in the student test score data tensor X, namely, the score of the i-th student on the j-th test item in the k-th time period; R1, R2, and R3 represent the feature dimensions; λ represents the regularization factor; and r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
[0067] In this embodiment, the F-norm is used as the optimization objective; L2 regularization is used, where λ is the regularization factor, to constrain the optimization process and prevent overfitting.
[0068] S3-3: To ensure non-negativity during the update process, a multiplicative update rule is used to iteratively optimize ε to minimize its value. The training iteration formula is shown below:
[0069]
[0070] In formula (2), Λ represents the set of all data in tensor X, including the number of students I, the number of test questions J, and the number of time periods K; v ijk Let R1, R2, and R3 represent known entities in the student test score data tensor X, namely, the score of the i-th student on the j-th test item in the k-th time period; R1, R2, and R3 represent the feature dimensions; λ represents the regularization factor; and r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
[0071] S3-4: Determine whether the training iteration process of the target loss function ε on the known data set Λ has reached the termination condition. If not, continue the training iteration; if yes, stop the training iteration and output the three latent feature tensors.
[0072] In this step, there are two scenarios where the training iteration process of the target loss function ε on the known dataset Λ reaches the termination condition. The first scenario is that the value of the training iteration number control variable t is incremented by 1 for each iteration of the target loss function ε. When the value of the training iteration number control variable reaches the maximum number of training iterations, training stops. The second scenario is that during the training of the target loss function ε, when the absolute value of the difference between the target loss function ε value calculated after the current iteration and the target loss function ε value of the previous iteration is less than the convergence termination threshold, training stops.
[0073] S4: Based on the student's latent feature tensor, output the cognitive diagnostic results of the student's mastery of knowledge points through two fully connected layers:
[0074]
[0075] In formula (3), This represents the cognitive diagnostic results in the student learning tensor calculated from the latent feature tensors A, B, and C; R1, R2, and R3 represent the feature dimensions; r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
[0076] Based on the above, a student learning cognitive diagnosis method based on tensor networks is proposed, such as Figure 2 As shown, the present invention also provides a student learning and cognitive diagnosis device based on tensor networks, including a data acquisition module 1, a storage module 2, a tensor construction module 3, a latent feature extraction module 4, and an output module 5.
[0077] The output of data acquisition module 1 is connected to the first input of storage module 2. The output of storage module 2 is connected to the input of tensor construction module 3. The output of tensor construction module 3 is connected to the input of latent feature extraction module 4. The output of latent feature extraction module 4 is connected to the input of output module 5. The output of output module 5 is connected to the second input of storage module 2.
[0078] The data acquisition module is used to receive student learning data from the server.
[0079] Storage module 2 is used to store the received student learning data and cognitive diagnostic results.
[0080] In this embodiment, as Figure 3 As shown, the storage module 2 includes a first storage unit 21 and a second storage unit 22;
[0081] The first storage unit 21 is used to store the received student learning data and stores it in the form of a quadruple. The quadruple is represented as Q = (m, n, l, v), where m represents an individual student, n represents a practice question, l represents a certain time, and when v has a value, it represents the score obtained by the m-th student at time t for the n-th practice question in the student learning data.
[0082] The second storage unit 22 is used to store the cognitive diagnostic results output by the output module.
[0083] In this embodiment, tensor construction module 3 is used to construct a student learning data tensor: X∈R based on the stored student learning data. |I|×|J|×|K| R is the set of real numbers; I represents the number of students; J represents the number of practice questions; and K represents the number of time periods.
[0084] The latent feature extraction module 4 is used to construct a target loss function based on the student learning data tensor and the student learning data to extract latent features.
[0085] like Figure 4 As shown, the latent feature extraction module 4 includes an initialization unit 41, a target loss function construction unit 42, and a training unit 43;
[0086] Initialization unit 41 is used to initialize the process parameters involved in the student learning tensor feature extraction process;
[0087] The objective loss function construction unit 42 is used to construct the objective loss function based on the student learning data tensor and the student learning data and process parameters.
[0088] Training unit 43 is used to train and optimize the target loss function and extract latent features.
[0089] Output module 5 is used to output cognitive diagnosis results based on the extracted latent features.
[0090] The present invention also provides an electronic device, the electronic device including a processor, the processor being configured to run a computer program stored in a memory, such that the electronic device implements the steps of the student learning cognitive diagnosis method based on tensor networks in the above embodiments.
[0091] The present invention also provides a computer-readable storage medium storing a computer program, which, when run on a processor, implements the steps of a student learning cognitive diagnosis method based on tensor networks as described in the above embodiments.
[0092] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include at least: any entity or device capable of carrying computer program code to an electronic device, recording media, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0093] Those skilled in the art will understand that the above embodiments are specific examples of implementing the present invention, and in practical applications, various changes in form and detail may be made without departing from the spirit and scope of the present invention.
Claims
1. A student learning cognitive diagnosis method based on tensor networks, characterized in that, Specifically, the following steps are included: S1: Collect and store student learning data from the server, which includes M students, N practice questions, and K time points; S2: Construct a student learning tensor based on student learning data; S3: Construct a target loss function based on student learning data and student learning tensor, and perform iterative training to extract the latent features of student learning; S4: Output cognitive diagnostic results based on the student's latent learning characteristics.
2. The student learning cognition diagnosis method based on tensor networks as described in claim 1, characterized in that, In S1, the collected student learning data is stored in the form of quadruples, which are represented as Q = (m, n, l, v), where m represents an individual student, n represents a practice question, l represents a certain time, and v represents the score obtained by the m-th student at time t for the n-th practice question.
3. The student learning cognition diagnosis method based on tensor networks as described in claim 1, characterized in that, S2 includes: S2-1: Select the quadruple Q in the first time interval from the student learning data quadruple Q=(m,n,l,v). (1) = (m,n,1,v), using Q (1) Construct a slice matrix T from the data (m,n,v) (1) Slice matrix T (1) The matrix has I rows, J columns, and T elements. (1) ij =v, representing the score of the i-th student at time 1 in the student learning data for the j-th exercise; S2-2: Then select the quadruples Q from the quadruples Q = (m,n,l,v) in sequence. (2) Q (3) Q (K) Construct slice matrix T respectively (2) T (3) ... T (K) ; S2-3: Finally, use K slice matrices arranged in ascending order of slice time periods in three-dimensional space to construct a third-order student learning data tensor X∈R. |I|×|J|×|K| R is the set of real numbers; I represents the number of students; J represents the number of practice questions; and K represents the number of time periods.
4. The student learning cognition diagnosis method based on tensor networks as described in claim 1, characterized in that, S3 includes: S3-1: Initialize the process parameters involved in the student learning and cognitive diagnosis process; S3-2: Construct the target loss function based on student learning data, student learning tensor, and process parameters; S3-3: Iteratively optimize the target loss function; S3-4: Determine whether the target loss function has reached the termination condition. If not, continue training iteration; if so, stop training iteration and output the latent features.
5. The student learning cognition diagnosis method based on tensor networks as described in claim 4, characterized in that, In S3-1, the process parameters include: latent feature tensors A, B, and C; feature dimensions R1, R2, and R3; maximum number of training iterations; iteration number control variable t during training; convergence termination threshold τ; and regularization factor λ.
6. The student learning cognitive diagnosis method based on tensor networks as described in claim 4, characterized in that, In S3-2, the target loss function ε is: In formula (1), A, B, and C are the latent feature tensors of the tensor network; Λ represents the set of all data in tensor X, including the number of students I, the number of test questions J, and the number of time periods K; v ijk Let X represent the known entity in the student test score data tensor, that is, the score of the i-th student on the j-th test item in the k-th time period; R1, R2, and R3 represent the feature dimensions. λ represents the regularization factor; r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
7. The student learning cognitive diagnosis method based on tensor networks as described in claim 4, characterized in that, In S3-3, the formula for the iteration is as follows: In formula (2), Λ represents the set of all data in tensor X, including the number of students I, the number of test questions J, and the number of time periods K; v ijk Let X represent the known entity in the student test score data tensor, that is, the score of the i-th student on the j-th test item in the k-th time period; R1, R2, and R3 represent the feature dimensions. λ represents the regularization factor; r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
8. The student learning cognition diagnosis method based on tensor networks as described in claim 4, characterized in that, In S3-4, the method for determining whether the target loss function has reached the termination condition is as follows: The target loss function increments the value of the training iteration number control variable t by 1 in each training iteration. Training stops when the value of the training iteration number control variable reaches the maximum number of training iterations. Alternatively, during the training of the target loss function, if the absolute value of the difference between the target loss function value calculated after the current iteration and the target loss function value of the previous iteration is less than the convergence termination threshold, training is stopped.
9. The student learning cognition diagnosis method based on tensor networks as described in claim 1, characterized in that, In S4, the formula for calculating the cognitive diagnosis result is as follows: In formula (3), This represents the cognitive diagnostic results in the student learning tensor calculated from the latent feature tensors A, B, and C; R1, R2, and R3 represent the feature dimensions; r1, r2, and r3 represent the indices of the feature dimensions R1, R2, and R3, respectively. These represent individual elements in tensors A, B, and C, respectively.
10. A student learning cognitive diagnostic device based on tensor networks, based on the method of any one of claims 1-9, characterized in that, It includes a data acquisition module, a storage module, a tensor construction module, a latent feature extraction module, and an output module; The data acquisition module is used to receive student learning data from the server; The storage module is used to store the received student learning data and cognitive diagnostic results; The tensor construction module is used to construct student learning data tensors based on student learning data. The latent feature extraction module is used to construct a target loss function based on the student learning data tensor and the student learning data, and extract latent features. The output module is used to output cognitive diagnostic results based on the extracted latent features.