CLHA: A Simple yet Effective Contrastive Learning Framework for Human Alignment