Intelligent query method and device for parathyroid medical knowledge based on knowledge graph
By building an intelligent query system based on knowledge graphs, using BERT-BiLSTM-CRF and deep text learning model, the problem of low diagnosis and response efficiency of patients with secondary hyperparathyroidism is solved, and efficient intelligent question-and-answer and resource saving is achieved.
Patent Information
- Application Number
- CN202410644768.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-05-23
AI Technical Summary
Patients with secondary hyperparathyroidism have low response efficiency during online consultation, which consumes medical resources and affects the efficiency of offline outpatient treatment.
Using the intelligent query method of parathyroid medical knowledge based on knowledge graph, the BERT-BiLSTM-CRF entity recognition model and deep text learning model are constructed to generate secondary hyperparathyroidism knowledge graphs to realize intelligent query and question-and-answer system.
It improves the efficiency of consultation and response to patients with secondary hyperparathyroidism, reduces the pressure on medical resources, meets the needs of patients' real-time health consultation, and facilitates long-term self-management of patients.
Smart Images

Figure CN118427307B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent medical technology, and in particular to a method and device for intelligent query of parathyroid medical knowledge based on a knowledge graph. Background Art
[0002] SHPT (Secondary Hyperparathyroidism) is a chronic compensatory clinical syndrome that mainly occurs in chronic renal insufficiency, intestinal malabsorption syndrome, Fanconi syndrome, renal tubular acidosis, vitamin D deficiency or resistance, pregnancy, breastfeeding, etc. In these cases, the parathyroid glands are stimulated by low blood calcium, low blood magnesium or high blood phosphorus for a long time, resulting in excessive secretion of PTH (Parathyroid Hormone) to increase blood calcium, blood magnesium and reduce blood phosphorus.
[0003] In the pathological process of secondary hyperparathyroidism, the parathyroid glands undergo compensatory hyperfunction, i.e., parathyroid hyperplasia, to increase the secretion of PTH. However, if this compensatory hyperfunction persists for too long, the parathyroid glands may develop into autonomous hyperfunction and form adenomas that secrete excessive PTH.
[0004] During the online consultation process of patients with secondary hyperparathyroidism, the online consultation platform will accumulate a large amount of secondary hyperparathyroidism patient consultation data and corresponding patient health education data sets, which can be used to build an intelligent question-and-answer system.
[0005] In daily online consultations, online doctors are still required to repeatedly answer questions of patients with secondary hyperparathyroidism. Repetitive questions and answers will take up the consultation time of hospital doctors, consume available medical resources, and affect the efficiency of offline outpatient treatment for patients with secondary hyperparathyroidism. Summary of the invention
[0006] In order to solve the technical problems of low efficiency of consultation and response for patients with secondary hyperparathyroidism and waste of medical resources in the prior art, the embodiment of the present invention provides a method and device for intelligent query of parathyroid medical knowledge based on knowledge graph. The technical solution is as follows:
[0007] On the one hand, a parathyroid medical knowledge intelligent query method based on a knowledge graph is provided, the method is implemented by a parathyroid medical knowledge intelligent query device, and the method includes:
[0008] S1. Obtain the secondary hyperparathyroidism problem to be queried.
[0009] S2. Build a BERT-BiLSTM-CRF entity recognition model based on attention mechanism.
[0010] S3. Construct a knowledge graph of secondary hyperparathyroidism based on the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0011] S4. According to the problem of secondary hyperparathyroidism and the knowledge graph of secondary hyperparathyroidism, the query result of the problem of secondary hyperparathyroidism is obtained.
[0012] Optionally, the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism is constructed in S2, including:
[0013] S21. Collect big data on the historical medical consultation of patients with secondary hyperparathyroidism.
[0014] S22. Perform text regression preprocessing on the historical medical consultation big data of secondary hyperparathyroidism, extract the question and answer data of secondary hyperparathyroidism in different entity contexts, obtain the word vectors of the question and answer data and the semantic structure characteristics of the corresponding word vectors.
[0015] S23. According to the word vector and the semantic structure characteristics of the corresponding word vector, set the attention mechanism for different entity contexts.
[0016] S24. Obtain the initial BERT-BiLSTM-CRF entity recognition model.
[0017] Among them, the initial BERT-BiLSTM-CRF entity recognition model includes a BERT module, a BiLSTM module, and a CRF module.
[0018] S25. According to the attention mechanism of different entity contexts, convergence constraints are imposed on the question and answer data of secondary hyperparathyroidism recognized by the BERT module in the text recognition process, an attention layer is linked between the BERT module and the BiLSTM module, and the attention mechanism of different entity contexts is configured in the linked attention layer to obtain a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0019] Optionally, in S3, a knowledge graph of secondary hyperparathyroidism is constructed according to a BERT-BiLSTM-CRF entity recognition model based on an attention mechanism, including:
[0020] S31. Collect the big data of historical consultation on secondary hyperparathyroidism from patients with secondary hyperparathyroidism, classify the big data of historical consultation on secondary hyperparathyroidism based on the SHPT medical entity dictionary, and obtain SHPT data subsets of multiple entity contexts.
[0021] S32. Based on the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, the SHPT data subset of multiple entity contexts and the preset deep text learning model, a question-answer pair association data set of secondary hyperparathyroidism is obtained.
[0022] S33. Construct a knowledge graph of secondary hyperparathyroidism based on the data structure and association relationship of the question and answer pairs in the question and answer pair association data set of secondary hyperparathyroidism.
[0023] Optionally, the historical consultation big data of secondary hyperparathyroidism of patients with secondary hyperparathyroidism in S31 is as shown in formula (1):
[0024] SHPT=data(x) (1)
[0025] Where SHPT represents the historical consultation big data of secondary hyperparathyroidism of patients with secondary hyperparathyroidism, data(x) represents the historical consultation big data of secondary hyperparathyroidism in different entity contexts x, including the corresponding question-answer pairs of secondary hyperparathyroidism.
[0026] The SHPT data subset of multiple entity contexts is shown in formula (2):
[0027] SHPT x =[SHPT A]data(x) (2)
[0028] Where, SHPT x It represents a subset of SHPT data in any entity context, A represents the SHPT medical entity dictionary, and [SHPTA] represents the classification rules set based on the SHPT medical entity dictionary.
[0029] Optionally, before obtaining the question-answer pair association dataset of secondary hyperparathyroidism according to the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, the SHPT data subset of multiple entity contexts and the preset deep text learning model in S32, the method further includes:
[0030] According to different entity contexts, NLP tasks of SHPT data subsets corresponding to entity contexts are generated for SHPT data subsets of multiple entity contexts.
[0031] Label the NLP tasks and write the corresponding entity context into the task attributes of the NLP tasks.
[0032] Optionally, in S32, according to the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, the SHPT data subsets of multiple entity contexts, and the preset deep text learning model, a question-answer pair association data set of secondary hyperparathyroidism is obtained, including:
[0033] S321. Read the NLP task and identify the task attributes of the SHPT data subset in the NLP task.
[0034] S322. According to the task attributes of the SHPT data subset, determine the entity context to which the question and answer data of the SHPT data subset in the NLP task belongs.
[0035] S323. Determine whether the entity context to which the question and answer data belongs is the question and answer data on secondary hyperparathyroidism in the medical service consultation.
[0036] If so, the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism is activated, and the NLP task is performed. The SHPT data subset in the NLP task is jointly trained and learned with the secondary hyperparathyroidism question and answer corpus to extract the first question and answer pair associated data set of secondary hyperparathyroidism.
[0037] If not, the preset deep text learning model is activated and the NLP task is executed. The SHPT data subset in the NLP task is jointly trained and learned with the secondary hyperparathyroidism question and answer corpus to extract the second question and answer pair associated data set of secondary hyperparathyroidism.
[0038] S324. Obtain a question-answer pair associated data set of secondary hyperparathyroidism according to the first question-answer pair associated data set and the second question-answer pair associated data set.
[0039] Optionally, in S33, constructing a knowledge graph of secondary hyperparathyroidism according to the data structure and association relationship of the question-answer pairs in the question-answer pair association data set of secondary hyperparathyroidism includes:
[0040] S331. Obtain a blank knowledge graph.
[0041] S332. Obtain the data structure of the first question-answer pair associated data set and the second question-answer pair associated data set, and obtain the association relationship between the question-answer pair entities of secondary hyperparathyroidism according to the data structure.
[0042] S333. According to the association relationship, the question-answer entity is written into the corresponding graph node in the blank knowledge graph to generate a knowledge graph of secondary hyperparathyroidism.
[0043] On the other hand, a parathyroid medical knowledge intelligent query device based on a knowledge graph is provided, and the device is applied to a parathyroid medical knowledge intelligent query method based on a knowledge graph, and the device includes:
[0044] The acquisition module is used to obtain the secondary hyperparathyroidism problem to be queried.
[0045] Entity recognition model building module, used to build a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0046] The knowledge graph construction module is used to construct a knowledge graph of secondary hyperparathyroidism based on the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0047] The output module is used to obtain the query result of the secondary hyperparathyroidism problem according to the secondary hyperparathyroidism problem and the secondary hyperparathyroidism knowledge graph.
[0048] Optionally, the entity recognition model building module is further used to
[0049] S21. Collect big data on the historical medical consultation of patients with secondary hyperparathyroidism.
[0050] S22. Perform text regression preprocessing on the historical medical consultation big data of secondary hyperparathyroidism, extract the question and answer data of secondary hyperparathyroidism in different entity contexts, obtain the word vectors of the question and answer data and the semantic structure characteristics of the corresponding word vectors.
[0051] S23. According to the word vector and the semantic structure characteristics of the corresponding word vector, set the attention mechanism for different entity contexts.
[0052] S24. Obtain the initial BERT-BiLSTM-CRF entity recognition model.
[0053] Among them, the initial BERT-BiLSTM-CRF entity recognition model includes a BERT module, a BiLSTM module, and a CRF module.
[0054] S25. According to the attention mechanism of different entity contexts, convergence constraints are imposed on the question and answer data of secondary hyperparathyroidism recognized by the BERT module in the text recognition process, an attention layer is linked between the BERT module and the BiLSTM module, and the attention mechanism of different entity contexts is configured in the linked attention layer to obtain a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0055] Optionally, the knowledge graph building module is further used to:
[0056] S31. Collect the big data of historical consultation on secondary hyperparathyroidism from patients with secondary hyperparathyroidism, classify the big data of historical consultation on secondary hyperparathyroidism based on the SHPT medical entity dictionary, and obtain SHPT data subsets of multiple entity contexts.
[0057] S32. Based on the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, the SHPT data subset of multiple entity contexts and the preset deep text learning model, a question-answer pair association data set of secondary hyperparathyroidism is obtained.
[0058] S33. Construct a knowledge graph of secondary hyperparathyroidism based on the data structure and association relationship of the question and answer pairs in the question and answer pair association data set of secondary hyperparathyroidism.
[0059] Optionally, the historical consultation big data of secondary hyperparathyroidism patients is as shown in formula (1):
[0060] SHPT=data(x) (1)
[0061] Where SHPT represents the historical consultation big data of secondary hyperparathyroidism of patients with secondary hyperparathyroidism, data(x) represents the historical consultation big data of secondary hyperparathyroidism in different entity contexts x, including the corresponding question-answer pairs of secondary hyperparathyroidism.
[0062] The SHPT data subset of multiple entity contexts is shown in formula (2):
[0063] SHPT x =[SHPT A]data(x) (2)
[0064] Where, SHPT x It represents a subset of SHPT data in any entity context, A represents the SHPT medical entity dictionary, and [SHPTA] represents the classification rules set based on the SHPT medical entity dictionary.
[0065] Optionally, the knowledge graph building module is further used to:
[0066] According to different entity contexts, NLP tasks of SHPT data subsets corresponding to entity contexts are generated for SHPT data subsets of multiple entity contexts.
[0067] Label the NLP tasks and write the corresponding entity context into the task attributes of the NLP tasks.
[0068] Optionally, the knowledge graph building module is further used to:
[0069] S321. Read the NLP task and identify the task attributes of the SHPT data subset in the NLP task.
[0070] S322. According to the task attributes of the SHPT data subset, determine the entity context to which the question and answer data of the SHPT data subset in the NLP task belongs.
[0071] S323. Determine whether the entity context to which the question and answer data belongs is the question and answer data on secondary hyperparathyroidism in the medical service consultation.
[0072] If so, the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism is activated, and the NLP task is performed. The SHPT data subset in the NLP task is jointly trained and learned with the secondary hyperparathyroidism question and answer corpus to extract the first question and answer pair associated data set of secondary hyperparathyroidism.
[0073] If not, the preset deep text learning model is activated and the NLP task is executed. The SHPT data subset in the NLP task is jointly trained and learned with the secondary hyperparathyroidism question and answer corpus to extract the second question and answer pair associated data set of secondary hyperparathyroidism.
[0074] S324. Obtain a question-answer pair associated data set of secondary hyperparathyroidism according to the first question-answer pair associated data set and the second question-answer pair associated data set.
[0075] Optionally, the knowledge graph building module is further used to:
[0076] S331. Obtain a blank knowledge graph.
[0077] S332. Obtain the data structure of the first question-answer pair associated data set and the second question-answer pair associated data set, and obtain the association relationship between the question-answer pair entities of secondary hyperparathyroidism according to the data structure.
[0078] S333. According to the association relationship, the question-answer entity is written into the corresponding graph node in the blank knowledge graph to generate a knowledge graph of secondary hyperparathyroidism.
[0079] On the other hand, a parathyroid medical knowledge intelligent query device is provided, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned parathyroid medical knowledge intelligent query methods based on the knowledge graph is implemented.
[0080] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned knowledge graph-based intelligent query methods for parathyroid medical knowledge.
[0081] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0082] In an embodiment of the present invention, by combining a BERT-BiLSTM-CRF entity recognition model based on an attention mechanism and a preset deep text learning model, a subset of SHPT data in different entity contexts is jointly trained and learned with a secondary hyperparathyroidism question-and-answer corpus, and a question-and-answer pair association data set related to secondary hyperparathyroidism is extracted; according to the data structure and association relationship of the question-and-answer pair in the question-and-answer pair association data set, a corresponding secondary hyperparathyroidism knowledge graph is constructed. In this way, a large amount of consultation data and patient health education data sets accumulated by the online consultation platform are used to construct a medical intelligent question-and-answer system suitable for patients with secondary hyperparathyroidism, and intelligently answer the secondary hyperparathyroidism questions raised by patients with secondary hyperparathyroidism, which can meet the real-time health consultation needs of patients, facilitate patients to carry out long-term self-management of the disease, and reduce the work pressure of medical staff. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0084] Figure 1 It is a flow chart of a parathyroid medical knowledge intelligent query method based on a knowledge graph provided by an embodiment of the present invention;
[0085] Figure 2 It is a structural diagram of a BERT-BiLSTM-CRF model provided by an embodiment of the present invention;
[0086] Figure 3 It is a structural diagram of a BERT-BiLSTM-CRF entity recognition model based on an attention mechanism provided by an embodiment of the present invention;
[0087] Figure 4 It is a system block diagram of a parathyroid medical knowledge intelligent query system based on a knowledge graph provided by an embodiment of the present invention;
[0088] Figure 5 It is a block diagram of a parathyroid medical knowledge intelligent query device based on a knowledge graph provided by an embodiment of the present invention;
[0089] Figure 6 It is a structural schematic diagram of a parathyroid medical knowledge intelligent query device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0090] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0091] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0092] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0093] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.
[0094] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0095] The embodiment of the present invention provides a parathyroid medical knowledge intelligent query method based on a knowledge graph, which can be implemented by a parathyroid medical knowledge intelligent query device, which can be a terminal or a server. Figure 1 The flowchart of the parathyroid medical knowledge intelligent query method based on the knowledge graph is shown. The processing flow of the method may include the following steps:
[0096] S1. Obtain the secondary hyperparathyroidism problem to be queried.
[0097] In a feasible implementation manner, the secondary hyperparathyroidism problem of the secondary hyperparathyroidism patient is obtained according to the existing technology.
[0098] S2. Build a BERT-BiLSTM-CRF entity recognition model based on attention mechanism.
[0099] The present invention is a question parsing module based on the BERT-BiLSTM-CRF entity recognition algorithm based on the attention mechanism. The present invention combines the actual context and divides the questions into two categories: medical service questions and other open questions. For the questions input by the user, the present invention uses the medical entity dictionary to classify the questions, and then uses the BERT-BiLSTM-CRF entity recognition algorithm based on the attention mechanism to perform command entity recognition to obtain the keywords in the questions. Finally, it is handed over to the question-answering engine for processing. Experiments have shown that the BERT-BiLSTM-CRF algorithm using the attention mechanism can achieve better results.
[0100] Optionally, the above step S2 may include the following steps S21-S25:
[0101] S21. Collect big data on the historical medical consultation of patients with secondary hyperparathyroidism.
[0102] S22. Perform text regression preprocessing on the historical medical consultation big data of secondary hyperparathyroidism, extract the question and answer data of secondary hyperparathyroidism in different entity contexts, obtain the word vectors of the question and answer data and the semantic structure characteristics of the corresponding word vectors.
[0103] S23. According to the word vector and the semantic structure characteristics of the corresponding word vector, set the attention mechanism for different entity contexts.
[0104] S24. Obtain the initial BERT-BiLSTM-CRF entity recognition model.
[0105] Among them, the initial BERT-BiLSTM-CRF entity recognition model includes a BERT (Bidirectional Encoder Representations from Transformers) module, a BiLSTM (Bi-directional Long Short-Term Memory) module, and a CRF (Conditional Random Field) module.
[0106] S25. According to the attention mechanism of different entity contexts, convergence constraints are imposed on the question and answer data of secondary hyperparathyroidism recognized by the BERT module in the text recognition process, an attention layer is linked between the BERT module and the BiLSTM module, and the attention mechanism of different entity contexts is configured in the linked attention layer to obtain a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0107] In a feasible implementation, NLP (Natural Language Processing) technology is used to perform text regression preprocessing on the historical consultation big data of secondary hyperparathyroidism, and the word vectors of the question and answer data related to secondary hyperparathyroidism in different entity contexts and the semantic structure characteristics of the corresponding word vectors are extracted; according to the word vectors and the semantic structure characteristics of the corresponding word vectors, an attention mechanism corresponding to different entity contexts is set.
[0108] Among them, the attention mechanism is used to: according to the semantic structure features of the corresponding word vector agreed in the attention mechanism, the question and answer text about secondary hyperparathyroidism identified by the BERT model in the process of text recognition is converged.
[0109] An attention layer is linked between the BERT model and the BiLSTM model in the initial BERT-BiLSTM-CRF entity recognition model, and the attention mechanism of different entity contexts is configured in the attention layer.
[0110] After the configuration is completed, the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism with BERT convergence constraints is obtained.
[0111] Furthermore, the method of building a medical intelligent question-answering system using the BERT-BiLSTM-CRF entity recognition model training can be divided into the following steps:
[0112] 1. Data collection and processing: First, it is necessary to collect question-answer data in the medical field and perform corresponding preprocessing, such as word segmentation, stop word removal, entity labeling, etc.
[0113] 2. Build a BERT module: Use a pre-trained BERT model, which has been trained on a large amount of text data and can capture the semantic information of the text. In the medical field, you can use medical-related pre-trained BERT models, such as PubMedBERT, to better capture the semantic information of medical texts.
[0114] 3. Build a BiLSTM module: Based on the BERT model, a BiLSTM layer can be added to further capture sequence information. BiLSTM can consider both the forward and backward information of the sequence, which helps to better capture the contextual information in the medical question-answer pair.
[0115] 4. CRF module: After the BiLSTM layer, you can add a CRF layer to perform named entity recognition or sequence labeling. The CRF layer can globally optimize the sequence labeling results and improve the accuracy of the labeling.
[0116] 5. Training and optimization: Use the collected medical question-answer pair data to train the BERT-BiLSTM-CRF model, and improve the performance of the model by adjusting model parameters and optimizing algorithms.
[0117] 6. Evaluation and deployment: Use the test set to evaluate the trained model, including indicators such as accuracy and recall. If the evaluation results meet the requirements, the model can be deployed to the online environment to provide support for the medical intelligent question-answering system.
[0118] The above is a conventional method, but in this embodiment, it is also necessary to combine the question and answer data about secondary hyperparathyroidism in different entity contexts for data classification, which is used for the subsequent BERT-BiLSTM-CRF entity recognition algorithm (model) based on the attention mechanism to perform data feature entity recognition and labeling of the corresponding context, so as to facilitate the construction of an accurate recognition model.
[0119] like Figure 2 The figure shows the framework diagram of the initial BERT-BiLSTM-CRF entity recognition model. In the initial BERT-BiLSTM-CRF entity recognition model, the initial BERT-BiLSTM-CRF entity recognition model mainly generates word vectors based on context information through BERT model preprocessing, and then inputs the trained word vectors into the BiLSTM-CRF model for further training processing.
[0120] BERT-BiLSTM-CRF is a named entity recognition model that combines BERT, BiLSTM, and CRF.
[0121] BERT, or Bidirectional Encoder Representation from Transformers, is a bidirectional encoder based on Transformer that can generate deep representations of text. BERT has learned a lot of language knowledge through pre-training, which makes it powerful in handling natural language understanding tasks.
[0122] BiLSTM, or Bi-directional Long Short-Term Memory, is a bidirectional long short-term memory network. BiLSTM can capture long-term dependencies in text and can simultaneously consider the forward and backward information of the text, thereby improving the performance of the model.
[0123] CRF, or conditional random field, is a model for sequence labeling. CRF can take into account the information of the entire sequence, not just a single word or character, which makes it perform well in tasks such as named entity recognition.
[0124] The BERT-BiLSTM-CRF model combines the advantages of BERT, BiLSTM, and CRF. It first uses BERT to deeply represent the text, then uses BiLSTM to capture the long-term dependencies in the text, and finally uses CRF for sequence labeling, thereby achieving efficient named entity recognition. This model has achieved good results in many named entity recognition tasks.
[0125] The BERT-BiLSTM-CRF named entity recognition model combines the advantages of BERT, BiLSTM, and CRF to achieve efficient understanding and annotation of text.
[0126] In specific applications, the BERT-BiLSTM-CRF model first annotates the corpus and obtains the corresponding word vectors through the BERT pre-trained language model, and then inputs the word vectors into the BiLSTM module for further processing. Finally, the CRF module is used to decode the output results of the BiLSTM module to obtain a predicted annotation sequence, and then the entities in the sequence are extracted and classified, thereby completing the entire process of Chinese entity recognition.
[0127] like Figure 3 As shown, in order to increase the recognition attention of the BERT-BiLSTM-CRF model to the secondary hyperparathyroidism data, the present invention links an attention layer between its BERT model and the BiLSTM model, which is used to perform convergence constraints on the question and answer text related to secondary hyperparathyroidism recognized by the BERT model in the text recognition process, so that the BERT model in the BERT-BiLSTM-CRF model converges its output, and the recognition result output by the BERT model is subjected to data constraints and screening through the attention layer, so as to perform constrained identification and extraction of the word vectors of the question and answer data related to secondary hyperparathyroidism in each entity context, improve the accurate screening of the word vectors of the question and answer data related to secondary hyperparathyroidism, and facilitate the construction of a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0128] A question parsing module based on the BERT-BiLSTM-CRF entity recognition algorithm based on the attention mechanism. The present invention combines the actual context and divides the questions into two categories: medical service questions and other open questions. For the questions input by the user, the present invention uses the medical entity dictionary to classify the questions, and then uses the BERT-BiLSTM-CRF entity recognition algorithm based on the attention mechanism to perform command entity recognition to obtain the keywords in the questions. Finally, it is processed by the question-answering engine. Experiments have shown that the BERT-BiLSTM-CRF algorithm using the attention mechanism can achieve better results.
[0129] The attention mechanism for different entity contexts, such as attention to medical services, allows BERT to prioritize the diagnosis criteria of clinically severe SHPT diseases and the knowledge of medication and surgery for different SHPTs in clinical practice. You can also set up check-and-check retrieval for diagnostic medical knowledge entities for late-stage SHPT diseases in the early, middle, and late stages, and prioritize the collection of knowledge entity collection rules for late-stage disease diagnosis and clinical medical treatment or surgery. It can also be a knowledge entity collection rule for early SHPT disease prevention.
[0130] The present invention introduces an attention mechanism into the BERT-BiLSTM-CRF algorithm. Specifically, an attention layer can be added between BERT and BiLSTM, which weights the output of BERT to better focus on information that is more important for subsequent tasks. In this way, the model can better capture key information and improve task performance.
[0131] S3. Construct a knowledge graph of secondary hyperparathyroidism based on the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0132] The present invention is based on the data in the open source medical knowledge graph, supplemented by Internet data, and integrates and dynamically updates data from different sources to construct a medical knowledge graph that can be used for intelligent question and answering.
[0133] Optionally, the above step S3 may include the following steps S31-S33:
[0134] S31. Collect the big data of historical consultation on secondary hyperparathyroidism from patients with secondary hyperparathyroidism, classify the big data of historical consultation on secondary hyperparathyroidism based on the SHPT medical entity dictionary, and obtain SHPT data subsets of multiple entity contexts.
[0135] In a feasible implementation, the online consultation platform is logged in, and the historical consultation big data of secondary hyperparathyroidism of patients with secondary hyperparathyroidism is retrieved and collected from the database of the online consultation platform, as shown in formula (1):
[0136] SHPT=data(x) (1)
[0137] Where SHPT represents the historical consultation big data of secondary hyperparathyroidism of patients with secondary hyperparathyroidism, data(x) represents the historical consultation big data of secondary hyperparathyroidism in different entity contexts x, including the corresponding question-answer pairs of secondary hyperparathyroidism.
[0138] Using the preset SHPT medical entity dictionary, the question and answer data about secondary hyperparathyroidism in different entity contexts in the historical consultation big data of secondary hyperparathyroidism are classified to obtain the SHPT data subsets SHPT in different entity contexts, as shown in the following formula (2):
[0139] SHPT x =[SHPT A]data(x) (2)
[0140] Where, SHPT x It represents a SHPT data subset of any entity context, A represents the SHPT medical entity dictionary, and [SHPTA] represents the classification rules set based on the SHPT medical entity dictionary for classifying the question and answer data about secondary hyperparathyroidism in different entity contexts in the historical consultation big data of secondary hyperparathyroidism.
[0141] Among them, the SHPT medical entity dictionary is a medical entity dictionary that contains SHPT's knowledge about medical entities.
[0142] The construction method of SHPT medical entity dictionary involves the following main steps:
[0143] 1. Requirements definition and data collection: First, it is necessary to clarify what types of entities the medical entity dictionary needs to include, such as diseases, drugs, symptoms, treatment methods, medical equipment, etc. Then, collect the corresponding data based on these requirements. This data may come from various medical literature, databases, network resources, etc.
[0144] In the present invention, the main purpose is to collect knowledge on the diagnosis and treatment of related diseases related to secondary hyperparathyroidism, and may also include nursing.
[0145] At the same time, it can be collected from different entity contexts (such as medical services, nursing, consultation or surgery).
[0146] 2. Data preprocessing: The collected data usually needs to be cleaned and preprocessed, including removing irrelevant information, dealing with typos, unifying data formats, etc. In addition, natural language processing operations such as word segmentation and part-of-speech tagging may also be required.
[0147] 3. Entity recognition and labeling: Use natural language processing technology, such as NER (Named Entity Recognition), to perform entity recognition and labeling on the preprocessed data. The purpose of this step is to identify medical entities in the text and label their type and location.
[0148] 4. Build a dictionary: Organize the identified and annotated medical entities into a dictionary. Each entity should contain information such as its type, name, description, etc. At the same time, it is also necessary to consider how to effectively store and query these entities.
[0149] 5. Verification and optimization: Verify the accuracy and completeness of the dictionary to ensure that it can accurately identify various medical entities. If omissions or errors are found in the dictionary, it needs to be optimized and updated.
[0150] 6. Maintenance and Update: As the medical field develops, new medical entities may continue to emerge. Therefore, the dictionary needs to be updated and maintained regularly to ensure its timeliness and accuracy.
[0151] The specific operation of separating the question and answer data related to secondary hyperparathyroidism in different entity contexts required from the medical entity dictionary can be completed by the administrator.
[0152] Through the separation operation, subsets of question and answer data related to secondary hyperparathyroidism in different entity contexts can be obtained, and the SHPT data subset SHPT can be constructed. Specific data screening and classification can be combined with context to collect data.
[0153] Furthermore, the obtained SHPT data subset of the entity context at least includes the question and answer data on secondary hyperparathyroidism in the medical service consultation and other open question and answer data related to secondary hyperparathyroidism except for the medical service consultation.
[0154] Medical services mainly refer to services in the diagnosis and treatment of secondary hyperparathyroidism; other open services, such as basic information, nursing information, and doctor's orders of patients with secondary hyperparathyroidism, can be combined with clinical service classification.
[0155] S32. Based on the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, the SHPT data subset of multiple entity contexts and the preset deep text learning model, a question-answer pair association data set of secondary hyperparathyroidism is obtained.
[0156] Optionally, before step S32, the method further includes:
[0157] According to different entity contexts, NLP tasks of SHPT data subsets corresponding to entity contexts are generated for SHPT data subsets of multiple entity contexts.
[0158] Label each NLP task and write the corresponding entity context into the task attributes of each NLP task to facilitate task traversal and activate the model according to task attributes.
[0159] In a feasible implementation, for entity recognition of each SHPT data subset, it is necessary to determine the context corresponding to the task attribute of the SHPT data subset and select the corresponding model for entity recognition.
[0160] NLP tasks refer to a series of tasks that use computer technology and linguistics knowledge to process, analyze and understand natural language texts. The goal of NLP is to enable computers to understand and process human language, thereby achieving intelligent human-computer interaction.
[0161] NLP tasks can be divided into multiple subtasks, some common tasks include:
[0162] 1. Word segmentation and part-of-speech tagging: Divide the continuous text sequence into words and mark each word with its part of speech, such as noun, verb, adjective, etc. This is one of the basic tasks of NLP and plays an important role in subsequent semantic analysis and information extraction.
[0163] 2. Named Entity Recognition: Identify entities in text, such as names of people, places, and organizations, and classify them into predefined categories. NER is widely used in information extraction, question-answering systems, and other fields.
[0164] 3. Sentiment Analysis: Analyze the sentiment tendency of the text to determine whether the sentiment expressed in the text is positive, negative or neutral. Sentiment analysis plays an important role in public opinion monitoring, product evaluation and other fields.
[0165] 4. Text Classification: Classify text into predefined categories, such as news classification, movie review classification, etc. Text classification can help us quickly understand and organize large amounts of text data.
[0166] The present invention mainly utilizes named entity recognition and combines NLP to construct the NLP task of the SHPT data subset in the corresponding entity context, so as to facilitate the subsequent system to identify the task attributes and activate the corresponding link model to extract knowledge entities and improve efficiency.
[0167] BERT is a bidirectional pre-trained language model used for various downstream tasks such as text classification, named entity recognition, sentence relationship judgment, etc.
[0168] GPT is a one-way pre-trained language model, mainly used for generative tasks such as text generation and dialogue generation.
[0169] Because in the context of classification, medical services require more standardized service processes, so the knowledge entities that need to be extracted need to be strictly in accordance with clinical standards. BERT uses Masked Language Model and NextSentence Prediction for pre-training. After knowing the knowledge entities in medical services, it can predict the corresponding clinical medical service steps according to clinical logic. For non-medical service content, open understanding and identification of knowledge entities can be performed, while GPT uses one-way language modeling for pre-training.
[0170] Therefore, the present invention activates the corresponding deployed model according to the classification context, and performs entity recognition of SHPT data subsets respectively, so as to improve the recognition success rate and accuracy of entity recognition of each SHPT data subset. For the process of medical services, it is necessary to strictly perform services according to the task attributes. Therefore, BERT is used to extract data from the entity context of the NLP task: the question and answer data of secondary hyperparathyroidism in the medical service consultation, which can further improve the understanding of the data structure and the understanding and extraction of entity relationships of the question and answer data of secondary hyperparathyroidism in the medical service consultation.
[0171] Optionally, the above step S32 may include the following steps S321-S324:
[0172] S321. Read the NLP task and identify the task attributes of the SHPT data subset in the current NLP task.
[0173] S322. According to the task attributes, determine the entity context to which the question and answer data of the SHPT data subset in the current NLP task belongs.
[0174] S323. Determine whether the entity context to which the question and answer data belongs is the question and answer data on secondary hyperparathyroidism in the medical service consultation.
[0175] If the entity context of the current NLP task is: the question and answer data of secondary hyperparathyroidism in medical service consultation, the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism is activated to perform the current NLP task, and the SHPT data subset in the current NLP task is jointly trained and learned with the question and answer corpus of secondary hyperparathyroidism to extract the first question and answer pair associated data set related to secondary hyperparathyroidism.
[0176] If the entity context of the current NLP task is: open-ended question and answer data related to secondary hyperparathyroidism other than medical service consultation, the preset deep text learning model GPT-2 is activated to execute the current NLP task, and the SHPT data subset in the current NLP task is jointly trained and learned with the secondary hyperparathyroidism question and answer corpus to extract the second question and answer pair related data set related to secondary hyperparathyroidism.
[0177] S324. Obtain a question-answer pair associated data set of secondary hyperparathyroidism according to the first question-answer pair associated data set and the second question-answer pair associated data set.
[0178] Please refer to the above comparison of BERT and GPT models for more details. GPT-2 is the version label here, and users can choose the corresponding version model.
[0179] S33. Construct a knowledge graph of secondary hyperparathyroidism based on the data structure and association relationship of the question and answer pairs in the question and answer pair association data set of secondary hyperparathyroidism.
[0180] Optionally, the above step S33 may include the following steps S331-S334:
[0181] S331. Obtain a blank knowledge graph.
[0182] S332. Parse the first question-answer pair associated data set and / or the second question-answer pair associated data set to obtain the data structure of the data set, and obtain question-answer pair entities related to secondary hyperparathyroidism and the association relationship between the question-answer pair entities from the data structure.
[0183] S333. According to the association relationship, write each of the question-answer pair entities into the corresponding graph node in the blank knowledge graph to generate the secondary hyperparathyroidism knowledge graph.
[0184] S334. Save the knowledge graph of secondary hyperparathyroidism to the MySQL database.
[0185] In a feasible implementation, when constructing the knowledge graph of secondary hyperparathyroidism, manual annotation can also be performed to manually annotate the question and answer entities or relationships corresponding to certain nodes, so as to achieve user customization.
[0186] The construction method of the medical knowledge graph mainly includes the following steps:
[0187] 1. BERT-BiLSTM-CRF entity recognition model extracts entity knowledge of secondary hyperparathyroidism: This is the first step in building a medical knowledge graph. It mainly uses natural language processing and machine learning technologies to automatically extract entities, relationships, and attributes of medical knowledge from information sources such as medical literature, clinical guidelines, and medical databases. For example, the machine can identify key information such as disease names, disease symptoms, drug uses, and dosages, thereby establishing medical entities and the relationships between them.
[0188] 2. Knowledge representation: The extracted medical knowledge is represented in the form of a graph, for example, using a graph structure to represent the relationship between entities. After the BERT-BiLSTM-CRF entity recognition model is used to extract the knowledge entity dataset related to secondary hyperparathyroidism, the dataset is parsed to obtain the data structure of the dataset. From the data structure, we can see the question-and-answer knowledge entities and the associations between entities.
[0189] 3. Knowledge fusion: Integrate medical knowledge from different data sources to eliminate duplication and conflict and form a complete and consistent knowledge graph.
[0190] 4. Knowledge reasoning: Generate new medical knowledge by reasoning and inferring through the relationships and rules of the graph.
[0191] The nodes and connection relationships in the graph can be configured in a one-to-one correspondence with the entities in the dataset and the associations between entities.
[0192] Graph knowledge reasoning is a reasoning method based on knowledge graphs. It mainly revolves around reasoning about relationships, that is, inferring unknown facts or relationships based on existing facts or relationships in the graph. This kind of reasoning generally focuses on the characteristic information of entities, relationships, and graph structures, and can assist in reasoning out new facts, new relationships, new axioms, and new rules.
[0193] The main tasks of graph knowledge reasoning include completing and quality checking the knowledge graph through rule mining, link prediction, association reasoning and conflict detection, etc. The methods to achieve these tasks include reasoning based on logical rules, reasoning based on graph structure, reasoning based on distributed representation learning, reasoning based on neural networks, and hybrid reasoning.
[0194] In graph knowledge reasoning, there are some specific reasoning methods, such as translation distance method, neural network method, path reasoning method, query embedding method, neural rule method, temporal knowledge graph reasoning method, interpolation reasoning method, time coding method, external reasoning method and evolutionary network method. Among them, the translation distance method is a reasoning method that maps entities and relationships into a low-dimensional vector space and uses the change of space vectors to represent the entity linking process. This method has the advantages of strong interpretability, low learning cost, and strong semantic expression ability, but it has high data requirements, requires a lot of computing resources, and cannot reason about entities or relationships that do not appear in the knowledge graph, which has certain limitations.
[0195] Graph knowledge reasoning: The present invention does not limit the specific reasoning method. The reasoning method based on neural rules can be preferably used in combination with models such as CNN to perform graph knowledge reasoning.
[0196] 5. Knowledge application: Apply the constructed medical knowledge graph to actual clinical decision-making, disease prevention, health management and other fields to provide intelligent support and assistance.
[0197] S4. According to the problem of secondary hyperparathyroidism and the knowledge graph of secondary hyperparathyroidism, the query result of the problem of secondary hyperparathyroidism is obtained.
[0198] In a feasible implementation, the secondary hyperparathyroidism problems of the secondary hyperparathyroidism patients are input into a MySQL database, an SQL search of the corresponding problems is performed in the MySQL database, and the answer corpus corresponding to the secondary hyperparathyroidism problems is output.
[0199] The present invention also includes a parathyroid medical knowledge intelligent query system based on knowledge graph, the system comprising:
[0200] The user end is used to collect secondary hyperparathyroidism problems of patients with secondary hyperparathyroidism and feed them back to the backend server.
[0201] MySQL database, used to store the knowledge graph of secondary hyperparathyroidism.
[0202] The backend server is used to generate SQL search instructions for secondary hyperparathyroidism questions, retrieve secondary hyperparathyroidism question-answer pairs that match the secondary hyperparathyroidism questions from the secondary hyperparathyroidism knowledge graph in the MySQL database, and feed back to the user end.
[0203] The MySQL database is deployed on the backend server.
[0204] The client is connected to the backend server for communication.
[0205] like Figure 4 As shown, a parathyroid medical knowledge intelligent query system based on knowledge graph includes a user terminal 310, a backend server 320, and a MySQL database 330. Among them:
[0206] The MySQL database 330 stores the secondary hyperparathyroidism knowledge graph and provides corresponding SQL search services. After receiving the secondary hyperparathyroidism question from the user terminal 310 , the backend server 320 generates an SQL search instruction for the secondary hyperparathyroidism question and sends it to the MySQL database 330 .
[0207] The MySQL database 330 responds to the SQL search instruction, retrieves and feeds back the secondary hyperparathyroidism answer corresponding to the secondary hyperparathyroidism question, and the backend server 320 feeds back to the user terminal 310, thereby realizing interaction.
[0208] A GPT-based voice robot may also be installed on the backend server 320 to cooperate with the secondary hyperparathyroidism knowledge graph stored in the MySQL database 330 to jointly output corresponding answers to the user.
[0209] The backend server 320 can identify the entity context of the secondary hyperparathyroidism problem:
[0210] If the entity context is: secondary hyperparathyroidism question and answer data in medical service consultation, then the MySQL database 330 is activated to execute the current question and answer task;
[0211] If the entity context is: other open-ended question and answer data related to secondary hyperparathyroidism other than medical service consultation, the preset GPT-based voice robot in the background will be activated to perform the current question and answer task.
[0212] The answers are uniformly fed back to users from the background.
[0213] The user terminal 310 may be a terminal such as a smart phone.
[0214] The present invention implements an intelligent question-answering system based on a medical knowledge graph, which classifies user questions, processes medical service questions using a retrieval model with the BERT language model as the core, and automatically generates answers to other open questions using the GPT-2 generative model. Two different models are used to process the questions. Combining the GPT-2 and BERT-BiLSTM-CRF algorithms, knowledge entities are classified and identified and corresponding medical graphs are constructed, which can accurately answer user questions in real time and meet the user's needs for obtaining medical information.
[0215] The purpose of the present invention is to utilize the large amount of consultation data and patient health education data sets accumulated on the online consultation platform to construct a medical intelligent question-answering system suitable for patients with secondary hyperparathyroidism.
[0216] The present invention mainly combines the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, and extracts the question-and-answer entities related to secondary hyperparathyroidism from a large amount of consultation data and patient health education data sets accumulated on the online consultation platform, and generates the corresponding secondary hyperparathyroidism knowledge graph, which is further constructed into a medical intelligent question-and-answer system suitable for patients with secondary hyperparathyroidism.
[0217] Natural language processing technology is used to preprocess multiple online consultation data sets and patient health education data sets to extract short text data; a model based on the BERT-BiLSTM-CRF entity recognition algorithm based on the attention mechanism is used to perform named entity recognition and relationship extraction, and a knowledge question and answer model including a joint model of BERT embedding layer, BERT model and CRF is constructed; short text data is input into the pre-trained health knowledge question and answer model to obtain a list of predicted answers and predicted values; semi-supervised learning and remote supervision methods are used, combined with manual annotation and automation technology, to improve the efficiency of knowledge graph construction and the accuracy of reasoning models.
[0218] In an embodiment of the present invention, by combining a BERT-BiLSTM-CRF entity recognition model based on an attention mechanism and a preset deep text learning model, a subset of SHPT data in different entity contexts is jointly trained and learned with a secondary hyperparathyroidism question-and-answer corpus, and a question-and-answer pair association data set related to secondary hyperparathyroidism is extracted; according to the data structure and association relationship of the question-and-answer pair in the question-and-answer pair association data set, a corresponding secondary hyperparathyroidism knowledge graph is constructed. In this way, a large amount of consultation data and patient health education data sets accumulated by the online consultation platform are used to construct a medical intelligent question-and-answer system suitable for patients with secondary hyperparathyroidism, and intelligently answer the secondary hyperparathyroidism questions raised by patients with secondary hyperparathyroidism, which can meet the real-time health consultation needs of patients, facilitate patients to carry out long-term self-management of the disease, and reduce the work pressure of medical staff.
[0219] Figure 5 The block diagram of a parathyroid medical knowledge intelligent query device based on a knowledge graph is shown according to an exemplary embodiment. The device is used in a parathyroid medical knowledge intelligent query method based on a knowledge graph. Figure 5 The device includes an acquisition module 510, an entity recognition model construction module 520, a knowledge graph construction module 530, and an output module 540. Among them:
[0220] The acquisition module 510 is used to acquire the secondary hyperparathyroidism problem to be queried.
[0221] The entity recognition model construction module 520 is used to construct a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism.
[0222] The knowledge graph construction module 530 is used to construct a knowledge graph of secondary hyperparathyroidism based on a BERT-BiLSTM-CRF entity recognition model based on an attention mechanism.
[0223] The output module 540 is used to obtain a query result of the secondary hyperparathyroidism problem according to the secondary hyperparathyroidism problem and the secondary hyperparathyroidism knowledge graph.
[0224] In an embodiment of the present invention, by combining a BERT-BiLSTM-CRF entity recognition model based on an attention mechanism and a preset deep text learning model, a subset of SHPT data in different entity contexts is jointly trained and learned with a secondary hyperparathyroidism question-and-answer corpus, and a question-and-answer pair association data set related to secondary hyperparathyroidism is extracted; according to the data structure and association relationship of the question-and-answer pair in the question-and-answer pair association data set, a corresponding secondary hyperparathyroidism knowledge graph is constructed. In this way, a large amount of consultation data and patient health education data sets accumulated by the online consultation platform are used to construct a medical intelligent question-and-answer system suitable for patients with secondary hyperparathyroidism, and intelligently answer the secondary hyperparathyroidism questions raised by patients with secondary hyperparathyroidism, which can meet the real-time health consultation needs of patients, facilitate patients to carry out long-term self-management of the disease, and reduce the work pressure of medical staff.
[0225] Figure 6 is a schematic diagram of the structure of a parathyroid medical knowledge intelligent query device provided by an embodiment of the present invention, such as Figure 6 As shown, the parathyroid medical knowledge intelligent query device may include the above Figure 5 The parathyroid gland medical knowledge intelligent query device based on the knowledge graph is shown. Optionally, the parathyroid gland medical knowledge intelligent query device 410 may include a first processor 2001 .
[0226] Optionally, the parathyroid medical knowledge intelligent query device 410 may further include a memory 2002 and a transceiver 2003 .
[0227] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0228] Combine the following Figure 6 The components of the parathyroid medical knowledge intelligent query device 410 are specifically introduced as follows:
[0229] The first processor 2001 is the control center of the parathyroid medical knowledge intelligent query device 410, which can be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs).
[0230] Optionally, the first processor 2001 may execute various functions of the parathyroid medical knowledge intelligent query device 410 by running or executing a software program stored in the memory 2002 , and calling data stored in the memory 2002 .
[0231] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 6 CPU0 and CPU1 are shown in FIG.
[0232] In a specific implementation, as an embodiment, the parathyroid medical knowledge intelligent query device 410 may also include multiple processors, such as Figure 6 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0233] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0234] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be accessed through the interface circuit ( Figure 6 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0235] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0236] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 6 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0237] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently and communicate with the first processor 2001 through the interface circuit ( Figure 6 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0238] It should be noted that Figure 6 The structure of the parathyroid medical knowledge intelligent query device 410 shown in the figure does not constitute a limitation on the router, and the actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0239] In addition, the technical effects of the parathyroid medical knowledge intelligent query device 410 can refer to the technical effects of the parathyroid medical knowledge intelligent query method based on the knowledge graph described in the above method embodiment, and will not be repeated here.
[0240] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0241] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0242] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0243] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0244] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0245] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0246] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0247] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0248] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0249] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0250] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0251] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0252] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A parathyroid medical knowledge intelligent query method based on knowledge graph, characterized in that: The method comprises: S1. Obtain the secondary hyperparathyroidism problem to be queried; S2. Construct a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism; The BERT-BiLSTM-CRF entity recognition model based on the attention mechanism in S2 includes: S21. Collect historical consultation big data of patients with secondary hyperparathyroidism; S22, performing text regression preprocessing on the historical medical consultation big data of secondary hyperparathyroidism, extracting question and answer data of secondary hyperparathyroidism in different entity contexts, and obtaining word vectors of the question and answer data and semantic structure features of the corresponding word vectors; S23, setting the attention mechanism of different entity contexts according to the word vector and the semantic structure characteristics of the corresponding word vector; S24, obtain the initial BERT-BiLSTM-CRF entity recognition model; Wherein, the initial BERT-BiLSTM-CRF entity recognition model includes a BERT module, a BiLSTM module and a CRF module; S25. According to the attention mechanism of different entity contexts, convergence constraints are imposed on the question-and-answer data of secondary hyperparathyroidism identified by the BERT module in the text recognition process, an attention layer is linked between the BERT module and the BiLSTM module, and attention mechanisms of different entity contexts are configured in the linked attention layer to obtain a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism; S3. Constructing a knowledge graph of secondary hyperparathyroidism according to the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism; The S3 constructs a knowledge graph of secondary hyperparathyroidism according to the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, including: S31, collecting historical consultation big data of secondary hyperparathyroidism of patients with secondary hyperparathyroidism, classifying the historical consultation big data of secondary hyperparathyroidism based on the SHPT medical entity dictionary, and obtaining SHPT data subsets of multiple entity contexts; The historical consultation big data of secondary hyperparathyroidism patients in S31 is as shown in formula (1): SHPT=data(x) (1) In the formula, SHPT represents the historical consultation big data of secondary hyperparathyroidism patients, data(x) represents the historical consultation big data of secondary hyperparathyroidism in different entity contexts x, including the corresponding question-answer pairs of secondary hyperparathyroidism; The SHPT data subsets of the multiple entity contexts are shown in the following formula (2): SHPT x =[SHPT A]data(x) (2) Where, SHPT x It represents a subset of SHPT data in any entity context, A represents the SHPT medical entity dictionary, and [SHPT A] represents the classification rules set based on the SHPT medical entity dictionary; S32 and before include: According to different entity contexts, generate NLP tasks for SHPT data subsets corresponding to entity contexts for SHPT data subsets of multiple entity contexts; Annotate the NLP task and write the corresponding entity context into the task attributes of the NLP task; S32, according to the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, the SHPT data subset of multiple entity contexts and the preset deep text learning model, obtain a question-answer pair association data set of secondary hyperparathyroidism; S33, constructing a knowledge graph of secondary hyperparathyroidism according to the data structure and association relationship of the question-answer pairs in the question-answer pair association data set of secondary hyperparathyroidism; S4. Obtain query results for the secondary hyperparathyroidism problem based on the secondary hyperparathyroidism problem and the secondary hyperparathyroidism knowledge graph.
2. The method for intelligent query of parathyroid medical knowledge based on knowledge graph according to claim 1 is characterized in that: In the S32, according to the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism, the SHPT data subsets of multiple entity contexts and the preset deep text learning model, a question-answer pair association data set of secondary hyperparathyroidism is obtained, including: S321, reading the NLP task, and identifying the task attributes of the SHPT data subset in the NLP task; S322, judging the entity context to which the question and answer data of the SHPT data subset in the NLP task belongs according to the task attribute of the SHPT data subset; S323, determining whether the entity context to which the question and answer data belongs is the question and answer data on secondary hyperparathyroidism in the medical service consultation; If yes, then the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism is activated, and the NLP task is performed. The SHPT data subset in the NLP task is jointly trained with the secondary hyperparathyroidism question and answer corpus to extract the first question and answer pair associated data set of secondary hyperparathyroidism. If not, activate the preset deep text learning model, execute the NLP task, conduct joint training and learning of the secondary hyperparathyroidism question and answer corpus on the SHPT data subset in the NLP task, and extract the second question and answer pair associated data set of secondary hyperparathyroidism; S324. Obtain a question-answer pair associated data set of secondary hyperparathyroidism according to the first question-answer pair associated data set and the second question-answer pair associated data set.
3. The method for intelligent query of parathyroid medical knowledge based on knowledge graph according to claim 2 is characterized in that: The step S33 constructs a knowledge graph of secondary hyperparathyroidism based on the data structure and association relationship of the question-answer pairs in the question-answer pair association data set of secondary hyperparathyroidism, including: S331, obtaining a blank knowledge graph; S332, obtaining the data structure of the first question-answer pair associated data set and the second question-answer pair associated data set, and obtaining the association relationship between the question-answer pair entities of secondary hyperparathyroidism according to the data structure; S333. According to the association relationship, the question-answer entity is written into the corresponding graph node in the blank knowledge graph to generate a knowledge graph of secondary hyperparathyroidism.
4. A parathyroid medical knowledge intelligent query device based on a knowledge graph, wherein the parathyroid medical knowledge intelligent query device based on a knowledge graph is used to implement the parathyroid medical knowledge intelligent query method based on a knowledge graph as claimed in any one of claims 1 to 3, characterized in that: The device comprises: An acquisition module is used to acquire the secondary hyperparathyroidism problem to be queried; Entity recognition model building module, used to build a BERT-BiLSTM-CRF entity recognition model based on the attention mechanism; A knowledge graph construction module, used to construct a knowledge graph of secondary hyperparathyroidism according to the BERT-BiLSTM-CRF entity recognition model based on the attention mechanism; The output module is used to obtain the query result of the secondary hyperparathyroidism problem according to the secondary hyperparathyroidism problem and the secondary hyperparathyroidism knowledge graph.
5. A parathyroid medical knowledge intelligent query device, characterized in that: The parathyroid medical knowledge intelligent query device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Question parsing method for medical knowledge graph questions and answers
CN113918694A