With the rapid development of Internet technology,most people are used to using search engines to search for medical information.However,the information on the Internet is usually disorganized and of varying quality,which requires a lot of time and effort to filter the useful information manually,while some online consultation platforms have professional doctors to answer the questions,but the timeliness is usually poor.Therefore,this paper builds an intelligent medical Q&A system based on medical field data to provide users with accurate,efficient and high-quality medical Q&A services.The work in this paper contains the following three main parts:(1)In this paper,the semantic parsing module of interrogative sentences is divided into two sub-modules,entity recognition and intention recognition.Roberta-Bi GRUAttention-CRF model is proposed in the entity recognition sub-module.Ro BERTa pretraining model is used to generate word vector representation of input questions,and Bi GRU model is used to extract contextual semantic information.Next,the multi-head self-attention layer is used to further extract text features to obtain the weight relationship of different words,so as to make up for the problem that Ro BERTa model is not fine-tuned.Finally,CRF model is used to correct the constraint of entity labels.The F1 values of this model in CMe EE dataset and Med ER dataset are 69.51% and89.16%,respectively,which is significantly better than other entity recognition models.In the intent recognition sub-module this paper uses the Ro BERTa-DPCNN model to embed the text data by introducing the Ro BERTa pre-training model,and the DPCNN model is used to convolve and pool the text features and classify the user intent.The F1 value of this model is 86.42% under Med IR dataset,and the effect is more excellent compared with other intention recognition models.(2)In this paper,a knowledge graph-based answer retrieval method is implemented.Relevant data are obtained from medical information websites using crawler technology and pre-processed,and data persistence is completed using Json files.The construction of medical knowledge graph is completed according to the defined Schema and stored by Neo4 j,which contains about 30,000 entities and 210,000 relationships.According to entity recognition model and intention recognition model to obtain medical entity information and user intention,use entity chain finger and slot filling techniques to generate Cypher statements to get answers in the knowledge graph,and finally display the answer data to users.(3)This paper implements an intelligent medical web system.The system is designed using software engineering methods for requirements analysis,outline design and detailed design.The system is mainly based on the Django framework to achieve the integration of algorithm models,using Vue technology to complete the visualization of the front-end interface,and the system was tested for functionality and performance to verify the usability and practicality of the system,in which the accuracy rate of the system Q&A reached 88%.Thus,the system proves that it can provide efficient medical Q&A service. |