Personalized educational resource recommendation method and system based on graph neural network

By using a multi-interest comparison graph attention network in educational resource recommendation, the problems of coarse-grained user representation and sparse supervision signals in the prior art are solved, and a more accurate and interpretable educational resource recommendation is achieved.

CN119782605AInactive Publication Date: 2025-04-08HUAZHONG NORMAL UNIV

Patent Information

Application Number
CN202411789097.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing knowledge graph recommendation model based on graph neural networks has problems with coarse-grained user representation and sparse supervision signals, resulting in insufficient accuracy and poor interpretation of educational resource recommendations.

Method used

A multi-interest comparison graph attention network is used to use the learner's historical learning records and sample data of learning resources as training sets. The feature vectors of learners and learning resources are extracted through the comparative learning method, and the preference is calculated for recommendation.

Benefits of technology

By efficiently utilizing knowledge graph data, capturing the diversity of learners' interests and improving the accuracy and interpretability of recommendations, the problems of insufficient recommendation accuracy and poor interpretation in traditional methods are overcome.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782605A_ABST
    Figure CN119782605A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of graph neural networks, and discloses a personalized education resource recommendation method and system based on a graph neural network, and the method comprises the steps: extracting first coding information of a learner and second coding information of a learning resource from a coding information base; inputting the first coding information and the second coding information into a multi-interest contrast graph attention network to obtain a first feature vector corresponding to the learner and a second feature vector corresponding to the learning resource; multiplying the first feature vector by the second feature vector to obtain the preference degree of the learner and the learning resources for educational resource recommendation; the multi-interest contrast graph attention network is obtained by training sample data of historical learning records and learning resources of the learner as a training set, and the multi-interest contrast graph attention network is used for capturing and understanding interest preferences of the learner by fusing various interest information of the learner and attribute information of the learning resources. The educational resource recommendation accuracy and interpretation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of graph neural network technology, and more specifically, to a personalized educational resource recommendation method and system based on graph neural network. Background Art

[0002] In recent years, due to the information overload of network resources, users are prone to problems such as "information wandering". Recommendation systems play a vital role in helping users discover relevant information and products of interest.

[0003] The earliest recommendation algorithms based on collaborative filtering predicted user preferences by using matrix decomposition to mine user interests from historical interactions or latent factors. Since these algorithms tend to treat each interaction as an independent instance and ignore their interdependencies, they encounter major challenges in solving the cold start problem. Subsequently, algorithms based on deep learning integrated user history and context information, processing this information through multi-layer neural networks to obtain enhanced user representation.

[0004] However, these algorithms use a single embedding to represent users, which makes it difficult to capture the diversity of user interests. Moreover, each interacting user-item pair is usually regarded as an independent individual, while ignoring the complex connections between interacting items, resulting in limited performance improvements. Knowledge graph-based recommendations not only enhance the representation of users and items by introducing external knowledge, but also promote the exploration of fine-grained interest representations through additional semantic associations between items. The latest progress in this field proposes models based on graph neural networks that seamlessly integrate historical collaboration information and knowledge graphs into heterogeneous graphs, namely collaborative knowledge graphs. These models use information aggregation schemes to effectively integrate multi-hop neighbors into representations. By integrating connection modeling and representation learning, graph neural network-based models perform well in recommendations, which is also the current trend of technological development.

[0005] Despite such progress, knowledge graph recommendation models based on graph neural networks still have two shortcomings: (1) coarse-grained user representation, ignoring the diversity of interests. (2) Sparse supervision signals. Both historical interaction data and knowledge graphs have data sparsity, resulting in limited representation quality. In addition, this approach easily leads to node representation degradation and limited differentiation, that is, the differences between interests are not strong.

[0006] Therefore, how to solve the problem of insufficient accuracy and poor interpretability of educational resource recommendations due to deficiencies in user interest modeling and representation capabilities is a technical problem that needs to be solved urgently. Summary of the invention

[0007] In view of the defects of the prior art, the purpose of this application is to provide a personalized educational resource recommendation method based on graph neural network, aiming to solve the problems of insufficient accuracy and poor interpretability of educational resource recommendations.

[0008] To achieve the above objectives, this application provides a personalized educational resource recommendation method based on graph neural network, including:

[0009] extracting first coding information of the learner and second coding information of the learning resource from the coding information library;

[0010] Inputting the first encoding information and the second encoding information into the pre-trained multi-interest comparison graph attention network respectively, to obtain a first feature vector corresponding to the learner and a second feature vector corresponding to the learning resource;

[0011] Multiplying the first eigenvector and the second eigenvector to obtain the preference between the learner and the learning resource, and recommending educational resources based on the preference;

[0012] Among them, the multi-interest comparison graph attention network is obtained by taking the sample data of the learner's historical learning records and the sample data of the learning resources as training sets, and is trained based on the training sets. The multi-interest comparison graph attention network is used to utilize the learner's multiple interest information fusion and the attribute information of the learning resources to capture and understand the learner's interest preferences.

[0013] Optionally, the method for determining the coding information library includes:

[0014] Obtain the learner's historical learning records and a knowledge graph consisting of various associated information of learning resources;

[0015] Using embedding algorithms and relationship-aware embedding aggregation, the learning resources in the historical learning records are aligned with the learning resource entities in the knowledge graph to construct a collaborative knowledge graph;

[0016] The collaborative knowledge graph is encoded to establish the encoding information library.

[0017] Optionally, the training method of the multi-interest comparison graph attention network includes:

[0018] Build a pre-trained multi-interest comparison graph attention network and randomly initialize the network;

[0019] Inputting the training set into a pre-trained multi-interest comparison graph attention network to obtain the learner's predicted score for the learning resource;

[0020] The objective function is used to obtain the loss value of the predicted score and training label. With the goal of minimizing the objective function, the pre-trained multi-interest comparison image attention network is iteratively optimized and parameter updated using the gradient descent optimization algorithm until the model converges to obtain the trained multi-interest comparison image attention network.

[0021] Optionally, the method for constructing the objective function includes:

[0022] Determine a triple of the collaborative knowledge graph, the triple comprising a first embedding vector of a head entity, a second embedding vector of a tail entity, and a relationship embedding vector;

[0023] Establish a spatial projection matrix from entity embedding to relationship embedding according to the triples, determine a scoring function according to the spatial projection matrix, and construct a first loss function corresponding to the knowledge graph encoding according to the scoring function;

[0024] Using the graph enhancement technology of random edge loss, a second loss function corresponding to the contrastive learning of the collaborative knowledge graph is constructed;

[0025] Generate diverse interests according to the learner's historical learning records, generate interest representations with high discrimination based on the diverse interests, and construct a third loss function for multi-interest comparative learning according to the interest representations with high discrimination;

[0026] The objective function is constructed by combining the first loss function, the second loss function, and the third loss function with the set hyperparameters and norm regularization loss.

[0027] Optionally, it also includes:

[0028] Encoding collaborative knowledge graphs to achieve relation-aware embedding aggregation;

[0029] Determine an attention weight based on the mapped spatial projection matrix, the first embedding vector, the second embedding vector, and the relationship embedding vector, combine the attention weight with the hyperparameter of the relationship embedding vector and the second embedding vector, and obtain an embedding representation of the first-order connectivity structure of the head entity;

[0030] By aggregating multi-hop neighbors, the representations of each node in the collaborative knowledge graph calculated from order 0 to order l are summed to obtain the high-order embedding representation of each node, so as to obtain the high-order embedding representation of learners and learning resources.

[0031] Optionally, the method for constructing the first loss function specifically includes:

[0032] Solving the L2 norm according to the spatial projection matrix, the first embedding vector of the head entity, the second embedding vector of the tail entity, and the relationship embedding vector, obtaining a positive sample scoring function of the triple; the result of the scoring function represents the distance relationship between the head entity and the tail entity after the relationship effect;

[0033] Determine the negative sample corresponding to the tail entity, and determine the negative sample scoring function of the negative sample triplet, and determine the first loss function according to the positive sample scoring function, the negative sample scoring function and the sigmoid function of the regression logic.

[0034] Optionally, the method for constructing the second loss function specifically includes:

[0035] Determine the positive sample pairs of the same nodes and the negative sample pairs of different nodes of the collaborative knowledge graph;

[0036] The cosine similarity between the positive sample pair and the negative sample pair is obtained, and the cosine similarity is combined with a set temperature coefficient and all node sets to construct the second loss function.

[0037] Optionally, the method for constructing the third loss function specifically includes:

[0038] According to the historical learning records of different learners, determine the interest channel to which each learning resource studied by the target learner belongs;

[0039] Grouping the historical learning records so that behaviors in the same group share the same interest channel;

[0040] Calculate the weighted average of the interests of each group to obtain the embedding representation of the specific interests of the target learners;

[0041] Determine the cosine similarity between any two interest embeddings in the interest sequence represented by the embedding, and construct the third loss function based on the cosine similarity and the number of interests and the predefined boundary.

[0042] In a second aspect, the present application provides a personalized educational resource recommendation system based on a graph neural network, comprising:

[0043] An encoding module, used for extracting first encoding information of the learner and second encoding information of the learning resource from the encoding information library;

[0044] A vector generation module, used to input the first encoding information and the second encoding information into the pre-trained multi-interest comparison graph attention network respectively, to obtain a first feature vector corresponding to the learner and a second feature vector corresponding to the learning resource;

[0045] A recommendation module, configured to multiply the first feature vector and the second feature vector to obtain the preference between the learner and the learning resource, and recommend educational resources based on the preference;

[0046] Among them, the multi-interest comparison graph attention network is obtained by taking the sample data of the learner's historical learning records and the sample data of the learning resources as training sets, and is trained based on the training sets. The multi-interest comparison graph attention network is used to utilize the learner's multiple interest information fusion and the attribute information of the learning resources to capture and understand the learner's interest preferences.

[0047] In a third aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.

[0048] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0049] In a fifth aspect, the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0050] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0051] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the prior art:

[0052] (1) This application can directly integrate knowledge graph data and use the multi-interest comparison graph attention network model to estimate the characteristic values ​​of learners and learning resources to make recommendations directly. It efficiently utilizes various types of information and improves user satisfaction with recommendation results. It overcomes the problems of insufficient recommendation accuracy and poor interpretability in traditional recommendation methods, thereby improving the accuracy and interpretability of educational resource recommendations.

[0053] (2) This application extracts the learner's first coded information and the second coded information of the learning resource from the coded information library, which can better understand the learner's interest preferences and recommend resources that are more in line with their needs and interests; multiplying the learner's feature vector with the feature vector of the learning resource to calculate the preference degree can effectively capture the degree of match between the learner and the resource, and similarity-based recommendations make recommendations more accurate.

[0054] (3) This application trains the multi-interest comparison graph attention network through contrastive learning, which enables the model to be implemented in a higher-dimensional latent space, thereby obtaining a richer and more detailed interest representation, which can better distinguish different interests and avoid a single recommendation strategy. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is one of the flow diagrams of the personalized educational resource recommendation method based on graph neural network provided in the embodiment of the present application;

[0056] Figure 2 This is the second flow chart of the personalized educational resource recommendation method based on graph neural network provided in the embodiment of the present application;

[0057] Figure 3 This is the third flow chart of the personalized educational resource recommendation method based on graph neural network provided in the embodiment of the present application;

[0058] Figure 4 This is the fourth flow chart of the personalized educational resource recommendation method based on graph neural network provided in the embodiment of the present application;

[0059] Figure 5 It is a structural schematic diagram of a personalized educational resource recommendation device based on a graph neural network provided in an embodiment of the present application;

[0060] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.

[0063] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of the objects. For example, a first response message and a second response message are used to distinguish different response messages rather than to describe a specific order of the response messages.

[0064] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0065] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.

[0066] Next, the technical solutions provided in the embodiments of the present application are introduced.

[0067] Reference Figure 1 , the present application provides a personalized educational resource recommendation method based on graph neural network, comprising:

[0068] S101. Extract the learner's first encoding information and the second encoding information of the learning resource from the encoding information library;

[0069] S102. Input the first encoding information and the second encoding information into the pre-trained multi-interest comparison graph attention network respectively to obtain a first feature vector corresponding to the learner and a second feature vector corresponding to the learning resource;

[0070] S103. Multiply the first eigenvector and the second eigenvector to obtain the preference between the learner and the learning resource, and recommend educational resources based on the preference;

[0071] Among them, the multi-interest comparison graph attention network is obtained by taking the sample data of the learner's historical learning records and the sample data of the learning resources as training sets, and is trained based on the training sets. The multi-interest comparison graph attention network is used to utilize the learner's multiple interest information fusion and the attribute information of the learning resources to capture and understand the learner's interest preferences.

[0072] Specifically, first, the learner's first coded information and the second coded information of the learning resource are extracted from the coded information library. The first coded information of the learner usually includes the learner's personal information and historical learning records, etc. The second coded information of the learning resource includes the characteristics of the learning resource, such as content type, difficulty level, subject classification, etc.

[0073] Secondly, vector extraction is performed through the multi-interest contrast graph attention network. The network is pre-trained and trained on the learner's historical learning records and learning resource sample data. The feature vectors of the learner and the learning resource are extracted using the contrastive learning method. The structural design of the network enables it to distinguish different interest channels, thereby generating feature representations of multiple interests, enhancing the model's ability to capture the learner's diverse interests.

[0074] The first eigenvector of the learner is multiplied by the second eigenvector of the learning resource to obtain the preference. This operation can be regarded as calculating the inner product, which reflects the matching degree between the learner and the resource. A combination with a high preference indicates that the learner has a high adaptability to the resource, which can increase the accuracy and personalization of the recommendation.

[0075] Based on the calculated preference, the learning resources that best match the learners' preferences are recommended to them, so that the recommendation system can dynamically adjust the given resource list and respond to the learners' changes in interests and learning needs in a timely manner.

[0076] It should be noted that the multi-interest comparison graph attention network in the embodiment of the present application can help the model focus on more important features and information through the attention mechanism, and enhance the ability to recognize learners' interests and attitudes. By constructing positive and negative sample pairs, the model can better understand the similarities and differences between different interests, so that the feature vectors of learners and resources have better distinguishing ability in multidimensional space.

[0077] Optionally, the method for determining the coding information library includes:

[0078] Obtain the learner's historical learning records and a knowledge graph consisting of various associated information of learning resources;

[0079] Using embedding algorithms and relationship-aware embedding aggregation, the learning resources in the historical learning records are aligned with the learning resource entities in the knowledge graph to construct a collaborative knowledge graph;

[0080] The collaborative knowledge graph is encoded to establish the encoding information library.

[0081] Specifically, various types of information about learners and learning resources are aggregated, such as learners' historical learning behaviors, knowledge graphs composed of various related information of learning resources, etc. By aligning the learning resources in the historical learning behaviors with the learning resource entities in the knowledge graph, a collaborative knowledge graph is constructed, and the encoded information of learners and learning resources is extracted, and then a encoded information library is constructed.

[0082] It should be noted that the embodiment of the present application encodes high-dimensional and high-sparse data, that is, embedding algorithms. Among them, the learner's historical implicit feedback is the most common data in the recommendation system, and the application introduces it as a data source. In addition, the knowledge graph constructed by the information associated with the learning resources is used as the second data source, and a collaborative knowledge graph is constructed by aligning the learning resources in the historical learning records and the learning resource entities in the knowledge graph.

[0083] It should be further explained that the embedding algorithm in the embodiment of the present application converts the semantic information of the learning resources into a low-dimensional vector representation, through which the semantic relationship between resources can be maintained. In the alignment process, the historical interaction relationship between resources and learners is considered, and the accuracy of alignment is improved by relationship-aware embedding. After aligning the learner's historical learning records with the learning resource entities in the knowledge graph, a new collaborative knowledge graph is formed, focusing on the learner's learning process.

[0084] Furthermore, the constructed collaborative knowledge graph is further encoded to form an encoded information base. The encoding process usually includes: converting each node in the graph into a vector of fixed length, retaining the semantic information and its position in the graph. Extracting key features from the knowledge graph may include information such as node type and relationship type.

[0085] The resulting encoded information repository will integrate learners’ historical learning records, aligned learning resource entities, and corresponding feature vectors, so that subsequent processes can utilize these encoded information for efficient learning and reasoning.

[0086] Optionally, the training method of the multi-interest comparison graph attention network includes:

[0087] Build a pre-trained multi-interest comparison graph attention network and randomly initialize the network;

[0088] Inputting the training set into a pre-trained multi-interest comparison graph attention network to obtain the learner's predicted score for the learning resource;

[0089] The objective function is used to obtain the loss value of the predicted score and training label. With the goal of minimizing the objective function, the pre-trained multi-interest comparison image attention network is iteratively optimized and parameter updated using the gradient descent optimization algorithm until the model converges to obtain the trained multi-interest comparison image attention network.

[0090] Specifically, refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of the embedding algorithm of the embodiment of the present application. U (Iu i ,Θ U ) and F V (Ivj ,Θ V ) represent the feature vectors of learners and learning resources predicted by the graph attention network, respectively. and Respectively represent the encoding information of the corresponding learners and learning resources, Θ U With Θ V They represent the parameters in the graph attention network. U (·) and F V The form of (·) can be constructed according to the data type, such as graph convolutional networks, graph attention networks, contrastive learning, etc.

[0091] Reference Figure 3 , Figure 3 This is a schematic diagram of the attention network training of a multi-interest comparison graph in an embodiment of the present application.

[0092] Randomly initialize the parameters Ma, Mb and Mr of each layer; Ma, Mb and Mr represent the parameters of different layers in the model;

[0093] Randomly select samples of the corresponding batch from the samples; that is, randomly select a certain number of samples from the data set for training the model.

[0094] Use forward propagation to predict its output value;

[0095] The gradient values ​​of each parameter are calculated by reverse conduction based on the forward propagation value;

[0096] Perform gradient descent according to the gradient value of each parameter;

[0097] Check whether the mean square error (MSE) is less than the preset threshold ∈;

[0098] If the MSE is less than ∈, the multi-interest contrast graph attention network model is output;

[0099] If the MSE is not less than ∈, return to the step to predict its output value using forward propagation and continue the training process.

[0100] Optionally, the method for constructing the objective function includes:

[0101] Determine a triple of the collaborative knowledge graph, the triple comprising a first embedding vector of a head entity, a second embedding vector of a tail entity, and a relationship embedding vector;

[0102] Establish a spatial projection matrix from entity embedding to relationship embedding according to the triples, determine a scoring function according to the spatial projection matrix, and construct a first loss function corresponding to the knowledge graph encoding according to the scoring function;

[0103] Using the graph enhancement technology of random edge loss, a second loss function corresponding to the contrastive learning of the collaborative knowledge graph is constructed;

[0104] Generate diverse interests according to the learner's historical learning records, generate interest representations with high discrimination based on the diverse interests, and construct a third loss function for multi-interest comparative learning according to the interest representations with high discrimination;

[0105] The objective function is constructed by combining the first loss function, the second loss function, and the third loss function with the set hyperparameters and norm regularization loss.

[0106] Specifically, the embodiments of the present application provide a specific method for constructing an objective function.

[0107] Furthermore, the method for constructing the first loss function specifically includes:

[0108] Solving the L2 norm according to the spatial projection matrix, the first embedding vector of the head entity, the second embedding vector of the tail entity, and the relationship embedding vector, obtaining a positive sample scoring function of the triple; the result of the scoring function represents the distance relationship between the head entity and the tail entity after the relationship effect;

[0109] Determine the negative sample corresponding to the tail entity, and determine the negative sample scoring function of the negative sample triplet, and determine the first loss function according to the positive sample scoring function, the negative sample scoring function and the sigmoid function of the regression logic.

[0110] First, in the knowledge graph, each triple is composed of (head entity, relationship, tail entity), denoted as (h, r, t). This embodiment of the application uses the first embedding vector e h , the second embedding vector e t and the relation embedding vector e r To represent, where e h ,e t ∈R d , e r ∈R k (k and d represent dimensions, which are not necessarily the same, i.e. k≠d), And it is e h and e t Mapped to the spatial representation of the relation r, and then establish a spatial projection matrix M from entity embedding to relation embedding r ∈R k×d , the corresponding scoring function is defined as follows:

[0111]

[0112] in, is L2 norm regularization.

[0113] The lower the score of this scoring function, the closer the two entities holding relationship r are to t, and vice versa. The first loss function corresponding to the knowledge graph is:

[0114]

[0115] in, G is the knowledge graph corresponding to the learning resource, (h, r, t) is a positive sample pair, (h, r, t ′ ) is a negative sample pair obtained by randomly replacing the tail entity, g(h,r,t) is the positive sample scoring function, g(h,r,t ′ ) is the negative sample scoring function, and σ is the sigmoid function of regression logic.

[0116] To minimize t ′ The first loss function is the target, and the optimization algorithm such as gradient descent is used to optimize e h , e r With e t Perform iterative updates to obtain the final encoding result.

[0117] Optionally, it also includes:

[0118] Encoding collaborative knowledge graphs to achieve relation-aware embedding aggregation;

[0119] Determine an attention weight based on the mapped spatial projection matrix, the first embedding vector, the second embedding vector, and the relationship embedding vector, combine the attention weight with the hyperparameter of the relationship embedding vector and the second embedding vector, and obtain an embedding representation of the first-order connectivity structure of the head entity;

[0120] By aggregating multi-hop neighbors, the representations of each node in the collaborative knowledge graph calculated from order 0 to order l are summed to obtain the high-order embedding representation of each node, so as to obtain the high-order embedding representation of learners and learning resources.

[0121] Specifically, this embodiment encodes the collaborative knowledge graph, effectively integrates the relationships, and iteratively propagates these embeddings through high-order connections, thereby preserving the semantics of long-distance connections. In addition, by generating cascaded attention weights, the importance of connectivity is revealed. This module uses, for example, ego-network, graph convolutional network, and graph attention network to encode it, that is, relationship-aware embedding aggregation.

[0122] In order to characterize the first-order connectivity structure of entity h, the embodiment of the present application calculates the linear combination of h's ego network:

[0123]

[0124] Among them, π(h,r,t) represents the attention weight, which controls the attenuation factor of each propagation along the edge (,r,t), indicating the amount of information propagated from t according to the relationship r. λ is a hyperparameter that indicates the importance of the relationship.

[0125] Furthermore, π(h,r,t) is expressed as:

[0126]

[0127] Among them, M a ∈R (d+k)×d ,M b ∈R d×1 ,M r ∈R k×d are three mapping matrices.

[0128] Furthermore, by aggregating multi-hop neighbors, the representations of each node in the collaborative knowledge graph calculated from order 0 to order l are summed to obtain the high-order embedded representation of each node, and then the high-order embedded representation of learners and learning resources is obtained.

[0129] The embodiment of the present application aims to encode the collaborative knowledge graph to achieve relationship-aware embedding aggregation. First, the attention weight is determined by using the mapping matrix, the first embedding vector, the second embedding vector and the relationship embedding vector. This attention weight combines the hyperparameters of the relationship embedding vector and the second embedding vector to obtain the embedding representation of the first-order connectivity structure of the head entity. Furthermore, by aggregating the information of multi-hop neighbors, the embedding representations calculated from the 0th order to the lth order of each node in the collaborative knowledge graph can be summed to finally obtain a high-order embedding representation of each node. This process provides the necessary information basis for learners and learning resources to generate high-order embedding representations, thereby improving the performance of subsequent tasks such as recommendation and classification.

[0130] Furthermore, the method for constructing the second loss function specifically includes:

[0131] Determine the positive sample pairs of the same nodes and the negative sample pairs of different nodes of the collaborative knowledge graph;

[0132] The cosine similarity between the positive sample pair and the negative sample pair is obtained, and the cosine similarity is combined with a set temperature coefficient and all node sets to construct the second loss function.

[0133] Specifically, this embodiment uses the graph enhancement technology of random edge loss to generate a representation with strong expressive ability through the collaborative knowledge graph contrast learning module, and constructs the second loss function corresponding to contrast learning:

[0134]

[0135] Among them, different representations of the same node are as follows (Z h ,Z″ h ) is a positive sample pair, and the representations of different nodes (such as (Z h ,Z″ k ) is a negative sample pair. S(·) represents the cosine similarity, and τ is the temperature coefficient, which is a hyperparameter. It is the set of all nodes in the collaborative knowledge graph.

[0136] Furthermore, the method for constructing the third loss function specifically includes:

[0137] According to the historical learning records of different learners, determine the interest channel to which each learning resource studied by the target learner belongs;

[0138] Grouping the historical learning records so that behaviors in the same group share the same interest channel;

[0139] Calculate the weighted average of the interests of each group to obtain the embedding representation of the specific interests of the target learners;

[0140] Determine the cosine similarity between any two interest embeddings in the interest sequence represented by the embedding, and construct the third loss function based on the cosine similarity and the number of interests and the predefined boundary.

[0141] Specifically, the embodiment of the present application determines the interest channel to which each learning resource learned by learner u belongs based on the historical learning records of different learners. Then the learner's historical learning behaviors are grouped so that the behaviors in the same group share the same interest channel. Finally, the weighted average within the group is calculated to obtain the embedding of learner u's specific interest l, which is expressed as Generate diverse interests, and the interest sequence is expressed as follows:

[0142]

[0143] in, The vector representing the learning resource v learned by learner u is multiplied by the transpose of each interest vector to generate the maximum value in the weight. The interest with the maximum value is recorded as a certain interest implied by the learner learning the learning resource. v,l Used to indicate attention for each interest.

[0144] The generated multiple interests are used to generate interest representations with high discrimination, and the third loss function corresponding to multi-interest contrastive learning is constructed:

[0145]

[0146] Where m is the number of interests, ρ2∈[-1,1] is the predefined boundary, is the embedding of any two interests in the interest sequence of learner u, and S(·) calculates the cosine similarity between interest embeddings.

[0147] Finally, the final objective function is determined by combining the first loss function, the second loss function, and the third loss function as shown below:

[0148]

[0149] Among them, λ1, λ2, λ3, and λ4 are hyperparameters. is the norm regularization loss, and σ is the sigmoid function. Represents the similarity of all positive sample pairs, Represents the similarity of all negative sample pairs, O = {(u,i,j)|(u,i)∈O + ,(u,i)∈O -} is the observed interaction O + and unobserved interactions O - The training data set is composed of .

[0150] With the goal of minimizing the objective function, we use optimization algorithms such as gradient descent to optimize Θ U With Θ V Perform iterative updates to obtain the final trained multi-interest comparison graph attention network.

[0151] Reference Figure 4 , Figure 4 This is a complete flowchart of the personalized educational resource recommendation method based on graph neural network provided in the embodiment of the present application.

[0152] Data encoding module:

[0153] Learner historical learning records: collect learners’ past learning data.

[0154] Learning resource knowledge graph: constructs the relationships and structures between learning resources.

[0155] Embedding algorithm: Convert learners’ historical records and knowledge graphs of learning resources into numerical data.

[0156] Relation-aware embedding aggregation: The embedding data is further processed to capture the relationship between learners and learning resources.

[0157] Encoded information repository of learners and learning resources: stores encoded information of learners and learning resources.

[0158] Training Modules:

[0159] Encoded feature library of learners and learning resources: provides feature data required for training.

[0160] Learner historical learning records: Once again emphasize the role of historical records in training.

[0161] Multi-interest comparison graph attention network training: Trained using a specific neural network model to learn users’ interests and preferences.

[0162] Multi-Interest Comparative Graph Attention Network: A trained model to predict learning resources that learners may be interested in.

[0163] Recommended service process:

[0164] Request service: The user initiates a recommendation request.

[0165] Obtain the encoded information of learners and learning resources: extract relevant information from the database.

[0166] Multi-interest comparison graph attention network: using trained models for prediction.

[0167] Learner and learning resource feature vectors: Generate feature vectors of learners and resources.

[0168] Matching calculation: Calculate the matching degree between learners and resources.

[0169] Make a recommendation: If the matching degree meets the conditions, make a recommendation; otherwise, do not make a recommendation.

[0170] The service is over.

[0171] Reference Figure 5 , the present application provides a personalized educational resource recommendation system based on graph neural network, including:

[0172] An encoding module 510, used for extracting first encoding information of the learner and second encoding information of the learning resource from an encoding information library;

[0173] A vector generation module 520, configured to input the first encoding information and the second encoding information into a pre-trained multi-interest comparison graph attention network, respectively, to obtain a first feature vector corresponding to the learner and a second feature vector corresponding to the learning resource;

[0174] A recommendation module 530, configured to multiply the first feature vector and the second feature vector to obtain the preference between the learner and the learning resource, and recommend educational resources based on the preference;

[0175] Among them, the multi-interest comparison graph attention network is obtained by taking the sample data of the learner's historical learning records and the sample data of the learning resources as training sets, and is trained based on the training sets. The multi-interest comparison graph attention network is used to utilize the learner's multiple interest information fusion and the attribute information of the learning resources to capture and understand the learner's interest preferences.

[0176] Optionally, the method for determining the coding information library includes:

[0177] Obtain the learner's historical learning records and a knowledge graph consisting of various associated information of learning resources;

[0178] Using embedding algorithms and relationship-aware embedding aggregation, the learning resources in the historical learning records are aligned with the learning resource entities in the knowledge graph to construct a collaborative knowledge graph;

[0179] The collaborative knowledge graph is encoded to establish the encoding information library.

[0180] Optionally, the training method of the multi-interest comparison graph attention network includes:

[0181] Build a pre-trained multi-interest comparison graph attention network and randomly initialize the network;

[0182] Inputting the training set into a pre-trained multi-interest comparison graph attention network to obtain the learner's predicted score for the learning resource;

[0183] The objective function is used to obtain the loss value of the predicted score and training label. With the goal of minimizing the objective function, the pre-trained multi-interest comparison image attention network is iteratively optimized and parameter updated using the gradient descent optimization algorithm until the model converges to obtain the trained multi-interest comparison image attention network.

[0184] Optionally, the objective function construction system includes:

[0185] A knowledge graph encoding module, used to determine a triple of the collaborative knowledge graph, wherein the triple includes a first embedding vector of a head entity, a second embedding vector of a tail entity, and a relationship embedding vector;

[0186] Establish a spatial projection matrix from entity embedding to relationship embedding according to the triples, determine a scoring function according to the spatial projection matrix, and construct a first loss function corresponding to the knowledge graph encoding according to the scoring function;

[0187] An embedding representation module to encode collaborative knowledge graphs for relation-aware embedding aggregation;

[0188] Determine an attention weight based on the mapped spatial projection matrix, the first embedding vector, the second embedding vector, and the relationship embedding vector, combine the attention weight with the hyperparameter of the relationship embedding vector and the second embedding vector, and obtain an embedding representation of the first-order connectivity structure of the head entity;

[0189] The high-order embedding representation module is used to sum the representations of each node in the collaborative knowledge graph from the 0th order to the lth order by aggregating multi-hop neighbors to obtain the high-order embedding representation of each node, so as to obtain the high-order embedding representation of the learner and the learning resource;

[0190] A contrastive learning module, used to construct a second loss function corresponding to the contrastive learning of the collaborative knowledge graph using a graph enhancement technique with random edge loss;

[0191] A multi-interest contrast learning module, used to generate diverse interests according to the learner's historical learning records, generate interest representations with high discrimination based on the diverse interests, and construct a third loss function for multi-interest contrast learning according to the interest representations with high discrimination;

[0192] The function construction module is used to construct the objective function by combining the first loss function, the second loss function, and the third loss function with the set hyperparameters and norm regularization loss.

[0193] Optionally, the method for constructing the first loss function specifically includes:

[0194] Solving the L2 norm according to the spatial projection matrix, the first embedding vector of the head entity, the second embedding vector of the tail entity, and the relationship embedding vector, obtaining a positive sample scoring function of the triple; the result of the scoring function represents the distance relationship between the head entity and the tail entity after the relationship effect;

[0195] Determine the negative sample corresponding to the tail entity, and determine the negative sample scoring function of the negative sample triplet, and determine the first loss function according to the positive sample scoring function, the negative sample scoring function and the sigmoid function of the regression logic.

[0196] Optionally, the method for constructing the second loss function specifically includes:

[0197] Determine the positive sample pairs of the same nodes and the negative sample pairs of different nodes of the collaborative knowledge graph;

[0198] The cosine similarity between the positive sample pair and the negative sample pair is obtained, and the cosine similarity is combined with a set temperature coefficient and all node sets to construct the second loss function.

[0199] Optionally, the method for constructing the third loss function specifically includes:

[0200] According to the historical learning records of different learners, determine the interest channel to which each learning resource studied by the target learner belongs;

[0201] Grouping the historical learning records so that behaviors in the same group share the same interest channel;

[0202] Calculate the weighted average of the interests of each group to obtain the embedding representation of the specific interests of the target learners;

[0203] Determine the cosine similarity between any two interest embeddings in the interest sequence represented by the embedding, and construct the third loss function based on the cosine similarity and the number of interests and the predefined boundary.

[0204] It can be understood that the detailed functional implementation of each of the above-mentioned units / modules can be found in the introduction of the aforementioned method embodiment, and will not be repeated here.

[0205] It should be understood that the above-mentioned device is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program module in the device are similar to those described in the above-mentioned method. The working process of the device can refer to the corresponding process in the above-mentioned method, which will not be repeated here.

[0206] Reference Figure 6 Based on the method in the above embodiment, the embodiment of the present application provides an electronic device, which may include: a processor (processor) 610, a communication interface (CommunicationsInterface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call the logic instructions in the memory 630 to execute the method in the above embodiment.

[0207] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0208] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0209] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0210] It is understandable that the processor in the embodiment of the present application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor.

[0211] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0212] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0213] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0214] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A personalized educational resource recommendation method based on graph neural network, characterized in that: include: extracting first coding information of the learner and second coding information of the learning resource from the coding information library; Inputting the first encoding information and the second encoding information into the pre-trained multi-interest comparison graph attention network respectively, to obtain a first feature vector corresponding to the learner and a second feature vector corresponding to the learning resource; Multiplying the first eigenvector and the second eigenvector to obtain the preference between the learner and the learning resource, and recommending educational resources based on the preference; Among them, the multi-interest comparison graph attention network is obtained by taking the sample data of the learner's historical learning records and the sample data of the learning resources as training sets, and is trained based on the training sets. The multi-interest comparison graph attention network is used to utilize the learner's multiple interest information fusion and the attribute information of the learning resources to capture and understand the learner's interest preferences.

2. The personalized educational resource recommendation method according to claim 1, characterized in that: The method for determining the coding information library includes: Obtain the learner's historical learning records and a knowledge graph consisting of various associated information of learning resources; Using embedding algorithms and relationship-aware embedding aggregation, the learning resources in the historical learning records are aligned with the learning resource entities in the knowledge graph to construct a collaborative knowledge graph; The collaborative knowledge graph is encoded to establish the encoding information library.

3. The personalized educational resource recommendation method according to claim 2, characterized in that: The training method of the multi-interest comparison graph attention network includes: Build a pre-trained multi-interest comparison graph attention network and randomly initialize the network; Inputting the training set into a pre-trained multi-interest comparison graph attention network to obtain the learner's predicted score for the learning resource; The objective function is used to obtain the loss value of the predicted score and training label. With the goal of minimizing the objective function, the pre-trained multi-interest comparison image attention network is iteratively optimized and parameter updated using the gradient descent optimization algorithm until the model converges to obtain the trained multi-interest comparison image attention network.

4. The personalized educational resource recommendation method according to claim 3, characterized in that: The method for constructing the objective function includes: Determine a triple of the collaborative knowledge graph, the triple comprising a first embedding vector of a head entity, a second embedding vector of a tail entity, and a relationship embedding vector; Establish a spatial projection matrix from entity embedding to relationship embedding according to the triples, determine a scoring function according to the spatial projection matrix, and construct a first loss function corresponding to the knowledge graph encoding according to the scoring function; Using the graph enhancement technology of random edge loss, a second loss function corresponding to the contrastive learning of the collaborative knowledge graph is constructed; Generate diverse interests according to the learner's historical learning records, generate interest representations with high discrimination based on the diverse interests, and construct a third loss function for multi-interest comparative learning according to the interest representations with high discrimination; The objective function is constructed by combining the first loss function, the second loss function, and the third loss function with the set hyperparameters and norm regularization loss.

5. The personalized educational resource recommendation method according to claim 4, characterized in that: Also includes: Encoding collaborative knowledge graphs to achieve relation-aware embedding aggregation; Determine an attention weight based on the mapped spatial projection matrix, the first embedding vector, the second embedding vector, and the relationship embedding vector, combine the attention weight with the hyperparameter of the relationship embedding vector and the second embedding vector, and obtain an embedding representation of the first-order connectivity structure of the head entity; By aggregating multi-hop neighbors, the representations of each node in the collaborative knowledge graph calculated from order 0 to order l are summed to obtain the high-order embedding representation of each node, so as to obtain the high-order embedding representation of learners and learning resources.

6. The personalized educational resource recommendation method according to claim 4, characterized in that: The method for constructing the first loss function specifically includes: Solving the L2 norm according to the spatial projection matrix, the first embedding vector of the head entity, the second embedding vector of the tail entity, and the relationship embedding vector, obtaining a positive sample scoring function of the triple; the result of the scoring function represents the distance relationship between the head entity and the tail entity after the relationship effect; Determine the negative sample corresponding to the tail entity, and determine the negative sample scoring function of the negative sample triplet, and determine the first loss function according to the positive sample scoring function, the negative sample scoring function and the sigmoid function of the regression logic.

7. The personalized educational resource recommendation method according to claim 4, characterized in that: The method for constructing the second loss function specifically includes: Determine the positive sample pairs of the same nodes and the negative sample pairs of different nodes of the collaborative knowledge graph; The cosine similarity between the positive sample pair and the negative sample pair is obtained, and the cosine similarity is combined with a set temperature coefficient and all node sets to construct the second loss function.

8. The personalized educational resource recommendation method according to claim 4, characterized in that: The method for constructing the third loss function specifically includes: According to the historical learning records of different learners, determine the interest channel to which each learning resource studied by the target learner belongs; Grouping the historical learning records so that behaviors in the same group share the same interest channel; Calculate the weighted average of the interests of each group to obtain the embedding representation of the specific interests of the target learners; Determine the cosine similarity between any two interest embeddings in the interest sequence represented by the embedding, and construct the third loss function based on the cosine similarity and the number of interests and the predefined boundary.

9. A personalized educational resource recommendation system based on graph neural network, characterized in that: include: An encoding module, used for extracting first encoding information of the learner and second encoding information of the learning resource from the encoding information library; A vector generation module, used to input the first encoding information and the second encoding information into the pre-trained multi-interest comparison graph attention network respectively, to obtain a first feature vector corresponding to the learner and a second feature vector corresponding to the learning resource; A recommendation module, configured to multiply the first feature vector and the second feature vector to obtain the preference between the learner and the learning resource, and recommend educational resources based on the preference; Among them, the multi-interest comparison graph attention network is obtained by taking the sample data of the learner's historical learning records and the sample data of the learning resources as training sets, and is trained based on the training sets. The multi-interest comparison graph attention network is used to utilize the learner's multiple interest information fusion and the attribute information of the learning resources to capture and understand the learner's interest preferences.

10. An electronic device, characterized in that: include: at least one memory for storing a computer program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Knowledge guidance-based graph convolution interest contrast learning personalized recommendation method

    CN118551103A

Cited By

  • Cognitive diagnosis method and system based on heterogeneous relation graph embedding

    CN120543004A

  • Cognitive diagnosis method and system based on heterogeneous relation graph embedding

    CN120543004B

  • Educational resource recommendation method based on man-machine bidirectional interaction

    CN120929507A

  • Learning resource recommendation method, system and device, medium and product

    CN121256136A

  • Personalized educational resource recommendation method and system

    CN122064874A