Background: Automatic segmentation of brain tumors using deep learning algorithms is one of the research hotspots in the field of medical image segmentation at this stage. An improved u-net network is proposed to segment brain tumors in order to improve the segmentation effect of brain tumors.Methods: In order to solve the problems that other brain tumor segmentation models such as U-Net have insufficient ability to segment edge details, poor extraction of location information and the commonly used Binary Cross-Entropy and Dice loss are often ineffective when used as loss functions for brain tumor segmentation models, we propose a serial encoding-decoding structure, which achieves improved segmentation performance by adding Hybrid Dilated Convolution (HDC) modules and the connections between each module of the two serial networks, in addition, we propose a new loss function in order to make the model more focused on samples that are difficult to segment and classify. We compared the results of our proposed model and the commonly used segmentation models under IOU, PA, Dice, Precision, Hausdorf95, and ASD metrics.Results: The performance of the proposed method outperforms other segmentation models in each metric. In addition, the schematic diagram of segmentation results shows that the segmentation results of our algorithm are closer to ground truth, showing more details of brain tumors, while the segmentation results of other algorithms are more smooth.Conclusions: Our algorithm has better semantic segmentation performance, compared with other commonly used segmentation algorithms. The technology we proposed can be used in the diagnosis of brain tumors to provide better protection for patients' later treatment.