An online course recommendation method based on community association and behavior feature learning

CN116187852BActive Publication Date: 2026-08-28ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310164787.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-13
Publication Date
2026-08-28
Estimated Expiration
2043-02-13

AI Technical Summary

Technical Problem

[0007]本申请的目的是提供一种基于社区关联和行为特征学习的在线课程推荐方法,用于解决现有技术所存在的数据挖掘不够深入,没有效利用社区信息,没有充分挖掘行为特征,推荐准确度低等问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116187852B_ABST
    Figure CN116187852B_ABST
Patent Text Reader

Abstract

The application discloses an online course recommendation method based on community association and behavior feature learning, calculates the node association degree based on the community through community association learning in the module, adds the semantic information of the node to obtain the reinforced node association degree, and carries out feature aggregation to obtain the entity features on each meta path. The importance of different meta paths is calculated, the entity features obtained by different meta paths are aggregated according to the meta paths, the entity association features are obtained, two sets of association matrices and the entity features are input into a convolution layer to obtain an entity feature matrix, then the entity feature matrix is input into a linear layer to obtain entity behavior features, finally, the entity association features and the behavior features are spliced and input into a score prediction function to obtain a course recommendation list. The application deeply mines the potential information existing in the original data of online education, obtains more comprehensive feature representation, and thus improves the accuracy of course recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of online education course recommendation, and in particular relates to an online course recommendation method based on community association and behavioral feature learning. Background Technology

[0002] In recent years, Massive Open Online Courses (MOOCs) have developed rapidly, significantly impacting traditional offline education amid the global pandemic. Online courses, with their convenience and access to high-quality teaching resources, have attracted a large number of teachers and students. In China, there are many well-known online education platforms, such as MOOCs and XuetangX, which provide a wealth of learning resources for teachers and students.

[0003] Although online education is gradually becoming a mainstream educational method, the efficiency of students learning through online education platforms is widely questioned. Compared with traditional offline education, online course completion rates are low. Statistics show that the overall completion rate of online courses is less than 5%, reflecting a lack of student interest in the courses. Therefore, deeply understanding students' preferences and providing them with courses they are interested in is one of the key points for promoting the development of online education.

[0004] Chinese patent application CN113435685A discloses a course recommendation method based on a hierarchical attention deep learning model. This method calculates user vector representations from preprocessed user learning behavior data and extracts course knowledge points as course vector representations using a convolutional network. It then applies a Long Short-Term Memory (LSTM) algorithm to capture user interactions based on different historical session interests, obtaining interest vectors. These interest vectors are then fed into an attention network to obtain long-term interest vectors. These long-term interest vectors are then combined with the user vectors in the attention network to obtain a hybrid interest representation. Finally, the hybrid interest representation is multiplied by the course representation to obtain the recommendation result. While this method considers the temporal changes in user interests, the degree of user interest varies depending on the user's behavior and the course. Therefore, this method does not fully utilize the data, resulting in relatively mediocre prediction performance.

[0005] Chinese patent application CN114154839 discloses a course recommendation method based on data from an online education platform. This method obtains interaction data between students and courses, between students themselves, and student attribute data from the online education platform. It obtains the course's feature representation and rating matrix through the student-course interaction data, establishes an adjacency matrix through the student-student interaction data, and then inputs this matrix along with the student's attribute data into a reinforcement learning model to obtain the student's feature representation. A course recommendation list for each student is then obtained from the rating matrix, course feature representation, and user feature representation. While this method considers the mutual influence between students, it fails to account for the varying degrees of influence between students, resulting in inaccurate feature representations and ultimately, mediocre recommendation performance.

[0006] Existing technologies generally suffer from insufficient data mining, failing to effectively utilize community information between users and courses, and failing to fully explore behavioral characteristics, resulting in inaccurate recommendations and an inability to accurately provide users with courses they are interested in. Summary of the Invention

[0007] The purpose of this application is to provide an online course recommendation method based on community association and behavioral feature learning, in order to solve the problems of insufficient data mining, ineffective use of community information, insufficient mining of behavioral features, and low recommendation accuracy in existing technologies.

[0008] To achieve the above objectives, the technical solution of this application is as follows:

[0009] An online course recommendation method based on community association and behavioral feature learning includes:

[0010] Obtain course context information, user personal information, and user behavior logs from the online education platform to generate a user meta-path adjacency matrix set A. U Course meta-path adjacency matrix set A C User initial characteristics H U Course context features H C User community collection C U Course community collection C C ;

[0011] The set A of the metapath adjacency matrix U A C User initial characteristics H U Course context features H C With community collection C U C C The input is fed into the constructed and trained association feature extraction module to obtain the user's association features F′. URelated characteristics F' of the course C ;

[0012] Construct a bipartite graph set B based on user behavior logs, and then combine the initial user features H... U Course context features H C The bipartite graph set B is input into the constructed and trained behavior feature extraction module to obtain the behavior features F″ of users and courses, respectively. U and F″ C ;

[0013] The association features between users and courses F′ U 、F' C and behavioral characteristics F″ U 、F″ C Feature fusion is performed separately to obtain the final feature representations E for users and courses respectively. U and E C ;

[0014] According to the final feature representation E U and E C Calculate the user-course rating matrix and recommend highly rated courses to users.

[0015] Furthermore, the process involves obtaining course context information, user personal information, and user behavior logs from the online education platform to generate a user meta-path adjacency matrix set A. U Course meta-path adjacency matrix set A C User initial characteristics H U Course context features H C User community collection C U Course community collection C C ,include:

[0016] Step 1.1: Obtain course context information, including course name, course description, and category, from the online education platform. Create a corpus based on the obtained course description, train a Word2vec model on the corpus, calculate the word vectors corresponding to the course name using the Word2vec model, and combine the obtained word vectors to generate the course context feature H. C ;

[0017] Step 1.2: Obtain user personal information, including gender, age, and education level, from the online education platform, and input it into the one-hot encoder to obtain the initial user feature H. U ;

[0018] Step 1.3: Construct the set A of meta-path adjacency matrices for users based on the potential relationships between them. U Based on the potential relationships between courses, construct a set A of meta-path adjacency matrices for the courses.C :

[0019] A U ={MP1 MP2......MP z};

[0020] A C ={MP′1 MP′2......MP′ t};

[0021] Among them, there are z user meta paths, t course meta paths, and MP z MP' represents the z-th user metapath. t This represents the metapath of the t-th course;

[0022] Step 1.4: Based on the user metapath adjacency matrix set A U Create a user association graph, for any user node u i , build the community of this node This indicates that user node u is located within this community. i All k-order neighbor nodes, This indicates that within the community u i All k-order neighbor nodes for u i The weights; for any course node c i , build the community of this node This indicates that the course node c within the community... i All k-order neighbor nodes, This represents all k-order neighbor nodes of ci within the community with respect to c. i The weights; and The calculation formula is as follows:

[0023]

[0024]

[0025] Where I represents the identity matrix, and c is a trainable parameter used to dynamically control the size of the community. It is the initial vector that is all zeros except for the position corresponding to the center node, R ui It is the adjacency matrix of the community where the user node is located. It is the adjacency matrix of the community where the course node is located;

[0026] Based on the above, we can obtain the community set C of all users. U Community collection C with all courses C .

[0027] Furthermore, the set A of the meta-path adjacency matrix... UA C User initial characteristics H U Course context features H C With community collection C U C C The input is fed into the constructed and trained association feature extraction module to obtain the user's association features F′. U Related characteristics F' of the course C ,include:

[0028] Step 2.1: Calculate the different user node u i with u j The similarity between communities yields a community-based correlation. The calculation formula is as follows:

[0029]

[0030] Among them, Vu i With Vu j Representing user node u respectively i with u j The set of neighboring nodes, u l Vu i With Vu j The nodes in the intersection, u m Vu i With Vu j The nodes in the union set Represents user node u i For user node u l The weight, Represents user node u j For user node u l The weight, Represents user node u i For user node u m The weight, Represents user node u j For user node u m The weights;

[0031] Step 2.2: Based on the initial feature H U Calculate different user nodes u i with u j semantic similarity between The calculation formula is as follows:

[0032]

[0033] in, and Representing user node u respectively i With user node uj semantic information, This method converts high-dimensional vectors into real numbers, where W is the transformation matrix that transforms node features to the same space.

[0034] Step 2.3: Add semantic similarity to the node association degree based on the community to obtain the enhanced node association degree.

[0035]

[0036]

[0037] Here, softmax(·) represents the normalization function, which maps the input values ​​to values ​​between [0,1]. and They respectively represent the following: and The value after normalization. σ represents the activation function, exp(·) represents the exponential function with the natural constant e as the base, and α(·) and β(·) represent the transformation functions;

[0038] Step 2.4: Based on the enhanced node association degree and the semantic information of neighboring nodes, obtain the user node u. i Feature vectors under a certain metapath:

[0039]

[0040] in, Represents node u i The set of all neighboring nodes on this metapath;

[0041] Similarly, calculate course node c. i Feature vectors on a metapath

[0042] Step 2.5: Calculate the path MP for all user nodes on a single metapath. z The feature vectors on the metapath are concatenated to obtain the user features on that metapath. Where n represents the number of user nodes;

[0043] Step 2.6: Calculate the path MP′ for all course nodes. t The feature vectors on the metapath are concatenated to obtain the course features on that metapath. Where m represents the number of course nodes;

[0044] Step 2.7: Calculate the user features on each meta-path to obtain the user feature set.

[0045] Step 2.8: Calculate the course features on each meta-path to obtain the course feature set.

[0046] Step 2.9: Calculate the user's path MP on a metapath z The importance of

[0047]

[0048] Where U represents the set of user nodes, L u W represents a trainable vector. u Let b represent the weight matrix. u Represents the deviation vector;

[0049] Aggregation based on meta-paths yields user association features under Z meta-paths:

[0050]

[0051] Step 2.10: Calculate the course on a metapath MP′ t The importance of

[0052]

[0053] Where C represents the set of course nodes, L c W represents a trainable vector. c Let b represent the weight matrix. c Represents the deviation vector;

[0054] Aggregation based on meta-paths yields course association features across T meta-paths:

[0055]

[0056] Furthermore, the bipartite graph set B is constructed based on user behavior logs, and the initial user features H are respectively... U Course context features H C The bipartite graph set B is input into the constructed and trained behavior feature extraction module to obtain the behavior features F″ of users and courses, respectively. U and F″ C ,include:

[0057] Step 3.1: Based on user behavior logs, construct a user-course bipartite graph set B = {B1 B2 ... B...} r}, where B r This represents the user-course bipartite graph corresponding to behavior type r;

[0058] Step 3.2: For any bipartite graph, if multiple user entities are connected to one course entity, then there exists a hyperedge connecting these multiple user nodes; if multiple course entities are connected to one user entity, then there exists a hyperedge connecting these multiple course nodes. Therefore, the user-course bipartite graph is transformed into two sets of isomorphic hypergraphs G. U and G C :

[0059] G U ={G U,global G U,1 ......G U,r};

[0060] G C ={G C,global G C,1 ......G C,r};

[0061] Among them G U,r =(U,E U,r Let ) represent the user hypergraph corresponding to the r-th behavior type, U represent the set of user nodes, and E represent the user hypergraph. U,r Let G represent the set of superedges of type r. C,r =(C,E C,r E represents the course hypergraph corresponding to the r-th behavior type. C,r Let G represent the set of superedges of type r. U,global =(U,E U,1 ∪E U,2 ...∪E U,r ) represents the global user hypergraph, whose set of hyperedges is G. U,1 ......G U,r The union of the hyperedges constitutes G. C,global =(U,E C,1 ∪E C,2 ...∪E C,r Let G represent the global course hypergraph, whose set of hyperedges is G. C,1 ......G C,r The union of the superedges constitutes the structure;

[0062] Step 3.4: Construct the association matrix corresponding to each hypergraph. For each association matrix, if an entity node is associated with a hyperedge, the corresponding position in the association matrix is ​​1; otherwise, the corresponding position is 0.

[0063] Step 3.5: Obtain two sets of correlation matrices X through step 3.4. U and X C :

[0064] X U ={XU,global X U,1 ......X U,r};

[0065] X C ={X C,gobal X C,1 ......X C,r};

[0066] The two sets of correlation matrices X U X C and user initial features H U Course context features H C The input is fed into the convolutional layer, and the operation of the (l+1)th layer is as follows:

[0067]

[0068]

[0069] Where σ represents a nonlinear activation function, This is the convolution calculation unit, and the convolution operation is performed using this formula. D U,i This is the user node degree matrix, representing a diagonal matrix where the diagonal elements are the degrees of each node. The degree of a node represents the number of edges associated with that node. B U,i W is a hyperedge degree matrix, representing a diagonal matrix whose diagonal elements are the degrees of each hyperedge. The degree of each hyperedge indicates the number of nodes contained in that hyperedge. U Represents the identity matrix. This represents the learnable filter matrix. Since G... U,global Includes G U,1 ......G U,r The aggregated information is therefore added to the convolutional computation unit. To make H U,global The included global information is merged into each H U,i According to step 3.2, which involves converting a bipartite graph into a hypergraph, G... U,i One of the user nodes corresponds to G C,i One of the super edges in the convolution calculation unit, therefore an additional one is added to the convolution calculation unit. To establish the correspondence between the above nodes and hyperedges, strengthen H U,i With H c,i Similarity attributes between them;

[0070] Step 3.6: Based on step 3.5, after l iterations, the user feature matrix is ​​obtained. Course Feature Matrix

[0071]

[0072]

[0073] Step 3.7: Convert the user feature matrix Course Feature Matrix The input is fed into a linear layer to obtain user behavior features F″. U With course behavior characteristics F″ C Its linear operations are as follows:

[0074]

[0075]

[0076] Among them O U With O C It is a transformation matrix, k U With k C These are the training parameters.

[0077] Furthermore, the statement based on the final feature representation E U and E C Calculate the user and course rating matrix, including:

[0078] According to the final feature representation E U and E C The user-course rating matrix is ​​calculated using the following formula:

[0079]

[0080] Where v U v C These are trainable parameters to ensure E U With E C In the same feature space; β U ,β C It's about adjusting parameters, p U It is the latent feature matrix of the user, q C It is the latent feature matrix of the course.

[0081] This application proposes an online course recommendation method based on community association and behavioral feature learning. Unlike traditional graph neural networks that can only capture the correlation between nodes at the node level, this method designs different meta-paths to obtain global information in heterogeneous graphs. Then, for each meta-path, a node community is constructed, and the community-based node correlation degree is calculated through community association learning. Semantic information of the nodes is added to strengthen the community-based node correlation degree, thus capturing the correlation between nodes at both the community and node levels. Next, a meta-path attention mechanism is used to aggregate the entity features obtained from different meta-paths to obtain the association features of user entities and course entities, respectively. In addition, considering the impact of different user behaviors on the recommendation results, this method constructs user hypergraphs and course hypergraphs based on different entity behaviors. After graph convolution operations, behavioral features of users and courses are obtained, respectively. Finally, the association features and behavioral features are concatenated and input into the rating prediction function to obtain the rating matrix, and courses with higher ratings are recommended to users. Attached Figure Description

[0082] Figure 1 The flowchart illustrates the online course recommendation method based on community association and behavioral feature learning used in this application.

[0083] Figure 2 This is a schematic diagram illustrating the feature extraction process of this application;

[0084] Figure 3 This is a diagram illustrating the enhanced community connections in this application;

[0085] Figure 4 This is a schematic diagram illustrating the extraction of behavioral features in this application. Detailed Implementation

[0086] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0087] This application provides an online course recommendation method based on community association and behavioral feature learning, such as... Figure 1 As shown, it includes:

[0088] Step S1: Obtain course context information, user personal information, and user behavior logs from the online education platform to generate a user meta-path adjacency matrix set A. U Course meta-path adjacency matrix set A C User initial characteristics H U Course context features H C User community collection C U Course community collection C C .

[0089] When a user visits an online education platform, the backend records and retains a lot of raw data, including different user behaviors related to courses (viewing course information, watching videos, answering questions), course context information (course name, course description, category), and user personal information (gender, age, education level). This application processes and deeply mines this raw data to obtain a set A of user meta-path adjacency matrices. U Course meta-path adjacency matrix set A C User initial characteristics H U Course context features H C User community collection C U Course community collection C C Data such as...

[0090] The process involves obtaining course context information, user personal information, and user behavior logs from the online education platform to generate a user meta-path adjacency matrix set A. U Course meta-path adjacency matrix set A C User initial characteristics H U Course context features H C User community collection C U Course community collection C C Specifically, it includes:

[0091] Step 1.1: Obtain course context information, including course name, course description, and category, from the online education platform. Create a corpus based on the obtained course description, train a Word2vec model on the corpus, calculate the word vectors corresponding to the course name using the Word2vec model, and combine the obtained word vectors to generate the course context feature H. C ;

[0092] Step 1.2: Obtain personal information, including gender, age, and education level, from the online education platform and input it into the one-hot encoder to obtain the user's initial features H. U ;

[0093] Step 1.3: Construct the set A of meta-path adjacency matrices for users based on the potential relationships between them. U Based on the potential relationships between courses, construct a set A of meta-path adjacency matrices for the courses. C :

[0094] A U ={MP1 MP2......MP z};

[0095] A C ={MP′1 MP′2......MP′ t};

[0096] Among them, there are z user meta paths, t course meta paths, and MP z MP' represents the z-th user metapath. t This represents the metapath of the t-th course;

[0097] Step 1.4: For any user node u i , build the community of this node This indicates that user node u is located within this community. i All k-order neighbor nodes, This indicates that all k-order neighbor nodes of ui within this community are related to u. i The weights; for any course node c i , build the community of this node This indicates that the course node c within the community... i All k-order neighbor nodes, This indicates that within the community c i All k-order neighbor nodes for c i The weights; and The calculation formula is as follows:

[0098]

[0099]

[0100] Where I represents the identity matrix, and c is a trainable parameter used to dynamically control the size of the community. The value of c is adjusted by training the model. It is the initial vector that is all zeros except for the position corresponding to the center node. It is the adjacency matrix of the community where the user node is located. It is the adjacency matrix of the community where the course node is located.

[0101] Based on the above, we can obtain the community set C of all users. U Community collection C with all courses C .

[0102] In this embodiment, the dataset used contains 1944 users and 694 courses, with an initial embedding size of 100. Therefore, the initial user features H U The dimensions are [1944, 100], and the course context H C The dimensions are [694, 100].

[0103] In this embodiment, multiple meta-paths are constructed for user entities to represent the connections between different user entity objects under different relationships.

[0104] For example, in the user metapath UCU, the semantic information of this metapath is: two different users have studied the same course.

[0105] For example, the semantic information of a user metapath (UVU) is: two different users watched the same instructional video.

[0106] This embodiment designs different meta-path types for users and courses, as shown in Table 1:

[0107]

[0108] Table 1

[0109] In this embodiment, communities are first defined based on second-order neighbors. Then, a restarted random walk method is used to calculate the weights of other nodes within a community relative to the central node. Particles start from the central node and randomly walk towards neighboring nodes with transition probabilities. During the walk, there is a certain probability that they will return to the central node. The community information C of the user and the course is obtained by calculating the probability of the particle staying at each node as the weight of each node. U C C .

[0110] Step S2: Set the meta-path adjacency matrix A U A C User initial characteristics H U Course context features H C With community collection C U C C The input is fed into the constructed and trained association feature extraction module to obtain the user's association features F′. U Related characteristics F' of the course C .

[0111] Specifically, the set A of metapath adjacency matrices U A C User initial characteristics H U Course context features H C With community collection C U C C The input is fed into the constructed and trained association feature extraction module to obtain the user's association features F′. U Related characteristics F' of the course C ,include:

[0112] Step 2.1: Calculate the different user node u i with u j The similarity between communities yields a community-based correlation. The calculation formula is as follows:

[0113]

[0114] Among them, Vu i With Vu j Representing user node u respectively i with u j The set of neighboring nodes, u l Vu i With Vu j The nodes in the intersection, u m Vu i With Vu j The nodes in the union set Represents user node u i For user node u l The weight, Represents user node u j For user node u l The weight, Represents user node u i For user node u m The weight, Represents user node u j For user node u m The weights;

[0115] Step 2.2: Based on the initial feature H U Calculate different user nodes u i with u j semantic similarity between The calculation formula is as follows:

[0116]

[0117] in, and Representing user node u respectively i With user node u j semantic information, This method converts high-dimensional vectors into real numbers, where W is the transformation matrix that transforms node features to the same space.

[0118] Step 2.3: Add semantic similarity to the node association degree based on the community to obtain the enhanced node association degree.

[0119]

[0120]

[0121] Here, softmax(·) represents the normalization function, which maps the input values ​​to values ​​between [0,1]. and They respectively represent the following: and The value after normalization. σ represents the activation function, exp(·) represents the exponential function with the natural constant e as the base, and α(·) and β(·) represent the transformation functions;

[0122] Step 2.4: Based on the enhanced node correlation and the semantic information of neighboring nodes, obtain the feature vector of user node ui under a certain meta-path:

[0123]

[0124] Among them, Nu i This represents the set of all neighboring nodes of node ui on this metapath;

[0125] Similarly, calculate the feature vector of course node ci on a metapath.

[0126] That is, by calculating different course nodes c i With c j The similarity between communities yields a community-based correlation. The calculation formula is as follows:

[0127]

[0128] Among them, Vc i With Vitamin C j These represent course node c respectively. i With c j The set of neighboring nodes, c l Indicates Vc i With Vitamin C j The nodes in the intersection, c m Indicates Vc i With Vitamin C j The nodes in the union set Indicates course node c i For course node c l The weight, Indicates course node c j For course node c l The weight, Indicates course node c i For course node c m The weight, Indicates course node c j For course node c m The weights;

[0129] Based on the initial feature H C Calculate different course nodes ci With c j semantic similarity between The calculation formula is as follows:

[0130]

[0131] in, and These represent course node c respectively. i With course node c j semantic information, This method converts high-dimensional vectors into real numbers, where W is the transformation matrix that transforms node features to the same space.

[0132] By adding semantic similarity to the community-based node association, we obtain an enhanced node association.

[0133]

[0134]

[0135] Here, softmax(·) represents the normalization function, which maps the input values ​​to values ​​between [0,1]. and They respectively represent the following: and The value after normalization. σ represents the activation function, exp(·) represents the exponential function with the natural constant e as the base, and α(·) and β(·) represent the transformation functions;

[0136] Based on the enhanced node correlation and the semantic information of neighboring nodes, the course node c is obtained. i Feature vectors under a certain metapath:

[0137]

[0138] Among them, Nc i Represents node c i The set of all neighboring nodes on this metapath;

[0139] Step 2.5: Calculate the path MP for all user nodes on a single metapath. z The feature vectors on the metapath are concatenated to obtain the user features on that metapath. Where n represents the number of user nodes;

[0140] Step 2.6: Calculate the path MP′ for all course nodes. t The feature vectors on the metapath are concatenated to obtain the course features on that metapath. Where m represents the number of course nodes;

[0141] Step 2.7: Calculate the user features on each meta-path to obtain the user feature set.

[0142] Step 2.8: Calculate the course features on each meta-path to obtain the course feature set.

[0143] Step 2.9: Calculate the user's path MP on a metapath z The importance of

[0144]

[0145] Where U represents the set of user nodes, L u W represents a trainable vector. u Let b represent the weight matrix. u Represents the deviation vector;

[0146] Aggregation based on meta-paths yields user association features under Z meta-paths:

[0147]

[0148] Step 2.10: Calculate the course on a metapath MP′ t The importance of

[0149]

[0150] Where C represents the set of course nodes, L c W represents a trainable vector. c Let b represent the weight matrix. c Represents the deviation vector;

[0151] Aggregation based on meta-paths yields course association features across T meta-paths:

[0152]

[0153] In this embodiment, the schematic diagram of associated feature generation is as follows: Figure 2 As shown in the diagram, the community association enhancement module is illustrated below. Figure 3 As shown, the aggregation network contains 8 hidden units and 8 attention heads. There are 1944 user nodes (n = 1944) and 694 course nodes (m = 694). The ReLU activation function is used to better mine relevant features, fit the training data, and avoid gradient saturation and vanishing gradient problems. Jaccrd similarity is used to measure the community association between different nodes.

[0154] It should be noted that, These are matrices that describe the dimensions of the features.

[0155] Step S3: Construct a bipartite graph set B based on user behavior logs, and then combine the initial user features H... U Course context features H C The bipartite graph set B is input into the constructed and trained behavior feature extraction module to obtain the behavior features F″ of users and courses, respectively. U and F″ C .

[0156] Specifically, a bipartite graph set is constructed based on user behavior logs, and the initial user features H are respectively... U Course context features H C The bipartite graph set B is input into the constructed and trained behavior feature extraction module to obtain the behavior features F″ of users and courses, respectively. U and F″ C ,include:

[0157] Step 3.1: Based on user behavior logs, construct a user-course bipartite graph set B = {B1 B2 ... B...} r}, where B r This represents the user-course bipartite graph corresponding to behavior type r;

[0158] Step 3.2: For any bipartite graph, if multiple user entities are connected to one course entity, then there exists a hyperedge connecting these multiple user nodes; if multiple course entities are connected to one user entity, then there exists a hyperedge connecting these multiple course nodes. Therefore, the user-course bipartite graph is transformed into two sets of isomorphic hypergraphs G. U and G C :

[0159] G U ={G U,global G U,1 ......G U,r};

[0160] G C ={G C,global G C,1 ......G C,r};

[0161] Among them G U,r =(U,E U,r Let ) represent the user hypergraph corresponding to the r-th behavior type, U represent the set of user nodes, and E represent the user hypergraph. U,r Let G represent the set of superedges of type r. C,r =(C,E C,rE represents the course hypergraph corresponding to the r-th behavior type. C,r Let G represent the set of superedges of type r. U,global =(U,E U,1 ∪E U,2 ...∪E U,r ) represents the global user hypergraph, whose set of hyperedges is G. U,1 ......G U,r The union of the hyperedges constitutes G. C,global =(U,E C,1 ∪E C,2 ...∪E C,r Let G represent the global course hypergraph, whose set of hyperedges is G. C,1 ......G C,r The union of the superedges constitutes the structure;

[0162] Step 3.4: Construct the association matrix corresponding to each hypergraph. For each association matrix, if an entity node is associated with a hyperedge, the corresponding position in the association matrix is ​​1; otherwise, the corresponding position is 0.

[0163] Step 3.5: Obtain two sets of correlation matrices X through step 3.4. U and X C :

[0164] X U ={X U,global X U,1 ......X U,r};

[0165] X C ={X C,gobal X C,1 ......X C,r};

[0166] The two sets of correlation matrices X U X C and user initial features H U Course context features H C The input is fed into the convolutional layer, and the operation of the (l+1)th layer is as follows:

[0167]

[0168]

[0169] Where σ represents a nonlinear activation function, This is the convolution calculation unit, and the convolution operation is performed using this formula. D U,i This is the user node degree matrix, representing a diagonal matrix where the diagonal elements are the degrees of each node. The degree of a node represents the number of edges associated with that node. BU,i W is a hyperedge degree matrix, representing a diagonal matrix whose diagonal elements are the degrees of each hyperedge. The degree of each hyperedge indicates the number of nodes contained in that hyperedge. U Represents the identity matrix. This represents the learnable filter matrix. Since G... U,global Includes G U,1 ......G U,r The aggregated information is therefore added to the convolutional computation unit. To make H U,global The included global information is merged into each H U,i According to step 3.2, which involves converting a bipartite graph into a hypergraph, G... U,i One of the user nodes corresponds to G C,i One of the super edges in the convolution calculation unit, therefore an additional one is added to the convolution calculation unit. To establish the correspondence between the above nodes and hyperedges, strengthen H U,i With H c,i Similarity attributes between them;

[0170] Step 3.6: Based on step 3.5, after l iterations, the user feature matrix is ​​obtained. Course Feature Matrix

[0171]

[0172]

[0173] Step 3.7: Convert the user feature matrix Course Feature Matrix The input is fed into a linear layer to obtain user behavior features F″. U With course behavior characteristics F″ C Its linear operations are as follows:

[0174]

[0175]

[0176] Among them O U With O C It is a transformation matrix, k U With k C These are the training parameters.

[0177] In this embodiment, user behaviors are shown in Table 2, and are divided into two groups of isomorphic hypergraphs based on different user behaviors:

[0178] G U =[G U,global G U,查看信息 G U,观看视频 GU,回答问题 ]

[0179] G C =[G C,global G C,查看信息 G C,观看视频 G C,回答问题 ]

[0180] 1 View course information 2 Watch course videos 3 Answer the questions after class

[0181] Table 2

[0182] The behavioral feature generation diagram in this embodiment is as follows: Figure 4 As shown, it contains two convolutional layers and one linear layer, where the number of convolutional layers can be changed.

[0183] Step S4: Associativity between users and courses F′ U F′ C and behavioral characteristics F″ U 、F″ C Feature fusion is performed separately to obtain the final feature representations E for users and courses respectively. U and E C .

[0184] Specifically, the association features F′ between users and courses U F′ C and behavioral characteristics F″ U 、F″ C Feature fusion is performed separately to obtain the final feature representations E for users and courses respectively. U and E C ,include:

[0185] The association features between users and courses F′ U F′ C With behavioral characteristics F″ U 、F″ C The user and course features are concatenated separately to obtain the final feature representation E. U and E C :

[0186] E U =concat(F′ U ,F″ U )

[0187] E C =concat(F′ C ,F″ C )

[0188] It should be noted that in this embodiment, F′U, F″U, F′C, and F″ are... CThe embedding size is 32, and the resulting E after splicing U With E C The dimensions are [1944,64] and [694,64].

[0189] Step S5: Based on the final feature representation E U and E C Calculate the user-course rating matrix and recommend highly rated courses to users.

[0190] Specifically, based on the final feature representation E U and E C The user-course rating matrix is ​​calculated using the following formula:

[0191]

[0192] Where v U v C These are trainable parameters to ensure E U With E C In the same feature space. β U ,β C It's about adjusting parameters, p U It is the latent feature matrix of the user, q C It is the latent feature matrix of the course.

[0193] The larger the value corresponding to the user and the course in the matrix, the greater the user's interest in the course; conversely, the smaller the corresponding value in the matrix, the less interested the user is in the course. Therefore, courses with high ratings are recommended to the user.

[0194] In this embodiment, a matrix factorization-based method is used to decompose the rating matrix into two latent feature matrices, and then the learned user and course feature representations E are used. U E C The input yields the predicted rating matrix. The deviation between the actual rating matrix and the predicted rating matrix is ​​then used as the loss. The backpropagation algorithm is used to update the trainable parameters in the model. After training, a user-course rating matrix is ​​obtained, and the top 10 courses with the highest ratings are recommended to the user.

[0195] This application reinforces node correlation through community association, using this correlation as a weighted feature aggregation method to capture the correlation between user entities and courses at both the community and node levels. Then, a meta-path attention mechanism is used to aggregate entity features obtained from different meta-paths, yielding entity correlation features. A behavioral feature extraction module models the correlation between different behaviors, learning user and course behavioral features and deeply mining the potential information within these behaviors. The final feature representation obtained by fusing correlation and behavioral features comprehensively covers the potential information in the original data, thus significantly improving the accuracy of course recommendations in this application.

[0196] After obtaining the user-course rating matrix, the 10 courses with the highest scores can be recommended to the user. The user can provide feedback on the recommendations, and the model can be further optimized and trained based on the user's feedback.

[0197] The embodiments described above merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. An online course recommendation method based on community association and behavioral feature learning, characterized in that, The online course recommendation method based on community association and behavioral feature learning includes: Obtain course context information, user personal information, and user behavior logs from the online education platform to generate a user meta-path adjacency matrix set A. U Course meta-path adjacency matrix set A C User initial characteristics H U Course context features H C User community collection C U Course community collection C C ; The set A of the metapath adjacency matrix U A C User initial characteristics H U Course context features H C With community collection C U C C The input is fed into the constructed and trained association feature extraction module to obtain the user's association features F. ' U Related characteristics F of the course ' C ; Construct a bipartite graph set B based on user behavior logs, and then combine the initial user features H... U Course context features H C The bipartite graph set B is input into the constructed and trained behavior feature extraction module to obtain the behavior features F of users and courses, respectively. '' U and F '' C ; The association features between users and courses F ' U F ' C and behavioral characteristics F '' U F '' C Feature fusion is performed separately to obtain the final feature representations E for users and courses respectively. U and E C ; According to the final feature representation E U and E C Calculate the user and course rating matrix and recommend courses with high ratings to users; Wherein, the set A of the meta-path adjacency matrix U A C User initial characteristics H U Course context features H C With community collection C U C C The input is fed into the constructed and trained association feature extraction module to obtain the user's association features F. ' U Related characteristics F of the course ' C ,include: Step 2.1: Calculate different user nodes and The similarity between communities yields a community-based correlation. The calculation formula is as follows: ; in, and Representing user nodes and The set of neighboring nodes, express and Nodes in the intersection express and The nodes in the union set Represents user node For user nodes The weight, Represents user node For user nodes The weight, Represents user node For user nodes The weight, Represents user node For user nodes The weights; Step 2.2: Based on the initial feature H U Calculate different user nodes and semantic similarity between The calculation formula is as follows: ; in, H U and H U Representing user nodes With user nodes semantic information, This function converts a high-dimensional vector into a real number. It is a transformation matrix that converts node features to the same space; Step 2.3: Add semantic similarity to the node association degree based on the community to obtain the enhanced node association degree. : ; ; in, This represents a normalization function that maps input values ​​to numerical values ​​between [0, 1]. and They represent respectively to and The value after normalization; This represents the activation function. This represents an exponential function with the natural constant e as its base. and Indicates the transformation function; Step 2.4: Based on the enhanced node association degree and the semantic information of neighboring nodes, obtain the user node. Eigenvectors under a single metapath: ; in, Represents a node The set of all neighboring nodes on this metapath; Similarly, calculate course nodes. Feature vectors on a metapath ; Step 2.5: Calculate the MP of all user nodes on a single metapath sequentially. z The feature vectors on the metapath are concatenated to obtain the user features on that metapath. , where n represents the number of user nodes; Step 2.6: Calculate the path MP' for all course nodes sequentially. t The feature vectors on the metapath are concatenated to obtain the course features on that metapath. , where m represents the number of course nodes; Step 2.7: Calculate the user features on each meta-path to obtain the user feature set. ; Step 2.8: Calculate the course features on each meta-path to obtain the course feature set. ; Step 2.9: Calculate the user's MP on a metapath. z The importance of : ; Where U represents the set of user nodes, L u W represents a trainable vector. u Let b represent the weight matrix. u Represents the deviation vector; Aggregation based on meta-paths yields user association features under Z meta-paths: ; Step 2.10: Calculate the course in a metapath MP' t The importance of : ; Where C represents the set of course nodes, L c W represents a trainable vector. c Let b represent the weight matrix. c Represents the deviation vector; Aggregation based on meta-paths yields course association features across T meta-paths: 。 2. The online course recommendation method based on community association and behavioral feature learning according to claim 1, characterized in that, The process involves obtaining course context information, user personal information, and user behavior logs from the online education platform to generate a user meta-path adjacency matrix set A. U Course meta-path adjacency matrix set A C User initial characteristics H U Course context features H C User community collection C U Course community collection C C ,include: Step 1.1: Obtain course context information, including course name, course description, and category, from the online education platform. Create a corpus based on the obtained course description, train a Word2vec model on the corpus, calculate the word vectors corresponding to the course name using the Word2vec model, and combine the obtained word vectors to obtain the course context features H. C ; Step 1.2: Obtain user personal information, including gender, age, and education level, from the online education platform, and input it into the one-hot encoder to obtain the initial user feature H. U ; Step 1.3: Construct the set A of meta-path adjacency matrices for users based on the potential relationships between them. U Based on the potential relationships between courses, construct a set A of meta-path adjacency matrices for the courses. C : A U = { MP1 MP2...... MP z }; TO C = { MP'1 MP'2 ...... MP' t }; Among them, there are z user meta paths, t course meta paths, and MP z MP' represents the z-th user metapath. t This represents the metapath of the t-th course; Step 1.4: Based on the user metapath adjacency matrix set A U Create a user relationship graph. For any user node in this graph... The community that builds this node , This indicates the user nodes within the community. All k-order neighbor nodes, This indicates that within the community All k-order neighbor nodes for The weights; based on the course metapath adjacency matrix set A C Create a graph of course relationships. For any course node in this graph... The community that builds this node , This indicates the course nodes within the community. All k-order neighbor nodes, This indicates that within the community All k-order neighbor nodes for The weights; and The calculation formula is as follows: ; ; in, Represents the identity matrix. These are trainable parameters used to dynamically control the size of the community. , It is the initial vector that is all zeros except for the position corresponding to the center node. It is the adjacency matrix of the communities where user nodes reside. It is the adjacency matrix of the community where the course node is located; Based on the above, we can obtain the community set C of all users. U Community collection C with all courses C .

3. The online course recommendation method based on community association and behavioral feature learning according to claim 1, characterized in that, The process involves constructing a bipartite graph set B based on user behavior logs, and then dividing the initial user features H into... U Course context features H C The bipartite graph set B is input into the constructed and trained behavior feature extraction module to obtain the behavior features F of users and courses, respectively. '' U and F '' C , include: Step 3.1: Based on user behavior logs, construct a user-course bipartite graph set B = {B1B2...... B}. r }, where B r This represents the user-course bipartite graph corresponding to behavior type r; Step 3.2: For any bipartite graph, if multiple user entities are connected to one course entity, then there exists a hyperedge connecting these multiple user nodes; if multiple course entities are connected to one user entity, then there exists a hyperedge connecting these multiple course nodes. Therefore, the user-course bipartite graph is transformed into two sets of isomorphic hypergraphs G. U and G C : G U = { G U,global G U,1 ...... G U,r }; G C = { G C,global G C,1 ...... G C,r }; Among them G U,r =(U,E U,r Let ) represent the user hypergraph corresponding to the r-th behavior type, U represent the set of user nodes, and E represent the user hypergraph. U,r G represents the set of superedges of type r; C,r =(C,E C,r E represents the course hypergraph corresponding to the r-th behavior type. C,r G represents the set of superedges of type r; U,global =(U,E U,1 ∪E U,2 . . ∪E U,r ) represents the global user hypergraph, whose set of hyperedges is G. U,1 ...... G U,r The union of the hyperedges constitutes G; C,global =(U,E C,1 ∪E C,2 . . ∪E C,r Let G represent the global course hypergraph, whose set of hyperedges is G. C,1 ...... G C,r The union of the superedges constitutes the structure; Step 3.4: Construct the association matrix corresponding to each hypergraph. For each association matrix, if an entity node is associated with a hyperedge, the corresponding position in the association matrix is ​​1; otherwise, the corresponding position is 0. Step 3.5: Obtain two sets of correlation matrices X through step 3.

4. U and X C : X U = {X U,global X U,1 ...... X U,r }; X C = {X C,gobal X C,1 ...... X C,r }; The two sets of correlation matrices X U X C and user initial features H U Course context features H C The input is fed into the convolutional layer, and the operation of the (l+1)th layer is as follows: ; ; in, Represents a non-linear activation function. It is a convolution calculation unit, and convolution operations are performed using this formula; It is a user node degree matrix, representing a diagonal matrix whose diagonal elements are the degrees of each node, and the degree of a node represents the number of edges associated with that node. It is a hyperedge degree matrix, representing a diagonal matrix whose diagonal elements are the degrees of each hyperedge, and the degree of each hyperedge represents the number of nodes contained in that hyperedge. Represents the identity matrix. Represents the learnable filter matrix; since G U,global Includes G U,1 ...... G U,r The aggregated information is therefore added to the convolutional computation unit. , so as to make H U,global The included global information is merged into each H U,i According to step 3.2, which involves converting a bipartite graph into a hypergraph, G... U,i One of the user nodes corresponds to G C,i One of the super edges in the convolution calculation unit, therefore an additional one is added to the convolution calculation unit. To establish the correspondence between the above nodes and hyperedges, and strengthen H U,i With H c,i Similarity attributes between them; Step 3.6: Based on step 3.5, after l iterations, the user feature matrix is ​​obtained. Course Feature Matrix : ; ; Step 3.7: Convert the user feature matrix Course Feature Matrix The input is fed into a linear layer to obtain user behavior features F. '' U With course behavior characteristics F '' C Its linear operations are as follows: ; ; in and It is a transformation matrix. and These are the training parameters.

4. The online course recommendation method based on community association and behavioral feature learning according to claim 1, characterized in that, The representation E based on the final feature U and E C Calculate the user and course rating matrix, including: According to the final feature representation E U and E C The user-course rating matrix is ​​calculated using the following formula: ; in , These are trainable parameters to ensure and In the same feature space; , It's about adjusting parameters. It is the user's latent feature matrix. It is the latent feature matrix of the course.

Citation Information

Patent Citations

  • Hierarchical Attention deep learning model course recommendation method

    CN113435685A

  • Course recommendation method based on association relationship analysis

    CN113065342A