To address the issues of uneven sample lengths in the centrifuge machine bearings of the ternary precursor, inaccurate fault feature extraction, and insensitivity of important feature channels in rolling bearings, a rolling bearing fault diagnosis method based on adaptive sample length adjustment of one-dimensional convolutional neural network (1DCNN) and squeeze-and-excitation network (SeNet) is proposed. Firstly, by controlling the cumulative variance contribution rate in the principal component analysis algorithm, adaptive adjustment of sample length is achieved, reducing data with uneven sample lengths to the same dimensionality for various classes. Then, the 1DCNN extracts local features from bearing signals through one-dimensional convolution-pooling operations, while the SeNet network introduces a channel attention mechanism which can adaptively adjust the importance between different channels. Finally, the 1DCNN-SeNet model is compared with four classic models through experimental analysis on the CWRU bearing dataset. The experimental results indicate that the proposed method exhibits high diagnostic accuracy in rolling bearings, demonstrating good adaptability and generalization capabilities.