# Named Entity Recognition in Online Medical Consultation Using Deep Learning
## 1 Introduction  
With the rapid development and advancements in mobile internet technology and improvements in health awareness, an increasing number of patients and their caregivers tend to obtain preliminary health advice through online medical consultation before going to the hospital [1]. Although online medical consultation can effectively alleviate social problems such as the uneven distribution of and shortages in medical resources and high medical expenses [2], the timeliness of information acquisition for online medical consultations cannot be guaranteed due to the lack of doctors who can provide online medical consultation services 24/7. Virtual intelligent health assistants constructed by fully using the massive quantity of real doctor-patient question-and-answering data accumulated in online medical consultation [3] will provide timely, inexpensive, and accurate health services. However, the text of doctor-patient questions and answers in online medical consultation is mostly unstructured, which hinders medical knowledge discovery and clinical information extraction [4]. This further affects in-depth healthcare-related applications, such as medical history analysis and disease early warning. Medical named entity recognition can convert unstructured text into structured text effectively, providing important data support for constructing online medical consultation knowledge graphs and virtual intelligent health assistants. Current medical named entity recognition mainly uses electronic medical records [5], medical literature [6], and clinical records [7] as data sources; online medical consultation texts are rarely used as a data source. As a result, there are no publicly available high-quality annotated datasets. This may be because online medical consultation in the context of social media is facing more serious problems related to nonstandard expression. This includes internet slang, lexical inflections, and spelling errors [4]. This problem may lead to a serious out-of-vocabulary (OOV) problem and seriously affect the performance of medical named entity recognition. In addition, the current research on medical named entity recognition for online medical consultation faces severe challenges, such as the scarcity of entity types and the complex semantics of the context [1,4]. To address the above problems, a large online medical consultation named entity recognition dataset containing 26 medical entity types is constructed. On this basis, a novel deep medical named entity recognition approach based on the fusion context mechanism named CBERT-SCNN-Local_Context-BiLSTM-Global_Context-DeepFM-Fusion_Context-MCRF is proposed. First, by comprehensively considering character embedding, glyph embedding, pinyin embedding, and position embedding in ChineseBERT [8], the OOV issue is mitigated, enhancing the model's ability to generalize. Second, this approach combines a stacked convolutional neural network (CNN) and a local context mechanism to capture the local contextual semantic representation of the online medical consultation text. Third, this approach combines bidirectional long short-term memory (BiLSTM) and the global context mechanism to capture the global contextual semantic representation of online medical consultation text. Then, a deep factorization machine is combined with a fusion context mechanism to capture the high- and low-order feature interaction relationships between the local and global contextual semantic representations. Finally, the semantic representation of the fusion context obtained through the above steps is input to the masked conditional random field (MCRF) to determine the final medical entity tag sequence. From the perspective of theoretical and practical significance, the novel contributions of this study are as follows:  
1. An online medical consultation named entity identification dataset for up to 26 medical entity types is constructed, which far exceeds those of the existing studies;
2.