Background: The current outbreak of novel coronavirus disease 2019 has caused a serious disease burden worldwide. Vaccines are an important factor to sustain the epidemic. Although with a relatively high-vaccination worldwide, the decay of vaccine efficacy and the arising of new variants lead us to the challenge of maintaining a sufficient immune barrier to protect the population. Method: A case-contact tracking data in Hunan, China, is used to estimate the contact pattern of cases for scenarios including school, workspace, etc, rather than ordinary susceptible population. Based on the estimated vaccine coverage and efficacy, a multi-group vaccinated-exposed-presymptomatic-symptomatic-asymptomatic-removed model (VEFIAR) with 8 age groups, with each partitioned into 4 vaccination status groups is developed. The optimal dose-wise vaccinating strategy is optimized based on the currently estimated immunity barrier of coverage and efficacy, using the greedy algorithm that minimizes the cumulative cases, population size of hospitalization and fatality respectively in a certain future interval. Parameters of Delta and Omicron variants are used respectively in the optimization. Results: The estimated contact matrices of cases showed a concentration on middle ages, and has compatible magnitudes compared to estimations from contact surveys in other studies. The VEFIAR model is numerically stable. The optimal controled vaccination strategy requires immediate vaccination on the un-vaccinated high-contact population of age 30-39 to reduce the cumulative cases, and is stable with different basic reproduction numbers ( R0 ). As for minimizing hospitalization and fatality, the optimized strategy requires vaccination on the un-vaccinated of both aged 30-39 of high contact frequency and the vulnerable older. Conclusion: The objective of reducing transmission requires vaccination in age groups of the highest contact frequency, with more priority for un-vaccinated than un-fully or fully vaccinated. The objective of reducing total hospitalization and fatality requires not only to reduce transmission but also to protect the vulnerable older. The priority changes by vaccination progress. For any region, if the local contact pattern is available, then with the vaccination coverage, efficacy, and disease characteristics of relative risks in heterogeneous populations, the optimal dose-wise vaccinating process will be obtained and gives hints for decision-making.