Method for enhancing learning resource recommendation of data based on contrast learning and related device

By constructing a knowledge graph of course learning resources and a user representation model, and combining K-means clustering and contrastive learning loss function, the problem of data sparsity was solved, and better learning resource recommendation results were achieved.

CN117609607BActive Publication Date: 2026-06-26XI AN JIAOTONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XI AN JIAOTONG UNIV
Filing Date
2023-11-22
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing learning resource recommendation algorithms struggle to effectively model user preferences in situations with sparse data, resulting in poor recommendation performance.

Method used

We employ a contrastive learning-based data augmentation approach. By constructing a knowledge graph of course learning resources and a user representation model, combined with K-means clustering, we design a contrastive learning loss function and conduct multi-task training to optimize the learning resource recommendation model.

Benefits of technology

It improves the performance of learning resource recommendation in the case of sparse data, and can effectively model user preferences to recommend personalized learning resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117609607B_ABST
    Figure CN117609607B_ABST
Patent Text Reader

Abstract

The application provides a learning resource recommendation method based on contrast learning enhanced data. Compared with the existing learning resource recommendation method, the application can design a contrast learning task in addition to the sequence prediction task, use a self-supervised signal to alleviate the data sparsity problem, and improve the recommendation performance of the learning resource. The learning resource recommendation model based on contrast learning enhanced data considers the inherent knowledge structure of the learning resource, uses a course learning resource knowledge graph as auxiliary information to enhance the learning resource representation. Using related users and cluster centers to enhance user representation can learn high-quality user representation in the case of less user interaction, effectively modeling user preferences. Using a multi-task training strategy, the sequence prediction task and the contrast learning task can be jointly optimized, thereby improving the learning resource recommendation performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a learning resource recommendation method, specifically a learning resource recommendation method and related apparatus based on contrastive learning augmentation data. Background Technology

[0002] With the development of information technology and educational informatization, selecting appropriate learning resources from the internet to achieve predetermined learning goals has always been a challenging task for learners. Without effective guidance, an excessive amount of learning resources can lead to cognitive overload, significantly impacting learning outcomes. Therefore, recommending personalized learning resources to learners is an effective way to address this problem.

[0003] Existing learning resource recommendation algorithms can be divided into two types: those based on traditional machine learning and those based on deep learning. Regarding traditional machine learning-based recommendation algorithms, Fu Fen et al., in their paper "Learning Resource Recommendation Based on Implicit Rating and Similarity Transmission," utilized learners' behavioral data to fill in the sparse rating matrix of learning resources, proposing a learning resource recommendation method based on implicit rating and similarity transmission strategies. Li Ning et al., in their paper "Research and Design of a Personalized Learning Resource Recommendation Platform," introduced social tags to calculate the similarity between resources, further filling the rating matrix with the similarity between resources to alleviate the data sparsity problem of collaborative filtering algorithms. In the field of deep learning-based recommendation algorithms, Zhou et al., in "Personalized learning full-path recommendation model based on LSTM neural networks," utilized LSTM to mine the feature attributes of learning resources and matched these features with learner preferences one by one, then recommended learning resources with high matching degrees to learners. Gong et al., in "Attentional graph convolutional networks for knowledge concept recommendation in moocs in a heterogeneous view," constructed a heterogeneous information network of learners, courses, learning videos, and knowledge points, using a meta-path-based graph representation method to obtain node representations, which were then input into a matrix factorization module to provide personalized knowledge point recommendations for learners. Zhang Xuxiang et al., in "A Review of the Application of Knowledge Graphs and Graph Embeddings in Personalized Education," constructed an online learning environment knowledge graph based on a general ontology model for online learning, then used a graph embedding algorithm to train the knowledge graph to optimize graph computation efficiency in learning resource recommendation. Clustering based on learners' learning style characteristics was used to optimize learners' resource interest, resulting in ranked learning resource recommendation results.

[0004] While existing learning resource recommendation algorithms have achieved good results, these methods rely solely on item prediction tasks to optimize parameters and obtain recommendation results, making them susceptible to data sparsity issues. When training data is limited, they may fail to effectively model user preferences. Summary of the Invention

[0005] To address the technical problem, this invention provides a method and related apparatus for recommending learning resources based on contrastive learning-enhanced data.

[0006] To achieve the above objectives, the present invention employs the following technical solution:

[0007] Firstly, this application proposes a learning resource recommendation method based on contrastive learning-enhanced data, including:

[0008] target users The learning logs are input into a learning resource recommendation model based on contrastive learning augmented data to obtain learning resource recommendation results;

[0009] The method for obtaining the learning resource recommendation model based on contrastive learning augmented data includes:

[0010] Constructing a knowledge graph of course learning resources ;

[0011] In knowledge graph Obtain the enhanced learning resource representation ;

[0012] Construct a user representation model and combine it with learned resource representations. , obtain the original user's statement The input to the user representation model is the enhanced learned resource representation. Learning logs with users The output is the original user representation. ;

[0013] According to the original user Calculate the relevant user-enhanced user representation And design a contrastive learning loss function for relevant user-enhanced user representations. ;

[0014] K-means algorithm is used for clustering to obtain the corresponding user cluster centers for each user cluster, and a contrastive learning loss function for enhancing user representations by cluster centers is designed. ;

[0015] Loss function for sequence prediction task, loss function and loss function The linear weighted sum is used as the total loss function to train the learning resource recommendation model based on contrastive learning augmented data, thus obtaining the learning resource recommendation model based on contrastive learning augmented data.

[0016] Furthermore, the construction of the course learning resource knowledge graph includes:

[0017] For the original knowledge point knowledge graph and a collection of learning resources Traverse the learning resource set For each learning resource ,Towards Add the learning resource node to each of them. And the edges connecting the learning resources with the knowledge points After the traversal is complete, delete. There are no knowledge point nodes connected to the learning resources in the graph, thus obtaining the knowledge graph of the learning resources. .

[0018] Furthermore, the user representation model includes multiple Transformer layers, which include an embedding layer, a multi-head self-attention module, a position feedforward network, and an Add&Norm layer;

[0019] The embedding layer is used to maintain a reinforcement learning resource embedding representation matrix. The matrix Used to analyze user learning logs The input embedding matrix is ​​formed through a lookup operation. ;

[0020] The multi-head self-attention module of the last Transformer layer is used to output the original user representation. .

[0021] Furthermore, the statement based on the original user representation Calculate the relevant user-enhanced user representation ,include:

[0022] Calculate target users and related users correlation score :

[0023]

[0024] in, j The total number of relevant users;

[0025] Based on correlation score Sort the relevant users by size and select the top-k relevant users. For target users Enhance;

[0026] Learning target users using self-attention mechanisms Enhanced representation :

[0027]

[0028] in, An attention vector is represented by the following formula:

[0029]

[0030] in, and All are learnable parameters. This is the scaling factor.

[0031] Furthermore, the contrastive learning loss function for the related user-enhanced user representation includes:

[0032]

[0033] in, and For the same target user Different enhancement representations, It is the negative set of enhanced sequences from relevant users.

[0034] Furthermore, the cluster centers enhance the contrastive learning loss function of the user representation. ,include:

[0035]

[0036] in, Indicates target user Cluster centers of the same group Indicates the first j Cluster centers of groups.

[0037] Furthermore, the loss function for the sequence prediction task includes:

[0038]

[0039] in, This represents the loss function for sequence prediction tasks. and Indicates the embedding of positive and negative items;

[0040] The total loss function includes:

[0041]

[0042] in, Represents the total loss function. express The weight, express The weight.

[0043] Secondly, this application proposes a learning resource recommendation system based on contrastive learning-enhanced data, comprising:

[0044] The recommendation module is used to recommend target users. The learning logs are input into a learning resource recommendation model based on contrastive learning augmented data to obtain learning resource recommendation results;

[0045] The model acquisition module is used to acquire the learning resource recommendation model based on contrastive learning augmentation data. The method for acquiring the learning resource recommendation model based on contrastive learning augmentation data includes:

[0046] Constructing a knowledge graph of course learning resources ;

[0047] In knowledge graph Obtain the enhanced learning resource representation ;

[0048] Construct a user representation model and combine it with learned resource representations. , obtain the original user's statement The input to the user representation model is the enhanced learned resource representation. Learning logs with users The output is the original user representation. ;

[0049] According to the original user Calculate the relevant user-enhanced user representation And design a contrastive learning loss function for relevant user-enhanced user representations. ;

[0050] K-means algorithm is used for clustering to obtain the corresponding user cluster centers for each user cluster, and a contrastive learning loss function for enhancing user representations by cluster centers is designed. ;

[0051] Loss function for sequence prediction task, loss function and loss function The linear weighted sum is used as the total loss function to train the learning resource recommendation model based on contrastive learning augmented data, thus obtaining the learning resource recommendation model based on contrastive learning augmented data.

[0052] Thirdly, this application proposes a storage medium storing an instruction set, wherein the instruction set, when executed by a processor, implements the aforementioned learning resource recommendation method based on contrastive learning augmented data.

[0053] Fourthly, this application proposes an electronic device comprising:

[0054] Memory, used to store at least one set of instructions;

[0055] The processor is configured to execute the instruction set stored in the memory, and to implement the learning resource recommendation method based on contrastive learning augmented data as described above by executing the instruction set.

[0056] Compared with the prior art, the present invention has the following beneficial effects:

[0057] This application proposes a learning resource recommendation method based on contrastive learning-enhanced data. Compared to existing learning resource recommendation methods, this application can design a contrastive learning task in addition to the sequence prediction task, and use self-supervised signals to alleviate the data sparsity problem, thereby improving the recommendation performance of learning resources. The learning resource recommendation model based on contrastive learning-enhanced data in this application takes into account the inherent knowledge structure of learning resources, using a course learning resource knowledge graph as auxiliary information to enhance the representation of learning resources. It enhances user representation using relevant users and cluster centers, enabling the learning of high-quality user representations with limited user interaction, effectively modeling user preferences. The multi-task training strategy enables joint optimization of the sequence prediction task and the contrastive learning task, thereby improving the recommendation performance of learning resources.

[0058] This application also proposes a learning resource recommendation system, storage medium, and electronic device based on contrastive learning augmented data, which possesses all the advantages of the aforementioned learning resource recommendation methods. Attached Figure Description

[0059] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a flowchart illustrating an embodiment of the learning resource recommendation method based on contrastive learning augmented data in this application;

[0061] Figure 2 This is a schematic diagram illustrating the method for obtaining the user representation model and various loss functions in an embodiment of the learning resource recommendation method based on contrastive learning augmented data in this application.

[0062] Figure 3 This is a schematic diagram of the learning resource recommendation system based on contrastive learning augmented data in this application. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0064] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0065] Learning resource recommendations primarily aim to help learners find suitable learning resources, including books, articles, online courses, tutorials, and communities. By recommending learning resources, learners can acquire knowledge and skills more effectively, improving learning efficiency and outcomes. Recommended learning resources also help learners stay informed about the latest learning resources and trends, as well as exchange and share experiences with other learners. It is one of the important tools to help learners learn and develop better.

[0066] Regarding learning resource recommendation, how to alleviate the data sparsity problem, effectively model user preferences, and recommend personalized learning resources to learners is an important challenge that needs to be addressed.

[0067] This application presents a learning resource recommendation method based on contrastive learning-enhanced data, recommending personalized learning resources to target users. It considers the enhancement of learning resource representations by knowledge graphs, as well as the enhancement of user representations by related users and cluster centers, alleviating the data sparsity problem and achieving better learning resource recommendation. The invention will be further described in detail below with reference to embodiments and accompanying drawings:

[0068] See Figure 1 This is a schematic diagram of the first process of a learning resource recommendation method based on contrastive learning augmented data disclosed in an embodiment of this application. As an embodiment of the learning resource recommendation method based on contrastive learning augmented data of this application, it may include the following steps:

[0069] S101, Obtain a learning resource recommendation model based on contrastive learning augmented data.

[0070] It should be noted that the learning resource recommendation model based on contrastive learning-enhanced data is an optimized sequence prediction task model. Sequence prediction task models can be used to recommend learning resources because they predict a user's future learning needs and interests based on their historical learning behavior and preferences, thereby recommending suitable learning resources.

[0071] S101-1, Constructing a Knowledge Graph of Course Learning Resources .

[0072] It should be noted that a course learning resource knowledge graph is a tool that graphically displays course learning resources. It can include multiple different graphs, such as nodes, edges, and attributes. Nodes represent learning resources, edges represent the relationships between resources, and attributes represent the characteristics and properties of resources.

[0073] S101-2, in knowledge graphs Obtain the enhanced learning resource representation .

[0074] S101-3, Construct a user representation model and combine it with learned resource representations. , obtain the original user's statement The input to the user representation model is the enhanced learned resource representation. Learning logs with users The output is the original user representation. .

[0075] It should be noted that user representation refers to the way user information is displayed and expressed, facilitating a quick and clear understanding of user information and related circumstances. User representation may include information such as the user's name, gender, age, occupation, educational background, interests, and learning-related information, such as learning goals, learning progress, and academic performance. The specific content included can be determined according to actual needs, and this application does not impose any restrictions.

[0076] S101-4, according to the original user's statement Calculate the relevant user-enhanced user representation And design a contrastive learning loss function for relevant user-enhanced user representations. .

[0077] S101-5 uses the K-means algorithm for clustering to obtain the corresponding user cluster centers for each user cluster, and designs a contrastive learning loss function to enhance user representations using cluster centers. .

[0078] In practical applications, the learning loss function and learning loss function The design order is not restricted.

[0079] S101-6, Loss function for sequence prediction task, loss function and loss function The linear weighted sum is used as the total loss function to train the learning resource recommendation model based on contrastive learning augmented data, thus obtaining the learning resource recommendation model based on contrastive learning augmented data.

[0080] S102, target user The learning logs are input into a learning resource recommendation model based on contrastive learning augmented data to obtain learning resource recommendation results.

[0081] This application proposes a learning resource recommendation method based on contrastive learning-enhanced data. The method uses a learning resource recommendation model based on contrastive learning-enhanced data to obtain recommendation results. During the training of the model, a course learning resource knowledge graph is constructed, which is then used to enhance the learning resource representation. A user representation model is then constructed to obtain the original user representation. The target user representation is then enhanced using relevant users, and a contrastive learning task is designed to improve the consistency of the enhanced representation. Simultaneously, K-means clustering is employed, and cluster centers are used to enhance the target user representation, again through a contrastive learning task. Finally, a multi-task strategy is used to jointly optimize the sequence prediction task and the two contrastive learning tasks, improving the performance of the learning resource recommendation and alleviating the data sparsity problem.

[0082] As another embodiment of the learning resource recommendation method based on contrastive learning augmentation data of this application, it may include the following steps:

[0083] S201, Constructing a course knowledge graph and user behavior model

[0084] Based on the existing knowledge graph of the course's knowledge points and the correspondence between course learning resources and knowledge points, a knowledge graph of course learning resources is constructed. Then, using the Transitional Distance Knowledge Representation Model (TransE), an enhanced representation of learning resources is obtained on the course learning resource knowledge graph. .

[0085] 1.1) Constructing a knowledge graph of course learning resources

[0086] For the original knowledge point knowledge graph and a collection of learning resources Traverse the learning resource set For learning resource collections Each learning resource , Towards knowledge graphs Add the learning resources to each of them. And the edges connecting the learning resources with the knowledge points After the traversal is complete, delete the knowledge graph. There are no knowledge point nodes connected to the learning resources in the text, thus a knowledge graph of course learning resources is obtained. .

[0087] 1.2) Using the Transition Distance Knowledge Representation Model (TransE), an enhanced representation of learning resources is obtained on the course learning resource knowledge graph.

[0088] Using the Transition Distance Knowledge Representation Model (TransE) in the Knowledge Graph of Course Learning Resources Training is performed on the above, where the set of learning resources included in the course is used as the entity set to construct a set of triples. For training, during the training process, negative sample triples are sampled by randomly replacing the head or tail entities of positive samples. The target loss function is... It is constructed to maximize the distance between the closest positive and negative examples, and the specific formula is as follows:

[0089]

[0090] in, It is a distance function. It is a positive sample triple. It is a negative sample triple. It is the interval distance hyperparameter. This represents a positive function, i.e. When >0, ; At 0 o'clock, .

[0091] S202, Constructing the User Representation Model

[0092] like Figure 2 As shown, a user representation model is constructed to obtain user representations. The enhanced learned resource representation is then used. and observed user learning logs As input, the raw user representation is obtained based on multiple Transformer layers. Each Transformer layer includes an embedding layer, a multi-head self-attention module, a position feedforward network (FNN), and an Add&Norm layer. The multi-head self-attention module, FNN, and Add&Norm layer belong to the Transformer Encoder.

[0093] Embedding layer: Maintains a reinforcement learning resource embedding representation matrix Given a user learning log ,application The lookup operation is used to form the input embedding matrix. .

[0094] Multi-head self-attention module: Following the embedding layer, a multi-head self-attention module is introduced to capture the dependencies between each pair of items in the sequence. Furthermore, to extract information from different subspaces at each location, multi-head self-attention is used instead of a single attention function. First, different linear projections are used to project the input representation onto... In each subspace, a self-attention mechanism is applied to each head, and the output representation is generated by concatenating the intermediate representations and projecting them again. The specific formula is as follows:

[0095]

[0096] in, It is the first Layer input, projection matrix , , , These are learnable parameters. These represent queries, keys and values, and factors, respectively. This is to avoid an excessively large internal volume.

[0097] Position Feedforward Networks: While multi-head self-attention is beneficial for extracting useful information from history, it is based on simple linear projection. Position Feedforward Networks (FFNs) are used to give the model non-linearity, defined as follows:

[0098]

[0099] in, These are learnable parameters.

[0100] Add & Norm layers: Add stands for residual connection, used to prevent network degradation, and Norm is used to normalize the activation values ​​of each layer. In practice, stacking more blocks is beneficial for learning more complex patterns. Based on several Transformer layers, the output of the self-attention module of the last layer is used as the final raw user representation. .

[0101] S203, Enhance user representation using relevant users

[0102] Based on the original user representation Use inner product to calculate target user Other related users correlation score The formula is as follows:

[0103]

[0104] Relevant users are sorted according to their relevance scores, and the top-k relevant users are selected. For target users Enhancement is performed. A self-attention mechanism is used to learn enhanced representations for the target user. The formula is as follows:

[0105]

[0106] in, It is an attention vector, calculated based on the relevance of each relevant augmented user to the target user, reflecting the importance of each relevant augmented user. The calculation formula is as follows:

[0107]

[0108] in, These are learnable parameters that give the model the ability to capture user relevance. Scale factor This is used to avoid excessively large inner products. In this way, enhanced user representations are obtained for the relevant users. To improve the consistency of augmented representations, a contrastive learning objective is proposed to minimize the difference between different augmented representations of the same user and maximize the difference between augmented representations of different users. The contrastive learning loss function for related user augmented representations is... The definition is as follows:

[0109]

[0110] in, These are different enhanced representations of the same target user. It is the negative set of enhanced sequences from other relevant users.

[0111] S204, Enhancing User Representation with Cluster Centers

[0112] Based on the original user representations, the K-means algorithm is used to learn the corresponding user centers for each user cluster. Similar to the correlation-based user augmentation user representation, a contrastive learning objective is proposed. Users in the same group and the cluster centers obtained by K-means are considered positive pairs, while users in different groups and other centers obtained by K-means are considered negative pairs. The contrastive learning loss function for cluster center augmentation user representation is... The calculation is as follows:

[0113]

[0114] in, User Cluster centers of the same group It is the cluster center of other groups.

[0115] S205, Jointly Optimize Training Model

[0116] The sequence prediction task and the contrastive learning task are jointly optimized. For the sequence recommendation task, the negative log-likelihood with softmax is used as the main loss, as shown in the following formula:

[0117]

[0118] in, and Let represent the embeddings of positive and negative items, respectively. To improve the performance of sequence recommendation, a joint training strategy is adopted, combining the loss from the main sequence prediction task and the losses from two additional contrastive learning tasks, using linear weighting to obtain the total loss. The calculation is as follows:

[0119]

[0120] in, They represent the contrastive learning loss functions, respectively. and contrastive learning loss function The weights are then determined. The model is optimized using the total loss, ultimately resulting in a learning resource recommendation model based on contrastive learning-enhanced data.

[0121] Figure 2 middle, express and The sum of .

[0122] target users The user input is fed into a learning resource recommendation model based on contrastive learning-enhanced data to obtain learning resource recommendations. In practical applications, a large amount of known data can be used to train the learning resource recommendation model based on contrastive learning-enhanced data.

[0123] The learning resource recommendation method of this application was validated by conducting experiments on online learning log data from C&C++ programming and university computer fundamentals courses on the Touge practical teaching platform. Table 1 shows the basic information of the dataset.

[0124] Table 1. Basic Information of the Dataset

[0125]

[0126] The experiment compared the learning resource recommendation method proposed in this application with the classic sequence recommendation methods GRU4Rec and SASRec. The recommendation performance of SASRec was compared with that of the contrastive learning-based sequence recommendation method CL4SRec, using three data augmentation methods: random cropping, random masking, and reordering encoders. The evaluation metrics used were MRR@5 and NDCG@5. Table 2 shows the comparison results of the different recommendation methods.

[0127] Table 2 Comparison of different recommendation methods

[0128]

[0129] As can be seen from the comparison results in Table 2, the learning resource recommendation method proposed in this application can achieve the optimal recommendation results.

[0130] See Figure 3 This is a schematic diagram of a learning resource recommendation system based on contrastive learning augmented data disclosed in an embodiment of this application. As an embodiment of a learning resource recommendation system based on contrastive learning augmented data of this application, it may include:

[0131] The recommendation module is used to recommend target users. The learning logs are input into a learning resource recommendation model based on contrastive learning augmented data to obtain learning resource recommendation results;

[0132] The model acquisition module is used to acquire the learning resource recommendation model based on contrastive learning augmentation data. The method for acquiring the learning resource recommendation model based on contrastive learning augmentation data includes:

[0133] Constructing a knowledge graph of course learning resources ;

[0134] In knowledge graph Obtain the enhanced learning resource representation ;

[0135] Construct a user representation model and combine it with learned resource representations. , obtain the original user's statement The input to the user representation model is the enhanced learned resource representation. Learning logs with users The output is the original user representation. ;

[0136] According to the original user Calculate the relevant user-enhanced user representation And design a contrastive learning loss function for relevant user-enhanced user representations. ;

[0137] K-means algorithm is used for clustering to obtain the corresponding user cluster centers for each user cluster, and a contrastive learning loss function for enhancing user representations by cluster centers is designed. ;

[0138] Loss function for sequence prediction task, loss function and loss function The linear weighted sum is used as the total loss function to train the learning resource recommendation model based on contrastive learning augmented data, thus obtaining the learning resource recommendation model based on contrastive learning augmented data.

[0139] It should be noted that in other embodiments of the learning resource recommendation system based on contrastive learning augmented data in this application, the specific functions of each module can also adopt the aforementioned embodiments of the learning resource recommendation method based on contrastive learning augmented data, which will not be repeated here.

[0140] It should be noted that, in the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of each module is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another device, or some features may be ignored or not executed. The modules described as separate components may or may not be physically separated. The components shown as modules may be one or more physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs.

[0141] Furthermore, the modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0142] Furthermore, this application also discloses an electronic device, which may specifically include: at least one processor, at least one memory, a power supply, a communication interface, an input / output interface, and a communication bus. The memory stores a computer program, which is loaded and executed by the processor to implement the relevant steps in the learning resource recommendation method based on contrastive learning augmented data disclosed in any of the foregoing embodiments. Additionally, the electronic device in this embodiment may specifically be an electronic computer.

[0143] In this embodiment, the power supply is used to provide operating voltage for the various hardware devices on the electronic device; the communication interface can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0144] In addition, the memory, as a carrier for storing resources, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it can include operating system, computer program, etc., and the storage method can be temporary storage or permanent storage.

[0145] The operating system is used to manage and control the various hardware devices and computer programs on the electronic device, and may be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs capable of performing the learning resource recommendation method based on contrastive learning augmented data executed by the electronic device as disclosed in any of the foregoing embodiments, the computer programs may further include computer programs capable of performing other specific tasks.

[0146] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed method for recommending learning resources based on contrastive learning-enhanced data. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0147] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0148] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0149] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0150] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A learning resource recommendation method based on contrastive learning-enhanced data, characterized in that, include: target users The learning logs are input into a learning resource recommendation model based on contrastive learning augmented data to obtain learning resource recommendation results; The method for obtaining the learning resource recommendation model based on contrastive learning augmented data includes: Constructing a knowledge graph of course learning resources ; In knowledge graph Obtain the enhanced learning resource representation ; Construct a user representation model and combine it with learned resource representations. , obtain the original user's statement The input to the user representation model is the enhanced learned resource representation. Learning logs with users The output is the original user representation. ; According to the original user Calculate the relevant user-enhanced user representation And design a contrastive learning loss function for relevant user-enhanced user representations. ; K-means algorithm is used for clustering to obtain the corresponding user cluster centers for each user cluster, and a contrastive learning loss function for enhancing user representations by cluster centers is designed. ; Loss function for sequence prediction task Loss function and loss function The linear weighted sum is used as the total loss function to train the learning resource recommendation model based on contrastive learning augmented data, thus obtaining the learning resource recommendation model based on contrastive learning augmented data.

2. The learning resource recommendation method based on contrastive learning augmented data according to claim 1, characterized in that: The construction of the course learning resource knowledge graph includes: For the original knowledge point knowledge graph and a collection of learning resources Traverse the learning resource set For each learning resource ,Towards Add the learning resource node to each of them. And the edges connecting the learning resources with the knowledge points After the traversal is complete, delete. There are no knowledge point nodes connected to the learning resources in the graph, thus obtaining the knowledge graph of the learning resources. .

3. The learning resource recommendation method based on contrastive learning augmented data according to claim 1, characterized in that: The user representation model includes multiple Transformer layers, which include an embedding layer, a multi-head self-attention module, a position feedforward network, and an Add&Norm layer. The embedding layer is used to maintain a reinforcement learning resource embedding representation matrix. The matrix Used to analyze user learning logs The input embedding matrix is ​​formed through a lookup operation. ; The multi-head self-attention module of the last Transformer layer is used to output the original user representation. .

4. The learning resource recommendation method based on contrastive learning augmented data according to claim 1, characterized in that: According to the original user representation Calculate the relevant user-enhanced user representation ,include: Calculate target users and related users correlation score : in, j The total number of relevant users; Based on correlation score Sort the relevant users by size and select the top-k relevant users. For target users Enhance; Learning target users using self-attention mechanisms Enhanced representation : in, An attention vector is represented by the following formula: in, and All are learnable parameters. This is the scaling factor.

5. The learning resource recommendation method based on contrastive learning augmented data according to claim 1, characterized in that: The contrastive learning loss function for the relevant user-enhanced user representation includes: in, and For the same target user Different enhancement representations, It is the negative set of enhanced sequences from relevant users.

6. The learning resource recommendation method based on contrastive learning augmented data according to claim 1, characterized in that: The cluster center-enhanced contrastive learning loss function for user representation ,include: in, Indicates target user Cluster centers of the same group Indicates the first j Cluster centers of groups.

7. The learning resource recommendation method based on contrastive learning augmented data according to claim 1, characterized in that: The loss function for the sequence prediction task includes: in, This represents the loss function for sequence prediction tasks. and Indicates the embedding of positive and negative items; The total loss function includes: in, Represents the total loss function. express The weight, express The weight.

8. A learning resource recommendation system based on contrastive learning augmented data, characterized in that, include: The recommendation module is used to recommend target users. The learning logs are input into a learning resource recommendation model based on contrastive learning augmented data to obtain learning resource recommendation results; The model acquisition module is used to acquire the learning resource recommendation model based on contrastive learning augmentation data. The method for acquiring the learning resource recommendation model based on contrastive learning augmentation data includes: Constructing a knowledge graph of course learning resources ; In knowledge graph Obtain the enhanced learning resource representation ; Construct a user representation model and combine it with learned resource representations. , obtain the original user's statement The input to the user representation model is the enhanced learned resource representation. Learning logs with users The output is the original user representation. ; According to the original user Calculate the relevant user-enhanced user representation And design a contrastive learning loss function for relevant user-enhanced user representations. ; K-means algorithm is used for clustering to obtain the corresponding user cluster centers for each user cluster, and a contrastive learning loss function for enhancing user representations by cluster centers is designed. ; Loss function for sequence prediction task, loss function and loss function The linear weighted sum is used as the total loss function to train the learning resource recommendation model based on contrastive learning augmented data, thus obtaining the learning resource recommendation model based on contrastive learning augmented data.

9. A storage medium, characterized in that, The storage medium stores an instruction set, wherein the instruction set, when executed by a processor, implements the learning resource recommendation method based on contrastive learning augmented data as described in any one of claims 1-7.

10. An electronic device, characterized in that, include: Memory, used to store at least one set of instructions; A processor is configured to execute a set of instructions stored in the memory, and to implement the learning resource recommendation method based on contrastive learning augmented data as described in any one of claims 1-7 by executing the set of instructions.