Emergence mechanisms of group consensus in social networks