Feature extraction can effectively alleviate the curse of dimensionality on high-dimensional data. Contrastive learning, as a self-supervised learning method, has garnered widespread attention in recent years. In this study, we propose a new unsupervised feature extraction model based on contrastive learning. We integrate the principle of contrastive learning into the feature extraction model in a novel way without data augmentation or negative samples, defining positive samples more accurately and flexibly. Additionally, we propose new structure preserving terms based on the selected positive samples to preserve the distribution structure of specific categories. An iterative algorithm is designed to solve the proposed model. Numerical experiments on four real datasets demonstrate that our method outperforms existing methods, highlighting its potential in handling high-dimensional data and extracting discriminative features.