| Question answering systems have experienced considerable development in the field of natural language processing.In actual scenarios,question answering systems are usually built for vertical fields.However,the amount of data for question answering pairs and the completeness of the knowledge base have always been the core issues of the matching accuracy of question answering pairs.With the emergence and development of knowledge graphs,it has the characteristics of completeness and scalability for specific domain knowledge,making knowledge graphs more applied to question answering systems.Due to the limitation of the medical knowledge base,the question answering system in the medical field has always been a more complicated problem.This paper designs a question-and-answer system in the medical field based on a knowledge map.The main work is to construct a knowledge map in the medical field,design a guided multi-round dialogue system,and infer the patient’s condition through the knowledge base combined with symptom information.First,the data content of the medical field website is obtained through crawler technology,and the data is sorted into formatted data after data preprocessing and data cleaning,and then stored in a non-relational database.Finally,design appropriate entities,relationships and attributes according to the data content and system requirements,and save them in the graph database to form a complete knowledge graph.The question answering system first uses the collected large quantities of Chinese medical data to pretrain and optimize the BERT model,and then uses it as a feature extractor to combine the Bi LSTM model with the Attention mechanism and the CNN network to build a symptom classification model.The system initially extracts the top3 results as predictions,and then combines the medical knowledge graphs.During multiple rounds of dialogue,the condition and symptoms are gradually reasoned and empowered based on the existing symptoms and no symptoms collected in the dialogue interaction.After the round,the final condition prediction is made based on the collected content and its weight.The system mainly uses Flask as the back-end management framework,and designs a simple question and answer page to provide users with medical information for question and answer interaction,and also supports the query and management of the knowledge map data,which is convenient for managers. |