Aiming at the problem of cosmic ray noise in high-resolution spectroscopy (HRS) images, this paper proposes a linear median filter noise reduction method. Filtering implements noise reduction processing on high-resolution spectral image data. Compared with traditional noise reduction methods such as median filtering and Laplacian edge detection, this method has a significant effect in cosmic ray denoising in HRS images, and can maintain the authenticity of the original data and information fidelity while completing the noise reduction. more than 92%. Experiments demonstrate the effectiveness and reliability of the proposed method.