A search ranking method based on knowledge community discovery
By using a knowledge community-based discovery approach, semantic vectors are generated using domain knowledge graphs and large language models to extract key nodes. This solves the problem of difficulty in linking user intent with entities associated with the knowledge graph in existing technologies, thereby improving the performance and response speed of search ranking.
Patent Information
- Application Number
- CN202511478420.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-10-16
AI Technical Summary
Existing technologies struggle to semantically understand user queries and the potential knowledge of knowledge graphs as a whole in the field of information retrieval, making it difficult to link user intent with potentially related entities in the knowledge graph, especially in vertical domains where large language models perform poorly.
Community detection is performed based on domain knowledge graphs to form knowledge communities. Topics and descriptive texts are generated using large language models. Semantic vectors of query terms are generated through semantic space vectors to recall relevant knowledge communities. Key nodes are extracted using node degree as an indicator to form a knowledge-enhanced document set. A knowledge-enhanced ranking factor is calculated and incorporated into the ranking score.
It has implemented a global semantic understanding domain knowledge graph, which accurately matches user queries with relevant nodes, improving search ranking performance and response speed.
Smart Images

Figure CN120950562B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a search ranking method, in particular to a search ranking method based on knowledge community discovery. BACKGROUND
[0002] In the current information retrieval field, in the ranking stage, a neural network model in the related field is usually trained to rank the recalled content. On this basis, some methods of integrating knowledge graph technology into search ranking are also used, for example, relying on the field knowledge graph to query and correct the user's search words, entity linking and the like, so as to improve the accuracy of the search, but generally these methods are only the local association of the knowledge graph, and can only mine the local relevant information, and do not have semantic understanding of the user's query and the potential knowledge of the knowledge graph as a whole, and it is difficult to link the user's true intention with the potential associated entities in the knowledge graph.
[0003] Since the advent of large language model technology, some methods of using large language model technology to empower search have appeared in the search field. For example, inputting the document to be ranked into a large model, and letting the large model directly rank the document to output the ranked result. This method has better improvement on the performance of ranking in the general field, but in the vertical field, the large model needs to have a deep understanding of the knowledge in the field, so as to obtain better results. SUMMARY
[0004] The technical problem to be solved by the application is to provide a search ranking method based on knowledge community discovery.
[0005] In order to solve the above technical problems, the application discloses a search ranking method based on knowledge community discovery, comprising the following steps:
[0006] Step 1, based on the field knowledge graph in the field to be searched, different knowledge communities are formed, and the community structure of the knowledge graph is obtained;
[0007] Step 2, for each knowledge community, a large model is used to generate a theme and a description text;
[0008] Step 3, generating a semantic space vector according to the theme and the description text of each knowledge community;
[0009] Step 4, in the recall stage of the search, generating a semantic vector of the query word according to the query word input by the user, and recalling a candidate data set;
[0010] Step 5, in the candidate data set, the n knowledge communities most similar to the query word are retrieved as the relevant knowledge communities according to the semantic vector of the query word;
[0011] Step 6: Select m nodes from n relevant knowledge communities to obtain a node set containing m*n nodes;
[0012] Step 7: Take the intersection of the content to be retrieved (i.e., the documents to be sorted) and the node set obtained in Step 5 to obtain the knowledge-enhanced candidate document set;
[0013] Step 8: Calculate the scores of documents in the knowledge-enhanced candidate document set using the knowledge-enhanced ranking method;
[0014] Step 9: Sort the documents according to their scores and return the results to the user, completing the search ranking based on knowledge community discovery.
[0015] Furthermore, the formation of different knowledge communities mentioned in step 1 includes:
[0016] Based on the existing domain knowledge graph in the domain to be searched, a community detection algorithm is used to divide the nodes in the domain knowledge graph into different knowledge communities, forming the community structure of the knowledge graph.
[0017] Furthermore, step 2, which describes generating topic and descriptive text using a large model, includes:
[0018] Step 2-1: Create prompt word templates to generate topics and descriptions for each knowledge community;
[0019] Step 2-2: Based on the community structure of the knowledge graph, obtain the attributes of nodes and relationships in the knowledge community, fill them into the prompt word template in Step 2-1, and generate prompt words;
[0020] Step 2-3: Input the prompt words generated in Step 2-2 into the large language model to generate the topics and descriptions of the knowledge community.
[0021] Furthermore, the generation of semantic space vectors in step 3 includes:
[0022] The topic and descriptive text of each knowledge community are input into the Embedding model to obtain the semantic vector representation of each knowledge community.
[0023] Furthermore, the generation of the semantic vector for the query term in step 4 includes:
[0024] The user-input query terms are embedded using an embedding model to obtain semantic vectors for the query terms.
[0025] Furthermore, the recall candidate dataset mentioned in step 4 includes:
[0026] Using text-based recall and vector-based recall methods, the relevance score between the query term and the target data to be retrieved is calculated. Based on the correlation score Obtain candidate datasets.
[0027] Furthermore, step 5, which involves retrieving and ranking the n knowledge communities most similar to the query term based on its semantic vector, includes:
[0028] Calculate the similarity between the semantic vector of the query term and the semantic space vector of each knowledge community;
[0029] Sort the communities by similarity and identify the n closest related knowledge communities.
[0030] Furthermore, step 6, which involves selecting m nodes from n relevant knowledge communities, includes:
[0031] Sort the nodes in the n related knowledge communities in descending order of degree, and select the top m nodes with the largest degree in each related knowledge community to obtain a node set containing m*n nodes.
[0032] Furthermore, step 8, which involves calculating the scores of documents in the knowledge-enhanced candidate document set using the knowledge-enhanced ranking method, includes:
[0033] Step 8-1: Each document in the knowledge-enhanced candidate document set corresponds to a node in the knowledge graph. Let the degree of each node be... Then the degree value of each document is ;
[0034] Step 8-2, calculate the knowledge-enhancing ranking factor, as follows:
[0035] ;
[0036] in, This indicates the importance weight of the knowledge-enhancing ranking factor in the overall ranking score calculation. The first document in the knowledge enhancement candidate document set The degree value of a document. Indicates a candidate file set for knowledge enhancement The number of documents contained therein The first document in the knowledge enhancement candidate document set Knowledge-enhancing ranking factor for each document;
[0037] Step 8-3: Enhance knowledge ranking factors This score is then combined with the relevance score calculated during the recall phase to obtain a new ranking score, as detailed below:
[0038] ;
[0039] in, Indicates the first The ranking score of each document.
[0040] Furthermore, the sorting based on document scores described in step 9 includes:
[0041] Sort in descending order based on the new sort score.
[0042] Beneficial effects:
[0043] 1. Based on the accumulated domain knowledge graph, this invention divides the knowledge graph into communities, understands the knowledge structure in the domain knowledge graph from a global high-level semantic perspective, and discovers potential key nodes that are closely related to user concerns.
[0044] 2. This invention summarizes and generalizes information from knowledge communities based on a large language model, accurately generates topic text containing key information from the knowledge community, and then embeds it to more accurately match nodes related to user query terms.
[0045] 3. This invention uses the degree of nodes in relevant knowledge communities as an indicator to extract key nodes in the community. While focusing on key points, it can reduce additional computation and does not affect the search response speed. Attached Figure Description
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.
[0047] Figure 1 This is a schematic diagram of the search ranking process based on knowledge community discovery.
[0048] Figure 2 This is a diagram illustrating knowledge community discovery and community topic description. Detailed Implementation
[0049] This invention provides a search ranking method based on knowledge community discovery, combining the text understanding and summarization capabilities of domain knowledge graphs and large language models to improve search ranking performance. This invention achieves a holistic understanding of the semantic structure of the domain knowledge graph through semantic mining. Based on this understanding, it identifies the entities most relevant to the user's search based on user characteristics and query terms. During search ranking, the inherent knowledge of the domain knowledge graph is incorporated as part of the ranking score, thereby enhancing search ranking performance.
[0050] The principle of this invention is as follows: A search ranking method based on knowledge community discovery is provided. Based on a domain knowledge graph, a community detection algorithm is used to divide the domain knowledge graph into knowledge communities, obtaining the knowledge structure of the knowledge graph from a global semantic level. Based on the attribute data of nodes and relationships in the knowledge communities and the text understanding and summarization generation capabilities of a large language model, a topic and descriptive text for each knowledge community are generated. When a user enters a query term for searching, the semantic vectors of the query term and the knowledge community topic description are used to retrieve several relevant knowledge communities that are semantically closest to the query term. Then, using node degree as a metric, key nodes are extracted from the relevant knowledge communities to form a knowledge-enhanced node set. In the search ranking stage, the intersection of the documents to be ranked and the knowledge-enhanced node set is taken to obtain a knowledge-enhanced document set. A knowledge-enhanced ranking factor is calculated for the documents in the knowledge-enhanced document set. Finally, the knowledge-enhanced ranking factor is incorporated into the ranking score calculation in a weighted manner to obtain a new ranking score.
[0051] like Figure 1 As shown, the technical solution adopted in this invention is as follows: A search ranking method based on knowledge community discovery includes the following steps:
[0052] Step 1, as follows Figure 2 As shown, community detection algorithms are used to discover communities based on existing domain knowledge graphs, forming different knowledge communities and obtaining a knowledge community network of the knowledge graph.
[0053] Step 1 includes:
[0054] Step 1-1: Based on the existing domain knowledge graph, use a community detection algorithm to divide the nodes in the graph into different knowledge communities.
[0055] Step 2: For each knowledge community, use the large model to generate the topic and descriptive text for each knowledge community.
[0056] Step 2 includes:
[0057] Step 2-1: Create prompt word templates for generating knowledge community topics and descriptions.
[0058] Step 2-2: Based on the knowledge community network formed in Step 1-1, obtain the attributes of the main nodes and relationships in the network, fill them into the prompt word template in Step 2-1, and generate prompt words.
[0059] Step 2-3: Input the prompt words generated in Step 2-2 into the large language model to generate the corresponding knowledge community topics and descriptions.
[0060] Steps 2-4: Store the knowledge community topics and descriptions generated in Step 2-3 into a structured database.
[0061] Step 3: Embedding model is used to embed the topic and description text of each knowledge community to generate semantic space vectors, which are then stored in a vector database.
[0062] Step 3 includes:
[0063] Step 3-1: Input the knowledge community topics and description text generated in 2-3 into the Embedding model to obtain the semantic vector representation of each knowledge community.
[0064] Step 3-2: Store the semantic vector of the knowledge community obtained in Step 3-1 into the vector database.
[0065] Step 4: When a user enters a query term to search, the search system first uses methods such as text recall and vector recall to quickly obtain a candidate dataset of a certain size related to the query term from massive amounts of data. Each data point in the candidate dataset contains a relevance score calculated during recall. Based on the recalled candidate dataset, in the subsequent ranking stage, the search system embeds the user's query terms using the Embedding model from step 3 to obtain the semantic vectors of the query terms. Then, based on the similarity between the semantic vectors of the query terms and the topic and description vectors of the knowledge communities, it finds the n most semantically similar knowledge communities to the query terms.
[0066] Step 4 includes:
[0067] Step 4-1: When a user enters a query term to search, the search system first uses methods such as text recall and vector recall to quickly obtain a candidate dataset of a certain size related to the query term from massive amounts of data. Each data point in the candidate dataset contains a relevance score calculated during recall. .
[0068] Step 4-2: Based on the candidate dataset recalled in Step 4-1, the search system embeds the user's query terms using the Embedding model in Step 3-1 in the subsequent ranking stage to obtain the semantic vector of the query terms.
[0069] Step 4-3: Take the semantic vector of the query term obtained in Step 4-2 and retrieve the n knowledge community topics that are most similar to the semantic vector of the query term from the vector database, corresponding to the n most relevant knowledge communities.
[0070] Step 5: For each relevant knowledge community, sort the nodes in reverse order according to their degree, select the top m nodes with the highest degree, and obtain a node set containing m*n nodes.
[0071] Step 5 includes:
[0072] Step 5-1: Based on the n knowledge communities obtained in Step 4-2, sort the nodes in the communities in reverse order according to their degree, and select the top m nodes with the largest degree in each knowledge community to obtain the knowledge enhancement node set.
[0073] Step 6: In the search and ranking stage, the intersection of the documents to be ranked and the node set obtained in Step 5 is taken to obtain the knowledge-enhanced candidate document set. When calculating the document score in the ranking stage, for documents belonging to the knowledge-enhanced candidate document set, a knowledge-enhanced ranking factor item is added according to the optimized weight.
[0074] Step 6 includes:
[0075] Step 6-1: In the search and sorting stage, based on the knowledge-enhanced node set obtained in Step 5-1, the intersection of the node set with the documents to be sorted is taken to obtain the knowledge-enhanced document set S.
[0076] Step 6-2: In the knowledge-enhanced document set in Step 6-1, each document corresponds to a node in the knowledge graph, and the degree of each node is d. Therefore, each document in the knowledge-enhanced document set has a degree value d. The degree d in the knowledge-enhanced document set is calculated based on the knowledge graph.
[0077] Step 6-3: Based on the document degree obtained in Step 6-2, calculate the knowledge enhancement ranking factor according to the following formula:
[0078] ;
[0079] in, This indicates the importance weight of the knowledge-enhancing ranking factor in the overall ranking score calculation. The first document in the knowledge enhancement candidate document set The degree value of a document. Indicates a candidate file set for knowledge enhancement The number of documents contained therein The first document in the knowledge enhancement candidate document set Knowledge-enhanced ranking factor for each document.
[0080] Step 6-4: Calculate the knowledge enhancement ranking factor for each data point in the knowledge enhancement document set in accordance with Step 6-3. Then, combine the relevance score calculated during recall with the knowledge enhancement ranking factor according to the following formula to obtain a new ranking score.
[0081]
[0082] Step 7: Sort the scores calculated in Step 6 in reverse order and return them to the user.
[0083] Step 7 includes:
[0084] Step 7-1: Sort the scores calculated in step 6-4 in reverse order and return them to the user.
[0085] In summary, this invention is a method to improve search ranking performance by combining the text understanding and summarization capabilities of domain knowledge graphs and large language models. First, based on the domain knowledge graph, a community detection algorithm is used to divide the domain knowledge graph into knowledge communities. Each knowledge community has its own independent topic expression at the semantic level, thus enabling a global understanding of the semantic structure of the knowledge graph. Next, a prompt word template is developed to generate the topic and description of each knowledge community using a large language model. Based on the node and relationship data of each knowledge community, prompt words are generated and input into the large language model. Leveraging the large language model's text understanding and summarization capabilities, the topic and description text for each knowledge community are output. When a user enters a query term, the semantic vectors of the query term and the knowledge community topic description are used to retrieve the several relevant knowledge communities that are semantically closest to the query term. Then, using node degree as a metric, key nodes are extracted from the relevant knowledge communities to form a knowledge-enhanced node set. During the search ranking stage, the intersection of the documents to be ranked and the knowledge-enhanced node set is taken to obtain a knowledge-enhanced document set. A knowledge-enhanced ranking factor is calculated for the documents in the knowledge-enhanced document set. Finally, the knowledge-enhanced ranking factor is weighted and incorporated into the ranking score calculation to obtain a new ranking score.
[0086] Example:
[0087] This invention provides a specific embodiment of a search ranking method based on knowledge community discovery, the scheme of which is as follows:
[0088] First, based on the domain knowledge graph, a community detection algorithm is used to divide the domain knowledge graph into knowledge communities. Each knowledge community has its own independent topic expression at the semantic level, which allows for a global understanding of the semantic structure of the knowledge graph. Next, a prompt word template is developed to generate topic descriptions for each knowledge community using a large language model. Based on the node and relationship data of each knowledge community, prompt words are generated and input into the large language model. Leveraging the large language model's text understanding and summarization capabilities, the topic and description text for each knowledge community are output. When a user enters a query, the semantic vectors of the query and the knowledge community topic descriptions are used to retrieve the most semantically similar related knowledge communities. Then, using node degree as a metric, key nodes are extracted from the related knowledge communities to form a knowledge-enhanced node set. During the search ranking stage, the intersection of the documents to be ranked and the knowledge-enhanced node set is taken to obtain a knowledge-enhanced document set. A knowledge-enhanced ranking factor is calculated for the documents in the knowledge-enhanced document set. Finally, the knowledge-enhanced ranking factor is weighted and incorporated into the ranking score calculation to obtain a new ranking score.
[0089] Step 1: Based on the existing domain knowledge graph, use community detection algorithms to discover communities, form different knowledge communities, and obtain the community structure of the knowledge graph.
[0090] Step 1 includes:
[0091] Step 1-1: Based on the existing domain knowledge graph, use a community detection algorithm to divide the nodes in the graph into different knowledge communities.
[0092] Step 1-1 includes:
[0093] Step 1-1-1: Use the Leiden algorithm (reference: From Louvain to Leiden: guaranteeing well-connected communities) to detect communities in the knowledge graph and save the detected community information to a structured database.
[0094] Step 2: For each knowledge community, use the large model to generate the topic and descriptive text for each community.
[0095] Step 2 includes:
[0096] Step 2-1: Create prompt word templates for generating knowledge community topics and descriptions.
[0097] Step 2-1 includes:
[0098] Step 2-1-1: Create a template for generating prompts for knowledge community topics and descriptions. A sample template is shown below:
[0099] [{“role”: “system”, “content”: “Based on the node and relationship information in the given knowledge graph, summarize the theme and description of this knowledge graph.”},
[0100] {“role”: “user”, “content”: “The given knowledge graph’s node and relationship information is as follows: node information: {nodeInfo}, relationship information: {relationInfo}.”}]
[0101] In the above prompt template, `nodeInfo` is a placeholder for node information in the knowledge community, including the node's ID, attribute values, etc., and is filled into the prompt template in the form of a JSON string. `relationInfo` is a placeholder for relationship information in the knowledge community, including the relationship's starting point ID, relationship attribute values, etc., and is also filled into the prompt template in the form of a JSON string.
[0102] Step 2-2: Based on the community network formed in Step 1-1, obtain the attribute data of the main nodes and relationships in the knowledge community network, fill them into the prompt word template in Step 2-1, and generate prompt words.
[0103] Taking the book industry as an example, the attribute data of nodes in a community network are as follows:
[0104] {
[0105] "id": "101",
[0106] “bookName”: “Pytorch Deep Learning in Practice”,
[0107] "topic": "Artificial Intelligence"
[0108] "Introduction": "This book introduces PyTorch tensors, data loading, and monitoring training through an example of building a deep learning system."
[0109] },
[0110] {
[0111] "id": "102",
[0112] “bookName”: “Spark Fast Big Data Analysis”
[0113] "topic": "Data Science"
[0114] "Introduction": "This book introduces the use of Spark and methods for optimizing Spark through a wealth of examples."
[0115] },
[0116] {
[0117] “id”: “201”,
[0118] "subjectName": "Artificial Intelligence",
[0119] "relatedSubjects": ["Data Science", "Computer Technology"]
[0120] },
[0121] {
[0122] "id": "202",
[0123] “subjectName”: “Data Science”
[0124] "relatedSubjects": ["Artificial Intelligence"]
[0125] }
[0126] The attribute data of the main relationships are:
[0127] {
[0128] “relationId”: “301”,
[0129] “startNodeId”: “101”,
[0130] “endNodeId”: “201”,
[0131] “relationName”: “discipline”,
[0132] "relationWeight": 0.98
[0133] },
[0134] {
[0135] “relationId”: “302”,
[0136] “startNodeId”: “101”,
[0137] “endNodeId”: “202”,
[0138] “relationName”: “discipline”,
[0139] "relationWeight": 0.6
[0140] },
[0141] {
[0142] “relationId”: “303”,
[0143] “startNodeId”: “102”,
[0144] “endNodeId”: “201”,
[0145] “relationName”: “discipline”,
[0146] "relationWeight": 0.3
[0147] },
[0148] {
[0149] “relationId”: “304”,
[0150] “startNodeId”: “102”,
[0151] “endNodeId”: “202”,
[0152] “relationName”: “discipline”,
[0153] "relationWeight": 0.96
[0154] }
[0155] By filling the attribute values of the nodes and relationships in the example above into the prompt word template, you can obtain a complete prompt word.
[0156] Step 2-3: Input the prompt words generated in Step 2-2 into the large language model to generate the corresponding knowledge community topics and descriptions.
[0157] Steps 2-4: Store the knowledge community topics and descriptions generated in Step 2-3 into a structured database.
[0158] Step 3 includes:
[0159] Step 3-1: Input the knowledge community topics and description text generated in 2-3 into the Embedding model to obtain the semantic vector representation of each knowledge community.
[0160] Step 3: Embed the topics and descriptive text of each knowledge community using an embedding model (currently popular embedding models such as Qwen3-Embedding series models, etc.) to generate semantic space vectors, which are then stored in a vector database.
[0161] Step 3-1 includes:
[0162] Step 3-1-1: Concatenate the topic and description text of each knowledge community, and input the concatenated text into the Embedding model to obtain the semantic vector of the knowledge community topic.
[0163] Step 3-2: Store the semantic vector of the knowledge community obtained in Step 3-1 into the vector database.
[0164] Step 4: When a user enters a query term to search, the search system first uses methods such as text recall and vector recall to quickly obtain a candidate dataset of a certain size related to the query term from massive amounts of data. Each data point in the candidate dataset contains a relevance score calculated during recall. Based on the recalled candidate dataset, in the subsequent ranking stage, the search system embeds the user's query terms using the Embedding model from step 3 to obtain the semantic vectors of the query terms. Then, based on the similarity between the semantic vectors of the query terms and the topic and description vectors of the knowledge communities, it finds the n most semantically similar knowledge communities to the query terms.
[0165] Step 4 includes:
[0166] Step 4-1: When a user enters a query term to search, the search system first uses methods such as text recall and vector recall to quickly obtain a candidate dataset of a certain size related to the query term from massive amounts of data. Each data point in the candidate dataset contains a relevance score calculated during recall. .
[0167] Step 4-2: Based on the candidate dataset recalled in Step 4-1, the search system embeds the user-input query terms and user information using the Embedding model in Step 3-1 in the subsequent ranking stage to obtain the semantic vector of the query terms.
[0168] Step 4-2 includes:
[0169] Step 4-2-1: Write a template for generating semantic vectors of query terms. A sample template is shown below:
[0170] { “content”: “User information: {userInfo}, User's query term: {query}.”}
[0171] Here, userInfo is a string placeholder describing user information; query is a placeholder for the query term entered by the user.
[0172] Step 4-2-2: Fill the user information and the query terms entered by the user into the template in Step 4-1-1 to obtain the prompt words for generating the semantic vector of the query terms. Then, input the prompt words into the Embedding model used in Step 3-1 to obtain the semantic vector of the user's query terms.
[0173] Step 4-3: Take the semantic vector of the query term obtained in Step 4-1 and retrieve the n knowledge community topics that are most similar to the semantic vector of the query term from the vector database, corresponding to the n most relevant knowledge communities.
[0174] Step 5: For each relevant knowledge community, sort the nodes in reverse order according to their degree (the number of edges connecting to the node), and select the top m nodes with the highest degree to obtain a node set containing m*n nodes.
[0175] Step 5 includes:
[0176] Step 5-1: Based on the n knowledge communities obtained in Step 4-2, sort the nodes in the communities in reverse order according to their degree, and select the top m nodes with the largest degree in each knowledge community to obtain the knowledge enhancement node set.
[0177] Step 6: In the search ranking stage, the intersection of the documents to be ranked (the content being retrieved) and the node set obtained in Step 5 is taken to obtain the knowledge-enhanced candidate document set. When calculating the document score in the ranking stage, for documents belonging to the knowledge-enhanced candidate document set, a knowledge-enhanced ranking factor item is added according to the optimized weight.
[0178] Step 6 includes:
[0179] Step 6-1: In the search and ranking stage, based on the knowledge-enhanced node set obtained in Step 5-1, the intersection of the node set with the candidate dataset to be ranked is taken to obtain the knowledge-enhanced document set S.
[0180] Step 6-2: In the knowledge-enhanced document set in Step 6-1, each document corresponds to a node in the knowledge graph, and the degree of each node is d. Therefore, each document in the knowledge-enhanced document set has a degree value d. The degree d in the knowledge-enhanced document set is calculated based on the knowledge graph.
[0181] Step 6-3: Based on the document degree obtained in Step 6-2, calculate the knowledge enhancement ranking factor according to the following formula. :
[0182] ;
[0183] in, This indicates the importance weight of the knowledge-enhancing ranking factor in the overall ranking score calculation. The first document in the knowledge enhancement candidate document set The degree value of a document. Indicates a candidate file set for knowledge enhancement The number of documents contained therein The first document in the knowledge enhancement candidate document set Knowledge-enhanced ranking factor for each document.
[0184] Step 6-4: Calculate the knowledge enhancement ranking factor for each data point in the knowledge-enhanced document set as in Step 6-3. Then, combine the relevance score calculated during recall with the knowledge enhancement ranking factor using the following formula to obtain a new ranking score. .
[0185]
[0186] Step 7: Sort the scores calculated in Step 6 in reverse order and return them to the user.
[0187] Step 7 includes:
[0188] Step 7-1: Sort the scores calculated in step 6-4 in reverse order and return them to the user.
[0189] In summary, this invention is a method to improve search ranking performance by combining the text understanding and summarization capabilities of domain knowledge graphs and large language models. First, based on the domain knowledge graph, a community detection algorithm is used to divide the domain knowledge graph into knowledge communities. Each knowledge community has its own independent topic expression at the semantic level, thus enabling a global understanding of the semantic structure of the knowledge graph. Next, a prompt word template is developed to generate topic descriptions for each knowledge community using a large language model. Based on the node and relationship data of each knowledge community, prompt words are generated and input into the large language model. Leveraging the large language model's text understanding and summarization capabilities, the topic and description text for each knowledge community are output. When a user enters a query term, the semantic vectors of the query term and the knowledge community topic descriptions are used to retrieve the several relevant knowledge communities that are semantically closest to the query term. Then, using node degree as a metric, key nodes are extracted from the relevant knowledge communities to form a knowledge-enhanced node set. During the search ranking stage, the intersection of the documents to be ranked and the knowledge-enhanced node set is taken to obtain a knowledge-enhanced document set. A knowledge-enhanced ranking factor is calculated for the documents in the knowledge-enhanced document set. Finally, the knowledge-enhanced ranking factor is weighted and incorporated into the ranking score calculation to obtain a new ranking score.
[0190] In its specific implementation, this application provides a computer storage medium and a corresponding data processing unit. The computer storage medium is capable of storing a computer program, which, when executed by the data processing unit, can run the invention's content regarding a search and ranking method based on knowledge community discovery, as well as some or all of the steps in various embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0191] Those skilled in the art will clearly understand that the technical solutions in the embodiments of the present invention can be implemented using computer programs and their corresponding general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of computer programs, i.e., software products. These computer program software products can be stored in a storage medium and include several instructions to cause a device containing a data processing unit (which may be a personal computer, server, microcontroller, MCU, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.
[0192] This invention provides an idea and method for a search ranking method based on knowledge community discovery. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A search ranking method based on knowledge community discovery, characterized in that, Includes the following steps: Step 1: Based on the domain knowledge graph within the domain to be searched, different knowledge communities are formed to obtain the community structure of the knowledge graph; Step 2: For each knowledge community, use a large model to generate topic and descriptive text; Step 3: Generate semantic space vectors based on the topics and descriptive texts of each knowledge community; Step 4: In the search recall phase, based on the query terms entered by the user, semantic vectors of the query terms are generated, and candidate datasets are recalled. Step 5: In the candidate dataset, retrieve the n knowledge communities most similar to the query term based on the semantic vector of the query term as relevant knowledge communities; Step 6: Select m nodes from n relevant knowledge communities to obtain a node set containing m*n nodes; Step 7: Take the intersection of the content to be retrieved (i.e., the documents to be sorted) and the node set obtained in Step 5 to obtain the knowledge-enhanced candidate document set; Step 8: Calculate the scores of documents in the knowledge-enhanced candidate document set using the knowledge-enhanced ranking method; Step 9: Sort the documents according to their scores and return the results to the user, completing the search ranking based on knowledge community discovery; The recall candidate dataset mentioned in step 4 includes: Using text-based recall and vector-based recall methods, the relevance score between the query term and the target data to be retrieved is calculated. According to the correlation score Obtain candidate datasets; Step 8, which involves calculating the scores of documents in the knowledge-enhanced candidate document set using the knowledge-enhanced ranking method, includes: Step 8-1: Each document in the knowledge-enhanced candidate document set corresponds to a node in the knowledge graph. Let the degree of each node be... Then the degree value of each document is ; Step 8-2, calculate the knowledge-enhancing ranking factor, as follows: ; in, This indicates the importance weight of the knowledge-enhancing ranking factor in the overall ranking score calculation. The first document in the knowledge enhancement candidate document set The degree value of a document. Indicates a candidate file set for knowledge enhancement The number of documents contained therein The first document in the knowledge enhancement candidate document set Knowledge-enhancing ranking factor for each document; Step 8-3: Enhance knowledge ranking factors This score is then combined with the relevance score calculated during the recall phase to obtain a new ranking score, as detailed below: ; in, Indicates the first The ranking score of each document.
2. The search and ranking method based on knowledge community discovery according to claim 1, characterized in that, The formation of different knowledge communities mentioned in step 1 includes: Based on the existing domain knowledge graph in the domain to be searched, a community detection algorithm is used to divide the nodes in the domain knowledge graph into different knowledge communities, forming the community structure of the knowledge graph.
3. The search and ranking method based on knowledge community discovery according to claim 2, characterized in that, Step 2, which describes generating topic and descriptive text using a large model, includes: Step 2-1: Create prompt word templates to generate topics and descriptions for each knowledge community; Step 2-2: Based on the community structure of the knowledge graph, obtain the attributes of nodes and relationships in the knowledge community, fill them into the prompt word template in Step 2-1, and generate prompt words; Step 2-3: Input the prompt words generated in Step 2-2 into the large language model to generate the topics and descriptions of the knowledge community.
4. The search and ranking method based on knowledge community discovery according to claim 3, characterized in that, Step 3, generating semantic space vectors, includes: The topic and descriptive text of each knowledge community are input into the Embedding model to obtain the semantic vector representation of each knowledge community.
5. The search and ranking method based on knowledge community discovery according to claim 4, characterized in that, Step 4, which involves generating the semantic vector of the query term, includes: The user-input query terms are embedded using an embedding model to obtain semantic vectors for the query terms.
6. The search and ranking method based on knowledge community discovery according to claim 5, characterized in that, Step 5, which involves retrieving and ranking the n knowledge communities most similar to the query term based on its semantic vector, includes: Calculate the similarity between the semantic vector of the query term and the semantic space vector of each knowledge community; Sort the communities by similarity and identify the n closest related knowledge communities.
7. The search and ranking method based on knowledge community discovery according to claim 6, characterized in that, Step 6, which involves selecting m nodes from n relevant knowledge communities, includes: Sort the nodes in the n related knowledge communities in descending order of degree, and select the top m nodes with the largest degree in each related knowledge community to obtain a node set containing m*n nodes.
8. The search ranking method based on knowledge community discovery according to claim 7, characterized in that, The sorting based on document scores mentioned in step 9 includes: Sort in descending order based on the new sort score.
Citation Information
Patent Citations
Online intelligent question answering method and device based on instruction fine tuning and retrieval enhancement generation
CN117688163A
Multi-knowledge-base retrieval and answer integration optimization method, retrieval enhancement generation system, equipment and medium
CN119312896A