Education course session recommendation method and related device

By combining wavelet transform and attention mechanism, the global and local features of learner behavior sequences are dynamically fused. Combined with counterfactual reasoning and self-supervised loss, the problem of insufficient causal modeling and interpretability of existing methods is solved, and more accurate educational course conversation recommendation is achieved.

CN120894201AActive Publication Date: 2025-11-04湖南工商大学

Patent Information

Application Number
CN202511238688.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-11-04
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Existing educational course conversation recommendation methods are insufficient in terms of causal modeling and interpretability, making it difficult to simultaneously capture global trends and local mutations in learning interests, thus affecting the model's generalization ability.

Method used

Wavelet transform is used to separate the course session sequence into low-frequency and high-frequency components. An attention mechanism is used to dynamically fuse these components to generate an internal interest representation of the session. Dynamic preference embedding and counterfactual reasoning are combined to generate a candidate course probability distribution. Self-supervised loss is used to optimize the interest separation and recommendation results.

Benefits of technology

It enhances the interpretability and generalization ability of educational recommendation systems, enabling them to better capture multi-scale dynamic changes in learners' interests and provide causally interpretable recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894201A_ABST
    Figure CN120894201A_ABST
Patent Text Reader

Abstract

The invention provides an education course session recommendation method and a related device, and relates to the technical field of artificial intelligence and recommendation systems. Obtaining input information of a target learner; performing wavelet transform separation on the current course session sequence to generate session internal interest representation; obtaining a recent interaction course set, and generating dynamic preference embedding based on a historical learning behavior sequence; embedding dynamic fusion based on the session internal interest representation and the dynamic preference to generate an interest vector, and outputting candidate course probability distribution; a pseudo tag is generated based on a historical behavior sequence and a current session sequence, and interest separation is optimized through binary cross entropy loss in combination with a dynamic fusion weight; anti-fact recommendation distribution is generated and fused with recent course scores, and the technical effect of improving the interpretability and generalization ability of the education recommendation system is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence and recommendation systems, in particular to an education course session recommendation method and related device. BACKGROUND

[0002] With the rapid development of the Internet and intelligent education platforms, personalized recommendation systems have become a core technology for improving learning experience and education resource utilization efficiency in online education, smart campus and other scenarios. As an important branch of education recommendation systems, education course session recommendation mainly focuses on the behavior sequence of learners in a learning session to predict the next course resource that they may be interested in or suitable for. Unlike traditional long-term learner modeling methods, course session recommendation pays more attention to the interest changes and learning path adjustments of learners in a short period of time, and can better adapt to actual education scenarios such as freshmen, transfer students and changing interests.

[0003] Existing education course session recommendation methods mainly rely on sequence modeling techniques such as recurrent neural networks (RNN), long short-term memory networks (LSTM), gated recurrent units (GRU), etc. These methods can model the course learning behavior sequence of learners and capture the temporal dynamics of learning interest. In recent years, attention mechanisms have been introduced into the field of education recommendation, dynamically allocating the influence weight of different historical learning behaviors on current decisions, and improving the model's ability to perceive key learning behaviors. In addition, graph neural networks (GNN) and other structures have also been used to mine knowledge associations and prerequisite relationships between courses, further improving the recommendation effect. However, these methods still have obvious shortcomings in improving the explainability and generalization ability of education recommendation systems. On the one hand, most existing models only focus on the learning behavior sequence itself, lacking in-depth modeling of the causal relationships behind the learner's behavior, making it difficult for the recommended results to provide clear explanations for learners and teachers. On the other hand, traditional sequence modeling and attention mechanisms have limitations in capturing multi-scale changes in learning interest, often failing to balance global learning trends and local interest mutations at the same time, affecting the generalization ability of the model in different education scenarios.

[0004] Therefore, how to realize multi-scale and causal modeling of learning interest dynamics and improve the explainability and generalization ability of education recommendation systems has become a key problem that needs to be broken through in the field of education course session recommendation. SUMMARY

[0005] In order to realize multi-scale and causal modeling of learning interest dynamics and improve the explainability and generalization ability of education recommendation systems, the present application provides an education course session recommendation method and related device.

[0006] In a first aspect, the present application provides an education course session recommendation method using the following technical solution:

[0007] An education course session recommendation method, comprising:

[0008] Obtaining input information of a target learner, including a current course session sequence, a historical learning behavior sequence, and a candidate course set;

[0009] Performing wavelet transform on the current course session sequence to separate it into low-frequency components and high-frequency components, concatenating the two components and generating an intra-session interest representation through dynamic fusion by an attention mechanism;

[0010] Obtaining a recent interaction course set, extracting a learner static preference embedding based on the historical learning behavior sequence, and generating a dynamic preference embedding through an attention mechanism;

[0011] Dynamically fusing the intra-session interest representation and the dynamic preference embedding to generate an interest vector, and outputting a candidate course probability distribution corresponding to the candidate course set;

[0012] Generating pseudo-labels based on the historical behavior sequence and the current session sequence, combining the dynamic fusion weight, and optimizing the interest separation through binary cross-entropy loss;

[0013] Based on the recent interaction course set and according to the Jaccard similarity, filtering a similar session set to replace its ISC with the target session ISC in the intra-session interest, generating an counterfactual recommendation distribution and fusing it with the recent course score;

[0014] Jointly using multi-classification cross-entropy loss and self-supervised causal loss, and training the model through a loss function.

[0015] Optionally, the step of performing wavelet transform on the current course session sequence to separate it into low-frequency components and high-frequency components, concatenating the two components and generating an intra-session interest representation through dynamic fusion by an attention mechanism, comprises:

[0016] Decomposing the current course session sequence into a global trend component and a local mutation component through discrete wavelet transform;

[0017] Using an adaptive padding strategy to process sequences of arbitrary length;

[0018] Using an attention mechanism to dynamically weight and fuse the two types of components;

[0019] Restoring the fused features to the original sequence length through interpolation operation and generating an intra-session interest representation.

[0020] Optionally, the generation of the dynamic preference embedding comprises:

[0021] Extracting a fixed number of recent interaction courses from the historical behavior sequence;

[0022] The learner embedding vector is taken as the attention query reference;

[0023] The attention weight of each course embedding vector is calculated and weighted summed;

[0024] A dynamic preference representation reflecting the change in recent interest is output.

[0025] Optionally, the step of dynamically fusing the intra-session interest representation and the dynamic preference embedding to generate an interest vector, and outputting a candidate course probability distribution corresponding to the candidate course set, comprises:

[0026] The intra-session interest representation and the dynamic preference embedding representation are spliced with features in the candidate course set;

[0027] A fusion weight between 0 and 1 is generated through a learnable parameter and an activation function;

[0028] The final feature vector is formed by linearly combining the two types of interest representations by weight;

[0029] The feature vector is matched with all candidate course features to generate a probability distribution.

[0030] Optionally, the generation of the counterfactual recommendation distribution comprises:

[0031] The session similarity is calculated based on the overlap degree of recent interaction courses;

[0032] Selecting several sessions with the highest similarity as intervention objects;

[0033] Injecting the short-term interest representation of the target session into similar sessions;

[0034] Aggregating the recommendation results of multiple intervention sessions to form a counterfactual distribution;

[0035] Applying a recommendation score bonus to the recent contact courses.

[0036] Optionally, the step of applying a recommendation score bonus to the recent contact courses comprises:

[0037] Identifying courses appearing in the recent interaction sequence and / or the current session as a target course set;

[0038] Increasing the priority of adding a fixed value in the target course set;

[0039] Renormalizing the probability distribution to keep the sum as 1.

[0040] Optionally, the step of optimizing interest separation comprises:

[0041] If a course exists in the learner's historical behavior sequence, it is marked as a long-term interest driver;

[0042] If the course exists in the current session sequence, marked as short-term interest-driven;

[0043] The fusion weight is matched to the marked category by a binary cross-entropy loss constraint;

[0044] The loss function optimizes the interest separation ability and the recommendation accuracy at the same time.

[0045] In a second aspect, the present application provides an educational course session recommendation device, comprising:

[0046] An information acquisition module is configured to acquire input information of a target learner, including a current course session sequence, a historical learning behavior sequence, and a candidate course set;

[0047] An internal interest representation module is configured to separate the current course session sequence into a low-frequency component and a high-frequency component through wavelet transform, and generate a session internal interest representation by dynamically fusing the two through an attention mechanism after splicing;

[0048] A dynamic preference embedding module is configured to acquire a recent interaction course set, extract a learner static preference embedding based on the historical learning behavior sequence, and generate a dynamic preference embedding through an attention mechanism;

[0049] A probability distribution module is configured to generate an interest vector by dynamically fusing the session internal interest representation and the dynamic preference embedding, and output a candidate course probability distribution corresponding to the candidate course set;

[0050] An interest separation module is configured to generate pseudo labels based on the historical behavior sequence and the current session sequence, and optimize interest separation through a binary cross-entropy loss combined with the dynamic fusion weight;

[0051] A fusion module is configured to filter a similar session set according to a Jaccard similarity based on the recent interaction course set, replace the ISC of the similar session set with the ISC of a target session in the session internal interest, generate a counterfactual recommendation distribution, and fuse the counterfactual recommendation distribution with a recent course score;

[0052] A training module is configured to jointly use a multi-classification cross-entropy loss and a self-supervised causal loss to train the model through a loss function.

[0053] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the processor executes a computer instruction stored in the memory to perform the method described above.

[0054] In a fourth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on a computer, cause the computer to perform the method described above.

[0055] Based on the above description, the application obtains input information of a target learner, performs wavelet transform separation on a current course conversation sequence to generate an internal interest representation of the conversation, obtains a recent interaction course set, generates a dynamic preference embedding based on a historical learning behavior sequence, dynamically fuses the internal interest representation of the conversation and the dynamic preference embedding to generate an interest vector, outputs a candidate course probability distribution, generates pseudo labels based on the historical behavior sequence and the current conversation sequence, combines a dynamic fusion weight to optimize the interest separation through a binary cross entropy loss, generates a counterfactual recommendation distribution and fuses it with a recent course score, and achieves the technical effects of improving the explainability and generalization ability of an education recommendation system. BRIEF DESCRIPTION OF DRAWINGS

[0056] Figure 1 is a computer device structure schematic diagram of a hardware running environment related to an embodiment scheme of the application.

[0057] Figure 2 is a flow schematic diagram of a first embodiment of an education course conversation recommendation method of the application.

[0058] Figure 3 is a structural block diagram of a first embodiment of an education course conversation recommendation device of the application. DETAILED DESCRIPTION

[0059] In order to make the purposes, technical solutions and advantages of the application clearer, the application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application.

[0060] Reference Figure 1 , Figure 1 is a computer device structure schematic diagram of a hardware running environment related to an embodiment scheme of the application.

[0061] As Figure 1As shown, the computer device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM), and can also be a stable non-volatile memory (NVM), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0062] Those skilled in the art can understand that Figure 1 The structure shown in the figure does not constitute a limitation on the computer device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.

[0063] As Figure 1 As shown, the memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and an education course session recommendation program.

[0064] In Figure 1 In the computer device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the present application can be arranged in the computer device, and the computer device calls the education course session recommendation program stored in the memory 1005 through the processor 1001, and executes the education course session recommendation method provided in the present application.

[0065] The present application provides an education course session recommendation method, which refers to Figure 2 , Figure 2 The flowchart of the first embodiment of the education course session recommendation method of the present application.

[0066] In this embodiment, the education course session recommendation method includes the following steps:

[0067] Step S10: Obtain the input information of the target learner, including the current course session sequence, the historical learning behavior sequence, and the candidate course set.

[0068] It can be understood that step S10 is performed as follows:

[0069] The target learner, the current course session item sequence s, the learner historical learning behavior sequence h, and the candidate course set V are collected as multi-source input information; the input learner, course session sequence, historical learning behavior, and candidate course are uniformly encoded and indexed mapped, facilitating subsequent feature extraction and model processing; the course session sequence and the historical learning behavior sequence are length normalized or padded to ensure consistent input data format and adapt to the batch processing needs of the neural network model.

[0070] It should be noted that the prior art in the field of educational course session recommendation mainly has the following deficiencies:

[0071] Insufficient causal modeling and explainability: Most methods only focus on learning behavior sequences, lack in-depth modeling of causal relationships behind behaviors, and the recommendation results are difficult to explain.

[0072] Limited multi-scale interest dynamic modeling: Traditional sequence models and attention mechanisms are difficult to capture both global trends and local mutations in learning interest, and the generalization ability is limited.

[0073] Insufficient combination of counterfactual reasoning and multi-scale modeling: Existing counterfactual recommendation methods mainly focus on causal relationships, ignoring the multi-scale changes in interest dynamics, and are difficult to balance explainability and generalization ability.

[0074] Insufficient fusion of wavelet mechanism and causal modeling: Although wavelet decomposition can improve multi-scale feature modeling, it has not been deeply integrated with methods such as causal reasoning in the field of educational recommendation, and systematic research is insufficient.

[0075] Step S20: performing wavelet transform on the current course session sequence to separate it into low-frequency components and high-frequency components, concatenating the two and dynamically fusing them through an attention mechanism to generate an internal interest representation.

[0076] It should be noted that wavelet transform is a classic signal processing method that can decompose sequence signals into components of different frequencies (scales) to capture global trends and local changes. In recent years, some research has attempted to combine wavelet decomposition with deep learning models for time series data modeling. For example, in the fields of time series prediction and speech recognition, wavelet decomposition has been used to improve the model's ability to model multi-scale features. In related fields such as recommendation systems, some research has explored the combination of wavelet decomposition and attention mechanisms to enhance the model's ability to express multi-scale features of sequence data.

[0077] In specific implementation, step S20 further includes: embedding the course session sequence E(c) into a tensor X∈RB×L×d where B is the batch size, L is the length of the session sequence, d is the embedding dimension, and DWT is the one-dimensional discrete wavelet transform, to obtain the low-frequency component cA (reflecting the global interest trend) and the high-frequency component cD (reflecting the local interest change):

[0078] cA,cD=DWT(X)

[0079] where DWT(X) denotes the one-dimensional discrete wavelet transform of the tensor X.

[0080] First, the low-frequency and high-frequency features are spliced, and then input into the attention network to calculate the weight a of the multi-scale feature:

[0081] a=sigmoid(W T [cA||cD]+b)

[0082] where “||” denotes the concatenation operation, W denotes the learnable weight matrix, and b denotes the learnable bias term.

[0083] Fusion of multi-scale features to obtain the final session context table h M (s):

[0084] h M (s)=a·cA+(1-a)·cD

[0085] If the length of the course session sequence is less than 2 power, it is padded with zeros to ensure the effectiveness of the wavelet decomposition.

[0086] It should be noted that the step of wavelet transforming the current course session sequence into low-frequency and high-frequency components, splicing the two components, and dynamically fusing them through the attention mechanism to generate the internal interest representation of the session includes: decomposing the current course session sequence into a global trend component and a local mutation component through discrete wavelet transform; using an adaptive padding strategy to process sequences of any length; dynamically weighting and fusing the two components using an attention mechanism; and restoring the fused features to the original sequence length through interpolation operation and generating the internal interest representation of the session.

[0087] Step S30: Obtain a recent interaction course set, extract a learner static preference embedding based on the historical learning behavior sequence, and generate a dynamic preference embedding through an attention mechanism.

[0088] It should be noted that the generation of the dynamic preference embedding includes: extracting a fixed number of recent interaction courses from the historical behavior sequence; using the learner embedding vector as the attention query reference; calculating the attention weight of each course embedding vector and performing weighted summation; and outputting a dynamic preference representation reflecting the recent interest change.

[0089] In this embodiment, let the set of all learners in the dataset be U = {u1,...u |U|}, where |U| represents the total number of users, and u e U represents any one learner. Let the set of all courses available for recommendation be V = {v1,...v |V|}, where |V| represents the total number of courses, and v e V represents any one course. The interaction behavior of a learner u with a course in a short period of time forms a session sequence, denoted as s = {v 1s ,...v ts}, where the subscript of each course v represents its order of appearance in the session s.

[0090] In a specific implementation, the static preference refers to the long-term unchanged interest of a learner, which is directly represented by the embedding vector of the learner:

[0091]

[0092] where e u is the static preference embedding of the learner u.

[0093] The dynamic preference reflects the recent interest changes of the learner.

[0094] The specific implementation includes the following steps:

[0095] For the session s of the learner u, collect the set of courses R(s) = {v1 R ,...,v ∣R∣ R} that the learner has recently interacted with before this session, where the superscript R indicates that the course belongs to the set R(s), and |R(s)| is a fixed hyperparameter representing the number of courses that the learner u has recently interacted with before the session s.

[0096] Take the learner embedding e u as the query vector, take the matrix containing the embeddings of all courses in R(s) as the key matrix and the value matrix, and calculate the dynamic preference embedding h N (s) through the attention mechanism:

[0097] h N (s) = attention(e u , E(R(s)), E(R(s)))

[0098] where attention(q', K', V') is an attention network, given the query vector

[0099] the matrix of κ key vectors and the matrix of κ value vectors i is an index variable, representing the embedding of the i-th course in R(s) in the most recent interaction course, i e {1, 2,..., K}, K = |R(s)|, representing the number of the most recent interaction courses. Define as:

[0100]

[0101] where a(q', K i ') is a vector containing the attention scores between q' and each vector in K', calculated by:

[0102]

[0103] and q' T denotes the transpose of the query vector q';

[0104] The above obtained h N (s) is taken as the dynamic OSC(s) embedding of the session.

[0105] Step S40: dynamically fusing based on the intra-session interest representation and the dynamic preference embedding to generate an interest vector, and outputting a candidate course probability distribution corresponding to the candidate course set.

[0106] It should be noted that the embodiment designs a learnable dynamic fusion weight λ, which splices the intra-session interest (ISC), the out-of-session interest (OSC) and the candidate course feature to input a linear model, and generates a fusion weight through a Sigmoid activation function. The model can automatically determine whether the current recommendation is dominated by long-term or short-term interest, and realize the causal and interpretable next course prediction.

[0107] In specific implementation, the step of dynamically fusing based on the intra-session interest representation and the dynamic preference embedding to generate an interest vector, and outputting a candidate course probability distribution corresponding to the candidate course set, includes:

[0108] Splicing the intra-session interest representation and the dynamic preference embedding representation and the features in the candidate course set;

[0109] Generating a fusion weight between 0 and 1 through a learnable parameter and an activation function;

[0110] Linearly combining the two types of interest representations by weight to form a final feature vector;

[0111] Matching the feature vector with all candidate course features to generate a probability distribution.

[0112] In specific implementation, the reason weight fusion:

[0113] The weights of OSCs and ISCs are calculated by a sigmoid activation function to dynamically adjust the influence of both on recommendations:

[0114] λ = sigmoid(W T (h M (s)||h N (s)||e v )+b)

[0115] where e v is the embedding of the course to be predicted, and λ∈[0, 1], the greater the weight λ, the stronger the influence of the external factors of the conversation.

[0116] The internal reasons of the conversation h M (s) and the external reasons of the conversation h N (s) are dynamically fused to obtain the final interest representation:

[0117] h(s) = λh N (s) + (1-λ)h M (s)

[0118] The interest vector is fused with the candidate course embedding matrix to match, and Ω is the set of courses to be predicted, and the recommendation probability distribution of the next course of s is predicted:

[0119] p(v|M = ISC(s), N = OSC(s)) = softmax(e(Ω)h(s) T )

[0120] Step S50: Based on the historical behavior sequence and the current conversation sequence, pseudo labels are generated, and the interest separation is optimized by binary cross entropy loss combined with the dynamic fusion weight.

[0121] In specific implementation, the self-supervised pseudo label and loss function: based on the learner's historical learning behavior and conversation context, the pseudo label is automatically generated, and whether the course belongs to OSC or ISC is marked. Self-supervised binary cross entropy loss is used to guide the model to distinguish and model long-term and short-term interest sources, and to improve the interest separation and expression ability.

[0122] It should be noted that the step of optimizing interest separation includes: if the course exists in the learner's historical behavior sequence, it is marked as long-term interest driven; if the course exists in the current conversation sequence, it is marked as short-term interest driven; the fusion weight is matched to mark the category by binary cross entropy loss constraint; the loss function optimizes the interest separation ability and the recommendation accuracy at the same time.

[0123] In a specific implementation, based on the learner's historical learning behavior and the current course session context, each candidate course is traversed to determine whether it appears in the historical behavior sequence or the current session sequence, and a 0 / 1 pseudo label is generated:

[0124]

[0125] wherein V u represents the historical interaction course set of the learner u to which the session s belongs. yN represents the pseudo label of the out-of-session interest (OSC), and yM represents the pseudo label of the in-session interest (ISC). 1[condition] is defined as:

[0126]

[0127] A self-supervised loss function is used to encourage the model to output high scores on courses dominated by long-term interests and to output high scores on courses dominated by short-term interests, thereby achieving interest separation. The self-supervised loss is:

[0128]

[0129] wherein v + is the true next course of s, S b is a set of all sessions contained in the bth training batch, |S b | represents the number of sessions in the batch, given the predicted score x and the corresponding label y, the binary cross-entropy loss BCE(x, y) is defined as:

[0130] BCE(x, y) = y·log x + (1-y)·log(1-x)

[0131] Step S60; based on the recent interaction course set and according to the Jaccard similarity, a similar session set is filtered to replace its ISC with the ISC of the target session in the in-session interest, a counterfactual recommendation distribution is generated and fused with the recent course score.

[0132] In a specific implementation, the generation of the counterfactual recommendation distribution includes: calculating the similarity of sessions based on the recent interaction course overlap; selecting a number of sessions with the highest similarity as intervention objects; injecting the short-term interest representation of the target session into similar sessions; aggregating the recommendation results of multiple intervention sessions to form a counterfactual distribution; and adding a recommendation score bonus to the recent contact courses.

[0133] In a specific implementation, the step of adding a recommendation score bonus to the recent contact courses includes: identifying courses that appear in the recent interaction sequence and / or the current session as a target course set; adding a fixed value of priority to the target course set; and renormalizing the probability distribution to maintain a sum of 1.

[0134] In a specific implementation, counterfactual recommendation and enhancement: in the reasoning phase, first sample a set of learner sessions similar in interest for the target learner session, replace the context part of these similar sessions with the context of the target session to construct counterfactual scenarios. Input these counterfactual sessions into the model to obtain multiple sets of counterfactual recommendation distributions. Then, fuse and enhance these distributions with the scores of the target session recent interaction courses, so that the influence of short-term interest on the final recommendation result is more prominent, thereby improving the response ability of the model to the current interest change of the learner and the personalization and diversity of the recommendation.

[0135] It should be noted that for the target session s of the target learner u, first calculate a number of sessions s' ≠ s most similar to s according to the recent interaction set R(s). The similarity uses Jaccard similarity:

[0136]

[0137] Select a number of sessions with the highest similarity to form a set π(s).

[0138] For each similar session s i ∈π(s), replace its ISC(s (i.e. ISC(s i )) with the ISC(s (i.e. ISC(s)) of the target session, simulate “what would similar learner u' choose as the next course if he was in the context of the target session s (i.e. had the same ISC(s))”, and use the basic recommendation model (BRM) to calculate the next course distribution under the counterfactual:

[0139] p(v|M=ISC(s),N=OSC(s'))

[0140] Where M=ISC(s) represents the in-session interest of the current session s, and N=OSC(s') represents the out-of-session interest of a historical session s'.

[0141] Sum all the counterfactual distributions of similar sessions weighted by similarity to get the collaborative counterfactual recommendation distribution:

[0142]

[0143] Where C is a normalization factor (to ensure the probability sum is 1).

[0144] To strengthen the influence of recent interaction courses, add a boost factor ∈ ( ∈ > 0) to the courses v that appear in R(s) or the current context c. The final recommendation probability is:

[0145]

[0146] where 1 [condition] is a vector of 1 if v belongs to R(s) or c and 0 otherwise, and C' is a normalization factor.

[0147] Step S70: Joint multi-classification cross-entropy loss and self-supervised causal loss to train the model through the loss function.

[0148] In a specific implementation, step S70 includes:

[0149] The next course prediction task is regarded as a multi-classification problem, and a multi-classification cross-entropy loss is used for optimization. The specific definition is as follows:

[0150]

[0151] where p(v) is the abbreviation of p(v | M = ISC(s), N = OSC(s)), S b represents a set of sessions in the training batch, V b is a set of courses within the batch, v + is the true next course.

[0152] The multi-classification cross-entropy loss and the self-supervised causal loss are jointly used, and the weights of the two are balanced through the hyperparameter β:

[0153]

[0154] It should be noted that the purpose of the embodiment is to propose an education course session recommendation method based on counterfactual reasoning and wavelet attention mechanism, which can distinguish and integrate the internal and external interest factors (i.e. short-term interest and long-term interest) of course sessions in detail, and realize interpretable personalized recommendation through dynamic weights and causal reasoning mechanism, to solve the deficiencies of existing education course session recommendation systems in multi-scale interest modeling and causal explanation, and improve the accuracy, causal explanation, robustness and credibility of the recommendation.

[0155] The core working principle of the embodiment is:

[0156] 1. The wavelet attention mechanism decomposes the learner behavior sequence into low-frequency and high-frequency features through wavelet transform, capturing global learning trends and local interest mutations respectively. Through the attention mechanism, these multi-scale features are adaptively fused to accurately depict the dynamics of the learner's short-term interest.

[0157] 2. The counterfactual reasoning framework uses the multi-scale interest representation extracted by the wavelet attention mechanism to simulate the scenario of "if the situation changes, how will the learner make decisions". By distinguishing and modeling long-term interest (OSC) and short-term interest (ISC), a fine-grained causal explanation of the learner's behavior is achieved.

[0158] 3. Dynamic fusion weight λ calculates the weight of OSC and ISC through a sigmoid function, automatically determines whether the current recommendation is dominated by long-term or short-term interest, and realizes the causal and interpretable next course prediction.

[0159] 4. Self-supervised pseudo-label and loss function automatically generates 0 / 1 pseudo-labels to guide the model to distinguish between long-term and short-term interest sources, improve interest separation and expression ability.

[0160] 5. Counterfactual recommendation and enhancement by constructing counterfactual scenarios, integrating multiple counterfactual recommendation distributions, and strengthening the influence of recent interaction courses, to improve the model's response to the learner's current interest changes and the personalization and diversity of recommendations.

[0161] Therefore, the core innovation lies in:

[0162] Innovative design and efficient implementation of wavelet attention mechanism:

[0163] This embodiment designs an innovative wavelet attention network (Wavelet Attention Network) for the educational course conversation recommendation scenario. The mechanism first uses wavelet transform to perform multi-scale decomposition on the learner behavior sequence, decomposing the sequence signal into low-frequency (global trend) and high-frequency (local change) features, and supporting efficient processing of sequences of arbitrary length through an adaptive padding strategy. Subsequently, the features of different scales are concatenated in the feature dimension, and the attention weights are adaptively generated through linear transformation and Sigmoid activation, realizing dynamic weighted fusion of global and local interest dynamics. Finally, an interpolation restoration module is used to restore the fused multi-scale features to the original sequence length, ensuring seamless connection with the subsequent deep network structure, realizing efficient end-to-end training and inference. This mechanism not only improves the model's ability to characterize the learner's interest dynamics and robustness to abnormal behavior, but also provides more detailed and detailed context information for subsequent causal reasoning.

[0164] Organic combination of counterfactual reasoning and multi-scale interest modeling:

[0165] This embodiment first combines wavelet decomposition with the attention mechanism and introduces it into the counterfactual reasoning recommendation framework. The invention uses the above multi-scale interest representation as the input of counterfactual reasoning, enabling the model to make inferences based on more comprehensive interest dynamic information when simulating "if the situation changes, how will the learner make decisions". By explicitly distinguishing and modeling the internal and external interest factors (i.e., long-term interest OSC and short-term interest ISC) of the course conversation in the counterfactual reasoning process, the model can effectively identify the causal impact of different interest sources on the recommendation results, achieving fine-grained causal explanation of the learner's behavior. By deeply integrating the wavelet attention mechanism with the counterfactual reasoning framework, the causal interpretability and generalization ability of the recommendation system are significantly improved.

[0166] In summary, the embodiment realizes efficient modeling and causal explanation of the multi-scale dynamics of learners' interests by deeply integrating wavelet decomposition, attention mechanism and counterfactual reasoning, significantly improves the accuracy, robustness and credibility of the educational course conversation recommendation system, and has important theoretical value and broad application prospects.

[0167] The embodiment obtains input information of a target learner; performs wavelet transform separation on a current course conversation sequence to generate an internal interest representation of the conversation; obtains a recent interactive course set, generates a dynamic preference embedding based on a historical learning behavior sequence; dynamically fuses the internal interest representation of the conversation and the dynamic preference embedding to generate an interest vector, and outputs a candidate course probability distribution; generates pseudo labels based on the historical behavior sequence and the current conversation sequence, and optimizes the interest separation through binary cross entropy loss combined with a dynamic fusion weight; generates a counterfactual recommendation distribution and fuses it with a recent course score, thereby achieving the technical effects of improving the explainability and generalization ability of the educational recommendation system.

[0168] In addition, the embodiment of the present application also provides a computer readable storage medium, and the storage medium stores an educational course conversation recommendation program. When the educational course conversation recommendation program is executed by a processor, the steps of the method for recommending an educational course conversation as described above are implemented.

[0169] Reference Figure 3 , Figure 3 is a structural block diagram of the first embodiment of the educational course conversation recommendation device of the present application.

[0170] As Figure 3 shown, the educational course conversation recommendation device proposed by the embodiment of the present application comprises:

[0171] An information acquisition module 10 is configured to acquire input information of a target learner, including a current course conversation sequence, a historical learning behavior sequence and a candidate course set;

[0172] An internal interest representation module 20 is configured to perform wavelet transform separation on the current course conversation sequence into low-frequency components and high-frequency components, and dynamically fuse the two components through an attention mechanism to generate an internal interest representation of the conversation;

[0173] A dynamic preference embedding module 30 is configured to obtain a recent interactive course set, extract a learner static preference embedding based on the historical learning behavior sequence, and generate a dynamic preference embedding through an attention mechanism;

[0174] A probability distribution module 40 is configured to dynamically fuse the internal interest representation of the conversation and the dynamic preference embedding to generate an interest vector, and output a candidate course probability distribution corresponding to the candidate course set;

[0175] The interest separation module 50 is configured to generate pseudo labels based on the historical behavior sequence and the current session sequence, and optimize the interest separation by binary cross entropy loss combined with the dynamic fusion weight;

[0176] The fusion module 60 is configured to filter similar session sets according to Jaccard similarity based on the recent interaction course set and replace the ISC of the similar session set with the ISC of the target session in the intra-session interest, generate counterfactual recommendation distribution and fuse with the recent course score.

[0177] The training module 70 is configured to train the model by a loss function combined with multi-classification cross entropy loss and self-supervised causal loss.

[0178] It should be understood that the above is only illustrative, and does not constitute any limitation on the technical solutions of the present application. In specific applications, those skilled in the art can set up according to the needs, and the present application does not limit this.

[0179] The embodiment obtains input information of a target learner; performs wavelet transform separation on a current course session sequence to generate an intra-session interest representation; obtains a recent interaction course set, generates a dynamic preference embedding based on a historical learning behavior sequence; dynamically fuses the intra-session interest representation and the dynamic preference embedding to generate an interest vector, and outputs a candidate course probability distribution; generates pseudo labels based on the historical behavior sequence and the current session sequence, and optimizes the interest separation by binary cross entropy loss combined with the dynamic fusion weight; generates counterfactual recommendation distribution and fuses with the recent course score, thereby achieving the technical effect of improving the explainability and generalization ability of the education recommendation system.

[0180] It should be noted that the above-described workflow is only illustrative and does not constitute a limitation on the scope of protection of the present application. In actual applications, those skilled in the art can select part or all of them to achieve the purpose of the embodiment according to actual needs, and this place does not limit it.

[0181] In addition, technical details not described in detail in the embodiment can be referred to the method for recommending education course sessions provided by any embodiment of the present application, which will not be described here.

[0182] In addition, it should be noted that in this paper, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or system. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or system including the element.

[0183] The above embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. Through the above description of the embodiments, those skilled in the art can clearly understand that the above embodiment methods can be realized by means of software and a necessary general hardware platform, and of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ReadOnly Memory, ROM) / RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present application. The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for recommending educational course conversations, characterized in that, include: Obtain input information from the target learner, including the current course session sequence, historical learning behavior sequence, and candidate course set; The current course session sequence is separated into low-frequency and high-frequency components by wavelet transform, and the two components are concatenated and dynamically fused through an attention mechanism to generate an internal interest representation of the session. Obtain a set of recently interacted courses, extract learner static preference embeddings based on the historical learning behavior sequence, and generate dynamic preference embeddings through an attention mechanism; Based on the in-session interest representation and the dynamic preference embedding dynamic fusion, an interest vector is generated, and the probability distribution of candidate courses corresponding to the candidate course set is output. Pseudo-labels are generated based on historical behavior sequences and current session sequences, and interest separation is optimized by combining the dynamic fusion weights with binary cross-entropy loss. Based on the recent interactive course set and filtering similar session sets according to Jaccard similarity to replace its ISC as the target session ISC in the session's internal interest, a counterfactual recommendation distribution is generated and fused with the recent course scores. The model is trained by combining multi-class cross-entropy loss and self-supervised causality loss through the loss function.

2. The method according to claim 1, characterized in that, The step of performing wavelet transform on the current course conversation sequence to separate it into low-frequency and high-frequency components, concatenating the two components, and then dynamically fusing them through an attention mechanism to generate an internal interest representation of the conversation includes: The current course session sequence is decomposed into global trend components and local mutation components using discrete wavelet transform; An adaptive padding strategy is used to process sequences of arbitrary length. The two types of components are dynamically weighted and fused using an attention mechanism; Interpolation is used to restore the fused features to the original sequence length and generate an intra-session interest representation.

3. The method according to claim 1, characterized in that, The generation of the dynamic preference embedding includes: Extract a fixed number of recent interactive lessons from historical behavior sequences; Learner embedding vectors are used as the basis for attention queries; Calculate the attention weights of the embedding vectors for each course and sum them using a weighted average. The output is a dynamic preference representation that reflects recent changes in interests.

4. The method according to claim 1, characterized in that, The step of dynamically fusing the in-session interest representation and the dynamic preference embedding to generate an interest vector and outputting the candidate course probability distribution corresponding to the candidate course set includes: The in-session interest representation, the dynamic preference embedding representation, and the features in the candidate course set are concatenated; The fusion weights between 0 and 1 are generated using learnable parameters and activation functions; The final feature vector is formed by linearly combining the two types of interest representations according to their weights. The feature vector is matched with the features of all candidate courses to generate a probability distribution.

5. The method according to claim 1, characterized in that, The generation of the counterfactual recommendation distribution includes: Calculate session similarity based on the overlap of recent interactive courses; Select the conversations with the highest similarity as the intervention targets; Inject short-term interest representations of the target session into similar sessions; The recommendation results from multiple intervention sessions are aggregated to form a counterfactual distribution; Apply a recommendation score bonus to recently accessed courses.

6. The method according to claim 5, characterized in that, The step of applying a recommended score bonus to recently accessed courses includes: Identify courses that appear in recent interaction sequences and / or the current session as the target course set; Increase the priority of adding a fixed value to the target course set; The probability distribution is renormalized to keep the sum of 1.

7. The method according to claim 1, characterized in that, The steps for optimizing interest separation include: If a course exists within a learner's historical behavioral sequence, it is marked as long-term interest-driven. If a course exists in the current session sequence, mark it as short-term interest-driven; The weights are matched to the label categories by constraining the fusion of binary cross-entropy loss. The loss function optimizes both interest separation capability and recommendation accuracy.

8. An educational course conversation recommendation device, characterized in that, include: The information acquisition module is used to acquire the input information of the target learner, including the current course session sequence, the historical learning behavior sequence, and the candidate course set; The internal interest representation module is used to perform wavelet transform on the current course session sequence to separate it into low-frequency components and high-frequency components, and then dynamically fuse the two components through an attention mechanism to generate the session internal interest representation. The dynamic preference embedding module is used to obtain a set of recently interacted courses, extract learner static preference embeddings based on the historical learning behavior sequence, and generate dynamic preference embeddings through an attention mechanism. The probability distribution module is used to generate interest vectors by dynamically fusing the in-session interest representation and the dynamic preference embedding, and output the candidate course probability distribution corresponding to the candidate course set; The interest separation module is used to generate pseudo-labels based on historical behavior sequences and current session sequences, and optimize interest separation by combining the dynamic fusion weights with binary cross-entropy loss. The fusion module is used to generate a counterfactual recommendation distribution based on the recent interactive course set and to filter the similar session set according to Jaccard similarity to replace its ISC as the target session ISC in the session's internal interest, and to fuse it with the recent course scores. The training module is used to train the model by combining multi-class cross-entropy loss and self-supervised causal loss through the loss function.

9. A computer device, characterized in that, The device includes a memory and a processor, wherein the processor, when executing computer instructions stored in the memory, performs the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Hierarchical Attention deep learning model course recommendation method

    CN113435685A

  • Course recommendation method and system fusing user interest change

    CN117609615A

  • Multilevel session recommendation method driven by hypergraph convolution

    CN119646314A

  • Course session recommendation method and device, equipment, storage medium and program product

    CN120013648A

  • Session recommendation method based on graph neural network and long and short term memory

    CN120086325A

Cited By

  • Course recommendation method and device based on wavelet transform and attention mechanism, equipment and storage medium

    CN121524446A