A course intelligent search method based on a knowledge graph

By calculating the core query index and semantic similarity of entities in the knowledge graph, and combining the density of associations in the graph structure, the problem of insufficient course search accuracy caused by inaccurate user language expression is solved, and more accurate course information matching and result output are achieved.

CN117688216BActive Publication Date: 2026-11-20CHINA STATE GRID SHANXI ELECTRIC POWER CO PARTY SCHOOL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311784728.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-23
Publication Date
2026-11-20
Estimated Expiration
2043-12-23

AI Technical Summary

Technical Problem

Existing knowledge graph-based course search methods struggle to accurately match course information when faced with inaccurate user language expression and semantic ambiguity, resulting in insufficient accuracy in search results.

Method used

By acquiring course data and entities from user search content, the core query index and semantic similarity of entities are calculated. Entity matching is performed using the BERT model and graph structure to determine the candidate set of entity matching. Based on the density of entity associations, relevant course information is output.

Benefits of technology

It improves the accuracy of course searches and user satisfaction, enabling more precise matching of users' query intent and providing search results that better meet their needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117688216B_ABST
    Figure CN117688216B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and discloses a course intelligent search method based on a knowledge graph, which comprises the following steps: acquiring course data, acquiring entities in the course data, and acquiring a graph structure according to the entities in the course data; acquiring an entity set of the retrieval content of a user, and calculating the core query index of each entity; acquiring the semantic vector of the entity, determining the entity matching degree between entities, determining the comprehensive entity matching degree of the entity, and determining the entity matching candidate set according to the comprehensive entity matching degree; determining the entities with existing relationships according to the graph structure, determining the degree of the entities in the entity matching candidate set, further acquiring the query correlation degree score of the entities in the entity matching candidate set, determining the course information retrieved according to the retrieval content of the user according to the query correlation degree score of the entities, and completing the course intelligent search based on the knowledge graph. The application aims to solve the problem of insufficient search result accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and specifically to a knowledge graph-based intelligent course search method. Background Technology

[0002] With the widespread use of the internet and mobile devices, people can access a wealth of educational resources through various channels, such as online courses, academic papers, and e-books. This sheer volume of information has even led to information overload. This overload has brought new problems. When searching for information, the abundance of redundant information makes finding the right educational resources quickly and accurately a complex task. Using traditional search engines is a common method for retrieving educational resources; however, search engines often fail to meet users' refined needs, resulting in overly cluttered and difficult-to-filter search results. A knowledge graph-based intelligent course search method can solve the problem of cluttered search results.

[0003] A knowledge graph is a semantic network that represents entities, concepts, and the relationships between them as a graphical structure. It can provide users with more personalized search results and perform deeper semantic matching based on the search content. However, due to the diversity of language expression, the language used in users' search content may not be accurate, and semantic ambiguity may occur. This results in a lack of clear entity or relationship descriptions in the search content, making it a challenging task to understand users' query intent and accurately match it based on that understanding. Summary of the Invention

[0004] This invention provides a knowledge graph-based intelligent course search method to address the problem of inaccurate language expression during course search, which leads to mismatches of words with the same semantic meaning, resulting in insufficient accuracy of course search results. The specific technical solution adopted is as follows:

[0005] One embodiment of the present invention provides a knowledge graph-based intelligent course search method, which includes the following steps:

[0006] Obtain course data, extract entities from the course data, and extract the graph structure based on the entities in the course data;

[0007] Obtain the entity set of the user's search content, and calculate the core query index for each entity based on the frequency of the entities appearing in the entity set of the user's search content and the distance between different entities;

[0008] Obtain the semantic vectors of entities in the user's search content and entities in the knowledge graph, determine the semantic similarity and semantic distance between entities in the user's search content and entities in the knowledge graph, and then determine the entity matching degree between entities in the user's search content and entities in the knowledge graph. Based on the core query index of the entity and the entity matching degree between entities in the user's search content and entities in the knowledge graph, determine the comprehensive entity matching degree of the entities in the knowledge graph, and determine the entity matching candidate set based on the comprehensive entity matching degree.

[0009] Based on the knowledge graph structure, entities with relationships are identified. Based on the entities with relationships, the degree of matching between entities and candidates is determined. Based on the degree of matching between entities and candidates and the comprehensive entity matching degree, the query relevance score of entities in the candidate set is obtained. Based on the query relevance score of entities, the course information retrieved based on the user's search content is determined, thus completing the intelligent course search based on the knowledge graph.

[0010] Furthermore, the specific method for obtaining the entity set of the user's search content includes:

[0011] The text sequence of user search content after stop word removal is processed using the named entity recognition model BERT-BiLSTM-CRF to obtain the entity set of the user's search content.

[0012] Furthermore, the specific method for calculating the core query index for each entity based on the frequency of entity occurrences in the entity set of the user's search content and the distance between different entities includes:

[0013]

[0014] Where, α i N1 represents the core query index of the i-th entity in the user's search query; N1 represents the number of entities in the user's search query; f i f represents the frequency of the i-th entity in the user's search results; i,k This represents the frequency of the k-th entity after removing the i-th entity from the entity set of the user's search results; d i,k This represents the distance between the k-th entity and the i-th entity after removing the i-th entity from the entity set of the user's search results.

[0015] Furthermore, the specific methods for obtaining the semantic vectors of entities in the user's search content and entities in the knowledge graph include:

[0016] Each entity in the user's search query and each entity in the knowledge graph are input into the BERT model to obtain the semantic vector of each entity.

[0017] Furthermore, the method for obtaining semantic similarity is as follows: the cosine similarity between the semantic vector of the entity in the user's search content and the semantic vector of the entity in the knowledge graph is recorded as the semantic similarity between the two entities.

[0018] Furthermore, the semantic distance is obtained by recording the edit distance between the entity in the user's search content and the entity in the knowledge graph as the semantic distance between the two entities.

[0019] Furthermore, the specific method for determining the entity matching degree between the entities in the user's search content and the entities in the knowledge graph includes:

[0020] The first semantic distance is the sum of the semantic distance between the entity in the user's search content and the entity in the knowledge graph and the first adjustment parameter. The linearly normalized value of the ratio of the semantic similarity between the entity in the user's search content and the entity in the knowledge graph to the first semantic distance is denoted as the entity matching degree between the two entities.

[0021] Furthermore, the method for obtaining the entity matching candidate set is as follows: the set of entities corresponding to the comprehensive entity matching degree that is greater than or equal to the selection threshold is denoted as the entity matching candidate set.

[0022] Furthermore, the specific methods for determining the entities with relationships based on the graph structure and determining the degree of entity matching in the candidate set based on the entities with relationships include:

[0023] Entities connected by edges in the graph structure are denoted as entities with relationships. Each entity in the entity matching candidate set is denoted as the entity to be analyzed. The number of other entities in the entity matching candidate set that have relationships with the entity to be analyzed is denoted as the degree of the entity to be analyzed.

[0024] Furthermore, the specific methods for determining the course information retrieved based on the user's search content according to the entity's query relevance score, thus completing the intelligent course search based on the knowledge graph, include:

[0025] Sort the query relevance scores of all entities in the entity matching candidate set in descending order, and output the course data corresponding to the entities in the entity matching candidate set in the sorted order. The output course data is the course information retrieved based on the user's search content.

[0026] The beneficial effects of this invention are:

[0027] This invention determines the knowledge graph structure by analyzing the entities in the text of course data and the features between entities. Next, it calculates the core query index for each entity, which determines the meaning of the search content and the importance of each entity within the search content based on the user's search query, ensuring that the more important the entity, the greater its semantic influence on the course search results. Then, based on the similarity between the entities in the user's search content and the corresponding course information in the knowledge graph structure, it determines the entity matching degree between the entities in the user's search content and the entities in the knowledge graph. Finally, based on the entity matching degree and the core query index, it obtains the comprehensive entity matching degree of the entities in the knowledge graph, i.e., the comprehensive degree of conformity between the entities in the knowledge graph and the user's search content. The comprehensive entity matching degree improves the accuracy of filtering course information corresponding to entities in the knowledge graph structure. Based on comparing the entities in the user's search content with the knowledge graph structure... When matching entities in a knowledge graph, search results associated with more entities are more likely to reflect the features the user is looking for. By combining the density of entity associations in the knowledge graph, the relevance between the course information corresponding to entities in the entity matching candidate set and the user's search content is evaluated, and a query relevance score is obtained for each entity in the entity matching candidate set. Combining knowledge graph query methods can more accurately grasp the core of the user's query content, improve the matching degree between course query results and the core of the queried content, provide users with results that better match their query intent, and improve user satisfaction. Finally, based on the entity query relevance score, the course information retrieved based on the user's search content is determined, completing the intelligent course search based on the knowledge graph. This solves the problem of insufficient accuracy in course search results caused by inaccurate language expression during course search, which leads to different words with the same semantic meaning being mismatched. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of a knowledge graph-based intelligent course search method provided in one embodiment of the present invention;

[0030] Figure 2 Flowchart for obtaining candidate sets for entity matching. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] Please see Figure 1 The diagram illustrates a flowchart of a knowledge graph-based intelligent course search method according to an embodiment of the present invention, which includes the following steps:

[0033] Step S001: Obtain course data, including the entities and graph structures within the course data.

[0034] Course data is obtained from the school's official website. Course data should include at least the course description, instructor information, instructor's teaching style, course name, textbook, content overview, credit requirements, and prerequisites. Course data is usually presented in text format.

[0035] Next, the acquired course data undergoes preprocessing such as data cleaning and word segmentation. The preprocessing techniques are well-known and will not be elaborated further. A BiLSTM-CRF sequence model is then used to perform named entity recognition on the preprocessed course data to extract the entities within it.

[0036] Based on the entities and their characteristics within the text of the course data, the CasRel model is used to extract entity relationships, resulting in a graph structure with entities and their related attributes as nodes and the relationships between different entities as edges. This graph structure is stored in the Neo4j graph database for subsequent intelligent course search tasks based on the knowledge graph constructed from the course data.

[0037] Among them, the BiLSTM-CRF sequence model, CasRel model, and Neo4j graph database are well-known technologies and will not be described in detail.

[0038] At this point, the course data and graph structure for entity recognition have been obtained.

[0039] Step S002: Obtain the entity set of the user's search content, determine the importance of the entity in the search content, and obtain the core query index of each entity.

[0040] In the process of intelligent course search based on knowledge graph data, it is necessary to first understand the search content described by the user, then identify the key entities based on the search content, then perform entity matching and relationship matching in the knowledge graph database to obtain the query results, and finally organize the query results and return them to the user.

[0041] However, the language used by users in their search queries may be inaccurate, leading to semantic ambiguity and a lack of clear entity or relation descriptions. Furthermore, due to the diversity of language, the same meaning can be expressed using different words. As a result, there may be situations where the entities described by users in their search queries do not correspond to the entity nodes in the knowledge graph-based database, thus reducing the accuracy of intelligent course search based on knowledge graphs.

[0042] To improve the accuracy of knowledge graph-based intelligent course search, it is first necessary to determine the core meaning of the user's search content. Therefore, entity recognition is required to determine the importance of each entity in the search content.

[0043] The Harbin Institute of Technology (HIT) stop word list is used to perform "stop word removal" on the user query text. Stop word removal involves removing high-frequency words that have no practical meaning from the text to avoid interference and impact on subsequent text analysis. The Named Entity Recognition (BERT-BiLSTM-CRF) model is then used to analyze the user's search content, obtaining the entity set of the user's search content, where the user's search content is a text sequence. The use of the HIT stop word list for stop word removal and the use of the BERT-BiLSTM-CRF model for entity extraction are well-known techniques and will not be elaborated further.

[0044] The core query index for each entity is calculated based on the frequency of entity occurrences in the entity set of the user's search content and the distance between different entities.

[0045]

[0046] Where, α i N1 represents the core query index of the i-th entity in the user's search query; N1 represents the number of entities in the user's search query; f i f represents the frequency of the i-th entity in the user's search results; i,k This represents the frequency of the k-th entity after removing the i-th entity from the entity set of the user's search results; d i,k This represents the distance between the k-th entity and the i-th entity after removing the i-th entity from the entity set of the user's search results.

[0047] A higher term frequency for an entity indicates greater importance and a higher core query index, thus signifying greater importance of the entity within the search results. Similarly, closer proximity to other entities and a higher density of surrounding entities also indicate greater importance and a higher core query index, further reinforcing the entity's significance within the search results. In other words, the course information represented by the entity within the search results is more important.

[0048] At this point, the core query index for each entity in the user's search results has been obtained.

[0049] Step S003: Based on the similarity between the course information corresponding to the entity in the user's search content and the course information corresponding to the entity in the knowledge graph structure, perform entity matching between the entity in the user's search content and the entity in the knowledge graph to determine the entity matching candidate set of the knowledge graph.

[0050] When matching entities in a user's search query with entities in a knowledge graph, it is necessary to first obtain the semantic vector of each entity.

[0051] Generally, the output of the last hidden layer of the BERT model is considered to be the most semantically informative representation. Therefore, each entity in the user's search query and each entity in the knowledge graph are input into the BERT model to obtain the semantic vector of each entity. The method of using the BERT model to obtain the semantic vector of entities is a well-known technique and will not be elaborated further.

[0052] The cosine similarity between the semantic vector of the entity in the user's search query and the semantic vector of the entity in the knowledge graph is denoted as the semantic similarity between the two entities.

[0053] The greater the semantic similarity between two entities, the closer the spatial distribution of the semantics expressed by the two entities, and the greater the similarity of the semantics expressed by the two entities, that is, the more similar the course information corresponding to the two entities.

[0054] The semantic distance between entities in a user's search query and those entities in the knowledge graph is denoted as the edit distance between the two entities. Here, edit distance is the minimum number of operations required to transform one string into another through insertion, deletion, and replacement operations.

[0055] The smaller the semantic distance between two entities, the more consistent their written forms, and the greater the similarity of the semantics they express, meaning the more similar the course information corresponding to these two entities.

[0056] Based on the semantic similarity and semantic distance between the entities in the user's search content and the entities in the knowledge graph, the entity matching degree between the entities in the user's search content and the entities in the knowledge graph is determined.

[0057]

[0058] Where, β i,j c represents the entity matching degree between entity i in the user's search content and entity j in the knowledge graph; i,j Dis represents the semantic similarity between entity i in the user's search query and entity j in the knowledge graph; i,j denoted as , representing the semantic distance between entity i in the user's search query and entity j in the knowledge graph; a1 represents the first adjustment parameter, with an empirical value of 1; Norm() represents the linear normalization function.

[0059] The greater the semantic similarity between the entities in a user's search query and the entities in the knowledge graph, and the smaller the semantic distance, the greater the entity matching degree between the entities in the user's search query and the entities in the knowledge graph. In this case, the greater the semantic similarity between the entities in the user's search query and the entities in the knowledge graph, that is, the more similar the course information corresponding to these two entities.

[0060] The comprehensive entity matching degree of entities in the knowledge graph is determined based on the core query index of the entity and the entity matching degree between the entity in the user's search content and the entity in the knowledge graph.

[0061]

[0062] Where, β j α represents the overall entity matching degree of the j-th entity in the knowledge graph; i β represents the core query index of the i-th entity in the user's search results. i,j N1 represents the entity matching degree between entity i in the user's search content and entity j in the knowledge graph; N1 represents the number of entities in the user's search content.

[0063] When the core query index of an entity in a user's search content is higher, the entity matching degree between the entity in the user's search content and the entity in the knowledge graph is more important, and the entity matching degree should be given higher weight. At this time, the greater the comprehensive entity matching degree of the entity in the knowledge graph, the more the entity in the knowledge graph should be selected into the entity matching candidate set.

[0064] When the overall entity matching degree of an entity in the knowledge graph is greater than or equal to the selection threshold, the entity in the knowledge graph is selected into the entity matching candidate set. The empirical value for the selection threshold is 0.5. The flowchart for obtaining the entity matching candidate set is as follows: Figure 2 As shown.

[0065] At this point, the candidate set for entity matching has been obtained.

[0066] Step S004: Based on the density of entity associations in the knowledge graph, evaluate the degree of association between the course information corresponding to the entities in the entity matching candidate set and the user's search content, determine the course information retrieved based on the user's search content, and complete the intelligent course search based on the knowledge graph.

[0067] A concept within a course may be associated with multiple knowledge points, and the entity corresponding to the concept will be associated with the entity corresponding to the multiple knowledge points. The same concept may be mentioned by multiple courses, so there will be associations between the entities corresponding to the same concept mentioned in different courses.

[0068] When matching entities in a user's search query with entities in a knowledge graph, search results associated with more entities are more likely to be what the user is looking for. Therefore, when performing entity matching on a user's search query, the density of entity associations in the knowledge graph should also be considered.

[0069] In a graph structure, two entities that are connected by an edge are denoted as two entities that have a relation.

[0070] Each entity in the entity matching candidate set is denoted as the entity to be analyzed, and the number of other entities in the entity matching candidate set that are related to the entity to be analyzed is denoted as the degree of the entity to be analyzed.

[0071] Based on the degree of entities in the entity matching candidate set and the comprehensive entity matching degree of the entities, obtain the query relevance score of the entities in the entity matching candidate set.

[0072]

[0073] Among them, Sc k β represents the query relevance score of the k-th entity in the entity matching candidate set; k R represents the overall entity matching degree of the k-th entity in the knowledge graph; k This represents the degree of the k-th entity in the knowledge graph; This represents the degree of the v-th entity in the knowledge graph that has a relationship with the k-th entity.

[0074] When the degree of an entity in the knowledge graph and the degree of other entities in the knowledge graph that are related to the entity are greater, the density of the entity's association with other entities in the knowledge graph is greater, and the relevance of the user's search content to the entities in the entity matching candidate set is higher. At this time, the query relevance score of the entities in the entity matching candidate set is higher.

[0075] Sort the query relevance scores of all entities in the entity matching candidate set in descending order, and output the course data corresponding to these entities in the entity matching candidate set in order. The output course data is the course information retrieved based on the user's search content.

[0076] The course data corresponding to these entities in the entity matching candidate set includes at least the course description, instructor information, instructor's teaching style, course name, textbook, content overview, credit requirements, and prerequisite courses. Course data is usually presented in text format.

[0077] Furthermore, entity association information can be used as a supplement to provide richer course information. Entity association information includes course data corresponding to other entities related to the course entity. This association information can provide users with broader answer directions and more relevant search results when the user's search content is inaccurate, semantically ambiguous, lacks clear entity or relationship descriptions, or uses different language expressions.

[0078] This completes the intelligent course search based on knowledge graphs.

[0079] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A knowledge graph-based intelligent course search method, characterized in that, The method includes the following steps: Obtain course data, extract entities from the course data, and extract the graph structure based on the entities in the course data; Obtain the entity set of the user's search content, and calculate the core query index for each entity based on the frequency of the entities appearing in the entity set of the user's search content and the distance between different entities; Obtain the semantic vectors of entities in the user's search content and entities in the knowledge graph, determine the semantic similarity and semantic distance between entities in the user's search content and entities in the knowledge graph, and then determine the entity matching degree between entities in the user's search content and entities in the knowledge graph. Based on the core query index of the entity and the entity matching degree between entities in the user's search content and entities in the knowledge graph, determine the comprehensive entity matching degree of the entities in the knowledge graph, and determine the entity matching candidate set based on the comprehensive entity matching degree. Based on the graph structure, entities with relationships are identified. Based on the entities with relationships, the degree of matching between entities and entities in the candidate set is determined. Based on the degree of matching between entities and entities in the candidate set and the comprehensive entity matching degree, the query relevance score of entities in the candidate set is obtained. Based on the query relevance score of entities, the course information retrieved based on the user's search content is determined, thus completing the intelligent course search based on the knowledge graph. The method for calculating the core query index for each entity based on the frequency of entity occurrences in the entity set of the user's search content and the distance between different entities includes the following specific methods: in, Indicates the first item in the user's search results The core query index for each entity; This indicates the number of entities in the user's search query. Indicates the first item in the user's search results The frequency of occurrence of each entity; The entity set representing the user's search content has removed the first [item name]. After the first entity, the first The frequency of occurrence of each entity; The entity set representing the user's search content has removed the first [item name]. After the first entity, the first The entity and the first The distance between entities; The formula for calculating the comprehensive entity matching degree of entities in a knowledge graph is: in, Represents the first in a knowledge graph The overall entity matching degree of each entity; Indicates the first item in the user's search results The core query index for each entity; Entities representing the user's search results Entities in knowledge graphs Entity matching degree; This indicates the number of entities in the user's search query.

2. The intelligent course search method based on knowledge graphs according to claim 1, characterized in that, The specific methods for obtaining the entity set of the user's search content are as follows: The text sequence of user search content after stop word removal is processed using the named entity recognition model BERT-BiLSTM-CRF to obtain the entity set of the user's search content.

3. The intelligent course search method based on knowledge graphs according to claim 1, characterized in that, The specific methods for obtaining the semantic vectors of entities in the user's search content and entities in the knowledge graph include: Each entity in the user's search query and each entity in the knowledge graph are input into the BERT model to obtain the semantic vector of each entity.

4. The intelligent course search method based on knowledge graphs according to claim 1, characterized in that, The method for obtaining semantic similarity is as follows: the cosine similarity between the semantic vector of the entity in the user's search content and the semantic vector of the entity in the knowledge graph is recorded as the semantic similarity between the two entities.

5. The intelligent course search method based on knowledge graphs according to claim 1, characterized in that, The semantic distance is obtained by recording the edit distance between the entity in the user's search content and the entity in the knowledge graph as the semantic distance between the two entities.

6. The intelligent course search method based on knowledge graphs according to claim 1, characterized in that, The specific methods for determining the entity matching degree between the entities in the user's search content and the entities in the knowledge graph are as follows: The first semantic distance is the sum of the semantic distance between the entity in the user's search content and the entity in the knowledge graph and the first adjustment parameter. The linearly normalized value of the ratio of the semantic similarity between the entity in the user's search content and the entity in the knowledge graph to the first semantic distance is denoted as the entity matching degree between the two entities.

7. The intelligent course search method based on knowledge graphs according to claim 1, characterized in that, The method for obtaining the entity matching candidate set is as follows: the set of entities corresponding to the comprehensive entity matching degree that is greater than or equal to the selection threshold is denoted as the entity matching candidate set.

8. The intelligent course search method based on knowledge graphs according to claim 1, characterized in that, The specific methods for determining entities with relationships based on the graph structure and determining the degree of matching between entities in the candidate set based on the entities with relationships are as follows: Entities connected by edges in the graph structure are denoted as entities with relationships. Each entity in the entity matching candidate set is denoted as the entity to be analyzed. The number of other entities in the entity matching candidate set that have relationships with the entity to be analyzed is denoted as the degree of the entity to be analyzed.

9. The intelligent course search method based on knowledge graphs according to claim 1, characterized in that, The specific methods for determining the course information retrieved based on the user's search content by scoring the query relevance of entities and completing the intelligent course search based on knowledge graphs are as follows: Sort the query relevance scores of all entities in the entity matching candidate set in descending order, and output the course data corresponding to the entities in the entity matching candidate set in the sorted order. The output course data is the course information retrieved based on the user's search content.

Citation Information

Patent Citations

  • Intelligent question and answer method and system based on knowledge graph

    CN116204625A

  • Government affair service field multi-strategy fusion dialogue method based on knowledge graph

    CN116628172A