Accurate segmentation of lung nodules is crucial for subsequent pathological analysis and diagnosis. However, precise segmentation is difficult due to their complex morphological features and visual characteristics similar to surrounding tissues. The lung nodule segmentation model based on a convolutional neural network focuses on extracting local features but ignores global features. Meanwhile, the shallow layer of the encoder-decoder structure is rich in spatial information but lacks semantic information, and the deep layer has rich semantic information but lacks spatial information. This paper innovatively proposes a Cross-Transformer module and a Bidirectional Pyramid module to effectively ameliorate the above two defects. The former combines the Transformer's internal and external self-attention to alleviate the limitations of convolution operations and enhance the ability of the Transformer to extract global features. The latter adds bidirectional channels to the feature pyramid to increase the interaction of feature information between the shallow and deep layers of the model, reducing the differences in features at different stages of the model. Extensive experiments of lung nodule segmentation performed on the LIDC-IDRI dataset have shown that the highest Dice Similarity Coefficient is 91.68, the highest Sensitivity is 92.24, and the comprehensive performance has surpassed UTNet. The model proposed in this paper has superior performance for the segmentation of lung nodules and can further analyze the shape, size, and other characteristics of lung nodules, which is of great clinical significance and application value to physicians in the early diagnosis of lung nodules.