Individual identification is the basis for accurate breeding and management of dairy cows. Most of the studies on individual identification of dairy cows focused on closed data sets. Meanwhile, the training process requires lots of manual labeling data as support. Aiming at solving the above shortcomings, an unsupervised cow individual identification model named AC-Cowid (Adaptive Group Sample-Central Momentum Contrastive loss-Cowid) was proposed. The innovation of the model lied in the novel sampler and loss function. Adaptive Group Sampler made up for the sampling imbalance problem in the current samplers. The sampler would self-update with model optimization. The central constraint term in Central Momentum Contrastive loss made the updated features more inclined to the cluster center, effectively solved the discomfort of Contrastive loss to cow image data. Feature similarity matching was adopted to meet the challenge of data conversion from a closed set to an open and changeable set. The unsupervised training reduced the workload of manual data labeling. The CMC-1 and mAP index of the final model were 99.50 % and 77.90 %, respectively. Ablation and hyper-parameter experiments proved the effectiveness of the proposed method. The comparison experiment tested eight unsupervised methods and five supervised algorithms in the state-of-the-art. The mAP and CMC-1 of the proposed method was the best among the comparison algorithms. Above all, the proposed method was 4.60 % and 5.38 % higher on mAP and CMC-1 compared with the best algorithm in supervised learning. This study could provide technical support for individual identification of cows in large-scale cattle farms.