Intelligent question answering system based on nursing knowledge graph

Through an intelligent question-and-answer system based on nursing knowledge graph, the problem of inefficient access to traditional nursing knowledge is solved, efficient and accurate nursing knowledge acquisition and training is achieved, and the professional ability and work efficiency of nurses are improved.

CN119917633APending Publication Date: 2025-05-02厦门医学院附属第二医院
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510097748.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Traditional nursing knowledge acquisition methods are inefficient, nursing training and teaching are expensive, and it is difficult to meet the professional knowledge needs of nurses in multiple medical scenarios.

Method used

It adopts an intelligent question-and-answer system based on nursing knowledge graph, including nursing knowledge graph construction module, AI intelligent question-and-answer module and display module. The system collects and structures care data, builds a knowledge graph, and uses AI technology to analyze user questions, generates answers, and provides knowledge-related information.

Benefits of technology

It improves the efficiency and accuracy of obtaining nursing knowledge, reduces the cost of nursing training, enhances nurses' ability to apply professional knowledge in multiple medical scenarios, and improves work efficiency and decision-making accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917633A_ABST
    Figure CN119917633A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent question and answer system based on a nursing knowledge graph. The system comprises a nursing knowledge graph construction module, an AI intelligent question and answer module and a display module. The nursing knowledge graph construction module is used for collecting nursing data, performing document structuring and knowledge extraction on the collected nursing data and constructing a nursing knowledge graph; the AI intelligent question and answer module is used for receiving and analyzing various nursing knowledge questions proposed by a user, then generating query prompts, obtaining confidence coefficients of candidate answers by calling a large language model and combining the nursing knowledge graph, and searching answer options for the questions; and the display module is used for displaying nursing questions, nursing measures and nursing evaluation according to the answers, providing knowledge association information for the answers in a knowledge graph form, and helping a user to understand a question scene and a context.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence, knowledge graph technology and nursing services, and in particular to an intelligent question-answering system based on a nursing knowledge graph. Background Art

[0002] As the informatization process of the medical and health industry accelerates, the nursing field needs to cope with the growing diversity of professional knowledge and practice standards in its development. Traditional nurse training methods are mainly divided into job training and on-campus education. These training methods consume teacher human resources, are not tailored to students' aptitude, and are mainly large-class models. Students learn passively and lack initiative and autonomy, and the cost of talent training is high. However, the traditional manual data search method is time-consuming and laborious, and it is difficult to ensure real-time and comprehensiveness. General search engines have a lot of noise problems in providing highly specialized nursing knowledge answers, making it impossible for searchers to accurately obtain the nursing information they need. Summary of the invention

[0003] The present invention aims to solve the problems of low efficiency of traditional nursing knowledge acquisition methods and high cost of nursing training and teaching, so as to meet the needs of nurses for nursing expertise in multiple medical scenarios.

[0004] The present invention adopts the following technical solutions: an intelligent question-answering system based on nursing knowledge graph, including a nursing knowledge graph construction module, an AI intelligent question-answering module and a display module;

[0005] The nursing knowledge graph construction module collects nursing data and performs document structuring and knowledge extraction on the collected nursing data to construct a nursing knowledge graph;

[0006] The AI ​​intelligent question-answering module is used to receive and analyze various nursing knowledge questions raised by users, and then generate query prompts, obtain the confidence of candidate answers by calling the large language model and combining the nursing knowledge graph, and search for answer options for the questions;

[0007] The display module is used to display nursing questions, nursing measures and nursing evaluations for answers, and provide knowledge association information for answers in the form of knowledge graphs to help users understand question scenarios and contexts;

[0008] The nursing knowledge graph construction module includes a data collection module, a data structuring module, a pattern layer design module, a knowledge extraction module, a knowledge alignment module and a data storage module;

[0009] The data collection module collects data on nursing professional knowledge;

[0010] The data structuring module cleans, classifies and annotates the raw data acquired by the data collection module to organize it into an orderly form that is easy to manage and analyze;

[0011] The pattern layer design module is used to define entities, relationships and attributes in the knowledge graph; the knowledge extraction module uses information extraction technology to extract nursing-related knowledge items from the original data based on the constructed structured corpus and pattern layer specifications, and converts them into structured data that conforms to the knowledge graph pattern;

[0012] The knowledge alignment module is used to achieve the matching between the internal entities of the nursing knowledge graph and the extraction results. By simultaneously learning multiple tasks of entity alignment and attribute alignment, with the help of the entity alignment strategy of multimodal knowledge (for the entity alignment strategy of multimodal knowledge, see the paper Guo Hao, Li Xinyi, Tang Jiuyang, et al. "Research on Multimodal Entity Alignment with Adaptive Feature Fusion" [J]. Acta Automatica Sinica, 2024, 50(04): 758-770. DOI: 10.16383 / j.aas.c210518.), external heterogeneous semantic information is obtained, and the semantic information of the entity in the nursing knowledge graph is enriched by predicting entity attributes, so as to achieve entity alignment of the nursing knowledge graph.

[0013] The data storage module stores the processed nursing knowledge data in a graphic database for subsequent query, analysis and application.

[0014] Preferably, the AI ​​intelligent question-answering module includes a question element extraction module, a prompt language construction module, a large language model question-answering module and a knowledge graph verification module;

[0015] The question element extraction module is used to extract the key elements in the questions raised by the user, and the element extraction includes four steps: question text preprocessing, question target element extraction, question task element extraction and question background element extraction;

[0016] a. Question text preprocessing: Use natural language processing technology to perform preliminary processing on the question text, including stop word removal, word form conversion and word segmentation preprocessing;

[0017] b. Extraction of question goal elements: Identify the implicit goals in the question and classify them into one of the four categories: nursing operation guidance, nursing knowledge questions and answers, disease management consultation, or drug use questions and answers;

[0018] c. Extraction of question and task elements: clarify the specific tasks or operation suggestions that users want to obtain through Q&A, and understand their expected Q&A format and content;

[0019] d. Extraction of background elements of the question: Analyze the environment or situational information mentioned in the question so as to fully consider the actual situation when answering;

[0020] The prompt construction module is used to construct nursing knowledge prompts based on the results of question element extraction to guide the subsequent question-answering process. The prompt construction includes two steps: constructing a prompt template and constructing a prompt statement.

[0021] a. Construct a prompt template: Combine the fine-grained search capability of the nursing knowledge graph with question elements to design a prompt template that includes elements such as role, background, goal, task, and language type;

[0022] b. Construct prompt sentences: dynamically fill in prompt templates and generate specific prompts based on the actual question content and context;

[0023] The large language model question-answering module generates candidate answers based on the prompts provided by the prompt construction module using the large language model.

[0024] The knowledge graph verification module is used to verify the candidate answers generated by the large language model by extracting and analyzing the entities involved in the candidate answers, evaluating the confidence of the candidate answers, reordering the candidate answers according to the confidence and returning the relevant entity nodes, so as to ensure that the entire feedback information not only conforms to the standard framework of the knowledge graph, but also effectively meets the query needs of the user; the knowledge graph verification includes three steps: knowledge graph matching, knowledge graph query, and confidence evaluation;

[0025] a. Knowledge graph matching: The entities and relationships of the nursing knowledge graph are used as keywords, and the keyword precise matching algorithm is used to extract the answer entities and answer relationships in the candidate answers, thereby obtaining matching graph structure data;

[0026] b. Knowledge graph query: Use answer entities and answer relationships as query keywords to query the nursing knowledge graph and output the answer query graph;

[0027] c. Confidence evaluation: Based on the entity extraction results and the knowledge graph matching, a confidence evaluation model is constructed to assign a credibility score to each candidate answer. The candidate answers are ranked accordingly and the candidate answer with the highest confidence and its corresponding answer query graph are returned.

[0028] Preferably, the nursing knowledge graph is stored using a Neo4j graph database.

[0029] Preferably, the display module includes an answer query graph visualization module, an answer query graph attribute query module, and an entity relationship reasoning module;

[0030] The answer query graph visualization module displays the entities and relationships in the answer query graph through a network graph;

[0031] The answer query graph attribute query module further displays the nursing knowledge graph according to the entities and relationships in the answer query graph clicked by the user, displays the attribute lists of entities and relationships in the form of cards, and displays the attribute information in the form of links and buttons;

[0032] The entity relationship reasoning module further retrieves the nursing knowledge graph based on the entities and relationships in the query graph according to the user's clicked answers, and displays the associated multi-hop entities and relationships.

[0033] Preferably, the data storage module includes a database storage module, an update module and an evaluation module;

[0034] The database storage module stores the processed nursing data in a Neo4j graph database;

[0035] The update module extracts entities and relationships, aligns knowledge, and adds new knowledge triples to the nursing knowledge graph according to the entity and relationship patterns of the nursing knowledge graph, thereby achieving regular update and maintenance of data;

[0036] The evaluation module comprehensively evaluates the nursing knowledge graph based on the knowledge graph evaluation system, wherein the evaluation system includes the number of nodes, the number of node classes, the number of relationships, the number of relationship classes, the average point strength, graph density, graph clustering coefficient, graph transitivity, query time index, empty node related index, unique node ratio, empty attribute ratio and longest path to ensure the quality and efficiency of the knowledge graph.

[0037] Preferably, the nursing data includes entity relationship triples and entity attribute triples.

[0038] Preferably, the method for simultaneously learning multiple tasks of entity alignment and attribute alignment comprises the following steps:

[0039] (1) Establish a loss function for multi-task learning, where the loss function for multi-task learning is:

[0040]

[0041] Among them, α, β and γ are weight parameters, A∈A entity , B∈B entity , A entity The entity set in the name of the internal entity of the nursing knowledge graph, B entity A collection of entities in a name representing an external entity; C property The set of string attributes in the names of the internal attributes of the nursing knowledge graph, D propertu A collection of string attributes representing the names of external attributes; E propertyrepresents the set of numerical attributes within the nursing knowledge graph, F property Represents a set of external numerical attributes, S(E property ,F property ) is its output, indicating the similarity between internal and external numerical attributes;

[0042] (2) Setting entity alignment threshold θ entity and attribute alignment threshold θ property Then, according to the Levenshtein distance of the entity name, select entity pairs with similarity higher than the threshold for alignment to obtain the aligned entity set E aligned According to the Levenshtein distance and relative difference of the attributes, the attribute pairs with similarity higher than the threshold are selected for alignment to obtain the aligned attribute set P aligned ;

[0043] (3) Integrate the aligned entities and aligned attributes to form an aligned knowledge triple set. For each pair of aligned entities (A, B), for each aligned attribute prop, calculate the fused attribute value val and generate a new triple (E new ,prop,val), and finally form a new triple set G aligned .

[0044] Preferably, the step (3) is specifically described as follows:

[0045]

[0046] Among them, G aligned represents the aligned knowledge triple set, E new is a new entity generated by aligning entities A and B, and merge(A.prop, B.prop) represents a function for fusing attribute values.

[0047] Preferably, in step (1), α is set to 0.7, β is set to 0.15, and γ is set to 0.15.

[0048] The present invention has the following beneficial effects: The present invention provides an intelligent question-answering system based on a nursing knowledge graph, which integrates human-computer question-answering interaction technology, natural language recognition and understanding technology, and core node knowledge graph visualization technology. It not only has efficient two-way human-computer dialogue capabilities, but also can deeply interpret and process complex natural language query tasks in the form of knowledge representation and reasoning, especially the semantic understanding and analysis of complex problems, and at the same time provide a visual knowledge graph display of the core nodes of the answer to meet the needs of nurses to acquire professional knowledge in their daily work and improve the work efficiency and decision-making accuracy of nurses. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 It is a system framework diagram of the present invention;

[0051] Figure 2 Design structure diagram for the atlas mode layer of the present invention;

[0052] Figure 3 This is an example diagram of the nursing knowledge graph of the present invention;

[0053] Figure 4 This is an example diagram of the answer query interface of the present invention;

[0054] Figure 5 An example diagram of attribute query in the answer query of the present invention;

[0055] Figure 6 This is an example diagram of entity relationship reasoning in the answer query of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments 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 making creative work belong to the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0057] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0058] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0059] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0060] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.

[0061] Example

[0062] The following are only preferred implementations of the present invention. The protection scope of the present invention is not limited to the following embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention.

[0063] Reference Manual Attached Figure 1-6,The present invention provides an intelligent question and answer system based on nursing knowledge graph, including a nursing knowledge graph construction module, an AI intelligent question and answer module, and a display module;

[0064] The nursing knowledge graph construction module systematically brings together the nursing expertise provided by the hospital and the diversified information resources such as nursing literature, group standards, guidelines, case studies, etc. that are publicly available on the Internet. The collected nursing data is document-structured and knowledge extracted to construct a nursing knowledge graph;

[0065] The AI ​​intelligent question-answering module is used to receive and parse various nursing knowledge questions raised by users, and then generate query prompts, and search for possible answer options for the question by calling the large language model (large language model reference paper Ouyang L, Wu J, Jiang X, et al. Training language models to follow instructions with human feedback [J]. Advances in neural information processing systems, 2022, 35: 27730-27744.). In this process, the module combines the nursing knowledge graph to obtain the confidence of the candidate answers and gives the most authoritative and applicable answer (confidence indicates the degree of confidence in the statistical inference results. When performing statistical inference, an estimated value of a parameter is usually calculated, such as a mean, proportion, or difference, and a confidence interval is given. This interval represents the probability that the true value of the parameter falls within a certain range. For specific calculation methods, please refer to the confidence assessment model Confidence (R i ));

[0066] The display module is used to display nursing questions, nursing measures and nursing evaluations for answers, and provide knowledge association information for answers in the form of a visual knowledge graph to help users understand the question scenario and the context.

[0067] The nursing knowledge graph construction module includes a data collection module, a data structuring module, a pattern layer design module, a knowledge extraction module, a knowledge alignment module, and a data storage module;

[0068] The data collection module is used to collect data on nursing professional knowledge, where the corpus is divided into six categories, namely, international standard nursing terminology system, group standards and expert consensus, textbooks, laws and regulations, institutional norms and work guidelines; further, it is defined as C = {C1, C2, C3, C4, C5, C6}. In order to collect these source data and form the nursing knowledge corpus dataset D, we adopted a series of strategies and methods. First, through web crawler technology, we automatically crawled a large amount of data from professional nursing websites. Secondly, using OCR technology, we extracted the text content from professional books. In addition, we also systematically collected nursing professional literature through academic database retrieval. Finally, through direct cooperation with medical institutions, we obtained some nursing data. The nursing knowledge corpus dataset is obtained through the organic combination of these methods.

[0069] The data structuring module is used to clean, classify and annotate the raw data obtained from the data collection module so as to organize it into an orderly form that is easy to manage and analyze. First, the module cleans and preprocesses the data, including deduplication, missing value processing and timeliness verification to ensure the quality and consistency of the data. Then, the data is classified through text classification and entity recognition technology, and key entities such as diseases, symptoms, drugs, etc. are identified to classify the data into different knowledge categories. Finally, a complete nursing knowledge corpus is constructed, which provides rich data resources for the subsequent knowledge graph construction;

[0070] The following is some pseudo code for cleaning and preprocessing the data.

[0071]

[0072] The model layer design module is used to define the entities, relationships and attributes in the knowledge graph, and provide specifications and guidance for the structure of the entire knowledge graph. The model layer designs conceptual entities such as diseases / symptoms, nursing assessment items, drugs and nursing assessment forms, relationships such as treatment plans, diagnostic points, nursing problems, nursing goals, nursing measures and nursing evaluations, and attributes such as coding, concepts, classifications, and etiologies. This model layer can clearly reflect the organizational structure and semantic relationships of nursing knowledge, which is convenient for subsequent knowledge extraction, alignment and application;

[0073] The knowledge extraction module is based on the constructed structured corpus and pattern layer specifications. This module uses information extraction technology (for information extraction technology, see the paper Yang, Yang, et al. "A survey of information extraction based on deep learning." Applied Sciences 12.19(2022):9691.) to accurately extract nursing-related knowledge items from massive texts and convert them into structured data that conforms to the knowledge graph model;

[0074] Furthermore,

[0075] G extracted =UIE(G schema ⊕D structured )

[0076] Among them, the UIE information extraction model is used to utilize G schema Mode layer and D structured Structured data is used as input to extract knowledge and obtain the knowledge triple set G extracted ; G schema ⊕D structured The result is a UIE input matrix, which is encoded into a machine-readable form. ⊕ This symbol represents the concatenation of two matrices, forming a new matrix that contains comprehensive information from pattern information and structured data. The concatenated input matrix is ​​passed as input to the UIE model.

[0077] Specifically, the knowledge extraction module uses the UIE information extraction tool. Through the UIE extraction tool, an extraction template for specific entities and relationships is designed and executed. structured Extract specific instance information. For example, for disease information, design templates to extract information such as causes, treatment plans, and high-risk factors; for drug information, design templates to extract product names, adverse reactions, indications, and other information;

[0078] The knowledge alignment module is used to achieve accurate matching between entities within the nursing knowledge graph and the extraction results. It uses the method of simultaneous learning of multiple tasks such as entity alignment and attribute alignment, and the entity alignment strategy of multimodal knowledge to obtain external heterogeneous semantic information. It also uses entity attribute prediction to enrich the semantic information of entities within the nursing knowledge graph, thereby achieving entity alignment of the nursing knowledge graph.

[0079] Furthermore, entity alignment uses the Levenshtein distance in the Fuzzy Matching of the string similarity algorithm to compare whether the names of two entities are similar. The entity similarity formula is as follows:

[0080]

[0081] Among them, A∈A entity , B∈B entity , A entity The entity set in the name of the internal entity of the nursing knowledge graph, B entity Represents the set of entities in the name of the external entity. |A| and |B| are the lengths of entities A and B respectively, d(A,B) is the Levenshtein distance between entities A and B; L(A,B) is its output, indicating the similarity between the internal entity and the external entity (d(A,B) is the Levenshtein distance between strings A and B, i.e. the minimum number of single-character editing operations required to convert one string to another. L(A,B) is the similarity between the two entities, between 0-1).

[0082] Attribute alignment is divided into string attribute alignment and value attribute alignment. For string type attributes, the Levenshtein distance in the string similarity algorithm Fuzzy Matching is used to compare whether the names of two string attributes are similar. The string attribute similarity formula is as follows:

[0083]

[0084] Among them, C∈C property , D∈D property , C property The set of string attributes in the names of the internal attributes of the nursing knowledge graph, D property Represents the set of string attributes in the name of the external attribute. |C| and |D| are the lengths of the string attributes C and D respectively, and d(C,D) is the Levenshtein distance between the string attributes C and D. L(C,D) is its output, which represents the similarity between the internal and external string attributes.

[0085] For numerical attribute alignment, a numerical comparison method is used for measurement. The present invention uses relative difference to calculate attribute similarity. The relative difference formula is as follows:

[0086]

[0087] Among them, E property represents the set of numerical attributes within the nursing knowledge graph, F property Represents a set of external numerical attributes, S(E property ,F property ) is its output, indicating the similarity between internal and external numerical attributes.

[0088] For the multi-task learning model, entity alignment and attribute alignment are jointly learned. The following is a loss function representation of multi-task learning:

[0089]

[0090] Among them, α, β, and γ are weight parameters. In the weight setting of the loss function of multi-task learning, we manually set the weights based on the experience of previous tasks and expert knowledge. Since the entity alignment task is relatively more important, entity alignment determines the quality of subsequent attribute alignment. If the entity alignment is wrong, the result of attribute alignment will also be affected. Therefore, α is set to 0.7, β is set to 0.15, and γ is set to 0.15 to calculate the loss function of multi-task learning.

[0091] Set entity alignment threshold θ entity and attribute alignment threshold θ property Then, according to the Levenshtein distance of the entity name, select entity pairs with similarity higher than the threshold for alignment to obtain the aligned entity set E aligned According to the Levenshtein distance and relative difference of the attributes, the attribute pairs with similarity higher than the threshold are selected for alignment to obtain the aligned attribute set P aligned Finally, the aligned entities and aligned attributes are integrated to form an aligned knowledge triple set. For each pair of aligned entities (A, B), for each aligned attribute prop, the fused attribute value val is calculated and a new triple (E new ,prop,val), and finally form a new triple set G aligned , the process is as follows:

[0092]

[0093] Among them, G aligned represents the aligned knowledge triple set, E new It is a new entity generated by aligning entities A and B. merge(A.prop, B.prop) represents a function that merges attribute values.

[0094] The data storage module is used to store the processed nursing knowledge data in a graphic database for subsequent query, analysis and application.

[0095] Furthermore,

[0096] KG nurse =Store(G aligned )

[0097] The Store function is responsible for aligning the knowledge triple set G aligned Store in a graph database to build a nursing knowledge graph KGnurse .

[0098] Specifically, Neo4j is a graph database management system that stores data in a graphical manner and provides powerful graph query and analysis capabilities. It is suitable for storing complex entity and relationship structures. Py2neo is the Python driver for Neo4j, which provides an interface for interacting with the Neo4j database, facilitating the operation and management of the graph database. Use the Py2neo library to establish a connection with the Neo4j database, and use Python code to build and manage the knowledge graph. By creating nodes and relationships, the knowledge triple set G is aligned. aligned Stored in a Neo4j database.

[0099] Furthermore, the AI ​​intelligent question-answering module includes a question element extraction module, a prompt construction module, a large language model question-answering module, and a knowledge graph verification module;

[0100] Question element extraction module, which is responsible for detailed analysis of user questions and extraction of key elements. The element extraction includes four steps: question text preprocessing, question target element extraction, question task element extraction, and question background element extraction;

[0101] Question text preprocessing: Use natural language processing technology to perform preliminary processing on the question text, including stop word removal, word form conversion, and word segmentation;

[0102] The pseudo code for this step is as follows:

[0103]

[0104]

[0105] b. Extraction of question goal elements: Identify the goals implied in the question and classify them into nursing operation evaluation, nursing knowledge questions and answers, nursing information consultation or other related categories;

[0106]

[0107]

[0108] C. Extraction of question and task elements: clarify the specific tasks or operation suggestions that users want to obtain through Q&A, and understand their expected Q&A format and content;

[0109] The pseudo code for this step is as follows:

[0110]

[0111] d. Extraction of background elements of the question: Analyze the environment or situational information mentioned in the question so as to fully consider the actual situation when answering;

[0112]

[0113] The prompt construction module constructs highly targeted and accurate nursing knowledge prompts based on the results of question element extraction to guide the subsequent question-answering process. The prompt construction includes two steps: constructing a prompt template and constructing a prompt sentence;

[0114] Constructing prompt templates: Combining the fine-grained search capability of the nursing knowledge graph with question elements, designing prompt templates that include role Ro, background B, goal T, task A, and language type L;

[0115] The following is a sample prompt template:

[0116] prompt_template=″″″

[0117] Role Ro: You are a nursing question-answering robot.

[0118] Background B: {background elements of the problem element extraction module}

[0119] Target T: {target element of the question element extraction module}

[0120] Task A: {Task elements of the question element extraction module}

[0121] Language type L: Chinese

[0122] You need to answer user questions based on the elements they ask.

[0123] User asked:

[0124] __QUERY__

[0125] ″″″

[0126] Among them, __QUERY__ represents the original question text of the user.

[0127] Construct prompt sentences: dynamically fill in prompt templates and generate specific prompts based on the actual question content and context;

[0128] The following is a sample prompt that is dynamically populated:

[0129] prompt_template=″″″

[0130] Role Ro: You are a nursing question-answering robot.

[0131] Background B: {Time: Today, Location: Emergency Room}

[0132] Target T: {Nursing operation evaluation, nursing information consultation}

[0133] Task A: {Operational suggestions, information consultation}

[0134] Language type L: Chinese

[0135] You need to answer user questions based on the elements they ask.

[0136] User asked:

[0137] “How do you provide a nursing assessment for a patient with heart disease on the ward today while answering inquiries about MI symptoms and emergency medication use?”

[0138] ″″″

[0139] The large language model question-answering module uses an advanced large language model to generate highly accurate candidate answers based on the prompts provided by the prompt building module, providing users with professional question-answering services.

[0140] The knowledge graph verification module is used to verify the candidate answers generated from the large language model to improve the accuracy and credibility of the answers. This module extracts and analyzes the entities involved in the candidate answers, evaluates the confidence of the candidate answers, reorders the candidate answers according to the confidence, and returns the relevant entity nodes to ensure that the entire feedback information not only conforms to the standard framework of the knowledge graph, but also effectively meets the user's query needs. The knowledge graph verification includes three steps: knowledge graph matching, knowledge graph query, and confidence evaluation;

[0141] a. Knowledge graph matching: The entities and relations of the nursing knowledge graph are used as keywords, and the keyword precise matching algorithm is used to extract the answer entities and answer relations in the candidate answers (for the keyword precise matching algorithm, see the paper Ding Na, Liu Peng, Shao Huipeng, et al. "Bidirectional Attention Text Keyword Matching Legal Article Recommendation" [J]. Journal of Peking University (Natural Science Edition), 2024, 60(01): 79-88. DOI: 10.13209 / j.0479-8023.2023.077), so as to obtain the matching graph structure data G match ;

[0142] f(candidate answer, dictionary) → (matched entity set, matched relationship set)

[0143] The candidate answer is the result of the large language model output. The dictionary is a collection of entities and relations in the nursing knowledge graph. The matched entity set is the entities extracted from the candidate answer. The matched relationship set is the relations extracted from the candidate answer.

[0144] Keyword matching algorithm (based on Jaccard similarity):

[0145]

[0146] Among them, A and B are two keyword sets.

[0147] ∣A kw ∩B kw ∣ is the size of their intersection, ∣A kw ∪B kw ∣ is the size of their union.

[0148] b. Knowledge graph query: answer entity E match Relationship with answer R match To query keywords, the nursing knowledge graph is dynamically filled with answer entities E match Relationship with answer R match Perform cypher statement query and output the answer query graph G search ;

[0149] MATCH(e:Entity1)-[r:RELATION_TYPE]->(intermediate)-[r2]->(target)

[0150] RETURN e,r,intermediate,r2,target

[0151] This query finds the intermediate nodes intermediate that are reachable from entity e through the relationship RELATION_TYPE and further connections from these intermediate nodes to other target nodes target.

[0152] c. Confidence evaluation: Based on the entity extraction results and the knowledge graph matching, a confidence evaluation model Confidence (R i ), assign a credibility score to each candidate answer, sort the candidate answers accordingly, and return the candidate answer R with the highest confidence opt and its corresponding answer query graph G search-opt .

[0153]

[0154] Among them, Confidence i : The confidence score of the i-th candidate answer, α and β: weight coefficients used to balance the influence of different scoring parts. Num ER TotalNum: The number of entities and relations in the knowledge graph that match the candidate answer.ER : The total number of entities and relationships in the knowledge graph The sum of the matching scores of all entities in the i-th candidate answer. The number of entities extracted from the i-th candidate answer. Sort the candidate answers in descending order and return the first candidate answer R with the highest confidence. opt And return its corresponding answer query graph G search-opt ;

[0155] Among them, the nursing knowledge graph is stored using the Neo4j graph database.

[0156] Furthermore, the presentation module includes an answer query graph visualization module, an answer query graph attribute query module, and an entity relationship reasoning module;

[0157] The answer query graph visualization module converts the answer query graph G search-opt Entities and relationships in the network are visualized;

[0158] Answer query graph attribute query module, query graph G according to the answer clicked by the user search-opt The entities and relationships in the nursing knowledge graph are further displayed, and the attribute lists of entities and relationships are displayed in the form of cards, such as coding, definition, category, field, etc., and the attribute information is visualized in the form of links and buttons;

[0159] Entity relationship reasoning module, query graph G based on the answer clicked by the user search-opt The entities and relations in the nursing knowledge graph are further retrieved to display the associated multi-hop entities and relations.

[0160] Further, the data storage module includes a storage module, an update module, and an evaluation module;

[0161] The storage module stores the processed nursing professional data (entity relationship triples and entity attribute triples) in the Neo4j graph database to build the nursing knowledge graph KG nurse .

[0162] Update module, extract entities and relationships, align knowledge, and add new knowledge triples KG according to the entity and relationship patterns of the nursing knowledge graph update To the nursing knowledge graph to achieve regular update and maintenance of data;

[0163] KG nurse →Updated(KG nurse , KG update )

[0164] The evaluation module conducts a comprehensive evaluation of the nursing knowledge graph based on the knowledge graph evaluation system, where the evaluation system includes multi-dimensional indicators such as the number of nodes, the number of node classes, the number of relationships, the number of relationship classes, the average point strength, graph density, graph clustering coefficient, graph transitivity, query time indicators (minimum, maximum, average), empty node related indicators (quantity, proportion), unique node proportion, empty attribute proportion, longest path, etc., to ensure the quality and effectiveness of the knowledge graph.

[0165] Eva=Evaluate(KG nurse )

[0166] =Node_num(KG nurse )+Node_type_num(KG nurse )+Relation_num(KG nurse )

[0167] +Relation_type_num(KG nurse )+Average_point_strength(KG nurse )

[0168] +Graph_density(KG nurse )+Node_Degree_Centrality(v)

[0169] +Node_Closeness_Centrality(v)

[0170] +Graph_Transitivity(KG nurse )

[0171] Among them, Eva is the evaluation indicator result set of the nursing knowledge graph.

[0172] The specific expressions of each indicator are as follows:

[0173] Node_num(KG nurse )=|V|

[0174] Node_num counts the number of nodes in the graph, where |V| represents the total number of nodes in the graph.

[0175] Node_type_num(KG nurse )=|{N type}|

[0176] Node_type_num calculates the number of node types in the graph, where N type Represents different types of nodes in the graph.

[0177] Relation_num(KG nurse )=|E|

[0178] Relation_num calculates the number of edges (relations) in the graph, where |E| represents the total number of edges (relations) in the graph.

[0179] Relation_type_num(KG nurse )=|{R type}|

[0180] Relation_type_num calculates the number of edge (relation) types in the computation graph, whose R type Represents different types of relationships in a graph.

[0181]

[0182] Average_point_strength calculates the average point strength of the graph. Point strength is the degree of a node, that is, the number of edges connected to the node.

[0183]

[0184] Graph_density calculates the graph density, which is the ratio of the actual number of edges in the graph to the possible number of edges (the number of edges in the complete graph).

[0185]

[0186] Node_Degree_Centrality calculates the node degree centrality coefficient. Degree centrality is the ratio of the degree of a node to the maximum possible value of the number of nodes in the graph minus one. Drgree(v) represents the degree of the node.

[0187]

[0188] Node_Closeness_Centrality calculates the node distance centrality coefficient, where d(u,v) represents the shortest path length between nodes u and v.

[0189]

[0190] Graph_Transitivity computes the transitivity of a graph, which is the ratio of the number of closed triples to the number of possible triples.

[0191] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. An intelligent question and answer system based on nursing knowledge graph, characterized in that Including nursing knowledge graph construction module, AI intelligent question and answer module and display module; The nursing knowledge graph construction module is used to collect nursing data and to structure and extract the collected nursing data to build a nursing knowledge graph; The AI ​​intelligent question-answering module is used to receive and analyze various nursing knowledge questions raised by users, and then generate query prompts, obtain the confidence of candidate answers by calling the large language model and combining the nursing knowledge graph constructed by the nursing knowledge graph construction module, and search for answer options for the questions; The display module is used to display nursing questions, nursing measures and nursing evaluations for answers, and provide knowledge association information for answers in the form of nursing knowledge graphs to help users understand question scenarios and contexts; The nursing knowledge graph construction module includes a data collection module, a data structure module, a pattern layer design module, a knowledge extraction module, a knowledge alignment module, and a data storage module; The data collection module performs data collection for nursing expertise data; The data structured module cleans, classifies and labels the original data obtained by the data collection module to organize it into an orderly form that is convenient for management and analysis; The pattern layer design module is used to define entities, relationships, and attributes in the nursing knowledge graph; The knowledge extraction module uses information extraction technology based on the already constructed structured corpus and pattern layer specifications to extract nursing-related knowledge items from the original data and convert them into structured data that conforms to the knowledge graph model; The knowledge alignment module is used to achieve the matching between the internal entities of the nursing knowledge graph and the extraction results. By learning multiple tasks of entity alignment and attribute alignment at the same time, the entity alignment strategy of multimodal knowledge is used to obtain external heterogeneous semantic information, and the semantic information of the entity in the nursing knowledge graph is enriched by predicting entity attributes, so as to achieve entity alignment of the nursing knowledge graph. The data storage module stores the processed nursing knowledge data into a graph database for subsequent query, analysis and application.

2. The intelligent question and answer system based on nursing knowledge graph according to claim 1, characterized in that, The AI ​​intelligent question and answer module includes a question element extraction module, a prompt construction module, a large language model question and answer module and a knowledge graph verification module; The question element extraction module is used to extract the key elements in the questions raised by the user, including four steps: question text preprocessing, question target element extraction, question task element extraction and question background element extraction; a. Pre-processing of problem text: use natural language processing technology to initially process the problem text. Including stop word removal, word form conversion and word participle preprocessing; b. Extraction of problem target elements: Identify the goals implicitly in the question and classify them as one of four categories: nursing operation guidance, nursing knowledge Q&A, disease management consultation or drug use Q&A; c. Extraction of question task elements: clarify the specific tasks or operation suggestions that users want to obtain through question and answers, and understand their expected question and answer form and content; d. Extraction of background elements of the problem: analyze the environmental or situational information mentioned in the question so that the actual situation can be fully considered when answering; The prompt construction module is used to construct nursing knowledge prompts based on the results of question element extraction to guide the subsequent question-answering process. The prompt construction includes two steps: constructing a prompt template and constructing a prompt sentence. a. Build a prompt template: combine the fine-grained search ability and problem elements of the nursing knowledge graph. Design a prompt template that contains elements of role, background, goals, tasks, and language type; b. Construction prompt statement: dynamically fill the prompt template based on the actual problem content and context. Generate specific prompts; The large language model question and answer module uses the large language model to build the prompts provided by the said prompts to generate candidate answers; The knowledge graph verification module is used to verify the candidate answers generated by the large language model by extracting and analyzing the entities involved in the candidate answers, evaluating the confidence of the candidate answers, reordering the candidate answers according to the confidence and returning the relevant entity nodes, so as to ensure that the entire feedback information not only conforms to the standard framework of the knowledge graph, but also effectively meets the query needs of the user; the knowledge graph verification includes three steps: knowledge graph matching, knowledge graph query, and confidence evaluation; a. Knowledge graph matching: The entities and relationships of the nursing knowledge graph are used as keywords, and the keyword precise matching algorithm is used to extract the answer entities and answer relationships in the candidate answers, thereby obtaining matching graph structure data; b. Knowledge graph query: use the answer entity and the answer relationship as the query keywords, query the nursing knowledge graph and output the answer query graph; c. Confidence evaluation: Based on the entity extraction results and the knowledge graph matching, a confidence evaluation model is constructed to assign a credibility score to each candidate answer, and the candidate answers are sorted accordingly. The candidate answer with the highest confidence and its corresponding answer query graph are returned.

3. The intelligent question and answer system based on nursing knowledge graph according to claim 1, characterized in that, The nursing knowledge graph is stored using the Neo4j graph database.

4. The intelligent question and answer system based on nursing knowledge graph according to claim 1, characterized in that The display module includes an answer query graph visualization module, an answer query graph attribute query module, and an entity relationship reasoning module; The answer query diagram visualization module displays the entities and relationships in the answer query diagram through a network diagram; The answer query graph attribute query module further displays the nursing knowledge graph according to the entities and relationships in the answer query graph clicked by the user, displays the attribute lists of entities and relationships in the form of cards, and displays the attribute information in the form of links and buttons; The entity relationship inference module further searches the nursing knowledge graph based on the user clicking the answer to query the entities and relationships in the graph, and displays the associated multi-hop entities and relationships.

5. The intelligent question and answer system based on nursing knowledge graph according to claim 3, characterized in that, The data storage module includes database storage module, update module and evaluation module; The database storage module stores the nursing data after the knowledge module is aligned to the Neo4j graph database; The update module performs entity and relationship extraction, knowledge alignment, and adds new knowledge triple KG according to the entity and relationship pattern of the nursing knowledge graph. update Go to the nursing knowledge graph to realize regular updates and maintenance of data; The evaluation module comprehensively evaluates the nursing knowledge graph based on the knowledge graph evaluation system, wherein the evaluation system includes the number of nodes, the number of node classes, the number of relationships, the number of relationship classes, the average point strength, graph density, graph clustering coefficient, graph transitivity, query time index, empty node related index, unique node ratio, empty attribute ratio and longest path to ensure the quality and efficiency of the knowledge graph.

6. The intelligent question and answer system based on nursing knowledge graph according to claim 5, characterized in that, The care data includes an entity relationship triplet and an entity attribute triplet.

7. The intelligent question and answer system based on nursing knowledge graph according to claim 1, characterized in that, The method of learning multiple tasks at the same time by the entity alignment and attribute alignment includes the following steps: (1) Establish a loss function for multi-task learning, and the loss function for multi-task learning is: Among them, α, β and γ are weight parameters, A entity The set of entities representing the names of entities inside the nursing knowledge graph, B entity A collection of entities in a name representing an external entity; C property A collection of string attributes in the name of the nursing knowledge graph, D property A collection of string attributes in the name of an external attribute; E property Represents the set of numerical attributes inside the nursing knowledge graph, F property Represents a set of external numerical attributes, S(E property ,F property ) is its output, indicating the similarity between internal and external numerical properties; (2) Setting entity alignment threshold θ entity and attribute alignment threshold θ property Then select entities with similarity higher than the threshold according to the Levenshtein distance of the entity name to align them to obtain the aligned entity set E aligned Align the properties with similarity higher than the threshold according to the Levenshtein distance and relative difference of the attributes to obtain the aligned attribute set P aligned ; (3) Integrate the aligned entities and aligned attributes to form an aligned knowledge triple set. For each pair of aligned entities (A, B), for each aligned attribute prop, calculate the fused attribute value val and generate a new triple (E new ,prop,val), and finally form a new triple set G aligned .

8. The intelligent question and answer system based on nursing knowledge graph according to claim 7, characterized in that, The step (3) is specifically expressed as: Among them, G aligned represents the aligned knowledge triple set, E new is a new entity generated by aligned entities A and B, the merge (A.prop, B.prop) represents a function that combines the value of the attribute.

9. The intelligent question and answer system based on nursing knowledge graph according to claim 7, characterized in that, In the step (1), α is set to 0.7, β is set to 0.15, and γ is set to 0.15.

Citation Information

Cited By

  • Expressway maintenance knowledge question-answering method and system based on multi-modal information

    CN120596643A

  • Peritoneal dialysis question and answer method and system based on mapping knowledge domain

    CN120875015A

  • Pregnancy and delivery information question and answer method and system based on intelligent agent

    CN120910226A

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

    CN121705391A