The invention relates to a medical entity recognition method based on multi-granularity text embedding, and belongs to the technical field of information extraction and knowledge graph construction. The medical entity recognition method comprises the steps: construction of multi-granularity text embedding: constructing the multi-granularity text embedding through a pre-training language model, the multi-granularity text embedding comprising character embedding, word embedding, part-of-speech embedding, substring embedding and phrase embedding; mode weight generation: generating mode weights of all characters in the Chinese sentence according to the medical term composition mode; node embedding representation learning: performing node embedding representation learning by using a graph attention network and a mode enhanced attention mechanism; output of a medical text entity recognition result: generating an entity category label of the medical text by adopting a conditional random field, and outputting the medical entity recognition result. According to the method, the problems of insufficient utilization of graph representation information and single embedding granularity of text distributed representation in medical entity recognition are solved, so that the performance of medical entity recognition is improved.
Medical entity recognition method based on multi-granularity text embedding