A medical knowledge question-answering method based on medical text

By establishing named entity models and intention recognition models in the medical question-and-answer system and building a medical knowledge graph, the problems of inaccurate entity recognition, unclear intention understanding and inefficient query in the existing system are solved, and more efficient and accurate medical information query is achieved.

CN119760099AInactive Publication Date: 2025-04-04SHENZHEN YUEZHIKANG TECH CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411969551.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing medical Q&A system has problems in inaccurate entity identification, unclear intention understanding, and inefficient query efficiency, which is difficult to effectively meet users' query needs for medical information.

Method used

Using medical knowledge questions and answers based on medical text, we use medical knowledge questions and answers to obtain medical-related data from multiple medical consultation websites, establish named entity models and intention recognition models, and build medical knowledge graphs, entity recognition and intention understanding to retrieve answers in the knowledge graph through Cypher query statements.

Benefits of technology

It improves the accuracy and reliability of the medical Q&A system, can more accurately identify medical entities and understand user intentions, improves query efficiency, and adapts to the changing needs of the medical field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760099A_ABST
    Figure CN119760099A_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of medical knowledge question and answer, and proposes a medical knowledge question and answer method based on medical text. The method acquires medical-related data including online public data sets and online medical discussion posts, and establishes a named entity model and an intent recognition model through the acquired data. The former includes a word embedding layer, a feature extraction layer and an entity annotation layer, and the latter includes a word embedding layer, a feature extraction layer, an attention mechanism layer and an output layer. The method also constructs a medical knowledge graph, including data preprocessing, named entity processing of medical text data, entity alignment, and the use of a Neo4j graph database to store medical knowledge. After entity recognition and entity chain preprocessing, the user's question is converted into a Cypher query statement to retrieve the answer in the medical knowledge graph. The present invention combines named entity recognition, intent recognition and knowledge graph technology, aiming to improve the accuracy and efficiency of medical knowledge questions and answers, and provide users with more reliable medical information answers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical knowledge question and answer, and in particular to a medical knowledge question and answer method based on medical text. Background Art

[0002] With the continuous advancement of medical technology and the widespread popularity of the Internet, the amount of information in the medical field has exploded. However, faced with massive amounts of medical data, how to efficiently obtain, integrate and utilize this information has become an urgent problem to be solved. Especially in the field of medical Q&A, users often hope to obtain professional answers to their health conditions or disease problems in a concise and clear manner.

[0003] Traditional medical question-answering systems mostly rely on manually constructed knowledge bases or question-answer pairs. Although this approach can meet user needs to a certain extent, it has problems such as untimely knowledge updates and limited coverage. In addition, with the rapid development of natural language processing (NLP) technology, text-based medical question-answering methods have gradually emerged. However, when dealing with complex medical problems, these methods often face challenges such as inaccurate entity recognition and unclear intent understanding.

[0004] In order to overcome the above shortcomings, a more efficient and accurate medical knowledge question-answering method based on medical text is urgently needed to better meet users' query needs for medical information. Summary of the invention

[0005] In view of the shortcomings of the prior art described above, an object of the present invention is to provide a medical knowledge question-answering method based on medical text, which is used to solve the problems of inaccurate entity recognition, unclear intent understanding, and low query efficiency in the prior art.

[0006] To achieve the above-mentioned and other related purposes, the present invention provides a medical knowledge question-answering method based on medical text, comprising the following steps: S1. Obtain medical-related data from multiple medical consultation websites, wherein the medical-related data includes online public data sets and online medical discussion posts; the online public data sets include semi-structured data obtained from professional medical information website web crawler analysis, open source structured knowledge graph data sets, open source medical data sets, and unstructured data of medical literature; the online medical discussion posts include medical questions actually asked by users and answers given by professional doctors; the online medical discussion posts are collected, cleaned, and stored in ElasticSearch for use as retrieval data sets; S2. Establishing a named entity model based on the obtained network public data set, and establishing an intent recognition model based on the retrieval data set, wherein the named entity model includes a word embedding layer, a feature extraction layer, and an entity annotation layer, and the intent recognition model includes a word embedding layer, a feature extraction layer, an attention mechanism layer, and an output layer; S3. Construct a medical knowledge graph based on the entities processed by the named entity model; specifically: S31. Preprocess the collected medical data, including data cleaning, deduplication, and formatting; S32. Use the established named entity model to process the collected medical text data, identify and annotate the medical entities therein, and after extracting the entities, perform entity alignment to ensure that the same entity in different data sources has only one node in the knowledge graph; S33. Select Neo4j graph database as a tool for storing medical knowledge, use Py2neo module to connect to Neo4j database, read the sorted data files, instantiate the data into corresponding medical nodes and relationships, and create entity nodes and relationships between nodes in the graph database through Cypher statements; S4. Perform entity recognition and entity chaining preprocessing on the user question, convert the results of entity recognition and entity chaining into Cypher query statements, and retrieve the answer in the knowledge graph.

[0007] Optionally, in step S2, the word embedding layers of the named entity model and the intent recognition model both adopt the RoBERTa-wwm model to calculate the initial word embedding vector, and the calculation formula is as follows: in, is the initial word embedding vector, is the word embedding matrix, is the position embedding matrix, For the The hidden state of the layer, represents the Transformer encoder, is the maximum number of layers of Transformer, and the initial input is .

[0008] Optionally, in step S2, the feature extraction layers of the named entity model and the intent recognition model both use a BiLSTM network to perform bidirectional encoding on the semantic feature vector output by the word embedding layer, generate a feature vector sequence containing context information, combine the forward and reverse sequences, and calculate the feature vector containing context information. The calculation formula is as follows: in, and They are the sequence of the model's forward LSTM network output and the reverse LSTM network at time step The output, Indicates that both are in time step The concatenated feature vector containing context information is generated.

[0009] Optionally, in step S2, the entity annotation layer of the named entity model adopts the GlobalPointer model, designs the global pointer of layer a, processes one type of entity separately in each layer, calculates the scoring function, selects the optimal annotation sequence for output, and the calculation formula is as follows: in, Indicates location To location The score of the entity, and The location and location The vector representation of the entity at , is the index of the entity type, Represents the transpose operation, which is used to transform a vector Transpose Vector shapes.

[0010] Optionally, in step S2, in the attention mechanism layer of the intent recognition model, a feature vector sequence containing context information is input, and a query vector, a key vector, and a value vector are obtained by linear transformation; By querying the vector , key vector Calculate the attention weight, the calculation formula is as follows: in, is the dimension of the key vector K, represents the transpose operation of K, is the attention weight, Represents the attention weight is a -dimensional real vector, where is the sequence length; Compute value vector and attention weights The weighted sum of is as follows: in, is the sequence length, For the The attention weights for the sequence positions, No. The value vector of the sequence position after linear transformation, Represents a value vector is a -dimensional real vector, where is the dimension of the value vector.

[0011] Optionally, in step S2, the output layer of the intent recognition model uses the softma medical knowledge question-answering activation function to classify the text into the probability distribution vector of each category, and the category with the largest probability value is the classification result, and the formula is as follows: in, and are the parameter matrix and bias vector respectively, is the output of the attention mechanism layer; The output intent classification result is: Among them, Y is a vector whose elements correspond to the probabilities of different categories. Returns the index of the category with the highest probability.

[0012] Optionally, the loss function of the intent recognition model is as follows: in, is the sample size, is the number of categories, For the Sample No. The true labels of the categories, The model predicts Sample No. The probability of a class.

[0013] Optionally, the entity recognition preprocessing includes the following specific steps: By analyzing the medical records, we can identify the high-frequency negative words; A forward matching algorithm is used to determine whether the user's question contains the high-frequency negative words, and the maximum continuous length is set to 2; After identifying the question intent, if a negative word appears outside the entity, the negative sentence is deleted, and the deletion range is from the position of the negative word to the position of the next punctuation mark in the sentence.

[0014] Optionally, the entity link refers to preprocessing, and the specific steps are as follows: Convert entities in the knowledge graph into vector form through Sentence-BERT and save them; Perform vectorization operations on the entities in the user's question and calculate the semantic similarity with the entities in the knowledge graph; Select multiple entities with the highest scores and determine the final link result through character matching.

[0015] Optionally, the results of entity recognition and entity linking are converted into Cypher query statements to retrieve answers in the knowledge graph, and the specific steps are as follows: Through entity recognition and entity chaining, the medical entities in the question and their mapping in the knowledge graph are obtained; Determining the intent type of the question by using the intent recognition model; Construct Cypher query statements to query relevant information in the knowledge graph; Return answers that match the user's intent.

[0016] As described above, the medical knowledge question-answering method based on medical text proposed by the present invention has the following beneficial effects: The present invention adopts a named entity recognition model that combines the RoBERTa-wwm word embedding layer and the BiLSTM feature extraction layer, which can more accurately identify medical entities such as disease names, drug names, etc. from medical texts, thereby improving the accuracy and reliability of the question-answering system; The present invention uses the intent recognition model and introduces the attention mechanism layer to deeply understand the semantics and intent of user questions. Even when faced with complex questions or polysemous words, it can give accurate intent classification, which helps the question-answering system to more accurately locate user needs and provide targeted answers. The present invention adopts a modular design concept, and each module is relatively independent, so it is easy to add new data sources, optimize model parameters or introduce new technical methods to adapt to the ever-changing needs of the medical field. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Shown is a flow chart of a medical knowledge question-answering method based on medical text according to an embodiment of the present invention; Figure 2 Shown is a schematic diagram of the process of constructing a medical knowledge graph according to an embodiment of the present invention. DETAILED DESCRIPTION

[0018] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.

[0019] It should be noted that the diagram provided in the present embodiment only illustrates the basic concept of the present invention in a schematic manner, so the diagram only shows the components related to the present invention rather than drawing according to the number, shape and size of the components during actual implementation. The type, quantity and ratio of each component during actual implementation can be a random change, and the component layout type may also be more complicated. The structure, ratio, size, etc. illustrated in the drawings of the present specification are only used to match the content disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions that the present invention can implement, so they have no technical substantive significance. Any modification of the structure, change of the proportional relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the effect that the present invention can produce and the purpose that can be achieved. At the same time, the terms such as "upper", "lower", "left", "right", "middle" and "one" quoted in this specification are only for the convenience of narration, and are not used to limit the scope of the present invention. The change or adjustment of its relative relationship should also be regarded as the scope of the present invention without substantially changing the technical content.

[0020] The present invention provides a medical knowledge question-answering method based on medical text, referring to Figure 1 As shown, the specific steps are as follows: S1. Obtain medical-related data from multiple medical consultation websites, including online public data sets and online medical discussion posts; Specifically, online public data sets include medical natural language processing competition data sets and public data sets from open source websites.

[0021] Online medical discussion posts include medical questions actually asked by users and answers given by professional doctors. After being collected and cleaned, the online medical discussion posts are stored in ElasticSearch and used as a retrieval data set.

[0022] In this embodiment, medical-related data are obtained from multiple medical consultation websites to construct a rich medical dataset, which provides a basis for subsequent named entity recognition, intent recognition, and medical knowledge graph construction.

[0023] S2. Establish a named entity model based on the obtained online public data set, and establish an intent recognition model based on the retrieval data set. The named entity model includes a word embedding layer, a feature extraction layer, and an entity annotation layer, and the intent recognition model includes a word embedding layer, a feature extraction layer, an attention mechanism layer, and an output layer. For the named entity model, in this embodiment, the public network data sets used include semi-structured data obtained from professional medical information website web crawler parsing, open source structured knowledge graph data sets, and open source medical data sets and unstructured data of medical literature.

[0024] For the intent recognition model, in this embodiment, part of the retrieval data set is the medical questions asked by users and the answers given by professional doctors on the crawled medical information website, and the other part is selected from the Chinese Medical Intent Dataset (CMID) and the Chinese MedDialog Dataset (CMDD) as the retrieval data set for supplement. ElasticSearch is a search server based on Lucene. Elasticsearch is used for full-text search, log analysis and other scenarios. It can store, search and analyze large amounts of data quickly and in near real time. It is used as the underlying search engine / database, enabling applications to quickly build indexes and perform complex search queries.

[0025] The word embedding layers of the named entity model and the intent recognition model both use the RoBERTa-wwm model. The input of the RoBERTa-wwm model is a text sequence that has been segmented and encoded. The initial word embedding vector is calculated using the following formula: in, is the initial word embedding vector, is the word embedding matrix, is the position embedding matrix, For the The hidden state of the layer, represents the Transformer encoder, is the maximum number of layers of Transformer, and the initial input is The RoBERTa-wwm model is a variant of the RoBERTa (Robustly optimized BERT pretraining approach) model, which uses a whole word masking strategy during pretraining to improve the model's ability to process Chinese text. In this embodiment, the RoBERTa-wwm model is used as the word embedding layer of the named entity model and the intent recognition model, which can more effectively extract semantic information from the text.

[0026] The feature extraction layers of the named entity model and the intent recognition model both use the BiLSTM network to perform bidirectional encoding on the semantic feature vector output by the word embedding layer, generate a feature vector sequence containing context information, combine the forward and reverse sequences, and calculate the feature vector containing context information. The calculation formula is as follows: in, and They are the sequence of the model's forward LSTM network output and the reverse LSTM network at time step The output, Indicates that both are in time step The feature vector containing context information is generated by splicing. The BiLSTM network is a bidirectional long short-term memory network that can encode the input sequence forward and backward to obtain a feature vector containing context information. In this embodiment, the BiLSTM network is used as the feature extraction layer of the named entity model and the intent recognition model, which can more effectively extract the context information in the text.

[0027] The entity annotation layer of the named entity model uses the GlobalPointer model for entity annotation. The GlobalPointer model designs a global pointer, processes one type of entity in each layer, calculates the scoring function, and selects the optimal annotation sequence for output. The calculation formula is as follows: in, Indicates location To location The score of the entity, and The location and location The vector representation of the entity at , is the index of the entity type, Represents the transpose operation, which is used to transform a vector Transpose The GlobalPointer model is a named entity recognition model based on a global pointer, which is used to deal with the problems of nested entities and entity overlap. In this embodiment, the GlobalPointer model is used as the entity annotation layer of the named entity model, which can more effectively identify medical entities in the text.

[0028] In the attention mechanism layer of the intent recognition model, a feature vector sequence containing context information is input, and a linear transformation is performed to obtain a query vector, a key vector, and a value vector. The attention weight is calculated using the query vector Q and the key vector K. The calculation formula is as follows: in, is the dimension of the key vector K, represents the transpose operation of K, is the attention weight, Represents the attention weight is a -dimensional real vector, where is the sequence length; Compute value vector and attention weights The weighted sum of is as follows: in, is the sequence length, For the The attention weights for the sequence positions, No. The value vector of the sequence position after linear transformation, Represents a value vector is a -dimensional real vector, where is the dimension of the value vector. This formula represents the sum of the weighted sums of all positions (from 1 to N) in the sequence. In this embodiment, the attention mechanism layer is used as part of the intent recognition model to more effectively extract the intent information in the text.

[0029] The output layer of the intent recognition model uses the softma medical knowledge question-answering activation function to classify the text into the probability distribution vector of each category. The category with the largest probability value is the classification result. The formula is as follows: in, and are the parameter matrix and bias vector respectively, is the output of the attention mechanism layer; The output intent classification result is: Among them, Y is a vector whose elements correspond to the probabilities of different categories. Returns the index of the category with the highest probability.

[0030] Furthermore, the loss function of the intent recognition model is as follows: in, is the sample size, is the number of categories, For the Sample No. The true label of each category (0 or 1), The model predicts Sample No. The probability of a class.

[0031] S3, build a medical knowledge graph based on entities processed by the named entity model; Reference Figure 2 As shown, the specific construction steps are as follows: S31. Preprocess the collected medical data, including data cleaning, deduplication, and formatting. Data cleaning mainly involves removing irrelevant information and correcting erroneous data. Deduplication involves deleting duplicate data records. Formatting involves converting data into a unified format for subsequent processing. S32. Use the established named entity model to process the collected medical text data, identify and label the medical entities therein, such as diseases, drugs, symptoms, etc. After extracting entities from multiple data sources, perform entity alignment to ensure that the same entity in different data sources has only one node in the knowledge graph. In this embodiment, by calculating the structural similarity and attribute similarity between entities, it is determined whether the entities in different data sources point to the same concept; use the Jaccard index medical knowledge question and answer to calculate the structural similarity, use the cosine similarity to calculate the attribute similarity, and add the two weightedly to obtain the final similarity. Perform entity alignment according to the similarity threshold and process duplicate data; S33. Select Neo4j graph database as a tool for storing medical knowledge, use Py2neo module to connect to Neo4j database, read the sorted data files, instantiate the data into corresponding medical nodes and relationships, and create entity nodes and relationships between nodes in the graph database through Cypher statements.

[0032] S4. Perform entity recognition and entity chaining preprocessing on the user question, convert the results of entity recognition and entity chaining into Cypher query statements, and retrieve the answer in the knowledge graph.

[0033] Among them, the specific steps of entity recognition preprocessing are as follows: By analyzing the medical records, we can identify high-frequency negative words. Negative words such as "not" and "no" affect the accuracy of entity recognition.

[0034] The forward matching algorithm is used to determine whether the user's question contains the high-frequency negative word, and the maximum continuous length is set to 2. The forward matching algorithm is a simple general string matching algorithm, starting from the beginning of the string, and matching with the pattern string in sequence.

[0035] After identifying the question intent, if a negative word appears outside the entity, the negative sentence is deleted, and the deletion range is from the position of the negative word to the position of the next punctuation mark in the sentence. Deleting the negative sentence can avoid the influence of negative words on entity recognition and improve the accuracy of entity recognition.

[0036] The specific steps of entity link preprocessing are as follows: The entities in the knowledge graph are converted into vector form through Sentence-BERT and saved in the pkl file. Sentence-BERT is used for sentence embedding, capturing the semantic information of the sentence and representing the sentence as a low-dimensional vector.

[0037] The entities in the user's question are vectorized and the semantic similarity with the entities in the knowledge graph is calculated. In this embodiment, cosine similarity is used to calculate the similarity between vectors.

[0038] Select multiple entities with the highest scores and determine the final link result through character matching. Character matching is a simple and universal string matching method that ensures that the entities in the user's question are consistent with the entities in the knowledge graph in terms of characters.

[0039] Convert the results of entity recognition and entity linking into Cypher query statements to retrieve answers in the knowledge graph. The specific implementation steps are as follows: The medical entities in the question and their mapping in the knowledge graph are obtained through entity recognition and entity chaining, which are used to associate the entities in the user's question with the entities in the knowledge graph.

[0040] The intent type of the question is determined through the intent recognition model. The intent type determines the type of information that needs to be queried in the knowledge graph.

[0041] Construct Cypher query statements to query relevant information in the knowledge graph. Cypher query statements are helpful in describing the graph structure and attribute information of the query.

[0042] Combined with the answer template, the answer that meets the user's intent is returned. The answer template is a predefined answer format used to convert query results into an answer form that is easy for users to understand.

[0043] In summary, through the above steps, medical knowledge question and answer based on medical text can be realized. This method can accurately identify the medical entities and intentions in the user's question, and retrieve the answers that meet the user's intentions in the knowledge graph. At the same time, this method also has good scalability and flexibility, and can easily add new medical data and knowledge graph information.

[0044] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A medical knowledge question-answering method based on medical text, characterized in that: include: S1. Obtain medical-related data from multiple medical consultation websites, wherein the medical-related data includes online public data sets and online medical discussion posts; the online public data sets include semi-structured data obtained from professional medical information website web crawler analysis, open source structured knowledge graph data sets, open source medical data sets, and unstructured data of medical literature; the online medical discussion posts include medical questions actually asked by users and answers given by professional doctors; the online medical discussion posts are collected, cleaned, and stored in ElasticSearch for use as retrieval data sets; S2. Establishing a named entity model based on the obtained network public data set, and establishing an intent recognition model based on the retrieval data set, wherein the named entity model includes a word embedding layer, a feature extraction layer, and an entity annotation layer, and the intent recognition model includes a word embedding layer, a feature extraction layer, an attention mechanism layer, and an output layer; S3. Construct a medical knowledge graph based on the entities processed by the named entity model; specifically: S31. Preprocess the collected medical data, including data cleaning, deduplication, and formatting; S32. Use the established named entity model to process the collected medical text data, identify and annotate the medical entities therein, and after extracting the entities, perform entity alignment to ensure that the same entity in different data sources has only one node in the knowledge graph; S33. Select Neo4j graph database as a tool for storing medical knowledge, use Py2neo module to connect to Neo4j database, read the sorted data files, instantiate the data into corresponding medical nodes and relationships, and create entity nodes and relationships between nodes in the graph database through Cypher statements; S4. Perform entity recognition and entity chaining preprocessing on the user question, convert the results of entity recognition and entity chaining into Cypher query statements, and retrieve the answer in the knowledge graph.

2. A medical knowledge question-answering method based on medical text according to claim 1, characterized in that: In step S2, the word embedding layers of the named entity model and the intent recognition model both use the RoBERTa-wwm model to calculate the initial word embedding vector, and the calculation formula is as follows: in, is the initial word embedding vector, is the word embedding matrix, is the position embedding matrix, For the The hidden state of the layer, represents the Transformer encoder, is the maximum number of layers of Transformer, and the initial input is .

3. A medical knowledge question-answering method based on medical text according to claim 2, characterized in that: In step S2, the feature extraction layers of the named entity model and the intent recognition model both use a BiLSTM network to perform bidirectional encoding on the semantic feature vector output by the word embedding layer, generate a feature vector sequence containing context information, combine the forward and reverse sequences, and calculate the feature vector containing context information. The calculation formula is as follows: in, and They are the sequence of the model's forward LSTM network output and the reverse LSTM network at time step The output, Indicates that both are in time step The concatenated feature vector containing context information is generated.

4. A medical knowledge question-answering method based on medical text according to claim 3, characterized in that: In step S2, the entity annotation layer of the named entity model adopts the GlobalPointer model, designs the global pointer of layer a, processes one type of entity separately in each layer, calculates the scoring function, selects the optimal annotation sequence for output, and the calculation formula is as follows: in, Indicates location To location The score of the entity, and The location and location The vector representation of the entity at , is the index of the entity type, Represents the transpose operation, which is used to transform a vector Transpose Vector shapes.

5. A medical knowledge question-answering method based on medical text according to claim 4, characterized in that: In step S2, in the attention mechanism layer of the intent recognition model, a feature vector sequence containing context information is input, and a query vector, a key vector, and a value vector are obtained by linear transformation; By querying the vector , key vector Calculate the attention weight, the calculation formula is as follows: in, is the dimension of the key vector K, represents the transpose operation of K, is the attention weight, Represents the attention weight is a -dimensional real vector, where is the sequence length; Compute value vector and attention weights The weighted sum of is as follows: in, is the sequence length, For the The attention weights for the sequence positions, No. The value vector of the sequence position after linear transformation, Represents a value vector is a -dimensional real vector, where is the dimension of the value vector.

6. A medical knowledge question-answering method based on medical text according to claim 5, characterized in that: In step S2, the output layer of the intent recognition model uses the softma medical knowledge question-answering activation function to classify the text into the probability distribution vector of each category. The category with the largest probability value is the classification result. The formula is as follows: in, and are the parameter matrix and bias vector respectively, is the output of the attention mechanism layer; The output intent classification result is: Among them, Y is a vector whose elements correspond to the probabilities of different categories. Returns the index of the category with the highest probability.

7. A medical knowledge question-answering method based on medical text according to claim 6, characterized in that: The loss function of the intent recognition model is as follows: in, is the sample size, is the number of categories, For the Sample No. The true labels of the categories, The model predicts Sample No. The probability of a class.

8. A medical knowledge question-answering method based on medical text according to claim 7, characterized in that: The entity recognition preprocessing includes the following specific steps: By analyzing the medical records, we can identify the high-frequency negative words; A forward matching algorithm is used to determine whether the user's question contains the high-frequency negative words, and the maximum continuous length is set to 2; After identifying the question intent, if a negative word appears outside the entity, the negative sentence is deleted, and the deletion range is from the position of the negative word to the position of the next punctuation mark in the sentence.

9. A medical knowledge question-answering method based on medical text according to claim 8, characterized in that: The entity chain refers to preprocessing, and the specific steps are as follows: Convert entities in the knowledge graph into vector form through Sentence-BERT and save them; Perform vectorization operations on the entities in the user's question and calculate the semantic similarity with the entities in the knowledge graph; Select multiple entities with the highest scores and determine the final link result through character matching.

10. A medical knowledge question-answering method based on medical text according to claim 9, characterized in that: The results of entity recognition and entity linking are converted into Cypher query statements to retrieve answers in the knowledge graph. The specific steps are as follows: Through entity recognition and entity chaining, the medical entities in the question and their mapping in the knowledge graph are obtained; Determining the intent type of the question by using the intent recognition model; Construct Cypher query statements to query relevant information in the knowledge graph; Return answers that match the user's intent.

Citation Information

Cited By

  • Cloud native medical service platform construction method and device, equipment and storage medium

    CN120199399A

  • Cloud-native medical business platform construction method, device, equipment and storage medium

    CN120199399B

  • Traditional Chinese medicine knowledge AI question and answer method based on multi-modal dialogue model

    CN120596623A

  • Virtual human auxiliary inquiry system and method based on medical knowledge graph

    CN120954675A

  • Medical knowledge question-answering system and method based on multi-agent cooperation mechanism

    CN122153010A