Online learning early warning method, device, equipment and medium
By analyzing learning log data through the autoencoder model with self-attention mechanism, the problem of early warning lag in time management strategies in online learning is solved, and earlier academic risk identification and intervention are achieved.
Patent Information
- Application Number
- CN202510947369.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-09-26
AI Technical Summary
Existing technologies fail to effectively provide early warnings for students at academic risk from the perspective of time management strategies in online learning, and lack analysis of learning units and semester stages, resulting in delayed warning times.
An autoencoder model based on the self-attention mechanism is adopted to perform feature extraction and attention calculation on the learning log time series data through the LSTM layer and the self-attention mechanism layer, to determine the attention weight of each student in each unit and identify the warning unit.
It improves the accuracy of academic risk prediction, advances the warning time by 1 unit, and helps teachers to intervene effectively earlier in the semester.
Smart Images

Figure CN120706994A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of machine learning and computer science, and in particular to an online learning early warning method, apparatus, device, and medium. Background Art
[0002] The rapid development of informatization has promoted the continuous popularization of educational information technology. The continuous transformation of educational methods has also prompted great changes in people's educational concepts. With the continuous deepening of the concept of lifelong learning, traditional learning methods can no longer meet the complex situation of current learners. Large-scale open network learning has emerged. Especially in recent years, the development of online education has reached a climax and has once again become the focus of people's attention.
[0003] To better support students at risk, deep learning models are often used for early warning in online learning. However, existing research has focused solely on the variables themselves, rarely analyzing learners' time management strategies across time dimensions like learning units and semesters, and providing intervention support based on data analysis evidence. To help teachers intervene with students at risk through time management strategies, an online learning early warning technology is urgently needed. Summary of the Invention
[0004] The purpose of this application is to provide an early warning method, device, equipment and medium for online learning, which has higher academic risk prediction accuracy, can help teachers intervene in students with academic risks through time management strategies, can obtain higher model evaluation indicators earlier in the semester, and advance the warning time by 1 unit compared with the baseline model.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides an online learning early warning method, comprising:
[0007] Acquire learning log time series data; the learning log time series data includes behavior vectors of several students; the learning log time series data is divided into several units according to the learning time;
[0008] Inputting the learning log time series data into a trained academic performance prediction model to obtain the student's academic risk prediction result; the academic performance prediction model is an autoencoder based on a self-attention mechanism, including an input layer, an encoder, a decoder, a classification module, and an output layer; the encoder and the decoder include an LSTM layer and a self-attention mechanism layer; the self-attention mechanism layer is used to calculate the attention weight of each student in each unit;
[0009] The warning unit is determined based on each student’s attention weight in each unit; the warning unit is the key unit for students to study.
[0010] Optionally, the warning unit is determined based on the attention weight of each student in each unit, specifically including:
[0011] The number of times each unit is identified as a turning point is determined based on each student's attention weight in each unit; a turning point is represented by a decrease in attention weight from the previous unit to the current unit;
[0012] All units are sorted from largest to smallest in terms of the number of times their turning points are identified, and the unit with the largest value is determined as the early warning unit.
[0013] Optionally, calculate the attention weight of each student in each unit, including:
[0014] Calculate the attention score of each student’s behavior vector in each unit based on the input of the self-attention mechanism layer;
[0015] For each student in each unit, the Softmax function is used to convert the attention score of each student's behavior vector in each unit into an attention weight to obtain the attention weight of each student in each unit.
[0016] Optionally, the calculation formula for the student's attention weight in each unit is as follows:
[0017]
[0018] e i,j =tanh(Wh i,j +b);
[0019] Among them, a i,j represents the attention weight of the i-th student in the j-th unit; e i,j is the attention score of the behavior vector of the i-th student in the j-th unit; e i,k represents the attention score of the behavior vector of the i-th student in the k-th unit, T is the number of units; represents the behavior vector of the i-th student in the j-th unit; tanh represents the Tanh activation function; is a trainable weight matrix, is the bias vector; represents the set of real numbers; F is the number of rows in each cell.
[0020] Optionally, the calculation formula for the student's attention weight in each unit is as follows:
[0021]
[0022] Among them, attention_weights i,j is the attention weight of the i-th student in the j-th unit; softmax represents the softmax function; score i,j score is the attention score of the behavior vector of the i-th student in the j-th unit; score i,k is the attention score of the behavior vector of the i-th student in the k-th unit; n is the number of units; Q is the query vector, K is the key vector; d k is the dot product of the query vector and the key vector; the superscript T indicates transpose.
[0023] Optionally, the input layer is used to input learning log time series data;
[0024] The encoder is used to: extract features from the learning log time series data through the LSTM layer to obtain student behavior time series features; perform attention calculation on the student behavior time series features through the self-attention mechanism layer to obtain an encoded attention vector; and convert the encoded attention vector through the fully connected layer to obtain an encoder output sequence;
[0025] The decoder is configured to: extract features from the encoder output sequence through an LSTM layer to obtain decoding behavior temporal features; perform attention calculation on the decoding behavior temporal features through a self-attention mechanism layer to obtain a decoding attention vector; and reconstruct the decoded attention vector through a reconstruction layer to obtain a reconstructed sequence.
[0026] The classification module is used to perform classification based on the decoded attention vector to obtain the student's academic risk prediction result;
[0027] The output layer is used to output the student's academic risk prediction results.
[0028] Optionally, the reconstruction layer is a fully connected layer and the classification module is a fully connected layer.
[0029] In a second aspect, the present application provides an online learning early warning device, comprising:
[0030] A learning log time series data acquisition module is used to: acquire learning log time series data; the learning log time series data includes behavior vectors of several students; the learning log series data is divided into several units according to the learning time;
[0031] The academic risk prediction module is configured to input the learning log time series data into a trained academic performance prediction model to obtain a student's academic risk prediction result; the academic performance prediction model is an autoencoder based on a self-attention mechanism, comprising an input layer, an encoder, a decoder, a classification module, and an output layer; the encoder and decoder comprise an LSTM layer and a self-attention mechanism layer; the self-attention mechanism layer is used to calculate the attention weight of each student in each unit;
[0032] The warning unit determination module is used to: determine the warning unit according to the attention weight of each student in each unit; the warning unit is the key unit for students to learn.
[0033] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned online learning early warning method.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned online learning early warning method when executed by a processor.
[0035] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0036] The present application provides an online learning early warning method, apparatus, equipment and medium, which inputs learning log time series data into a trained learning performance prediction model to perform academic risk prediction, wherein the learning performance prediction model is an autoencoder based on a self-attention mechanism, including an input layer, an encoder, a decoder, a classification module and an output layer, the encoder and the decoder include an LSTM layer and a self-attention mechanism layer, and the learning performance prediction model constructed by the LSTM layer and the self-attention mechanism layer is used to predict academic risks, and the academic risk prediction accuracy is higher; the present application adopts the attention weight of each student in each unit calculated by the self-attention mechanism layer in the academic risk prediction to determine the warning unit, and the trained learning performance prediction model of the present application advances the warning time by 1 unit relative to the baseline model, which can help teachers intervene in students with academic risks from the perspective of time management strategies, and can obtain higher model evaluation indicators earlier in the semester. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 This is a diagram of an application environment of an online learning early warning method in one embodiment of the present application;
[0039] Figure 2 A flowchart of an online learning early warning method provided in one embodiment of the present application;
[0040] Figure 3 A schematic diagram of the structure of a learning performance prediction model provided in one embodiment of the present application;
[0041] Figure 4 A schematic diagram of the basic principle of the self-attention mechanism provided in one embodiment of the present application;
[0042] Figure 5 A schematic diagram of the architecture of a learning pattern recognition module based on time step analysis provided in one embodiment of the present application;
[0043] Figure 6 A schematic diagram of the weights of each unit time step of a student S provided in one embodiment of the present application;
[0044] Figure 7 A schematic diagram of a learning performance prediction process provided in an embodiment of the present application;
[0045] Figure 8 This is a schematic diagram of the number of learning participations of the high pass rate group 1_0_0 in each unit during the semester provided in one embodiment of the present application;
[0046] Figure 9 This is a schematic diagram of the number of learning participation times of the high pass rate group 1_1_1 in each unit of the semester provided in one embodiment of the present application;
[0047] Figure 10 A schematic diagram of the number of learning participation times of the low pass rate group 0_2_1 in each unit during the semester provided in one embodiment of the present application;
[0048] Figure 11 A schematic diagram of the number of learning participation times of the low pass rate group 2_2_1 in each unit during the semester provided in one embodiment of the present application;
[0049] Figure 12 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0051] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0052] The online learning early warning method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the learning log time series data to the server 104. After the server 104 receives the learning log time series data, for the learning log time series data, the server 104 inputs the learning log time series data into the trained academic performance prediction model to obtain the student's academic risk prediction result, and determines the warning unit based on the attention weight of each student in each unit calculated by the self-attention mechanism layer. The server 104 can feedback the obtained warning unit to the terminal 102. In addition, in some embodiments, the online learning early warning method can also be implemented separately by the server 104 or the terminal 102. For example, the terminal 102 can directly perform video labeling processing on the learning log time series data, or the server 104 can obtain the learning log time series data from the data storage system and perform video labeling processing on the learning log time series data.
[0053] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, and tablet computers. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.
[0054] In an exemplary embodiment, Figure 2 As shown, an online learning early warning method is provided, which is executed by a computer device, specifically a computer device such as a terminal or a server, or a terminal and a server. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used for explanation, including the following steps 201 to 203.
[0055] Step 201 , obtaining learning log time series data; the learning log time series data includes behavior vectors of several students; the learning log time series data is divided into several units according to the learning time.
[0056] Step 202: Input the learning log time series data into a trained learning performance prediction model to obtain the student's academic risk prediction result; the learning performance prediction model is an autoencoder based on a self-attention mechanism, including an input layer, an encoder, a decoder, a classification module and an output layer; the encoder and the decoder include an LSTM (Long Short-Term Memory) layer and a self-attention mechanism layer; the self-attention mechanism layer is used to calculate the attention weight of each student in each unit.
[0057] Step 203: determine a warning unit according to each student's attention weight in each unit; the warning unit is the key unit for students to study.
[0058] Implement the above steps 201 to 203, input the learning log time series data into the trained academic performance prediction model, and perform academic risk prediction, wherein the academic performance prediction model is an autoencoder based on the self-attention mechanism, including an input layer, an encoder, a decoder, a classification module and an output layer, the encoder and the decoder include an LSTM layer and a self-attention mechanism layer, and the academic risk prediction is performed by the academic performance prediction model constructed by the LSTM layer and the self-attention mechanism layer, and the academic risk prediction accuracy is higher; in the academic risk prediction, the attention weight of each student in each unit calculated by the self-attention mechanism layer is used to determine the warning unit. Compared with the baseline model, the trained academic performance prediction model of the present application advances the warning time by 1 unit, which can help teachers intervene in students with academic risks from the perspective of time management strategies, and can obtain higher model evaluation indicators earlier in the semester.
[0059] The attention mechanism, as a deep learning model, has garnered widespread attention from researchers. Drawing on the attention mechanism's properties in the human brain, it employs a "selective attention" approach to adaptively focus on different parts of the input data, achieving "weighted focus" and thus improving model performance and accuracy. The attention mechanism exhibits unique advantages in processing sequential data, particularly in natural language processing. It also provides interpretability for understanding model decisions. By observing the network's attention to input information, we can infer the key features the model relies on when making decisions, thereby better understanding the model's decision-making process and predictions. The attention mechanism can identify key variables that influence performance, enabling teachers to understand where students are performing well or poorly.
[0060] Learning log time series data is collected from the education system and includes both basic and derived variables. Basic variables record the number of occurrences of four behaviors: submitting assignments and quizzes, browsing resources, and participating in forum discussions. Derived variables include the completion rate of each unit's homework; the time difference between a student's first log entry and the first log entry of all students; the time difference between the last homework submission time and the first log entry for each unit; the time difference between the time of logging into the platform and the time of starting learning; and the time difference between the last log entry and the first log entry for each unit.
[0061] The number of bits of the input feature vector of the learning performance prediction model is [B×T×d], where B is the batch size, T is the time step, and d is the number of features. At each time step, the feature vector contains the learning log information of each unit of the student (i.e., the behavior vector), thereby generating the input matrix X for student i i ∈R T*d The time step T is 4 (indicating 4 units), so it corresponds to four time steps, that is, the input is the behavior vectors of units 1-4, the behavior vectors of units 2-5, the behavior vectors of units 3-6, ..., and so on.
[0062] The output of the academic performance prediction model: the probability value of a student with a score below 60 corresponds to an at-risk (failed) student or a success (passed) student.
[0063] Before being input into the learning performance prediction model, the learning log time series data is also cleaned and standardized, or preprocessed, including denoising, scaling, normalization and other operations, to improve the quality of the time series data.
[0064] The academic performance prediction model is used to identify key features in the time series data of student learning logs. This method can significantly improve the prediction performance of downstream task models. This academic performance prediction model is a deep learning model. Specifically, it is an autoencoder with attention mechanism (AAM-AE) or attention-augmented autoencoder (AAM-AE) based on the self-attention mechanism, which is used to reconstruct and classify time series data. The academic performance prediction model consists of an encoder-decoder structure, and the attention mechanism is introduced in the encoder and decoder. This academic performance prediction model can not only reconstruct the input sequence but also perform binary classification tasks on each sequence, such as predicting whether a student passed a course.
[0065] like Figure 3As shown in Figure 2, the learning performance prediction model consists of an input layer, an encoder, a decoder, a classification module, and an output layer. The encoder and decoder use LSTM to capture long-term dependencies in time series and generate attention vectors.
[0066] The input layer is used to input learning log time series data. That is, it receives the preprocessed learning log time series data.
[0067] The encoder is used to: extract features from the learning log time series data through the LSTM layer to obtain student behavior time series features; perform attention calculation on the student behavior time series features through the self-attention mechanism layer to obtain an encoded attention vector; and convert the encoded attention vector through the fully connected layer to obtain an encoder output sequence.
[0068] The encoder uses a long short-term memory network (LSTM) to capture long-term dependencies in the time series and generate an encoded attention vector. Given an input sequence x of shape (T, F) i :
[0069] x i =[x i,1 ,x i,2 ,…,x i,T ] T ;
[0070] in Represents the behavior vector of the i-th student at the t-th time step, t=1,2…T.
[0071] The LSTM layer in the encoder is defined as follows:
[0072] h t ,c t =LSTM(x t ;h t-1 ,c t-1 );
[0073] Among them, h t and c t are the hidden state and cell state at the tth time step, h t-1 and c t-1 are the hidden state and cell state of the t-1th time step respectively, and the encoder outputs the hidden state H = [h1,h2,…,h T ] and the final state s=(h T ,c T ).
[0074] To enhance the effect of the encoder, a self-attention mechanism layer is added to the model to calculate the attention score and generate the attention vector c encSpecifically, for each time step t, the attention score e is calculated t And apply the softmax function to get the attention weight a t :
[0075]
[0076] Among them, e t represents the attention score (alignment score) at the t-th time step; v a represents the attention weight vector; W represents the weight matrix; b represents the bias vector; a t represents the attention weight of the t-th time step, normalized by the softmax function, e τ is the attention score at the τth time step.
[0077] Then, the attention vector c is obtained by weighted summation of the hidden states at all time steps enc :
[0078]
[0079] This attention vector is further converted into a representation of the same size as the LSTM unit through a fully connected layer:
[0080] z enc =ReLU(W fc c enc +b fc );
[0081] Among them, z enc The encoder representation after the full connection layer conversion is the encoder output sequence; W fc represents the weight matrix of the fully connected layer; b fc The bias vector of the fully connected layer, ReLU represents the linear rectification function.
[0082] Decoder: This layer uses an LSTM layer to receive the encoder's output sequence as input and generate a reconstructed sequence. The decoder is responsible for: extracting features from the encoder's output sequence using the LSTM layer to obtain decoding behavior temporal features; performing attention calculation on the decoding behavior temporal features using the self-attention mechanism layer to obtain a decoding attention vector; and reconstructing the sequence using the decoding attention vector using the reconstruction layer.
[0083] The decoder also uses LSTM layers and uses the final state of the encoder as the initial state. It receives the encoder output sequence H as input and generates a reconstructed sequence
[0084] The LSTM layer in the decoder is defined as follows:
[0085]
[0086] in, represents the hidden state of the LSTM layer in the decoder at the tth time step; represents the cell state of the LSTM layer in the decoder at the tth time step, and denote the hidden state and cell state at the t-1th time step, respectively.
[0087] Similar to the encoder, the decoder also contains a self-attention mechanism layer to calculate the decoder's decoding attention vector c dec And attention weights:
[0088]
[0089] Among them, e dec,t represents the attention score of the decoder at the tth time step; v a,dec represents the decoder attention weight vector; W dec represents the decoder weight matrix; b dec represents the decoder bias vector; a dec,t represents the attention weight of the decoder at the tth time step; c dec Represents the decoder's decoding attention vector.
[0090] The classification module is used to perform classification based on the decoded attention vector to obtain the student's academic risk prediction result.
[0091] The output layer is used to output the students’ academic risk prediction results.
[0092] The learning performance prediction model realizes data reconstruction and prediction tasks respectively through two independent fully connected layers, that is, the reconstruction layer is a fully connected layer (Dense Layer) and the classification module is a fully connected layer.
[0093]
[0094] y=σ(W cls c dec +b cls );
[0095] in, represents the reconstructed input sequence; W rec represents the weight matrix of the reconstruction layer; b rec Represents the bias vector of the reconstruction layer; W cls represents the weight matrix of the classification layer; b cls represents the bias term of the classification layer; y is the academic risk prediction result.
[0096] The fully connected layer also uses the Sigmoid activation function to map the scalar output of the decoder to the interval [0,1] to obtain the academic risk prediction result. The academic risk prediction result is a probability value indicating the possibility that the student faces academic risk.
[0097] Calculate the attention weight of each student in each unit, specifically including: calculating the attention score of each student's behavior vector in each unit based on the input of the self-attention mechanism layer; for each student in each unit, use the Softmax function to convert the attention score of each student's behavior vector in each unit into an attention weight, and obtain the attention weight of each student in each unit.
[0098] Suppose we have a dataset containing students' online learning behaviors, represented as a three-dimensional tensor Where N is the number of students, T is the number of units, and F is the number of actions in each unit. The goal is to calculate the importance of each student's action in each unit through the attention mechanism and extract the context vector.
[0099] The self-attention mechanism layer in this application can be implemented in two ways:
[0100] Method 1: The self-attention mechanism includes the following steps: attention score calculation, attention weight calculation, and attention vector calculation.
[0101] (1) Attention Score calculation:
[0102] First, the attention score of each student's behavior vector in each unit is calculated. When processing sequence data, the attention mechanism measures the importance of each element in the input sequence by calculating the attention score. The calculation of the attention score is one of the key steps of the attention mechanism, which determines the contribution of each input element in generating the output. The calculation formula of the attention score is as follows:
[0103] e i,j =tanh(Wh i,j +b);
[0104] Among them, e i,j is the attention score of the behavior vector of the i-th student in the j-th unit; e i,k represents the attention score of the behavior vector of the i-th student in the k-th unit, T is the number of units; represents the behavior vector of the i-th student in the j-th unit (this vector contains all the behavioral features of the student at that time step); tanh represents the Tanh activation function, which is used to calculate the alignment score and obtain the attention weight; is a trainable weight matrix, is the bias vector; represents the set of real numbers; F is the number of rows in each cell.
[0105] (2) Attention weight calculation: Next, the attention score is converted into attention weight through the Softmax function. The attention weight represents the importance of each behavior in the current unit. The calculation formula of attention weight is as follows:
[0106]
[0107] Among them, a i,j represents the attention weight of the i-th student in the j-th unit, each a i,j are between 0 and 1, and all a i,j The sum is 1.
[0108] (3) Attention vector calculation: Finally, the attention weight is used to perform weighted summation on the input behavior vector to obtain the attention vector. The calculation formula of the attention vector is as follows:
[0109]
[0110] Among them, c i represents the attention vector of the i-th student.
[0111] Method 2: For academic performance prediction, the learner's learning log is encoded into a time series, using units as the unit. During the performance prediction process, an attention mechanism calculates the weight assigned to each time step. This study uses the self-attention mechanism as a weight calculation method. The self-attention mechanism is particularly effective for analyzing short time series. Compared to conventional fully connected models, the self-attention model can dynamically generate connection weights.
[0112] The goal of the self-attention mechanism layer is to assign different attention weights based on the feature importance of each time step in the input sequence. The basic principle of the self-attention mechanism is as follows Figure 4 As shown in the figure, the calculation process of the self-attention mechanism is actually divided into three stages. The calculation of attention weights is the first and second stages, and the output of attention vectors is the third stage.
[0113] (1) Calculate the attention score: First, the input sequence is (H is the student behavior time series feature output by the LSTM layer), where T is the number of time steps, h is the number of hidden units of LSTM, and the corresponding query vector (Query), key vector (Key) and value vector (Value) are calculated. These three vectors are obtained by linear transformation with the learned weight matrix, and the weight matrix is W q、W k 、W v , then:
[0114] Q=W q H;
[0115] K=W k H;
[0116] V=W v H;
[0117] Subsequently, the attention score score (Q, K) is calculated, usually by taking the dot product of the query vector (Query) and the key vector (Key), and then dividing it by a scaling factor (usually the square root of the key vector dimension) to prevent the dot product from being too large during the calculation process, which would cause the gradient to vanish or explode. The specific formula is as follows:
[0118]
[0119] Where Q is the query vector, K is the key vector; d k is the dot product of the query vector and the key vector; the superscript T indicates transpose.
[0120] (2) Calculate the attention weight: the calculated attention score (score i,j ) will be normalized by the Softmax function to obtain the attention weight of each time step. The calculation formula of the student's attention weight in each unit is as follows:
[0121]
[0122] Among them, attention_weights i,j is the attention weight of the i-th student in the j-th unit; softmax represents the softmax function; score i,j score is the attention score of the behavior vector of the i-th student in the j-th unit; score i,k is the attention score of the behavior vector of the i-th student in the k-th unit; n is the number of units.
[0123] Through the above formula, the influence weight of each unit on the learning performance prediction can be calculated. The sum of all attention weights is 1, forming a probability distribution, which represents the degree of influence of each time step on the current time step.
[0124] (3) Calculate the weighted output: Finally, based on the calculated attention weights, perform a weighted sum calculation on all values in V to obtain the academic risk prediction result:
[0125]
[0126] In the above formula, z i Used in the classification module to calculate the academic risk prediction result Prediction.
[0127] Among them, the warning unit is determined according to the attention weight of each student in each unit, specifically including: determining the number of times each unit is identified as a turning point according to the attention weight of each student in each unit; the turning point is expressed as a decrease in the attention weight from the previous unit to the current unit; sorting the number of times all units are identified as turning points from large to small, and determining the unit with the largest value as the warning unit.
[0128] In order to verify the performance of the learning performance prediction model proposed in this application, a baseline model comparison is performed below.
[0129] The academic performance prediction model uses the self-attention mechanism as the key module for time-step analysis, combines it with the input layer, LSTM neurons and Dense output layer to build an academic performance prediction model, and uses the time series data of the learning log as input data to achieve binary classification of students at academic risk and students who pass. The early warning model based on the attention mechanism is based on the LSTM neural network prediction model, and adds an attention module to achieve the function of time-step weight calculation. This application uses various attention mechanism prediction models in the baseline model in the experiment, all of which are based on this structure. Figure 7 As shown in the figure, the input data of the model is the time series data of the learner's behavior, which is in the shape of time step * number of features. Next, LSTM neurons are used to capture the dependency relationship between the previous and next time step data in the sequence, and input it into the self-attention mechanism layer. Finally, the academic risk prediction results are output through the fully connected layer.
[0130] The autoencoder with self-attention mechanism is a model optimization of the baseline algorithm, and the self-attention mechanism is the core part of the baseline algorithm.
[0131] a. Input layer: In the model, input features are generated based on student behaviors, which are collected from the education system. The input feature vector has a size of [B×T×d], where B is the batch size, T is the time step, and d is the number of features. At each time step, the feature vector contains the learning log information of each unit of the student, thus generating the input matrix X for student i i ∈R T*d .
[0132]
[0133] The LSTM layer consists of several LSTM units, which control the flow of information within the unit through the forget gate f, input gate i, and output gate o. The input of this layer is the time series of student behavior data. The output is the student behavior time series feature H.
[0134] H = LSTM(X);
[0135] The self-attention mechanism layer performs attention calculation on the student behavior temporal features H obtained by the long short-term memory neural network layer to obtain the attention weight Z of each time step.
[0136] Z = Attention(H);
[0137] The output layer is the label prediction layer, which uses a fully connected layer for the final output prediction: Prediction = Dense(Z).
[0138] The deep learning online learning early warning algorithm includes the following steps: a. Building a deep neural network: Designing a deep neural network with multiple hidden layers to extract data features. b. Training the model: Using a large amount of labeled data to train the deep neural network, a trained learning performance prediction model is obtained, enabling the model to learn the data features. c. Testing the model: Testing the model using test data that was not used in training to evaluate its predictive performance. d. Outputting prediction results: Outputting the corresponding prediction results based on the features of the test data.
[0139] The following optimization algorithms were used during model training to optimize the performance prediction model: Adam optimization algorithm: This algorithm adjusts network weights to ensure model convergence during training. Learning rate decay strategy: This algorithm gradually reduces the learning rate during training to improve model generalization.
[0140] The performance comparison results of the learning performance prediction model of this application and other baseline models in early warning effects are shown in Table 1.
[0141] Table 1 Performance comparison of the application's academic performance prediction model and other baseline models in terms of early warning effect
[0142]
[0143]
[0144] The proposed e ncoder-attention is the learning performance prediction model proposed in this application. unit0, unit1, unit2, unit3, and unit4 represent the learning log data of units 1-4, 2-5, 3-6, 4-7, and 5-8, respectively.
[0145] The self-attention mechanism is used to predict the grades of Unit 8 to calculate the time step weight of each student in each unit and the average time step weight of student S. The time step weight of student S is as follows: Figure 6 As shown in Table 2, the time series turning point identification algorithm analyzes the time step weights to obtain the number of turning points identified for each unit. The results of semester turning point identification are shown in Table 2.
[0146] Table 2 Results of semester turning point identification
[0147] unit Number of times identified as a turning point Sorting unit3 6995 1 unit5 6944 2 unit4 6757 3 unit6 5661 4 unit2 5583 5 unit1 4247 6 unit7 3006 7 unit0 0 8 unit8 0 9
[0148] It can be seen from Table 2 that unit 3 is identified as the turning point the most times and has the highest ranking, so the warning unit is unit 3.
[0149] like Figure 5 As shown, the time step weight (attention weight) from unit 0 to unit n - semester segmentation based on the turning point recognition algorithm - learning pattern signature recognition of each stage based on the TimeSeriesKmeans algorithm - full semester learning pattern recognition. This application will also segment the semester according to the time step weight (attention weight) from unit 0 to unit n. When n=8, this application will divide the learning vectors of all divided units into three stages, S1 stage is 0-3 units, S2 stage is 4-5 units, and S3 stage is 6-8 units; use the TimeSeriesKMeans algorithm to cluster the learning vectors of each stage to discover the learning pattern of each stage. The behavior patterns of each stage are shown in Table 3, and the identified learning patterns are shown in Table 4.
[0150] Table 3 Behavioral patterns in each stage
[0151]
[0152] Table 4 Identified learning patterns
[0153]
[0154]
[0155] In Table 4, 1_1_1 indicates high participation in stages S1, S2, and S3, indicating that the student participated in the course with high participation rates in all three stages of the semester, and thus had the highest pass rate at the end of the semester.
[0156] This application also counts the number of learning participations of the high pass rate group (1_0_0 and 1_1_1) and the low pass rate group (0_2_1 and 2_2_1) in each unit of the semester, as follows: Figure 8 、 Figure 9 、 Figure 10 and Figure 11 As shown, it includes the number of learning participations in each unit, such as submitting homework, taking tests, browsing resources and discussing in forums. Figures 8-11 The statistical results can provide students with learning suggestions for each unit, and the learning performance can be improved through the number of learning parameters such as the number of homework submissions, tests, resource browsing and forum discussions in each unit.
[0157] By comparing the pass rates, the groups can be divided into three categories:
[0158] (1) High pass rate group, with a pass rate exceeding 90%, including groups 1_1_1, 1_0_0, and 0_0_0;
[0159] (2) medium pass rate group, with a pass rate below 90% and above 60%, including groups 1_0_2, 1_0_1, and 1_2_1;
[0160] (3) Low pass rate group, with a pass rate below 60%, including groups 0_2_1 and 2_2_1.
[0161] In order to compare the characteristics of learning patterns of different score groups, we plotted the behavioral mean of the representative high pass rate group (1_0_0, 1_1_1) and the low pass rate group (0_2_1, 2_2_1) in each unit.
[0162] from Figure 8 and Figure 9 As can be seen, students in group 1_0_0 with a high pass rate can maintain a continuous and stable number of learning participation in each unit of the semester, and are usually called "continuous participation"; compared with other groups, students in group 1_1_1 with a high pass rate have the highest number of behavioral participation. They have the highest number of learning behaviors in Unit 0 and maintain the highest level of behavioral participation in the first two stages (Units 0-5), but basically do not participate in learning after Unit 5, and are usually called "early bird" students.
[0163] Students in the low-pass group 0_2_1 almost gave up studying after the end of the first phase of the semester (after Unit 3) and are often referred to as "non-persistent" students. Their behavioral trends are similar to those of "early bird" students, but they lack a sufficiently high level of participation. Students in the low-pass group 2_2_1 exhibited very low behavioral scores in all units throughout the semester and are often referred to as "disengaged" students.
[0164] This application aims to improve model performance and identify key time points in early warning systems for online learning performance. It uses LSTM combined with an attention mechanism model to build a deep online learning early warning model. This model analyzes the importance of time steps in time series data and, based on this, uses semester segmentation and the TimeSeriesKmeans method to identify academic risk learning patterns. This helps teachers intervene with students at risk through time management strategies. This application has the following advantages:
[0165] 1. The online learning early warning method proposed in this application can achieve higher model evaluation indicators earlier in the semester and advance the warning time by 1 unit compared with the baseline model.
[0166] 2. The learning performance prediction model is calculated through time steps and can be used to analyze the importance of semester units, thereby identifying important turning points in the semester and dividing the semester into stages.
[0167] 3. This application uses the TimeSeriesKmeaans clustering algorithm to identify the learning patterns of students at different stages, and obtains the learning patterns of high pass rate groups and low pass rate groups with distinct characteristics.
[0168] The present application also provides an application scenario, which applies the above-mentioned online learning early warning method. Specifically: the online learning early warning method provided in this embodiment can be applied in the online learning early warning scenario. The online learning early warning scenario includes a data collection link and a learning early warning link; the learning log time series data enters the learning early warning link from the data collection link, and obtains a warning unit through human-computer collaboration. The online learning early warning method provided in this embodiment belongs to the learning early warning link. Specifically, in the learning early warning link process for the learning log time series data, the learning log time series data can be input into the trained academic performance prediction model to obtain the student's academic risk prediction result, and the warning unit is determined based on the attention weight of each student in each unit calculated by the self-attention mechanism layer.
[0169] Based on the same inventive concept, embodiments of the present application also provide an online learning early warning device for implementing the aforementioned online learning early warning method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the online learning early warning device provided below can be found in the above-mentioned limitations of the online learning early warning method and will not be further elaborated here.
[0170] In an exemplary embodiment, an online learning early warning device is provided, comprising the following modules:
[0171] A learning log time series data acquisition module is used to: acquire learning log time series data; the learning log time series data includes behavior vectors of several students; the learning log series data is divided into several units according to the learning time;
[0172] The academic risk prediction module is configured to input the learning log time series data into a trained academic performance prediction model to obtain a student's academic risk prediction result; the academic performance prediction model is an autoencoder based on a self-attention mechanism, comprising an input layer, an encoder, a decoder, a classification module, and an output layer; the encoder and decoder comprise an LSTM layer and a self-attention mechanism layer; the self-attention mechanism layer is used to calculate the attention weight of each student in each unit;
[0173] The warning unit determination module is used to: determine the warning unit according to the attention weight of each student in each unit; the warning unit is the key unit for students to learn.
[0174] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store online learning early warning data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an online learning early warning method is implemented.
[0175] Those skilled in the art will understand that Figure 12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0176] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0177] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0178] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0179] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0180] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.
[0181] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0182] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. An online learning early warning method, characterized in that: The online learning early warning method includes: Acquire learning log time series data; the learning log time series data includes behavior vectors of several students; the learning log time series data is divided into several units according to the learning time; Inputting the learning log time series data into a trained academic performance prediction model to obtain the student's academic risk prediction result; the academic performance prediction model is an autoencoder based on a self-attention mechanism, including an input layer, an encoder, a decoder, a classification module, and an output layer; the encoder and the decoder include an LSTM layer and a self-attention mechanism layer; the self-attention mechanism layer is used to calculate the attention weight of each student in each unit; The warning unit is determined based on each student’s attention weight in each unit; the warning unit is the key unit for students to study.
2. The online learning early warning method according to claim 1, characterized in that: The warning unit is determined based on each student's attention weight in each unit, including: The number of times each unit is identified as a turning point is determined based on each student's attention weight in each unit; a turning point is represented by a decrease in attention weight from the previous unit to the current unit; All units are sorted from largest to smallest in terms of the number of times their turning points are identified, and the unit with the largest value is determined as the early warning unit.
3. The online learning early warning method according to claim 1, characterized in that: Calculate each student's attention weight in each unit, including: Calculate the attention score of each student’s behavior vector in each unit based on the input of the self-attention mechanism layer; For each student in each unit, the Softmax function is used to convert the attention score of each student's behavior vector in each unit into an attention weight to obtain the attention weight of each student in each unit.
4. The online learning early warning method according to claim 3, characterized in that: The calculation formula for the student's attention weight in each unit is as follows: e i,j =tanh(Wh i,j +b); Among them, a i,j represents the attention weight of the i-th student in the j-th unit; e i,j is the attention score of the behavior vector of the i-th student in the j-th unit; e i,k represents the attention score of the behavior vector of the i-th student in the k-th unit, T is the number of units; represents the behavior vector of the i-th student in the j-th unit; tanh represents the Tanh activation function; is a trainable weight matrix, is the bias vector; represents the set of real numbers; F is the number of rows in each cell.
5. The online learning early warning method according to claim 3, characterized in that: The calculation formula for the student's attention weight in each unit is as follows: Among them, attention_weights i,j is the attention weight of the i-th student in the j-th unit; softmax represents the softmax function; score i,j score is the attention score of the behavior vector of the i-th student in the j-th unit; score i,k is the attention score of the behavior vector of the i-th student in the k-th unit; n is the number of units; Q is the query vector, K is the key vector; d k is the dot product of the query vector and the key vector; the superscript T indicates transpose.
6. The online learning early warning method according to claim 1, characterized in that: The input layer is used to input learning log time series data; The encoder is used to: extract features from the learning log time series data through the LSTM layer to obtain student behavior time series features; perform attention calculation on the student behavior time series features through the self-attention mechanism layer to obtain an encoded attention vector; and convert the encoded attention vector through the fully connected layer to obtain an encoder output sequence; The decoder is configured to: extract features from the encoder output sequence through an LSTM layer to obtain decoding behavior temporal features; perform attention calculation on the decoding behavior temporal features through a self-attention mechanism layer to obtain a decoding attention vector; and reconstruct the decoded attention vector through a reconstruction layer to obtain a reconstructed sequence. The classification module is used to perform classification based on the decoded attention vector to obtain the student's academic risk prediction result; The output layer is used to output the student's academic risk prediction results.
7. The online learning early warning method according to claim 6, characterized in that: The reconstruction layer is a fully connected layer, and the classification module is a fully connected layer.
8. An online learning early warning device, characterized in that: The online learning early warning device comprises: A learning log time series data acquisition module is used to: acquire learning log time series data; the learning log time series data includes behavior vectors of several students; the learning log series data is divided into several units according to the learning time; The academic risk prediction module is configured to input the learning log time series data into a trained academic performance prediction model to obtain a student's academic risk prediction result; the academic performance prediction model is an autoencoder based on a self-attention mechanism, comprising an input layer, an encoder, a decoder, a classification module, and an output layer; the encoder and decoder comprise an LSTM layer and a self-attention mechanism layer; the self-attention mechanism layer is used to calculate the attention weight of each student in each unit; The warning unit determination module is used to: determine the warning unit according to the attention weight of each student in each unit; the warning unit is the key unit for students to learn.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the online learning early warning method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the online learning early warning method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Student multidisciplinary score association analysis method and system based on deep learning
CN120995421A