A learning resource recommendation method based on knowledge attention and its application
By constructing a subject knowledge graph and learner preference graph, combined with a multi-layer perceptron model, the data sparse and cold start problems in learning resource recommendation are solved, and more accurate and stable learning resource recommendations are achieved.
Patent Information
- Application Number
- CN202210797413.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-07-08
AI Technical Summary
There are problems of sparse data and cold start in the existing learning resource recommendation methods. Traditional collaborative filtering methods are difficult to improve the accuracy and stability of recommendations. There are problems of unstable performance in the adaptation of learning resource.
By constructing a subject knowledge graph, calculating knowledge point feature vectors, using multi-channel convolutional neural networks and graph neural networks to capture entity relationships in higher-order subgraphs, combining learner preference graphs for learning resource recommendations, and using multi-layer perceptron models to output recommended results.
The accuracy and stability of learning resource recommendations are improved, and the adaptation accuracy and interpretability of learning resources are optimized using heterogeneity and multi-hop path information in the knowledge graph.
Smart Images

Figure CN115146166B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence education technology, and more specifically, to a learning resource recommendation method and application based on knowledge attention. Background Art
[0002] In the field of learning resource adaptation, as the number of learning resources for student teaching platforms increases, learners will also face the problem of information overload when choosing learning resources. How to select appropriate learning resources and adapt them is a major research issue in today's society.
[0003] Learning resource adaptation mainly faces two problems: the sparsity of interaction between learners and learning resource data, and the cold start problem encountered when new learners join the education platform and receive learning resource recommendations.
[0004] Traditional learning resource adaptation methods use collaborative filtering, which involves finding similar learners and recommending resources they have studied, or finding similar learning resources and recommending them to learners who have studied similar resources. However, collaborative filtering still suffers from issues such as data sparsity and cold start.
[0005] The existing technology also proposes to use auxiliary information to improve the accuracy of learning resource adaptation. The auxiliary information used includes: text information, learner attributes or learning resource attribute information. Knowledge graphs show great potential in improving the accuracy and interpretability of recommendations. The rich entity and relationship information in the knowledge graph can supplement the relationship modeling between learners and items. They not only reveal various associations between items, but can also be used to explain learners' preferences. Some methods enrich the interactions of multi-hop paths from learners to items to better describe the learner-item relationship. However, these methods have difficulty in obtaining high-quality paths and have various problems, such as unstable performance. Summary of the Invention
[0006] In response to at least one defect or improvement need in the prior art, the present invention provides a learning resource recommendation method and application based on knowledge attention, which can significantly improve the recommendation accuracy.
[0007] To achieve the above objectives, according to a first aspect of the present invention, a method for recommending learning resources based on knowledge attention is provided, comprising:
[0008] Obtain the learner's history question information, and build a subject knowledge graph based on the learner's history question information. In the subject knowledge graph, knowledge points are used as entities;
[0009] Calculate the feature vectors of the knowledge points in the history questions based on the text of the history questions and the subject knowledge graph, and screen out candidate learning resources by calculating the similarity between the feature vectors of the knowledge points and the feature vectors of the learning resources in the database;
[0010] Build a learning resource knowledge graph based on candidate learning resources, construct a high-order subgraph of the learning resource knowledge graph, use the attention mechanism to capture the relationship between entities in the high-order subgraph, and obtain the feature vector of each candidate learning resource;
[0011] Construct an interaction graph that uses preference information to describe the relationship between learners and candidate learning resources. The aggregated feature vectors of candidate learning resources are used as the learner's first-order neighbors in the interaction graph. By aggregating preference information, the learner's feature vector is obtained.
[0012] The learner's feature vector and the feature vector of the learner's candidate learning resources are input into the multi-layer perceptron model, and the learning resource recommendation results are output.
[0013] Furthermore, the step of calculating the feature vector of the knowledge points in the history questions includes the following steps:
[0014] Calculate the question text vector, the embedding vector of the entity corresponding to the question text in the knowledge graph, and the context vector of the corresponding entity. Use these three vectors as input data for three channels respectively, and input them into the convolutional neural network through multi-channel alignment to obtain the feature vector of the knowledge points in the history questions.
[0015] Furthermore, the calculation of the question text vector, the embedding vector of the entity corresponding to the question text in the knowledge graph, and the context vector of the corresponding entity includes:
[0016] Use word2vec to calculate the embedding vector of the title text itself;
[0017] Use CtransR to calculate the embedding vector of the entity corresponding to the question text in the knowledge graph;
[0018] Extract the neighboring node set of the entity corresponding to the title text in the knowledge graph, and calculate the context vector based on the neighboring node set.
[0019] Furthermore, the calculation formula of the context vector is:
[0020]
[0021] Among them, context(e) is the entity e corresponding to the title text in the knowledge graph i The set of neighboring nodes of For entity e i The context vector of .
[0022] Furthermore, constructing a high-order subgraph of the learning resource knowledge graph includes the following steps:
[0023] Calculate the distance between all pairs of entities in the learning resource knowledge graph, where any two entities constitute a pair of entities;
[0024] Only the K paths with the shortest distances and the entities corresponding to these K paths are retained.
[0025] Furthermore, the use of the attention mechanism to capture the relationship between entities in the high-order subgraph includes:
[0026] After obtaining the high-order subgraph, a graph neural network is used to embed the high-order subgraph to obtain the embedding vector of the entity in the high-order subgraph;
[0027] The hidden state of the entity is obtained through the relationship-aware aggregation mechanism and the attention aggregation mechanism, and the hidden state of the entity is updated through the update gate mechanism to obtain the embedding vector of the entity in the high-order subgraph;
[0028] After repeated aggregation, the feature vector of each learner's candidate learning resources is obtained.
[0029] Furthermore, the aggregated preference information includes:
[0030] Let the learning resource be i, the learner be u, the preference information be s, and the preference embedding vector be e. s ,
[0031]
[0032] R is the relationship set between learners and candidate learning resources, e r is the embedding of relation r, γ(s,u) is the attention score,
[0033] The calculation formula for aggregate preference information is:
[0034]
[0035] in, is the first-order representation of the learner u after t layers of aggregation, is the first-order representation of the learner u after t-1 layer aggregation, F is the aggregation function describing u, s, i, N u represents the preference and first-order connectivity around learner u, e s The representation of preference s, It is the representation of entity i after t-1 aggregations.
[0036] According to a second aspect of the present invention, a learning resource recommendation system based on knowledge attention is also provided, comprising:
[0037] The acquisition module is used to obtain the learner's history question information and build a subject knowledge graph based on the learner's history question information. The subject knowledge graph uses knowledge points as entities;
[0038] The similarity calculation module is used to calculate the feature vectors of the knowledge points in the history questions based on the text of the history questions and the subject knowledge graph, and to screen out candidate learning resources by calculating the similarity between the feature vectors of the knowledge points and the feature vectors of the learning resources in the database;
[0039] The candidate learning resource feature vector calculation module is used to construct a learning resource knowledge graph based on the candidate learning resources, construct a high-order subgraph of the learning resource knowledge graph, use the attention mechanism to capture the relationship between entities in the high-order subgraph, and obtain the feature vector of each candidate learning resource;
[0040] The learner feature vector calculation module is used to construct an interaction graph. In this interaction graph, preference information is used to describe the relationship between the learner and candidate learning resources. The aggregated feature vectors of the candidate learning resources are used as the learner's first-order neighbors in the interaction graph. By aggregating the preference information, the learner's feature vector is obtained.
[0041] The recommendation module is used to input the learner's feature vector and the feature vector of the learner's candidate learning resources into the multi-layer perceptron model and output the learning resource recommendation results.
[0042] According to the third aspect of the present invention, an electronic device is also provided, which includes at least one processor and at least one storage module, wherein the storage module stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of any one of the above methods.
[0043] According to a fourth aspect of the present invention, a storage medium is provided, which stores a computer program executable by a processor, and when the computer program runs on the processor, the processor executes the steps of any one of the above methods.
[0044] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0045] (1) By calculating the similarity between the feature vector of the knowledge point and the feature vector of the learning resource in the database, the candidate learning resources are screened out, and then the feature vector of each candidate learning resource and the feature vector of the learner are obtained respectively. The feature vector of the learner and the feature vector of the learner's candidate learning resource are input into the multi-layer perceptron model to improve the recommendation accuracy.
[0046] (2) Using the multi-channel convolutional neural network effect, we take advantage of the additional information in the knowledge graph to jointly learn the semantic and knowledge-level representations of geography test questions, making the recommended learning resources more accurate.
[0047] (3) Using the minimum distance sampling strategy helps to automatically mine high-order subgraphs that link learner-item pairs and reduce the excessive noise introduced when aggregating on the subgraph, thereby reducing the complexity of the model.
[0048] (4) The new attention graph neural network has the functions of relation-aware propagation and attention aggregation. By fully considering the heterogeneity of knowledge graphs, it helps to better embed the semantics of entities in learning subgraphs, and improves the accuracy, stability and effectiveness of learning resource adaptation.
[0049] (5) Use the learner preference graph and combine it with the relations in the knowledge graph to show more interpretable, relational path-aware aggregation, which integrates relation information from multi-hop paths to optimize the representation. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 A flowchart of a method for recommending learning resources based on knowledge attention provided in an embodiment of the present application;
[0052] Figure 2 A schematic diagram of knowledge point extraction provided in an embodiment of the present application;
[0053] Figure 3 A schematic diagram of a model for the propagation of perception relationships provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of the learner-preference-learning resource interaction provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0056] The terms "including" and "having," and any variations thereof, in the specification and claims of this application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to the process, method, product, or apparatus.
[0057] like Figure 1 As shown, the method for recommending learning resources based on knowledge attention according to an embodiment of the present invention includes steps S101 to S105.
[0058] Step 101: obtain the learner's history question information, and construct a subject knowledge graph based on the learner's history question information, with knowledge points as entities in the subject knowledge graph.
[0059] like Figure 2 As shown, students' performance information is obtained, including incorrect answers, homework exercises, and exam errors. This information is then organized using a four-step approach, including domain ontology construction, crowdsourcing semi-automatic semantic annotation, external data completion, and information extraction. This constructs a geography knowledge graph. The entities in the knowledge graph include test questions, the corresponding type of each question, and the knowledge points involved in each question and the logical relationships between them. A distance-based translation model is used to obtain the embedding of each entity in the subgraph, and then the embedding of the entity corresponding to each word in the test question.
[0060] Step 102 , calculate the knowledge point feature vector in the history question based on the text of the history question and the subject knowledge graph, and screen out candidate learning resources by calculating the similarity between the knowledge point feature vector and the feature vector of the learning resources in the database.
[0061] Furthermore, calculating the feature vectors of knowledge points in history questions includes the steps of calculating the question text vector, the embedding vector of the entity corresponding to the question text in the knowledge graph, and the context vector of the corresponding entity, and using the three vectors as input data of the three channels respectively, and inputting them into the convolutional neural network through multi-channel alignment to obtain the feature vectors of knowledge points in history questions.
[0062] Furthermore, step 102 includes steps 2.1 to 2.6.
[0063] Step 2.1, use word2vec to calculate the text embedding vector of the geography test itself: [w1,w2,.......,w n ].
[0064] Step 2.2, use CtransR to calculate the embedding vector of each entity in the knowledge graph: β(e1:n )=[β(e1),β(e2)......β(e n )].
[0065] Step 2.3, then extract additional contextual information for each entity. The “context” of entity e is defined as the set of its neighbors in the knowledge graph, i.e. context(e){e i |(e,r,e i )∈G}.
[0066] Where r is a relation and G is a knowledge graph. Since context entities are usually semantically and logically closely related to the current entity, the use of context can provide more complementary information and help improve the identifiability of entities. Given the context of entity e, the context embedding is calculated as the average of its context entities:
[0067]
[0068] in For entity e i The context vector of .
[0069] For example, the learning platform records learners' historical wrong answers. For example, if a learner incorrectly answers a question containing the keyword "alternating control of the subtropical high-pressure belt and the westerly wind belt," word2vec is used to obtain its text embedding. In the geography knowledge graph, in addition to the question itself, its type relationship corresponds to tropical rainforest climate, its distribution pattern relationship corresponds to low-pressure areas on both sides of the equator, its basic characteristics relationship corresponds to no seasonal variation, and its main cause relationship corresponds to polytropical rain. CtransR pre-training is used to obtain embedding vectors for all entities, and then the contextual information of the geography question is considered, namely, the first-order neighbors surrounding the geography question.
[0070] After obtaining the vectors of words and corresponding entities in the geography test, the entity vector and entity context vector are mapped into a vector space: β(e 1:n )=[β(e1),β(e2)......β(e n )], Where β(e 1:n ) is an entity vector, is the entity context vector. The mapping method uses nonlinear transformation tanh.
[0071] Step 2.4, after obtaining the mapped vectors, use the two vectors as additional channels for the geography test title word vector:
[0072]
[0073] Step 2.5, after obtaining the multi-channel input W, similar to the convolutional neural network, apply multiple filters h∈R with different window sizes l d×l×3 , used to extract specific local patterns in geography test questions. Submatrix W i:i+l-1 The local activation relative to h can be written as:
[0074]
[0075] Where l is the filter window size, h is the convolution kernel, and W i:i+l-1 is a submatrix of W. A max pooling operation is used on the output feature map to select the largest feature: All features are connected together as the final representation of the input geography test knowledge point t Where m is the number of convolution kernels.
[0076] Step 2.6: Calculate the similarity between the knowledge point vector features and the vector features of the candidate resources in the database to obtain the candidate learning resources that the learner may need:
[0077]
[0078] Where ρ is the Pearson correlation coefficient, which varies between -1 and 1. A larger absolute value indicates a stronger linear correlation. c(t) is the feature vector of the geography test knowledge point, and d(t) is the embedding vector of the learning resource. Learning resources with higher similarity are more likely to be recommended. cov(c(t), d(t)) represents the covariance between c(t) and d(t).
[0079] S103, constructing a learning resource knowledge graph based on the candidate learning resources, constructing a high-order subgraph of the learning resource knowledge graph, using an attention mechanism to capture the relationship between entities in the high-order subgraph, and obtaining a feature vector for each candidate learning resource.
[0080] Furthermore, constructing a high-order subgraph of the learning resource knowledge graph includes the following steps: calculating the distances between all pairs of paths between entities in the learning resource knowledge graph, where any two entities constitute a pair of entities; and retaining only the K paths with the shortest distances and the entities corresponding to the K paths.
[0081] Furthermore, the use of the attention mechanism to capture the relationship between entities in the high-order subgraph includes: after obtaining the high-order subgraph, using a graph neural network to embed the high-order subgraph to obtain the embedding vector of the entity in the high-order subgraph; obtaining the hidden state of the entity through the relationship-aware aggregation mechanism and the attention aggregation mechanism, updating the hidden state of the entity through the update gate mechanism to obtain the embedding vector of the entity in the high-order subgraph; after repeating multiple aggregations, the feature vector of each learner's candidate learning resource is obtained.
[0082] Furthermore, step S103 includes sub-steps 3.1 to 3.6.
[0083] Step 3.1, determine the learning resource knowledge graph, such as Figure 3 As shown in Figure 5, in order to reduce the introduction of excessive noise when performing aggregation passes on the entire knowledge graph, a minimum distance sampling strategy is used, which converts the time-consuming subgraph mining into significant path sampling, and then reconstructs the subgraph by combining all sampled paths between learner-item pairs.
[0084] All entities are projected into Euclidean space as embeddings, and their distances are measured using the Euclidean distance of their corresponding embeddings, which obeys the triangle inequality. Simultaneously, the present invention pre-trains the embeddings of entities in the knowledge graph using ANALOGY. This allows the present invention to compute the pairwise distances between any two consecutive entities on a path and sum all these distances to form the distance of the entire path. Finally, only the K paths with the shortest distances are retained to construct a high-order subgraph.
[0085] In step 3.2, after obtaining the high-order subgraph, a graph neural network is used to embed the subgraph.
[0086] In order to emphasize the different weights of neighbors, an attention mechanism is added, which mainly includes relationship-aware aggregation and attention aggregation.
[0087] like Figure 3 As shown, the input is the constructed high-order subgraph G and the corresponding adjacency matrix A, and each entity in the graph is spliced with its corresponding type. The embedding of the entity is e h , record the entity type embedding as e′ h , then directly splice: f(x)=σ(W1x+b), W1, b are the transformation matrix and bias respectively. Represents a concatenation operation. used to initialize its hidden state e at propagation step t=0 h Type enhancement embedding, equivalent to entity e h The initial embedding vector
[0088] Step 3.3, such as Figure 3 As shown, relation-aware aggregation is similar to the idea of propagation. Given This paper updates embeddings by propagating and aggregating information about neighbors. In a knowledge graph, an entity can be connected to multiple neighbors through various relationships, representing different semantics. The rich semantics encoded in the relationships are crucial. Therefore, a relation-aware propagation is proposed to explicitly fuse heterogeneous relationships in the knowledge graph for better embedding learning. We denote the target entity e h With its neighbors mand the relationship between them h, , which is used to enhance its neighbor e m The hidden state is achieved by:
[0089] For the current entity h, consider its neighbor m and the other r h, Indicates the relationship between the two. At this point, the initial entity e has been obtained through the previous mapping h The hidden state For a specific aggregation order t, To calculate
[0090]
[0091] in It is entity e m The hidden state in t during the propagation step, r m,m ∈R d″′ is r h,m d″ is the embedding size, g(x)=σ(W2x+b), where N h It is entity e h Output It is relationship perception m The hidden state of the neighbor e m To entity e h The information transmitted is compressed into their relations r h,m , which are then aggregated to update the embedding of the target entity eh. In summary, relation-aware propagation can better exploit the heterogeneity in knowledge graphs.
[0092] Step 3.4: Attention aggregation uses the attention mechanism to assign weights and aggregate all neighbor entity embeddings of entity eh. The hidden state of entity eh combined with the attention mechanism is obtained and recorded as
[0093]
[0094] Here A sh is the corresponding adjacency matrix, is the attention weight matrix, |ε s | is the set of all nodes in the subgraph, ⊙ represents the Hadamard product, From formula 5, m=|ε s The situation of t-1 calculated at time | is the set of hidden states of all neighbors. is with e h Related A s The row vector represents the connection between the entity and all nodes in the knowledge graph subgraph. is the attention weight vector used to distinguish local neighbors from entity e h impact.
[0095] This section introduces How to calculate the weight matrix, The attention weight matrix itself is used to measure the entity e h The importance of different neighbors e to entity h. The principle here is the same as the attention mechanism, using a two-layer fully connected layer for calculation and finally normalized by softmax.
[0096]
[0097] It constitutes the attention weight matrix
[0098] is a neighbor entity e m For e h The attention score at step t, yes The final attention weight obtained after softmax normalization is represented by e m For e h Attention score.
[0099] Using the above Update entity e through the update window mechanism h The embedding of
[0100] In step 3.5, we update the embedding of the target entity through the update gate mechanism to better control the information. Two gates are used to regulate the flow of information:
[0101]
[0102]
[0103] in They are responsible for updating the gate and resetting the gate respectively, and σ is the tanh function. r , W z , U r , U z is the weighting matrix. is the input feature e h The hidden state of yes The intermediate representation obtained after t-1 aggregations.
[0104]
[0105] Where Wl , U l is the coefficient matrix, Controlling the amount of information from the previous hidden state at last:
[0106]
[0107] It is the initial embedding of the initial entity eh The representation obtained after t aggregations. By recursively aggregating information from neighbors. After the iterative propagation step, the final hidden state fuses the information of the entity and its neighbors until the jump, which is used as the entity embedding of the learned resource.
[0108] Step 3.6: After the entity i is aggregated n times, the representation vector group of the learning resource after n aggregations is obtained. Add the learning resource embedding vectors separately to get the final learning resource feature vector:
[0109] in is the initial vector of entity ei, is the learning resource embedding vector after the nth aggregation.
[0110] S104, constructing an interaction graph, in which preference information is used to describe the relationship between the learner and the candidate learning resources, and the feature vectors of the aggregated candidate learning resources are used as the first-order neighbors of the learner in the interaction graph. By aggregating the preference information, the feature vector of the learner is obtained.
[0111] The learner-preference-learning resource interaction graph is constructed through candidate learning resources. In the graph, u is the learner, i is the learning resource, and s is the learner preference. Multiple potential preferences are used to describe the relationship between learners and learning resources, and each preference is expressed as a combination of relationships in the knowledge graph. Figure 4 Each preference shown assigns different weights to different relationships. Each one takes the initial learner u and the learning resource i aggregated in step 3 as the first-order neighbors of u, and aggregates the preference information on the entire preference graph to obtain the final embedding of learner u.
[0112] Assume S is the set of preferences shared by all learners, u is a learner in this invention, and i is a learning resource in this invention. This invention partitions the unified learner relationship into |S| preferences and decomposes each (u, i) pair into {(u, s, i)s∈|S|}. Thus, this invention reorganizes learner and learning resource data into a heterogeneous graph, called the learner preference graph.
[0113] Furthermore, S104 includes sub-steps 4.1 to 4.4.
[0114] Step 4.1: Considering the impact of different preferences S on learners, the present invention introduces an attention strategy to create preference embedding:
[0115] where e r is the embedding of relation r, R is the set of relations between the learner and the candidate learning resources, and γ(s,u) is the attention score used to quantify its importance to the learner, in the form of:
[0116]
[0117] where ω rs It is a trainable weight matrix, which is a trainable weight specific to a specific relationship r and a specific preference s.
[0118] Step 4.2: Modeling the independence of preferences. Different preferences should be independent of each other. Independent preferences can provide different information describing a learner's behavior, guiding the learned preference embedding vectors to be as independent as possible. Mutual information can be used as a regularization term.
[0119] Mutual Information: Reduce the mutual information value of any two different preferences (the smaller the value, the less mutual embedding of the two preferences, and the more independent they are). The calculation formula is:
[0120]
[0121] Where g(·) is a function that measures the correlation between any two preferences, here set to the cosine similarity function, and σ is a hyperparameter in the softmax function. The smaller the training mutual information, the more different the two preferences are, and the more independent they are.
[0122] In step 4.3, after modeling the learner's preferences, the present invention proceeds to learn learner and item representations within the framework of graph neural networks. The neighborhood aggregation scheme is an end-to-end method that integrates multi-hop neighbors into the representation. More specifically, the representation vector of the ego node is computed by recursively aggregating and transforming the representations of its multi-hop neighbors.
[0123] Integrate preference-aware information from learning resources to create a representation of learner u:
[0124] in is the first-order representation of the learner u after t-layer aggregation; F is the aggregation function describing u, s, i, N u represents the preference and first-order connectivity around learner u, e s The representation of preference s, It is the representation of entity i after t-1 aggregations.
[0125] The present invention designs the aggregation function F here as:
[0126]
[0127] in is the embedding of item i, ⊙ is the Hadamard product. Each preference should have a different driving force, so an attention score π(s, u) is designed to distinguish the importance of each preference. The calculation formula of π(s, u) is: in is the initial embedding vector of learner u.
[0128] Step 4.5, finally embed the learner after entity u is aggregated n times into a vector group Finally, the learner vectors are added together to get the final learner feature vector:
[0129] S105: Input the learner's feature vector and the feature vector of the learner's candidate learning resource into a multi-layer perceptron model, and output a learning resource recommendation result.
[0130] After n-1 aggregations, the learner and learning resource feature vectors store the relationship information from n-1 hop neighbors, and all embedding vectors store the overall semantics of the multi-hop path. Suppose there is a path The present invention marks the paths as (r1, r2, ..., r n ).
[0131] The recommendation model is used to predict the target learners' preference for various learning resources and adapt the learning resources with a preference greater than a preset value to the target learners.
[0132] After the t layer Put it into the MLP layer for prediction:
[0133]
[0134] ReLU is used as the activation function of the hidden layer, and sigmoid function is used as the output layer to convert the estimated scores Controlled in the range of [0, 1].
[0135] Finally, the BPR loss function is used for optimization:
[0136]
[0137] in, represents the prediction score, Expressed as observation fraction, O = {(u, i, j)|(u, i)∈O + , (u, j)∈O-} is the training set, O + is a positive sample, O - is a negative sample, σ(·) represents the sigmoid function, and the independent loss is and The final loss function is as follows:
[0138]
[0139] where Θ represents the parameters in the model.
[0140] Finally, the learning platform will recommend the learning resources needed by the learners to the learners, and the learners will conduct personalized learning based on the learning path.
[0141] A learning resource recommendation system based on knowledge attention according to an embodiment of the present invention includes:
[0142] The acquisition module is used to obtain the learner's history question information and build a subject knowledge graph based on the learner's history question information. The subject knowledge graph uses knowledge points as entities;
[0143] The similarity calculation module is used to calculate the feature vectors of the knowledge points in the history questions based on the text of the history questions and the subject knowledge graph, and to screen out candidate learning resources by calculating the similarity between the feature vectors of the knowledge points and the feature vectors of the learning resources in the database;
[0144] The candidate learning resource feature vector calculation module is used to construct a learning resource knowledge graph based on the candidate learning resources, construct a high-order subgraph of the learning resource knowledge graph, use the attention mechanism to capture the relationship between entities in the high-order subgraph, and obtain the feature vector of each candidate learning resource;
[0145] The learner feature vector calculation module is used to construct an interaction graph. In this interaction graph, preference information is used to describe the relationship between the learner and candidate learning resources. The aggregated feature vectors of the candidate learning resources are used as the learner's first-order neighbors in the interaction graph. By aggregating the preference information, the learner's feature vector is obtained.
[0146] The recommendation module is used to input the learner's feature vector and the feature vector of the learner's candidate learning resources into the multi-layer perceptron model and output the learning resource recommendation results.
[0147] The implementation principle and technical effects of the system are similar to the above method and will not be repeated here.
[0148] This embodiment also provides an electronic device, which includes at least one processor and at least one memory, wherein a computer program is stored in the memory. When the computer program is executed by the processor, the processor executes any step of the above-mentioned knowledge attention-based learning resource recommendation method. For specific steps, please refer to the method embodiment and will not be repeated here. In this embodiment, the types of processor and memory are not specifically limited. For example, the processor can be a microprocessor, a digital information processor, an on-chip programmable logic system, etc.; the memory can be a volatile memory, a non-volatile memory, or a combination thereof.
[0149] The present application also provides a storage medium storing a computer program executable by a processor, which, when executed on the processor, causes the processor to execute any one of the steps of the above-mentioned method for recommending learning resources based on knowledge attention. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0150] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0151] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0152] In the several embodiments provided in this application, it should be understood that the disclosed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of the system or module can be electrical or other forms.
[0153] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of the present embodiment according to actual needs.
[0154] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.
[0155] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0156] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0157] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure herein, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art that are not recorded in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
[0158] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0159] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A learning resource recommendation method based on knowledge attention, characterized in that: include: Obtain the learner's history question information, and build a subject knowledge graph based on the learner's history question information. In the subject knowledge graph, knowledge points are used as entities; Calculate the feature vectors of the knowledge points in the history questions based on the text of the history questions and the subject knowledge graph, and screen out candidate learning resources by calculating the similarity between the feature vectors of the knowledge points and the feature vectors of the learning resources in the database; Build a learning resource knowledge graph based on candidate learning resources, construct a high-order subgraph of the learning resource knowledge graph, use the attention mechanism to capture the relationship between entities in the high-order subgraph, and obtain the feature vector of each candidate learning resource; Construct an interaction graph that uses preference information to describe the relationship between learners and candidate learning resources. The aggregated feature vectors of candidate learning resources are used as the learner's first-order neighbors in the interaction graph. By aggregating preference information, the learner's feature vector is obtained. The learner's feature vector and the feature vector of the learner's candidate learning resources are input into the multi-layer perceptron model, and the learning resource recommendation results are output.
2. The learning resource recommendation method according to claim 1, characterized in that: The method of calculating the knowledge point feature vector in the history question includes the steps of: Calculate the question text vector, the embedding vector of the entity corresponding to the question text in the knowledge graph, and the context vector of the corresponding entity. Use these three vectors as input data for three channels respectively, and input them into the convolutional neural network through multi-channel alignment to obtain the feature vector of the knowledge points in the history questions.
3. The learning resource recommendation method according to claim 2, characterized in that: The calculation of the title text vector, the embedding vector of the entity corresponding to the title text in the knowledge graph, and the context vector of the corresponding entity includes: Use word2vec to calculate the embedding vector of the title text itself; Use CtransR to calculate the embedding vector of the entity corresponding to the question text in the knowledge graph; Extract the neighboring node set of the entity corresponding to the title text in the knowledge graph, and calculate the context vector based on the neighboring node set.
4. The learning resource recommendation method according to claim 3, characterized in that: The calculation formula of the context vector is: Among them, context(e) is the entity e corresponding to the title text in the knowledge graph i The set of neighboring nodes of For entity e i The context vector of .
5. The learning resource recommendation method according to claim 1, characterized in that: Constructing a high-level subgraph of the learning resource knowledge graph includes the following steps: Calculate the distance between all pairs of entities in the learning resource knowledge graph, where any two entities constitute a pair of entities; Only the K paths with the shortest distances and the entities corresponding to these K paths are retained.
6. The learning resource recommendation method according to claim 1, characterized in that: The use of the attention mechanism to capture the relationship between entities in the high-order subgraph includes: After obtaining the high-order subgraph, a graph neural network is used to embed the high-order subgraph to obtain the embedding vector of the entity in the high-order subgraph; The hidden state of the entity is obtained through the relationship-aware aggregation mechanism and the attention aggregation mechanism, and the hidden state of the entity is updated through the update gate mechanism to obtain the embedding vector of the entity in the high-order subgraph; After repeated aggregation, the feature vector of each learner's candidate learning resources is obtained.
7. The learning resource recommendation method according to claim 1, characterized in that: The aggregated preference information includes: Let the learning resource be i, the learner be u, the preference information be s, and the preference embedding vector be e. s , R is the relationship set between learners and candidate learning resources, e r is the embedding of relation r, γ(s,u) is the attention score, The calculation formula for aggregate preference information is: in, is the first-order representation of the learner u after t layers of aggregation, is the first-order representation of the learner u after t-1 layer aggregation, F is the aggregation function describing u, s, i, N u represents the preference and first-order connectivity around learner u, e s The representation of preference s, It is the representation of entity i after t-1 aggregations.
8. A learning resource recommendation system based on knowledge attention, characterized in that: include: The acquisition module is used to obtain the learner's history question information and build a subject knowledge graph based on the learner's history question information. The subject knowledge graph uses knowledge points as entities; The similarity calculation module is used to calculate the feature vectors of the knowledge points in the history questions based on the text of the history questions and the subject knowledge graph, and to screen out candidate learning resources by calculating the similarity between the feature vectors of the knowledge points and the feature vectors of the learning resources in the database; The candidate learning resource feature vector calculation module is used to construct a learning resource knowledge graph based on the candidate learning resources, construct a high-order subgraph of the learning resource knowledge graph, use the attention mechanism to capture the relationship between entities in the high-order subgraph, and obtain the feature vector of each candidate learning resource; The learner feature vector calculation module is used to construct an interaction graph. In this interaction graph, preference information is used to describe the relationship between the learner and candidate learning resources. The aggregated feature vectors of the candidate learning resources are used as the learner's first-order neighbors in the interaction graph. By aggregating the preference information, the learner's feature vector is obtained. The recommendation module is used to input the learner's feature vector and the feature vector of the learner's candidate learning resources into the multi-layer perceptron model and output the learning resource recommendation results.
9. An electronic device, characterized in that: The method comprises at least one processor and at least one storage module, wherein the storage module stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The device stores a computer program, which, when executed on a processor, enables the processor to execute the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Teaching method and system based on cross-media dynamic knowledge graph
CN111753098A
Collaborative recommendation model construction method based on knowledge graph preference propagation
CN113158033A