Query service system based on medical knowledge graph
By introducing a type determination module and a vector generation module in the medical knowledge graph query system, combining the loading of medical knowledge graphs and comprehensive query statement construction, multi-type search and high-precision query are realized, solving the problem of single query types and low result accuracy in the existing technology, significantly improving query efficiency and user experience.
Patent Information
- Application Number
- CN202510205825.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The query type of the prior art traditional Chinese medicine knowledge graph is single, the result accuracy is low, making it difficult to meet the diverse search needs of users.
Through the type determination module and vector generation module flexibly adapt to user search needs, realizing multi-type search; based on the loading of medical knowledge graphs and the construction of comprehensive query statements, make full use of the correlation between medical entities and attributes to improve the accuracy and relevance of query.
It significantly improves query efficiency and user experience, realizes multi-type search and high-precision query results, and solves the problem of single query types and low result accuracy in the existing technology.
Smart Images

Figure CN119719158A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a query service system based on a medical knowledge graph. Background Art
[0002] With the rapid growth and accumulation of medical knowledge, the complex relationships between medical literature, data and concepts have become difficult to manage and utilize. How to query and analyze massive medical information through efficient tools has become an important issue.
[0003] Knowledge graph is a structured semantic knowledge base technology, which is often used to express the integration of multi-source heterogeneous data and knowledge in a specific field, and can support reasoning and deep semantic analysis of knowledge in a specific field. Knowledge graph uses existing international standard languages such as RDF, RDFS, OWL, etc. to express relevant knowledge in the form of "subject, predicate, object" triples, and supports standardized RDFS or OWL reasoning rules. Knowledge graph provides corresponding knowledge query and reasoning services through the corresponding query language SPARQL server (endpoint) constructed. Medical knowledge graph integrates various types of knowledge and data resources for specific diseases. It provides data foundation support for studying various relationships of data related to the disease and its clinical decision support. However, mastering and using the knowledge services provided by medical knowledge graph usually requires professional training and training, especially mastering and learning knowledge query methods in medical knowledge graph, such as SPARQL query, requires professional learning. This poses a specific difficulty for many medical personnel.
[0004] Therefore, the present invention provides a query service system based on medical knowledge graph. Summary of the invention
[0005] The present invention provides a query service system based on a medical knowledge graph, which is used to flexibly adapt to user search needs through a type determination module and a vector generation module to realize multi-type search; based on the loading of the medical knowledge graph and the construction of a comprehensive query statement, the correlation between medical entities and attributes is fully utilized to improve the accuracy and relevance of the query; through the automatic generation and execution of the comprehensive query statement, the query efficiency and user experience are significantly improved, and the problems of single query type and low result accuracy in the prior art are effectively solved.
[0006] The present invention provides a query service system based on a medical knowledge graph, comprising: Type determination module: obtains the search content selected by the user based on the preset system interface, and then determines the corresponding search type; Vector generation module: generates query vectors based on the search content and corresponding search type selected by the user; Graph loading module: loads the medical knowledge graph into the preset knowledge graph platform and constructs the initial query statement; Statement construction module: constructs a comprehensive query statement based on the query vector and the initial query statement; Result acquisition module: executes queries based on the medical knowledge graph and comprehensive query statements to obtain query results.
[0007] The present invention provides a query service system based on a medical knowledge graph, wherein the search types include: a keyword search type for document titles, a concept search type for document titles, a keyword search type for document abstracts, and a concept search type for document abstracts.
[0008] The present invention provides a query service system based on a medical knowledge graph, a type determination module, comprising: Information analysis unit: monitors the first operation of the user on the preset system interface in real time based on the preset tool, obtains the user's search information and performs information analysis, and then determines the first feature of the user's search content; Operation analysis unit: obtaining subsequent operations of the user's first operation on the preset system interface based on a preset tool and performing operation analysis, thereby determining a second feature of the user's search content; A region analysis unit: obtaining an interface region of a first operation performed by a user on a preset system interface, and determining a third feature of the user's search content based on a type of the interface region of the first operation; The feature analysis unit determines a plurality of search types of the user's search content based on the first feature, the second feature, and the third feature of the user's search content.
[0009] The present invention provides a query service system based on a medical knowledge graph, a vector generation module, comprising: Element determination unit: divides the user's search content into elements, and then determines a number of search elements under each search type; Category determination unit: performs category analysis on each search element, and then determines the medical category corresponding to each search element; A first sorting unit: performs a first sorting on all search elements based on a preset medical category order, thereby determining a first classification sorting of the user's search content; A second sorting unit: performing a second sorting on all search elements based on a preset search type order, and then determining a second classification sorting of the user search content under the first classification sorting; Weight determination unit: obtains and analyzes historical query data of each search type based on a preset database, and then determines the weight of each search type; Vector construction unit: determines search data pairs based on the weight of each search type and the second classification ranking of the user search content under the first classification ranking, and then constructs a query vector based on the search data pairs.
[0010] The present invention provides a query service system based on a medical knowledge graph, a weight determination unit, comprising: Parameter acquisition subunit: acquires and analyzes historical query data of each search type based on a preset database, and then acquires several historical query parameters of each search type; Weight determination subunit: Determines the weight of each search type based on historical query parameters of each search type:
[0011] in, is the weight of the i-th search type, is the historical weighted average value of the i-th search type, is the maximum historical weight of the i-th search type, is the historical query frequency of the i-th search type, is the historical relevance score of the i-th search type, is the historical response timeliness coefficient of the i-th search type, is the preset conversion coefficient corresponding to the historical query frequency, is the preset conversion coefficient corresponding to the historical relevance score, is the preset conversion coefficient corresponding to the historical response timeliness coefficient, , , Represent the weight coefficients of frequency, relevance and timeliness respectively, is the number of search types.
[0012] The present invention provides a query service system based on a medical knowledge graph, a graph loading module, comprising: Parameter configuration unit: obtains the interface information of the preset knowledge graph platform and configures the corresponding connection parameters; Graph extraction unit: extracting a medical knowledge graph from a plurality of preset medical knowledge graph data sources; Graph sending unit: based on the connection parameters, sends the medical knowledge graph to the preset knowledge graph platform; Graph loading unit: based on the preset knowledge graph platform and the preset storage mechanism, the medical knowledge graph is stored in the preset knowledge graph platform; Variable determination unit: determines several query requirements based on the medical knowledge graph, and then determines the target variable of the initial query statement in combination with the initial query vector; Entity determination unit: determines several medical entities in the medical knowledge graph based on the initial query vector; Condition determination unit: determining a first screening condition based on the connection relationship between medical entities; Condition extension unit: extending the first screening condition based on the attributes of all medical entities, thereby determining the second screening condition; Information acquisition unit: screening in the medical knowledge graph based on the second screening condition, thereby acquiring a number of query information; Statement building unit: builds an initial query statement based on the query information and the target variable of the initial query statement.
[0013] The present invention provides a query service system based on a medical knowledge graph, and connection parameters include: server-related parameters, authentication parameters, protocol-related parameters, and connection timeout and retry parameters.
[0014] The present invention provides a query service system based on a medical knowledge graph, a statement construction module, comprising: Vector analysis unit: analyzes the query vector and constructs corresponding query clauses based on the type of each element in the query vector; Clause integration unit: integrates all constructed query clauses according to the order of corresponding elements in the query vector; Statement determination unit: merges the integrated query clauses with the initial query statement to determine the comprehensive query statement.
[0015] Compared with the prior art, the present invention has the following beneficial effects: Through the type determination module and the vector generation module, the user's search needs can be flexibly adapted to realize multi-type search; based on the loading of the medical knowledge graph and the construction of comprehensive query statements, the correlation between medical entities and attributes is fully utilized to improve the accuracy and relevance of the query; through the automatic generation and execution of comprehensive query statements, the query efficiency and user experience are significantly improved, and the problems of single query type and low result accuracy in the existing technology are effectively solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a structural diagram of a query service system based on a medical knowledge graph provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Embodiment 1: The embodiment of the present invention provides a query service system based on medical knowledge graph, such as Figure 1 As shown, including: Type determination module: obtains the search content selected by the user based on the preset system interface, and then determines the corresponding search type; Vector generation module: generates query vectors based on the search content and corresponding search type selected by the user; Graph loading module: loads the medical knowledge graph into the preset knowledge graph platform and constructs the initial query statement; Statement construction module: constructs a comprehensive query statement based on the query vector and the initial query statement; Result acquisition module: executes queries based on the medical knowledge graph and comprehensive query statements to obtain query results.
[0020] In this embodiment, the preset system interface is an interface for users to interact with the query service system, through which users can enter query content, select query type, and view query results. The interface may include elements such as a search box, a drop-down menu, and radio buttons to simplify user operations. For example, in a medical literature query system, a user enters a preset system interface, which includes: a search box: enter content, such as "diabetes treatment drugs", query type options: the user selects the search type, such as "keyword search" or "concept search", and query scope: select "document title" or "document abstract".
[0021] In this embodiment, the query vector is a vectorized data representation that the system converts the user's query content and search type into a computer-understandable vectorized data representation, which includes the weight, category and ranking information of the query elements for subsequent knowledge graph search and statement construction. For example, the user enters "diabetes treatment drugs", and the system parses it into the following query vector: Element 1: Diabetes (category: disease, weight: 0.4), Element 2: Treatment (category: medical behavior, weight: 0.3), Element 3: Drug (category: medical entity, weight: 0.3), and the query vector result is: [Diabetes: 0.4, Treatment: 0.3, Drug: 0.3].
[0022] In this embodiment, the initial query statement is an initial condition generated based on the medical knowledge graph, which describes the target that the system wants to find in the knowledge graph, such as the entity, relationship or attribute to be matched. For example, for the above query vector, the initial query statement may be: Search in the medical knowledge graph: SELECT ?Drug WHERE {?Disease rdf:type "Diabetes". ?Treatment rdf:type "Treatment". ?Drug rdf:type "Drug".}, which means obtaining drug entities related to "diabetes" and "treatment" from the knowledge graph.
[0023] In this embodiment, the comprehensive query statement is a final statement that is further optimized based on the initial query statement and the query vector and the search type selected by the user, and can filter relevant information more accurately. If the user selects "keyword search", the comprehensive query statement may be expanded to: Keyword matching: MATCH (d:disease {name:"diabetes"})-[:association]->(t:treatment)-[:use]->(m:drug) RETURN m. If "concept search" is selected, the comprehensive query statement may further introduce semantic relations: Concept expansion: MATCH (d:disease)-[:semantic expansion]->(c:related concept)-[:association]->(m:drug) RETURN m In this embodiment, the query result is the information that the system screens and returns from the medical knowledge graph based on the comprehensive query statement, and is finally displayed to the user. Example: The query result may include the following: Drug name: Metformin Drug category: Hypoglycemic drug, Applicable population: Type 2 diabetes patients Literature source: Title, author and abstract of a medical research paper.
[0024] The beneficial effects of the above technical solution are: flexible adaptation to user search needs through the type determination module and the vector generation module to achieve multi-type search; based on the loading of the medical knowledge graph and the construction of comprehensive query statements, full use is made of the correlation between medical entities and attributes to improve the accuracy and relevance of the query; through the automatic generation and execution of comprehensive query statements, the query efficiency and user experience are significantly improved, and the problem of single query type and low result accuracy in the prior art is effectively solved.
[0025] Embodiment 2: An embodiment of the present invention provides a query service system based on a medical knowledge graph, and the search types include: a keyword search type for document titles, a concept search type for document titles, a keyword search type for document abstracts, and a concept search type for document abstracts.
[0026] In this embodiment, the keyword search type for the document title, i.e., the generated knowledge graph query statement, uses the regular expression regex and its corresponding filter condition statement FILTER to match the corresponding text in the document title; In this embodiment, the concept search type for document titles, i.e., the generated knowledge graph query statement uses the corresponding concept ID as the top-level concept, and traverses its corresponding hierarchical sub-concepts (i.e., using rdfs:subClassOf) to match the semantically annotated data in the document title; In this embodiment, the keyword search type for the document abstract, i.e., the generated knowledge graph query statement, uses the regular expression regex and its corresponding filter condition statement FILTER to match the corresponding text in the document abstract; In this embodiment, the concept search type for document abstracts, that is, the generated knowledge graph query statement uses the corresponding concept ID as the top-level concept, and traverses its corresponding hierarchical sub-concepts (that is, using rdfs:subClassOf) to match the semantically annotated data in the document abstract.
[0027] The beneficial effects of the above technical solution are: supporting multi-dimensional queries of document titles and abstracts through keyword and concept searches, improving the accuracy and relevance of searches in combination with medical knowledge graphs, meeting multi-type search needs, improving document retrieval efficiency, and providing more convenient support for medical research and applications.
[0028] Embodiment 3: The embodiment of the present invention provides a query service system based on a medical knowledge graph, a type determination module, including: Information analysis unit: monitors the first operation of the user on the preset system interface in real time based on the preset tool, obtains the user's search information and performs information analysis, and then determines the first feature of the user's search content; Operation analysis unit: obtaining subsequent operations of the user's first operation on the preset system interface based on a preset tool and performing operation analysis, thereby determining a second feature of the user's search content; A region analysis unit: obtaining an interface region of a first operation performed by a user on a preset system interface, and determining a third feature of the user's search content based on a type of the interface region of the first operation; The feature analysis unit determines a plurality of search types of the user's search content based on the first feature, the second feature, and the third feature of the user's search content.
[0029] In this embodiment, based on the preset tool, the user's first operation on the preset system interface is monitored in real time, the user's search information is obtained and information analysis is performed, and then the first feature of the user's search content is determined, including: text preprocessing of the obtained user search information, removing redundant spaces, punctuation marks, etc., and standardizing it. For example, the user input "arthritis," is processed as "arthritis". Next, the nature of the search content is judged. If it is a simple text segment, such as "fever" and "headache", it is preliminarily identified as a keyword; if it can correspond to a concept in the medical knowledge graph, like "diabetes" has its own concept ID, synonyms, etc., it is determined to be a concept. At the same time, the degree of correlation between the search content and various medical fields is analyzed, such as "heart stent" is related to the treatment method and body structure field.
[0030] In this embodiment, the second feature of obtaining the subsequent operation of the user's first operation on the preset system interface based on the preset tool and performing operation analysis to further determine the user's search content is to track the subsequent operation of the user after selecting the search content. If the user adjusts the parameters related to the concept level, such as setting to search for documents related to the three sub-concepts under a certain concept, it indicates that there is a need for concept reasoning; if only the keyword matching method is set, such as requiring an exact match, it tends to be a keyword search.
[0031] In this embodiment, the interface area of the first operation of the user on the preset system interface is obtained, and the third feature of determining the user's search content based on the interface area type of the first operation is to determine the type of interface area where the user first operated. If the operation is in the input box marked as "title search area", if there is a prompt "Please enter keywords or concepts for title search" in the area, it is likely to point to title search; if it is in the "abstract search area", it tends to be an abstract search.
[0032] The beneficial effects of the above technical solution are: obtaining multi-dimensional features of user search content through information analysis, operation analysis and regional analysis, and determining the search type through comprehensive feature analysis, which can accurately capture user needs, realize intelligent and precise medical knowledge query services, and improve query efficiency and user experience.
[0033] Embodiment 4: The embodiment of the present invention provides a query service system based on a medical knowledge graph, a vector generation module, including: Element determination unit: divides the user's search content into elements, and then determines a number of search elements under each search type; Category determination unit: performs category analysis on each search element, and then determines the medical category corresponding to each search element; A first sorting unit: performs a first sorting on all search elements based on a preset medical category order, thereby determining a first classification sorting of the user's search content; A second sorting unit: performing a second sorting on all search elements based on a preset search type order, and then determining a second classification sorting of the user search content under the first classification sorting; Weight determination unit: obtains and analyzes historical query data of each search type based on a preset database, and then determines the weight of each search type; Vector construction unit: determines search data pairs based on the weight of each search type and the second classification ranking of the user search content under the first classification ranking, and then constructs a query vector based on the search data pairs.
[0034] In this embodiment, element segmentation is to disassemble the user's search content and divide it into several search elements. For example, for the search content entered by the user: "Lung cancer treatment method", the system will segment it into multiple elements: Element 1: Lung cancer, Element 2: Treatment, Element 3: Method These elements are the basic components of the search content and are used for subsequent classification and sorting. For example: the user enters: "Diabetic complications treatment", after segmentation, it may be obtained: Element 1: Diabetes, Element 2: Complications, Element 3: Treatment.
[0035] In this embodiment, the first classification sorting is to analyze the medical categories to which the segmented search elements belong, and sort them based on the priority (preset order) of the medical categories. For example, the preset order of medical categories is: disease>symptom>treatment method>drug. The system will prioritize elements of high priority categories. For example: for the search content: "diabetes complication treatment", the segmented element categories are: diabetes (disease), complications (symptoms), treatment (treatment method). According to the priority of the medical category, the sorting results are: diabetes (disease), complications (symptoms), treatment (treatment method).
[0036] In this embodiment, the second classification sorting is based on the first classification sorting, and each element is further sorted according to the preset search type priority. The search type priority may be: title keyword>title concept>abstract keyword>abstract concept. In this way, the priority of each search element under different search types can be determined. For example: for the sorted elements (diabetes>complications>treatment), they are arranged in the order of search type: diabetes: title keyword, title concept, abstract keyword, abstract concept.
[0037] The beneficial effects of the above technical solution are: by performing element segmentation and medical category classification on user search content, combining preset sorting rules and historical query weights, constructing accurate query vectors, and using medical knowledge graphs to improve the relevance and accuracy of search results, multi-dimensional and efficient medical information retrieval is achieved to meet user personalized needs.
[0038] Embodiment 5: The embodiment of the present invention provides a query service system based on a medical knowledge graph, and a weight determination unit, including: Parameter acquisition subunit: acquires and analyzes historical query data of each search type based on a preset database, and then acquires several historical query parameters of each search type; Weight determination subunit: Determines the weight of each search type based on historical query parameters of each search type:
[0039] in, is the weight of the i-th search type, is the historical weighted average value of the i-th search type, is the maximum historical weight of the i-th search type, is the historical query frequency of the i-th search type, is the historical relevance score of the i-th search type, is the historical response timeliness coefficient of the i-th search type, is the preset conversion coefficient corresponding to the historical query frequency, is the preset conversion coefficient corresponding to the historical relevance score, is the preset conversion coefficient corresponding to the historical response timeliness coefficient, , , Represent the weight coefficients of frequency, relevance and timeliness respectively, is the number of search types.
[0040] In this embodiment, the historical response timeliness coefficient is used to measure the importance of a certain search type in the time sensitivity of user needs in past queries. It reflects whether the results of a certain search type need to be updated in a timely manner or responded to quickly. For example, some medical queries (such as the latest progress in disease treatment) have higher timeliness requirements, while other queries (such as basic knowledge of a certain disease) may have lower timeliness requirements. If the results of a certain search type have often caused user dissatisfaction due to insufficient timeliness in history, its timeliness coefficient will be higher. The timeliness coefficient can be calculated from data such as the update time of the query results, the response speed, and the user's preference feedback on new data.
[0041] The beneficial effects of the above technical solution are: by calculating the weight of each search type based on historical query parameters, comprehensively considering query frequency, relevance score and response timeliness, and optimizing weight distribution using conversion coefficients and weight coefficients, the accuracy and efficiency of the query service system are improved, and more intelligent medical information query and sorting are achieved, providing users with more efficient and relevant results.
[0042] Embodiment 6: The embodiment of the present invention provides a query service system based on a medical knowledge graph, and a graph loading module, including: Parameter configuration unit: obtains the interface information of the preset knowledge graph platform and configures the corresponding connection parameters; Graph extraction unit: extracting a medical knowledge graph from a plurality of preset medical knowledge graph data sources; Graph sending unit: based on the connection parameters, sends the medical knowledge graph to the preset knowledge graph platform; Graph loading unit: based on the preset knowledge graph platform and the preset storage mechanism, the medical knowledge graph is stored in the preset knowledge graph platform; Variable determination unit: determines several query requirements based on the medical knowledge graph, and then determines the target variable of the initial query statement in combination with the initial query vector; Entity determination unit: determines several medical entities in the medical knowledge graph based on the initial query vector; Condition determination unit: determining a first screening condition based on the connection relationship between medical entities; Condition extension unit: extending the first screening condition based on the attributes of all medical entities, thereby determining the second screening condition; Information acquisition unit: screening in the medical knowledge graph based on the second screening condition, thereby acquiring a number of query information; Statement building unit: builds an initial query statement based on the query information and the target variable of the initial query statement.
[0043] In this embodiment, the data source of the preset medical knowledge graph data refers to different databases or document collections that store medical knowledge, which contain knowledge information in the medical field, such as diseases, drugs, symptoms, treatment methods, etc. These data sources may include: Medical databases: such as PubMed, OMIM (Online Human Mendelian Inheritance Database), DrugBank. Hospital electronic medical record systems (EHRs): store patients' medical history, diagnostic information, treatment plans, etc. Medical research literature: knowledge extracted from medical journals, conference papers, etc. Clinical guidelines: such as medical guidance documents issued by the World Health Organization (WHO). Expert knowledge: experience and rules manually entered from medical experts. For example: A data source may be a specialized database that stores the correspondence between drugs and treatment methods for a certain disease (such as diabetes).
[0044] In this embodiment, the query requirement refers to the search target proposed by the user, which is usually related to the medical field. For example, the user may need to query the symptoms of a certain disease, the effects of a drug, or the relationship between diseases. For example, the user wants to query "related treatment drugs for diabetes and their common side effects". The query requirement can be decomposed into the following sub-requirements: Get drugs related to diabetes. Get the common side effects of each drug.
[0045] In this embodiment, the first screening condition is a preliminary screening criterion obtained through the connection relationship between medical entities. The connection relationship is usually determined by the type of entity nodes and their edges in the knowledge graph. For example, there may be a "treatment" relationship between a disease and a drug. For example: when querying "diabetes-related therapeutic drugs", the first screening condition can be: entity type: drug, connection relationship: treatment, starting entity: diabetes, which means that all entities connected to "diabetes" through the "treatment" relationship in the graph are screened, and these entity types must be "drugs".
[0046] In this embodiment, the second screening condition is a screening criterion that is extended based on the first screening condition and combined with the attributes of the medical entity. For example, the specific category of the drug, side effects or contraindications and other attributes can be used as extended conditions. For example: For the drug set obtained by the first screening condition, the screening can be further expanded: the severity of the side effects is less than a certain threshold, and it is suitable for a specific patient age group (such as elderly patients). It does not contain known contraindications. In this way, the second screening condition may be: Drug type: hypoglycemic drug, side effects: headache, nausea, but not including serious heart disease risk population: adults, and finally through the second screening condition, more accurate results can be obtained, such as "low-side effect hypoglycemic drugs suitable for adult diabetic patients."
[0047] The beneficial effect of the above technical solution is that based on the data source of the medical knowledge graph, preliminary screening conditions can be generated according to the query requirements, and accurate query results can be obtained by expanding the screening conditions, thereby improving the efficiency and accuracy of medical information query.
[0048] Embodiment 7: An embodiment of the present invention provides a query service system based on a medical knowledge graph, and connection parameters include: server-related parameters, authentication parameters, protocol-related parameters, and connection timeout and retry parameters.
[0049] In this embodiment, the server-related parameters are basic information related to the target server, which are used to locate and establish a connection, including the IP address, port number, or domain name of the server. For example: Server address: 192.168.1.10, port number: 8080; In this embodiment, the authentication parameters are parameters used to verify the system identity to ensure access rights, including user name, password, API key, or OAuth token, etc. For example: User name: admin_user, password: securePass123, API key: abcd1234xyz; In this embodiment, the protocol-related parameters define the technical protocol and data format of the communication, which are used to ensure that the client and the server can communicate according to the same rules, for example, protocol type: HTTPS, data format: JSON, transmission encryption method: TLS1.2; In this embodiment, the connection timeout parameter defines the time limit when the system waits for a connection to be established or responded to. Explanation: Avoid waiting for a long time for connection and improve system efficiency. For example: Connection timeout: 30 seconds, Read timeout: 60 seconds; In this embodiment, the retry parameter is the number and strategy of system retries when the connection fails, to ensure that the system can still try to connect under temporary network problems, for example: number of retries: 3 times, retry interval: 10 seconds.
[0050] The beneficial effects of the above technical solution are: by setting server parameters, authentication parameters, protocol parameters and timeout and retry mechanisms, efficient and stable connection between the system and the medical knowledge graph platform is ensured, the security and reliability of the connection are improved, the responsiveness and fault tolerance of the query service are enhanced, and it is suitable for efficient access and processing of complex medical data.
[0051] Embodiment 8: The embodiment of the present invention provides a query service system based on a medical knowledge graph, a statement construction module, including: Vector analysis unit: analyzes the query vector and constructs corresponding query clauses based on the type of each element in the query vector; Clause integration unit: integrates all constructed query clauses according to the order of corresponding elements in the query vector; Statement determination unit: merges the integrated query clauses with the initial query statement to determine the comprehensive query statement.
[0052] In this embodiment, the query clause is a sub-query statement generated based on the type of each element in the query vector, which represents a specific search condition or requirement for the medical knowledge graph. The query vector contains the decomposition items of the user's query requirements, such as disease name, symptoms, drugs, etc. The system generates clauses based on these decomposition items to describe the specific query logic of each requirement. If the user queries "diabetes treatment drugs and their side effects", the query vector may be: Element 1: Disease = Diabetes, Element 2: Drug = Treatment related, Element 3: Side effect. The query clause is constructed as follows: Clause 1: MATCH (d:Disease{name: 'Diabetes'}), Clause 2: MATCH (d)-[:Treated_By]->(m:Medication), Clause 3: MATCH(m)-[:Has_SideEffect]->(s:SideEffect).
[0053] In this embodiment, the integrated query clauses are merged into an overall query logic according to the order of the query vector elements, and then merged with the user's initial query statement to generate a comprehensive query statement. The initial query statement is usually the user's natural language input, such as "What are the treatment drugs for diabetes and their side effects?" The merged statement ensures that the system can not only meet the user's initial needs, but also provide accurate results through the knowledge graph. For example: Integrated query clauses: MATCH (d:Disease {name: 'Diabetic'}), MATCH (d)-[:Treated_By]->(m:Medication), MATCH (m)-[:Has_SideEffect]->(s:SideEffect), RETURN m.name, s.description Fusion initial query statement: Integrate user natural language input with the above query clauses to clarify query targets and results. Comprehensive query statement: User query: "What are the treatments for diabetes, and what are their side effects?" Parsed results: Query diabetes-related treatments and list the side effects of each drug. Knowledge graph query: Execute the integrated Cypher statement.
[0054] The beneficial effects of the above technical solution are: constructing query clauses through vector analysis, and integrating and fusing them with the initial query statements in sequence to generate comprehensive query statements, accurately analyzing user query needs, realizing efficient query of complex medical knowledge graphs, improving the accuracy and intelligence level of queries, and significantly optimizing user experience.
[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A query service system based on medical knowledge graph, characterized in that: include: Type determination module: obtains the search content selected by the user based on the preset system interface, and then determines the corresponding search type; Vector generation module: generates query vectors based on the search content and corresponding search type selected by the user; Graph loading module: loads the medical knowledge graph into the preset knowledge graph platform and constructs the initial query statement; Statement construction module: constructs a comprehensive query statement based on the query vector and the initial query statement; Result acquisition module: executes queries based on the medical knowledge graph and comprehensive query statements to obtain query results.
2. According to claim 1, a query service system based on medical knowledge graph is characterized in that: Search types include: keyword search type for document titles, concept search type for document titles, keyword search type for document abstracts, and concept search type for document abstracts.
3. According to claim 1, a query service system based on medical knowledge graph is characterized in that: Type determination module, including: Information analysis unit: monitors the first operation of the user on the preset system interface in real time based on the preset tool, obtains the user's search information and performs information analysis, and then determines the first feature of the user's search content; Operation analysis unit: obtaining subsequent operations of the user's first operation on the preset system interface based on a preset tool and performing operation analysis, thereby determining a second feature of the user's search content; A region analysis unit: obtaining an interface region of a first operation performed by a user on a preset system interface, and determining a third feature of the user's search content based on a type of the interface region of the first operation; The feature analysis unit determines a plurality of search types of the user's search content based on the first feature, the second feature, and the third feature of the user's search content.
4. A query service system based on medical knowledge graph according to claim 1, characterized in that: Vector generation module, including: Element determination unit: divides the user's search content into elements, and then determines a number of search elements under each search type; Category determination unit: performs category analysis on each search element, and then determines the medical category corresponding to each search element; A first sorting unit: performs a first sorting on all search elements based on a preset medical category order, thereby determining a first classification sorting of the user's search content; A second sorting unit: performing a second sorting on all search elements based on a preset search type order, and then determining a second classification sorting of the user search content under the first classification sorting; Weight determination unit: obtains and analyzes historical query data of each search type based on a preset database, and then determines the weight of each search type; Vector construction unit: determines search data pairs based on the weight of each search type and the second classification ranking of the user search content under the first classification ranking, and then constructs a query vector based on the search data pairs.
5. A query service system based on medical knowledge graph according to claim 4, characterized in that: A weight determination unit, comprising: Parameter acquisition subunit: acquires and analyzes historical query data of each search type based on a preset database, and then acquires several historical query parameters of each search type; Weight determination subunit: Determines the weight of each search type based on historical query parameters of each search type: in, is the weight of the i-th search type, is the historical weighted average value of the i-th search type, is the maximum historical weight of the i-th search type, is the historical query frequency of the i-th search type, is the historical relevance score of the i-th search type, is the historical response timeliness coefficient of the i-th search type, is the preset conversion coefficient corresponding to the historical query frequency, is the preset conversion coefficient corresponding to the historical relevance score, is the preset conversion coefficient corresponding to the historical response timeliness coefficient, , , Represent the weight coefficients of frequency, relevance and timeliness respectively, is the number of search types.
6. A query service system based on medical knowledge graph according to claim 1, characterized in that: Graph loading module, including: Parameter configuration unit: obtains the interface information of the preset knowledge graph platform and configures the corresponding connection parameters; Graph extraction unit: extracting a medical knowledge graph from a plurality of preset medical knowledge graph data sources; Graph sending unit: based on the connection parameters, sends the medical knowledge graph to the preset knowledge graph platform; Graph loading unit: based on the preset knowledge graph platform and the preset storage mechanism, the medical knowledge graph is stored in the preset knowledge graph platform; Variable determination unit: determines several query requirements based on the medical knowledge graph, and then determines the target variable of the initial query statement in combination with the initial query vector; Entity determination unit: determines several medical entities in the medical knowledge graph based on the initial query vector; Condition determination unit: determining a first screening condition based on the connection relationship between medical entities; Condition extension unit: extending the first screening condition based on the attributes of all medical entities, thereby determining the second screening condition; Information acquisition unit: screening in the medical knowledge graph based on the second screening condition, thereby acquiring a number of query information; Statement building unit: builds an initial query statement based on the query information and the target variable of the initial query statement.
7. A query service system based on medical knowledge graph according to claim 6, characterized in that: Connection parameters, including: server-related parameters, authentication parameters, protocol-related parameters, and connection timeout and retry parameters.
8. The query service system based on medical knowledge graph according to claim 1, characterized in that: Statement building blocks, including: Vector analysis unit: analyzes the query vector and constructs corresponding query clauses based on the type of each element in the query vector; Clause integration unit: integrates all constructed query clauses according to the order of corresponding elements in the query vector; Statement determination unit: merges the integrated query clauses with the initial query statement to determine the comprehensive query statement.
Citation Information
Patent Citations
Ordering method for classified information
CN103336848A
Insurance industry knowledge graph question and answer system construction method and device
CN110019844A
Visual knowledge graph query template construction method, device and system and storage medium
CN112507135A
Retrieval method and device based on user requirements and electronic equipment
CN116244344A
Customizing search
US9280580B1
Cited By
Medication guidance system and method based on knowledge graph and vector retrieval fusion
CN121388238A
Medication guidance system and method based on knowledge graph and vector retrieval fusion
CN121388238B
Knowledge graph construction method and system for scientific and technical literature
CN122390036A