Medical search recommendation method, system, product and terminal based on knowledge graph and semantic vector
By performing medical entity recognition and standardization on medical search requests, and combining medical knowledge graphs and semantic vector models for dual-path retrieval, the problems of accuracy and semantic generalization in medical information retrieval in existing technologies are solved, achieving efficient and interpretable medical search recommendations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI NAT GRP HEALTH TECH CO LTD
- Filing Date
- 2026-01-12
- Publication Date
- 2026-06-05
AI Technical Summary
Existing medical retrieval technologies suffer from insufficient accuracy in keyword retrieval, a lack of explicit medical logic support in vector semantic technology, and limited semantic generalization capabilities in knowledge graph technology, resulting in poor performance in medical information retrieval and recommendation.
By performing medical entity recognition and standardization on medical search requests, a dual-path retrieval is performed using a pre-built medical knowledge graph and a pre-trained semantic vector model. Combined with confidence information and semantic similarity, recommendation results are generated.
It achieves precise, interpretable, and secure medical search recommendations, enhances the authority and comprehensiveness of search results, and adapts to the deep semantic expression of complex medical information.
Smart Images

Figure CN122152879A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical information retrieval and intelligent recommendation, and in particular to a medical search and recommendation method, system, product, and terminal based on knowledge graphs and semantic vectors. Background Technology
[0002] With the continuous deepening of medical informatization and the rapid iteration of smart healthcare technologies, the medical field has accumulated massive amounts of heterogeneous medical data, covering diverse data types such as traditional Chinese and Western medicine disease diagnosis and treatment cases, clinical examination and test reports, core medical literature in Chinese and foreign languages, drug instructions, authoritative treatment guidelines, and electronic medical records. This data is not only enormous in scale but also possesses core characteristics such as high barriers to professional terminology, strong implicit semantic expression, and complex multi-layered entity relationships. Traditional general information retrieval technologies struggle to deeply understand the professional connotations and complex relationships of this type of data, resulting in unsatisfactory results in precision medical information retrieval and personalized recommendation scenarios for patients, doctors, and researchers.
[0003] Currently, mainstream medical search and recommendation technologies mainly follow the following three paths, but all of them have significant bottlenecks:
[0004] 1. Keyword-based medical information retrieval technology: This type of technology usually relies on medical dictionary matching and manual rule definition. It achieves retrieval through precise keyword comparison, but it is difficult to handle synonyms, hyponyms, and medical semantic reasoning problems, which can easily lead to missed or false detections.
[0005] 2. Vector Semantics-Based Medical Retrieval and Recommendation Technology: This type of technology achieves text semantic vectorization matching through a pre-trained model fine-tuned in the medical field, effectively alleviating the semantic understanding problem of keyword retrieval and improving retrieval recall and generalization ability to some extent. However, this technology severely lacks modeling and utilization of structured and explicit knowledge in the medical field (such as disease-drug contraindications and the gold standard evidence level of treatment plans), resulting in poor interpretability and certain medical safety risks.
[0006] 3. Medical Knowledge Graph-Based Retrieval and Recommendation Technologies: This type of technology constructs a structured medical knowledge graph to explicitly represent entities such as diseases, symptoms, drugs, and examinations, along with their relationships, and then utilizes graph query and reasoning techniques for retrieval. Its advantages lie in the high accuracy and strong interpretability of the results, but its ability to express deep semantics in unstructured medical texts (such as disease descriptions and patient complaints) is limited. Furthermore, the updating of knowledge graphs often lags behind the rapid development of medical knowledge, resulting in limited generalization and recall capabilities for new concepts, expressions, or complex long-tail queries not covered by the graph. Summary of the Invention
[0007] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a medical search and recommendation method, system, product and terminal based on knowledge graph and semantic vector, to solve the comprehensive technical problems in existing medical retrieval technologies, such as insufficient accuracy of keyword retrieval, lack of explicit medical logic support in vector semantic technology, and limited semantic generalization ability of knowledge graph technology.
[0008] To achieve the above and other related objectives, this application provides a medical search recommendation method based on knowledge graphs and semantic vectors, characterized by comprising: acquiring a medical search request; performing medical entity recognition and standardization processing on the medical search request to obtain standard medical entity data; performing a search on a pre-constructed medical knowledge graph based on the standard medical entity data to obtain a first search result set; obtaining a second search result set based on the standard medical entity data using a pre-trained semantic vector model and vector database; and fusing the first search result set and the second search result set according to a preset fusion rule to obtain a recommendation result.
[0009] In some embodiments of the first aspect of this application, the method of performing medical entity identification and standardization processing on the medical search request includes: performing word segmentation processing on the medical search request to obtain corresponding valid medical entity data; and mapping the valid medical entity data to unified standard medical terms based on a pre-built medical thesaurus to form the standard medical entity data.
[0010] In some embodiments of the first aspect of this application, the method of obtaining a first search result set by searching in a pre-constructed medical knowledge graph based on the standard medical entity data includes: searching and reasoning in the medical knowledge graph based on the standard medical entity data to obtain the entity association path of the standard medical entity data; forming one or more knowledge graph search items according to the entity association path of the standard medical entity data, each knowledge graph search item including at least a target entity and the entity association between the target entity and the standard medical entity data; and sorting the knowledge graph search items according to a preset sorting rule to form the first search result set.
[0011] In some embodiments of the first aspect of this application, the knowledge graph retrieval item further includes confidence information; the confidence information is calculated based on the path hop count of the entity association path; wherein the confidence information is negatively correlated with the path hop count of the entity association path.
[0012] In some embodiments of the first aspect of this application, the method of obtaining the second retrieval result set based on the standard medical entity data through a pre-trained semantic vector model and a vector database includes: vectorizing the standard medical entity data through a pre-trained semantic vector model to obtain corresponding entity query vectors; performing similarity retrieval on the entity query vectors in the vector database and obtaining semantic similarity information corresponding to each retrieval result; wherein, the semantic similarity information that meets a preset semantic similarity threshold and their corresponding retrieval results form the second retrieval result set.
[0013] In some embodiments of the first aspect of this application, the method of fusing the first search result set and the second search result set according to a preset fusion rule includes: fusing and sorting the second search result set according to the entity association relationship of the first search result set and the semantic similarity information of the second search result set based on the preset fusion rule; and integrating the first search result set with the second search result set after fusion and sorting to generate the recommendation result.
[0014] In some embodiments of the first aspect of this application, the method of performing fusion and ranking processing on the second search result set according to a preset fusion rule, based on the entity association relationships in the first search result set and the semantic similarity information in the second search result set, includes: obtaining a graph association fit value of the second search result set based on the entity association relationships in the first search result set; performing weighted fusion of the graph association fit value and the corresponding semantic similarity information in the second search result set according to the preset fusion rule to obtain a fusion ranking value; and sorting and filtering the second search result set according to the fusion ranking value; wherein the weight of the graph association fit value in the weighted fusion is greater than the weight of the semantic similarity information.
[0015] To achieve the above and other related objectives, a second aspect of this application provides a medical search and recommendation system based on knowledge graphs and semantic vectors, comprising: a search receiving module for acquiring medical search requests; a standardization processing module for performing medical entity recognition and standardization processing on the medical search requests to obtain standard medical entity data; a data retrieval module for performing retrieval in a pre-constructed medical knowledge graph based on the standard medical entity data to obtain a first retrieval result set; and a second retrieval result set based on the standard medical entity data using a pre-trained semantic vector model and vector database; and a data fusion and recommendation module for fusing the first retrieval result set and the second retrieval result set according to preset fusion rules to obtain recommendation results.
[0016] To achieve the above and other related objectives, a third aspect of the present invention provides a computer program product comprising computer program code, which, when executed on a computer, enables the computer to implement the medical search recommendation method based on knowledge graphs and semantic vectors.
[0017] To achieve the above and other related objectives, a fourth aspect of the present invention provides an electronic terminal, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the medical search recommendation method based on knowledge graphs and semantic vectors.
[0018] As described above, the medical search recommendation method, system, product, and terminal based on knowledge graphs and semantic vectors provided in this application have the following beneficial effects: This invention obtains standard medical entity data by performing medical entity recognition and standardization processing on user-input medical search requests; on the one hand, based on the standard medical entity data, it obtains a first search result set by performing retrieval reasoning through a pre-constructed medical knowledge graph; on the other hand, based on the standard medical entity data, it obtains a second search result set through a pre-trained semantic vector model and vector database; then, according to preset fusion rules, it obtains recommendation results by fusing the first and second search result sets. This application effectively breaks through the limitations of existing medical retrieval technologies, compensating for the lack of explicit medical logic support and insufficient semantic generalization of knowledge graphs through dual-path collaborative fusion, ensuring the authority and comprehensiveness of recommendation results, and ultimately achieving accurate, interpretable, and secure medical search recommendations, thus facilitating efficient application in clinical diagnosis and treatment and medical information query scenarios. Attached Figure Description
[0019] Figure 1 The diagram shows a flowchart of a medical search and recommendation method based on knowledge graphs and semantic vectors according to an embodiment of the present invention.
[0020] Figure 2 The diagram shows a flowchart illustrating how to obtain a first search result set according to an embodiment of the present invention.
[0021] Figure 3 The diagram shows a flowchart illustrating how to obtain a second search result set according to an embodiment of the present invention.
[0022] Figure 4 The diagram shows a flowchart illustrating the method of merging and sorting the second retrieval result set according to an embodiment of the present invention.
[0023] Figure 5 The diagram shown is a flowchart illustrating a medical search and recommendation method based on knowledge graphs and semantic vectors according to a specific embodiment of the present invention.
[0024] Figure 6 The diagram shown is a structural schematic of a medical search and recommendation system based on knowledge graphs and semantic vectors according to an embodiment of the present invention.
[0025] Figure 7 The diagram shown is an electronic terminal according to an embodiment of the present invention. Detailed Implementation
[0026] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0027] It should be noted that in the following description, reference is made to the accompanying drawings, which illustrate several embodiments of the present invention. It should be understood that other embodiments may also be used. In the embodiments of the present invention, the terms "first," "second," etc., are used to distinguish identical or similar items with substantially the same function and effect, without limiting their order. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., are not necessarily different.
[0028] Furthermore, in the embodiments of the present invention, the words "exemplary" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0029] Furthermore, in this embodiment of the invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0030] Before providing a further detailed description of the present invention, the nouns and terms used in the embodiments of the present invention are explained, and the nouns and terms used in the embodiments of the present invention are subject to the following interpretations:
[0031] <1> The dictionary-based Jieba Medical Text Segmentation Plugin is a word segmentation tool specifically designed for Chinese medical text processing. Based on the general Jieba word segmenter framework, it integrates a medical-specific dictionary containing a large number of professional terms related to diseases, drugs, symptoms, and examinations. By optimizing relevant word frequencies and segmentation rules, it achieves accurate identification and correct segmentation of complex medical terms (such as "acute non-ST-segment elevation myocardial infarction") in professional texts such as electronic medical records and medical literature. This effectively improves the accuracy and reliability of text analysis in natural language processing tasks in the medical field.
[0032] <2> The BERT-CRF model is a deep learning architecture widely used in sequence labeling tasks such as medical named entity recognition. It combines the powerful contextual semantic understanding capabilities of the BERT pre-trained language model with the sequence labeling constraint optimization capabilities of the Conditional Random Field (CRF) layer. Specifically, the model first uses BERT to deeply encode the input medical text (such as medical records and symptom descriptions) to capture the dynamic representation of words in specific contexts. Then, the CRF layer learns the transition rules between labels (such as the reasonable order of "disease-symptom" labels) to globally optimize the predicted labels of each token output by BERT. This allows for more accurate and consistent extraction of key entities such as diseases, drugs, and examination items in medical entity recognition tasks, providing structured information support for subsequent recommendation systems.
[0033] <3> The Unified Medical Language System (UMLS) is a large-scale knowledge foundation project developed by the U.S. National Library of Medicine to bridge the differences between various biomedical terminology systems. It integrates over a hundred standard terminology sets (such as SNOMED CT, MeSH, and ICD) from fields like clinical medicine, genetics, and pharmacy to construct a unified semantic network containing millions of concepts, their synonyms, and semantic relationships. In the field of medical recommendation, UMLS serves as a core medical knowledge graph and terminology mapping tool, normalizing diverse medical terminology expressions in clinical texts (such as "myocardial infarction" and "heart attack") to standard concepts. This supports intelligent applications such as disease diagnosis reasoning, drug interaction discovery, and personalized treatment recommendations, significantly improving the semantic understanding accuracy and knowledge coverage of medical recommendation systems.
[0034] <4> The 11th Revision of the International Classification of Diseases (ICD-11): ICD-11 is a globally unified statistical classification and coding system for diseases, injuries, causes of death, and health problems developed and published by the World Health Organization. It adopts a hierarchical and networked modern classification structure, containing approximately 55,000 diagnostic categories and extended codes. Through a highly structured "cluster" and "axis" design, it achieves multi-dimensional and accurate coding of diseases. In the field of medical recommendation, ICD-11 is not only the core foundation for the standardization of clinical diagnosis and the interoperability of medical information, but its refined disease coding and associated clinical description resources are also key knowledge frameworks driving intelligent disease-assisted diagnosis, patient risk stratification, treatment pathway recommendation, and public health decision support systems. It provides an authoritative, standardized, and computable structured disease semantic foundation for medical recommendation algorithms.
[0035] <5> Neo4j (Neo4j Graph Database): Neo4j is a high-performance, open-source, graph-based NoSQL database management system. It uses a native graph storage and processing engine to dynamically organize and represent data using a network structure of nodes, relationships, and attributes (rather than a traditional table structure). In the field of medical recommendation, Neo4j, with its powerful association query and path analysis capabilities, is often used to build and store medical knowledge graphs. For example, it uses entities such as diseases, symptoms, drugs, genes, and patients as nodes, and diagnostic relationships, drug interactions, genetic associations, or treatment history as relationship edges. This supports efficient and interpretable recommendation reasoning (such as disease differential diagnosis, drug relocation recommendation, or personalized treatment path discovery based on graph traversal), and effectively promotes the deep association mining and intelligent recommendation applications of complex medical knowledge networks.
[0036] <6> Efficient Approximate Nearest Neighbor Indexing Structures (IVF and HNSW) are key algorithmic components designed for rapid similarity retrieval of high-dimensional medical feature vectors (such as patient electronic health record vectors and medical image feature vectors) in medical recommendation systems. IVF (Inverted File) constructs a coarse-grained inverted list by clustering the feature space, allowing fine-grained comparisons within a few nearest-neighbor clusters during searching, significantly reducing computation. HNSW (Navigable Small World Graph) constructs a hierarchical navigation structure in a small world graph, enabling searches to rapidly approach the target region via long, "highway"-like jump edges and then gradually refine the search, achieving high recall with extremely low latency. These indexing structures effectively support large-scale real-time retrieval tasks such as content-based disease similarity recommendation, patient clustering analysis, or drug-target matching, forming the underlying technological foundation for building efficient intelligent medical recommendation systems.
[0037] <7> Cosine similarity is a key mathematical metric in medical recommendation systems used to measure the directional consistency, or intrinsic pattern similarity, between two vectors. It assesses the degree of similarity by calculating the cosine of the angle between the vectors in a multidimensional space (ranging from -1 to 1). In the medical field, when patient symptoms, disease features, drug attributes, or medical entities are represented as high-dimensional vectors, cosine similarity can effectively capture and quantify the matching degree of their semantic or morphological structures. For example, it can assist in diagnosis and recommendation by comparing the directional similarity between patient symptom vectors and disease prototype vectors, or perform intelligent retrieval of relevant medical literature based on the embedded vectors of medical texts. Its core advantage lies in its insensitivity to the absolute numerical value of the vectors, thus focusing more on assessing the convergence of relative distribution patterns, providing a core similarity judgment basis for medical content matching and personalized recommendations.
[0038] <8> Euclidean distance is a fundamental geometric metric used in medical recommendation systems to calculate the absolute numerical difference between two vectors (or multidimensional data points). It is defined as the straight-line distance between two points in a multidimensional space, calculated by taking the square root of the sum of the squares of the differences in the coordinates of each dimension. In the medical field, when patient characteristics, physiological indicators, disease manifestations, or drug attributes are quantified into numerical vectors, Euclidean distance can directly measure the actual proximity of these medical entities in the feature space. For example, it can be used to perform risk stratification or similar case matching by comparing the distance between patient laboratory test indicator vectors, or to screen potentially similar compounds in drug discovery based on the distance between molecular descriptor vectors. The core value of this metric lies in its intuitive geometric interpretation, making it a key similarity (or dissimilarity) criterion in medical recommendation and cluster analysis tasks that require consideration of specific numerical differences.
[0039] The medical search recommendation method, system, product, and terminal based on knowledge graphs and semantic vectors provided by this invention obtains standard medical entity data by performing medical entity recognition and standardization processing on user-input medical search requests. On one hand, based on the standard medical entity data, a first search result set is obtained by performing retrieval reasoning through a pre-constructed medical knowledge graph. On the other hand, based on the standard medical entity data, a second search result set is obtained through a pre-trained semantic vector model and vector database. Then, according to preset fusion rules, the first and second search result sets are fused to obtain recommendation results. The technical solutions in the embodiments of this invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the invention and are not intended to limit the invention.
[0040] like Figure 1 The diagram illustrates a flowchart of a medical search recommendation method based on knowledge graphs and semantic vectors according to an embodiment of the present invention. The medical search recommendation method based on knowledge graphs and semantic vectors in this embodiment includes the following steps:
[0041] Step S11: Obtain medical search requests.
[0042] Specifically, users receive medical-related search requests input by themselves through a pre-set user interaction interface on a terminal device (such as a computer, smartphone, or medical workstation). This user interaction interface may include a web-based search box, a mobile application input interface, or a voice interaction module, and it is compatible with multiple input data formats, including text and voice. The medical search requests input by users include various medical-related questions such as disease diagnosis and treatment, medication use, symptom consultation, and medical advice for special populations, for example, "medication recommendations for pneumonia in pregnant women," "what might be causing a persistent cough," and "dietary precautions for diabetic patients." This step is the data input starting point for the medical search recommendation method, ensuring that the entire subsequent process responds to the user's actual search needs.
[0043] Step S12: Perform medical entity identification and standardization processing on the medical search request to obtain standard medical entity data.
[0044] This step is the data preprocessing stage of the medical search recommendation method described in this application. It mainly transforms the unstructured, colloquial medical search requests input by the user into structured, standardized data that the system can understand and process. The overall process is as follows: First, the medical search request is segmented to identify the valid medical entities it contains; then, based on a pre-built medical thesaurus, the identified valid medical entities are mapped to unified and standardized medical terms, ultimately forming standard medical entity data.
[0045] It should be understood that the purpose of performing the above-mentioned medical entity recognition is as follows: User-inputted medical search requests are mostly expressed in natural language, containing a large number of descriptive or functional words (such as interjections and conjunctions) and non-medical terms unrelated to medical intent. Directly using the user's original medical search request would lead to an inability to accurately understand the user's true medical search intent and would introduce a large amount of noise, severely affecting the accuracy and efficiency of subsequent searches. By first filtering out valid medical entities directly related to medical needs through medical entity recognition and eliminating invalid information, irrelevant data can be avoided from interfering with the subsequent search process. At the same time, it can clarify the core focus of the user's medical search request (such as disease, medicine, special populations, etc.), laying a data foundation for subsequent accurate searches.
[0046] In some alternative implementations, word segmentation is performed during medical entity recognition using existing analysis tools, such as the dictionary-based Jieba medical word segmentation plugin, which can quickly split medical search request text by loading a custom medical dictionary, accurately locate valid medical entities, and filter out invalid non-medical words.
[0047] In some optional embodiments, word segmentation can also be achieved through a trained pre-trained word segmentation model. For example, based on the BERT-CRF model trained with medical domain corpora, it can accurately identify valid medical entities in complex medical search request expressions. The training process of this trained word segmentation model during the previous training is as follows: Using a large amount of desensitized medical search request corpora and labeled medical entity texts as training data, covering medical queries in different scenarios (such as disease consultation, medication recommendation, examination interpretation), a labeled training set including request segmentation boundaries and medical entity types is constructed; The training objective is to optimize the model's segmentation accuracy for medical search requests and the recognition accuracy of medical entities, enabling it to accurately split complex search requests and distinguish core medical entities from redundant information; After training, it is verified that the output results of this word segmentation model meet the expectations and can support subsequent standardization processing.
[0048] For the convenience of those skilled in the art to understand, the following gives examples of the valid medical entity data obtained after word segmentation of the medical search requests. For example, for the medical search request "Medication recommendation for pregnant women with pneumonia", after word segmentation, non-core words such as "medication" and "recommendation" are filtered, and the valid medical entity data "pregnant women" and "pneumonia" are extracted; For the medical search request "What could be the reasons for persistent cough", after word segmentation, the valid medical entity data "cough" is extracted.
[0049] Furthermore, after word segmentation of the medical search requests, the obtained valid medical entity data needs to be standardized. The reason is that different users may have different valid medical entity expressions for the same standard medical entity when describing medical search requests. For example, some users express "pregnant women" as "pregnant mothers", and some users express "pregnant women" as "pregnant females"; Some users express "pneumonia" as "lung inflammation", and some users express "pneumonia" as "pulmonary infection (pneumonia type)". This phenomenon of inconsistent medical term expressions, if not processed, will make it impossible to confirm that "pregnant mothers" and "pregnant females" refer to the same standard medical entity, resulting in problems such as subsequent knowledge graph retrieval failures or semantic vector matching deviations. By standardizing the obtained valid medical entity data, the medical term specifications can be unified, and the retrieval errors caused by differences in valid medical entity expressions can be eliminated.
[0050] In some optional implementations, standardization is achieved through a pre-built medical thesaurus. This thesaurus is constructed based on authoritative medical dictionaries, clinical guidelines, national pharmacopoeias, and medical data standards, and includes various standard medical terms such as diseases, symptoms, drugs, special populations, and examination items. Simultaneously, each standard medical term in this thesaurus is associated with a corresponding non-standard medical term, including medical synonyms, alternative names, colloquial terms, and non-standard medical expressions. In specific processing, the effective medical entity data extracted after the above word segmentation is matched with the medical thesaurus, uniformly mapping the effective medical entity data to the corresponding standard medical terms, ultimately forming structured standard medical entity data. For example, "pregnant woman" and "pregnant mother" are uniformly mapped to the standard medical term "pregnant woman," and "pneumonia" and "lung infection (pneumonia type)" are uniformly mapped to the standard medical term "pneumonia," obtaining structured standard medical entity data, such as a list of standard medical entity data: [Population attribute: pregnant woman, disease: pneumonia].
[0051] Step S13: Based on the standard medical entity data, search in the pre-constructed medical knowledge graph to obtain a first search result set; based on the standard medical entity data, obtain a second search result set through a pre-trained semantic vector model and vector database.
[0052] Specifically, this step obtains two types of search result sets through dual-path retrieval, providing multi-dimensional data support for subsequent fusion processing. The overall process is as follows: using structured standard medical entity data as input, on the one hand, structured retrieval and reasoning are performed through a pre-built medical knowledge graph to generate the first search result set; on the other hand, semantic similarity retrieval is performed through a pre-trained semantic vector model and vector database to generate the second search result set. There is no fixed execution order constraint for obtaining the first and second search result sets. The two search paths can be started simultaneously in parallel to improve overall search efficiency; alternatively, a sequential approach can be used, completing the retrieval of one path and generating the corresponding search result set before starting the retrieval of the other path, to adapt to different system resource configuration scenarios.
[0053] In one embodiment of this application, the acquisition of the first and second search result sets is performed serially, with the specific process as follows: Using the standard medical entity data generated in step S12 (e.g., a list of standard medical entity data: [Population Attributes: Pregnant Women, Disease: Pneumonia]) as input, the knowledge graph retrieval path is first initiated. Search and reasoning are performed in the pre-constructed medical knowledge graph to acquire the first search result set. After acquiring the first search result set, the same standard medical entity data is used as input to initiate the semantic vector retrieval path. Similarity retrieval is performed using a pre-trained semantic vector model and vector database to finally acquire the second search result set. This serial approach does not require excessive system parallel computing resources and is suitable for resource-constrained medical service scenarios.
[0054] It should be noted that the pre-built medical knowledge graph is a large-scale, structured medical knowledge network database built offline before system deployment or service startup, based on the application requirements of this invention. This medical knowledge graph is constructed by integrating multiple authoritative medical data sources, including authoritative medical knowledge bases (such as treatment guidelines, pharmacopoeias, and medical textbooks), standardized medical terminology systems (such as UMLS and ICD-11), and large-scale real-world medical data (such as anonymized electronic medical records). It covers various medical entities such as diseases, symptoms, drugs, special populations, examination items, and treatment plans, as well as standardized relationships between medical entities (such as "special population-disease-recommended medication," "disease-symptom-related examination," and "special population-drug-contraindication relationship"). The pre-built medical knowledge graph is stored in a dedicated medical knowledge graph database, preferably a graph-based database system such as Neo4j, JanusGraph, or Nebula Graph. This database stores medical entity nodes (such as diseases, drugs, and symptoms) and the relationships between these nodes (such as "recommended medication" and "contraindications"). This storage method provides efficient medical entity node matching, relationship querying, and complex path reasoning capabilities, enabling rapid response to retrieval requests based on standard medical entity data and ensuring both retrieval efficiency and reasoning accuracy. To facilitate understanding by those skilled in the art, the following example illustrates the medical entity nodes and their relationships stored in the medical knowledge graph database: Taking the medical entities "pregnant woman" and "pneumonia" as examples, the medical knowledge graph stored in the medical knowledge graph database contains a direct association path between "pregnant woman" (special population node) and "pneumonia" (disease node), and also associates target entities and corresponding relationship data such as "amoxicillin" and "penicillin" (recommended drug node), "levofloxacin" and "tetracycline" (contraindicated drug node), "cough" and "fever" (associated symptom node), providing stable and authoritative structured knowledge support for retrieval and reasoning.
[0055] Furthermore, the semantic vector model and vector database supporting the acquisition of the second search result set are explained as follows: First, the pre-trained semantic vector model is a general pre-trained language model based on the Transformer architecture, such as BGE and BERT. The training process of this pre-trained semantic vector model in the early training stage is as follows: using a massive amount of authoritative medical corpus as training data, including treatment guidelines, drug instructions, core medical literature and desensitized clinical cases, and constructing a standardized training set after removing redundant and conflicting data; the training objective is to optimize the model's ability to understand medical terms, synonyms, and semantic implicit relationships, so that the model can accurately convert medical entity data into high-dimensional semantic vectors to adapt to the semantic retrieval needs of medical scenarios, and the closer the vectors are in the vector space, the higher the corresponding semantic relevance; after training, it is verified that the model vector output can accurately reflect the core semantic associations of medical texts, providing reliable data support for subsequent similarity retrieval. The trained semantic vector model can vectorize input medical text. For example, when inputting medical text (such as "antibiotic recommendations for pneumonia in pregnant women"), the pre-trained semantic vector model outputs a high-dimensional vector (e.g., 768-dimensional or 1024-dimensional). The position of this vector in the vector space reflects the comprehensive semantics of the input medical text. Secondly, the vector database is a dedicated database adapted for storing and retrieving medical vector data. This database stores a massive amount of vector data corresponding to standard medical texts. These medical texts cover diverse content such as comprehensive drug information, disease diagnosis and treatment guidelines, key points of prenatal medical care, and operational specifications for examination items. It incorporates efficient approximate nearest neighbor index structures based on principles such as quantization, graph quantization, or product quantization, such as IVF and HNSW. These index structures allow the vector database to quickly find multiple candidate vectors most similar to the query vector with a very high probability, without needing to perform precise calculations with every vector in the database. This enables generalized retrieval based on deep semantics, rather than relying solely on keyword matching.
[0056] In one embodiment of this application, as Figure 2 As shown, the method of obtaining the first search result set by searching in the pre-constructed medical knowledge graph based on the standard medical entity data specifically includes the following steps:
[0057] Step S21: Based on the standard medical entity data, perform retrieval and reasoning in the medical knowledge graph to obtain the entity association path of the standard medical entity data.
[0058] Specifically, firstly, based on structured standard medical entity data, medical entity nodes corresponding to the standard medical entity data are retrieved and located in the medical knowledge graph database (for example, when the standard medical entity data is [population attribute: pregnant woman, disease: pneumonia], "pregnant woman" is retrieved and located as a special population node and "pneumonia" as a disease node); then, based on the pre-set normalized association relationships in the medical knowledge graph, path reasoning is performed to obtain the direct and indirect association relationship paths (i.e., entity association relationship paths) corresponding to the medical entity nodes. Starting from any medical entity node corresponding to the standard medical entity data, the number of path jumps for each direct and indirect association relationship path obtained through reasoning is limited. Preferably, the number of path jumps in the pre-set reasoning process does not exceed the number of medical entities in the standard medical entity data, so as to avoid excessive reasoning leading to redundant irrelevant paths. The final obtained entity association paths include complete association paths between the medical entity nodes and other medical entity nodes (i.e., target entities), such as association paths like "pregnant woman-pneumonia-recommended medication-amoxicillin", "pregnant woman-pneumonia-contraindicated medication-levofloxacin", and "pneumonia-related symptoms-cough", which provide a data foundation for the subsequent formation of knowledge graph retrieval items.
[0059] Step S22: Based on the entity association path of the standard medical entity data, form one or more knowledge graph retrieval items. Each knowledge graph retrieval item includes at least the target entity and the entity association between the target entity and the standard medical entity data.
[0060] Specifically, each entity association path obtained in step S21 is parsed, and key information in the path is extracted to form knowledge graph retrieval items, thereby realizing the structured transformation of entity association paths. The target entity is any medical entity node in the association path other than the medical entities in the standard medical entity data, including types such as medication, symptoms, examination items, and treatment plans (e.g., "amoxicillin," "levofloxacin," and "cough" in the aforementioned association path); the entity association is the specific association attribute between the target entity and the medical entities in the standard medical entity data (e.g., "recommended medication," "contraindicated medication," and "related symptoms").
[0061] In one embodiment of this application, to improve the completeness of the knowledge graph retrieval items, each knowledge graph retrieval item is also synchronously associated with corresponding confidence information. This confidence is typically calculated based on the number of hops in the entity association path and is negatively correlated with the number of hops. The fewer the hops, the higher the confidence and the stronger the reliability of the association. For example, the confidence of a one-hop direct association path (such as "pneumonia-recommended medication-amoxicillin") is higher than that of a two-hop indirect association path ("pregnant woman-pneumonia-related symptoms-cough"), meaning that the former's confidence level indicates a more reliable association than the latter.
[0062] To facilitate understanding of the specific form of the knowledge graph retrieval item by those skilled in the art, the following example illustrates the knowledge graph retrieval item using standard medical entity data [population attribute: pregnant woman, disease: pneumonia] and its corresponding entity association path:
[0063] 1. Assume the obtained entity relationship path includes "pneumonia-recommended medication-amoxicillin". This path is 1 hop. The resulting knowledge graph retrieval terms are: target entity is "amoxicillin", entity relationship is "recommended medication", and combined with confidence information (1-hop path corresponds to high confidence, such as 0.9), the resulting knowledge graph retrieval terms are [target entity: amoxicillin; relationship: recommended medication; confidence: 0.9 (high)].
[0064] 2. Assume that the obtained entity association path also includes "pregnant women - contraindicated drugs - levofloxacin". This path is 1 hop, and the resulting knowledge graph retrieval terms are: target entity is "levofloxacin", entity association is "contraindicated drugs", and combined with confidence information (1-hop path corresponds to high confidence, such as 0.9), the resulting knowledge graph retrieval terms are [target entity: levofloxacin; association: contraindicated drugs; confidence: 0.9 (high)].
[0065] 3. Assuming the obtained entity association path also includes "pregnant woman-pneumonia-associated symptoms-cough", this path is 2 hops. The resulting knowledge graph retrieval term is: target entity is "cough", entity association is "associated symptoms" (corresponding to the association between pneumonia and cough). Combining the confidence information (the confidence of a 2-hop path is lower than that of a 1-hop path, such as 0.6), the resulting knowledge graph retrieval term is [target entity: cough; association: associated symptoms; confidence: 0.6 (medium)].
[0066] The aforementioned knowledge graph retrieval items implement a structured encapsulation of entity relationship paths, serving as a key data structure connecting the underlying graph reasoning with the upper-level sorting and fusion.
[0067] Step S23: Sort the knowledge graph retrieval items according to the preset sorting rules to form the first retrieval result set.
[0068] Specifically, the knowledge graph retrieval items are sorted according to preset sorting rules. Preferredly, the sorting rules use confidence information as the primary sorting basis, while also considering the priority of preset entity relationships to achieve an orderly arrangement of retrieval items. The specific sorting logic is as follows: First, the knowledge graph retrieval items are initially sorted from high to low confidence; if the confidence levels are the same, they are sorted according to the priority of preset relationships (e.g., "recommended medication" and "contraindicated medication" have higher priority than "related symptoms" and "related examinations," ensuring that core diagnosis and treatment-related knowledge graph retrieval items are displayed first); if the relationship priorities are still the same, the final sorting can be performed according to the alphabetical order of the target entities, frequency of occurrence, or other secondary preset rules. After sorting, the knowledge graph retrieval items are integrated to form a first retrieval result set. This first retrieval result set is presented in a structured form, including the target entity, relationships, and confidence information of each knowledge graph retrieval item.
[0069] It should be understood that, through the above steps, this embodiment achieves a complete transformation from a user's medical search request to structured, interpretable, and credibility-ranked medical knowledge graph retrieval results, providing authoritative and accurate medical knowledge support for core recommendations.
[0070] In one embodiment of this application, as Figure 3 As shown, the method for obtaining the second retrieval result set based on the standard medical entity data, through a pre-trained semantic vector model and vector database, specifically includes the following steps:
[0071] Step S31: Vectorize the standard medical entity data using a pre-trained semantic vector model to obtain the corresponding entity query vector.
[0072] Specifically, structured standard medical entity data is converted into an input format that can be processed by the pre-trained semantic vector model (e.g., BGE, BERT, etc.). For example, standard medical entity data [population attribute: pregnant woman, disease: pneumonia] is converted into the natural language fragment "pregnant woman with pneumonia" or "related to pregnant woman with pneumonia" (e.g., converted into natural language fragments). This data is then input into the semantic vector model for vectorization, transforming it into a high-dimensional, dense entity query vector that represents the core semantics. For instance, for standard medical entity data [population attribute: pregnant woman, disease: pneumonia], the semantic vector model converts it into a 768-dimensional or 1024-dimensional entity query vector. The position of this entity query vector in the high-dimensional vector space accurately reflects the core semantics of the combination of "pregnant woman" and "pneumonia," providing an accurate semantic benchmark for subsequent similarity retrieval and ensuring that subsequent search results match the user's actual medical search requests.
[0073] Step S32: Perform similarity retrieval on the entity query vector in the vector database and obtain semantic similarity information corresponding to each retrieval result; wherein, the retrieval results whose semantic similarity information meets the preset semantic similarity threshold form the second retrieval result set.
[0074] Specifically, the entity query vector generated in step S31 is input into the vector database for retrieval to initiate the semantic similarity retrieval process, which includes the following:
[0075] 1. Retrieval Mechanism: The vector database utilizes its built-in, highly efficient approximate nearest neighbor index, constructed based on graph (e.g., HNSW) or quantization (e.g., IVF) principles, to quickly find the pre-defined Top-K candidate vectors (e.g., K=100) that are most similar to the entity query vector, thus providing the retrieval results. This process avoids brute-force comparisons with all vectors in the vector database, ensuring millisecond-level retrieval efficiency.
[0076] 2. Similarity Calculation: For each retrieved candidate vector, the matching degree between it and the entity query vector is calculated, and corresponding semantic similarity information (including cosine similarity or Euclidean distance, etc.) is generated. A higher semantic similarity value indicates a stronger semantic association between the candidate vector and the corresponding standard medical entity data.
[0077] 3. Threshold Filtering: To ensure the accuracy of the second search result set, a preset semantic similarity threshold (e.g., 0.75 or 0.8) is used to filter the retrieved candidate vectors: only candidate vectors with semantic similarity information greater than or equal to the preset semantic similarity threshold are retained. This preset semantic similarity threshold can be adjusted according to the accuracy requirements of the actual application.
[0078] 4. Result set construction: Each candidate vector (which essentially corresponds to the corresponding standard medical text) and its corresponding semantic similarity information after being filtered by a preset semantic similarity threshold constitute a vector retrieval result item. The set of all vector retrieval result items that meet the preset semantic similarity threshold constitutes the second retrieval result set.
[0079] To facilitate understanding of the second search result set by those skilled in the art, the second search result set formed after similarity retrieval and filtering by a preset semantic similarity threshold for the entity query vector corresponding to the standard medical entity data [population attribute: pregnant women, disease: pneumonia] may include: "Key points of application of cefixime in the treatment of pneumonia in pregnant women" (semantic similarity 0.85), "Nursing intervention plan for patients with pneumonia during pregnancy" (semantic similarity 0.82), "Effect of Chuanbei Loquat Syrup in relieving cough associated with pneumonia in pregnant women" (semantic similarity 0.78), etc. Each search result is associated with corresponding semantic similarity information, clearly representing the degree of semantic association between its semantics and the standard medical entity data.
[0080] It should be noted that, through the above steps, this embodiment achieves generalized retrieval based on deep semantic understanding, which can discover medical-related information that is highly relevant to the user's search intent but may not be directly associated in the medical knowledge graph. This can effectively supplement the first search result set and provide more comprehensive medical data support for subsequent fusion processing.
[0081] Step S14: According to the preset fusion rules, the first search result set and the second search result set are fused to obtain the recommendation results.
[0082] In one embodiment of this application, the purpose of the fusion processing is to integrate the search results from the aforementioned dual paths. Its advantage lies in generating accurate, comprehensive, and clinically relevant recommendation results by combining a first set of search results with medical authority and structured relevance with a second set of search results with semantic generalization and comprehensive information, through a preset differentiated weight allocation and orderly integration. The overall process is as follows: First, based on preset fusion rules, using the authoritative medical entity relationships contained in the first set of search results as a benchmark, and combining the semantic similarity information corresponding to each vector search result item in the second set of search results, the medical compliance, relevance, and priority of each vector search result item in the second set of search results are evaluated. This process is a fusion ranking process to ensure that the second set of results conforms to medical authority standards. Then, the first set of search results is used as the core of the recommendation and is fused hierarchically with the second set of search results that has undergone fusion ranking processing. Core search information is displayed first, supplemented with generalized auxiliary information, and finally, structured, interpretable, and information-complete recommendation results are generated.
[0083] In one embodiment of this application, if the second search result set is empty, the recommended results only contain the relevant content of the first search result set.
[0084] In one embodiment of this application, if the first search result set is empty, the recommended results only contain relevant content from the second search result set.
[0085] In one embodiment of this application, as Figure 4 As shown, according to preset fusion rules, the second search result set is fused and sorted using entity associations in the first search result set and semantic similarity information in the second search result set. This process specifically includes the following steps:
[0086] Step S141: Based on the entity association relationships in the first search result set, obtain the graph association fit degree values of the entities in the second search result set.
[0087] This step utilizes the authoritative medical entity associations in the first search result set to assign a graph association fit value to each vector search result item in the second search result set, thereby quantifying the vector search result items in the second search result set. Specifically, firstly, entity extraction is performed on the standard medical text corresponding to each vector search result item in the second search result set to obtain its core medical entities (such as medication, symptoms, and diagnostic actions); secondly, the extracted core entities are matched with the entity associations in the first search result set, and a corresponding graph association fit value is assigned based on the degree of matching (e.g., a preset value range of 0-1, with higher values indicating stronger fit and a better match in terms of medical authority).
[0088] In some optional implementations, the assignment rules for the graph association fit degree value are as follows:
[0089] 1. If the extracted core entity is completely consistent with the target entity in a certain entity association relationship in the first search result set, and the entity association relationship is positive (such as "recommended medication" or "associated treatment"), then a high fit value (e.g., 0.9-1.0) is directly assigned. This value can be positively correlated with the confidence information corresponding to the entity association relationship. For example, the corresponding confidence information can be directly used or scaled proportionally.
[0090] 2. If the extracted core entity does not appear directly in the first search result set, but belongs to the same medical category as a target entity in the first search result set (e.g., both are "antibiotics"), and the entity association relationship of the medical category in the first search result set is positive, then a moderately high fit value (e.g., 0.7-0.8) will be assigned.
[0091] 3. If the extracted core entity matches a negative entity in the first search result set, such as "contraindicated medication", then assign a very low fit value (e.g., 0) to achieve strong filtering.
[0092] 4. If the extracted core entity cannot find a direct or indirect entity relationship in the first search result set, a basic fit score (e.g., 0.5) will be assigned, indicating that its medical logical relevance is unknown, and the fusion ranking will rely more on semantic similarity.
[0093] Step S142: According to the preset fusion rules, the graph association fit degree value is weighted and fused with the semantic similarity information in the corresponding second retrieval result set to obtain the fusion ranking value.
[0094] Specifically, a corresponding fusion ranking value is calculated for each vector retrieval result item in the second retrieval result set.
[0095] In a preferred embodiment, the fusion ranking value is calculated using the following linear weighting formula:
[0096] FS = α * GA + β * SS;
[0097] Wherein: FS is the fusion ranking value; GA is the graph association fit value obtained in step S141; SS is the semantic similarity information of the vector retrieval result item itself (value range 0-1), which represents the degree of semantic association between the vector retrieval result item and the standard medical entity data; α and β are preset weight coefficients, and satisfy α > β and α + β = 1.
[0098] For example, α = 0.7 and β = 0.3 can be preset. This configuration means that medical logic fit contributes 70%, and semantic similarity contributes 30%. It should be noted that the specific settings of the weighting coefficients can be configured according to actual needs.
[0099] It should be understood that, through the aforementioned pre-defined weighted fusion rules, a vector retrieval result item with high semantic similarity but conflicting medical logic (such as the extracted core entity being a contraindicated drug) will have its fusion ranking value significantly lowered; while a vector retrieval result item with moderate semantic similarity but highly consistent medical logic (such as the extracted core entity being a similar alternative drug) will have its fusion ranking value significantly improved.
[0100] Step S143: Sort and filter the second search result set according to the fusion ranking value; wherein, the weight of the graph association fit degree value in the weighted fusion is greater than the weight of the semantic similarity information.
[0101] Specifically, all vector search result items in the second search result set are sorted according to a preset sorting rule based on the calculated fusion sorting value. Preferably, the preset sorting rule is to arrange them in descending order according to the fusion sorting value. Subsequently, all sorted vector search result items are filtered to improve the accuracy of the final recommendation results.
[0102] In some optional implementations, sorting and filtering the second search result set according to the fusion ranking value specifically includes the following:
[0103] Sort: Arrange the values from highest to lowest according to the fusion sort value to form a temporary sort list.
[0104] Filtering: One or more of the following filtering strategies can be applied:
[0105] 1. Set a fusion sorting threshold (e.g., FS > 0.6) to filter out vector retrieval results that are below this fusion sorting threshold.
[0106] 2. Only retain the top N vector retrieval results with the highest fusion ranking value (e.g., N=5).
[0107] 3. Forcefully remove vector retrieval results with a graph association fit value below a certain absolute lower limit (e.g., GA < 0.2), regardless of how high their fusion ranking value is, to ensure absolute safety.
[0108] After the above sorting and filtering processes, a second subset of search results is obtained after fusion sorting. The search results included in this subset are not only semantically relevant to the user's search request, but more importantly, they have been verified and rearranged by authoritative medical knowledge, and their order better reflects the user's actual request response in the current medical scenario.
[0109] It should be noted that after the fusion and sorting of the second search result set is completed, the two search result sets are integrated according to a hierarchical logic that prioritizes core search information and supplements it with auxiliary search information: First, the first search result set is sorted according to its original confidence level and placed at the forefront of the recommendation results to prioritize the display of core entity relationship information (such as "Amoxicillin (recommended drug, confidence level 0.9)", "Levofloxacin (contraindicated drug, confidence level 0.9)", "Cough (related symptom, confidence level 0.6)"); then, the subset of the second search results after fusion and sorting is sequentially appended to the first search result set according to the fusion ranking value to supplement generalized medical information and enrich the recommendation dimensions.
[0110] Therefore, the advantage of integrating the dual search result sets according to the hierarchical logic of prioritizing core search information and supplementing with auxiliary search information to form the final recommendation result is:
[0111] 1. Accurate and reliable results, authoritative and explainable: Overcoming the semantic limitations of traditional keyword retrieval, it directly uses authoritative medical knowledge graphs for reasoning, ensuring that the recommended results have solid medical logic support and a clear and explainable path.
[0112] 2. Comprehensive information coverage and in-depth semantic understanding: It breaks through the coverage boundaries of knowledge graphs and uses semantic vector technology to generalize the retrieval of relevant information from massive amounts of unstructured text, significantly improving the system's recall rate and adaptability to new knowledge.
[0113] 3. Intelligent fusion decision-making with controllable security risks: Through fusion rules led by medical logic, the system intelligently integrates results from both channels, automatically filters conflicting information, and forms a "core-supplement" hierarchical recommendation, providing comprehensive information while fundamentally ensuring medical safety.
[0114] 4. The system is highly practical and enhances the user experience: It achieves full-process automation from natural language query to structured and hierarchical intelligent recommendation, providing users with a one-stop, high-quality, and reliable medical information retrieval service, and strongly supporting smart healthcare applications.
[0115] To better describe the specific implementation scheme of the medical search and recommendation method based on knowledge graphs and semantic vectors, we will now combine... Figure 5 The specific implementation examples are described below:
[0116] In this embodiment, it is assumed that the user inputs "recommendations for medication for pneumonia in pregnant women".
[0117] First, the medical search request entered by the user is processed by medical entity recognition and standardization to obtain standard medical entity data: [Population attribute: pregnant woman, disease: pneumonia];
[0118] Secondly, based on the aforementioned standard medical entity data, in the pre-constructed medical knowledge graph, using "pregnant woman" and "pneumonia" as query nodes, graph traversal and reasoning are performed based on the normalized relationships in the medical knowledge graph (with limited hop count, such as ≤2). The retrieved relationship paths are then encapsulated as knowledge graph retrieval items. Confidence is calculated based on the path hop count, and the results are sorted according to a preset sorting rule to form the first retrieval result set.
[0119] [Target entity: Amoxicillin, Association: Recommended medication, Confidence level: 0.95]
[0120] [Target entity: Levofloxacin, Association: Contraindicated drug, Confidence level: 0.95]
[0121] [Target entity: Penicillin, Association: Available drug, Confidence level: 0.85]
[0122] [Target entity: Cough, Association: Common symptoms, Confidence: 0.80]
[0123] Then, after vectorizing the standard medical entity data, an approximate nearest neighbor search is performed in the vector database, and a semantic similarity threshold (e.g., 0.75) is set for filtering to obtain the second search result set:
[0124] [Search result entity: "Clinical application of cefixime in the treatment of respiratory tract infections", semantic similarity information: 0.92]
[0125] [Search result entity: "Guidelines for Nursing Care and Medication Safety for Patients with Pneumonia During Pregnancy", semantic similarity information: 0.87]
[0126] [Search result entity: "antibacterial spectrum and contraindications of tetracycline antibiotics", semantic similarity information: 0.78]
[0127] Next, based on the authoritative relationships of the first search result set, and combined with the semantic similarity information of the second search result set and preset fusion rules, the second search result set was fused and ranked, resulting in the following fused and ranked subsets of the second search results: Cefixime (fusion ranking value: 0.84) and Nursing Guidelines (fusion ranking value: 0.76). Among these, "Antibacterial spectrum and contraindications of tetracycline antibiotics" was discarded because it matched the "contraindicated medication" association relationship in the first search result set, with a graph association fit value of 0 and a fusion ranking value below a preset threshold, ensuring medication safety.
[0128] Finally, the two search result sets are hierarchically integrated to generate the final recommendation:
[0129] [Core Recommendations (from a Medical Knowledge Graph)]
[0130] 1. Amoxicillin: Recommended medication, confidence level 0.95 (high), preferred choice.
[0131] 2. Levofloxacin: Contraindicated in pregnant women, confidence level 0.95 (high), strictly prohibited from use.
[0132] 3. Penicillin: A viable alternative with a confidence level of 0.85 (medium).
[0133] 4. Cough: A common accompanying symptom, with a confidence level of 0.80 (medium), warranting attention.
[0134] [Supplementary Recommendation (Based on Semantic Search and Medical Logic Integration)]
[0135] 1. Cefixime: It belongs to the same class of antibiotics as the core recommended drugs, has a high degree of medical logic fit, and can be used as an alternative reference (fusion ranking value: 0.84).
[0136] 2. Guidelines for the care and safe medication use of pneumonia during pregnancy: Provides important information on auxiliary care and safe medication use (fusion ranking value: 0.76).
[0137] like Figure 6 The diagram illustrates the structure of a medical search and recommendation system 600 based on knowledge graphs and semantic vectors according to an embodiment of the present invention. The medical search and recommendation system 600 based on knowledge graphs and semantic vectors in this embodiment includes: a search receiving module 601, a standardization processing module 602, a data retrieval module 603, and a data fusion and recommendation module 604.
[0138] Search receiving module 601 is used to acquire medical search requests;
[0139] Standardization processing module 602 is used to perform medical entity recognition and standardization processing on the medical search request to obtain standard medical entity data;
[0140] The data retrieval module 603 is used to retrieve data from a pre-constructed medical knowledge graph based on the standard medical entity data to obtain a first retrieval result set; and to obtain a second retrieval result set based on the standard medical entity data through a pre-trained semantic vector model and vector database.
[0141] The data fusion and recommendation module 604 is used to fuse the first search result set and the second search result set according to preset fusion rules to obtain recommendation results.
[0142] It should be noted that the medical search and recommendation system based on knowledge graphs and semantic vectors provided in this embodiment of the invention is similar in implementation principle and process to the medical search and recommendation method based on knowledge graphs and semantic vectors described above, and will not be repeated here. The specific process of each module performing the above-mentioned corresponding steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.
[0143] It should also be understood that the module division in the embodiments of the present invention is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of the present invention can be integrated into a single processor, exist as separate physical entities, or two or more modules can be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0144] like Figure 7 The diagram shown is a schematic of an electronic terminal provided in an embodiment of this application. The electronic terminal includes at least one processor 701, a memory 702, at least one network interface 703, and a user interface 705. The various components in the device are coupled together via a bus system 704. It is understood that the bus system 704 is used to implement communication between these components. In addition to a data bus, the bus system 704 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 7 The general will label all buses as bus systems.
[0145] The user interface 705 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.
[0146] It is understood that memory 702 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.
[0147] In this embodiment of the invention, the memory 702 is used to store various types of data to support the operation of the electronic terminal 700. Examples of this data include: any executable program for operation on the electronic terminal 700, such as the operating system 7021 and application program 7022; the operating system 7021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 7022 may contain various applications, such as a media player, browser, etc., for implementing various application services. The method for testing the lateral positioning accuracy of agricultural machinery provided in this embodiment of the invention can be included in the application program 7022.
[0148] The methods disclosed in the above embodiments of the present invention can be applied to processor 701, or implemented by processor 701. Processor 701 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 701 or by instructions in software form. The processor 701 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 701 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. General-purpose processor 701 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.
[0149] In an exemplary embodiment, the electronic terminal 700 may be used to execute the aforementioned method by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs).
[0150] According to the method provided in the embodiments of the present invention, the present invention also provides a computer program product, the computer program product comprising: computer program code, which, when executed on a computer, causes the computer to perform... Figure 1 The medical search recommendation method based on knowledge graphs and semantic vectors in any of the embodiments shown.
[0151] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).
[0152] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0153] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0154] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0155] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0156] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0157] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs, DVDs), or semiconductor media (e.g., solid-state disks, SSDs, etc.).
[0158] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0159] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0160] In summary, the medical search and recommendation method, system, product, and terminal based on knowledge graphs and semantic vectors provided by this invention obtains standard medical entity data by performing medical entity recognition and standardization processing on user-input medical search requests. On one hand, based on the standard medical entity data, a first search result set is obtained by performing retrieval reasoning through a pre-constructed medical knowledge graph. On the other hand, based on the standard medical entity data, a second search result set is obtained through a pre-trained semantic vector model and vector database. Then, according to preset fusion rules, the first and second search result sets are fused to obtain recommendation results. This application effectively overcomes the limitations of existing medical retrieval technologies, compensating for the lack of explicit medical logic support and insufficient semantic generalization of knowledge graphs through dual-path collaborative fusion. This ensures the authority and comprehensiveness of recommendation results, ultimately achieving accurate, interpretable, and secure medical search and recommendation, facilitating efficient application in clinical diagnosis and medical information query scenarios.
[0161] Therefore, this application effectively overcomes the various shortcomings of the prior art and has high industrial application value.
[0162] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A medical search and recommendation method based on knowledge graphs and semantic vectors, characterized in that, include: Obtain medical search requests; The medical search request is subjected to medical entity identification and standardization processing to obtain standard medical entity data; Based on the standard medical entity data, a search is performed in the pre-constructed medical knowledge graph to obtain a first search result set; based on the standard medical entity data, a second search result set is obtained through a pre-trained semantic vector model and vector database. According to the preset fusion rules, the first search result set and the second search result set are fused to obtain the recommendation results.
2. The medical search and recommendation method based on knowledge graphs and semantic vectors according to claim 1, characterized in that, The methods for performing medical entity identification and standardization processing on the aforementioned medical search requests include: The medical search request is segmented into words to obtain the corresponding valid medical entity data; Based on a pre-built standard library of medical synonyms, the effective medical entity data is mapped to unified standard medical terms to form the standard medical entity data.
3. The medical search and recommendation method based on knowledge graphs and semantic vectors according to claim 1 or 2, characterized in that, Based on the aforementioned standard medical entity data, the methods for obtaining the first search result set by searching within a pre-constructed medical knowledge graph include: Based on the standard medical entity data, retrieval and reasoning are performed in the medical knowledge graph to obtain the entity association path of the standard medical entity data. Based on the entity association path of the standard medical entity data, one or more knowledge graph retrieval items are formed. Each knowledge graph retrieval item includes at least a target entity and the entity association relationship between the target entity and the standard medical entity data. The knowledge graph retrieval items are sorted according to a preset sorting rule to form the first retrieval result set.
4. The medical search and recommendation method based on knowledge graphs and semantic vectors according to claim 3, characterized in that, The knowledge graph retrieval item also includes confidence information; the confidence information is calculated based on the path hop count of the entity association path; wherein the confidence information is negatively correlated with the path hop count of the entity association path.
5. The medical search and recommendation method based on knowledge graphs and semantic vectors according to claim 1, characterized in that, Based on the aforementioned standard medical entity data, the methods for obtaining the second retrieval result set through a pre-trained semantic vector model and vector database include: The standard medical entity data is vectorized using a pre-trained semantic vector model to obtain the corresponding entity query vector. The entity query vector is subjected to similarity retrieval in the vector database, and semantic similarity information corresponding to each retrieval result is obtained; wherein, the semantic similarity information that meets the preset semantic similarity threshold and the corresponding retrieval results form the second retrieval result set.
6. The medical search and recommendation method based on knowledge graphs and semantic vectors according to claim 1, characterized in that, According to preset fusion rules, the methods for fusion processing of the first search result set and the second search result set include: According to the preset fusion rules, the second search result set is fused and sorted by the entity association relationship of the first search result set and the semantic similarity information of the second search result set. The first search result set is integrated with the second search result set after fusion and sorting to generate the recommendation result.
7. The medical search and recommendation method based on knowledge graphs and semantic vectors according to claim 6, characterized in that, According to preset fusion rules, the method for fusing and ranking the second search result set by combining the entity association relationships in the first search result set with the semantic similarity information in the second search result set includes: Based on the entity association relationships of the first search result set, the graph association fit degree value of the second search result set is obtained; According to the preset fusion rules, the graph association fit degree value is weighted and fused with the semantic similarity information in the corresponding second retrieval result set to obtain the fusion ranking value; The second search result set is sorted and filtered according to the fusion ranking value; wherein the weight of the graph association fit degree value in the weighted fusion is greater than the weight of the semantic similarity information.
8. A medical search and recommendation system based on knowledge graphs and semantic vectors, characterized in that, include: The search receiving module is used to acquire medical search requests; The standardization processing module is used to perform medical entity recognition and standardization processing on the medical search request to obtain standard medical entity data. The data retrieval module is used to retrieve data from a pre-constructed medical knowledge graph based on the standard medical entity data to obtain a first retrieval result set; and to obtain a second retrieval result set based on the standard medical entity data through a pre-trained semantic vector model and vector database. The data fusion and recommendation module is used to fuse the first search result set and the second search result set according to preset fusion rules to obtain recommendation results.
9. A computer program product, characterized in that, The computer program product includes computer program code, which, when run on a computer, enables the computer to implement the medical search recommendation method based on knowledge graphs and semantic vectors as described in any one of claims 1 to 7.
10. An electronic terminal, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the medical search recommendation method based on knowledge graphs and semantic vectors as described in any one of claims 1 to 7.