With the continuous popularization of medical informatization, the number of medical documents, medical guides, electronic medical records and other medical texts shows a trend of rapid growth and huge scale. Medical texts contain great social value. However, most medical texts exist in an unstructured form and cannot be directly applied to products. Therefore, how to fully explore the potential valuable information has become a hot research direction in the field of natural language processing. Named entity recognition is the basic task of natural language processing, and also the key task of medical data mining and analysis. It also lays the foundation for downstream tasks such as medical term relationship extraction and medical term standardization. Named entity recognition aims to find some key phrases in a large number of texts, such as people's names, place names, diseases and drugs. At present, named entity recognition has made great achievements in the open field, but there are still many problems in the research of named entity recognition in the medical field, such as the strong professionalism of entities, the long length of some types of entities, and the existence of complex entities mixed in Chinese and English. Aiming at the problem that the length of named entities in existing medical electronic medical records is longer than that in other fields, resulting in low extraction accuracy, a named entity recognition algorithm based on boundary enhancement is proposed. The model adopts the method of multi-task learning, which can effectively alleviate the boundary problem caused by the length of medical terms. We have tried various models on our medical electronic medical record data set. Experimental results show that this method is simple and effective in medical named entity recognition.