Knowledge Graph-Based Online Community Learning Path Recommendation Methods, Systems, and Devices
By constructing a multidimensional model based on knowledge graphs and combining user knowledge background with post semantic similarity, the redundancy and dependency ignoring problems in learning path recommendation in online communities are solved, and fine-grained and multi-context-aware personalized learning path recommendation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2026-03-10
AI Technical Summary
Existing online community learning path recommendation systems tend to collect redundant or irrelevant learning objects when generating customized learning paths, ignore potential dependencies between learning objects, and fail to fully utilize the hierarchy of knowledge graphs and the semantic similarity of posts among learners.
We construct a multi-dimensional model based on knowledge graphs. Through a three-layer entity model of "course - topic - knowledge point", combined with user knowledge background and multi-context awareness, we use knowledge graphs to query relevant knowledge entities, integrate the semantic similarity of user posts, and recommend fine-grained and multi-context awareness learning paths.
It enables personalized learning path recommendations, meeting the diverse learning needs of users in the online community and improving the accuracy of learning paths and the effectiveness of personalized guidance.
Smart Images

Figure CN115238199B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of text data mining technology, and relates to a method, system and device for recommending learning paths in online communities based on knowledge graphs, and more particularly to a method, system and device for recommending learning paths in online communities with fine-grained and multi-context awareness based on knowledge graphs. Background Technology
[0002] With the rapid development of new-generation information technologies such as the Internet, online communities have gradually emerged and have had a profound impact on life and learning. Within online communities, learning path recommendation systems have evolved alongside advancements in machine learning algorithms and big data technologies. These recommendation systems have been proven effective in improving learners' performance and knowledge acquisition.
[0003] Existing research focuses on generating high-quality, customized learning paths to meet learners' needs, guiding them by organizing fragmented learning content within these paths. Cluster-based learning path generation methods often collect redundant or irrelevant learning objects, ignoring potential dependencies between them and typically only establishing simple relationships to link them. Knowledge graphs, however, can leverage these dependencies to apply to learning path recommendation methods. Summary of the Invention
[0004] To address the aforementioned technical challenges, this invention designs an innovative multidimensional knowledge graph that ranks recommendation results from both horizontal and vertical perspectives, taking into account the user's knowledge background. This provides users with fine-grained and context-aware personalized learning paths. Furthermore, it proposes a method, system, and device for recommending fine-grained and context-aware learning paths in online communities based on knowledge graphs. By leveraging the knowledge graph to query relevant knowledge entities, fine-grained parsing of user posts in the online community, and modeling the user's knowledge background, the invention optimizes learning path recommendations to meet the diverse learning needs of users in the online community.
[0005] The technical solution adopted by the method of the present invention is: an online community learning path recommendation method based on knowledge graph, comprising the following steps:
[0006] Step 1: Construct a knowledge graph model with three layers of entities: "Course - Topic - Knowledge Point";
[0007] Based on the teaching units and their teaching sequence of the course content data, the course content data is divided into different themes, and the knowledge points and their levels contained in each theme are determined.
[0008] Construct a knowledge ontology, where ontology = classes + relations + functions + axioms + instances. Classes describe actual concepts within a domain; they can be real things or abstract concepts. Relations describe relationships between classes, including the relationship P between a part and the whole, the relationship K between a parent class and a child class, the relationship I between an instance of a class and a class, and the attribute A that a class is an attribute of another class. Functions are a special type of relation where the first n-1 elements uniquely determine the nth element. Axioms represent facts existing within the ontology and are used to constrain classes or relations within the ontology. Instances represent the actual existence of a specific class.
[0009] Knowledge extraction includes entity extraction, relation extraction, and attribute extraction. It extracts the required named entities from natural text, mines the semantic information between entities, and extracts targeted attribute descriptions based on knowledge characteristics. Each course entity C and topic entity T can be represented as: C / T = {T*, D, N, Date*}; where * indicates that the attribute value cannot be empty, T* is the title, the name of the entity; D is the description, the explanation and description of the knowledge content explained for the defined entity; N is the sequence number, the order in which the entity is taught; and Date* is the time, the time the entity was added. The internal and external relationships of courses, topics, and knowledge points are represented in the form of triplets G = {(h, r, t) | h, t ∈ ε, r ∈ R}, where h represents the head entity, t represents the tail entity, r represents the relationship between the head and tail entities, ε represents the entity set, and R represents the relation set.
[0010] Knowledge representation: Based on the needs of course content and theme, each knowledge point entity K is represented as K = {T*, C*, O, D, P = {P1, P2, ..., Pn}; where C* is the category, the type of the entity, with a value of 1 representing basic knowledge, a value of 2 representing intermediate knowledge, and a value of 3 representing advanced knowledge; O represents the alias of the knowledge point; P represents the unique characteristic attribute of the knowledge point belonging to category K, and Pi represents a certain characteristic attribute. For different knowledge points, the number and types of Pi also change accordingly, 1 ≤ i ≤ n;
[0011] Knowledge fusion, the fusion of entities or attributes, adopts the relevance clustering method, as shown below:
[0012] min∑r xy (1-sim xy )+(1-r xy )sim xy ;
[0013] Where x and y represent entities or attributes, r xy This indicates that x and y are assigned to the same class, sim xyThis represents the probability that x and y belong to the same class. The goal is to find a clustering scheme with minimal cost.
[0014] Step 2: Obtain the current and historical post records of users in the online community and perform data preprocessing;
[0015] Step 3: Construct a multi-level text similarity function based on corpus and core phrases, define a threshold, and horizontally measure the semantic similarity between user posts in the online community to find user groups with similar knowledge levels to the current user;
[0016] Step 4: Identify the only user with a similar knowledge level to the current user based on their background knowledge, obtain their learning path, and make recommendations accordingly;
[0017] Step 5: If the learning path is missing, vertically recommend users at a higher level of the current topic knowledge point using the knowledge graph;
[0018] Step 6: Identify a unique user with a higher level of knowledge based on the user's background knowledge, and recommend that user's posts to the current user;
[0019] Step 7: If the online community user's knowledge level is at the highest level, no recommendation is needed, and the learner can continue learning.
[0020] The technical solution adopted by the system of this invention is: an online community learning path recommendation system based on knowledge graphs, comprising the following modules:
[0021] Module 1 is used to construct a knowledge graph model of three entities: "course - topic - knowledge point".
[0022] Based on the teaching units and their teaching sequence of the course content data, the course content data is divided into different themes, and the knowledge points and their levels contained in each theme are determined.
[0023] Construct a knowledge ontology, where ontology = classes + relations + functions + axioms + instances. Classes describe actual concepts within a domain; they can be real things or abstract concepts. Relations describe relationships between classes, including the relationship P between a part and the whole, the relationship K between a parent class and a child class, the relationship I between an instance of a class and a class, and the attribute A that a class is an attribute of another class. Functions are a special type of relation where the first n-1 elements uniquely determine the nth element. Axioms represent facts existing within the ontology and are used to constrain classes or relations within the ontology. Instances represent the actual existence of a specific class.
[0024] Knowledge extraction includes entity extraction, relation extraction, and attribute extraction. It extracts the required named entities from natural text, mines the semantic information between entities, and extracts targeted attribute descriptions based on knowledge characteristics. Each course entity C and topic entity T can be represented as: C / T = {T*, D, N, Date*}; where * indicates that the attribute value cannot be empty, T* is the title, the name of the entity; D is the description, the explanation and description of the knowledge content explained for the defined entity; N is the sequence number, the order in which the entity is taught; and Date* is the time, the time the entity was added. The internal and external relationships of courses, topics, and knowledge points are represented in the form of triplets G = {(h, r, t) | h, t ∈ ε, r ∈ R}, where h represents the head entity, t represents the tail entity, r represents the relationship between the head and tail entities, ε represents the entity set, and R represents the relation set.
[0025] Knowledge representation: Based on the needs of course content and theme, each knowledge point entity K is represented as K = {T*, C*, O, D, P = {P1, P2, ..., Pn}; where C* is the category, the type of the entity, with a value of 1 representing basic knowledge, a value of 2 representing intermediate knowledge, and a value of 3 representing advanced knowledge; O represents the alias of the knowledge point; P represents the unique characteristic attribute of the knowledge point belonging to category K, and Pi represents a certain characteristic attribute. For different knowledge points, the number and types of Pi also change accordingly, 1 ≤ i ≤ n;
[0026] Knowledge fusion, the fusion of entities or attributes, adopts the relevance clustering method, as shown below:
[0027] min∑r xy (1-sim xy )+(1-r xy )sim xy ;
[0028] Where x and y represent entities or attributes, r xy This indicates that x and y are assigned to the same class, sim xy This represents the probability that x and y belong to the same class. The goal is to find a clustering scheme with minimal cost.
[0029] Module 2 is used to obtain the current and historical post records of users in the online community and perform data preprocessing;
[0030] Module 3 is used to construct a multi-level text similarity function based on corpus and core phrases, define a threshold, horizontally measure the semantic similarity between user posts in online communities, and find user groups with similar knowledge levels to the current user;
[0031] Module 4 is used to identify a unique user with a similar knowledge level to the current user based on the user's background knowledge, obtain their learning path, and make recommendations.
[0032] Module 5 is used to recommend users at a higher level of the current topic knowledge point by using knowledge graphs if the learning path is missing.
[0033] Module 6 is used to identify a unique user at a higher level of knowledge based on the user's background knowledge, and recommend that user's posts to the current user;
[0034] Module 7 is for online community users whose knowledge level is at the highest level. In this case, no recommendation is needed, and the learner can continue learning.
[0035] The technical solution adopted by the device of the present invention is: an online community learning path recommendation device based on knowledge graph, comprising:
[0036] One or more processors;
[0037] A storage device for storing one or more programs, which, when executed by one or more processors, enable the one or more processors to implement the knowledge graph-based online community learning path recommendation method.
[0038] The modeling method of this invention is a fine-grained and multi-context-aware learning path recommendation method for online communities based on knowledge graphs. First, a knowledge graph model is constructed, consisting of three layers of entities: "course – topic – knowledge point". Then, current and historical posts of users in the online community are acquired and preprocessed. A similarity function is constructed, and a threshold is defined to horizontally measure the semantic similarity between user posts in the online community, identifying user groups with similar knowledge levels to the current user. A unique user with a similar knowledge level is identified based on the user's background knowledge, and their learning path is obtained and recommended. If a learning path is missing, users at a higher level of the current topic's knowledge point are recommended vertically using the knowledge graph. A unique user at a higher level of the knowledge point is identified based on the user's background knowledge, and their posts are recommended to the current user. Finally, by combining the knowledge graph with the different learning needs of users in the online community, fine-grained and multi-context-aware learning paths are recommended. This invention can obtain learners' knowledge mastery levels through log data and text data in the online community and recommend learning paths using knowledge graphs. This invention employs a knowledge graph and a multi-level text similarity measurement method based on corpora and core phrases to recommend learning paths based on learners' knowledge mastery levels in online communities. This aims to understand learners' current knowledge levels, a modeling approach rarely used currently and worthy of exploration and experimentation. Future research could explore other effective similarity measurement functions and apply this framework to other models to study its effectiveness and applicability.
[0039] Existing online community research guides learners by recommending fragmented learning content through learning paths. This often involves collecting redundant or irrelevant learning objects, easily overlooking potential dependencies between them, and typically only establishing relatively simple relationships to link learning objects. While knowledge graphs can leverage these dependencies in learning path recommendation methods, they often only use single relationships within the knowledge graph to connect learning objects, failing to fully utilize its hierarchical structure and neglecting the characteristic attributes of learning objects. Furthermore, in constructing learning paths, user background information is only considered based on learners' learning path records, without taking into account the semantic similarity of posts between learners. Compared to existing technologies, this invention proposes a fine-grained and multi-context-aware learning path recommendation method, system, and device for online communities based on knowledge graphs. It utilizes a designed multi-dimensional knowledge graph to query relevant knowledge entities, finely analyzes user posts in the online community, models users' knowledge background, and ranks the recommendation results from both horizontal and vertical perspectives based on this knowledge background. This results in recommending fine-grained and multi-context-aware personalized learning paths to meet the diverse learning needs of users in online communities. Attached Figure Description
[0040] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;
[0041] Figure 2 This is a knowledge graph model diagram of the three-layer entity model of "course - topic - knowledge point" in the embodiment of the present invention;
[0042] Figure 3 This is an example diagram illustrating the construction of some knowledge ontology in an embodiment of the present invention. Detailed Implementation
[0043] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0044] Knowledge graphs, as a popular research field, are often used to construct and generate learning paths. Current research mainly focuses on how to utilize knowledge graphs to generate effective learning paths. In online learning environments, multiple learners may require different learning paths for the same learning object. A good learning path recommendation should generate learning paths that meet the needs of different learners in different scenarios. With the rise of online education, online communities generate a large amount of log and text discussion data generated by interactions between students and between teachers and students. Online platforms can easily access the data generated in online communities. Due to differences in teaching contexts, course content, and teaching organization methods across different courses, the data characteristics of online discussions are diverse. Therefore, constructing learning path recommendation methods applicable to multiple scenarios is of great significance. The analysis of text data in online forums is of great value in understanding the depth of learners' comprehension of questions and judging their current knowledge level. Learners' interactions in posting and replying are also an important way to promote learning. Combining this with a constructed knowledge graph can scientifically and accurately judge learners' knowledge levels and finely mine interactive text to recommend learning paths that match learners' learning preferences. The analysis and research of educational data such as posts and replies in forums is also becoming increasingly popular. Online discussion analysis has become extremely important because it helps to promote the understanding of the educational process. The knowledge graph-based method for recommending fine-grained and multi-contextual learning paths in online communities can not only leverage the scientific nature of knowledge graphs to generate learning paths that match learners' learning preferences and provide personalized learning guidance, but also help educators to better refine the teaching process and flexibly arrange instruction.
[0045] Please see Figure 1 This invention provides a method for recommending online community learning paths based on knowledge graphs, comprising the following steps:
[0046] Step 1: Construct a knowledge graph model with three layers of entities: "Course - Topic - Knowledge Point";
[0047] Please see Figure 2 In this embodiment, the data acquisition source and composition are first determined, the teaching unit and teaching sequence of a certain course content are determined, the course content is divided into different topics according to the teacher's teaching in the classroom, and the knowledge points and their levels contained in each topic are determined; then the raw data is divided into structured data, semi-structured data and unstructured data, and different methods are used to process the data according to different data types, the raw data is organized into a structured form, and the structured data is stored as json, txt, xlsx, csv and other files;
[0048] Please see Figure 3 The knowledge ontology construction in this embodiment clearly and explicitly describes the concepts or classes, class relationships, class attributes, and class hierarchical structure of things, reflecting the internal and external relationships of things;
[0049] Ontology = class + relations + function + axioms + instances;
[0050] Specifically, a class describes a real concept within a domain; it can be an actual thing or an abstract concept, such as a representative person or a professional term. Relationships describe the relationships between classes (concepts), and there are four main types: part-whole relationship (P), parent-child relationship (K), instance-class relationship (I), and one class being an attribute of another (A). A function is a special type of relationship where the first n-1 elements uniquely determine the nth element. An axiom represents a fact existing within an entity and can constrain classes or relationships within that entity, such as concept A belonging to the scope of concept B. An instance represents the actual existence of a specific class.
[0051] The knowledge extraction in this embodiment includes three aspects: entity extraction, relation extraction, and attribute extraction. It extracts the required named entities from natural text, mines the semantic information between entities, and extracts targeted attribute descriptions based on knowledge characteristics. Each course entity C and topic entity T can be represented in the following form:
[0052] C / T = {T*,D,N,Date*};
[0053] Wherein, * indicates that the attribute value cannot be empty, T*-Title, the name of the entity; D-Describe, the explanation and description of the knowledge content to be taught for the defined entity; N-Number, the sequential number of the entity's teaching; Date*-Time, the time when the entity was added.
[0054] The internal and external relationships of courses, topics, and knowledge points are represented by triples G = {(h,r,t)|h,t∈ε,r∈R}, where h represents the head entity, t represents the tail entity, r represents the relationship between the head and tail entities, ε represents the entity set, and R represents the relation set.
[0055] In this embodiment, the knowledge representation, based on the needs of the course content and topic, allows each knowledge point entity K to be represented in the following form:
[0056] K={T*, C*, O, D, P={P1, P2…, Pn}}
[0057] Wherein, * indicates that the attribute value cannot be empty, T* - Title, the name of the entity; C* - Class, the category of the entity, where a value of 1 represents basic knowledge, a value of 2 represents intermediate knowledge, and a value of 3 represents advanced knowledge; O represents an alias for the knowledge point; D represents the definition and description of the knowledge point; P represents the unique characteristic attribute of the knowledge point belonging to category K, and Pi represents a certain characteristic attribute. For different knowledge points, the number and types of Pi also vary.
[0058] This embodiment of knowledge fusion can complement and integrate knowledge from different knowledge bases. Starting from this knowledge, fusion and verification steps are usually required to merge data from different sources and with different structures into a unified knowledge graph to ensure knowledge consistency and form a comprehensive, accurate, and complete entity description. Specifically, the fusion of entities or attributes can adopt the relevance clustering method, as shown below:
[0059] min∑r xy (1-sim xy )+(1-r xy )sim xy
[0060] x and y represent entities or attributes, r xy This indicates that x and y are assigned to the same class, sim xy This represents the probability that x and y belong to the same class (the similarity between x and y). The goal is to find a clustering scheme with minimal cost.
[0061] In this embodiment, knowledge storage uses the Neo4j graph database for data storage, mainly organizing data using nodes and edges. Nodes represent entities in the knowledge graph, and edges represent relationships between entities. Relationships can be directional, with the two ends corresponding to the start node and the end node.
[0062] Step 2: Obtain the current and historical post records of users in the online community and perform data preprocessing;
[0063] In this embodiment, a web crawler is used to access the online community of a course; all comment data is crawled in a loop, and data such as username, user ID, comment content, comment time, number of views, and number of replies are obtained and saved; the obtained comment data is organized, summarized and formatted, and the organized information is stored in an Excel spreadsheet.
[0064] Step 3: Construct a multi-level text similarity function based on corpus and core phrases, define a threshold, and horizontally measure the semantic similarity between user posts in the online community to find user groups with similar knowledge levels to the current user;
[0065] In this embodiment, step 3 is specifically implemented by the following sub-steps:
[0066] Step 3.1: Calculate the text similarity between user posts at the paragraph and sentence levels based on the Chinese corpus, extract keywords from the posts using TF-IDF, and calculate the text vector V of a specific post using the trained word2vec model and the keywords. i And n-1 other post text vectors V = {V1, V2, V3, ..., V i-1 V i+1 ,...,V n Similarity of}
[0067] Step 3.2: Filter core phrases from user posts. Randomly select a fragment from the post. If the left and right collocations of this fragment are rich and the internal collocations of the fragment are fixed, it can be considered a core phrase. The richness of the left and right collocations of the fragment can be measured by information entropy, while the fixedness of the internal collocations of the fragment can be measured by the mutual information of the subsequences.
[0068]
[0069]
[0070]
[0071] Here, p(x,y) is the joint probability distribution function of X and Y, while p(x) and p(y) are the marginal probability distribution functions of X and Y, respectively. Given a string S as a candidate core phrase, and X defined as the characters that may appear to the left of the string (left neighbor characters), then H(X) is called the left information entropy of S. Similarly, the right information entropy H(Y) is defined. The larger the left and right information entropies, the richer the possible combinations of the string, and the greater the probability that the string is a core phrase. Mutual information I(X;Y) refers to the measure of the correlation between two discrete random variables X and Y. When there are multiple combinations of fragments, the one with the smallest mutual information among all combinations can be selected as the representative. After obtaining the left and right information entropies and mutual information, fragments with two indicators below a certain threshold are filtered out, and the remaining fragments are sorted in descending order of frequency. The N most frequent fragments are extracted to complete the core phrase extraction process.
[0072] Step 3.3: Calculate the core phrase vector V of a post based on cosine similarity. p ={V p1 V p2 V p3 ,...,V pn} and other posts V c ={V c1 Vc2 V c3 ,...,V cn Similarity between core phrase vectors;
[0073]
[0074] Step 3.4: Construct the similarity function in, These are the weighting coefficients;
[0075] If it is necessary to calculate the core phrase vector V of a user's post p The core phrase vector V extracted from entities and their attributes in the knowledge graph. K ={V K1 V K2 V K3 ,...,V Kn When the similarity is}, at this time V C Replace with V K ,Right now
[0076] Step 3.5: Set a threshold. Using the similarity between posts obtained in Step 3.4, if the similarity value is greater than the set threshold, then this user is defined as having a similar knowledge level to the current user, and thus the similarity between the current user and the user U is obtained. i The set of user groups with similar knowledge levels is U, the set of user posts is V, and the similarity set is S, where m is the number of user groups;
[0077]
[0078] Step 4: Identify the only user with a similar knowledge level to the current user based on their background knowledge, obtain their learning path, and make recommendations accordingly;
[0079] In this embodiment, step 4 is specifically implemented by the following sub-steps:
[0080] Step 4.1: If there is only one user with a similar knowledge level to the current user, then obtain the user's subsequent learning path V as a recommendation;
[0081]
[0082] Where V is the set of subsequent posts by the user, and p represents the number of posts;
[0083] If there are multiple users with similar knowledge levels to the current user, obtain the knowledge background of the current user and the user group U with similar knowledge levels, and construct a background matrix, where n is the number of posts contained in the knowledge background;
[0084]
[0085] Step 4.2: Use the similarity function to obtain the current user U. i The similarity of the semantics of posts at the same level in the knowledge background of user group U is used to obtain the historical knowledge background similarity matrix Sim;
[0086]
[0087] Step 4.3: Through the above calculations, the similarity at the same level and the similarity based on historical knowledge background are obtained, and a weighting factor W is added to each of them. p W q We obtain the weighted similarity sum, and then obtain the weighted similarity set, Similarity.
[0088]
[0089]
[0090] Similarity={similarity1,...,similarity m}
[0091] Where h takes values in the range [1, m];
[0092] Step 4.4: Arrange the weighted similarity set Similarity in descending order, and select the user with the highest value as the only user with a similar knowledge level to the current user, and obtain their learning path. As a recommendation, if a user has no further learning path, then the user with the second smallest value will be recommended a learning path, and so on.
[0093] Step 5: If the learning path is missing, it is necessary to use knowledge graphs to recommend users who are at a higher level than the current topic knowledge points.
[0094] In this embodiment, step 5 is specifically implemented by the following sub-steps:
[0095] Step 5.1: Determine the topic. Measure the semantic similarity between the core phrase X extracted from the current user's post and the core phrase Y of the topic in the course to obtain a similarity matrix S. Sim is the weighted sum of semantic similarity between the topic and the post. Find the most similar topic and determine it as the topic of the user's post.
[0096]
[0097]
[0098]
[0099] Where n is the number of core phrases in the post, and m is the number of core phrases in the topic; W i W is a weighted measure of similarity between each core phrase of the topic and each core phrase of the post. j The similarity measure weight between the i-th core phrase of a topic and every core phrase of a post.
[0100] Step 5.2: Determine the hierarchy of knowledge points included in the topic;
[0101] The word embeddings of the post text and the word embeddings of the topic knowledge point attributes in the knowledge graph are obtained using word2vec; two aligned matrices M are obtained through a dictionary that provides mappings to a subset of the vocabulary. t and M k , of which M t For a text word embedding containing n words from a dictionary, M k For each knowledge point attribute word containing n words from the dictionary, embed the knowledge point attribute word embedding space into a point in the post text word embedding space, and calculate the transition matrix M. Using the transition matrix M, find the knowledge point attribute vector in the post text embedding space and know the similar knowledge point attribute vectors of the post text vector. Find the topic knowledge point with the highest similarity, which corresponds to the knowledge point level of the current post under the topic.
[0102] z = ML;
[0103] Where M is the transition matrix, z is a vector belonging to the target vector space, and L is a vector in the source vector space;
[0104] Step 5.3: Recommend topics and knowledge points to users at a higher level to acquire a higher-level user group U.
[0105] Step 6: Identify a unique user with a higher level of knowledge based on the user's background knowledge, and recommend that user's posts to the current user;
[0106] In this embodiment, step 6 is specifically implemented by the following sub-steps:
[0107] Step 6.1: If only one user is at a higher level than the user in this topic, then retrieve that user's current post and subsequent learning path. As a recommendation; where V is the set of subsequent posts by the user, and p represents the number of posts;
[0108] If there are multiple users at higher levels of this topic, construct the knowledge background of the user group U at higher levels of this topic and construct a background matrix, where n is the number of posts contained in the knowledge background;
[0109]
[0110] Step 6.2: Use the similarity function to obtain the current user U. i The similarity of the semantics of posts at the same level in the knowledge background of user group U is used to obtain the historical knowledge background similarity matrix Sim;
[0111]
[0112] Step 6.3: Through the above calculations, the similarity at the same level and the similarity of historical knowledge background are obtained, and a weighting factor W is added to each of them. p W q We obtain the weighted similarity sum, and then obtain the weighted similarity set, Similarity.
[0113]
[0114]
[0115] Similarity={similarity1,...,similarity m};
[0116] Where h takes values in the range [1, m];
[0117] Step 6.4: Arrange the weighted similarity set Similarity in descending order, and select the user with the highest value as the only user with a similar knowledge level to the current user. Obtain that user's current post and subsequent learning path. As a recommendation.
[0118] Step 7: If the online community user's knowledge level is at the highest level, no recommendation is needed, and the learner can continue learning.
[0119] The innovative aspects of this invention include the following:
[0120] 1. A knowledge level model with three-layer entity modeling of "course - theme - knowledge point" is proposed.
[0121] 2. Leverage knowledge graphs to query relevant knowledge entities and attributes, perform fine-grained analysis of user posts in online communities, and model users' knowledge backgrounds.
[0122] 3. Based on the corpus and core phrases, a multi-level text similarity function is constructed to measure the semantic similarity between user posts in online communities and the similarity of entities and attributes in knowledge graphs, thereby determining the user's knowledge level and recommending learning paths.
[0123] It should be understood that the above description of the preferred embodiments is quite detailed, but it should not be considered as a limitation on the scope of protection of this invention. Those skilled in the art, under the guidance of this invention, can make substitutions or modifications without departing from the scope of protection of the claims of this invention, and all such substitutions or modifications fall within the scope of protection of this invention. The scope of protection of this invention should be determined by the appended claims.
Claims
1. A knowledge graph-based online community learning path recommendation method, characterized in that, Comprising the following steps: Step 1: Constructing a knowledge graph model of "course - theme - knowledge point" three-layer entity; According to the teaching unit and its teaching order of course content data, the course content data is divided into different themes, and the knowledge points contained in each theme and their hierarchy are determined; Constructing knowledge ontology, ontology = class + relationship + function + axiom + instance; Among them, class is to describe the actual concept in the field, which can be an actual existing thing or an abstract concept; Relationship is used to describe the relationship between classes, including the relationship between parts and wholes P, the relationship between parent classes and child classes K, the relationship between instances of a class and the class I, and the property A of a class to another class; Function is a special relationship, in which the first n-1 elements can uniquely determine the nth element; Axiom represents the facts existing in the ontology, which is used to constrain the classes or relationships in the ontology; Instance represents the actual existence of a specific class; Knowledge extraction, including entity extraction, relation extraction and attribute extraction; extract the required named entities from natural text, mine the semantic information between entities, and extract the attribute description according to the knowledge characteristics; each course entity C and theme entity T can be represented as: C / T = {T*, D, N, Date*} ; Wherein, * indicates that the attribute value cannot be empty, T* is the title, the name of the entity; D is the description, the explanation and explanation of the knowledge content explained to the defined entity; N is the serial number, the sequential numbering of the entity teaching; Date* is the time, the adding time of the entity; The internal and external relations of courses, themes and knowledge points are represented in the form of triples G = { (h, r, t) | h, t ∈ , r ∈ R}, wherein h represents the head entity, t represents the tail entity, and r represents the relationship between the head and tail entities, , represents the entity set, and R represents the relationship set; Knowledge representation, according to the needs of course content and theme, each knowledge point entity K is represented as K = {T*, C*, O, D, P = {P1, P2…Pn}}; wherein, C* is a category, the category of the entity, wherein a value of 1 represents basic knowledge, a value of 2 represents intermediate knowledge, and a value of 3 represents advanced knowledge; O represents an alias of the knowledge point; P represents a characteristic attribute that the knowledge point belonging to the category K has, and Pi represents a certain characteristic attribute. For different knowledge points, the number and types of Pi also change, 1≤i≤ n ; Knowledge fusion, entity or attribute fusion adopts the method of relevance clustering, as follows: ; wherein, x , y denotes an entity or attribute, r xy denotes x , y are assigned to the same class, Sim xy denotes x , y is the probability that two entities are in the same class, the goal is to find a clustering scheme using the least cost; Step 2: Obtaining the current post and historical post records of users in the online community and performing data preprocessing; Step 3: Constructing a multi-level text similarity function based on corpus and core phrases, defining a threshold, measuring the similarity between user post semantics in the online community horizontally, and finding a user group with similar knowledge level to the current user; Step 4: Determine the unique user with similar knowledge level to the current user through the user's knowledge background, and obtain their learning path for recommendation; Step 5: If the learning path is missing, then vertically recommend users at a higher level of the current theme knowledge point by using the knowledge graph; Step 6: Determine the unique user at a higher level of the knowledge point through the user's knowledge background, and recommend the user's post to the current user; Step 7: If the user's knowledge level in the online community is at the highest level, no recommendation is needed, and the learner continues to learn. 2.The knowledge graph-based online community learning path recommendation method according to claim 1, characterized in that: In step 2, the obtained comment data includes username, user ID, comment content, comment time, view count, and reply count, and the obtained comment data is organized and summarized according to a unified format. 3.The knowledge graph based online community learning path recommendation method according to claim 1, characterized in that, The specific implementation of step 3 includes the following sub-steps: Step 3.1: Calculate the similarity of the text between user posts at the paragraph and sentence level based on the Chinese corpus, extract the keywords of the post using TF-IDF, and calculate the text vector V of a certain post using the trained word2vec model and keywords i and the similarity of the text vector V of the other n-1 posts V = {V1, V2, V3,..., V i-1 , V i+1 , ..., V n} ; Step 3.2: Select core phrases from user posts, and randomly take a segment from the post. If the left and right collocations of this segment are rich and the internal components of the segment are fixed, it is considered to be a core phrase. The richness of the left and right collocations outside the segment is measured by information entropy, and the fixedness of the internal collocations of the segment is measured by the mutual information of the sub-sequence; ; ; ; where is the joint probability distribution function of X and Y, while and are the marginal probability distribution functions of X and Y, respectively; given a string S as a core phrase candidate, X is defined as the characters that can appear on the left of the string, then H(X) is called the left information entropy of S, and the right information entropy H(Y) is defined similarly; the larger the left and right information entropy, the more abundant the possible collocation of the string, and the greater the possibility of the string being a core phrase; mutual information I(X;Y) refers to the degree of correlation between two discrete random variables X and Y; when a fragment has multiple combination ways, the combination way with the minimum mutual information is selected as the representative; after obtaining the left and right information entropy and mutual information, the fragments with the two indicators below a certain threshold are filtered out, and the remaining fragments are sorted in descending order of frequency, and the top N fragments with the highest frequency are selected to complete the core phrase extraction process. Step 3.3: Calculate the core phrase vector V of a post based on cosine similarity. p ={V p1 V p2 V p3 ,...,V pn } and other posts V c ={V c1 V c2 V c3 ,...,V cn Similarity between core phrase vectors; ; Step 3.4: Constructing the similarity function ; wherein, is a weight coefficient; If it is necessary to calculate the core phrase vector V of a user's post p The core phrase vector V extracted from entities and their attributes in the knowledge graph. K ={V K1 V K2 V K3 ,...,V Kn When the similarity is}, at this time V C Replace with V K ,Right now ; Step 3.5: Set a threshold, and use the similarity between posts obtained in step 3.4, if the similarity value is greater than the set threshold, then this user is defined as being at a similar knowledge level to the current user, and then obtain the user group set U at a similar knowledge level to the current user U i the user group set U at a similar knowledge level to the current user, the user post set V, and the similarity set S, where m is the number of user groups. 。 4.The knowledge graph based online community learning path recommendation method according to claim 1, characterized in that, The specific implementation of step 4 includes the following sub-steps: Step 4.1: If the user with similar knowledge level to the current user is unique, obtain the user's subsequent learning path V as the recommendation; ; Wherein, V is the user's subsequent post set, p represents the post number; If the users with similar knowledge level to the current user are not unique, the knowledge background of the current user and the user group U with similar knowledge level is obtained, and a background matrix is constructed, wherein n is the number of posts contained in the knowledge background; ; Step 4.2: Obtain the current user U i The similarity of the post semantics in the same level in the knowledge background of the user group U is obtained, and a historical knowledge background similarity matrix Sim is obtained. ; Step 4.3: Through the above calculation, the similarity of the post semantics in the same layer is obtained and the historical knowledge background similarity , respectively, a weight factor W is added to each p , q , to obtain the similarity weighted sum similarity, and then the weighted similarity set Similarity is obtained; wherein h takes values within [1, m] ; Step 4.4: Rank the set of weighted similarities Similarity in descending order, and take the user with the largest value as the only user with similar knowledge level to the current user, and obtain its learning path As a recommendation, if this user has no subsequent learning path, take the user with the second smallest value to recommend the learning path, and so on. 5.The knowledge graph based online community learning path recommendation method according to claim 1, characterized in that, The specific implementation of step 5 includes the following sub-steps: Step 5.1: Determine the theme, the semantic similarity between the core phrases X extracted from the current user's post and the core phrases Y of the themes in the course, get the similarity matrix S, Sim The most similar theme is found for the semantic similarity between the theme and the post, and the theme where the user's post is determined. ; ; wherein, n is the number of core phrases for the post, m is the number of core phrases for the topic; W i is the similarity measure weight between each core phrase of the topic and each core phrase of the post, W j is the similarity measure weight between the i-th core phrase of a topic and each core phrase of the post; Step 5.2: Determine the knowledge point hierarchy contained in the theme; obtaining word embeddings of post text and word embeddings of topic knowledge point attributes in a knowledge graph by word2vec; obtaining two aligned matrices Mt and Mk by a dictionary providing a mapping for a subset of the vocabulary, wherein Mt contains n text word embeddings from the dictionary, and Mk contains n knowledge point attribute word embeddings from the dictionary; converting a point in the knowledge point attribute word embedding space into a point in the post text word embedding space to obtain a transition matrix M; finding a knowledge point attribute vector in the post text embedding space and obtaining a similar knowledge point attribute vector of the post text vector by the transition matrix M; finding a topic knowledge point with the largest similarity as a knowledge point of the current post at a topic level; ; Where M is the transition matrix, z is the vector belonging to the target vector space, and L is the vector of the source vector space; Step 5.3: Recommend users at a higher level of the theme knowledge point, and obtain the user group U at a higher level. 6.The knowledge graph based online community learning path recommendation method according to claim 1, characterized in that, The specific implementation of step 6 includes the following sub-steps: Step 6.1: If the user is unique at the higher level of the topic knowledge point, obtain the current post of the user and the subsequent learning path as a recommendation; wherein V is the set of subsequent posts of the user, p represents the number of posts; If the users in the higher level of the topic knowledge point are not unique, the knowledge background of the user group U in the higher level of the topic knowledge point is constructed, and a background matrix is constructed, wherein n is the number of posts contained in the knowledge background. ; Step 6.2: Using the similarity function, find the current user U i The similarity of the post semantics in the same level in the knowledge background of the user group U is obtained, and a historical knowledge background similarity matrix Sim is obtained. ; Step 6.3: Through the above calculation, the similarity of the post semantics in the same layer is obtained and the historical knowledge background similarity , respectively, a weight factor W is added to each p , W q , and the weighted sum of the similarities is obtained, and then the weighted similarity set Similarity is obtained; ; ; ; wherein h values taken from [1, m] ; Step 6.4: Rank the set of weighted similarities Similarity in descending order, and take the user with the largest value as the only user with similar knowledge level to the current user, get the current post and subsequent learning path of the user as recommendations.
7. An online community learning path recommendation system based on a knowledge graph, characterized by, Comprising the following modules: Module 1, for constructing a knowledge graph model of "course - theme - knowledge point" three-layer entity; According to the teaching units and their teaching sequence of the course content data, the course content data is divided into different themes, and the knowledge points contained in each theme and their hierarchy are determined; Constructing knowledge ontology, ontology = class + relationship + function + axiom + instance; Among them, class is to describe the actual concept in the field, which can be an actually existing thing or an abstract concept; Relationship is used to describe the relationship between classes, including the relationship between parts and wholes P, the relationship between parent classes and child classes K, the relationship between instances of a class and the class I, and the attribute A of a class to another class; Function is a special relationship, in which the first n-1 elements can uniquely determine the nth element; Axiom represents the facts existing in the ontology, which is used to constrain the classes or relationships in the ontology; Instance represents the actual existence of a specific class; Knowledge extraction, including entity extraction, relation extraction and attribute extraction; extract the required named entities from natural text, mine the semantic information between entities, and extract the attribute description according to the knowledge characteristics; each course entity C and theme entity T can be represented as: C / T = {T*, D, N, Date*} ; Wherein, * indicates that the attribute value cannot be empty, T* is the title, the name of the entity; D is the description, the explanation and explanation of the knowledge content explained to the defined entity; N is the serial number, the sequential numbering of the entity teaching; Date* is the time, the adding time of the entity; The internal and external relations of courses, themes and knowledge points are represented in the form of triples G = { (h, r, t) | h, t ∈ , r ∈ R}, wherein h represents the head entity, t represents the tail entity, and r represents the relationship between the head and tail entities, , represents the entity set, and R represents the relationship set; Knowledge representation, according to the needs of course content and theme, each knowledge point entity K is represented as K = {T*, C*, O, D, P = {P1, P2…Pn}}; wherein, C* is a category, the category of the entity, wherein a value of 1 represents basic knowledge, a value of 2 represents intermediate knowledge, and a value of 3 represents advanced knowledge; O represents an alias of the knowledge point; P represents a characteristic attribute that the knowledge point belonging to the category K has, and Pi represents a certain characteristic attribute. For different knowledge points, the number and types of Pi also change, 1≤i≤ n ; Knowledge fusion, the fusion of entities or attributes adopts the method of correlation clustering, as follows: ; wherein, x , y denotes an entity or attribute, r xy denotes x , y are assigned in the same class, sim xy denotes x , y is the probability that two entities are in the same class, the goal is to find a clustering solution with minimum cost; Module 2, for obtaining the current post and historical post records of users in the online community and performing data preprocessing; Module 3, for constructing a multi-level text similarity function based on corpus and core phrases, defining a threshold, measuring the similarity between user post semantics in the online community horizontally, and finding a user group with similar knowledge level to the current user; Module 4, for determining the unique user with similar knowledge level to the current user through the user's knowledge background, and obtaining the learning path for recommendation; Module 5, for if the learning path is missing, then vertically recommend users at a higher level of the current theme knowledge point by means of knowledge graph; Module 6, for determining the unique user at a higher level of the knowledge point through the user's knowledge background, and recommending the post of the user to the current user; Module 7, for if the knowledge level of the user in the online community is at the highest level, then no recommendation is needed, and the learner continues to learn. 8.An online community learning path recommendation device based on a knowledge graph, characterized by, Comprise: One or more processors; Storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, so that the one or more processors implement the online community learning path recommendation method based on knowledge graph as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Collaborative recommendation model construction method based on knowledge graph preference propagation
CN113158033A
Knowledge graph-based learning path recommendation method and system, computer and medium
CN114491057A