With the potential of increasing mobility and reducing cost, shared mobility of autonomous vehicles (AVs) is going to gain solid growth in the coming decade. The major issue for the shared use of AVs is how to project serving routes in an efficiently way. From another perspective, this issue could be understood as to segment maximum number of passengers into groups. Therefore, this paper intends to investigate passengers' similarity instead of directly matching AVs and passengers. The goal is to determine the minimum number of groups and assign each group with an AV. To this end, a cluster-based algorithm is proposed to classify passengers. Numerical experiments with both small-size and large-size demands are performed to present the validity of the proposed algorithm. Results indicate that the cluster-based algorithm could bring benefit to minimizing the number of vehicles and total travel distance. At last, sensitivity analysis of key parameters shows that vehicle capacity will have little impact when the number of seats exceeds four, and time windows could make continuous influence on gathering passengers.