Intelligent question and answer method and device, electronic equipment and storage medium

By combining vector indexing and lightweight knowledge graphs, the problems of insufficient semantic understanding and accuracy in intelligent question answering for tumor genomics are solved, enabling fast and accurate answer generation and low-resource maintenance.

CN121765040APending Publication Date: 2026-03-31DIGITAL HEALTH CHINA TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In the field of tumor genomics, existing technologies struggle to achieve efficient, accurate, and rapid intelligent question answering. Traditional retrieval techniques cannot understand semantics, general large language models may produce illusions, and classic RAG technology has insufficient retrieval accuracy and consumes a lot of computational resources.

Method used

A dual-track retrieval method is adopted, which combines coarse searching with vector indexing and fine searching with lightweight knowledge graph. The answer is generated by matching the semantic relevance and entity association between the query vector and the candidate text slice, combined with a large language model.

Benefits of technology

It achieves millisecond-level response and high-precision intelligent question answering, avoiding semantic gaps and illusions, and supports rapid updates to the knowledge base and low-resource maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121765040A_ABST
    Figure CN121765040A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent question and answer method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a query statement of a user for tumor genomics, and converting the query statement into a query vector; according to the query vector, determining a plurality of candidate text slices related to query vector semantics from a pre-constructed vector index, and determining a to-be-queried entity in the query statement; according to the to-be-queried entity and a pre-constructed lightweight knowledge graph, determining a graph association degree between the to-be-queried entity and the entity in each candidate text slice; and determining an answer of the query statement according to the plurality of graph association degrees. According to the method provided by the invention, the pure semantic similarity of the traditional RAG is upgraded into semantic-entity-relationship triple matching through double-track retrieval of'vector index rough search + knowledge graph fine search ', and accurate answers are provided in a highly professional and fast update scene of tumor genomics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary fields of artificial intelligence, bioinformatics, and medical information technology. Specifically, this invention relates to an intelligent question-answering method, device, electronic device, and storage medium. Background Technology

[0002] With the widespread adoption of high-throughput sequencing technology, the field of tumor genomics has generated massive amounts of multimodal data, including academic literature (such as PubMed papers), clinical guidelines (such as NCCN and CSCO guidelines), gene variant databases (such as COSMIC and OncoKB), clinical trial data, and real-world clinical diagnostic and treatment data. This data is a valuable resource for guiding precision oncology treatment. However, the following prominent issues hinder its effective utilization: 1. Data silos and multimodality: Data is scattered across different databases and documents in various formats (structured, semi-structured, unstructured), making it difficult to perform unified queries and correlation analysis.

[0003] 2. High professional barriers: The knowledge is highly specialized, containing a large number of professional terms such as gene names, variant forms, and drug targets, requiring in-depth domain knowledge to accurately understand and retrieve information.

[0004] 3. Rapid knowledge updates: New research findings, drugs, and clinical guidelines are constantly emerging, requiring the knowledge base to have the ability to be updated rapidly.

[0005] 4. Limitations of existing retrieval technologies: Traditional keyword retrieval (such as search engines) cannot understand semantics, resulting in coarse search results, low accuracy, and the inability to provide a comprehensive answer directly.

[0006] General-domain large language models: Although they can generate fluent text, their internal knowledge may be outdated, unprofessional, or even produce "illusions" by fabricating non-existent medical facts, which is extremely dangerous in medical scenarios.

[0007] Classical RAG technology: While it partially solves the problems of illusion and knowledge updating by introducing external knowledge bases, it faces challenges when dealing with complex fields such as tumor genomics. a. Insufficient retrieval precision: Traditional vector similarity retrieval may return relevant but imprecise document fragments. For example, it may retrieve general information about the BRAF gene, but fail to pinpoint the key knowledge point that "BRAF V600E mutations are resistant to cetuximab in colorectal cancer".

[0008] b. Context window limitation: When it is necessary to synthesize multiple documents or evidence to answer a complex question, the classic RAG may not be able to include all relevant documents due to the limitation on the number of input tokens.

[0009] c. Processing efficiency issues: Performing full vectorization retrieval on massive amounts of documents incurs high computational and storage overhead, resulting in slow response times.

[0010] Therefore, how to conduct accurate and rapid searches in the field of tumor genomics and achieve intelligent question answering is a technical problem that urgently needs to be solved. Summary of the Invention

[0011] The technical problem to be solved by the present invention is to provide an intelligent question-answering method, device, electronic device and storage medium, which aims to solve at least one of the above-mentioned technical problems.

[0012] In a first aspect, the technical solution of the present invention to solve the above-mentioned technical problems is as follows: an intelligent question-answering method, the method comprising: Obtain the user's query statement regarding tumor genomics and convert the query statement into a query vector; Based on the query vector, multiple candidate text slices semantically related to the query vector are determined from the pre-built vector index. The vector index includes the quantized vector code corresponding to each slice text and the position identifier of each quantized vector code in the retrieval structure corresponding to the vector index. Each position identifier corresponds to the slice identifier of a slice text. Identify the entity to be queried in the query statement; Based on the entity to be queried and the pre-built lightweight knowledge graph, determine the graph association degree between the entity to be queried and the entities in each candidate text slice; The answer to the query statement is determined based on the correlation between multiple graphs.

[0013] The beneficial effects of this invention are as follows: By using a dual-track retrieval method of "coarse search with vector index + fine search with knowledge graph", the pure semantic similarity of traditional RAG is upgraded to a triple matching of semantic-entity-relationship. In the highly specialized and rapidly updating scenario of tumor genomics, this invention overcomes the semantic deficiency of keyword retrieval and avoids the illusion of a general large model, achieving millisecond-level recall, high-precision positioning, and traceable answers. Furthermore, because both quantized vectors and lightweight graphs support incremental updates, it achieves the beneficial effects of low-resource maintenance and long-term iteration.

[0014] Based on the above technical solution, the present invention can be further improved as follows.

[0015] Furthermore, the above-mentioned determination of the query answer based on multiple graph correlations includes: Based on the correlation of multiple graphs, the retrieval context is determined from multiple candidate text slices; Based on the query statement and the retrieval context, generate a prompt statement that includes the output requirements for the answer to the query statement; Input the prompt statement into the large language model to obtain the answer to the query statement.

[0016] Furthermore, the above methods also include: Multimodal tumor genomics data were collected from multiple data sources, including: medical literature, clinical guidelines, gene variant knowledge bases, drug labels, and clinical trial data; Multiple text slices were extracted from multimodal tumor genomics data based on semantics; A lightweight sentence embedding model is used to generate low-dimensional vectors for each text slice. Each low-dimensional vector is quantized and encoded to obtain multiple quantized vector codes, and a vector index is generated based on the multiple quantized vector codes. Identify multiple entities and their interrelationships from multimodal tumor genomics data; A lightweight knowledge graph is constructed based on multiple entities and the relationships between them. Each node in the lightweight knowledge graph represents an entity, and the edge between any two nodes represents the relationship between the corresponding two entities.

[0017] Furthermore, based on the entity to be queried and the pre-built lightweight knowledge graph, the graph association degree between the entity to be queried and the entities in each candidate text slice is determined, including: Based on the entity to be queried and the pre-built lightweight knowledge graph, determine the association subgraph of the entity to be queried. The association subgraph includes the associated entities of the entity to be queried, as well as the relationships between the associated entities and the entity to be queried. Based on the association subgraph and the entities in each candidate text slice, determine the graph association degree between the entity to be queried and the entities in each candidate text slice.

[0018] Furthermore, the above methods also include: Determine the vector similarity between the query vector and the text vector of each candidate text slice; Obtain the metadata of each candidate text slice, and determine the metadata weight of each candidate text slice based on the metadata of each candidate text slice; The above method determines the retrieval context from multiple candidate text slices based on multiple graph correlations, including: The vector similarity, graph correlation, and metadata weights corresponding to each candidate text slice are weighted and fused to obtain the final score for each candidate text slice. The retrieval context is determined from multiple candidate text slices based on the final scores corresponding to all candidate text slices.

[0019] Secondly, in order to solve the above-mentioned technical problems, the present invention also provides an intelligent question-answering device, the device comprising: The acquisition module is used to acquire the user's query statement for tumor genomics and convert the query statement into a query vector; The coarse search module is used to determine multiple candidate text slices that are semantically related to the query vector from a pre-built vector index based on the query vector. The vector index includes the quantized vector code corresponding to each slice text and the position identifier of each quantized vector code in the retrieval structure corresponding to the vector index. Each position identifier corresponds to the slice identifier of a slice text. The entity determination module is used to determine the entities to be queried in the query statement; The detailed search module is used to determine the graph association degree between the entity to be queried and the entities in each candidate text slice, based on the entity to be queried and the pre-built lightweight knowledge graph. The answer determination module is used to determine the answer to a query statement based on the correlation between multiple graphs.

[0020] Thirdly, in order to solve the above-mentioned technical problems, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the intelligent question-answering method of the present application.

[0021] Fourthly, in order to solve the above-mentioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the intelligent question-answering method of the present application.

[0022] Additional aspects and advantages of this application will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of this application. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below.

[0024] Figure 1 A flowchart illustrating an intelligent question-answering method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an intelligent question-answering device according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0025] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0026] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.

[0027] The solution provided in this invention can be applied to any application scenario requiring intelligent question answering in the field of tumor genomics. The solution provided in this invention can be executed by any electronic device, such as a user's terminal device, including at least one of the following: smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, smart TV, or smart in-vehicle device.

[0028] This invention provides a possible implementation, such as... Figure 1 The diagram shows a flowchart of an intelligent question-answering method. This method can be executed by any electronic device, such as a terminal device, or jointly by a terminal device and a server. For ease of description, the method provided in this embodiment will be described below using a terminal device as the execution subject. Figure 1 The flowchart shown indicates that the method may include the following steps: S10: Obtain the user's query statement for tumor genomics and convert the query statement into a query vector; S20, Based on the query vector, determine multiple candidate text slices that are semantically related to the query vector from the pre-built vector index. The vector index includes the quantized vector code corresponding to each slice text and the position identifier of each quantized vector code in the retrieval structure corresponding to the vector index. Each position identifier corresponds to the slice identifier of a slice text. S30, determine the entity to be queried in the query statement; S40, Based on the entity to be queried and the pre-built lightweight knowledge graph, determine the graph association degree between the entity to be queried and the entities in each candidate text slice; S50: Determine the answer to the query statement based on the correlation between multiple graphs.

[0029] The method of this invention upgrades the pure semantic similarity of traditional RAG to a semantic-entity-relationship triple matching through a dual-track retrieval of "coarse search with vector index + fine search with knowledge graph". In the highly specialized and rapidly updating scenario of tumor genomics, it overcomes the semantic loss of keyword retrieval and avoids the illusion of general large models, achieving millisecond-level recall, high-precision positioning, and traceable answers. Furthermore, since both quantized vectors and lightweight graphs support incremental updates, it achieves the beneficial effects of low-resource maintenance and long-term iteration.

[0030] The following specific embodiments further illustrate the solution of the present invention. In these embodiments, the purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for constructing a tumor genomics knowledge base and intelligent question answering based on lightweight retrieval enhancement. This method can efficiently integrate multimodal tumor genomics data, construct a high-quality, easily updated knowledge base, and achieve fast, accurate, and reliable intelligent question answering, providing decision support for clinicians and researchers.

[0031] Based on this, the intelligent question-answering method provided in this embodiment may include the following steps: S10: Obtain the user's query statement for tumor genomics and convert the query statement into a query vector; The query can be in natural language, such as, "What targeted therapy options are available for melanoma patients with BRAF V600E mutations?"; The method also includes: Identify key entities in the query statement; Based on the key entity, the key entity is expanded using a domain knowledge graph, i.e., querying the related entities of the key entity. The related entities are synonyms or related variations of the key entity.

[0032] Specifically, domain-named entities can be used to identify key entities in a query statement.

[0033] Based on the above scheme, the above conversion of query statements into query vectors includes: Based on key entities and related entities, a query vector is determined, which can improve recall.

[0034] S20, based on the query vector, determine multiple candidate text slices that are semantically related to the query vector from the pre-constructed vector index. The vector index includes the quantized vector code corresponding to each slice text and the position identifier of each quantized vector code in the retrieval structure corresponding to the vector index. Each position identifier corresponds to the slice identifier of a slice text. In this way, based on the query vector, multiple candidate text slices that are semantically related to the query vector can be retrieved from the vector index. It can be understood that a candidate text slice can be a sentence that expresses complete semantics.

[0035] The S20 process can be referred to as the first stage or the preliminary screening stage. The goal of this stage is to quickly narrow down the scope and ensure a high recall rate.

[0036] Alternatively, the above vector indexes can be constructed in the following way: S1 collects multimodal tumor genomics data from multiple data sources, including: medical literature, clinical guidelines, gene variant knowledge bases, drug labels, and clinical trial data; S2. Segment multiple text slices from multimodal tumor genomics data according to semantics. Specifically, a domain-aware text slicing strategy can be adopted to segment multiple text slices from multimodal tumor genomics data according to semantics. This can avoid segmenting at meaningless paragraphs (such as references and author lists) and prioritize the integrity of key knowledge units (such as paragraphs describing "clinical significance").

[0037] S3 uses a lightweight sentence embedding model to generate low-dimensional vectors for each text slice; S4. Quantize and encode each low-dimensional vector to obtain multiple quantized vector codes, and generate a vector index based on these multiple quantized vector codes. Specifically, compression techniques such as product quantization can be used to quantize and encode each low-dimensional vector. Each quantized vector code occupies little memory, thus enabling the construction of a vector index with fast retrieval speed.

[0038] The specific implementation of S20 above is as follows: perform cosine similarity batch comparison between the query vector and the quantized vector codes of each text slice in the vector index, sort them in descending order of similarity, and select the slice identifiers corresponding to the top K position identifiers to determine the candidate text slices.

[0039] S30, determine the entity to be queried in the query statement; In this context, an entity is a bounded word or phrase in the query sentence that represents a core concept in tumor genomics, including at least one of genes, variant sites, disease subtypes, drugs, biological pathways, and levels of clinical evidence. Specifically, entities can be extracted from the query sentence using a combination of rule-based and deep learning models. Other methods can also be used to extract entities from the query sentence, which will not be elaborated upon here.

[0040] S40, Based on the entity to be queried and the pre-built lightweight knowledge graph, determine the graph association degree between the entity to be queried and the entities in each candidate text slice; Among them, the graph correlation degree represents the topological affinity between the "entity to be queried" and the "entity carried by the candidate text slice" in the tumor genomics knowledge network: the higher the value, the closer the two are in the gene-variation-disease-drug relationship chain, and the more likely the slice is to contain mechanism, treatment or evidence information directly related to the query, thus reflecting the strength of its semantic-knowledge dual correlation.

[0041] Alternatively, the aforementioned lightweight knowledge graph can be constructed in the following ways: Identify multiple entities and their relationships from multimodal tumor genomics data; specifically, extract multiple entities and their relationships using a combination of rule-based and deep learning models.

[0042] A lightweight knowledge graph is constructed based on multiple entities and the relationships between them. Each node in the lightweight knowledge graph represents an entity, and the edge between any two nodes represents the relationship between the corresponding two entities.

[0043] As an example, consider phrases like "gene-mutation-cause-disease" and "drug-target-gene." This utilizes a lightweight knowledge graph as a graph-structured index to store structured relationships between entities.

[0044] Optionally, one specific implementation of the above S40 is as follows: S401, Based on the entity to be queried and the pre-built lightweight knowledge graph, determine the association subgraph of the entity to be queried. The association subgraph includes the associated entities of the entity to be queried, as well as the relationships between the associated entities and the entity to be queried. S402, Based on the association subgraph and the entities in each candidate text slice, determine the graph association degree between the entity to be queried and the entities in each candidate text slice.

[0045] Optionally, the specific implementation process of S401 above includes: 1. Node localization: Accurately match the starting node N corresponding to the entity to be queried in the lightweight knowledge graph.

[0046] 2. Breadth-first expansion by Using the root as the base, extend along the five categories of edges "gene-mutation-disease-drug-pathway" in ≤2 undirected or directed directions, with each hop retaining only the edge type related to tumor genomics (such as "mutation-cause-disease" and "drug-target-gene").

[0047] 3. Sub-image extraction Collect all nodes and edges encountered during the expansion process to form a node set V={ , , ..., } and edge set E={( , , rel1), ...}, is the “relational subgraph”; if the number of nodes exceeds the preset limit (e.g., 200), it is truncated in descending order of edge weight or node centrality to ensure that the subgraph is lightweight and highly relevant.

[0048] S50: Determine the answer to the query statement based on the correlation between multiple graphs.

[0049] Optionally, the specific implementation process of the above S50 is as follows: S501, determine the retrieval context from multiple candidate text slices based on the correlation of multiple graphs; S502, Based on the query statement and the retrieval context, generate a prompt statement, which includes the output requirements for the answer to the query statement; The output requirements refer to the requirements that the answer output by the large model must meet, including but not limited to: Large language models need to generate answers strictly based on the provided retrieval context.

[0050] The source of the output answer should be indicated (such as the name of the guide or the PMID of the literature).

[0051] For information that is uncertain or not covered by the search context, explicitly answer "unknown" or "cannot be answered according to the existing knowledge base" to avoid ambiguity.

[0052] S503: Input the prompt statement into the large language model to obtain the answer to the query statement.

[0053] The aforementioned large language model can be a fine-tuned version of a large language model based on data from the field of tumor genomics. Optionally, the general large language model can be fine-tuned under supervision using specialized texts from the field of tumor genomics to make it better at understanding and generating specialized content in this field.

[0054] Furthermore, after obtaining the answer output by the large language model, it can automatically add citation sources and format the output to make it clearer and easier to read.

[0055] The processing steps S501 and S40 mentioned above can be called the second stage or the fine-check stage. The purpose of this stage is to finely rearrange the multiple candidate text slices obtained in the first stage in order to obtain a more accurate answer.

[0056] As an example, a candidate text slice should be ranked significantly higher if it not only contains “BRAF V600E” and “melanoma”, but is also associated with the specific “dabrafenib + trametinib” combination therapy through a lightweight knowledge graph.

[0057] Optionally, the above method further includes: Determine the vector similarity between the query vector and the text vector of each candidate text slice; Obtain the metadata of each candidate text slice, and determine the metadata weight of each candidate text slice based on the metadata of each candidate text slice; Metadata refers to a collection of information describing the "external attributes" of a text slice rather than its content, and includes at least: Source authority (FDA / NCCN guidelines, top journals, reviews, databases); Year of publication or release; Levels of evidence (Level I, Level II, Level III); Document types (guidelines, clinical trials, real-world data, reviews); Database version number or PMID / DOI identifier.

[0058] Different metadata corresponds to different weights. Clinical guidelines typically have a higher weight than general reviews. Therefore, one way to determine the metadata weight of each candidate text slice is as follows: For each candidate text slice, the metadata weight can be calculated using a hierarchical enumeration-product model based on the metadata field: first, assign a basic weight according to the source type; then multiply by the corresponding level coefficient according to the evidence level; subsequently, introduce a timeliness decay coefficient according to the publication year, which decays by 5% per year with a lower limit; finally, multiply all the above coefficients together and truncate to a preset range to obtain the metadata weight of the candidate text slice.

[0059] Based on the above scheme, one specific implementation of S501 is as follows: The vector similarity, graph correlation, and metadata weights corresponding to each candidate text slice are weighted and fused to obtain the final score for each candidate text slice. Based on the final scores corresponding to all candidate text slices, the retrieval context is determined from multiple candidate text slices. The top N (e.g., N=3-5) most relevant candidate text slices are then used as the retrieval context.

[0060] To better illustrate and understand the principle of the method provided by this invention, the following description uses an optional specific embodiment to illustrate the solution of this invention. It should be noted that the specific implementation of each step in this specific embodiment should not be construed as a limitation of the solution of this invention. Other implementations that can be conceived by those skilled in the art based on the principle of the solution provided by this invention should also be considered within the scope of protection of this invention.

[0061] This embodiment takes the construction of an intelligent question-and-answer system for tumor genomics for clinicians as an example.

[0062] Knowledge base construction, which includes a lightweight knowledge graph and vector indexes: a. Data source: Integrates high-level paper abstracts from OncoKB, CIViC, NCCN guidelines, and PubMed.

[0063] b. Document parsing: Use models such as ERNIE / BERT to perform named entity recognition and extract the (gene, variant, cancer type, drug, level of evidence) quintuple.

[0064] c. Text slices: Slices are created based on "clinical significance," with each text slice describing a specific gene variant-disease-drug association.

[0065] d. Index building: Vector indexing: Slice vectors are generated using the all-MiniLM-L6-v2 lightweight model and compressed and stored using the FAISS index library.

[0066] Graph Index: Using the Neo4j graph database, quintuples are stored as paths from (gene) - [with variant] → (variant) - [in disease] → (disease) ← [targeted therapy] - (drug), thus constructing a lightweight knowledge graph.

[0067] Based on the above, intelligent question answering can be implemented: A user asked: "What are the first-line treatment options for advanced non-small cell lung cancer with EGFR exon 19 deletion?" Query interpretation: Entity identified: EGFR19 exon deletion, non-small cell lung cancer.

[0068] Two-stage retrieval: Preliminary search phase: Recall 100 relevant candidate text slices using vector indexing.

[0069] Detailed screening phase: Calculate the graph correlation between these candidate text slices and entities in the query statement (e.g., whether they simultaneously contain nodes and paths such as "EGFR 19-del", "NSCLC", "first-line", and "osimertinib"). Combining source weights (FDA / NCCN guidelines have the highest weight), the top 3 candidate text slices are obtained after rearrangement, with content from FDA / NCCN guidelines and pivotal clinical studies, respectively.

[0070] Answer Generation: The top 3 candidate text slices and the query statement are combined into a prompt statement, which is then input into the LLaMA or ChatGLM model, which has been fine-tuned with medical text. The model generates a structured answer: "Based on the NCCN guidelines (2024 v1) and related studies, osimertinib is recommended as first-line treatment. Level of evidence: Level 1. Source: NCCN guidelines, page XX; Reference PMID: xxxxxxxx."

[0071] Compared with the prior art, the present invention has the following significant advantages: 1. Extremely high accuracy: By introducing a hybrid retrieval mechanism that combines domain knowledge graph structure indexing and vector indexing, it not only considers semantic similarity but also the medical logical connections between entities. It can accurately locate the most clinically valuable information fragments from massive amounts of knowledge, greatly improving retrieval accuracy.

[0072] 2. Highly professional and effectively suppresses hallucinations: Through domain-adaptive preprocessing, query expansion, and a mechanism that forces the model to generate answers based on the retrieval context, the professionalism and accuracy of the generated answers are ensured, significantly reducing the occurrence of dangerous "hallucinations" in medical question answering.

[0073] 3. Fast response speed and low resource consumption: It adopts a lightweight vector index and a two-stage retrieval strategy. First, it quickly performs a coarse screening, and then performs a fine-grained rearrangement on a small number of candidates. Compared with the full fine-grained retrieval of traditional RAG, it greatly reduces the computational overhead and achieves a high-efficiency response under limited resources.

[0074] 4. Convenient knowledge updates: The knowledge base is stored in the form of document slices and knowledge graphs. When new data is added, only the new data needs to be parsed, sliced, and indexed. There is no need to retrain the entire large model, resulting in low maintenance costs and easy iteration.

[0075] 5. High interpretability: The generated answers come with detailed citation sources, allowing users to trace back to the original literature or guidelines, enhancing the system's credibility and interpretability, and meeting the rigorous requirements of medical application scenarios.

[0076] Based on and Figure 1 Based on the same principle as the method shown, this embodiment of the invention also provides an intelligent question-answering device 20, such as... Figure 2 As shown, the intelligent question-answering device 20 may include an acquisition module 210, a preliminary search module 220, an entity determination module 230, a detailed search module 240, and an answer determination module 250, wherein: The acquisition module 210 is used to acquire the user's query statement for tumor genomics and convert the query statement into a query vector; The coarse search module 220 is used to determine multiple candidate text slices that are semantically related to the query vector from a pre-built vector index based on the query vector. The vector index includes the quantized vector code corresponding to each slice text and the position identifier of each quantized vector code in the retrieval structure corresponding to the vector index. Each position identifier corresponds to the slice identifier of a slice text. Entity determination module 230 is used to determine the entity to be queried in the query statement; The detailed investigation module 240 is used to determine the graph association degree between the entity to be queried and the entities in each candidate text slice based on the entity to be queried and the pre-built lightweight knowledge graph. The answer determination module 250 is used to determine the answer to a query statement based on the correlation between multiple graphs.

[0077] Optionally, when determining the answer to a query statement based on multiple graph correlations, the above-mentioned answer determination module 250 is specifically used for: Based on the correlation of multiple graphs, the retrieval context is determined from multiple candidate text slices; Based on the query statement and the retrieval context, generate a prompt statement that includes the output requirements for the answer to the query statement; Input the prompt statement into the large language model to obtain the answer to the query statement.

[0078] Optionally, the above-mentioned device further includes: The module is used to collect multimodal tumor genomics data from multiple data sources, including medical literature, clinical guidelines, gene mutation knowledge bases, drug labels, and clinical trial data; it segments multiple text slices from the multimodal tumor genomics data according to semantics; it generates low-dimensional vectors for each text slice using a lightweight sentence embedding model; it quantizes and encodes each low-dimensional vector to obtain quantized vector codes, and generates vector indices based on multiple quantized vector codes; it identifies multiple entities and their relationships from the multimodal tumor genomics data; and it constructs a lightweight knowledge graph based on the multiple entities and their relationships, where each node in the lightweight knowledge graph represents an entity, and the edge between any two nodes represents the relationship between the corresponding two entities.

[0079] Optionally, when determining the graph association degree between the entity to be queried and the entities in each candidate text slice based on the entity to be queried and the pre-built lightweight knowledge graph, the aforementioned detailed search module 240 is specifically used for: Based on the entity to be queried and the pre-built lightweight knowledge graph, determine the association subgraph of the entity to be queried. The association subgraph includes the associated entities of the entity to be queried, as well as the relationships between the associated entities and the entity to be queried. Based on the association subgraph and the entities in each candidate text slice, determine the graph association degree between the entity to be queried and the entities in each candidate text slice.

[0080] Optionally, the above-mentioned device further includes: The weight determination module is used to determine the vector similarity between the query vector and the text vector of each candidate text slice; obtain the metadata of each candidate text slice, and determine the metadata weight of each candidate text slice based on the metadata of each candidate text slice; The above-mentioned answer determination module 250, when determining the retrieval context from multiple candidate text slices based on multiple graph correlations, is specifically used for: The vector similarity, graph correlation, and metadata weights corresponding to each candidate text slice are weighted and fused to obtain the final score for each candidate text slice. The retrieval context is determined from multiple candidate text slices based on the final scores corresponding to all candidate text slices.

[0081] The intelligent question-answering device of this invention can execute the intelligent question-answering method provided in this invention. The implementation principle is similar. The actions performed by each module and unit in the intelligent question-answering device in each embodiment of this invention correspond to the steps in the intelligent question-answering method in each embodiment of this invention. For detailed functional descriptions of each module of the intelligent question-answering device, please refer to the descriptions in the corresponding intelligent question-answering methods shown above, which will not be repeated here.

[0082] The aforementioned intelligent question-answering device can be a computer program (including program code) running on a computer device, such as an application software; the device can be used to execute the corresponding steps in the method provided in the embodiments of the present invention.

[0083] In some embodiments, the intelligent question-answering device provided in this invention can be implemented using a combination of hardware and software. As an example, the intelligent question-answering device provided in this invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the intelligent question-answering method provided in this invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0084] In other embodiments, the intelligent question-answering device provided in this invention can be implemented in software. Figure 2 An intelligent question-answering device stored in a memory is shown. It can be software in the form of programs and plug-ins, and includes a series of modules, including an acquisition module 210, a coarse search module 220, an entity determination module 230, a fine search module 240, and an answer determination module 250, for implementing the intelligent question-answering method provided in the embodiments of the present invention.

[0085] The modules described in the embodiments of the present invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.

[0086] Based on the same principles as the methods shown in the embodiments of the present invention, the embodiments of the present invention also provide an electronic device, which may include, but is not limited to: a processor and a memory; the memory for storing computer programs; and the processor for executing the methods shown in any embodiment of the present invention by invoking the computer programs.

[0087] In one alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0088] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0089] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0090] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0091] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0092] Among these, electronic devices can also be terminal devices. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0093] This invention provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.

[0094] According to another aspect of the present invention, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various embodiments described above.

[0095] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0096] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0097] The computer-readable storage medium provided in this invention can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0098] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0099] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

Claims

1. An intelligent question answering method, characterized by, The method comprises: acquiring a user query sentence for tumor genomics and converting the query sentence into a query vector; determining, according to the query vector, a plurality of candidate text slices semantically related to the query vector from a pre-constructed vector index, wherein the vector index comprises a quantized vector code corresponding to each slice text and a position identifier of each quantized vector code in a search structure corresponding to the vector index, and each position identifier corresponds to a slice identifier of a slice text; determining an entity to be queried in the query sentence; determining, according to the entity to be queried and a pre-constructed lightweight knowledge graph, a graph correlation degree between the entity to be queried and an entity in each of the candidate text slices; determining an answer to the query sentence according to a plurality of the graph correlation degrees.

2. The method of claim 1, wherein, The determining of the answer to the query sentence according to a plurality of the graph correlation degrees comprises: determining a search context from a plurality of the candidate text slices according to a plurality of the graph correlation degrees; generating a prompt sentence according to the query sentence and the search context, wherein the prompt sentence comprises an output requirement of an answer to the query sentence; inputting the prompt sentence into a large language model to obtain the answer to the query sentence.

3. The method of claim 1, wherein, The method further comprises: collecting multi-modal tumor genomics data from a plurality of data sources, including medical literature, clinical guidelines, genetic variation knowledge bases, drug labels, and clinical trial data; segmenting a plurality of text slices from the multi-modal tumor genomics data according to semantics; generating a low-dimensional vector for each text slice using a lightweight sentence embedding model; quantizing each of the low-dimensional vectors to obtain a plurality of quantized vector codes, and generating a vector index according to the plurality of quantized vector codes; identifying a plurality of entities and relationships between the entities from the multi-modal tumor genomics data; constructing a lightweight knowledge graph according to the plurality of entities and relationships between the entities, wherein each node in the lightweight knowledge graph represents an entity, and an edge between any two nodes represents a relationship between the corresponding two entities.

4. The method according to any one of claims 1 to 3, characterized in that, The determining of the graph correlation degree between the entity to be queried and an entity in each of the candidate text slices according to the entity to be queried and a pre-constructed lightweight knowledge graph comprises: determining, according to the entity to be queried and a pre-constructed lightweight knowledge graph, an associated subgraph of the entity to be queried, wherein the associated subgraph comprises an associated entity of the entity to be queried and a relationship between the associated entity and the entity to be queried; determining, according to the associated subgraph and an entity in each of the candidate text slices, a graph correlation degree between the entity to be queried and the entity in each of the candidate text slices.

5. The method of claim 2, wherein, The method further comprises: determining a vector similarity between the query vector and a text vector of each of the candidate text slices; acquiring metadata of each of the candidate text slices and determining a metadata weight of each of the candidate text slices according to the metadata of each of the candidate text slices; The determining of the search context from a plurality of the candidate text slices according to a plurality of the graph correlation degrees comprises: weighting and fusing the vector similarity corresponding to each of the candidate text slices, the graph correlation degree and the metadata weight to obtain a final score corresponding to each of the candidate text slices; determining a retrieval context from the plurality of candidate text slices according to the final scores corresponding to all candidate text slices.

6. An intelligent question answering apparatus, characterized by comprising: Comprise: An acquisition module is configured to acquire a query sentence of a user for tumor genomics, and convert the query sentence into a query vector; A rough search module is configured to determine a plurality of candidate text slices related to the query vector in semantics from a pre-constructed vector index according to the query vector, wherein the vector index comprises a quantized vector code corresponding to each text slice and a position identifier of each quantized vector code in a retrieval structure corresponding to the vector index, and each position identifier corresponds to a slice identifier of a text slice; An entity determination module is configured to determine an entity to be queried in the query sentence; A fine search module is configured to determine a graph correlation degree between the entity to be queried and an entity in each of the candidate text slices according to the entity to be queried and a pre-constructed lightweight knowledge graph; An answer determination module is configured to determine an answer of the query sentence according to a plurality of graph correlation degrees.

7. The apparatus of claim 6, wherein, The answer determination module, when determining the answer of the query sentence according to the plurality of graph correlation degrees, is specifically configured to: determine a retrieval context from the plurality of candidate text slices according to the plurality of graph correlation degrees; generate a prompt sentence according to the query sentence and the retrieval context, wherein the prompt sentence comprises an output requirement of the answer of the query sentence; input the prompt sentence into a large language model to obtain the answer of the query sentence.

8. The apparatus of claim 6, wherein, The device further comprises: A construction module is configured to collect multi-modal tumor genomics data from a plurality of data sources, including medical literature, clinical guidelines, genetic variation knowledge bases, drug labels, and clinical trial data; divide a plurality of text slices from the multi-modal tumor genomics data according to semantics; generate a low-dimensional vector for each text slice using a lightweight sentence embedding model; quantize each low-dimensional vector to obtain a plurality of quantized vector codes, and generate a vector index according to the plurality of quantized vector codes; identify a plurality of entities and the interrelationships between the plurality of entities from the multi-modal tumor genomics data; construct a lightweight knowledge graph according to the plurality of entities and the interrelationships between the plurality of entities, wherein each node in the lightweight knowledge graph represents an entity, and an edge between any two nodes represents the interrelationship between the corresponding two entities.

9. An electronic device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-5.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-5.