With the development of internet technology,intelligent medical Q&A systems have become a new type of medical service model.Through natural language processing and artificial intelligence algorithms,intelligent medical Q&A systems can automatically answer medical questions posed by patients.Compared to traditional online doctor community Q&A platforms,intelligent medical Q&A systems can provide faster and more accurate answers to patient questions,thereby greatly alleviating the burden on doctors and the scarcity of medical resources.When building an intelligent medical Q&A system,selecting the correct answers to medical questions is a crucial step.Due to the wide and complex knowledge in the medical field and the diverse types of answers,this paper studies a series of answer selection algorithms to select the correct answers corresponding to the questions.Through a detailed comparative analysis of existing Chinese medical answer selection algorithms,this paper points out the problems existing in the current answer selection methods and proposes corresponding solutions.The main research work of the paper is as follows:(1)The current answer selection methods mostly rely on convolutional neural networks and recurrent neural networks to extract word embedding features,which suffer from the problem of sparse features that make it difficult to explore deep-level features such as contextual semantics and logical relationships in text.This paper designs a BERT fine-tuning answer selection algorithm based on a delayed interaction mechanism,which uses a stack of Transformer encoder structures and weights pre-trained on a large corpus to fully capture the contextual information and logical relationships in text.By implementing delayed interaction,the algorithm achieves fine-grained question-and-answer interaction and achieves the highest answer selection accuracy compared to baseline models on c Med QA V1.0 and c Med QA V2.0datasets.(2)To address the problem of mismatched question-and-answer intentions when using the BERT fine-tuning answer selection algorithm based on a delayed interaction mechanism for Chinese medical answer selection,this paper proposes a new answer selection algorithm that integrates external knowledge sources.The algorithm adopts a two-stage architecture: first,the BERT fine-tuning answer selection algorithm based on a delayed interaction mechanism is used to select relevant answers,and then an intent classification algorithm based on a Chinese whole word masking pre-training language model and a named entity recognition algorithm based on a relative attention mechanism are combined to select the most matching answer based on question-and-answer rules.Higher accuracy has been achieved on both c Med QA V1.0and c Med QA V2.0 datasets,with a reduced occurrence of question-answer intention mismatch.(3)In the process of designing an answer selection algorithm that integrates external knowledge sources,a new medical named entity recognition algorithm based on relative attention mechanism was proposed through research and analysis of traditional medical named entity recognition methods.The algorithm utilizes a relative attention mechanism in the Transformer encoding layer,combined with dynamic generation of feature representations of words using BERT pre-training model,enabling the model to extract richer semantic information.Experimental results on a Chinese medical named entity recognition dataset demonstrate its superior performance. |