Knowledge graph multi-cluster reasoning retrieval method and device, equipment and medium

Through the combination of multi-cluster inference algorithm and large language model scoring mechanism, the problems of complex topological structure and cross-graph fusion in knowledge graph inference are solved, and efficient and accurate knowledge graph inference is achieved, which is suitable for scenarios such as medical diagnosis and financial risk control.

CN120409700APending Publication Date: 2025-08-01TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510577230.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing technology cannot effectively handle complex topological structures such as multiple starting nodes, long-distance connections, and forks/loops, and it is difficult to support high-order logical expressions, and it is difficult to fusion across graphs, resulting in low efficiency and insufficient accuracy in scenarios such as medical diagnosis and financial risk control.

Method used

The multi-cluster inference algorithm is used for triple iterative processing, combined with the large language model (LLM) scoring mechanism, and through batch processing and dynamic queue management, parallelometers are supported to realize efficient processing of complex topological structures and cross-graph heterogeneous data fusion.

Benefits of technology

It improves the efficiency and accuracy of knowledge graph reasoning, supports multi-entity answer output, reduces redundant calculations, and reduces hardware resource consumption. It is suitable for complex scenarios such as medical diagnosis and financial risk control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409700A_ABST
    Figure CN120409700A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of knowledge graph reasoning, in particular to a knowledge graph multi-cluster reasoning retrieval method and device, equipment and a medium, and the method comprises the following steps: obtaining question data of a user, and positioning an initial node in a knowledge graph according to the question data; and performing triple iteration processing on the initial node based on a multi-cluster reasoning algorithm, after the iteration processing is finished, constructing at least one knowledge sub-graph according to the triple corresponding to each dequeue node in the iteration processing process, inputting the at least one knowledge sub-graph and the problem data into a large language model, and outputting a retrieval result of the problem data by the large language model. Therefore, the problems of low efficiency, insufficient accuracy and the like in scenes of medical diagnosis, financial risk control and the like due to the fact that reasoning requirements of complex logic, topological structures and multi-map fusion cannot be simultaneously met in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of knowledge graph reasoning, and particularly relates to a knowledge graph multi-cluster reasoning and retrieval method, device, equipment and medium. Background Art

[0002] The field of knowledge graph reasoning mainly relies on traditional methods such as multi-hop reasoning to process simple queries through chain or path reasoning, but faces the following limitations:

[0003] 1. Linearization of path processing: It is unable to effectively process complex topological structures such as multiple starting nodes, long-distance connections, and bifurcations / loops;

[0004] 2. Insufficient logical expression ability: It is difficult to support high-order logical expressions (such as the mixed nesting of existential quantifiers conjunction ∧, disjunction ∨);

[0005] 3. Difficulty in heterogeneous data fusion: There is a lack of an efficient mechanism for joint reasoning across knowledge graphs (such as clinical diagnosis and treatment KG and scientific research literature KG);

[0006] 4. Insufficient efficiency and globality: Traditional methods mainly output a single path and cannot batch process large-scale graph data, resulting in low reasoning efficiency and incomplete answer coverage.

[0007] The above limitations may cause related technologies to be unable to simultaneously meet the reasoning requirements of complex logic, topological structures, and multi-knowledge graph fusion, resulting in problems such as low efficiency and insufficient accuracy when applied in scenarios such as medical diagnosis and financial risk control. Summary of the Invention

[0008] This application provides a knowledge graph multi-cluster reasoning and retrieval method, device, equipment and medium to solve the problems that related technologies cannot simultaneously meet the reasoning requirements of complex logic, topological structures, and multi-knowledge graph fusion, resulting in low efficiency and insufficient accuracy when applied in scenarios such as medical diagnosis and financial risk control.

[0009] The first aspect of the embodiments of this application provides a knowledge graph multi-cluster reasoning and retrieval method, including the following steps: obtaining the problem data of the user, and locating the initial node in the knowledge graph according to the problem data; performing iterative processing on the initial node for triples based on the multi-cluster reasoning algorithm, where the multi-cluster reasoning algorithm includes using the initial node as the dequeued node in the first iteration processing stage, and starting from the second iteration processing stage, in each iteration process, using the processing result of the previous iteration processing stage as the dequeued node in the current iteration processing stage; after the iterative processing ends, constructing at least one knowledge subgraph according to the triples corresponding to each dequeued node in the iterative processing process, and inputting the at least one knowledge subgraph and the problem data into a large language model, and the large language model outputs the retrieval result of the problem data.

[0010] Optionally, locate the initial node in the knowledge graph according to the question data, including: calculating the question vector of the question data; performing a vector similarity query based on the connection of the question; and locating the initial node in the knowledge graph according to the query result.

[0011] Optionally, perform iterative processing of multi-cluster inference retrieval of triples based on the initial node, including: initializing the target queue and the target set; adding the initial node as the dequeued node to the target queue, obtaining associated triples based on the dequeued node of the target queue, and calculating the association degree score of the associated triples; in each iteration process, determining the processing result of the current iteration processing stage according to the association degree score and the association importance threshold, and adding the processing result to the target set.

[0012] Optionally, determining the processing result of the current iteration processing stage according to the association degree score and the association importance threshold, and adding the processing result to the target set, including: judging whether the association degree score is greater than the association importance threshold; if the association degree score is greater than or equal to the association importance threshold, adding the triples with the association degree score greater than or equal to the association importance threshold to the target set; if the association degree score is less than the association importance threshold, filtering out the triples with the association degree score less than the association importance threshold.

[0013] Optionally, calculating the association degree score of the associated triples, including: generating a query text according to the associated triples; serializing the dequeued node and the query text into a prompt; inputting the prompt into the large language model, and the large language model outputs the association degree score of the associated triples, where the calculation formula of the association degree score is embedded in the large language model.

[0014] Optionally, construct at least one knowledge subgraph according to the triples corresponding to each dequeued node in the iterative processing process, including: supplementing the unconnected relationship edges in at least one knowledge subgraph based on the knowledge graph; obtaining the triples corresponding to the unconnected relationship edges in at least one knowledge subgraph; and constructing at least one knowledge subgraph according to the triples corresponding to each dequeued node and the triples corresponding to the unconnected relationship edges.

[0015] Optionally, before locating the initial node in the knowledge graph according to the question data, including: identifying the application field of the question data; and matching the knowledge graph according to the application field.

[0016] In the second aspect of the embodiments of the present application, a knowledge graph multi-cluster inference retrieval device is provided, including: a positioning module, configured to obtain the question data of the user and locate the initial node in the knowledge graph according to the question data; a multi-cluster inference module, configured to perform iterative processing of triples on the initial node based on a multi-cluster inference algorithm, where the multi-cluster inference algorithm includes using the initial node as the dequeued node in the first iteration processing stage, and starting from the second iteration processing stage, in each iteration process, using the processing result of the previous iteration processing stage as the dequeued node in the current iteration processing stage; a generation module, configured to, after the iterative processing ends, construct at least one knowledge subgraph according to the triples corresponding to each dequeued node in the iterative processing process, input the at least one knowledge subgraph and the question data into a large language model, and the large language model outputs the retrieval result of the question data.

[0017] In the third aspect of the embodiments of the present application, an electronic device is provided, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the knowledge graph multi-cluster inference retrieval method as in the above embodiments.

[0018] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and the program is executed by a processor to be used to implement the knowledge graph multi-cluster inference retrieval method as in the above embodiments.

[0019] Therefore, the present application includes the following beneficial effects:

[0020] The embodiments of the present application can support parallel computing and improve efficiency through batch processing and dynamic queue management; based on the scoring mechanism of the LLM (Large Language Model), the path selection is more accurate, enhancing the accuracy; applicable to complex scenarios such as medical diagnosis and financial risk control, supporting the output of multi-entity answers, with wide application; reducing redundant calculations, reducing hardware resource consumption, and saving resources. Therefore, the embodiments of the present application can break through the limitations of traditional linear path reasoning, support the efficient processing of cluster topology structures; enhance the logical expression ability, compatible with high-order logical expressions; realize the fusion reasoning of cross-graph heterogeneous data; improve the reasoning efficiency and answer globality of large-scale knowledge graphs.

[0021] The additional aspects and advantages of the present application will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and / or additional aspects and advantages of the present application will become obvious and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0023] Figure 1Flowchart of the knowledge graph multi-cluster inference retrieval method according to an embodiment of the present application;

[0024] Figure 2 Flowchart of the multi-cluster inference algorithm according to an embodiment of the present application;

[0025] Figure 3 Example diagram of a triple according to an embodiment of the present application;

[0026] Figure 4 Block diagram of the knowledge graph multi-cluster inference retrieval device according to an embodiment of the present application;

[0027] Figure 5 Structural schematic diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0028] The embodiments of the present application will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, but should not be construed as limiting the present application.

[0029] In order to solve the problems that the related technologies cannot simultaneously meet the inference requirements of complex logic, topological structures, and multi-graph fusion, resulting in low efficiency and insufficient accuracy in scenarios such as medical diagnosis and financial risk control, the embodiments of the present application can adopt the following methods:

[0030] 1. Multi-cluster parallel inference method: Based on a multi-node batch processing mechanism with a dynamic queue, it supports parallel inference and path expansion of complex topological structures.

[0031] 2. LLM semantic scoring mechanism: Fuses knowledge graph triples with query texts into prompts, and realizes path relevance scoring and dynamic pruning through LLM.

[0032] 3. Cross-graph fusion inference method: Under a unified scoring standard, synchronously expands multi-source graph nodes to achieve semantic alignment and joint inference of heterogeneous data.

[0033] 4. Dynamic queue management mechanism: Combines batch processing, loop detection, and bidirectional node expansion to optimize inference efficiency and global coverage.

[0034] 5. Application method in the medical field: For pathological mechanism inference, generates an interpretable causal chain (such as the HPV carcinogenic process) through sub-graph construction and loop analysis.

[0035] 6. System architecture implementation scheme: A pipeline architecture including initialization, batch processing, and scoring modules, which supports multi-graph access and efficient inference.

[0036] The knowledge graph multi-cluster inference retrieval method, apparatus, device, and storage medium according to the embodiments of the present application will be described below with reference to the accompanying drawings. Specifically, Figure 1 It is a schematic flowchart of a knowledge graph multi-cluster inference retrieval method provided by an embodiment of the present application.

[0037] As Figure 1 shown, the knowledge graph multi-cluster inference retrieval method includes the following steps:

[0038] In step S101, obtain the user's question data, and locate the initial node in the knowledge graph according to the question data.

[0039] It can be understood that the question data includes the user's specific question, which can be obtained through methods such as voice and text input. For example, the question data can be "What is the pathological process of HPV infecting squamous epithelial cells?", and the initial nodes are "HPV" and "squamous epithelial cells".

[0040] In the embodiments of the present application, locating the initial node in the knowledge graph according to the question data includes: calculating the question vector of the question data; performing a vector similarity query according to the question connection; and locating the initial node in the knowledge graph according to the query result.

[0041] It can be understood that in the embodiments of the present application, after the user's question is input, the initial node can be located in the knowledge graph according to the vector similarity query of the question. For example, when the user's question input is "What is the pathological process of HPV infecting squamous epithelial cells?", the initial nodes "HPV" and "squamous epithelial cells" are located in the knowledge graph according to the vector similarity query of the question.

[0042] In the embodiments of the present application, before locating the initial node in the knowledge graph according to the question data, it includes: identifying the application field of the question data; and matching the knowledge graph according to the application field.

[0043] It can be understood that the application field can include fields such as the medical field and financial risk control. In specific use, it is specifically determined according to the user's usage requirements. For example, if the user needs to query medical-related content, the application field is the medical field. According to the recognition result of the question data, such as keywords including medical-related content, etc., the knowledge graph of the medical field is obtained.

[0044] In step S102, perform iterative processing of triples on the initial node based on the multi-cluster inference algorithm. Among them, the multi-cluster inference algorithm includes using the initial node as the dequeue node in the first iteration processing stage. Starting from the second iteration processing stage, in each iteration process, use the processing result of the previous iteration processing stage as the dequeue node of the current iteration processing stage.

[0045] It can be understood that the embodiments of the present application can perform batch processing through a multi-cluster inference algorithm. Through batch processing and dynamic queue management, parallel computing is supported, thereby reducing the number of iterations and improving the multi-cluster inference retrieval efficiency of the knowledge graph. It can break through the limitations of traditional linear path inference, support the efficient processing of cluster topologies, enhance logical expression capabilities, be compatible with higher-order logical expressions, achieve fusion inference of cross-graph heterogeneous data, and improve the inference efficiency and answer globality of large-scale knowledge graphs.

[0046] In the embodiments of the present application, the iterative processing of triples for the initial node based on the multi-cluster inference algorithm includes: initializing a target queue and a target set; adding the initial node as a dequeued node to the target queue, obtaining associated triples based on the dequeued node of the target queue, and calculating the association degree score of the associated triples; in each iteration process, determining the processing result of the current iteration processing stage according to the association degree score and the association importance threshold, and adding the processing result to the target set.

[0047] Among them, the association importance threshold is the scoring critical value for screening associated triples based on the association degree score. For example, it can be set to 5 or 6, etc. Those skilled in the art can set it specifically without specific limitation.

[0048] It can be understood that based on the scoring mechanism of the LLM, the path selection in the embodiments of the present application is more accurate, enhancing accuracy; it is applicable to complex scenarios such as medical diagnosis and financial risk control, supports the output of multi-entity answers, and has wide application; it reduces redundant calculations, reduces hardware resource consumption, and saves resources.

[0049] In the embodiments of the present application, determining the processing result of the current iteration processing stage according to the association degree score and the association importance threshold, and adding the processing result to the target set includes: judging whether the association degree score is greater than the association importance threshold; if the association degree score is greater than or equal to the association importance threshold, adding the triples with the association degree score greater than or equal to the association importance threshold to the target set; if the association degree score is less than the association importance threshold, filtering out the triples with the association degree score less than the association importance threshold.

[0050] For example, taking the dequeued nodes: HPV and squamous epithelial cells as an example, · Obtain associated triples and perform scoring: (HPV, infection mechanism, skin and mucosal contact) [importance = 7, the triple is added to set T, and skin and mucosal contact is added to queue Q]; (HPV-E6 protein, is the main viral protein, HPV) [importance = 4, pruned]; (HPV-E7 protein, is the main viral protein, HPV) [importance = 4, pruned]; (squamous epithelial cells, as the targeted host cell, HPV viral DNA integration) [importance = 9, the triple is added to set T, and HPV viral DNA integration is added to queue Q]; (squamous epithelial cells, controlled exfoliation, estrogen) [importance = 3, pruned]; (squamous epithelial cells, shape, fish scale-like) [importance = 2, pruned]; (squamous epithelial cells, differentiation regulator, p53 protein) [importance = 4, pruned].

[0051] In the embodiment of the present application, calculating the relevance score of associated triples includes: generating a query text according to the associated triple; serializing the dequeued node and the query text into prompt words; inputting the prompt words into a large language model, and the large language model outputs the relevance score of the associated triple, wherein the calculation formula of the relevance score is embedded in the large language model.

[0052] It can be understood that the embodiment of the present application can use the LLM to score the relevance between the triple and the query, screen high-confidence results, and thus, based on the scoring mechanism of the large language model, the path selection is more accurate.

[0053] The large model scores based on the question and the target triple, and the corresponding relevance scoring formula is:

[0054]

[0055] Among them, P is the system prompt word that describes the scoring requirements to the large model (which can be flexibly formulated according to different task requirements), Q is the question description, is the text string corresponding to the triple sequence to be scored.

[0056] Therefore, the embodiment of the present application can implement parallel reasoning with multiple starting nodes and complex topologies through a multi-cluster reasoning algorithm; combine semantic understanding to enhance the accuracy of path selection, adaptively expand the reasoning range, avoid local optimal traps, and implement dynamic queue management; achieve joint reasoning of heterogeneous data through a unified scoring standard and have the ability to fuse cross-graphs. As Figure 2 shown, the multi-cluster reasoning algorithm includes the following modules:

[0057] 1. Initialization module: Initialize the queue with the query entity node and store the nodes to be processed;

[0058] 2. Batch processing module: Dequeue nodes in batches and obtain their associated triples;

[0059] 3. Scoring Module: Use the LLM to score the relevance between triples and queries, and filter out high-confidence results;

[0060] 4. Dynamic Queue Management Module: Dynamically adjust the queue according to the scoring results to expand the inference scope;

[0061] 5. Comprehensive Retrieval Module: Output a set of relevant triples instead of a single path.

[0062] Specifically, the multi-cluster inference algorithm process is described as follows:

[0063] (1) Initialization: Use the initial entity node E extracted from the query s to initialize the queue Q, and use the empty set T to store triples.

[0064] (2) Iterative processing: When Q is not empty, dequeue E_t in batches, and obtain the in-out edge triples of each node e i and summarize them into L t . Scoring and selection: Serialize L t and the query text T Q into the prompt P t , score it with the large language model to generate S t . If the score is greater than the threshold, add the triple to the set T, and if the corresponding new node has not been traversed, add it to the queue Q.

[0065] (3) Termination: Repeat until Q is empty.

[0066] (4) Output: Return T, which contains all relevant triples.

[0067] The above process ensures comprehensive coverage of complex queries through batch processing and dynamic expansion, and is suitable for a clustered topology.

[0068] In step S103, after the iterative processing ends, at least one knowledge subgraph is constructed according to the triples corresponding to each dequeued node in the iterative processing process, and at least one knowledge subgraph and the question data are input into the large language model, and the large language model outputs the retrieval result of the question data.

[0069] It can be understood that after the iterative processing ends, the embodiments of the present application can obtain a knowledge subgraph. The knowledge subgraph is used as part of the prompt word in the form of triples and input into the large model together with the question, so that the model strictly generates according to the content of the retrieved knowledge subgraph to obtain the retrieval result of the question data.

[0070] In the embodiments of the present application, at least one knowledge subgraph is constructed according to the triples corresponding to each dequeued node in the iterative processing process, including: supplementing the unconnected relationship edges in at least one knowledge subgraph based on the knowledge graph; obtaining the triples corresponding to the unconnected relationship edges in at least one knowledge subgraph; and constructing at least one knowledge subgraph according to the triples corresponding to each dequeued node and the triples corresponding to the unconnected relationship edges.

[0071] It can be understood that after the iterative processing is completed, the embodiments of the present application can obtain the triples included in the knowledge subgraph, supplement the unconnected relationship edges therein based on the knowledge graph, further obtain the triples, and integrate all the above-mentioned triples related to the problem to obtain the final knowledge subgraph.

[0072] According to the knowledge graph multi-cluster reasoning and retrieval method proposed in the embodiments of the present application, through batch processing and dynamic queue management, parallel computing can be supported, improving efficiency; based on the scoring mechanism of the LLM, path selection is more accurate, enhancing accuracy; it is applicable to complex scenarios such as medical diagnosis and financial risk control, supports the output of multi-entity answers, and has wide application; redundant calculations are reduced, hardware resource consumption is reduced, and resources are saved. Thus, the embodiments of the present application can break through the limitations of traditional linear path reasoning, support the efficient processing of cluster-like topological structures; enhance logical expression capabilities, and be compatible with high-order logical expressions; achieve the fusion reasoning of cross-graph heterogeneous data; and improve the reasoning efficiency and answer globality of large-scale knowledge graphs.

[0073] The following uses a knowledge graph reasoning case in the medical field to further elaborate on the knowledge graph multi-cluster reasoning and retrieval method. This case is based on a medical knowledge graph containing entities such as diseases, symptoms, and treatment methods, and demonstrates how to perform knowledge retrieval through the multi-cluster reasoning method. The specific process is as follows:

[0074] 1. Initialization phase.

[0075] The user's question input is: "What is the pathological process of HPV infecting squamous epithelial cells?". The system first locates the initial nodes "HPV" and "squamous epithelial cells" in the knowledge graph according to the vector similarity of the question, adds them to the queue Q, and initializes an empty set T to store relevant triples. The associated importance threshold is set to 5.

[0076] The first round of iteration:

[0077] Dequeued nodes: HPV, squamous epithelial cells.

[0078] Obtain associated triples and perform LLM scoring:

[0079] (HPV, infection mechanism, skin and mucosal contact) [importance = 7, the triple is added to the set T, and skin and mucosal contact is added to the queue Q];

[0080] (HPV-E6 protein, which is a major viral protein, HPV) [Importance = 4, pruning];

[0081] (HPV-E7 protein, which is a major viral protein, HPV) [Importance = 4, pruning];

[0082] (Squamous epithelial cells, as the targeted host cells, HPV virus DNA integration) [Importance = 9, the triple is added to set T, and HPV virus DNA integration is added to queue Q];

[0083] (Squamous epithelial cells, controlled exfoliation, estrogen) [Importance = 3, pruning];

[0084] (Squamous epithelial cells, shaped like fish scales) [Importance = 2, pruning];

[0085] (Squamous epithelial cells, differentiation regulatory factor, p53 protein) [Importance = 4, pruning].

[0086] The second iteration:

[0087] Dequeue node: Skin and mucosal contact, HPV virus DNA integration.

[0088] Obtain associated triples and perform LLM scoring:

[0089] (Skin and mucosal contact, high-risk scenario, sexual contact) [Importance = 3, pruning];

[0090] (Skin and mucosal contact, may cause, contact dermatitis) [Importance = 2, pruning];

[0091] (HPV virus DNA integration, produces, HPV-E6 protein) [Importance = 6, the triple is added to set T, and E6 oncogene is added to queue Q];

[0092] (HPV virus DNA integration, produces, HPV-E7 protein) [Importance = 6, the triple is added to set T, and E7 oncogene is added to queue Q].

[0093] The third iteration:

[0094] Dequeue node: HPV-E6 protein, HPV-E7 protein.

[0095] Obtain associated triples and perform LLM scoring:

[0096] (HPV-E6 protein, degrades, p53 protein) [Importance = 6, the triple is added to set T, and p53 protein is added to queue Q];

[0097] (HPV-E7 protein, inhibits, Rb protein) [Importance = 6, the triple is added to set T, and Rb protein is added to queue Q];

[0098] (Cervical cancer screening indicator, includes, HPV-E6 protein) [Importance = 4, pruning];

[0099] (Cervical cancer screening indicator, includes, HPV-E7 protein) [Importance = 4, pruning];

[0100] Fourth iteration:

[0101] Dequeued nodes: p53 protein, Rb protein.

[0102] Obtain associated triples and perform LLM scoring:

[0103] (p53 protein, inhibits, cell carcinogenesis) [Importance = 8, the triple is added to set T, and cell carcinogenesis is added to queue Q];

[0104] (Rb protein, complexes with, transcription factor E2F) [Importance = 6, the triple is added to set T, and transcription factor E2F is added to queue Q].

[0105] Fifth iteration:

[0106] Dequeued nodes: cell carcinogenesis, transcription factor E2F.

[0107] Obtain associated triples and perform LLM scoring:

[0108] (Unhealthy lifestyle habits, may lead to, cell carcinogenesis) [Importance = 1, pruning];

[0109] (Low immunity, may lead to, cell carcinogenesis) [Importance = 4, pruning];

[0110] (Transcription factor E2F, regulates, cell cycle) [Importance = 7, the triple is added to set T, and cell cycle is added to queue Q].

[0111] Sixth iteration:

[0112] Dequeued node: cell cycle.

[0113] Obtain associated triples and perform LLM scoring:

[0114] (Cell cycle, out-of-control leads to, cell carcinogenesis) [Importance = 6, a cycle is detected because cell carcinogenesis has been added to the queue before, so the triple is added to set T, but cell carcinogenesis is not added to queue Q];

[0115] (Cell cycle, includes, interphase) [Importance = 3, pruning];

[0116] (Cell cycle, includes, mitosis) [Importance = 4, pruning];

[0117] (DNA content analysis, detects, cell cycle) [Importance = 2, pruning].

[0118] The queue is empty, end the iteration.

[0119] 3. Sub-graph construction.

[0120] After the iteration ends, the obtained knowledge sub-graph contains the triples shown in Table 1.

[0121] Table 1

[0122] Head entity Relationship Tail entity HPV Infection mechanism Skin and mucosal contact Squamous epithelial cells As the targeted host cells HPV viral DNA integration HPV viral DNA integration Produce HPV-E6 protein HPV viral DNA integration Produce HPV-E7 protein HPV-E6 protein Degrade p53 protein HPV-E7 protein Inhibit Rb protein p53 protein Inhibit Cell carcinogenesis Rb protein Complex Transcription factor E2F Transcription factor E2F Regulate Cell cycle Cell cycle Out-of-control leads to Cell carcinogenesis

[0123] Based on the knowledge graph, supplement the unconnected relationship edges, and further obtain the triples shown in Table 2.

[0124] Table 2

[0125] Head entity Relationship Tail entity Squamous epithelial cells Differentiation regulator p53 protein HPV Reproduction mode HPV viral DNA integration HPV Has major viral proteins HPV-E6 protein HPV Has major viral proteins HPV-E7 protein

[0126] Integrate all the above triples related to the problem, and obtain the final Figure 3 as shown in the knowledge sub-graph.

[0127] Figure 3 The knowledge sub-graph shown is used as part of the prompt word in the form of triples and input to the large model together with the question, allowing the model to generate strictly according to the content of the retrieved knowledge sub-graph, and obtain the following answer:

[0128] (1) Infection mechanism: HPV infects the host through skin and mucosal contact and selectively targets squamous epithelial cells (Relationship: HPV → Infection mechanism → Skin and mucosal contact; Squamous epithelial cells → As the targeted host cells → HPV viral DNA integration). Viral DNA integration and protein expression: After the HPV viral DNA integrates into the host cell (HPV → Reproduction method → HPV viral DNA integration), two key oncoproteins, HPV-E6 and HPV-E7, will be expressed (HPV → Has the main viral proteins → HPV-E6 protein; HPV → Has the main viral proteins → HPV-E7 protein).

[0129] (2) Mechanism of action of key proteins: The HPV-E6 protein exerts its effect by degrading the p53 protein in squamous epithelial cells (HPV-E6 protein → degradation → p53 protein). The p53 protein originally has the function of inhibiting cell carcinogenesis (p53 protein → inhibition → cell carcinogenesis), and is also a cell differentiation regulatory factor (squamous epithelial cells → differentiation regulatory factor → p53 protein). The HPV-E7 protein exerts its effect by inhibiting the Rb protein (HPV-E7 protein → inhibition → Rb protein). Under normal circumstances, the Rb protein binds to the transcription factor E2F to form a complex (Rb protein → complex → transcription factor E2F), thereby regulating the cell cycle (transcription factor E2F → regulation → cell cycle).

[0130] (3) Carcinogenic mechanism: The combined action of the above two proteins leads to the loss of control of the cell cycle (cell cycle → loss of control leading to → cell carcinogenesis). Specifically, the loss of function of the p53 protein weakens the anti-cancer effect, while the inactivation of the Rb protein causes over-activation of E2F, ultimately driving abnormal cell proliferation and carcinogenesis.

[0131] Therefore, in the application level, the embodiments of this application can enhance the controllability and interpretability of the model generation in tasks that require comprehensive external complex knowledge relationships through the method of retrieval-augmented generation. When the quality of the corresponding knowledge graph is good, the quality of the content generated by the model can also be guaranteed accordingly, reducing model hallucinations. In the above-mentioned implementation case, it is specifically reflected that the content of the model answer focuses on the pathological category, explains the corresponding detailed process, and attaches the corresponding knowledge basis.

[0132] It has high application value for small-scale models: First, in resource-constrained scenarios (such as edge computing or mobile deployment), small models can output professional-level answers at a low computing cost through the precise guidance of the knowledge graph, significantly narrowing the performance gap with large models. Second, externalizing domain knowledge into an editable triple structure enables knowledge updates without retraining the model; only by maintaining the graph can the timeliness of the model be dynamically improved, which is particularly important for rapidly evolving medical fields such as virus mutation research. In addition, by corresponding the reasoning process to the graph relationship chain, the credibility of the results is enhanced, and users can trace the logical path of relevant mechanisms layer by layer. This architecture of "small model + high-quality knowledge engine" provides a feasible AI empowerment solution for scenarios such as primary medical institutions and medical education that require low cost and high credibility.

[0133] Secondly, a knowledge graph multi-cluster inference retrieval device according to an embodiment of the present application is described with reference to the accompanying drawings.

[0134] Figure 4 It is a block diagram of the knowledge graph multi-cluster inference retrieval device according to an embodiment of the present application.

[0135] AsFigure 4 As shown in Figure 4 , the multi-cluster inference retrieval device 10 of the knowledge graph includes: a positioning module 100, a multi-cluster inference module 200, and a generation module 300.

[0136] Among them, the positioning module 100 is used to obtain the question data of the user and locate the initial node in the knowledge graph according to the question data; the multi-cluster inference module 200 is used to perform iterative processing of triples on the initial node based on the multi-cluster inference algorithm. Among them, the multi-cluster inference algorithm includes using the initial node as the dequeued node in the first iteration processing stage. Starting from the second iteration processing stage, in each iteration process, the processing result of the previous iteration processing stage is used as the dequeued node in the current iteration processing stage; the generation module 300 is used to, after the iterative processing ends, construct at least one knowledge subgraph according to the triples corresponding to each dequeued node in the iterative processing process, input the at least one knowledge subgraph and the question data into the large language model, and the large language model outputs the retrieval result of the question data.

[0137] It should be noted that the foregoing explanation of the embodiment of the knowledge graph multi-cluster inference retrieval method is also applicable to the knowledge graph multi-cluster inference retrieval device of this embodiment, and will not be elaborated here.

[0138] The knowledge graph multi-cluster inference retrieval device proposed according to the embodiment of the present application can support parallel computing and improve efficiency through batch processing and dynamic queue management; based on the scoring mechanism of the LLM, the path selection is more accurate and the accuracy is enhanced; it is applicable to complex scenarios such as medical diagnosis and financial risk control, supports the output of multi-entity answers, and has wide application; reduces redundant calculations, reduces hardware resource consumption, and saves resources. Therefore, the embodiment of the present application can break through the limitations of traditional linear path reasoning, support the efficient processing of cluster topology structures; enhance logical expression capabilities, and be compatible with high-order logical expressions; realize the fusion reasoning of cross-graph heterogeneous data; improve the reasoning efficiency and answer globality of large-scale knowledge graphs.

[0139] Figure 5 FIG. Figure 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may include:

[0140] A memory 501, a processor 502, and a computer program stored on the memory 501 and executable on the processor 502.

[0141] When the processor 502 executes the program, it implements the knowledge graph multi-cluster inference retrieval method provided in the above embodiment.

[0142] Furthermore, the electronic device further includes:

[0143] A communication interface 503 for communication between the memory 501 and the processor 502.

[0144] A memory 501 for storing a computer program that can run on a processor 502.

[0145] The memory 501 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0146] If the memory 501, the processor 502, and the communication interface 503 are implemented independently, the communication interface 503, the memory 501, and the processor 502 can be interconnected through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 5 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0147] Optionally, in a specific implementation, if the memory 501, the processor 502, and the communication interface 503 are integrated on a chip, the memory 501, the processor 502, and the communication interface 503 can communicate with each other through an internal interface.

[0148] The processor 502 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0149] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned knowledge graph multi-cluster inference retrieval method is implemented.

[0150] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. In this specification, the schematic expressions of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or N embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0151] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of such features. In the description of this application, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0152] Any process or method description shown in a flowchart or described in other ways herein can be understood to represent a module, segment, or part of code including one or N executable instructions for implementing a customized logical function or process, and the scope of the preferred embodiments of this application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in a reverse order according to the involved functions, rather than in the order shown or discussed, which should be understood by those skilled in the technical field to which the embodiments of this application belong.

[0153] It should be understood that the various parts of this application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, the steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware as in another embodiment, any one or a combination of the following well-known technologies in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays, field programmable gate arrays, etc.

[0154] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method for implementing the above embodiments can be completed by instructing relevant hardware through a program, and the above program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0155] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A method for multi-cluster reasoning retrieval of a knowledge graph, characterized in that It includes the following steps: Obtain the problem data of the user, and locate the initial node in the knowledge graph according to the problem data; Perform iterative processing of triples on the initial node based on the multi-cluster reasoning algorithm, where the multi-cluster reasoning algorithm includes using the initial node as the dequeued node in the first iteration processing stage, and starting from the second iteration processing stage, in each iteration process, using the processing result of the previous iteration processing stage as the dequeued node in the current iteration processing stage; After the iterative processing ends, construct at least one knowledge subgraph according to the triples corresponding to each dequeued node in the iterative processing process, input the at least one knowledge subgraph and the problem data into the large language model, and the large language model outputs the retrieval result of the problem data.

2. The knowledge graph multi-cluster reasoning retrieval method according to claim 1, characterized in that The locating the initial node in the knowledge graph according to the problem data includes: Calculate the problem vector of the problem data; Perform vector similarity query according to the problem connection; Locate the initial node in the knowledge graph according to the query result.

3. The knowledge graph multi-cluster reasoning and retrieval method according to claim 1, wherein The performing iterative processing of triples on the initial node based on the multi-cluster reasoning algorithm includes: Initialize the target queue and the target set; Add the initial node as the dequeued node to the target queue, obtain the associated triples based on the dequeued node of the target queue, and calculate the association degree score of the associated triples; In each iteration process, determine the processing result of the current iteration processing stage according to the association degree score and the association importance threshold, and add the processing result to the target set.

4. The knowledge graph multi-cluster inference retrieval method according to claim 3, characterized in that The determining the processing result of the current iteration processing stage according to the association degree score and the association importance threshold, and adding the processing result to the target set includes: Judge whether the association degree score is greater than the association importance threshold; If the association degree score is greater than or equal to the association importance threshold, add the triples with the association degree score greater than or equal to the association importance threshold to the target set; If the association degree score is less than the association importance threshold, filter out the triples with the association degree score less than the association importance threshold.

5. The knowledge graph multi-cluster reasoning and retrieval method according to claim 3, wherein The calculating the association degree score of the associated triples includes: Generate a query text according to the associated triples; Serialize the dequeued node and the query text into a prompt; Input the prompt into the large language model, and the large language model outputs the association degree score of the associated triples, where the calculation formula of the association degree score is embedded in the large language model.

6. The knowledge graph multi-cluster inference retrieval method according to claim 1, wherein The constructing at least one knowledge subgraph according to the triples corresponding to each dequeued node in the iterative processing process includes: Supplement the unconnected relationship edges in the at least one knowledge subgraph based on the knowledge graph; Obtain the triples corresponding to the unconnected relationship edges in the at least one knowledge subgraph; Construct at least one knowledge subgraph according to the triples corresponding to each dequeued node and the triples corresponding to the unconnected relationship edges.

7. The knowledge graph multi-cluster reasoning retrieval method according to claim 1, wherein Before locating the initial node in the knowledge graph according to the problem data, it includes: Identify the application field of the problem data; Match the knowledge graph according to the application field.

8. A knowledge graph multi-cluster inference and retrieval device, characterized in that, It includes: A positioning module, configured to obtain the problem data of the user and locate the initial node in the knowledge graph according to the problem data; A multi-cluster reasoning module, configured to perform iterative processing of triples on the initial node based on a multi-cluster reasoning algorithm, wherein the multi-cluster reasoning algorithm includes using the initial node as the dequeued node in the first iteration processing stage, and starting from the second iteration processing stage, in each iteration process, using the processing result of the previous iteration processing stage as the dequeued node in the current iteration processing stage; A generation module, configured to, after the iterative processing ends, construct at least one knowledge subgraph according to the triples corresponding to each dequeued node in the iterative processing process, input the at least one knowledge subgraph and the problem data into a large language model, and the large language model outputs the retrieval result of the problem data.

9. An electronic device, characterized in that, Comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the knowledge graph multi-cluster reasoning retrieval method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instruction is executed, it implements the knowledge graph multi-cluster reasoning retrieval method according to any one of claims 1-7.